Commit Graph

54 Commits

Author SHA1 Message Date
mandi 4a1a5a02af Renamed package to fit new Project Name 2022-05-12 13:56:52 +02:00
mandi 229b5c8870 Changed Project Name from godovecot to modDovecot
Issue
2022-05-12 13:51:50 +02:00
mandi 1a351c3401 Changed .gitignore
Issue
2022-05-12 13:49:31 +02:00
mandi 8d807d82b3 Marked server struct area 2022-05-06 12:31:49 +02:00
mandi ecf0334cdb Removed referenced logger
Problem
Reference to logger needs to set one in instance. Keeping out a logger is not possible.
Solution
- According to seperation of concerns logger removed from module

Issue
2022-04-30 00:58:03 +02:00
mandi 8b78803d6d Implemented initial logging
Issue
close #11
close #18
2022-04-25 20:46:55 +02:00
mandi ccc3a3989a Added description in README.md 2022-04-25 20:43:29 +02:00
mandi 468a4062af Implement logging using callback functions
Problem
To implement logging using a module (like logrus) the functions must be implemented either in main.go or in dovecot using exactly the choosen module.
Using an other module later would be a huge effort for refactoring
Solution
To be able to use any logging api you want logging is implemented as callbacks including seperate functions for
- Info
- Error
- Warn
- Fatal

Need to implement on every function of godovecot, but first a template must be created
Issue
2022-04-25 20:30:33 +02:00
mandi d0f06a5b34 Initial logging implementation 2022-04-25 18:02:20 +02:00
mandi a4ac7f50d3 Initial logging implementation 2022-04-25 18:02:05 +02:00
mandi 9a18ddd0f7 Changed concatinated string in functionsto server.sshAddress 2022-04-25 13:45:44 +02:00
mandi a93d4e8349 Added constant serialisation-path 2022-04-25 13:40:04 +02:00
mandi 69605cdadc Changed fields of server struct to private
Problem
Public fields would allow changes on created field values by constructor
Solution
Set fields of server struct to priavte and implemented custom json.MarshalJSON and custom json.UnmarshalJSON functions

Issue
closes #19
2022-04-25 02:33:12 +02:00
mandi 0f77f2da7d Initial implementation of non-exiting error handling in function server.TestSSH() 2022-04-24 05:06:37 +02:00
mandi 1381dc216d Changed and managed MailServer struct to order Api and ssh paramters
Issue
2022-04-24 04:02:20 +02:00
mandi 9b27b85434 Changed golang version tpo 1.18
Note
go mod vendor
go mod tidy
Issue
2022-04-24 03:51:37 +02:00
mandi c76f2da22e Issue closes #14 2022-04-24 03:45:46 +02:00
mandi 07af874f2c Added certificate based SSH authentication
Problem
Should not use password for ssh authentication

Solution
Using openssh rsa private key file and knownhosts file to authenticate instead of password
- Added internal function getSSHConfig() (*ssh.ClientConfig, error) to provide ssh configuration for all functions acting with the server over ssh
- Changed all functions to get ssh.ClientConfiguration using function getSSHConfig() (*ssh.ClientConfig, error)

Note
Need to add paths to id_rsa and knownhosts to cnfiguration
Issue
2022-04-24 03:36:38 +02:00
mandi 69b2eb8188 Renamed server variables
Solution
Renamed DovecotServer to MailServer because it holds config information besides dovecot

Issue
close #17
2022-04-23 03:35:06 +02:00
mandi ec4fc4b91f Added NewServer as funtion to DovecotServer struct
Note
Instead of passing the DovecotServer struct to the func, func NewServer is performed directly on the DovecotServer struct
2022-04-23 03:29:56 +02:00
mandi 83365ddf0d Added constructor description to README.md 2022-04-23 03:17:08 +02:00
mandi 5f600e0534 Added configuration by separating server and DovecotServer structs
DovecotServer for config without ApiKey
server implementing functions and including ApiKey

Note
Check and clean code for resolution/closure
Issue
2022-04-23 02:42:28 +02:00
mandi b8df8d5157 Pseudo code for constructor function
Issue
2022-04-23 01:30:20 +02:00
mandi f403389dce Issue
closes #12
2022-04-22 12:47:36 +02:00
mandi 230b268924 Changed all Server functions to pointer allocation
Problem
Having only some functions allocated to a pointer to Server struct creates a copy of struct during runtime calling the variable-allocated functions
Solution
Changed all functions to pointer allocation

Issue
close #12
2022-04-22 12:42:01 +02:00
mandi 3836eb178e Chaned function calls to pointer reference
Problem
Functions were assigned to the server struct variable, so a copy struct was generated
Solution
SynchroniseMail() and BackupAccounts() functions are allocated to *Server instead of Server - Pointer allocation

Issue
resolve #12
2022-04-22 12:29:44 +02:00
mandi 60386c9be7 Tag version v0.0.3 2022-04-21 11:58:22 +02:00
mandi d555c70c5b Added enum types for xml action, password type and antivirus type 2022-01-30 13:26:52 +01:00
mandi 8c31065944 Added documentation for usage of FullPacket 2022-01-29 02:39:12 +01:00
mandi 6028e4456e Removed AddPacket() from FullPacket struct. Can not pass value to append slice in function 2022-01-29 02:34:31 +01:00
mandi e7251583a2 Fixed AddPacket() passing an instance of type Packet and append p.Packets with pointer to Packet instance fixes #8 2022-01-29 01:15:20 +01:00
mandi 1fde90c0b5 Added chown function to RestoreMail() 2022-01-29 00:50:21 +01:00
mandi 1941c4fe2a Added first implementation of ResoreMail() using rsync 2022-01-28 14:20:29 +01:00
mandi 9765df8cce Cleared mistakes in README.md 2022-01-28 13:39:43 +01:00
mandi c132d3cd4c Added description of what needs to be done for ssh log in to remote server 2022-01-28 13:24:34 +01:00
mandi bc11f472ba Added Information for ssh key and others to README.md 2022-01-28 13:08:11 +01:00
mandi 1aad6d9ce7 Implemented RestoreAccounts() and renamed functions closes #3 closes #4 2022-01-28 13:03:00 +01:00
mandi 08a2a77fb6 Changed all configs to server struct 2022-01-28 12:39:24 +01:00
mandi ab9188ec04 Implemnted logIn() function calling Api-Key from server if needed and serializing the data for re-use closes #1 2022-01-28 12:13:08 +01:00
mandi 223e922dda Initial implementation of LogIn() 2022-01-27 22:56:23 +01:00
mandi 6f392a1540 Added documentation for RestoreMail() 2022-01-27 22:01:52 +01:00
mandi d5475dd057 Implemented RestoreMail() as variadic fuction 2022-01-27 21:55:36 +01:00
mandi 92cb81c7e7 Implemented file base Restore function 2022-01-27 13:00:07 +01:00
mandi d7a646165d Implemented interface to be able to pass either values or full Packet instances to create an account 2022-01-25 23:11:41 +01:00
mandi 4d9f314881 Renamed xmlPacket.go struct file 2022-01-25 00:09:11 +01:00
mandi 32ddcafc8a Added implementation for creating mail accounts using the plesk API 2022-01-25 00:05:30 +01:00
mandi d050eacbea Implemented folder creation for account backup 2022-01-24 13:02:41 +01:00
mandi dbcce3fa3b Test implementation of SynchroniseMail() 2022-01-20 14:33:58 +01:00
mandi 125b047b23 Changed folder structure 2022-01-20 14:17:34 +01:00
mandi 3891f66432 Added test and renamed module 2022-01-20 11:51:10 +01:00