Versions in this module Expand all Collapse all v0 v0.6.0 Mar 12, 2024 Changes in this version + const ConfigSourceCommandLine + const ConfigSourceDefault + const ConfigSourceEnvironment + const StorageTypeFile + const StorageTypeMongo + func DatabaseConnectInfo() schema.Element type CommandLineArgs + HTTPPort int + func (args CommandLineArgs) ConfigOptions() []Option type Config + ActivityPubCache mapof.String + DebugLevel string + HTTPPort int + HTTPSPort int + func (config *Config) GetPointer(name string) (any, bool) + func (config *Config) With(options ...Option) + func (config Config) HTTPPortString() (string, bool) + func (config Config) HTTPSPortString() (string, bool) + func (config Config) IsEmpty() bool type Domain + KeyEncryptingKey string + func (domain *Domain) GetPointer(name string) (any, bool) + type Option func(*Config) + func WithHTTPPort(port int) Option v0.0.2 Mar 9, 2023 Changes in this version + const FolderAdapterEmbed + const FolderAdapterFile + const FolderAdapterGit + const FolderAdapterS3 + func DomainSchema() schema.Element + func OwnerSchema() schema.Element + func ProviderSchema() schema.Element + func ReadableFolderSchema() schema.Element + func SMTPConnectionSchema() schema.Element + func Schema() schema.Schema + func WritableFolderSchema() schema.Element + type CommandLineArgs struct + Initialize bool + Location string + Protocol string + Setup bool + Source string + func GetCommandLineArgs() CommandLineArgs + type Config struct + AdminEmail string + AttachmentCache Folder + AttachmentOriginals Folder + Certificates Folder + Domains set.Slice[Domain] + Emails sliceof.Object[Folder] + Location string + MongoID primitive.ObjectID + Providers set.Slice[Provider] + Source string + Templates sliceof.Object[Folder] + func DefaultConfig() Config + func NewConfig() Config + func (config *Config) GetObject(name string) (any, bool) + func (config *Config) SetString(name string, value string) bool + func (config Config) AllProviders() []form.LookupCode + func (config Config) DomainNames() []string + func (config Config) GetStringOK(name string) (string, bool) + func (config Config) Schema() schema.Schema + type Domain struct + ConnectString string + DatabaseName string + DomainID string + Hostname string + Label string + Owner Owner + SMTPConnection SMTPConnection + func NewDomain() Domain + func (domain *Domain) GetObject(name string) (any, bool) + func (domain *Domain) SetString(name string, value string) bool + func (domain Domain) GetStringOK(name string) (string, bool) + func (domain Domain) ID() string + type FileStorage struct + func NewFileStorage(args CommandLineArgs) FileStorage + func (storage FileStorage) Subscribe() <-chan Config + func (storage FileStorage) Write(config Config) error + type Folder struct + Adapter string + Location string + func (folder *Folder) SetString(name string, value string) bool + func (folder Folder) GetStringOK(name string) (string, bool) + type MongoStorage struct + func NewMongoStorage(args CommandLineArgs) MongoStorage + func (storage MongoStorage) Subscribe() <-chan Config + func (storage MongoStorage) Write(config Config) error + type Owner struct + DisplayName string + EmailAddress string + MailingAddress string + PhoneNumber string + Username string + func NewOwner() Owner + func (owner *Owner) SetString(name string, value string) bool + func (owner Owner) GetStringOK(name string) (string, bool) + type Provider struct + ClientID string + ClientSecret string + ProviderID string + func NewProvider(providerID string) Provider + func (provider *Provider) SetString(key string, value string) bool + func (provider Provider) GetStringOK(key string) (string, bool) + func (provider Provider) ID() string + func (provider Provider) IsEmpty() bool + type SMTPConnection struct + Hostname string + Password string + Port int + TLS bool + Username string + func NewSMTPConnection() SMTPConnection + func (smtp *SMTPConnection) Server() (*mail.SMTPServer, bool) + func (smtp *SMTPConnection) SetBool(name string, value bool) bool + func (smtp *SMTPConnection) SetInt(name string, value int) bool + func (smtp *SMTPConnection) SetString(name string, value string) bool + func (smtp SMTPConnection) GetBoolOK(name string) (bool, bool) + func (smtp SMTPConnection) GetIntOK(name string) (int, bool) + func (smtp SMTPConnection) GetStringOK(name string) (string, bool) + func (smtp SMTPConnection) Validate() error + type Storage interface + Subscribe func() <-chan Config + Write func(Config) error + func Load(args CommandLineArgs) Storage