discovery

package
v1.3.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveryClient

type DiscoveryClient struct {
	*restclient.RESTClient
}

DiscoveryClient implements the functions that discover server-supported API groups, versions and resources.

func NewDiscoveryClient

func NewDiscoveryClient(c *restclient.RESTClient) *DiscoveryClient

New creates a new DiscoveryClient for the given RESTClient.

func NewDiscoveryClientForConfig

func NewDiscoveryClientForConfig(c *restclient.Config) (*DiscoveryClient, error)

NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. This client can be used to discover supported resources in the API server.

func NewDiscoveryClientForConfigOrDie

func NewDiscoveryClientForConfigOrDie(c *restclient.Config) *DiscoveryClient

NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. If there is an error, it panics.

func (*DiscoveryClient) ServerGroups

func (d *DiscoveryClient) ServerGroups() (apiGroupList *unversioned.APIGroupList, err error)

ServerGroups returns the supported groups, with information like supported versions and the preferred version.

func (*DiscoveryClient) ServerPreferredNamespacedResources

func (d *DiscoveryClient) ServerPreferredNamespacedResources() ([]unversioned.GroupVersionResource, error)

ServerPreferredNamespacedResources returns the supported namespaced resources with the version preferred by the server.

func (*DiscoveryClient) ServerPreferredResources

func (d *DiscoveryClient) ServerPreferredResources() ([]unversioned.GroupVersionResource, error)

ServerPreferredResources returns the supported resources with the version preferred by the server.

func (*DiscoveryClient) ServerResources

func (d *DiscoveryClient) ServerResources() (map[string]*unversioned.APIResourceList, error)

ServerResources returns the supported resources for all groups and versions.

func (*DiscoveryClient) ServerResourcesForGroupVersion

func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (resources *unversioned.APIResourceList, err error)

ServerResourcesForGroupVersion returns the supported resources for a group and version.

func (*DiscoveryClient) ServerVersion

func (d *DiscoveryClient) ServerVersion() (*version.Info, error)

ServerVersion retrieves and parses the server's version (git version).

func (*DiscoveryClient) SwaggerSchema

func (d *DiscoveryClient) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error)

SwaggerSchema retrieves and parses the swagger API schema the server supports.

type DiscoveryInterface

DiscoveryInterface holds the methods that discover server-supported API groups, versions and resources.

type ServerGroupsInterface

type ServerGroupsInterface interface {
	// ServerGroups returns the supported groups, with information like supported versions and the
	// preferred version.
	ServerGroups() (*unversioned.APIGroupList, error)
}

ServerGroupsInterface has methods for obtaining supported groups on the API server

type ServerResourcesInterface

type ServerResourcesInterface interface {
	// ServerResourcesForGroupVersion returns the supported resources for a group and version.
	ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error)
	// ServerResources returns the supported resources for all groups and versions.
	ServerResources() (map[string]*unversioned.APIResourceList, error)
	// ServerPreferredResources returns the supported resources with the version preferred by the
	// server.
	ServerPreferredResources() ([]unversioned.GroupVersionResource, error)
	// ServerPreferredNamespacedResources returns the supported namespaced resources with the
	// version preferred by the server.
	ServerPreferredNamespacedResources() ([]unversioned.GroupVersionResource, error)
}

ServerResourcesInterface has methods for obtaining supported resources on the API server

type ServerVersionInterface

type ServerVersionInterface interface {
	// ServerVersion retrieves and parses the server's version (git version).
	ServerVersion() (*version.Info, error)
}

ServerVersionInterface has a method for retrieving the server's version.

type SwaggerSchemaInterface

type SwaggerSchemaInterface interface {
	// SwaggerSchema retrieves and parses the swagger API schema the server supports.
	SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error)
}

SwaggerSchemaInterface has a method to retrieve the swagger schema.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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