config

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0, MIT, MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AvailableRegion []string

Functions

func ValidateConfigKey

func ValidateConfigKey(key, value string) (string, error)

Types

type ClinicConfig

type ClinicConfig struct {
	//	Endpoint string `toml:"endpoint,omitempty"`
	//	Cert     string `toml:"cert,omitempty"`
	Region Region `toml:"region,omitempty"`
	Token  string `toml:"token,omitempty"`
}

type ClinicServer

type ClinicServer struct {
	Endpoint string `toml:"endpoint"`
	Cert     string `toml:"cert"`
	Info     string `toml:"info"`
}

type DiagConfig

type DiagConfig struct {
	Clinic ClinicConfig `toml:"clinic,omitempty"`
}

user specified diag config

func (*DiagConfig) InteractiveSet

func (c *DiagConfig) InteractiveSet() error

func (*DiagConfig) InteractiveSetRegion

func (c *DiagConfig) InteractiveSetRegion() error

func (*DiagConfig) InteractiveSetToken

func (c *DiagConfig) InteractiveSetToken()

func (*DiagConfig) Load

func (c *DiagConfig) Load() error

func (*DiagConfig) Save

func (c *DiagConfig) Save() error

func (*DiagConfig) Set

func (c *DiagConfig) Set(key, value string) error

only support string value now

func (*DiagConfig) Unset

func (c *DiagConfig) Unset(key string) error

type DiagInfo

type DiagInfo struct {
	ClinicServers map[Region]ClinicServer `toml:"clinicservers"`
}

user specified diag config

var Info DiagInfo

type Region

type Region string

func (Region) Cert

func (r Region) Cert() string

func (Region) Endpoint

func (r Region) Endpoint() string

func (Region) Info

func (r Region) Info() string

Jump to

Keyboard shortcuts

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