config

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

THIS IS A GENERATED FILE, DO NOT EDIT BY HAND

GoToSocial
Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var Defaults = Configuration{
	LogLevel:        "info",
	LogDbQueries:    false,
	ApplicationName: "gotosocial",
	ConfigPath:      "",
	Host:            "",
	AccountDomain:   "",
	Protocol:        "https",
	BindAddress:     "0.0.0.0",
	Port:            8080,
	TrustedProxies:  []string{"127.0.0.1/32"},

	DbType:      "postgres",
	DbAddress:   "",
	DbPort:      5432,
	DbUser:      "",
	DbPassword:  "",
	DbDatabase:  "gotosocial",
	DbTLSMode:   "disable",
	DbTLSCACert: "",

	WebTemplateBaseDir: "./web/template/",
	WebAssetBaseDir:    "./web/assets/",

	InstanceExposePeers:            false,
	InstanceExposeSuspended:        false,
	InstanceDeliverToSharedInboxes: true,

	AccountsRegistrationOpen: true,
	AccountsApprovalRequired: true,
	AccountsReasonRequired:   true,
	AccountsAllowCustomCSS:   false,

	MediaImageMaxSize:        10485760,
	MediaVideoMaxSize:        41943040,
	MediaDescriptionMinChars: 0,
	MediaDescriptionMaxChars: 500,
	MediaRemoteCacheDays:     30,
	MediaEmojiLocalMaxSize:   51200,
	MediaEmojiRemoteMaxSize:  102400,

	StorageBackend:       "local",
	StorageLocalBasePath: "/gotosocial/storage",
	StorageS3UseSSL:      true,

	StatusesMaxChars:           5000,
	StatusesCWMaxChars:         100,
	StatusesPollMaxOptions:     6,
	StatusesPollOptionMaxChars: 50,
	StatusesMediaMaxFiles:      6,

	LetsEncryptEnabled:      false,
	LetsEncryptPort:         80,
	LetsEncryptCertDir:      "/gotosocial/storage/certs",
	LetsEncryptEmailAddress: "",

	OIDCEnabled:          false,
	OIDCIdpName:          "",
	OIDCSkipVerification: false,
	OIDCIssuer:           "",
	OIDCClientID:         "",
	OIDCClientSecret:     "",
	OIDCScopes:           []string{oidc.ScopeOpenID, "profile", "email", "groups"},

	SMTPHost:     "",
	SMTPPort:     0,
	SMTPUsername: "",
	SMTPPassword: "",
	SMTPFrom:     "GoToSocial",

	SyslogEnabled:  false,
	SyslogProtocol: "udp",
	SyslogAddress:  "localhost:514",

	AdvancedCookiesSamesite: "lax",
}

Defaults contains a populated Configuration with reasonable defaults. Note that if you use this, you will still need to set Host, and, if desired, ConfigPath.

Functions

func AccountDomainFlag added in v0.3.5

func AccountDomainFlag() string

AccountDomainFlag returns the flag name for the 'AccountDomain' field

func AccountsAllowCustomCSSFlag added in v0.5.0

func AccountsAllowCustomCSSFlag() string

AccountsAllowCustomCSSFlag returns the flag name for the 'AccountsAllowCustomCSS' field

func AccountsApprovalRequiredFlag added in v0.3.5

func AccountsApprovalRequiredFlag() string

AccountsApprovalRequiredFlag returns the flag name for the 'AccountsApprovalRequired' field

func AccountsReasonRequiredFlag added in v0.3.5

func AccountsReasonRequiredFlag() string

AccountsReasonRequiredFlag returns the flag name for the 'AccountsReasonRequired' field

func AccountsRegistrationOpenFlag added in v0.3.5

func AccountsRegistrationOpenFlag() string

AccountsRegistrationOpenFlag returns the flag name for the 'AccountsRegistrationOpen' field

func AddAdminAccount added in v0.3.5

func AddAdminAccount(cmd *cobra.Command)

AddAdminAccount attaches flags pertaining to admin account actions.

func AddAdminAccountCreate added in v0.3.5

func AddAdminAccountCreate(cmd *cobra.Command)

AddAdminAccountCreate attaches flags pertaining to admin account creation.

func AddAdminAccountPassword added in v0.3.5

func AddAdminAccountPassword(cmd *cobra.Command)

AddAdminAccountPassword attaches flags pertaining to admin account password reset.

func AddAdminTrans added in v0.3.5

func AddAdminTrans(cmd *cobra.Command)

AddAdminTrans attaches flags pertaining to import/export commands.

func AddGlobalFlags added in v0.3.5

func AddGlobalFlags(cmd *cobra.Command)

AddGlobalFlags will attach global configuration flags to given cobra command, loading defaults from global config.

func AddServerFlags added in v0.3.5

func AddServerFlags(cmd *cobra.Command)

AddServerFlags will attach server configuration flags to given cobra command, loading defaults from global config.

func AdminAccountEmailFlag added in v0.3.5

func AdminAccountEmailFlag() string

AdminAccountEmailFlag returns the flag name for the 'AdminAccountEmail' field

func AdminAccountPasswordFlag added in v0.3.5

func AdminAccountPasswordFlag() string

AdminAccountPasswordFlag returns the flag name for the 'AdminAccountPassword' field

func AdminAccountUsernameFlag added in v0.3.5

func AdminAccountUsernameFlag() string

AdminAccountUsernameFlag returns the flag name for the 'AdminAccountUsername' field

func AdminTransPathFlag added in v0.3.5

func AdminTransPathFlag() string

AdminTransPathFlag returns the flag name for the 'AdminTransPath' field

func AdvancedCookiesSamesiteFlag added in v0.3.5

func AdvancedCookiesSamesiteFlag() string

AdvancedCookiesSamesiteFlag returns the flag name for the 'AdvancedCookiesSamesite' field

func ApplicationNameFlag added in v0.3.5

func ApplicationNameFlag() string

ApplicationNameFlag returns the flag name for the 'ApplicationName' field

func BindAddressFlag added in v0.3.5

func BindAddressFlag() string

BindAddressFlag returns the flag name for the 'BindAddress' field

func BindFlags added in v0.3.5

func BindFlags(cmd *cobra.Command) error

BindFlags binds given command's pflags to the global viper instance.

func Config

func Config(fn func(cfg *Configuration))

Config provides you safe access to the global configuration.

func ConfigPathFlag added in v0.3.5

func ConfigPathFlag() string

ConfigPathFlag returns the flag name for the 'ConfigPath' field

func DbAddressFlag added in v0.3.5

func DbAddressFlag() string

DbAddressFlag returns the flag name for the 'DbAddress' field

func DbDatabaseFlag added in v0.3.5

func DbDatabaseFlag() string

DbDatabaseFlag returns the flag name for the 'DbDatabase' field

func DbPasswordFlag added in v0.3.5

func DbPasswordFlag() string

DbPasswordFlag returns the flag name for the 'DbPassword' field

func DbPortFlag added in v0.3.5

func DbPortFlag() string

DbPortFlag returns the flag name for the 'DbPort' field

func DbTLSCACertFlag added in v0.3.5

func DbTLSCACertFlag() string

DbTLSCACertFlag returns the flag name for the 'DbTLSCACert' field

func DbTLSModeFlag added in v0.3.5

func DbTLSModeFlag() string

DbTLSModeFlag returns the flag name for the 'DbTLSMode' field

func DbTypeFlag added in v0.3.5

func DbTypeFlag() string

DbTypeFlag returns the flag name for the 'DbType' field

func DbUserFlag added in v0.3.5

func DbUserFlag() string

DbUserFlag returns the flag name for the 'DbUser' field

func GetAccountDomain added in v0.3.5

func GetAccountDomain() string

GetAccountDomain safely fetches the value for global configuration 'AccountDomain' field

func GetAccountsAllowCustomCSS added in v0.5.0

func GetAccountsAllowCustomCSS() bool

GetAccountsAllowCustomCSS safely fetches the value for global configuration 'AccountsAllowCustomCSS' field

func GetAccountsApprovalRequired added in v0.3.5

func GetAccountsApprovalRequired() bool

GetAccountsApprovalRequired safely fetches the value for global configuration 'AccountsApprovalRequired' field

func GetAccountsReasonRequired added in v0.3.5

func GetAccountsReasonRequired() bool

GetAccountsReasonRequired safely fetches the value for global configuration 'AccountsReasonRequired' field

func GetAccountsRegistrationOpen added in v0.3.5

func GetAccountsRegistrationOpen() bool

GetAccountsRegistrationOpen safely fetches the value for global configuration 'AccountsRegistrationOpen' field

func GetAdminAccountEmail added in v0.3.5

func GetAdminAccountEmail() string

GetAdminAccountEmail safely fetches the value for global configuration 'AdminAccountEmail' field

func GetAdminAccountPassword added in v0.3.5

func GetAdminAccountPassword() string

GetAdminAccountPassword safely fetches the value for global configuration 'AdminAccountPassword' field

func GetAdminAccountUsername added in v0.3.5

func GetAdminAccountUsername() string

GetAdminAccountUsername safely fetches the value for global configuration 'AdminAccountUsername' field

func GetAdminTransPath added in v0.3.5

func GetAdminTransPath() string

GetAdminTransPath safely fetches the value for global configuration 'AdminTransPath' field

func GetAdvancedCookiesSamesite added in v0.3.5

func GetAdvancedCookiesSamesite() string

GetAdvancedCookiesSamesite safely fetches the value for global configuration 'AdvancedCookiesSamesite' field

func GetApplicationName added in v0.3.5

func GetApplicationName() string

GetApplicationName safely fetches the value for global configuration 'ApplicationName' field

func GetBindAddress added in v0.3.5

func GetBindAddress() string

GetBindAddress safely fetches the value for global configuration 'BindAddress' field

func GetConfigPath added in v0.3.5

func GetConfigPath() string

GetConfigPath safely fetches the value for global configuration 'ConfigPath' field

func GetDbAddress added in v0.3.5

func GetDbAddress() string

GetDbAddress safely fetches the value for global configuration 'DbAddress' field

func GetDbDatabase added in v0.3.5

func GetDbDatabase() string

GetDbDatabase safely fetches the value for global configuration 'DbDatabase' field

func GetDbPassword added in v0.3.5

func GetDbPassword() string

GetDbPassword safely fetches the value for global configuration 'DbPassword' field

func GetDbPort added in v0.3.5

func GetDbPort() int

GetDbPort safely fetches the value for global configuration 'DbPort' field

func GetDbTLSCACert added in v0.3.5

func GetDbTLSCACert() string

GetDbTLSCACert safely fetches the value for global configuration 'DbTLSCACert' field

