config

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteContext

func DeleteContext(ctxName string)

DeleteContext - deletes a context

func ListAll

func ListAll()

ListAll - lists all contexts

func SetAuthToken

func SetAuthToken(authToken string)

SetAuthToken - saves the auth token

func SetContext

func SetContext(ctxName string, ctx Context)

SetContext - updates an existing context or creates a new one

func SetCurrentContext

func SetCurrentContext(ctxName string)

SetCurrentContext - sets a given context as current context

Types

type Context

type Context struct {
	Endpoint  string `yaml:"endpoint"`
	Username  string `yaml:"username,omitempty"`
	Password  string `yaml:"password,omitempty"`
	MasterKey string `yaml:"masterkey,omitempty"`
	Current   bool   `yaml:"current,omitempty"`
	AuthToken string `yaml:"auth_token,omitempty"`
	SSO       bool   `yaml:"sso,omitempty"`
	TenantId  string `yaml:"tenant_id,omitempty"`
	Saas      bool   `yaml:"saas,omitempty"`
}

Context maintains configuration for interaction with Netmaker API

func GetCurrentContext

func GetCurrentContext() (name string, ctx Context)

GetCurrentContext - returns current set context

Jump to

Keyboard shortcuts

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