config

package
v0.0.0-...-33f6f7a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMultiLogger

func CreateMultiLogger(loggerConfigs []LoggerConfig) (*zerolog.Logger, error)

Types

type Config

type Config struct {
	Server struct {
		ListenAddress             string
		BasePath                  string
		CorsOrigins               []string
		TrustedReverseProxyRanges []ipnet
		RequireJwtAccount         bool
	}
	Storage struct {
		Path              string
		ShardLayers       int
		ExifRemove        bool
		MaximumUploadSize datasize.ByteSize
	}
	Database struct {
		Type string
		Path string
	}
	Expiration struct {
		MaxAge           duration
		IdentifiedMaxAge duration
		CheckInterval    duration
	}
	PreFinishCommands  []PreFinishCommand
	JwtSecretsByIssuer map[string]string
	Loggers            []LoggerConfig
}

func NewConfig

func NewConfig() *Config

func (*Config) DoPostLoadLogging

func (cfg *Config) DoPostLoadLogging(log *zerolog.Logger, configPath string, md toml.MetaData)

func (*Config) Load

func (cfg *Config) Load(log *zerolog.Logger, configPath string) (toml.MetaData, error)

type LoggerConfig

type LoggerConfig struct {
	Level  logLevel
	Format logFormat
	Output logOutput
}

type PreFinishCommand

type PreFinishCommand struct {
	Pattern              string
	Command              string
	Args                 []string
	RejectOnNoneZeroExit bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL