Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWS ¶
type AWS struct { Region string `hcl:"region"` AccessKey string `hcl:"access_key"` SecretKey string `hcl:"secret_key"` }
AWS holds Amazon AWS configuration. AWS can also be configured using SDK methods.
type Auth ¶
type Auth struct { OauthClientID string `hcl:"oauth_client_id"` OauthClientSecret string `hcl:"oauth_client_secret"` OauthCallbackURL string `hcl:"oauth_callback_url"` Provider string `hcl:"provider"` ProviderOpts map[string]string `hcl:"provider_opts"` UsersWhitelist []string `hcl:"users_whitelist"` }
Auth holds the configuration specific to the OAuth provider.
type Config ¶
type Config struct { Server *Server `hcl:"server"` Auth *Auth `hcl:"auth"` SSH *SSH `hcl:"ssh"` AWS *AWS `hcl:"aws"` Vault *Vault `hcl:"vault"` }
Config holds the final server configuration.
func ReadConfig ¶
ReadConfig parses a hcl configuration file into a Config struct.
type SSH ¶
type SSH struct { SigningKey string `hcl:"signing_key"` AdditionalPrincipals []string `hcl:"additional_principals"` MaxAge string `hcl:"max_age"` Permissions []string `hcl:"permissions"` }
SSH holds the configuration specific to signing ssh keys.
type Server ¶
type Server struct { UseTLS bool `hcl:"use_tls"` TLSKey string `hcl:"tls_key"` TLSCert string `hcl:"tls_cert"` LetsEncryptServername string `hcl:"letsencrypt_servername"` LetsEncryptCache string `hcl:"letsencrypt_cachedir"` Addr string `hcl:"address"` Port int `hcl:"port"` User string `hcl:"user"` CookieSecret string `hcl:"cookie_secret"` CSRFSecret string `hcl:"csrf_secret"` HTTPLogFile string `hcl:"http_logfile"` Database Database `hcl:"database"` RequireReason bool `hcl:"require_reason"` }
Server holds the configuration specific to the web server and sessions.
Click to show internal directories.
Click to hide internal directories.