Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BehaviourConfiguration ¶
type BehaviourConfiguration struct { Name string Site string InviteOnly bool `mapstructure:"invite-only"` InviteRole *string `mapstructure:"invite-role"` InviteExpiry time.Duration `mapstructure:"invite-expiry"` AutoConfirmUsers bool `mapstructure:"auto-confirm-users"` DefaultLocale string `mapstructure:"default-locale"` AutoLockoutCount int `mapstructure:"auto-lockout-count"` AutoLockoutDuration time.Duration `mapstructure:"auto-lockout-duration"` PasswordMinLength int `mapstructure:"password-min-length"` ServiceDomain string `mapstructure:"service-domain"` }
BehaviourConfiguration configures hwo the service will behave
type CORSConfiguration ¶
type CORSConfiguration struct { AllowCredentials bool `mapstructure:"allow-credentials"` AllowedMethods []string `mapstructure:"allowed-methods"` AllowedOrigins []string `mapstructure:"allowed-origins"` }
CORSConfiguration very basic cors configuration
type Configuration ¶
type Configuration struct { Server *ServerConfiguration `mapstructure:"server"` SMTP *SMTPConfiguration `mapstructure:"smtp"` Database *DatabaseConfiguration `mapstructure:"database"` Behaviour *BehaviourConfiguration `mapstructure:"behaviour"` JWT *JWTConfiguration `mapstructure:"jwt"` ManageEndpoint *ManageEndpointConfirugation `mapstructure:"manage-endpoint"` }
Configuration habours the entire gotrxx configuration
func (*Configuration) DebugMode ¶
func (*Configuration) DebugMode() bool
DebugMode returns true if the DEBUG_MODE variable is set
func (*Configuration) Validate ¶
func (c *Configuration) Validate() error
Validate does some basic validation of the config file and tries to be helpful on missconfiguration
type DatabaseConfiguration ¶
DatabaseConfiguration contains the settings required to connect to a database
type FileSystems ¶
FileSystems contains the used file systems
type JWTConfiguration ¶
type JWTConfiguration struct { FlattenAudience bool `mapstructure:"flatten-audience"` Algorithm string `mapstructure:"alg"` Issuer string `mapstructure:"iss"` Audience []string `mapstructure:"aud"` Expiry time.Duration `mapstructure:"exp"` NoRolesClaim bool `mapstructure:"no-roles-claim"` HMACSigningKey string `mapstructure:"hmac-signing-key" json:"-"` HMACSigningKeyFile string `mapstructure:"hmac-signing-key-file"` RSAPrivateKey string `mapstructure:"rsa-private-key" json:"-"` RSAPublicKey string `mapstructure:"rsa-public-key" json:"-"` RSAPRivateKeyFile string `mapstructure:"rsa-private-key-file"` RSAPublicKeyFile string `mapstructure:"rsa-public-key-file"` RefreshTokenExpiry time.Duration `mapstructure:"refresh-token-expiry"` RememberMeDuration time.Duration `mapstructure:"remember-me-duration"` }
JWTConfiguration habours all JWT and refresh token settings
type ManageEndpointConfirugation ¶
type ManageEndpointConfirugation struct { Enable bool CORS *CORSConfiguration }
ManageEndpointConfirugation habours the manage endpoitn configuration
type SMTPConfiguration ¶
type SMTPConfiguration struct { Enabled bool Host string Port int Username string Password string `json:"-"` //DisplayName will be displayed as email sender DisplayName string ` mapstructure:"display-name"` //Address is the sender address Address string }
SMTPConfiguration contains the email settings
Click to show internal directories.
Click to hide internal directories.