config

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 2019 License: Apache-2.0 Imports: 8 Imported by: 181

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterNicknameFromURL

func GetClusterNicknameFromURL(apiServerLocation string) (string, error)

GetClusterNicknameFromURL returns host:port of the apiServerLocation, with .'s replaced by -'s

func GetContextNickname

func GetContextNickname(namespace, clusterNick, userNick string) string

func GetUserNicknameFromCert

func GetUserNicknameFromCert(clusterNick string, chain ...*x509.Certificate) (string, error)

func NormalizeServerURL

func NormalizeServerURL(s string) (string, error)

NormalizeServerURL is opinionated normalization of a string that represents a URL. Returns the URL provided matching the format expected when storing a URL in a config. Sets a scheme and port if not present, removes unnecessary trailing slashes, etc. Can be used to normalize a URL provided by user input.

Types

This section is empty.

Jump to

Keyboard shortcuts

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