Documentation ¶
Index ¶
- Constants
- func ConfigToExecCluster(config *restclient.Config) (*clientauthenticationapi.Cluster, error)
- func DefaultRestConfig() (*restclient.Config, error)
- func GetAuthString(in *restclient.Config, explicitKubeConfigPath string) (string, error)
- func GetBasicAuthToken(in *restclient.Config) (string, error)
- func GetBasicRestConfig(username, password string) (*restclient.Config, error)
- func GetBearerRestConfig(token string) (*restclient.Config, error)
- func GetBearerToken(in *restclient.Config, explicitKubeConfigPath string) (string, error)
- func GetRestConfig(token string) (*restclient.Config, error)
- func IsBasicAuthScheme(token string) bool
- func IsBearerAuthScheme(token string) bool
- func NewUserAgentRoundTripper(agent string, rt http.RoundTripper) http.RoundTripper
- func RefreshAuthToken(in *restclient.Config) error
- func RefreshTokenIfExpired(restConfig *restclient.Config, explicitPath, curentToken string) (string, error)
- func ReloadKubeConfig(explicitPath string) clientcmd.ClientConfig
Constants ¶
View Source
const ( BasicAuthScheme = "Basic" BearerAuthScheme = "Bearer" )
Variables ¶
This section is empty.
Functions ¶
func ConfigToExecCluster ¶
func ConfigToExecCluster(config *restclient.Config) (*clientauthenticationapi.Cluster, error)
ConfigToExecCluster creates a clientauthentication.Cluster with the corresponding fields from the provided Config
func DefaultRestConfig ¶
func DefaultRestConfig() (*restclient.Config, error)
get the default one from the filesystem
func GetAuthString ¶
func GetAuthString(in *restclient.Config, explicitKubeConfigPath string) (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, explicitKubeConfigPath string) (string, error)
convert the REST config into a bearer token
func GetRestConfig ¶
func GetRestConfig(token string) (*restclient.Config, error)
func IsBasicAuthScheme ¶
func IsBearerAuthScheme ¶
func NewUserAgentRoundTripper ¶
func NewUserAgentRoundTripper(agent string, rt http.RoundTripper) http.RoundTripper
func RefreshAuthToken ¶
func RefreshAuthToken(in *restclient.Config) error
func RefreshTokenIfExpired ¶
func RefreshTokenIfExpired(restConfig *restclient.Config, explicitPath, curentToken string) (string, error)
func ReloadKubeConfig ¶
func ReloadKubeConfig(explicitPath string) clientcmd.ClientConfig
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.