func GetDbTLSMode added in v0.3.5

func GetDbTLSMode() string

GetDbTLSMode safely fetches the value for global configuration 'DbTLSMode' field

func GetDbType added in v0.3.5

func GetDbType() string

GetDbType safely fetches the value for global configuration 'DbType' field

func GetDbUser added in v0.3.5

func GetDbUser() string

GetDbUser safely fetches the value for global configuration 'DbUser' field

func GetHost added in v0.3.5

func GetHost() string

GetHost safely fetches the value for global configuration 'Host' field

func GetInstanceDeliverToSharedInboxes added in v0.5.0

func GetInstanceDeliverToSharedInboxes() bool

GetInstanceDeliverToSharedInboxes safely fetches the value for global configuration 'InstanceDeliverToSharedInboxes' field

func GetInstanceExposePeers added in v0.3.7

func GetInstanceExposePeers() bool

GetInstanceExposePeers safely fetches the value for global configuration 'InstanceExposePeers' field

func GetInstanceExposeSuspended added in v0.3.7

func GetInstanceExposeSuspended() bool

GetInstanceExposeSuspended safely fetches the value for global configuration 'InstanceExposeSuspended' field

func GetLetsEncryptCertDir added in v0.3.5

func GetLetsEncryptCertDir() string

GetLetsEncryptCertDir safely fetches the value for global configuration 'LetsEncryptCertDir' field

func GetLetsEncryptEmailAddress added in v0.3.5

func GetLetsEncryptEmailAddress() string

GetLetsEncryptEmailAddress safely fetches the value for global configuration 'LetsEncryptEmailAddress' field

func GetLetsEncryptEnabled added in v0.3.5

func GetLetsEncryptEnabled() bool

GetLetsEncryptEnabled safely fetches the value for global configuration 'LetsEncryptEnabled' field

func GetLetsEncryptPort added in v0.3.5

func GetLetsEncryptPort() int

GetLetsEncryptPort safely fetches the value for global configuration 'LetsEncryptPort' field

func GetLogDbQueries added in v0.3.5

func GetLogDbQueries() bool

GetLogDbQueries safely fetches the value for global configuration 'LogDbQueries' field

func GetLogLevel added in v0.3.5

func GetLogLevel() string

GetLogLevel safely fetches the value for global configuration 'LogLevel' field

func GetMediaDescriptionMaxChars added in v0.3.5

func GetMediaDescriptionMaxChars() int

GetMediaDescriptionMaxChars safely fetches the value for global configuration 'MediaDescriptionMaxChars' field

func GetMediaDescriptionMinChars added in v0.3.5

func GetMediaDescriptionMinChars() int

GetMediaDescriptionMinChars safely fetches the value for global configuration 'MediaDescriptionMinChars' field

func GetMediaEmojiLocalMaxSize added in v0.5.0

func GetMediaEmojiLocalMaxSize() int

GetMediaEmojiLocalMaxSize safely fetches the value for global configuration 'MediaEmojiLocalMaxSize' field

func GetMediaEmojiRemoteMaxSize added in v0.5.0

func GetMediaEmojiRemoteMaxSize() int

GetMediaEmojiRemoteMaxSize safely fetches the value for global configuration 'MediaEmojiRemoteMaxSize' field

func GetMediaImageMaxSize added in v0.3.5

func GetMediaImageMaxSize() int

GetMediaImageMaxSize safely fetches the value for global configuration 'MediaImageMaxSize' field

func GetMediaRemoteCacheDays added in v0.3.5

func GetMediaRemoteCacheDays() int

GetMediaRemoteCacheDays safely fetches the value for global configuration 'MediaRemoteCacheDays' field

func GetMediaVideoMaxSize added in v0.3.5

func GetMediaVideoMaxSize() int

GetMediaVideoMaxSize safely fetches the value for global configuration 'MediaVideoMaxSize' field

func GetOIDCClientID added in v0.3.5

func GetOIDCClientID() string

GetOIDCClientID safely fetches the value for global configuration 'OIDCClientID' field

func GetOIDCClientSecret added in v0.3.5

func GetOIDCClientSecret() string

GetOIDCClientSecret safely fetches the value for global configuration 'OIDCClientSecret' field

func GetOIDCEnabled added in v0.3.5

func GetOIDCEnabled() bool

GetOIDCEnabled safely fetches the value for global configuration 'OIDCEnabled' field

func GetOIDCIdpName added in v0.3.5

func GetOIDCIdpName() string

GetOIDCIdpName safely fetches the value for global configuration 'OIDCIdpName' field

func GetOIDCIssuer added in v0.3.5

func GetOIDCIssuer() string

GetOIDCIssuer safely fetches the value for global configuration 'OIDCIssuer' field

func GetOIDCScopes added in v0.3.5

func GetOIDCScopes() []string

GetOIDCScopes safely fetches the value for global configuration 'OIDCScopes' field

func GetOIDCSkipVerification added in v0.3.5

func GetOIDCSkipVerification() bool

GetOIDCSkipVerification safely fetches the value for global configuration 'OIDCSkipVerification' field

func GetPort added in v0.3.5

func GetPort() int

GetPort safely fetches the value for global configuration 'Port' field

func GetProtocol added in v0.3.5

func GetProtocol() string

GetProtocol safely fetches the value for global configuration 'Protocol' field

func GetSMTPFrom added in v0.3.5

func GetSMTPFrom() string

GetSMTPFrom safely fetches the value for global configuration 'SMTPFrom' field

func GetSMTPHost added in v0.3.5

func GetSMTPHost() string

GetSMTPHost safely fetches the value for global configuration 'SMTPHost' field

func GetSMTPPassword added in v0.3.5

func GetSMTPPassword() string

GetSMTPPassword safely fetches the value for global configuration 'SMTPPassword' field

func GetSMTPPort added in v0.3.5

func GetSMTPPort() int

GetSMTPPort safely fetches the value for global configuration 'SMTPPort' field

func GetSMTPUsername added in v0.3.5

func GetSMTPUsername() string

GetSMTPUsername safely fetches the value for global configuration 'SMTPUsername' field

func GetSoftwareVersion added in v0.3.5

func GetSoftwareVersion() string

GetSoftwareVersion safely fetches the value for global configuration 'SoftwareVersion' field

func GetStatusesCWMaxChars added in v0.3.5

func GetStatusesCWMaxChars() int

GetStatusesCWMaxChars safely fetches the value for global configuration 'StatusesCWMaxChars' field

func GetStatusesMaxChars added in v0.3.5

func GetStatusesMaxChars() int

GetStatusesMaxChars safely fetches the value for global configuration 'StatusesMaxChars' field

func GetStatusesMediaMaxFiles added in v0.3.5

func GetStatusesMediaMaxFiles() int

GetStatusesMediaMaxFiles safely fetches the value for global configuration 'StatusesMediaMaxFiles' field

func GetStatusesPollMaxOptions added in v0.3.5

func GetStatusesPollMaxOptions() int

GetStatusesPollMaxOptions safely fetches the value for global configuration 'StatusesPollMaxOptions' field

func GetStatusesPollOptionMaxChars added in v0.3.5

func GetStatusesPollOptionMaxChars() int

GetStatusesPollOptionMaxChars safely fetches the value for global configuration 'StatusesPollOptionMaxChars' field

func GetStorageBackend added in v0.3.5

func GetStorageBackend() string

GetStorageBackend safely fetches the value for global configuration 'StorageBackend' field

func GetStorageLocalBasePath added in v0.3.5

func GetStorageLocalBasePath() string

GetStorageLocalBasePath safely fetches the value for global configuration 'StorageLocalBasePath' field

func GetStorageS3AccessKey added in v0.3.7

func GetStorageS3AccessKey() string

GetStorageS3AccessKey safely fetches the value for global configuration 'StorageS3AccessKey' field

func GetStorageS3BucketName added in v0.3.7

func GetStorageS3BucketName() string

GetStorageS3BucketName safely fetches the value for global configuration 'StorageS3BucketName' field

func GetStorageS3Endpoint added in v0.3.7

func GetStorageS3Endpoint() string

GetStorageS3Endpoint safely fetches the value for global configuration 'StorageS3Endpoint' field

func GetStorageS3SecretKey added in v0.3.7

func GetStorageS3SecretKey() string

GetStorageS3SecretKey safely fetches the value for global configuration 'StorageS3SecretKey' field

func GetStorageS3UseSSL added in v0.3.7

func GetStorageS3UseSSL() bool

GetStorageS3UseSSL safely fetches the value for global configuration 'StorageS3UseSSL' field

func GetSyslogAddress added in v0.3.5

func GetSyslogAddress() string

GetSyslogAddress safely fetches the value for global configuration 'SyslogAddress' field

func GetSyslogEnabled added in v0.3.5

func GetSyslogEnabled() bool

GetSyslogEnabled safely fetches the value for global configuration 'SyslogEnabled' field

func GetSyslogProtocol added in v0.3.5

func GetSyslogProtocol() string

GetSyslogProtocol safely fetches the value for global configuration 'SyslogProtocol' field

func GetTrustedProxies added in v0.3.5

func GetTrustedProxies() []string

GetTrustedProxies safely fetches the value for global configuration 'TrustedProxies' field

func GetWebAssetBaseDir added in v0.3.5

func GetWebAssetBaseDir() string

GetWebAssetBaseDir safely fetches the value for global configuration 'WebAssetBaseDir' field

func GetWebTemplateBaseDir added in v0.3.5

func GetWebTemplateBaseDir() string

GetWebTemplateBaseDir safely fetches the value for global configuration 'WebTemplateBaseDir' field

func HostFlag added in v0.3.5

func HostFlag() string

HostFlag returns the flag name for the 'Host' field

func InstanceDeliverToSharedInboxesFlag added in v0.5.0

func InstanceDeliverToSharedInboxesFlag() string

InstanceDeliverToSharedInboxesFlag returns the flag name for the 'InstanceDeliverToSharedInboxes' field

func InstanceExposePeersFlag added in v0.3.7

func InstanceExposePeersFlag() string

InstanceExposePeersFlag returns the flag name for the 'InstanceExposePeers' field

func InstanceExposeSuspendedFlag added in v0.3.7

func InstanceExposeSuspendedFlag() string

InstanceExposeSuspendedFlag returns the flag name for the 'InstanceExposeSuspended' field

func LetsEncryptCertDirFlag added in v0.3.5

func LetsEncryptCertDirFlag() string

LetsEncryptCertDirFlag returns the flag name for the 'LetsEncryptCertDir' field

func LetsEncryptEmailAddressFlag added in v0.3.5

func LetsEncryptEmailAddressFlag() string

