Remove a bunch of unused cruft

This commit is contained in:
James Mills
2022-10-05 11:11:40 +10:00
parent 06c8ce3410
commit a07f747eb1
25 changed files with 31 additions and 1542 deletions

View File

@@ -91,11 +91,8 @@ func NewConfig() *Config {
Store: DefaultStore,
Theme: DefaultTheme,
BaseURL: DefaultBaseURL,
AdminUser: DefaultAdminUser,
AdminPass: DefaultAdminPass,
CookieSecret: DefaultCookieSecret,
MagicLinkSecret: DefaultMagicLinkSecret,
CookieSecret: DefaultCookieSecret,
SearchPrompts: DefaultSearchPrompts,
ResultsPerPage: DefaultResultsPerPage,
@@ -149,22 +146,6 @@ func WithBaseURL(baseURL string) Option {
}
}
// WithAdminUser sets the Admin username
func WithAdminUser(adminUser string) Option {
return func(cfg *Config) error {
cfg.AdminUser = adminUser
return nil
}
}
// WithAdminPass sets the Admin password
func WithAdminPass(adminPass string) Option {
return func(cfg *Config) error {
cfg.AdminPass = adminPass
return nil
}
}
// WithAdminName sets the Admin name used to identify the pod operator
func WithAdminName(adminName string) Option {
return func(cfg *Config) error {
@@ -221,14 +202,6 @@ func WithResultsPerPage(resultsPerPage int) Option {
}
}
// WithSessionCacheTTL sets the server's session cache ttl
func WithSessionCacheTTL(cacheTTL time.Duration) Option {
return func(cfg *Config) error {
cfg.SessionCacheTTL = cacheTTL
return nil
}
}
// WithSessionExpiry sets the server's session expiry time
func WithSessionExpiry(expiry time.Duration) Option {
return func(cfg *Config) error {
@@ -237,14 +210,6 @@ func WithSessionExpiry(expiry time.Duration) Option {
}
}
// WithMagicLinkSecret sets the MagicLinkSecert used to create password reset tokens
func WithMagicLinkSecret(secret string) Option {
return func(cfg *Config) error {
cfg.MagicLinkSecret = secret
return nil
}
}
// WithSMTPHost sets the SMTPHost to use for sending email
func WithSMTPHost(host string) Option {
return func(cfg *Config) error {
@@ -284,19 +249,3 @@ func WithSMTPFrom(from string) Option {
return nil
}
}
// WithAPISessionTime sets the API session time for tokens
func WithAPISessionTime(duration time.Duration) Option {
return func(cfg *Config) error {
cfg.APISessionTime = duration
return nil
}
}
// WithAPISigningKey sets the API JWT signing key for tokens
func WithAPISigningKey(key string) Option {
return func(cfg *Config) error {
cfg.APISigningKey = key
return nil
}
}