config

package
v0.0.0-...-ec9e3f1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Default = `` /* 300-byte string literal not displayed */
View Source
const Namespace = "minion"

Variables

This section is empty.

Functions

func Load

func Load(file string) bool

Types

type Config

type Config struct {
	Log           Log           `mapstructure:"log" validate:"required"`
	Server        Server        `mapstructure:"server" validate:"required"`
	Minio         Minio         `mapstructure:"minio" validate:"required"`
	Thumbnailer   Thumbnailer   `mapstructure:"thumbnailer" validate:"required"`
	Observability Observability `mapstructure:"observability" validate:"required"`
}

func Get

func Get() *Config

func (Config) Validate

func (c Config) Validate() error

type Log

type Log struct {
	Level int `mapstructure:"level"`
}

type Minio

type Minio struct {
	Addr            string `mapstructure:"addr" validate:"required"`
	AccessKeyID     string `mapstructure:"accessKeyID" validate:"required"`
	SecretAccessKey string `mapstructure:"secretAccessKey" validate:"required"`
	UseSSL          bool   `mapstructure:"useSSL"`
}

type Observability

type Observability struct {
	Prometheus Prometheus `mapstructure:"prometheus" validate:"required"`
}

type Prometheus

type Prometheus struct {
	Enabled bool `mapstructure:"enabled"`
}

type Server

type Server struct {
	Addr string `mapstructure:"addr" validate:"required"`
	Cert string `mapstructure:"cert" validate:"required"`
	Key  string `mapstructure:"key" validate:"required"`
}

type Thumbnailer

type Thumbnailer struct {
	Width  int `mapstructure:"width" validate:"required"`
	Height int `mapstructure:"height" validate:"required"`
}

Jump to

Keyboard shortcuts

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