LetsEncryptEmailAddressFlag returns the flag name for the 'LetsEncryptEmailAddress' field

func LetsEncryptEnabledFlag added in v0.3.5

func LetsEncryptEnabledFlag() string

LetsEncryptEnabledFlag returns the flag name for the 'LetsEncryptEnabled' field

func LetsEncryptPortFlag added in v0.3.5

func LetsEncryptPortFlag() string

LetsEncryptPortFlag returns the flag name for the 'LetsEncryptPort' field

func LoadEarlyFlags added in v0.3.5

func LoadEarlyFlags(cmd *cobra.Command) error

LoadEarlyFlags will bind specific flags from given Cobra command to global viper instance, and load the current configuration values. This is useful for flags like .ConfigPath which have to parsed first in order to perform early configuration load.

func LogDbQueriesFlag added in v0.3.5

func LogDbQueriesFlag() string

LogDbQueriesFlag returns the flag name for the 'LogDbQueries' field

func LogLevelFlag added in v0.3.5

func LogLevelFlag() string

LogLevelFlag returns the flag name for the 'LogLevel' field

func MediaDescriptionMaxCharsFlag added in v0.3.5

func MediaDescriptionMaxCharsFlag() string

MediaDescriptionMaxCharsFlag returns the flag name for the 'MediaDescriptionMaxChars' field

func MediaDescriptionMinCharsFlag added in v0.3.5

func MediaDescriptionMinCharsFlag() string

MediaDescriptionMinCharsFlag returns the flag name for the 'MediaDescriptionMinChars' field

func MediaEmojiLocalMaxSizeFlag added in v0.5.0

func MediaEmojiLocalMaxSizeFlag() string

MediaEmojiLocalMaxSizeFlag returns the flag name for the 'MediaEmojiLocalMaxSize' field

func MediaEmojiRemoteMaxSizeFlag added in v0.5.0

func MediaEmojiRemoteMaxSizeFlag() string

MediaEmojiRemoteMaxSizeFlag returns the flag name for the 'MediaEmojiRemoteMaxSize' field

func MediaImageMaxSizeFlag added in v0.3.5

func MediaImageMaxSizeFlag() string

MediaImageMaxSizeFlag returns the flag name for the 'MediaImageMaxSize' field

func MediaRemoteCacheDaysFlag added in v0.3.5

func MediaRemoteCacheDaysFlag() string

MediaRemoteCacheDaysFlag returns the flag name for the 'MediaRemoteCacheDays' field

func MediaVideoMaxSizeFlag added in v0.3.5

func MediaVideoMaxSizeFlag() string

MediaVideoMaxSizeFlag returns the flag name for the 'MediaVideoMaxSize' field

func OIDCClientIDFlag added in v0.3.5

func OIDCClientIDFlag() string

OIDCClientIDFlag returns the flag name for the 'OIDCClientID' field

func OIDCClientSecretFlag added in v0.3.5

func OIDCClientSecretFlag() string

OIDCClientSecretFlag returns the flag name for the 'OIDCClientSecret' field

func OIDCEnabledFlag added in v0.3.5

func OIDCEnabledFlag() string

OIDCEnabledFlag returns the flag name for the 'OIDCEnabled' field

func OIDCIdpNameFlag added in v0.3.5

func OIDCIdpNameFlag() string

OIDCIdpNameFlag returns the flag name for the 'OIDCIdpName' field

func OIDCIssuerFlag added in v0.3.5

func OIDCIssuerFlag() string

OIDCIssuerFlag returns the flag name for the 'OIDCIssuer' field

func OIDCScopesFlag added in v0.3.5

func OIDCScopesFlag() string

OIDCScopesFlag returns the flag name for the 'OIDCScopes' field

func OIDCSkipVerificationFlag added in v0.3.5

func OIDCSkipVerificationFlag() string

OIDCSkipVerificationFlag returns the flag name for the 'OIDCSkipVerification' field

func PortFlag added in v0.3.5

func PortFlag() string

PortFlag returns the flag name for the 'Port' field

func ProtocolFlag added in v0.3.5

func ProtocolFlag() string

ProtocolFlag returns the flag name for the 'Protocol' field

func Reload added in v0.3.5

func Reload() error

Reload will reload the current configuration values from file.

func SMTPFromFlag added in v0.3.5

func SMTPFromFlag() string

SMTPFromFlag returns the flag name for the 'SMTPFrom' field

func SMTPHostFlag added in v0.3.5

func SMTPHostFlag() string

SMTPHostFlag returns the flag name for the 'SMTPHost' field

func SMTPPasswordFlag added in v0.3.5

func SMTPPasswordFlag() string

SMTPPasswordFlag returns the flag name for the 'SMTPPassword' field

func SMTPPortFlag added in v0.3.5

func SMTPPortFlag() string

SMTPPortFlag returns the flag name for the 'SMTPPort' field

func SMTPUsernameFlag added in v0.3.5

func SMTPUsernameFlag() string

SMTPUsernameFlag returns the flag name for the 'SMTPUsername' field

func SetAccountDomain added in v0.3.5

func SetAccountDomain(v string)

SetAccountDomain safely sets the value for global configuration 'AccountDomain' field

func SetAccountsAllowCustomCSS added in v0.5.0

func SetAccountsAllowCustomCSS(v bool)

SetAccountsAllowCustomCSS safely sets the value for global configuration 'AccountsAllowCustomCSS' field

func SetAccountsApprovalRequired added in v0.3.5

func SetAccountsApprovalRequired(v bool)

SetAccountsApprovalRequired safely sets the value for global configuration 'AccountsApprovalRequired' field

func SetAccountsReasonRequired added in v0.3.5

func SetAccountsReasonRequired(v bool)

SetAccountsReasonRequired safely sets the value for global configuration 'AccountsReasonRequired' field

func SetAccountsRegistrationOpen added in v0.3.5

func SetAccountsRegistrationOpen(v bool)

SetAccountsRegistrationOpen safely sets the value for global configuration 'AccountsRegistrationOpen' field

func SetAdminAccountEmail added in v0.3.5

func SetAdminAccountEmail(v string)

SetAdminAccountEmail safely sets the value for global configuration 'AdminAccountEmail' field

func SetAdminAccountPassword added in v0.3.5

func SetAdminAccountPassword(v string)

SetAdminAccountPassword safely sets the value for global configuration 'AdminAccountPassword' field

func SetAdminAccountUsername added in v0.3.5

func SetAdminAccountUsername(v string)

SetAdminAccountUsername safely sets the value for global configuration 'AdminAccountUsername' field

func SetAdminTransPath added in v0.3.5

func SetAdminTransPath(v string)

SetAdminTransPath safely sets the value for global configuration 'AdminTransPath' field

func SetAdvancedCookiesSamesite added in v0.3.5

func SetAdvancedCookiesSamesite(v string)

SetAdvancedCookiesSamesite safely sets the value for global configuration 'AdvancedCookiesSamesite' field

func SetApplicationName added in v0.3.5

func SetApplicationName(v string)

SetApplicationName safely sets the value for global configuration 'ApplicationName' field

func SetBindAddress added in v0.3.5

func SetBindAddress(v string)

SetBindAddress safely sets the value for global configuration 'BindAddress' field

func SetConfigPath added in v0.3.5

func SetConfigPath(v string)

SetConfigPath safely sets the value for global configuration 'ConfigPath' field

func SetDbAddress added in v0.3.5

func SetDbAddress(v string)

SetDbAddress safely sets the value for global configuration 'DbAddress' field

func SetDbDatabase added in v0.3.5

func SetDbDatabase(v string)

SetDbDatabase safely sets the value for global configuration 'DbDatabase' field

func SetDbPassword added in v0.3.5

func SetDbPassword(v string)

SetDbPassword safely sets the value for global configuration 'DbPassword' field

func SetDbPort added in v0.3.5

func SetDbPort(v int)

SetDbPort safely sets the value for global configuration 'DbPort' field

func SetDbTLSCACert added in v0.3.5

func SetDbTLSCACert(v string)

SetDbTLSCACert safely sets the value for global configuration 'DbTLSCACert' field

func SetDbTLSMode added in v0.3.5

func SetDbTLSMode(v string)

SetDbTLSMode safely sets the value for global configuration 'DbTLSMode' field

func SetDbType added in v0.3.5

func SetDbType(v string)

SetDbType safely sets the value for global configuration 'DbType' field

func SetDbUser added in v0.3.5

func SetDbUser(v string)

SetDbUser safely sets the value for global configuration 'DbUser' field

func SetHost added in v0.3.5

func SetHost(v string)

SetHost safely sets the value for global configuration 'Host' field

func SetInstanceDeliverToSharedInboxes added in v0.5.0

func SetInstanceDeliverToSharedInboxes(v bool)

SetInstanceDeliverToSharedInboxes safely sets the value for global configuration 'InstanceDeliverToSharedInboxes' field

func SetInstanceExposePeers added in v0.3.7

func SetInstanceExposePeers(v bool)

SetInstanceExposePeers safely sets the value for global configuration 'InstanceExposePeers' field

func SetInstanceExposeSuspended added in v0.3.7

func SetInstanceExposeSuspended(v bool)

SetInstanceExposeSuspended safely sets the value for global configuration 'InstanceExposeSuspended' field

func SetLetsEncryptCertDir added in v0.3.5

func SetLetsEncryptCertDir(v string)

SetLetsEncryptCertDir safely sets the value for global configuration 'LetsEncryptCertDir' field

func SetLetsEncryptEmailAddress added in v0.3.5

func SetLetsEncryptEmailAddress(v string)

SetLetsEncryptEmailAddress safely sets the value for global configuration 'LetsEncryptEmailAddress' field

func SetLetsEncryptEnabled added in v0.3.5

func SetLetsEncryptEnabled(v bool)

SetLetsEncryptEnabled safely sets the value for global configuration 'LetsEncryptEnabled' field

func SetLetsEncryptPort added in v0.3.5

func SetLetsEncryptPort(v int)

SetLetsEncryptPort safely sets the value for global configuration 'LetsEncryptPort' field

func SetLogDbQueries added in v0.3.5

func SetLogDbQueries(v bool)

SetLogDbQueries safely sets the value for global configuration 'LogDbQueries' field

func SetLogLevel added in v0.3.5

func SetLogLevel(v string)

SetLogLevel safely sets the value for global configuration 'LogLevel' field

func SetMediaDescriptionMaxChars added in v0.3.5

func SetMediaDescriptionMaxChars(v int)

SetMediaDescriptionMaxChars safely sets the value for global configuration 'MediaDescriptionMaxChars' field

