client

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

TODO: Docs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CarClient

type CarClient interface {
	// New returns a new Car
	New() *api.Car
	// Get returns the Car matching given UID from the storage
	Get(runtime.UID) (*api.Car, error)
	// Set saves the given Car into persistent storage
	Set(*api.Car) error
	// Patch performs a strategic merge patch on the object with
	// the given UID, using the byte-encoded patch given
	Patch(runtime.UID, []byte) error
	// Find returns the Car matching the given filter, filters can
	// match e.g. the Object's Name, UID or a specific property
	Find(filter filterer.BaseFilter) (*api.Car, error)
	// FindAll returns multiple Cars matching the given filter, filters can
	// match e.g. the Object's Name, UID or a specific property
	FindAll(filter filterer.BaseFilter) ([]*api.Car, error)
	// Delete deletes the Car with the given UID from the storage
	Delete(uid runtime.UID) error
	// List returns a list of all Cars available
	List() ([]*api.Car, error)
}

CarClient is an interface for accessing Car-specific API objects

type Client

type Client struct {
	*SampleInternalClient
}

Client is a struct providing high-level access to objects in a storage The resource-specific client interfaces are automatically generated based off client_resource_template.go. The auto-generation can be done with hack/client.sh At the moment SampleInternalClient is the default client. If more than this client is created in the future, the SampleInternalClient will be accessible under Client.SampleInternal() instead.

func NewClient

func NewClient(s storage.Storage) *Client

NewClient creates a client for the specified storage

type MotorcycleClient

type MotorcycleClient interface {
	// New returns a new Motorcycle
	New() *api.Motorcycle
	// Get returns the Motorcycle matching given UID from the storage
	Get(runtime.UID) (*api.Motorcycle, error)
	// Set saves the given Motorcycle into persistent storage
	Set(*api.Motorcycle) error
	// Patch performs a strategic merge patch on the object with
	// the given UID, using the byte-encoded patch given
	Patch(runtime.UID, []byte) error
	// Find returns the Motorcycle matching the given filter, filters can
	// match e.g. the Object's Name, UID or a specific property
	Find(filter filterer.BaseFilter) (*api.Motorcycle, error)
	// FindAll returns multiple Motorcycles matching the given filter, filters can
	// match e.g. the Object's Name, UID or a specific property
	FindAll(filter filterer.BaseFilter) ([]*api.Motorcycle, error)
	// Delete deletes the Motorcycle with the given UID from the storage
	Delete(uid runtime.UID) error
	// List returns a list of all Motorcycles available
	List() ([]*api.Motorcycle, error)
}

MotorcycleClient is an interface for accessing Motorcycle-specific API objects

type SampleInternalClient

type SampleInternalClient struct {
	// contains filtered or unexported fields
}

func NewSampleInternalClient

func NewSampleInternalClient(s storage.Storage) *SampleInternalClient

func (*SampleInternalClient) Cars

func (c *SampleInternalClient) Cars() CarClient

Cars returns the CarClient for the Client object

func (*SampleInternalClient) Dynamic

func (c *SampleInternalClient) Dynamic(kind runtime.Kind) (dc client.DynamicClient)

Dynamic returns the DynamicClient for the Client instance, for the specific kind

func (*SampleInternalClient) Motorcycles

func (c *SampleInternalClient) Motorcycles() MotorcycleClient

Motorcycles returns the MotorcycleClient for the Client object

Jump to

Keyboard shortcuts

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