api

package
v0.16.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Ambulance   = "🚑"
	Exclamation = "❗"
	Bark        = "🚧"
	Loop        = "⭕"
	Lock        = "🔒"
	Question    = "❓"
	Skull       = "💀"
	VPN         = "🛡"
)
View Source
const CloudContext = "metalctl"

Variables

This section is empty.

Functions

func EmojiHelpText added in v0.12.0

func EmojiHelpText() string

func FormatContextName

func FormatContextName(prefix string, suffix string) string

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

func GetAuthContext

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

getAuthContext reads AuthContext from given kubeconfig

func WriteContexts

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 metalctl behaviour

func MustDefaultContext

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 metalctl

func GetContexts

func GetContexts() (*Contexts, error)

type Version

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

Jump to

Keyboard shortcuts

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