func SetMediaDescriptionMinChars added in v0.3.5

func SetMediaDescriptionMinChars(v int)

SetMediaDescriptionMinChars safely sets the value for global configuration 'MediaDescriptionMinChars' field

func SetMediaEmojiLocalMaxSize added in v0.5.0

func SetMediaEmojiLocalMaxSize(v int)

SetMediaEmojiLocalMaxSize safely sets the value for global configuration 'MediaEmojiLocalMaxSize' field

func SetMediaEmojiRemoteMaxSize added in v0.5.0

func SetMediaEmojiRemoteMaxSize(v int)

SetMediaEmojiRemoteMaxSize safely sets the value for global configuration 'MediaEmojiRemoteMaxSize' field

func SetMediaImageMaxSize added in v0.3.5

func SetMediaImageMaxSize(v int)

SetMediaImageMaxSize safely sets the value for global configuration 'MediaImageMaxSize' field

func SetMediaRemoteCacheDays added in v0.3.5

func SetMediaRemoteCacheDays(v int)

SetMediaRemoteCacheDays safely sets the value for global configuration 'MediaRemoteCacheDays' field

func SetMediaVideoMaxSize added in v0.3.5

func SetMediaVideoMaxSize(v int)

SetMediaVideoMaxSize safely sets the value for global configuration 'MediaVideoMaxSize' field

func SetOIDCClientID added in v0.3.5

func SetOIDCClientID(v string)

SetOIDCClientID safely sets the value for global configuration 'OIDCClientID' field

func SetOIDCClientSecret added in v0.3.5

func SetOIDCClientSecret(v string)

SetOIDCClientSecret safely sets the value for global configuration 'OIDCClientSecret' field

func SetOIDCEnabled added in v0.3.5

func SetOIDCEnabled(v bool)

SetOIDCEnabled safely sets the value for global configuration 'OIDCEnabled' field

func SetOIDCIdpName added in v0.3.5

func SetOIDCIdpName(v string)

SetOIDCIdpName safely sets the value for global configuration 'OIDCIdpName' field

func SetOIDCIssuer added in v0.3.5

func SetOIDCIssuer(v string)

SetOIDCIssuer safely sets the value for global configuration 'OIDCIssuer' field

func SetOIDCScopes added in v0.3.5

func SetOIDCScopes(v []string)

SetOIDCScopes safely sets the value for global configuration 'OIDCScopes' field

func SetOIDCSkipVerification added in v0.3.5

func SetOIDCSkipVerification(v bool)

SetOIDCSkipVerification safely sets the value for global configuration 'OIDCSkipVerification' field

func SetPort added in v0.3.5

func SetPort(v int)

SetPort safely sets the value for global configuration 'Port' field

func SetProtocol added in v0.3.5

func SetProtocol(v string)

SetProtocol safely sets the value for global configuration 'Protocol' field

func SetSMTPFrom added in v0.3.5

func SetSMTPFrom(v string)

SetSMTPFrom safely sets the value for global configuration 'SMTPFrom' field

func SetSMTPHost added in v0.3.5

func SetSMTPHost(v string)

SetSMTPHost safely sets the value for global configuration 'SMTPHost' field

func SetSMTPPassword added in v0.3.5

func SetSMTPPassword(v string)

SetSMTPPassword safely sets the value for global configuration 'SMTPPassword' field

func SetSMTPPort added in v0.3.5

func SetSMTPPort(v int)

SetSMTPPort safely sets the value for global configuration 'SMTPPort' field

func SetSMTPUsername added in v0.3.5

func SetSMTPUsername(v string)

SetSMTPUsername safely sets the value for global configuration 'SMTPUsername' field

func SetSoftwareVersion added in v0.3.5

func SetSoftwareVersion(v string)

SetSoftwareVersion safely sets the value for global configuration 'SoftwareVersion' field

func SetStatusesCWMaxChars added in v0.3.5

func SetStatusesCWMaxChars(v int)

SetStatusesCWMaxChars safely sets the value for global configuration 'StatusesCWMaxChars' field

func SetStatusesMaxChars added in v0.3.5

func SetStatusesMaxChars(v int)

SetStatusesMaxChars safely sets the value for global configuration 'StatusesMaxChars' field

func SetStatusesMediaMaxFiles added in v0.3.5

func SetStatusesMediaMaxFiles(v int)

SetStatusesMediaMaxFiles safely sets the value for global configuration 'StatusesMediaMaxFiles' field

func SetStatusesPollMaxOptions added in v0.3.5

func SetStatusesPollMaxOptions(v int)

SetStatusesPollMaxOptions safely sets the value for global configuration 'StatusesPollMaxOptions' field

func SetStatusesPollOptionMaxChars added in v0.3.5

func SetStatusesPollOptionMaxChars(v int)

SetStatusesPollOptionMaxChars safely sets the value for global configuration 'StatusesPollOptionMaxChars' field

func SetStorageBackend added in v0.3.5

func SetStorageBackend(v string)

SetStorageBackend safely sets the value for global configuration 'StorageBackend' field

func SetStorageLocalBasePath added in v0.3.5

func SetStorageLocalBasePath(v string)

SetStorageLocalBasePath safely sets the value for global configuration 'StorageLocalBasePath' field

func SetStorageS3AccessKey added in v0.3.7

func SetStorageS3AccessKey(v string)

SetStorageS3AccessKey safely sets the value for global configuration 'StorageS3AccessKey' field

func SetStorageS3BucketName added in v0.3.7

func SetStorageS3BucketName(v string)

SetStorageS3BucketName safely sets the value for global configuration 'StorageS3BucketName' field

func SetStorageS3Endpoint added in v0.3.7

func SetStorageS3Endpoint(v string)

SetStorageS3Endpoint safely sets the value for global configuration 'StorageS3Endpoint' field

func SetStorageS3SecretKey added in v0.3.7

func SetStorageS3SecretKey(v string)

SetStorageS3SecretKey safely sets the value for global configuration 'StorageS3SecretKey' field

func SetStorageS3UseSSL added in v0.3.7

func SetStorageS3UseSSL(v bool)

SetStorageS3UseSSL safely sets the value for global configuration 'StorageS3UseSSL' field

func SetSyslogAddress added in v0.3.5

func SetSyslogAddress(v string)

SetSyslogAddress safely sets the value for global configuration 'SyslogAddress' field

func SetSyslogEnabled added in v0.3.5

func SetSyslogEnabled(v bool)

SetSyslogEnabled safely sets the value for global configuration 'SyslogEnabled' field

func SetSyslogProtocol added in v0.3.5

func SetSyslogProtocol(v string)

SetSyslogProtocol safely sets the value for global configuration 'SyslogProtocol' field

func SetTrustedProxies added in v0.3.5

func SetTrustedProxies(v []string)

SetTrustedProxies safely sets the value for global configuration 'TrustedProxies' field

func SetWebAssetBaseDir added in v0.3.5

func SetWebAssetBaseDir(v string)

SetWebAssetBaseDir safely sets the value for global configuration 'WebAssetBaseDir' field

func SetWebTemplateBaseDir added in v0.3.5

func SetWebTemplateBaseDir(v string)

SetWebTemplateBaseDir safely sets the value for global configuration 'WebTemplateBaseDir' field

func SoftwareVersionFlag added in v0.3.5

func SoftwareVersionFlag() string

SoftwareVersionFlag returns the flag name for the 'SoftwareVersion' field

func StatusesCWMaxCharsFlag added in v0.3.5

func StatusesCWMaxCharsFlag() string

StatusesCWMaxCharsFlag returns the flag name for the 'StatusesCWMaxChars' field

func StatusesMaxCharsFlag added in v0.3.5

func StatusesMaxCharsFlag() string

StatusesMaxCharsFlag returns the flag name for the 'StatusesMaxChars' field

func StatusesMediaMaxFilesFlag added in v0.3.5

func StatusesMediaMaxFilesFlag() string

StatusesMediaMaxFilesFlag returns the flag name for the 'StatusesMediaMaxFiles' field

func StatusesPollMaxOptionsFlag added in v0.3.5

func StatusesPollMaxOptionsFlag() string

StatusesPollMaxOptionsFlag returns the flag name for the 'StatusesPollMaxOptions' field

func StatusesPollOptionMaxCharsFlag added in v0.3.5

func StatusesPollOptionMaxCharsFlag() string

StatusesPollOptionMaxCharsFlag returns the flag name for the 'StatusesPollOptionMaxChars' field

func StorageBackendFlag added in v0.3.5

func StorageBackendFlag() string

StorageBackendFlag returns the flag name for the 'StorageBackend' field

func StorageLocalBasePathFlag added in v0.3.5

func StorageLocalBasePathFlag() string

StorageLocalBasePathFlag returns the flag name for the 'StorageLocalBasePath' field

func StorageS3AccessKeyFlag added in v0.3.7

func StorageS3AccessKeyFlag() string

StorageS3AccessKeyFlag returns the flag name for the 'StorageS3AccessKey' field

func StorageS3BucketNameFlag added in v0.3.7

func StorageS3BucketNameFlag() string

StorageS3BucketNameFlag returns the flag name for the 'StorageS3BucketName' field

func StorageS3EndpointFlag added in v0.3.7

func StorageS3EndpointFlag() string

StorageS3EndpointFlag returns the flag name for the 'StorageS3Endpoint' field

func StorageS3SecretKeyFlag added in v0.3.7

func StorageS3SecretKeyFlag() string

StorageS3SecretKeyFlag returns the flag name for the 'StorageS3SecretKey' field

func StorageS3UseSSLFlag added in v0.3.7

func StorageS3UseSSLFlag() string

StorageS3UseSSLFlag returns the flag name for the 'StorageS3UseSSL' field

func SyslogAddressFlag added in v0.3.5

func SyslogAddressFlag() string

SyslogAddressFlag returns the flag name for the 'SyslogAddress' field

func SyslogEnabledFlag added in v0.3.5

func SyslogEnabledFlag() string

SyslogEnabledFlag returns the flag name for the 'SyslogEnabled' field

func SyslogProtocolFlag added in v0.3.5

func SyslogProtocolFlag() string

SyslogProtocolFlag returns the flag name for the 'SyslogProtocol' field

func TrustedProxiesFlag added in v0.3.5

func TrustedProxiesFlag() string

TrustedProxiesFlag returns the flag name for the 'TrustedProxies' field

func Validate added in v0.3.4

func Validate() error

Validate validates global config settings which don't have defaults, to make sure they are set sensibly.

func WebAssetBaseDirFlag added in v0.3.5

func WebAssetBaseDirFlag() string

WebAssetBaseDirFlag returns the flag name for the 'WebAssetBaseDir' field

