refactor: separate SMTP config from LDAP struct
The LDAP struct was mixing LDAP connection settings with unrelated mail settings. Extract mail fields into a dedicated SMTPConfig struct with its own global (mySMTP), keeping concerns cleanly separated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4a68d0700d
commit
3e6b95bf40
3 changed files with 30 additions and 19 deletions
13
ldap.go
13
ldap.go
|
|
@ -21,11 +21,14 @@ type LDAP struct {
|
|||
BaseDN string
|
||||
ServiceDN string
|
||||
ServicePassword string
|
||||
MailHost string
|
||||
MailPort int
|
||||
MailUser string
|
||||
MailPassword string
|
||||
MailFrom string
|
||||
}
|
||||
|
||||
type SMTPConfig struct {
|
||||
MailHost string
|
||||
MailPort int
|
||||
MailUser string
|
||||
MailPassword string
|
||||
MailFrom string
|
||||
}
|
||||
|
||||
func (l LDAP) Connect() (*LDAPConn, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue