Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { GlobalPassphraseFile string `json:"-"` Meta *Meta `json:"meta"` Server *Server `json:"server"` DB *Database `json:"database"` Storage *Storage `json:"storage"` Policy *Policy `json:"policy"` Outlook *Outlook `json:"outlook"` }
func Load ¶
func Load() (*Configuration, error)
func NewConfiguration ¶
func NewConfiguration() *Configuration
func ParseFlags ¶
func ParseFlags(fs *flag.FlagSet) *Configuration
func (*Configuration) Validate ¶
func (c *Configuration) Validate() error
type FileSystem ¶
type FileSystem struct {
Location string `json:"location"`
}
type JWT ¶
type JWT struct { MinSecretLength int `yaml:"min_secret_length,omitempty"` DurationMinutes int `yaml:"duration_minutes,omitempty"` RefreshDuration int `yaml:"refresh_duration_minutes,omitempty"` MaxRefresh int `yaml:"max_refresh_minutes,omitempty"` SigningAlgorithm string `yaml:"signing_algorithm,omitempty"` }
JWT holds data necessary for JWT configuration
type Policy ¶
type Policy struct { Identifier struct { Size int `json:"size"` } `json:"identifier"` Webhook struct { Enabled bool `json:"enabled"` } `json:"webhook"` Secret struct { MaxLength int `json:"max_length"` RevealDuration string `json:"reveal_duration"` } `json:"secret"` Passphrase struct { Required bool `json:"required"` } `json:"passphrase"` Storage struct { Enabled bool `json:"enabled"` FileSystem struct { MaxFileSize uint `json:"max_filesize"` AllowedFileExtensions string `json:"allowed_file_extensions"` } `json:"filesystem"` } `json:"storage"` Security Security `json:"security"` }
type Security ¶
type Security struct { CORS struct { AllowedOrigins []string `json:"allowed_origins"` // contains filtered or unexported fields } `json:"cors"` }
type Storage ¶
type Storage struct { Enabled bool `json:"enabled"` Provider string `json:"provider"` FileSystem FileSystem `json:"filesystem"` }
Click to show internal directories.
Click to hide internal directories.