func WebTemplateBaseDirFlag added in v0.3.5

func WebTemplateBaseDirFlag() string

WebTemplateBaseDirFlag returns the flag name for the 'WebTemplateBaseDir' field

Types

type ConfigState added in v0.3.5

type ConfigState struct {
	// contains filtered or unexported fields
}

ConfigState manages safe concurrent access to Configuration{} values, and provides ease of linking them (including reloading) via viper to environment, CLI and configuration file variables.

func NewState added in v0.3.5

func NewState() *ConfigState

NewState returns a new initialized ConfigState instance.

func (*ConfigState) BindFlags added in v0.3.5

func (st *ConfigState) BindFlags(cmd *cobra.Command) (err error)

BindFlags will bind given Cobra command's pflags to this ConfigState's viper instance.

func (*ConfigState) Config added in v0.3.5

func (st *ConfigState) Config(fn func(*Configuration))

Config provides safe access to the ConfigState's contained Configuration, and will reload the current Configuration back into viper settings.

func (*ConfigState) GetAccountDomain added in v0.3.5

func (st *ConfigState) GetAccountDomain() (v string)

GetAccountDomain safely fetches the Configuration value for state's 'AccountDomain' field

func (*ConfigState) GetAccountsAllowCustomCSS added in v0.5.0

func (st *ConfigState) GetAccountsAllowCustomCSS() (v bool)

GetAccountsAllowCustomCSS safely fetches the Configuration value for state's 'AccountsAllowCustomCSS' field

func (*ConfigState) GetAccountsApprovalRequired added in v0.3.5

func (st *ConfigState) GetAccountsApprovalRequired() (v bool)

GetAccountsApprovalRequired safely fetches the Configuration value for state's 'AccountsApprovalRequired' field

func (*ConfigState) GetAccountsReasonRequired added in v0.3.5

func (st *ConfigState) GetAccountsReasonRequired() (v bool)

GetAccountsReasonRequired safely fetches the Configuration value for state's 'AccountsReasonRequired' field

func (*ConfigState) GetAccountsRegistrationOpen added in v0.3.5

func (st *ConfigState) GetAccountsRegistrationOpen() (v bool)

GetAccountsRegistrationOpen safely fetches the Configuration value for state's 'AccountsRegistrationOpen' field

func (*ConfigState) GetAdminAccountEmail added in v0.3.5

func (st *ConfigState) GetAdminAccountEmail() (v string)

GetAdminAccountEmail safely fetches the Configuration value for state's 'AdminAccountEmail' field

func (*ConfigState) GetAdminAccountPassword added in v0.3.5

func (st *ConfigState) GetAdminAccountPassword() (v string)

GetAdminAccountPassword safely fetches the Configuration value for state's 'AdminAccountPassword' field

func (*ConfigState) GetAdminAccountUsername added in v0.3.5

func (st *ConfigState) GetAdminAccountUsername() (v string)

GetAdminAccountUsername safely fetches the Configuration value for state's 'AdminAccountUsername' field

func (*ConfigState) GetAdminTransPath added in v0.3.5

func (st *ConfigState) GetAdminTransPath() (v string)

GetAdminTransPath safely fetches the Configuration value for state's 'AdminTransPath' field

func (*ConfigState) GetAdvancedCookiesSamesite added in v0.3.5

func (st *ConfigState) GetAdvancedCookiesSamesite() (v string)

GetAdvancedCookiesSamesite safely fetches the Configuration value for state's 'AdvancedCookiesSamesite' field

func (*ConfigState) GetApplicationName added in v0.3.5

func (st *ConfigState) GetApplicationName() (v string)

GetApplicationName safely fetches the Configuration value for state's 'ApplicationName' field

func (*ConfigState) GetBindAddress added in v0.3.5

func (st *ConfigState) GetBindAddress() (v string)

GetBindAddress safely fetches the Configuration value for state's 'BindAddress' field

func (*ConfigState) GetConfigPath added in v0.3.5

func (st *ConfigState) GetConfigPath() (v string)

GetConfigPath safely fetches the Configuration value for state's 'ConfigPath' field

func (*ConfigState) GetDbAddress added in v0.3.5

func (st *ConfigState) GetDbAddress() (v string)

GetDbAddress safely fetches the Configuration value for state's 'DbAddress' field

func (*ConfigState) GetDbDatabase added in v0.3.5

func (st *ConfigState) GetDbDatabase() (v string)

GetDbDatabase safely fetches the Configuration value for state's 'DbDatabase' field

func (*ConfigState) GetDbPassword added in v0.3.5

func (st *ConfigState) GetDbPassword() (v string)

GetDbPassword safely fetches the Configuration value for state's 'DbPassword' field

func (*ConfigState) GetDbPort added in v0.3.5

func (st *ConfigState) GetDbPort() (v int)

GetDbPort safely fetches the Configuration value for state's 'DbPort' field

func (*ConfigState) GetDbTLSCACert added in v0.3.5

func (st *ConfigState) GetDbTLSCACert() (v string)

GetDbTLSCACert safely fetches the Configuration value for state's 'DbTLSCACert' field

func (*ConfigState) GetDbTLSMode added in v0.3.5

func (st *ConfigState) GetDbTLSMode() (v string)

GetDbTLSMode safely fetches the Configuration value for state's 'DbTLSMode' field

func (*ConfigState) GetDbType added in v0.3.5

func (st *ConfigState) GetDbType() (v string)

GetDbType safely fetches the Configuration value for state's 'DbType' field

func (*ConfigState) GetDbUser added in v0.3.5

func (st *ConfigState) GetDbUser() (v string)

GetDbUser safely fetches the Configuration value for state's 'DbUser' field

func (*ConfigState) GetHost added in v0.3.5

func (st *ConfigState) GetHost() (v string)

GetHost safely fetches the Configuration value for state's 'Host' field

func (*ConfigState) GetInstanceDeliverToSharedInboxes added in v0.5.0

func (st *ConfigState) GetInstanceDeliverToSharedInboxes() (v bool)

GetInstanceDeliverToSharedInboxes safely fetches the Configuration value for state's 'InstanceDeliverToSharedInboxes' field

func (*ConfigState) GetInstanceExposePeers added in v0.3.7

func (st *ConfigState) GetInstanceExposePeers() (v bool)

GetInstanceExposePeers safely fetches the Configuration value for state's 'InstanceExposePeers' field

func (*ConfigState) GetInstanceExposeSuspended added in v0.3.7

func (st *ConfigState) GetInstanceExposeSuspended() (v bool)

GetInstanceExposeSuspended safely fetches the Configuration value for state's 'InstanceExposeSuspended' field

func (*ConfigState) GetLetsEncryptCertDir added in v0.3.5

func (st *ConfigState) GetLetsEncryptCertDir() (v string)

GetLetsEncryptCertDir safely fetches the Configuration value for state's 'LetsEncryptCertDir' field

func (*ConfigState) GetLetsEncryptEmailAddress added in v0.3.5

func (st *ConfigState) GetLetsEncryptEmailAddress() (v string)

GetLetsEncryptEmailAddress safely fetches the Configuration value for state's 'LetsEncryptEmailAddress' field

func (*ConfigState) GetLetsEncryptEnabled added in v0.3.5

func (st *ConfigState) GetLetsEncryptEnabled() (v bool)

GetLetsEncryptEnabled safely fetches the Configuration value for state's 'LetsEncryptEnabled' field

func (*ConfigState) GetLetsEncryptPort added in v0.3.5

func (st *ConfigState) GetLetsEncryptPort() (v int)

GetLetsEncryptPort safely fetches the Configuration value for state's 'LetsEncryptPort' field

func (*ConfigState) GetLogDbQueries added in v0.3.5

func (st *ConfigState) GetLogDbQueries() (v bool)

GetLogDbQueries safely fetches the Configuration value for state's 'LogDbQueries' field

func (*ConfigState) GetLogLevel added in v0.3.5

func (st *ConfigState) GetLogLevel() (v string)

GetLogLevel safely fetches the Configuration value for state's 'LogLevel' field

func (*ConfigState) GetMediaDescriptionMaxChars added in v0.3.5

func (st *ConfigState) GetMediaDescriptionMaxChars() (v int)

GetMediaDescriptionMaxChars safely fetches the Configuration value for state's 'MediaDescriptionMaxChars' field

func (*ConfigState) GetMediaDescriptionMinChars added in v0.3.5

func (st *ConfigState) GetMediaDescriptionMinChars() (v int)

GetMediaDescriptionMinChars safely fetches the Configuration value for state's 'MediaDescriptionMinChars' field

func (*ConfigState) GetMediaEmojiLocalMaxSize added in v0.5.0

func (st *ConfigState) GetMediaEmojiLocalMaxSize() (v int)

GetMediaEmojiLocalMaxSize safely fetches the Configuration value for state's 'MediaEmojiLocalMaxSize' field

func (*ConfigState) GetMediaEmojiRemoteMaxSize added in v0.5.0

func (st *ConfigState) GetMediaEmojiRemoteMaxSize() (v int)

GetMediaEmojiRemoteMaxSize safely fetches the Configuration value for state's 'MediaEmojiRemoteMaxSize' field

func (*ConfigState) GetMediaImageMaxSize added in v0.3.5

func (st *ConfigState) GetMediaImageMaxSize() (v int)

GetMediaImageMaxSize safely fetches the Configuration value for state's 'MediaImageMaxSize' field

func (*ConfigState) GetMediaRemoteCacheDays added in v0.3.5

func (st *ConfigState) GetMediaRemoteCacheDays() (v int)

GetMediaRemoteCacheDays safely fetches the Configuration value for state's 'MediaRemoteCacheDays' field

func (*ConfigState) GetMediaVideoMaxSize added in v0.3.5

func (st *ConfigState) GetMediaVideoMaxSize() (v int)

GetMediaVideoMaxSize safely fetches the Configuration value for state's 'MediaVideoMaxSize' field

func (*ConfigState) GetOIDCClientID added in v0.3.5

func (st *ConfigState) GetOIDCClientID() (v string)

GetOIDCClientID safely fetches the Configuration value for state's 'OIDCClientID' field

func (*ConfigState) GetOIDCClientSecret added in v0.3.5

func (st *ConfigState) GetOIDCClientSecret() (v string)

GetOIDCClientSecret safely fetches the Configuration value for state's 'OIDCClientSecret' field

func (*ConfigState) GetOIDCEnabled added in v0.3.5

func (st *ConfigState) GetOIDCEnabled() (v bool)

GetOIDCEnabled safely fetches the Configuration value for state's 'OIDCEnabled' field

func (*ConfigState) GetOIDCIdpName added in v0.3.5

