config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SERVER_MODE_LOCAL = "local"
	SERVER_MODE_NG    = "ng"
)
View Source
const (
	SSH_CONFIG_TYPE_PASSWORD = "password"
)

Variables

This section is empty.

Functions

func Decode

func Decode(sshConfig *SshConfig) string

func Encode

func Encode(sshConfig *SshConfig)

func GetSshConfigs

func GetSshConfigs() map[string]*SshConfig

func UpdateConfig

func UpdateConfig() error

Types

type Server

type Server struct {
	Address  string
	Port     int
	Token    string
	Mode     string
	Username string
	Password string
}

func GetServer

func GetServer() *Server

func (*Server) GetFullAddress

func (s *Server) GetFullAddress() string

type SshConfig

type SshConfig struct {
	Name     string `json:"name" yaml:"name" mapstructure:"name"`
	Host     string `json:"host" yaml:"host" mapstructure:"host"`
	Port     uint   `json:"port" yaml:"port" mapstructure:"port"`
	Username string `json:"username" yaml:"username" mapstructure:"username"`
	Password string `json:"password" yaml:"password" mapstructure:"password"`
	Type     string `json:"type" yaml:"type" mapstructure:"type"`
}

Jump to

Keyboard shortcuts

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