config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(role string) error

Types

type AppConfig

type AppConfig struct {
	Web struct {
		Mode          string `mapstructure:"mode"`
		ListenAddress string `mapstructure:"listen_address"`
	} `mapstructure:"web"`
	PieceSize            int64         `mapstructure:"piece_size"`
	SessionExpire        time.Duration `mapstructure:"session_expire"`
	SessionCheckInterval time.Duration `mapstructure:"session_check_interval"`
	DownloadDir          string        `mapstructure:"download_dir"`
}

func GetOpts

func GetOpts() *AppConfig

Jump to

Keyboard shortcuts

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