config

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2019 License: Apache-2.0 Imports: 7 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"`
	Auth   string `default:"password"`
	Store  StoreConfig
	Server SrvConfig
	Filter Filter
}

func New

func New() *Config

func (*Config) Example

func (c *Config) Example()

func (*Config) Parse

func (c *Config) Parse(filePath string)

type Filter added in v0.1.6

type Filter struct {
	Domain  list
	Keyword list
}

type SrvConfig

type SrvConfig struct {
	Domain string `default:"https://u.kfd.me"`
	Port   int    `default:"8084"`
	Limit  int64  `default:"10"`
	Pprof  bool   `default:"false"`
	GAID   string `default:"62244864-8"`
}

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