Documentation ¶
Index ¶
- func ConfigureTracing(tc *TracingConfig)
- func ConfigureZeroLogging(config *LoggingConfig)
- type Configuration
- type CustomerIOConfiguration
- type DBConfiguration
- type EmailContentConfiguration
- type EmailProviderConfiguration
- type GlobalConfiguration
- type InvitationConfiguration
- type JWTConfiguration
- type LoggingConfig
- type MailerConfiguration
- type OAuthProviderConfiguration
- type ProviderConfiguration
- type SMTPConfiguration
- type SamlProviderConfiguration
- type TracingConfig
- type WebhookConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureTracing ¶
func ConfigureTracing(tc *TracingConfig)
func ConfigureZeroLogging ¶
func ConfigureZeroLogging(config *LoggingConfig)
Types ¶
type Configuration ¶
type Configuration struct { SiteURL string `json:"site_url" split_words:"true" required:"true"` TigrisWebsiteURL string `json:"tigris_website_url" split_words:"true" required:"false"` TigrisConsoleURL string `json:"tigris_console_url" split_words:"true" required:"false"` JWT JWTConfiguration `json:"jwt"` SMTP SMTPConfiguration `json:"smtp"` Mailer MailerConfiguration `json:"mailer"` External ProviderConfiguration `json:"external"` DisableSignup bool `json:"disable_signup" split_words:"true"` Webhook WebhookConfig `json:"webhook" split_words:"true"` Cookie struct { Key string `json:"key"` Duration int `json:"duration"` } `json:"cookies"` }
Configuration holds all the per-instance configuration.
func LoadConfig ¶
func LoadConfig(filename string) (*Configuration, error)
LoadConfig loads per-instance configuration.
func (*Configuration) ApplyDefaults ¶
func (config *Configuration) ApplyDefaults()
ApplyDefaults sets defaults for a Configuration
func (*Configuration) Scan ¶
func (config *Configuration) Scan(src interface{}) error
type CustomerIOConfiguration ¶
type DBConfiguration ¶
type DBConfiguration struct { URL string `json:"url" envconfig:"GOTRUE_DB_URL" required:"true"` Namespace string `json:"namespace"` Project string `json:"project" required:"true"` Branch string `json:"db_branch" envconfig:"GOTRUE_DB_BRANCH" required:"true"` Token string `json:"token" envconfig:"GOTRUE_DB_TOKEN"` ClientId string `json:"client_id" envconfig:"GOTRUE_DB_CLIENT_ID"` ClientSecret string `json:"client_secret" envconfig:"GOTRUE_DB_CLIENT_SECRET"` EncryptionKey string `json:"encryption_key" envconfig:"GOTRUE_DB_ENCRYPTION_KEY"` }
DBConfiguration holds all the database related configuration.
type EmailContentConfiguration ¶
type EmailContentConfiguration struct { Invite string `json:"invite"` Confirmation string `json:"confirmation"` Recovery string `json:"recovery"` EmailChange string `json:"email_change" split_words:"true"` }
EmailContentConfiguration holds the configuration for emails, both subjects and template URLs.
type EmailProviderConfiguration ¶
type EmailProviderConfiguration struct {
Disabled bool `json:"disabled"`
}
type GlobalConfiguration ¶
type GlobalConfiguration struct { API struct { Host string Port int `envconfig:"PORT" default:"8081"` Endpoint string RequestIDHeader string `envconfig:"REQUEST_ID_HEADER"` EnableDebugEndpoint bool `envconfig:"ENABLE_DEBUG_ENDPOINT"` TokenCacheSize int `envconfig:"TOKEN_CACHE_SIZE" default:"100"` EnableTokenCache bool `envconfig:"ENABLE_TOKEN_CACHE" default:"false"` } DB DBConfiguration External ProviderConfiguration Logging LoggingConfig `envconfig:"LOG"` OperatorToken string `split_words:"true" required:"true"` MultiInstanceMode bool Tracing TracingConfig SMTP SMTPConfiguration RateLimitHeader string `split_words:"true"` InvitationConfig InvitationConfiguration `envconfig:"invitation"` }
GlobalConfiguration holds all the configuration that applies to all instances.
func LoadGlobal ¶
func LoadGlobal(filename string) (*GlobalConfiguration, error)
LoadGlobal loads configuration from file and environment variables.
type InvitationConfiguration ¶
type InvitationConfiguration struct { CodeLength int `json:"code_length" default:"30"` // allows the delay of leeway seconds in expiration of the invitation code LeewaySecond int `json:"leeway_second" default:"300"` CodePrefix string `json:"code_prefix" default:"ti_"` HideCode bool `json:"hide_code" default:"false"` }
type JWTConfiguration ¶
type JWTConfiguration struct { Secret string `json:"secret" required:"true"` Exp int `json:"exp"` Aud string `json:"aud"` AdminGroupName string `json:"admin_group_name" split_words:"true"` DefaultGroupName string `json:"default_group_name" split_words:"true"` Algorithm string `json:"algorithm"` Issuer string `json:"issuer"` // Current RSA private key used to sign the token currently RSAPrivateKey string `json:"rsa_private_key" split_words:"true"` // Current and past few RSA public keys used to sign the token. // First entry points to current public key RSAPublicKeys []string `json:"rsa_public_keys" split_words:"true"` }
JWTConfiguration holds all the JWT related configuration.
type LoggingConfig ¶
type LoggingConfig struct { Level string `mapstructure:"log_level" json:"log_level" default:"DEBUG"` File string `mapstructure:"log_file" json:"log_file"` DisableColors bool `mapstructure:"disable_colors" split_words:"true" json:"disable_colors"` QuoteEmptyFields bool `mapstructure:"quote_empty_fields" split_words:"true" json:"quote_empty_fields"` TSFormat string `mapstructure:"ts_format" json:"ts_format"` Fields map[string]interface{} `mapstructure:"fields" json:"fields"` Format string `mapstructure:"format" json:"format" default:"console"` // defaults to std log - developer friendly }
type MailerConfiguration ¶
type MailerConfiguration struct { Autoconfirm bool `json:"autoconfirm"` Subjects EmailContentConfiguration `json:"subjects"` Templates EmailContentConfiguration `json:"templates"` URLPaths EmailContentConfiguration `json:"url_paths"` Type string `json:"type"` CustomerIO CustomerIOConfiguration `json:"customerio"` }
type OAuthProviderConfiguration ¶
type OAuthProviderConfiguration struct { ClientID string `json:"client_id" split_words:"true"` Secret string `json:"secret"` RedirectURI string `json:"redirect_uri" split_words:"true"` URL string `json:"url"` Enabled bool `json:"enabled"` }
OAuthProviderConfiguration holds all config related to external account providers.
func (*OAuthProviderConfiguration) Validate ¶
func (o *OAuthProviderConfiguration) Validate() error
type ProviderConfiguration ¶
type ProviderConfiguration struct { Bitbucket OAuthProviderConfiguration `json:"bitbucket"` Github OAuthProviderConfiguration `json:"github"` Gitlab OAuthProviderConfiguration `json:"gitlab"` Google OAuthProviderConfiguration `json:"google"` Facebook OAuthProviderConfiguration `json:"facebook"` Email EmailProviderConfiguration `json:"email"` Saml SamlProviderConfiguration `json:"saml"` RedirectURL string `json:"redirect_url"` }
type SMTPConfiguration ¶
type SamlProviderConfiguration ¶
type SamlProviderConfiguration struct { Enabled bool `json:"enabled"` MetadataURL string `json:"metadata_url" envconfig:"METADATA_URL"` APIBase string `json:"api_base" envconfig:"API_BASE"` Name string `json:"name"` SigningCert string `json:"signing_cert" envconfig:"SIGNING_CERT"` SigningKey string `json:"signing_key" envconfig:"SIGNING_KEY"` }
type TracingConfig ¶
Click to show internal directories.
Click to hide internal directories.