Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureLogger ¶
func ConfigureLogger(opts LoggerOptions)
Types ¶
type Config ¶
type Config struct { AuthMode AuthMode `mapstructure:"auth-mode"` AllowedNamespaces []string `mapstructure:"allowed-namespaces"` KubeConfig string `mapstructure:"kube-config"` // server options Server struct { Addr string `validate:"omitempty,hostname_port"` BasePath string `mapstructure:"base-path"` GinMode string `mapstructure:"gin-mode" validate:"omitempty,oneof=debug release"` AgentDispatchUrl string `mapstructure:"agent-dispatch-url"` // session options Session struct { Secret string // cookie options Cookie struct { Name string Path string Domain string MaxAge int `mapstructure:"max-age"` Secure bool HttpOnly bool `mapstructure:"http-only"` SameSite http.SameSite `mapstructure:"same-site"` } } // csrf options CSRF struct { Enabled bool Secret string FieldName string `mapstructure:"field-name"` // cookie options Cookie struct { Name string Path string Domain string MaxAge int `mapstructure:"max-age"` Secure bool HttpOnly bool `mapstructure:"http-only"` SameSite csrf.SameSiteMode `mapstructure:"same-site"` } } // logging options Logging struct { // enable logging Enabled bool // log level Level string `validate:"oneof=debug info warn error disabled"` // log format Format string `validate:"oneof=json pretty"` // access-log options AccessLog struct { // enable access-log Enabled bool // hide health checks HideHealthChecks bool `mapstructure:"hide-health-checks"` } `mapstructure:"access-log"` } // TLS options TLS struct { // enable tls termination Enabled bool // TLS certificate file CertFile string `mapstructure:"cert-file" validate:"omitempty,file"` // TLS certificate key file KeyFile string `mapstructure:"key-file" validate:"omitempty,file"` } } // agent options Agent struct { Addr string `validate:"omitempty,hostname_port"` ContainerLogsDir string `mapstructure:"container-logs-dir"` // TLS options TLS struct { // enable tls termination Enabled bool // TLS certificate file CertFile string `mapstructure:"cert-file" validate:"omitempty,file"` // TLS certificate key file KeyFile string `mapstructure:"key-file" validate:"omitempty,file"` } // logging options Logging struct { // enable logging Enabled bool // log level Level string `validate:"oneof=debug info warn error disabled"` // log format Format string `validate:"oneof=json pretty"` } } }
Application configuration
func DefaultConfig ¶
func DefaultConfig() *Config
type LoggerOptions ¶
Logging options
Click to show internal directories.
Click to hide internal directories.