Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultListenPort = 3000 DefaultListenHost = "" Prefix = "BRUTAL" SessionsCookieBackend = "cookie" SessionsFSBackend = "fs" )
View Source
const ( KeyENV = "ENV" KeyLogLevel = "LOG_LEVEL" KeyTimeOut = "TIME_OUT" KeyHostname = "HOSTNAME" KeyListenHostName = "LISTEN_HOSTNAME" KeyListenPort = "LISTEN_PORT" KeyName = "NAME" KeyHTTPS = "HTTPS" KeyCertPath = "CERT_PATH" KeyKeyPath = "KEY_PATH" KeyAPIUrl = "API_URL" KeyDisableVoting = "DISABLE_VOTING" KeyDisableDownVoting = "DISABLE_DOWNVOTING" KeyDisablePublicVoting = "DISABLE_PUBLIC_VOTING" KeyDisableSessions = "DISABLE_SESSIONS" KeyDisableUserCreation = "DISABLE_USER_CREATION" KeyDisableUserInvites = "DISABLE_USER_INVITES" KeyDisableAnonymousCommenting = "DISABLE_ANONYMOUS_COMMENTING" KeyDisableUserFollowing = "DISABLE_USER_FOLLOWING" KeyDisableModeration = "DISABLE_MODERATION" KeyDisableCaching = "DISABLE_CACHING" KeyAutoAcceptFollows = "AUTO_ACCEPT_FOLLOWS" KeyAdminContact = "ADMIN_CONTACT" KeyMaintenanceMode = "MAINTENANCE_MODE" KeyFedBOXOAuthApp = "OAUTH2_APP" KeyFedBOXOAuthKey = "OAUTH2_KEY" KeyFedBOXOAuthSecret = "OAUTH2_SECRET" KeySessionAuthKey = "SESS_AUTH_KEY" KeySessionEncKey = "SESS_ENC_KEY" KeySessionBackend = "SESSIONS_BACKEND" KeySessionPath = "SESSIONS_PATH" )
Variables ¶
View Source
var (
Default = Configuration{Env: DEV}
)
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { HostName string Name string TimeOut time.Duration ListenPort int ListenHost string APIURL string Secure bool CertPath string KeyPath string Env EnvType LogLevel log.Level AdminContact string AnonymousCommentingEnabled bool SessionsEnabled bool VotingEnabled bool DownvotingEnabled bool PublicVotingEnabled bool UserCreatingEnabled bool UserInvitesEnabled bool UserFollowingEnabled bool ModerationEnabled bool CachingEnabled bool AutoAcceptFollows bool MaintenanceMode bool SessionKeys [][]byte SessionsBackend string SessionsPath string }
func (Configuration) GetOauth2Config ¶
func (c Configuration) GetOauth2Config(provider string, localBaseURL string) oauth2.Config
func (Configuration) Listen ¶
func (c Configuration) Listen() string
Click to show internal directories.
Click to hide internal directories.