Documentation
¶
Index ¶
- Variables
- type Cache
- type Config
- type Database
- type Discord
- type DiscordBot
- type GRPC
- type Game
- type HTTP
- type JWT
- type Livemap
- type NATS
- type OAuth2
- type OAuth2Endpoints
- type OAuth2Mapping
- type OAuth2Provider
- type OAuth2ProviderType
- type Perm
- type Result
- type Sentry
- type Sessions
- type Tracing
- type UnemployedJob
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { LogLevel string `default:"DEBUG" yaml:"logLevel"` Mode string `default:"debug" yaml:"mode"` Sentry Sentry `yaml:"sentry"` Tracing Tracing `yaml:"tracing"` HTTP HTTP `yaml:"http"` GRPC GRPC `yaml:"grpc"` Database Database `yaml:"database"` NATS NATS `yaml:"nats"` JWT JWT `yaml:"jwt"` OAuth2 OAuth2 `yaml:"oauth2"` Cache Cache `yaml:"cache"` Game Game `yaml:"game"` Discord Discord `yaml:"discord"` }
type Database ¶
type Database struct { // refer to https://github.com/go-sql-driver/mysql#dsn-data-source-name for details DSN string `yaml:"dsn"` // Connection options MaxOpenConns int `default:"32" yaml:"maxOpenConns"` MaxIdleConns int `default:"5" yaml:"maxIdleConns"` ConnMaxIdleTime time.Duration `default:"15m" yaml:"connMaxIdleTime"` ConnMaxLifetime time.Duration `default:"60m" yaml:"connMaxLifetime"` }
type DiscordBot ¶ added in v0.8.0
type Game ¶
type Game struct { SignupEnabled bool `default:"true" yaml:"signupEnabled"` SuperuserGroups []string `yaml:"superuserGroups"` UnemployedJob UnemployedJob `yaml:"unemployedJob"` PublicJobs []string `yaml:"publicJobs"` Livemap Livemap `yaml:"livemap"` DefaultPermissions []Perm `yaml:"defaultPermissions"` }
type OAuth2 ¶
type OAuth2 struct {
Providers []*OAuth2Provider
}
type OAuth2Endpoints ¶
type OAuth2Mapping ¶
type OAuth2Provider ¶
type OAuth2Provider struct { Name string `yaml:"name"` Label string `yaml:"label"` Homepage string `yaml:"homepage"` Type OAuth2ProviderType `yaml:"type"` DefaultAvatar string `yaml:"defaultAvatar"` RedirectURL string `yaml:"redirectURL"` ClientID string `yaml:"clientID"` ClientSecret string `yaml:"clientSecret"` Scopes []string `yaml:"scopes"` Endpoints OAuth2Endpoints `yaml:"endpoints"` Mapping *OAuth2Mapping `yaml:"omitempty,mapping"` }
type OAuth2ProviderType ¶
type OAuth2ProviderType string
const ( OAuth2ProviderGeneric OAuth2ProviderType = "generic" OAuth2ProviderDiscord OAuth2ProviderType = "discord" )
type UnemployedJob ¶
Click to show internal directories.
Click to hide internal directories.