config

package
v0.0.0-...-5d4f8f2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFilePerm      = 0644
	DefaultLocalStorage = "/var/tmp/hflow"
)
View Source
const (
	DefaultRepoParamsFileName = ".hflow_repo"
)

Variables

This section is empty.

Functions

func GetOrCreateRepoConfig

func GetOrCreateRepoConfig(dir string, createIfMissing bool) (*viper.Viper, error)

func GetRepoConfig

func GetRepoConfig(dir string) (*viper.Viper, error)

func ReadRepoParams

func ReadRepoParams(working_dir string, key string) (value string, err error)

func SetEmail

func SetEmail(email string) error

func SetHostServer

func SetHostServer(addr string) error

func SetJwt

func SetJwt(jwt string) error

func WriteRepoParams

func WriteRepoParams(working_dir string, key string, value string) error

Types

type Config

type Config struct {
	DefaultServerAddr string
	Jwt               string
	UserName          string
	Email             string
	Concurrency       int
	Local             *Local
}

func Default

func Default() *Config

func GetConfig

func GetConfig() *Config

func ReadFromFile

func ReadFromFile() (*Config, error)

type Local

type Local struct {
	ObjStorage   string
	StorageLimit int32
}

Jump to

Keyboard shortcuts

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