config

package
v0.33.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: GPL-3.0 Imports: 15 Imported by: 7

Documentation

Index

Constants

View Source
const (
	CONFIG_FILE_TYPE = "yaml"
	CONFIG_FILE      = "cli.yaml"
	ENV_PREFIX       = "MGC"
)

Variables

This section is empty.

Functions

func NetworkConfigSchema

func NetworkConfigSchema() *schema.Schema

func NewContext

func NewContext(parent context.Context, config *Config) context.Context

Types

type Config

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

func FromContext

func FromContext(ctx context.Context) *Config

func (*Config) AddTempKeyPair

func (c *Config) AddTempKeyPair(pairName, keyID, keySecret string)

func (*Config) BuiltInConfigs

func (c *Config) BuiltInConfigs() (map[string]*core.Schema, error)

func (*Config) Delete

func (c *Config) Delete(key string) error

func (*Config) FilePath

func (c *Config) FilePath() string

func (*Config) Get

func (c *Config) Get(key string, out any) error

func (*Config) GetTempKeyPair

func (c *Config) GetTempKeyPair(pairName string) *KeyPair

func (*Config) NewTempConfig

func (c *Config) NewTempConfig()

func (*Config) Set

func (c *Config) Set(key string, value interface{}) error

func (*Config) SetTempConfig

func (c *Config) SetTempConfig(key string, value interface{}) error

func (*Config) TempConfig

func (c *Config) TempConfig() map[string]interface{}

type KeyPair

type KeyPair struct {
	KeyID     string
	KeySecret string
}

type NetworkConfig

type NetworkConfig struct {
	ServerUrl string `json:"serverUrl,omitempty" jsonschema:"description=Manually specify the server to use,format=uri"`
}

Jump to

Keyboard shortcuts

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