kubernetes: github.com/erimatnor/kubernetes/pkg/api/testapi Index | Files

package testapi

import "github.com/erimatnor/kubernetes/pkg/api/testapi"

Package testapi provides a helper for retrieving the KUBE_API_VERSION environment variable.

Index

Package Files

testapi.go

func Codec Uses

func Codec() runtime.Codec

Codec returns the codec for the API version to test against, as set by the KUBE_API_VERSION env var.

func Converter Uses

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 Uses

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 Uses

func ResourcePath(resource, namespace, name string) string

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 Uses

func ResourcePathWithNamespaceQuery(resource, namespace, name string) string

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 Uses

func ResourcePathWithPrefix(prefix, resource, namespace, name string) string

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 Uses

func ResourcePathWithPrefixAndNamespaceQuery(prefix, resource, namespace, name string) string
func SelfLink(resource, name string) string

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 Uses

func Version() string

Version returns the API version to test against, as set by the KUBE_API_VERSION env var.

Package testapi imports 7 packages (graph). Updated 2017-05-11. Refresh now. Tools for package owners.