clicontext

package
v0.89.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteContexts

func WriteContexts(contexts *Contexts) error

Types

type CLIContext

type CLIContext struct {
	AuthData             *auth.AuthorizationResponse `json:"auth_data"`
	ClientID             string                      `json:"client_id"`
	OrgURL               string                      `json:"org_url"`
	ServerURL            string                      `json:"server_url"`
	Alias                string                      `json:"alias"`
	ConfirmationRequired bool                        `json:"confirmation_required"`
}

type ContextKeyServerURL

type ContextKeyServerURL struct{}

type Contexts

type Contexts struct {
	CurrentContext string                `json:"current_context"`
	Contexts       map[string]CLIContext `json:"contexts"`
}

func ReadContexts

func ReadContexts() (*Contexts, error)

func (*Contexts) Current

func (c *Contexts) Current() *CLIContext

func (*Contexts) Get

func (c *Contexts) Get(contextName string) *CLIContext

func (*Contexts) UpdateContext

func (c *Contexts) UpdateContext(contextName string, authData *auth.AuthorizationResponse, clientID, orgURL, alias, serverURL string, confirmationRequired bool) error

Jump to

Keyboard shortcuts

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