config

package
v0.0.0-...-0690fc6 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStopApp = errors.New("stop application requested")

ErrStopApp AFAIRE.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Host     string
	Port     int
	Username string
	Password string
	Database string
}

Backend AFAIRE.

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config AFAIRE.

func New

func New(util util.Resource, app application.Resource) *Config

New AFAIRE.

func (*Config) Backend

func (c *Config) Backend() *Backend

Backend AFAIRE.

func (*Config) Load

func (c *Config) Load() (*Config, error)

Load AFAIRE.

func (*Config) Logger

func (c *Config) Logger() *Logger

Logger AFAIRE.

func (*Config) Server

func (c *Config) Server() *Server

Server AFAIRE.

func (*Config) Workers

func (c *Config) Workers() *Workers

Workers AFAIRE.

type Logger

type Logger struct {
	Level     string
	Formatter string
	Output    string
	Syslog    struct {
		Facility string
	}
}

Logger AFAIRE.

type Resource

type Resource interface {
	Backend() *Backend
	Logger() *Logger
	Server() *Server
	Workers() *Workers
}

Resource AFAIRE.

type Server

type Server struct {
	Port     int
	TLS      bool
	CertFile string
	KeyFile  string
}

Server AFAIRE.

type Workers

type Workers struct {
	Count int
}

Workers AFAIRE.

Jump to

Keyboard shortcuts

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