clientaccess

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentAccessInfoToKubeConfig

func AgentAccessInfoToKubeConfig(destFile, server, token string) error

func AgentAccessInfoToTempKubeConfig

func AgentAccessInfoToTempKubeConfig(tempDir, server, token string) (string, error)

func Get

func Get(path string, info *Info) ([]byte, error)

func GetCACerts

func GetCACerts(u url.URL) ([]byte, error)

func GetHTTPClient

func GetHTTPClient(cacerts []byte) *http.Client

func ParseUsernamePassword

func ParseUsernamePassword(token string) (string, string, bool)

Types

type Info

type Info struct {
	URL     string `json:"url,omitempty"`
	CACerts []byte `json:"cacerts,omitempty"`

	Token string `json:"token,omitempty"`
	// contains filtered or unexported fields
}

func ParseAndValidateToken

func ParseAndValidateToken(server, token string) (*Info, error)

func (*Info) KubeConfig

func (i *Info) KubeConfig() *clientcmdapi.Config

func (*Info) WriteKubeConfig

func (i *Info) WriteKubeConfig(destFile string) error

type OverrideURLCallback

type OverrideURLCallback func(config []byte) (*url.URL, error)

Jump to

Keyboard shortcuts

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