clientaccess

package
v0.0.0-...-18d89d2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 12 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 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 NormalizeAndValidateTokenForUser

func NormalizeAndValidateTokenForUser(server, token, user string) (string, error)

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) ToToken

func (i *Info) ToToken() string

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