summaryrefslogtreecommitdiff
path: root/internal/authentication/ldap_client_factory_config.go
blob: c66222c79951247cd8268f855bb9d43a30b7010b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package authentication

type LDAPClientFactoryOptions struct {
	Address  string
	Username string
	Password string
}

type LDAPClientFactoryOption func(*LDAPClientFactoryOptions)

func WithAddress(address string) func(*LDAPClientFactoryOptions) {
	return func(settings *LDAPClientFactoryOptions) {
		settings.Address = address
	}
}

func WithUsername(username string) func(*LDAPClientFactoryOptions) {
	return func(settings *LDAPClientFactoryOptions) {
		settings.Username = username
	}
}

func WithPassword(password string) func(*LDAPClientFactoryOptions) {
	return func(settings *LDAPClientFactoryOptions) {
		settings.Password = password
	}
}