func (st *ConfigState) GetOIDCIdpName() (v string)

GetOIDCIdpName safely fetches the Configuration value for state's 'OIDCIdpName' field

func (*ConfigState) GetOIDCIssuer added in v0.3.5

func (st *ConfigState) GetOIDCIssuer() (v string)

GetOIDCIssuer safely fetches the Configuration value for state's 'OIDCIssuer' field

func (*ConfigState) GetOIDCScopes added in v0.3.5

func (st *ConfigState) GetOIDCScopes() (v []string)

GetOIDCScopes safely fetches the Configuration value for state's 'OIDCScopes' field

func (*ConfigState) GetOIDCSkipVerification added in v0.3.5

func (st *ConfigState) GetOIDCSkipVerification() (v bool)

GetOIDCSkipVerification safely fetches the Configuration value for state's 'OIDCSkipVerification' field

func (*ConfigState) GetPort added in v0.3.5

func (st *ConfigState) GetPort() (v int)

GetPort safely fetches the Configuration value for state's 'Port' field

func (*ConfigState) GetProtocol added in v0.3.5

func (st *ConfigState) GetProtocol() (v string)

GetProtocol safely fetches the Configuration value for state's 'Protocol' field

func (*ConfigState) GetSMTPFrom added in v0.3.5

func (st *ConfigState) GetSMTPFrom() (v string)

GetSMTPFrom safely fetches the Configuration value for state's 'SMTPFrom' field

func (*ConfigState) GetSMTPHost added in v0.3.5

func (st *ConfigState) GetSMTPHost() (v string)

GetSMTPHost safely fetches the Configuration value for state's 'SMTPHost' field

func (*ConfigState) GetSMTPPassword added in v0.3.5

func (st *ConfigState) GetSMTPPassword() (v string)

GetSMTPPassword safely fetches the Configuration value for state's 'SMTPPassword' field

func (*ConfigState) GetSMTPPort added in v0.3.5

func (st *ConfigState) GetSMTPPort() (v int)

GetSMTPPort safely fetches the Configuration value for state's 'SMTPPort' field

func (*ConfigState) GetSMTPUsername added in v0.3.5

func (st *ConfigState) GetSMTPUsername() (v string)

GetSMTPUsername safely fetches the Configuration value for state's 'SMTPUsername' field

func (*ConfigState) GetSoftwareVersion added in v0.3.5

func (st *ConfigState) GetSoftwareVersion() (v string)

GetSoftwareVersion safely fetches the Configuration value for state's 'SoftwareVersion' field

func (*ConfigState) GetStatusesCWMaxChars added in v0.3.5

func (st *ConfigState) GetStatusesCWMaxChars() (v int)

GetStatusesCWMaxChars safely fetches the Configuration value for state's 'StatusesCWMaxChars' field

func (*ConfigState) GetStatusesMaxChars added in v0.3.5

func (st *ConfigState) GetStatusesMaxChars() (v int)

GetStatusesMaxChars safely fetches the Configuration value for state's 'StatusesMaxChars' field

func (*ConfigState) GetStatusesMediaMaxFiles added in v0.3.5

func (st *ConfigState) GetStatusesMediaMaxFiles() (v int)

GetStatusesMediaMaxFiles safely fetches the Configuration value for state's 'StatusesMediaMaxFiles' field

func (*ConfigState) GetStatusesPollMaxOptions added in v0.3.5

func (st *ConfigState) GetStatusesPollMaxOptions() (v int)

GetStatusesPollMaxOptions safely fetches the Configuration value for state's 'StatusesPollMaxOptions' field

func (*ConfigState) GetStatusesPollOptionMaxChars added in v0.3.5

func (st *ConfigState) GetStatusesPollOptionMaxChars() (v int)

GetStatusesPollOptionMaxChars safely fetches the Configuration value for state's 'StatusesPollOptionMaxChars' field

func (*ConfigState) GetStorageBackend added in v0.3.5

func (st *ConfigState) GetStorageBackend() (v string)

GetStorageBackend safely fetches the Configuration value for state's 'StorageBackend' field

func (*ConfigState) GetStorageLocalBasePath added in v0.3.5

func (st *ConfigState) GetStorageLocalBasePath() (v string)

GetStorageLocalBasePath safely fetches the Configuration value for state's 'StorageLocalBasePath' field

func (*ConfigState) GetStorageS3AccessKey added in v0.3.7

func (st *ConfigState) GetStorageS3AccessKey() (v string)

GetStorageS3AccessKey safely fetches the Configuration value for state's 'StorageS3AccessKey' field

func (*ConfigState) GetStorageS3BucketName added in v0.3.7

func (st *ConfigState) GetStorageS3BucketName() (v string)

GetStorageS3BucketName safely fetches the Configuration value for state's 'StorageS3BucketName' field

func (*ConfigState) GetStorageS3Endpoint added in v0.3.7

func (st *ConfigState) GetStorageS3Endpoint() (v string)

GetStorageS3Endpoint safely fetches the Configuration value for state's 'StorageS3Endpoint' field

func (*ConfigState) GetStorageS3SecretKey added in v0.3.7

func (st *ConfigState) GetStorageS3SecretKey() (v string)

GetStorageS3SecretKey safely fetches the Configuration value for state's 'StorageS3SecretKey' field

func (*ConfigState) GetStorageS3UseSSL added in v0.3.7

func (st *ConfigState) GetStorageS3UseSSL() (v bool)

GetStorageS3UseSSL safely fetches the Configuration value for state's 'StorageS3UseSSL' field

func (*ConfigState) GetSyslogAddress added in v0.3.5

func (st *ConfigState) GetSyslogAddress() (v string)

GetSyslogAddress safely fetches the Configuration value for state's 'SyslogAddress' field

func (*ConfigState) GetSyslogEnabled added in v0.3.5

func (st *ConfigState) GetSyslogEnabled() (v bool)

GetSyslogEnabled safely fetches the Configuration value for state's 'SyslogEnabled' field

func (*ConfigState) GetSyslogProtocol added in v0.3.5

func (st *ConfigState) GetSyslogProtocol() (v string)

GetSyslogProtocol safely fetches the Configuration value for state's 'SyslogProtocol' field

func (*ConfigState) GetTrustedProxies added in v0.3.5

func (st *ConfigState) GetTrustedProxies() (v []string)

GetTrustedProxies safely fetches the Configuration value for state's 'TrustedProxies' field

func (*ConfigState) GetWebAssetBaseDir added in v0.3.5

func (st *ConfigState) GetWebAssetBaseDir() (v string)

GetWebAssetBaseDir safely fetches the Configuration value for state's 'WebAssetBaseDir' field

func (*ConfigState) GetWebTemplateBaseDir added in v0.3.5

func (st *ConfigState) GetWebTemplateBaseDir() (v string)

GetWebTemplateBaseDir safely fetches the Configuration value for state's 'WebTemplateBaseDir' field

func (*ConfigState) LoadEarlyFlags added in v0.3.5

func (st *ConfigState) LoadEarlyFlags(cmd *cobra.Command) (err error)

LoadEarlyFlags will bind specific flags from given Cobra command to ConfigState's viper instance, and load the current configuration values. This is useful for flags like .ConfigPath which have to parsed first in order to perform early configuration load.

func (*ConfigState) Reload added in v0.3.5

func (st *ConfigState) Reload() (err error)

Reload will reload the Configuration values from ConfigState's viper instance, and from file if set.

func (*ConfigState) SetAccountDomain added in v0.3.5

func (st *ConfigState) SetAccountDomain(v string)

SetAccountDomain safely sets the Configuration value for state's 'AccountDomain' field

func (*ConfigState) SetAccountsAllowCustomCSS added in v0.5.0

func (st *ConfigState) SetAccountsAllowCustomCSS(v bool)

SetAccountsAllowCustomCSS safely sets the Configuration value for state's 'AccountsAllowCustomCSS' field

func (*ConfigState) SetAccountsApprovalRequired added in v0.3.5

func (st *ConfigState) SetAccountsApprovalRequired(v bool)

SetAccountsApprovalRequired safely sets the Configuration value for state's 'AccountsApprovalRequired' field

func (*ConfigState) SetAccountsReasonRequired added in v0.3.5

func (st *ConfigState) SetAccountsReasonRequired(v bool)

SetAccountsReasonRequired safely sets the Configuration value for state's 'AccountsReasonRequired' field

func (*ConfigState) SetAccountsRegistrationOpen added in v0.3.5

func (st *ConfigState) SetAccountsRegistrationOpen(v bool)

SetAccountsRegistrationOpen safely sets the Configuration value for state's 'AccountsRegistrationOpen' field

func (*ConfigState) SetAdminAccountEmail added in v0.3.5

func (st *ConfigState) SetAdminAccountEmail(v string)

SetAdminAccountEmail safely sets the Configuration value for state's 'AdminAccountEmail' field

func (*ConfigState) SetAdminAccountPassword added in v0.3.5

func (st *ConfigState) SetAdminAccountPassword(v string)

SetAdminAccountPassword safely sets the Configuration value for state's 'AdminAccountPassword' field

func (*ConfigState) SetAdminAccountUsername added in v0.3.5

func (st *ConfigState) SetAdminAccountUsername(v string)

SetAdminAccountUsername safely sets the Configuration value for state's 'AdminAccountUsername' field

func (*ConfigState) SetAdminTransPath added in v0.3.5

func (st *ConfigState) SetAdminTransPath(v string)

SetAdminTransPath safely sets the Configuration value for state's 'AdminTransPath' field

func (*ConfigState) SetAdvancedCookiesSamesite added in v0.3.5

func (st *ConfigState) SetAdvancedCookiesSamesite(v string)

SetAdvancedCookiesSamesite safely sets the Configuration value for state's 'AdvancedCookiesSamesite' field

func (*ConfigState) SetApplicationName added in v0.3.5

func (st *ConfigState) SetApplicationName(v string)

SetApplicationName safely sets the Configuration value for state's 'ApplicationName' field

func (*ConfigState) SetBindAddress added in v0.3.5

func (st *ConfigState) SetBindAddress(v string)

SetBindAddress safely sets the Configuration value for state's 'BindAddress' field

func (*ConfigState) SetConfigPath added in v0.3.5

func (st *ConfigState) SetConfigPath(v string)

SetConfigPath safely sets the Configuration value for state's 'ConfigPath' field

func (*ConfigState) SetDbAddress added in v0.3.5

func (st *ConfigState) SetDbAddress(v string)

SetDbAddress safely sets the Configuration value for state's 'DbAddress' field

func (*ConfigState) SetDbDatabase added in v0.3.5

