testapi

package
v0.20.1-0...-1c0b765 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Codec

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

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

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 ResourcePathWithPrefix

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/v1/watch/namespaces/foo/pods/pod0 for v1.

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

func Version() string

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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