models

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package models implements models.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Source           string                 `yaml:"-"`
	Logger           string                 `yaml:"logger"`
	LogFile          string                 `yaml:"log_file"`
	LogLevel         string                 `yaml:"log_level"`
	ListenHTTP       string                 `yaml:"http_listen"`
	ListenPrometheus string                 `yaml:"prometheus_listen"`
	ListenPprof      string                 `yaml:"pprof_listen"`
	Previewer        string                 `yaml:"previewer"`
	Interpolation    entities.Interpolation `yaml:"interpolation"`
	NoProxyHeaders   []string               `yaml:"no_proxy_headers"`
	ImageURLEncoder  string                 `yaml:"img_url_encoder"`
	Cacher           string                 `yaml:"cache"`
	MaxCacheItems    int                    `yaml:"max_cache_items"`
	Storager         string                 `yaml:"storage"`
	StoragePath      string                 `yaml:"storage_path"`
}

Config is the base config struct.

func (Config) GetDefaults

func (c Config) GetDefaults() Config

GetDefaults returns default config fields.

type Configer

type Configer interface {
	GetConfig() Config
	SetConfig(Config)
}

Configer is the main interface for configs.

type Logger

type Logger struct {
	Fields     LoggerFields
	WithFields bool
}

Logger is the base struct for all loggers.

type LoggerFields

type LoggerFields map[string]interface{}

LoggerFields is the log fields type.

type Loggerer

type Loggerer interface {
	GetLogger() Loggerer
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	WithFields(LoggerFields) Loggerer
}

Loggerer is the main interface for loggers.

Jump to

Keyboard shortcuts

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