package testapi
import "k8s.io/kubernetes/pkg/api/testapi"
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 ResourcePathWithPrefix(prefix, resource, namespace, name string) string
- func SelfLink(resource, name string) string
- func Version() string
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 ¶
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 ¶
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 ¶
Returns the appropriate path for the given resource, namespace and name. For example, this is of the form: /api/v1/namespaces/foo/pods/pod0 for v1.
func ResourcePathWithPrefix ¶
Returns the appropriate path for the given prefix (watch, proxy, redirect, etc), resource, namespace and name. For ex, this is of the form: /api/v1/watch/namespaces/foo/pods/pod0 for v1.
func SelfLink ¶
SelfLink returns a self link that will appear to be for the version Version(). 'resource' should be the resource path, e.g. "pods" for the Pod type. 'name' should be empty for lists.
func Version ¶
func Version() string
Version returns the API version to test against, as set by the KUBE_API_VERSION env var.
Source Files ¶
testapi.go
- Version
- v1.1.0-alpha.1
- Published
- Aug 28, 2015
- Platform
- darwin/amd64
- Imports
- 6 packages
- Last checked
- 4 minutes ago –
Tools for package owners.