ConfigHandler

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ask

func Ask(pname, question string, required bool) (answer string)

func AskYN

func AskYN(question string) (yesorno bool)

func ConfigureSchemeDialogue

func ConfigureSchemeDialogue(rClient *httpd.RequestClient, configHandler *ConfigHandler, expertMode bool)

Types

type Config

type Config struct {
	URL     string   `json:"url"`
	Token   string   `json:"token"`
	Schemes []Scheme `json:"schemes"`
}

type ConfigHandler

type ConfigHandler struct {
	File   *os.File
	Config Config
}

func (*ConfigHandler) ConfigureConDialogue

func (c *ConfigHandler) ConfigureConDialogue() (err error)

func (*ConfigHandler) DeleteLocalScheme

func (c *ConfigHandler) DeleteLocalScheme(localName string) error

func (*ConfigHandler) LoadConfig

func (c *ConfigHandler) LoadConfig() error

func (*ConfigHandler) SaveConfig

func (c *ConfigHandler) SaveConfig() error

func (*ConfigHandler) SchemeExist

func (c *ConfigHandler) SchemeExist(localName string) (exists bool)

type Scheme

type Scheme struct {
	LocalName  string            `json:"local_name"`
	RemoteName string            `json:"remote_name"`
	Parameters map[string]string `json:"parameters"`
}

Jump to

Keyboard shortcuts

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