{"modulePath":"github.com/DirectXMan12/client-go","version":"v2.0.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package testapi\n\nPackage testapi provides a helper for retrieving the KUBE\\_TEST\\_API environment variable.\n\nTODO(lavalamp): this package is a huge disaster at the moment. I intend to refactor. All code currently using this package should change: 1. Declare your own registered.APIGroupRegistrationManager in your own test code. 2. Import the relevant install packages. 3. Register the types you need, from the announced.APIGroupAnnouncementManager.\n\n## Functions\n\n```go\nfunc ExternalGroupVersions() unversioned.GroupVersions\n```\nExternalGroupVersions returns all external group versions allowed for the server.\n\n```go\nfunc GetCodecForObject(obj runtime.Object) (runtime.Codec, error)\n```\nGet codec based on runtime.Object\n\n```go\nfunc StorageMediaType() string\n```\n\n## Types\n\n```go\ntype TestGroup struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nvar (\n\tGroups        = make(map[string]TestGroup)\n\tDefault       TestGroup\n\tAuthorization TestGroup\n\tAutoscaling   TestGroup\n\tBatch         TestGroup\n\tExtensions    TestGroup\n\tApps          TestGroup\n\tPolicy        TestGroup\n\tFederation    TestGroup\n\tRbac          TestGroup\n\tCertificates  TestGroup\n\tStorage       TestGroup\n\tImagePolicy   TestGroup\n)\n```\n\n```go\nfunc NewTestGroup(external, internal unversioned.GroupVersion, internalTypes map[string]reflect.Type, externalTypes map[string]reflect.Type) TestGroup\n```\n\n```go\nfunc (g TestGroup) Codec() runtime.Codec\n```\nCodec returns the codec for the API version to test against, as set by the KUBE\\_TEST\\_API\\_TYPE env var.\n\n```go\nfunc (g TestGroup) ContentConfig() (string, *unversioned.GroupVersion, runtime.Codec)\n```\n\n```go\nfunc (g TestGroup) Converter() runtime.ObjectConvertor\n```\nConverter returns the api.Scheme for the API version to test against, as set by the KUBE\\_TEST\\_API env var.\n\n```go\nfunc (g TestGroup) ExternalTypes() map[string]reflect.Type\n```\nExternalTypes returns a map of external API types' kind names to their Go types.\n\n```go\nfunc (g TestGroup) GroupVersion() *unversioned.GroupVersion\n```\n\n```go\nfunc (g TestGroup) InternalGroupVersion() unversioned.GroupVersion\n```\nInternalGroupVersion returns the group,version used to identify the internal types for this API\n\n```go\nfunc (g TestGroup) InternalTypes() map[string]reflect.Type\n```\nInternalTypes returns a map of internal API types' kind names to their Go types.\n\n```go\nfunc (g TestGroup) MetadataAccessor() meta.MetadataAccessor\n```\nMetadataAccessor returns the MetadataAccessor for the API version to test against, as set by the KUBE\\_TEST\\_API env var.\n\n```go\nfunc (g TestGroup) NegotiatedSerializer() runtime.NegotiatedSerializer\n```\nNegotiatedSerializer returns the negotiated serializer for the server.\n\n```go\nfunc (g TestGroup) RESTMapper() meta.RESTMapper\n```\n\n```go\nfunc (g TestGroup) ResourcePath(resource, namespace, name string) string\n```\nReturns 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.\n\n```go\nfunc (g TestGroup) ResourcePathWithPrefix(prefix, resource, namespace, name string) string\n```\nReturns 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.\n\n```go\nfunc (g TestGroup) SelfLink(resource, name string) string\n```\nSelfLink 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.\n\n```go\nfunc (g TestGroup) StorageCodec() runtime.Codec\n```\nStorageCodec returns the codec for the API version to store in etcd, as set by the KUBE\\_TEST\\_API\\_STORAGE\\_TYPE env var.\n\n","path":"github.com/DirectXMan12/client-go/pkg/api/testapi","name":"testapi","synopsis":"Package testapi provides a helper for retrieving the KUBE_TEST_API environment variable.","isRedistributable":true}
