Documentation ¶
Index ¶
- func LoadConfiguration(conf string, c interface{}) error
- func LoadConfigurationFromFile(path string, c interface{}) error
- func LoadConfigurationFromString(conf string, c interface{}) error
- type Api
- type Config
- type Dashboard
- type Database
- type Filesystem
- type Guard
- type Handler
- type Logger
- type Media
- type MediaImage
- type Search
- type Security
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfiguration ¶
Types ¶
type Config ¶
type Config struct { Name string `toml:"name"` Databases map[string]*Database `toml:"databases"` Filesystem Filesystem `toml:"filesystem"` Test bool `toml:"test"` Bind string `toml:"bind"` Guard *Guard `toml:"guard"` Security *Security `toml:"security"` Search *Search `toml:"search"` Media *Media `toml:"media"` Logger *Logger `toml:"logger"` Api *Api `toml:"api"` Dashboard *Dashboard `toml:"dashboard"` }
type Filesystem ¶
type Guard ¶
type Guard struct { Key string `toml:"key"` Jwt struct { Validity int64 `toml:"validity"` Login struct { EndPoint string `toml:"endpoint"` Page string `toml:"page"` } `toml:"login"` Token struct { Apply string `toml:"apply"` Ignore []string `toml:"ignore"` } `toml:"token"` } `toml:"jwt"` Anonymous struct { Roles []string `toml:"roles"` } }
type Media ¶
type Media struct {
Image *MediaImage `toml:"image"`
}
type MediaImage ¶
type Security ¶
type Security struct { Cors struct { AllowedOrigins []string `toml:"allowed_origins"` AllowedMethods []string `toml:"allowed_methods"` AllowedHeaders []string `toml:"allowed_headers"` ExposedHeaders []string `toml:"exposed_headers"` AllowCredentials bool `toml:"allow_credentials"` MaxAge int `toml:"max_age"` OptionsPassthrough bool `toml:"options_passthrough"` Debug bool `toml:"debug"` } `toml:"cors"` Access []*struct { Path string `toml:"path"` Roles []string `toml:"roles"` } `toml:"access"` Voters []string `toml:"voters"` }
Click to show internal directories.
Click to hide internal directories.