{"modulePath":"github.com/unitytech/client-go","version":"v11.0.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Variables\n\n```go\nvar (\n\tSchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)\n\tAddToScheme   = SchemeBuilder.AddToScheme\n)\n```\n\n```go\nvar SchemeGroupVersion = schema.GroupVersion{Group: \"\", Version: runtime.APIVersionInternal}\n```\nSchemeGroupVersion is group version used to register these objects TODO this should be in the \"kubeconfig\" group\n\n## Functions\n\n```go\nfunc FlattenConfig(config *Config) error\n```\nFlatten changes the config object into a self contained config (useful for making secrets)\n\n```go\nfunc FlattenContent(path *string, contents *[]byte, baseDir string) error\n```\n\n```go\nfunc IsConfigEmpty(config *Config) bool\n```\nIsConfigEmpty returns true if the config is empty.\n\n```go\nfunc MakeAbs(path, base string) (string, error)\n```\n\n```go\nfunc MinifyConfig(config *Config) error\n```\nMinifyConfig read the current context and uses that to keep only the relevant pieces of config This is useful for making secrets based on kubeconfig files\n\n```go\nfunc ResolvePath(path string, base string) string\n```\nResolvePath returns the path as an absolute paths, relative to the given base directory\n\n```go\nfunc ShortenConfig(config *Config)\n```\nFlatten redacts raw data entries from the config object for a human-readable view.\n\n## Types\n\n```go\ntype AuthInfo struct {\n\t// LocationOfOrigin indicates where this object came from.  It is used for round tripping config post-merge, but never serialized.\n\tLocationOfOrigin string\n\t// ClientCertificate is the path to a client cert file for TLS.\n\t// +optional\n\tClientCertificate string `json:\"client-certificate,omitempty\"`\n\t// ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate\n\t// +optional\n\tClientCertificateData []byte `json:\"client-certificate-data,omitempty\"`\n\t// ClientKey is the path to a client key file for TLS.\n\t// +optional\n\tClientKey string `json:\"client-key,omitempty\"`\n\t// ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey\n\t// +optional\n\tClientKeyData []byte `json:\"client-key-data,omitempty\"`\n\t// Token is the bearer token for authentication to the kubernetes cluster.\n\t// +optional\n\tToken string `json:\"token,omitempty\"`\n\t// TokenFile is a pointer to a file that contains a bearer token (as described above).  If both Token and TokenFile are present, Token takes precedence.\n\t// +optional\n\tTokenFile string `json:\"tokenFile,omitempty\"`\n\t// Impersonate is the username to act-as.\n\t// +optional\n\tImpersonate string `json:\"act-as,omitempty\"`\n\t// ImpersonateGroups is the groups to imperonate.\n\t// +optional\n\tImpersonateGroups []string `json:\"act-as-groups,omitempty\"`\n\t// ImpersonateUserExtra contains additional information for impersonated user.\n\t// +optional\n\tImpersonateUserExtra map[string][]string `json:\"act-as-user-extra,omitempty\"`\n\t// Username is the username for basic authentication to the kubernetes cluster.\n\t// +optional\n\tUsername string `json:\"username,omitempty\"`\n\t// Password is the password for basic authentication to the kubernetes cluster.\n\t// +optional\n\tPassword string `json:\"password,omitempty\"`\n\t// AuthProvider specifies a custom authentication plugin for the kubernetes cluster.\n\t// +optional\n\tAuthProvider *AuthProviderConfig `json:\"auth-provider,omitempty\"`\n\t// Exec specifies a custom exec-based authentication plugin for the kubernetes cluster.\n\t// +optional\n\tExec *ExecConfig `json:\"exec,omitempty\"`\n\t// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields\n\t// +optional\n\tExtensions map[string]runtime.Object `json:\"extensions,omitempty\"`\n}\n```\nAuthInfo contains information that describes identity information.  This is use to tell the kubernetes cluster who you are.\n\n```go\nfunc NewAuthInfo() *AuthInfo\n```\nNewAuthInfo is a convenience function that returns a new AuthInfo object with non-nil maps\n\n```go\nfunc (in *AuthInfo) DeepCopy() *AuthInfo\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthInfo.\n\n```go\nfunc (in *AuthInfo) DeepCopyInto(out *AuthInfo)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype AuthProviderConfig struct {\n\tName string `json:\"name\"`\n\t// +optional\n\tConfig map[string]string `json:\"config,omitempty\"`\n}\n```\nAuthProviderConfig holds the configuration for a specified auth provider.\n\n```go\nfunc (in *AuthProviderConfig) DeepCopy() *AuthProviderConfig\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthProviderConfig.\n\n```go\nfunc (in *AuthProviderConfig) DeepCopyInto(out *AuthProviderConfig)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\nfunc (c AuthProviderConfig) GoString() string\n```\nGoString implements fmt.GoStringer and sanitizes sensitive fields of AuthProviderConfig to prevent accidental leaking via logs.\n\n```go\nfunc (c AuthProviderConfig) String() string\n```\nString implements fmt.Stringer and sanitizes sensitive fields of AuthProviderConfig to prevent accidental leaking via logs.\n\n```go\ntype Cluster struct {\n\t// LocationOfOrigin indicates where this object came from.  It is used for round tripping config post-merge, but never serialized.\n\tLocationOfOrigin string\n\t// Server is the address of the kubernetes cluster (https://hostname:port).\n\tServer string `json:\"server\"`\n\t// InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.\n\t// +optional\n\tInsecureSkipTLSVerify bool `json:\"insecure-skip-tls-verify,omitempty\"`\n\t// CertificateAuthority is the path to a cert file for the certificate authority.\n\t// +optional\n\tCertificateAuthority string `json:\"certificate-authority,omitempty\"`\n\t// CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority\n\t// +optional\n\tCertificateAuthorityData []byte `json:\"certificate-authority-data,omitempty\"`\n\t// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields\n\t// +optional\n\tExtensions map[string]runtime.Object `json:\"extensions,omitempty\"`\n}\n```\nCluster contains information about how to communicate with a kubernetes cluster\n\n```go\nfunc NewCluster() *Cluster\n```\nNewCluster is a convenience function that returns a new Cluster object with non-nil maps\n\n```go\nfunc (in *Cluster) DeepCopy() *Cluster\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.\n\n```go\nfunc (in *Cluster) DeepCopyInto(out *Cluster)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype Config struct {\n\t// Legacy field from pkg/api/types.go TypeMeta.\n\t// TODO(jlowdermilk): remove this after eliminating downstream dependencies.\n\t// +optional\n\tKind string `json:\"kind,omitempty\"`\n\t// Legacy field from pkg/api/types.go TypeMeta.\n\t// TODO(jlowdermilk): remove this after eliminating downstream dependencies.\n\t// +optional\n\tAPIVersion string `json:\"apiVersion,omitempty\"`\n\t// Preferences holds general information to be use for cli interactions\n\tPreferences Preferences `json:\"preferences\"`\n\t// Clusters is a map of referencable names to cluster configs\n\tClusters map[string]*Cluster `json:\"clusters\"`\n\t// AuthInfos is a map of referencable names to user configs\n\tAuthInfos map[string]*AuthInfo `json:\"users\"`\n\t// Contexts is a map of referencable names to context configs\n\tContexts map[string]*Context `json:\"contexts\"`\n\t// CurrentContext is the name of the context that you would like to use by default\n\tCurrentContext string `json:\"current-context\"`\n\t// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields\n\t// +optional\n\tExtensions map[string]runtime.Object `json:\"extensions,omitempty\"`\n}\n```\nConfig holds the information needed to build connect to remote kubernetes clusters as a given user IMPORTANT if you add fields to this struct, please update IsConfigEmpty() +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n\n```go\nfunc NewConfig() *Config\n```\nNewConfig is a convenience function that returns a new Config object with non-nil maps\n\n```go\nfunc (in *Config) DeepCopy() *Config\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.\n\n```go\nfunc (in *Config) DeepCopyInto(out *Config)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\nfunc (in *Config) DeepCopyObject() runtime.Object\n```\nDeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.\n\n```go\nfunc (obj *Config) GetObjectKind() schema.ObjectKind\n```\n\n```go\nfunc (obj *Config) GroupVersionKind() schema.GroupVersionKind\n```\n\n```go\nfunc (obj *Config) SetGroupVersionKind(gvk schema.GroupVersionKind)\n```\n\n```go\ntype Context struct {\n\t// LocationOfOrigin indicates where this object came from.  It is used for round tripping config post-merge, but never serialized.\n\tLocationOfOrigin string\n\t// Cluster is the name of the cluster for this context\n\tCluster string `json:\"cluster\"`\n\t// AuthInfo is the name of the authInfo for this context\n\tAuthInfo string `json:\"user\"`\n\t// Namespace is the default namespace to use on unspecified requests\n\t// +optional\n\tNamespace string `json:\"namespace,omitempty\"`\n\t// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields\n\t// +optional\n\tExtensions map[string]runtime.Object `json:\"extensions,omitempty\"`\n}\n```\nContext is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), a user (how do I identify myself), and a namespace (what subset of resources do I want to work with)\n\n```go\nfunc NewContext() *Context\n```\nNewContext is a convenience function that returns a new Context object with non-nil maps\n\n```go\nfunc (in *Context) DeepCopy() *Context\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Context.\n\n```go\nfunc (in *Context) DeepCopyInto(out *Context)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype ExecConfig struct {\n\t// Command to execute.\n\tCommand string `json:\"command\"`\n\t// Arguments to pass to the command when executing it.\n\t// +optional\n\tArgs []string `json:\"args\"`\n\t// Env defines additional environment variables to expose to the process. These\n\t// are unioned with the host's environment, as well as variables client-go uses\n\t// to pass argument to the plugin.\n\t// +optional\n\tEnv []ExecEnvVar `json:\"env\"`\n\n\t// Preferred input version of the ExecInfo. The returned ExecCredentials MUST use\n\t// the same encoding version as the input.\n\tAPIVersion string `json:\"apiVersion,omitempty\"`\n}\n```\nExecConfig specifies a command to provide client credentials. The command is exec'd and outputs structured stdout holding credentials.\n\nSee the client.authentiction.k8s.io API group for specifications of the exact input and output format\n\n```go\nfunc (in *ExecConfig) DeepCopy() *ExecConfig\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecConfig.\n\n```go\nfunc (in *ExecConfig) DeepCopyInto(out *ExecConfig)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\nfunc (c ExecConfig) GoString() string\n```\nGoString implements fmt.GoStringer and sanitizes sensitive fields of ExecConfig to prevent accidental leaking via logs.\n\n```go\nfunc (c ExecConfig) String() string\n```\nString implements fmt.Stringer and sanitizes sensitive fields of ExecConfig to prevent accidental leaking via logs.\n\n```go\ntype ExecEnvVar struct {\n\tName  string `json:\"name\"`\n\tValue string `json:\"value\"`\n}\n```\nExecEnvVar is used for setting environment variables when executing an exec-based credential plugin.\n\n```go\nfunc (in *ExecEnvVar) DeepCopy() *ExecEnvVar\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecEnvVar.\n\n```go\nfunc (in *ExecEnvVar) DeepCopyInto(out *ExecEnvVar)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\ntype Preferences struct {\n\t// +optional\n\tColors bool `json:\"colors,omitempty\"`\n\t// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields\n\t// +optional\n\tExtensions map[string]runtime.Object `json:\"extensions,omitempty\"`\n}\n```\nIMPORTANT if you add fields to this struct, please update IsConfigEmpty()\n\n```go\nfunc NewPreferences() *Preferences\n```\nNewPreferences is a convenience function that returns a new Preferences object with non-nil maps\n\n```go\nfunc (in *Preferences) DeepCopy() *Preferences\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preferences.\n\n```go\nfunc (in *Preferences) DeepCopyInto(out *Preferences)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n","path":"github.com/unitytech/client-go/tools/clientcmd/api","name":"api","synopsis":"","isRedistributable":true}
