Documentation ¶
Overview ¶
Package testapi provides a helper for retrieving the KUBE_API_VERSION environment variable.
Index ¶
- func Codec() runtime.Codec
- func Converter() runtime.ObjectConvertor
- func MetadataAccessor() meta.MetadataAccessor
- func ResourcePath(resource, namespace, name string) string
- func ResourcePathWithNamespaceQuery(resource, namespace, name string) string
- func ResourcePathWithPrefix(prefix, resource, namespace, name string) string
- func ResourcePathWithPrefixAndNamespaceQuery(prefix, resource, namespace, name string) string
- func SelfLink(resource, name string) string
- func Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Codec ¶
Codec returns the codec for the API version to test against, as set by the KUBE_API_VERSION env var.
func Converter ¶ added in v0.6.0
func Converter() runtime.ObjectConvertor
Converter returns the api.Scheme for the API version to test against, as set by the KUBE_API_VERSION env var.
func MetadataAccessor ¶ added in v0.5.1
func MetadataAccessor() meta.MetadataAccessor
MetadataAccessor returns the MetadataAccessor for the API version to test against, as set by the KUBE_API_VERSION env var.
func ResourcePath ¶ added in v0.14.0
Returns the appropriate path for the given resource, namespace and name. For ex, this is of the form: /api/v1beta1/pods/pod0 for v1beta1 and /api/v1beta3/namespaces/foo/pods/pod0 for v1beta3.
func ResourcePathWithNamespaceQuery ¶ added in v0.16.1
Returns the appropriate path along with the query params for the given resource, namespace and name. For ex, this is of the form: /api/v1beta1/pods/pod0?namespace=foo for v1beta1 and /api/v1beta3/namespaces/foo/pods/pod0 for v1beta3.
func ResourcePathWithPrefix ¶ added in v0.16.1
Returns the appropriate path for the given prefix (watch, proxy, redirect, etc), resource, namespace and name. For ex, this is of the form: /api/v1beta1/watch/pods/pod0 for v1beta1 and /api/v1beta3/watch/namespaces/foo/pods/pod0 for v1beta3.
func ResourcePathWithPrefixAndNamespaceQuery ¶ added in v0.16.1
Types ¶
This section is empty.