api

package
v0.12.20 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const CloudContext = "cloudctl"

Variables

This section is empty.

Functions

func FormatContextName added in v0.10.1

func FormatContextName(prefix string, suffix string) string

formatContextName returns the contextName for the given suffix. suffix can be empty.

func GetAuthContext added in v0.10.1

func GetAuthContext(kubeconfig string) (*auth.AuthContext, error)

getAuthContext reads AuthContext from given kubeconfig

func WriteContexts added in v0.10.1

func WriteContexts(ctxs *Contexts) error

Types

type Context

type Context struct {
	ApiURL       string  `yaml:"url"`
	IssuerURL    string  `yaml:"issuer_url"`
	IssuerType   string  `yaml:"issuer_type"`
	CustomScopes string  `yaml:"custom_scopes"`
	ClientID     string  `yaml:"client_id"`
	ClientSecret string  `yaml:"client_secret"`
	HMAC         *string `yaml:"hmac"`
}

Context configure cloudctl behaviour

func MustDefaultContext added in v0.10.1

func MustDefaultContext() Context

type Contexts

type Contexts struct {
	CurrentContext  string             `yaml:"current"`
	PreviousContext string             `yaml:"previous"`
	Contexts        map[string]Context `yaml:"contexts"`
}

Contexts contains all configuration contexts of cloudctl

func GetContexts added in v0.10.1

func GetContexts() (*Contexts, error)

type Version added in v0.9.8

type Version struct {
	Client string                   `yaml:"client"`
	Server *cloudmodels.RestVersion `yaml:"server,omitempty"`
}

Jump to

Keyboard shortcuts

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