Documentation ¶
Index ¶
- func CSRFAuthKey() string
- func DBUri() string
- func ImageStoreBucketName() string
- func ImageStoreRegion() string
- func LoadAPIConfig() error
- func LoadWebConfig() error
- func Port() string
- func RecoveryExpiry() time.Duration
- func SessionStoreKey() string
- func SupportedAuthServices() []string
- type AuthConfig
- type AuthInstanceConfig
- type DBConfig
- type WebConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CSRFAuthKey ¶
func CSRFAuthKey() string
CSRFAuthKey retrieves the APP_CSRF_AUTH_KEY value from the environment
func ImageStoreBucketName ¶
func ImageStoreBucketName() string
ImageStoreBucketName retrieves the APP_IMGSTORE_BUCKET_NAME value from the environment
func ImageStoreRegion ¶
func ImageStoreRegion() string
ImageStoreRegion retrieves the APP_IMGSTORE_REGION value from the environment
func LoadAPIConfig ¶
func LoadAPIConfig() error
LoadAPIConfig loads all of the environment configuration from environment variables. This version exists primarily to load data for the "API" / tools server
func LoadWebConfig ¶
func LoadWebConfig() error
LoadWebConfig loads all of the environment configuration from environment variables. This version exists primarily to load data for the "Web" / UI server
func RecoveryExpiry ¶
RecoveryExpiry retrieves the APP_RECOVERY_EXPIRY value from the environment
func SessionStoreKey ¶
func SessionStoreKey() string
SessionStoreKey retrieves the SESSION_STORE_KEY value from the environment
func SupportedAuthServices ¶
func SupportedAuthServices() []string
SupportedAuthServices retrieves the parsed AUTH_SERVICES value from the environment
Types ¶
type AuthConfig ¶
type AuthConfig struct { Services []string AuthConfigs map[string]AuthInstanceConfig }
AuthConfig provides configuration details, namespaced to
type AuthInstanceConfig ¶
type AuthInstanceConfig struct { ClientID string `split_words:"true"` ClientSecret string `split_words:"true"` Issuer string `split_words:"true"` BackendURL string `split_words:"true"` SuccessRedirectURL string `split_words:"true"` FailureRedirectURLPrefix string `split_words:"true"` ProfileToShortnameField string `split_words:"true"` }
AuthInstanceConfig provides all of the _possible_ configuration values for an auth instance. Note: it is expected that not all fields will be populated. It is up to the user to verify that these fields exist and have correct values
func AuthConfigInstance ¶
func AuthConfigInstance(name string) AuthInstanceConfig
AuthConfigInstance attempts to retrieve a particular auth configuration set from the environment. Note this looks for environment variables prefixed with AUTH_${SERVICE_NAME}, and will only retrieve these values for services named in the AUTH_SERVICES environment
type DBConfig ¶
type DBConfig struct {
URI string `required:"true"`
}
DBConfig provides configuration details on connecting to the backend database
type WebConfig ¶
type WebConfig struct { ImgstoreBucketName string `split_words:"true"` ImgstoreRegion string `split_words:"true"` CsrfAuthKey string `split_words:"true"` SessionStoreKey string `split_words:"true"` RecoveryExpiry time.Duration `split_words:"true" default:"24h"` Port int }
WebConfig is a namespaced app-specific configuration.