clientaccess

package
v1.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 12 Imported by: 7

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 added in v1.0.0

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 added in v1.0.0

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