config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig() error

func SaveConfig

func SaveConfig(values map[string]interface{}) error

func SaveHostToConfig

func SaveHostToConfig(host Host) error

func SetActiveHost

func SetActiveHost(hostname string) error

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

type Host

type Host struct {
	ID      string `mapstructure:"id"`
	Name    string `mapstructure:"name"`
	Addr    string `mapstructure:"addr"`
	Port    uint   `mapstructure:"port"`
	User    string `mapstructure:"user"`
	Keyfile string `mapstructure:"keyfile"`
}

func AppendHost

func AppendHost(host Host) []Host

func GetHostByName

func GetHostByName(name string) (host Host, err error)

type Service

type Service struct {
	Name string `mapstructure:"name"`
	Url  string `mapstructure:"url"`
}

Jump to

Keyboard shortcuts

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