config

package
v0.0.0-...-047296f Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DBInfo
	MediaExts   []string `json:"media_exts"`
	Debug       bool     `json:"debug"`
	Development bool     `json:"development"`
	AuthSecret  string   `json:"auth_secret"`
	AuthTimeout Duration `json:"auth_timeout"`
}

func LoadConfig

func LoadConfig(filename string) (*Config, error)

type DBInfo

type DBInfo struct {
	DBURI      string `json:"db_uri"`
	DBHost     string `json:"db_host"`
	DBPort     int    `json:"db_port"`
	DBName     string `json:"db_name"`
	DBUser     string `json:"db_user"`
	DBPassword string `json:"db_password"`
}

func (*DBInfo) FillEmptyFromURI

func (dbi *DBInfo) FillEmptyFromURI() error

type Duration

type Duration struct {
	time.Duration
}

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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