func (st *ConfigState) SetDbDatabase(v string)

SetDbDatabase safely sets the Configuration value for state's 'DbDatabase' field

func (*ConfigState) SetDbPassword added in v0.3.5

func (st *ConfigState) SetDbPassword(v string)

SetDbPassword safely sets the Configuration value for state's 'DbPassword' field

func (*ConfigState) SetDbPort added in v0.3.5

func (st *ConfigState) SetDbPort(v int)

SetDbPort safely sets the Configuration value for state's 'DbPort' field

func (*ConfigState) SetDbTLSCACert added in v0.3.5

func (st *ConfigState) SetDbTLSCACert(v string)

SetDbTLSCACert safely sets the Configuration value for state's 'DbTLSCACert' field

func (*ConfigState) SetDbTLSMode added in v0.3.5

func (st *ConfigState) SetDbTLSMode(v string)

SetDbTLSMode safely sets the Configuration value for state's 'DbTLSMode' field

func (*ConfigState) SetDbType added in v0.3.5

func (st *ConfigState) SetDbType(v string)

SetDbType safely sets the Configuration value for state's 'DbType' field

func (*ConfigState) SetDbUser added in v0.3.5

func (st *ConfigState) SetDbUser(v string)

SetDbUser safely sets the Configuration value for state's 'DbUser' field

func (*ConfigState) SetHost added in v0.3.5

func (st *ConfigState) SetHost(v string)

SetHost safely sets the Configuration value for state's 'Host' field

func (*ConfigState) SetInstanceDeliverToSharedInboxes added in v0.5.0

func (st *ConfigState) SetInstanceDeliverToSharedInboxes(v bool)

SetInstanceDeliverToSharedInboxes safely sets the Configuration value for state's 'InstanceDeliverToSharedInboxes' field

func (*ConfigState) SetInstanceExposePeers added in v0.3.7

func (st *ConfigState) SetInstanceExposePeers(v bool)

SetInstanceExposePeers safely sets the Configuration value for state's 'InstanceExposePeers' field

func (*ConfigState) SetInstanceExposeSuspended added in v0.3.7

func (st *ConfigState) SetInstanceExposeSuspended(v bool)

SetInstanceExposeSuspended safely sets the Configuration value for state's 'InstanceExposeSuspended' field

func (*ConfigState) SetLetsEncryptCertDir added in v0.3.5

func (st *ConfigState) SetLetsEncryptCertDir(v string)

SetLetsEncryptCertDir safely sets the Configuration value for state's 'LetsEncryptCertDir' field

func (*ConfigState) SetLetsEncryptEmailAddress added in v0.3.5

func (st *ConfigState) SetLetsEncryptEmailAddress(v string)

SetLetsEncryptEmailAddress safely sets the Configuration value for state's 'LetsEncryptEmailAddress' field

func (*ConfigState) SetLetsEncryptEnabled added in v0.3.5

func (st *ConfigState) SetLetsEncryptEnabled(v bool)

SetLetsEncryptEnabled safely sets the Configuration value for state's 'LetsEncryptEnabled' field

func (*ConfigState) SetLetsEncryptPort added in v0.3.5

func (st *ConfigState) SetLetsEncryptPort(v int)

SetLetsEncryptPort safely sets the Configuration value for state's 'LetsEncryptPort' field

func (*ConfigState) SetLogDbQueries added in v0.3.5

func (st *ConfigState) SetLogDbQueries(v bool)

SetLogDbQueries safely sets the Configuration value for state's 'LogDbQueries' field

func (*ConfigState) SetLogLevel added in v0.3.5

func (st *ConfigState) SetLogLevel(v string)

SetLogLevel safely sets the Configuration value for state's 'LogLevel' field

func (*ConfigState) SetMediaDescriptionMaxChars added in v0.3.5

func (st *ConfigState) SetMediaDescriptionMaxChars(v int)

SetMediaDescriptionMaxChars safely sets the Configuration value for state's 'MediaDescriptionMaxChars' field

func (*ConfigState) SetMediaDescriptionMinChars added in v0.3.5

func (st *ConfigState) SetMediaDescriptionMinChars(v int)

SetMediaDescriptionMinChars safely sets the Configuration value for state's 'MediaDescriptionMinChars' field

func (*ConfigState) SetMediaEmojiLocalMaxSize added in v0.5.0

func (st *ConfigState) SetMediaEmojiLocalMaxSize(v int)

SetMediaEmojiLocalMaxSize safely sets the Configuration value for state's 'MediaEmojiLocalMaxSize' field

func (*ConfigState) SetMediaEmojiRemoteMaxSize added in v0.5.0

func (st *ConfigState) SetMediaEmojiRemoteMaxSize(v int)

SetMediaEmojiRemoteMaxSize safely sets the Configuration value for state's 'MediaEmojiRemoteMaxSize' field

func (*ConfigState) SetMediaImageMaxSize added in v0.3.5

func (st *ConfigState) SetMediaImageMaxSize(v int)

SetMediaImageMaxSize safely sets the Configuration value for state's 'MediaImageMaxSize' field

func (*ConfigState) SetMediaRemoteCacheDays added in v0.3.5

func (st *ConfigState) SetMediaRemoteCacheDays(v int)

SetMediaRemoteCacheDays safely sets the Configuration value for state's 'MediaRemoteCacheDays' field

func (*ConfigState) SetMediaVideoMaxSize added in v0.3.5

func (st *ConfigState) SetMediaVideoMaxSize(v int)

SetMediaVideoMaxSize safely sets the Configuration value for state's 'MediaVideoMaxSize' field

func (*ConfigState) SetOIDCClientID added in v0.3.5

func (st *ConfigState) SetOIDCClientID(v string)

SetOIDCClientID safely sets the Configuration value for state's 'OIDCClientID' field

func (*ConfigState) SetOIDCClientSecret added in v0.3.5

func (st *ConfigState) SetOIDCClientSecret(v string)

SetOIDCClientSecret safely sets the Configuration value for state's 'OIDCClientSecret' field

func (*ConfigState) SetOIDCEnabled added in v0.3.5

func (st *ConfigState) SetOIDCEnabled(v bool)

SetOIDCEnabled safely sets the Configuration value for state's 'OIDCEnabled' field

func (*ConfigState) SetOIDCIdpName added in v0.3.5

func (st *ConfigState) SetOIDCIdpName(v string)

SetOIDCIdpName safely sets the Configuration value for state's 'OIDCIdpName' field

func (*ConfigState) SetOIDCIssuer added in v0.3.5

func (st *ConfigState) SetOIDCIssuer(v string)

SetOIDCIssuer safely sets the Configuration value for state's 'OIDCIssuer' field

func (*ConfigState) SetOIDCScopes added in v0.3.5

func (st *ConfigState) SetOIDCScopes(v []string)

SetOIDCScopes safely sets the Configuration value for state's 'OIDCScopes' field

func (*ConfigState) SetOIDCSkipVerification added in v0.3.5

func (st *ConfigState) SetOIDCSkipVerification(v bool)

SetOIDCSkipVerification safely sets the Configuration value for state's 'OIDCSkipVerification' field

func (*ConfigState) SetPort added in v0.3.5

func (st *ConfigState) SetPort(v int)

SetPort safely sets the Configuration value for state's 'Port' field

func (*ConfigState) SetProtocol added in v0.3.5

func (st *ConfigState) SetProtocol(v string)

SetProtocol safely sets the Configuration value for state's 'Protocol' field

func (*ConfigState) SetSMTPFrom added in v0.3.5

func (st *ConfigState) SetSMTPFrom(v string)

SetSMTPFrom safely sets the Configuration value for state's 'SMTPFrom' field

func (*ConfigState) SetSMTPHost added in v0.3.5

func (st *ConfigState) SetSMTPHost(v string)

SetSMTPHost safely sets the Configuration value for state's 'SMTPHost' field

func (*ConfigState) SetSMTPPassword added in v0.3.5

func (st *ConfigState) SetSMTPPassword(v string)

SetSMTPPassword safely sets the Configuration value for state's 'SMTPPassword' field

func (*ConfigState) SetSMTPPort added in v0.3.5

func (st *ConfigState) SetSMTPPort(v int)

SetSMTPPort safely sets the Configuration value for state's 'SMTPPort' field

func (*ConfigState) SetSMTPUsername added in v0.3.5

func (st *ConfigState) SetSMTPUsername(v string)

SetSMTPUsername safely sets the Configuration value for state's 'SMTPUsername' field

func (*ConfigState) SetSoftwareVersion added in v0.3.5

func (st *ConfigState) SetSoftwareVersion(v string)

SetSoftwareVersion safely sets the Configuration value for state's 'SoftwareVersion' field

func (*ConfigState) SetStatusesCWMaxChars added in v0.3.5

func (st *ConfigState) SetStatusesCWMaxChars(v int)

SetStatusesCWMaxChars safely sets the Configuration value for state's 'StatusesCWMaxChars' field

func (*ConfigState) SetStatusesMaxChars added in v0.3.5

func (st *ConfigState) SetStatusesMaxChars(v int)

SetStatusesMaxChars safely sets the Configuration value for state's 'StatusesMaxChars' field

func (*ConfigState) SetStatusesMediaMaxFiles added in v0.3.5

func (st *ConfigState) SetStatusesMediaMaxFiles(v int)

SetStatusesMediaMaxFiles safely sets the Configuration value for state's 'StatusesMediaMaxFiles' field

func (*ConfigState) SetStatusesPollMaxOptions added in v0.3.5

func (st *ConfigState) SetStatusesPollMaxOptions(v int)

SetStatusesPollMaxOptions safely sets the Configuration value for state's 'StatusesPollMaxOptions' field

func (*ConfigState) SetStatusesPollOptionMaxChars added in v0.3.5

func (st *ConfigState) SetStatusesPollOptionMaxChars(v int)

SetStatusesPollOptionMaxChars safely sets the Configuration value for state's 'StatusesPollOptionMaxChars' field

func (*ConfigState) SetStorageBackend added in v0.3.5

func (st *ConfigState) SetStorageBackend(v string)

SetStorageBackend safely sets the Configuration value for state's 'StorageBackend' field

func (*ConfigState) SetStorageLocalBasePath added in v0.3.5

func (st *ConfigState) SetStorageLocalBasePath(v string)

SetStorageLocalBasePath safely sets the Configuration value for state's 'StorageLocalBasePath' field

func (*ConfigState) SetStorageS3AccessKey added in v0.3.7

func (st *ConfigState) SetStorageS3AccessKey(v string)

SetStorageS3AccessKey safely sets the Configuration value for state's 'StorageS3AccessKey' field

