config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2018 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug     bool `default:"false"`
	Shortener ShortenerConfig
	Server    SrvConfig
}

func New

func New() *Config

func (*Config) CombineWithENV

func (c *Config) CombineWithENV()

func (*Config) EnvConfigLists

func (c *Config) EnvConfigLists() []string

func (*Config) Example

func (c *Config) Example()

func (*Config) Parse

func (c *Config) Parse(filePath string)

type ShortenerConfig

type ShortenerConfig struct {
	Store StoreConfig
}

type SrvConfig

type SrvConfig struct {
	Domain string `default:"u.kfd.me"`
	Port   int    `default:"8084"`
}

type StoreConfig

type StoreConfig struct {
	DBPath string `default:"./yasuser.db"`
	DBType string `default:"bolt"`
	Redis  string `default:"redis://localhost:6379"`
}

Jump to

Keyboard shortcuts

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