Documentation
¶
Index ¶
- Variables
- func Init()
- func IsProduction() bool
- type CacheMode
- type Config
- type DatabaseConfig
- type DatabaseMode
- type InitialProjectConfig
- type InitialVirtualServerConfig
- type KeyStoreConfig
- type KeyStoreMode
- type LeaderElectionConfig
- type LeaderElectionMode
- type LeaderElectionRaftConfig
- type PostgresConfig
- type QueueMode
- type RaftNode
- type ServerConfig
- type ServiceUserConfig
- type SigningAlgorithm
- type VaultKeyStoreConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var SupportedSigningAlgorithms = []SigningAlgorithm{ SigningAlgorithmEdDSA, SigningAlgorithmRS256, }
Functions ¶
func IsProduction ¶
func IsProduction() bool
Types ¶
type CacheMode ¶
type CacheMode string
CacheMode has the following constants: CacheModeMemory, CacheModeRedis
type Config ¶
type Config struct {
Server ServerConfig `yaml:"server"`
Frontend struct {
ExternalUrl string `yaml:"externalUrl"`
} `yaml:"frontend"`
Database DatabaseConfig `yaml:"database"`
InitialVirtualServer InitialVirtualServerConfig `yaml:"initialVirtualServer"`
KeyStore KeyStoreConfig `yaml:"keyStore"`
Cache struct {
Mode CacheMode `yaml:"mode"`
Redis struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
Database int `yaml:"database"`
} `yaml:"redis"`
} `yaml:"cache"`
LeaderElection LeaderElectionConfig `yaml:"leaderElection"`
}
var C Config
type DatabaseConfig ¶
type DatabaseConfig struct {
Mode DatabaseMode `yaml:"mode"`
Postgres PostgresConfig `yaml:"postgres"`
Sqlite struct {
Database string `yaml:"database"`
} `yaml:"sqlite"`
}
type DatabaseMode ¶
type DatabaseMode string
DatabaseMode has the following constants: DatabaseModePostgres, DatabaseModeSqlite
const ( DatabaseModePostgres DatabaseMode = "postgres" DatabaseModeSqlite DatabaseMode = "sqlite" DatabaseModeMemory DatabaseMode = "memory" )
type InitialProjectConfig ¶
type InitialProjectConfig struct {
Slug string `yaml:"slug"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Roles []struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
} `yaml:"roles"`
Applications []struct {
Name string `yaml:"name"`
DisplayName string `yaml:"displayName"`
Type string `yaml:"type"`
HashedSecret *string `yaml:"hashedSecret,omitempty"`
RedirectUris []string `yaml:"redirectUris"`
PostLogoutRedirectUris []string `yaml:"postLogoutRedirectUris"`
DeviceFlowEnabled bool `yaml:"deviceFlowEnabled"`
} `yaml:"applications"`
ResourceServers []struct {
Slug string `yaml:"slug"`
Name string `yaml:"name"`
Description string `yaml:"description"`
} `yaml:"resourceServers"`
}
type InitialVirtualServerConfig ¶ added in v0.3.5
type InitialVirtualServerConfig struct {
Name string `yaml:"name"`
DisplayName string `yaml:"displayName"`
EnableRegistration bool `yaml:"enableRegistration"`
SigningAlgorithm SigningAlgorithm `yaml:"signingAlgorithm"`
CreateSystemAdminRole bool `yaml:"createSystemAdminRole"`
CreateAdmin bool `yaml:"createAdmin"`
Admin struct {
Username string `yaml:"username"`
DisplayName string `yaml:"displayName"`
PrimaryEmail string `yaml:"primaryEmail"`
PasswordHash string `yaml:"passwordHash"`
Roles []string `yaml:"roles"`
} `yaml:"admin"`
ServiceUsers []ServiceUserConfig `yaml:"serviceUsers"`
Projects []InitialProjectConfig `yaml:"projects"`
Mail struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
} `yaml:"mail"`
}
type KeyStoreConfig ¶
type KeyStoreConfig struct {
Mode KeyStoreMode `yaml:"mode"`
Vault VaultKeyStoreConfig `yaml:"vault"`
Directory struct {
Path string `yaml:"path"`
} `yaml:"directory"`
}
type KeyStoreMode ¶
type KeyStoreMode string
KeyStoreMode has the following constants: KeyStoreModeMemory (testing only), KeyStoreModeDirectory, KeyStoreModeOpenBao
const ( KeyStoreModeMemory KeyStoreMode = "memory" KeyStoreModeDirectory KeyStoreMode = "directory" KeyStoreModeVault KeyStoreMode = "vault" )
type LeaderElectionConfig ¶
type LeaderElectionConfig struct {
Mode LeaderElectionMode `yaml:"mode"`
Raft LeaderElectionRaftConfig `yaml:"raft"`
}
type LeaderElectionMode ¶
type LeaderElectionMode string
const ( LeaderElectionModeNone LeaderElectionMode = "none" LeaderElectionModeRaft LeaderElectionMode = "raft" )
type PostgresConfig ¶
type QueueMode ¶
type QueueMode string
QueueMode has the following constants: DeliveryModeNoop, DeliveryModeInProcess
type ServerConfig ¶
type ServiceUserConfig ¶ added in v0.3.5
type SigningAlgorithm ¶
type SigningAlgorithm string
const ( SigningAlgorithmRS256 SigningAlgorithm = "RS256" SigningAlgorithmEdDSA SigningAlgorithm = "EdDSA" )
Click to show internal directories.
Click to hide internal directories.