config

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load()

Load configuration

Types

type APIConfig

type APIConfig struct {
	HTTPHost string
	HTTPPort int
}

APIConfig basic config

type AccessConf

type AccessConf map[string]KeysConf

AccessConf informations

type KeysConf

type KeysConf struct {
	Name     string `mapstructure:"name"`
	Prefix   string `mapstructure:"prefix"`
	Type     string `mapstructure:"type"`
	ReadOnly bool   `mapstructure:"read_only"`
}

KeysConf informations

type Rerest

type Rerest struct {
	Dev                  bool
	Trace                bool
	API                  *APIConfig
	Access               AccessConf
	RedisHost            string
	RedisPassword        string
	RedisPort            int
	RedisDatabaseData    int
	RedisDatabaseControl int
}

Rerest basic config

var (
	// RerestConf config variable
	RerestConf *Rerest
)

func New

func New() *Rerest

New config struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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