kubeconfig

package
v2.5.0-rc9+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BasicAuthScheme  = "Basic"
	BearerAuthScheme = "Bearer"
)

Variables

This section is empty.

Functions

func DefaultRestConfig

func DefaultRestConfig() (*restclient.Config, error)

get the default one from the filesystem

func GetAuthString

func GetAuthString(in *restclient.Config) (string, error)

Return the AuthString include Auth type(Basic or Bearer)

func GetBasicAuthToken

func GetBasicAuthToken(in *restclient.Config) (string, error)

func GetBasicRestConfig

func GetBasicRestConfig(username, password string) (*restclient.Config, error)

convert a basic token (username, password) into a REST config

func GetBearerRestConfig

func GetBearerRestConfig(token string) (*restclient.Config, error)

convert a bearer token into a REST config

func GetBearerToken

func GetBearerToken(in *restclient.Config) (string, error)

convert the REST config into a bearer token

func GetRestConfig

func GetRestConfig(token string) (*restclient.Config, error)

func IsBasicAuthScheme

func IsBasicAuthScheme(token string) bool

func IsBearerAuthScheme

func IsBearerAuthScheme(token string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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