Documentation ¶
Index ¶
- Variables
- type Cache
- type Config
- type Database
- type Discord
- type DiscordBot
- type DiscordCommands
- type DiscordGroupRole
- type DiscordGroupSync
- type DiscordUserInfoSync
- type DispatchCenter
- 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 Discord ¶ added in v0.8.0
type Discord struct {
Bot DiscordBot `yaml:"bot"`
}
type DiscordBot ¶ added in v0.8.0
type DiscordBot struct { Enabled bool `default:"false" yaml:"enabled"` SyncInterval time.Duration `default:"15m" yaml:"syncInterval"` InviteURL string `yaml:"inviteURL"` Token string `yaml:"token"` UserInfoSync DiscordUserInfoSync `yaml:"userInfoSync"` GroupSync DiscordGroupSync `yaml:"groupSync"` Commands DiscordCommands `yaml:"commands"` }
type DiscordCommands ¶ added in v0.8.5
type DiscordCommands struct {
Enabled bool `default:"false" yaml:"enabled"`
}
type DiscordGroupRole ¶ added in v0.8.4
type DiscordGroupSync ¶ added in v0.8.4
type DiscordGroupSync struct { Enabled bool `default:"false" yaml:"enabled"` Mapping map[string]DiscordGroupRole `yaml:"omitempty,mapping"` }
type DiscordUserInfoSync ¶ added in v0.8.4
type DispatchCenter ¶ added in v0.8.1
type DispatchCenter struct {
ConvertJobs []string `yaml:"convertJobs"`
}
type Game ¶
type Game struct { SignupEnabled bool `default:"true" yaml:"signupEnabled"` AuditRetentionDays *int `default:"90" yaml:"auditRetentionDays"` SuperuserGroups []string `yaml:"superuserGroups"` UnemployedJob UnemployedJob `yaml:"unemployedJob"` PublicJobs []string `yaml:"publicJobs"` Livemap Livemap `yaml:"livemap"` DispatchCenter DispatchCenter `yaml:"dispatchCenter"` 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.