ovpn-certman/services/provider.go

22 lines
440 B
Go
Raw Permalink Normal View History

package services
type Config struct {
2018-02-03 18:14:47 +01:00
CollectionPath string
Sessions *SessionsConfig
}
type Provider struct {
2018-02-03 18:14:47 +01:00
ClientCollection *ClientCollection
Sessions *Sessions
}
// NewProvider returns the ServiceProvider
func NewProvider(conf *Config) *Provider {
var provider = &Provider{}
2018-02-03 18:14:47 +01:00
provider.ClientCollection = NewClientCollection(conf.CollectionPath)
provider.Sessions = NewSessions(conf.Sessions)
return provider
}