context

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigPath

func GetConfigPath(cmd *cobra.Command) string

Types

type Context

type Context struct {
	Name     string         `json:"name"`
	Provider string         `json:"provider"`
	Config   stow.ConfigMap `json:"config"`
}

type OSMConfig

type OSMConfig struct {
	Contexts       []*Context `json:"contexts"`
	CurrentContext string     `json:"current-context"`
}

func LoadConfig

func LoadConfig(configPath string) (*OSMConfig, error)

func (*OSMConfig) Context

func (config *OSMConfig) Context(cliCtx string) (*Context, error)

func (*OSMConfig) Dial

func (config *OSMConfig) Dial(cliCtx string) (stow.Location, error)

func (*OSMConfig) Save

func (config *OSMConfig) Save(configPath string) error

Jump to

Keyboard shortcuts

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