func (*ConfigState) SetStorageS3BucketName added in v0.3.7

func (st *ConfigState) SetStorageS3BucketName(v string)

SetStorageS3BucketName safely sets the Configuration value for state's 'StorageS3BucketName' field

func (*ConfigState) SetStorageS3Endpoint added in v0.3.7

func (st *ConfigState) SetStorageS3Endpoint(v string)

SetStorageS3Endpoint safely sets the Configuration value for state's 'StorageS3Endpoint' field

func (*ConfigState) SetStorageS3SecretKey added in v0.3.7

func (st *ConfigState) SetStorageS3SecretKey(v string)

SetStorageS3SecretKey safely sets the Configuration value for state's 'StorageS3SecretKey' field

func (*ConfigState) SetStorageS3UseSSL added in v0.3.7

func (st *ConfigState) SetStorageS3UseSSL(v bool)

SetStorageS3UseSSL safely sets the Configuration value for state's 'StorageS3UseSSL' field

func (*ConfigState) SetSyslogAddress added in v0.3.5

func (st *ConfigState) SetSyslogAddress(v string)

SetSyslogAddress safely sets the Configuration value for state's 'SyslogAddress' field

func (*ConfigState) SetSyslogEnabled added in v0.3.5

func (st *ConfigState) SetSyslogEnabled(v bool)

SetSyslogEnabled safely sets the Configuration value for state's 'SyslogEnabled' field

func (*ConfigState) SetSyslogProtocol added in v0.3.5

func (st *ConfigState) SetSyslogProtocol(v string)

SetSyslogProtocol safely sets the Configuration value for state's 'SyslogProtocol' field

func (*ConfigState) SetTrustedProxies added in v0.3.5

func (st *ConfigState) SetTrustedProxies(v []string)

SetTrustedProxies safely sets the Configuration value for state's 'TrustedProxies' field

func (*ConfigState) SetWebAssetBaseDir added in v0.3.5

func (st *ConfigState) SetWebAssetBaseDir(v string)

SetWebAssetBaseDir safely sets the Configuration value for state's 'WebAssetBaseDir' field

func (*ConfigState) SetWebTemplateBaseDir added in v0.3.5

func (st *ConfigState) SetWebTemplateBaseDir(v string)

SetWebTemplateBaseDir safely sets the Configuration value for state's 'WebTemplateBaseDir' field

func (*ConfigState) Viper added in v0.3.5

func (st *ConfigState) Viper(fn func(*viper.Viper))

Viper provides safe access to the ConfigState's contained viper instance, and will reload the current viper setting state back into Configuration.

type Configuration added in v0.3.5

type Configuration struct {
	LogLevel        string   `name:"log-level" usage:"Log level to run at: [trace, debug, info, warn, fatal]"`
	LogDbQueries    bool     `name:"log-db-queries" usage:"Log database queries verbosely when log-level is trace or debug"`
	ApplicationName string   `name:"application-name" usage:"Name of the application, used in various places internally"`
	ConfigPath      string   `` /* 161-byte string literal not displayed */
	Host            string   `` /* 146-byte string literal not displayed */
	AccountDomain   string   `` /* 195-byte string literal not displayed */
	Protocol        string   `` /* 134-byte string literal not displayed */
	BindAddress     string   `` /* 223-byte string literal not displayed */
	Port            int      `name:"port" usage:"Port to use for GoToSocial. Change this to 443 if you're running the binary directly on the host machine."`
	TrustedProxies  []string `name:"trusted-proxies" usage:"Proxies to trust when parsing x-forwarded headers into real IPs."`
	SoftwareVersion string   `name:"software-version" usage:""`

	DbType      string `name:"db-type" usage:"Database type: eg., postgres"`
	DbAddress   string `name:"db-address" usage:"Database ipv4 address, hostname, or filename"`
	DbPort      int    `name:"db-port" usage:"Database port"`
	DbUser      string `name:"db-user" usage:"Database username"`
	DbPassword  string `name:"db-password" usage:"Database password"`
	DbDatabase  string `name:"db-database" usage:"Database name"`
	DbTLSMode   string `name:"db-tls-mode" usage:"Database tls mode"`
	DbTLSCACert string `name:"db-tls-ca-cert" usage:"Path to CA cert for db tls connection"`

	WebTemplateBaseDir string `name:"web-template-base-dir" usage:"Basedir for html templating files for rendering pages and composing emails."`
	WebAssetBaseDir    string `name:"web-asset-base-dir" usage:"Directory to serve static assets from, accessible at example.org/assets/"`

	InstanceExposePeers            bool `name:"instance-expose-peers" usage:"Allow unauthenticated users to query /api/v1/instance/peers?filter=open"`
	InstanceExposeSuspended        bool `` /* 160-byte string literal not displayed */
	InstanceDeliverToSharedInboxes bool `name:"instance-deliver-to-shared-inboxes" usage:"Deliver federated messages to shared inboxes, if they're available."`

	AccountsRegistrationOpen bool `` /* 129-byte string literal not displayed */
	AccountsApprovalRequired bool `` /* 186-byte string literal not displayed */
	AccountsReasonRequired   bool `name:"accounts-reason-required" usage:"Do new account signups require a reason to be submitted on registration?"`
	AccountsAllowCustomCSS   bool `name:"accounts-allow-custom-css" usage:"Allow accounts to enable custom CSS for their profile pages and statuses."`

	MediaImageMaxSize        int `name:"media-image-max-size" usage:"Max size of accepted images in bytes"`
	MediaVideoMaxSize        int `name:"media-video-max-size" usage:"Max size of accepted videos in bytes"`
	MediaDescriptionMinChars int `name:"media-description-min-chars" usage:"Min required chars for an image description"`
	MediaDescriptionMaxChars int `name:"media-description-max-chars" usage:"Max permitted chars for an image description"`
	MediaRemoteCacheDays     int `` /* 152-byte string literal not displayed */
	MediaEmojiLocalMaxSize   int `name:"media-emoji-local-max-size" usage:"Max size in bytes of emojis uploaded to this instance via the admin API."`
	MediaEmojiRemoteMaxSize  int `name:"media-emoji-remote-max-size" usage:"Max size in bytes of emojis to download from other instances."`

	StorageBackend       string `name:"storage-backend" usage:"Storage backend to use for media attachments"`
	StorageLocalBasePath string `` /* 169-byte string literal not displayed */
	StorageS3Endpoint    string `name:"storage-s3-endpoint" usage:"S3 Endpoint URL (e.g 'minio.example.org:9000')"`
	StorageS3AccessKey   string `name:"storage-s3-access-key" usage:"S3 Access Key"`
	StorageS3SecretKey   string `name:"storage-s3-secret-key" usage:"S3 Secret Key"`
	StorageS3UseSSL      bool   `name:"storage-s3-use-ssl" usage:"Use SSL for S3 connections. Only set this to 'false' when testing locally"`
	StorageS3BucketName  string `name:"storage-s3-bucket" usage:"Place blobs in this bucket"`

	StatusesMaxChars           int `name:"statuses-max-chars" usage:"Max permitted characters for posted statuses"`
	StatusesCWMaxChars         int `name:"statuses-cw-max-chars" usage:"Max permitted characters for content/spoiler warnings on statuses"`
	StatusesPollMaxOptions     int `name:"statuses-poll-max-options" usage:"Max amount of options permitted on a poll"`
	StatusesPollOptionMaxChars int `name:"statuses-poll-option-max-chars" usage:"Max amount of characters for a poll option"`
	StatusesMediaMaxFiles      int `name:"statuses-media-max-files" usage:"Maximum number of media files/attachments per status"`

	LetsEncryptEnabled      bool   `` /* 154-byte string literal not displayed */
	LetsEncryptPort         int    `` /* 141-byte string literal not displayed */
	LetsEncryptCertDir      string `name:"letsencrypt-cert-dir" usage:"Directory to store acquired letsencrypt certificates."`
	LetsEncryptEmailAddress string `` /* 137-byte string literal not displayed */

	OIDCEnabled          bool     `` /* 133-byte string literal not displayed */
	OIDCIdpName          string   `name:"oidc-idp-name" usage:"Name of the OIDC identity provider. Will be shown to the user when logging in."`
	OIDCSkipVerification bool     `` /* 182-byte string literal not displayed */
	OIDCIssuer           string   `` /* 169-byte string literal not displayed */
	OIDCClientID         string   `name:"oidc-client-id" usage:"ClientID of GoToSocial, as registered with the OIDC provider."`
	OIDCClientSecret     string   `name:"oidc-client-secret" usage:"ClientSecret of GoToSocial, as registered with the OIDC provider."`
	OIDCScopes           []string `name:"oidc-scopes" usage:"OIDC scopes."`

	SMTPHost     string `name:"smtp-host" usage:"Host of the smtp server. Eg., 'smtp.eu.mailgun.org'"`
	SMTPPort     int    `name:"smtp-port" usage:"Port of the smtp server. Eg., 587"`
	SMTPUsername string `name:"smtp-username" usage:"Username to authenticate with the smtp server as. Eg., 'postmaster@mail.example.org'"`
	SMTPPassword string `name:"smtp-password" usage:"Password to pass to the smtp server."`
	SMTPFrom     string `name:"smtp-from" usage:"Address to use as the 'from' field of the email. Eg., 'gotosocial@example.org'"`

	SyslogEnabled  bool   `name:"syslog-enabled" usage:"Enable the syslog logging hook. Logs will be mirrored to the configured destination."`
	SyslogProtocol string `name:"syslog-protocol" usage:"Protocol to use when directing logs to syslog. Leave empty to connect to local syslog."`
	SyslogAddress  string `name:"syslog-address" usage:"Address:port to send syslog logs to. Leave empty to connect to local syslog."`

	// TODO: move these elsewhere, these are more ephemeral vs long-running flags like above
	AdminAccountUsername string `name:"username" usage:"the username to create/delete/etc"`
	AdminAccountEmail    string `name:"email" usage:"the email address of this account"`
	AdminAccountPassword string `name:"password" usage:"the password to set for this account"`
	AdminTransPath       string `name:"path" usage:"the path of the file to import from/export to"`

	AdvancedCookiesSamesite string `` /* 141-byte string literal not displayed */
}

Configuration represents global GTS server runtime configuration.

Please note that if you update this struct's fields or tags, you will need to regenerate the global Getter/Setter helpers by running: `go run ./internal/config/gen/ -out ./internal/config/helpers.gen.go`

func (*Configuration) MarshalMap added in v0.3.5

func (cfg *Configuration) MarshalMap() (map[string]interface{}, error)

MarshalMap will marshal current Configuration into a map structure (useful for JSON).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL