v1alpha1

package
v0.0.0-...-13fc81c Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupName = "authentication.istio.io"
	Version   = "v1alpha1"
)

Variables

View Source
var (
	PolicyGroupVersionKind = schema.GroupVersionKind{
		Version: Version,
		Group:   GroupName,
		Kind:    "Policy",
	}
	PolicyResource = metav1.APIResource{
		Name:         "policies",
		SingularName: "policy",
		Namespaced:   true,

		Kind: PolicyGroupVersionKind.Kind,
	}
)
View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}

SchemeGroupVersion is group version used to register these objects

Functions

func Factory

func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error)

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func NewPolicy

func NewPolicy(namespace, name string, obj v1alpha1.Policy) *v1alpha1.Policy

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Client

type Client struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Client) Policies

func (c *Client) Policies(namespace string) PolicyInterface

func (*Client) RESTClient

func (c *Client) RESTClient() rest.Interface

func (*Client) Start

func (c *Client) Start(ctx context.Context, threadiness int) error

func (*Client) Sync

func (c *Client) Sync(ctx context.Context) error

type Clients

type Clients struct {
	Interface Interface

	Policy PolicyClient
}

func ClientsFrom

func ClientsFrom(ctx context.Context) *Clients

func NewClients

func NewClients(config rest.Config) (*Clients, error)

func NewClientsFromInterface

func NewClientsFromInterface(iface Interface) *Clients

type Interface

type Interface interface {
	RESTClient() rest.Interface
	controller.Starter

	PoliciesGetter
}

func From

func From(ctx context.Context) Interface

func NewForConfig

func NewForConfig(config rest.Config) (Interface, error)

type PoliciesGetter

type PoliciesGetter interface {
	Policies(namespace string) PolicyInterface
}

type PolicyChangeHandlerFunc

type PolicyChangeHandlerFunc func(obj *v1alpha1.Policy) (runtime.Object, error)

type PolicyClient

type PolicyClient interface {
	Create(*v1alpha1.Policy) (*v1alpha1.Policy, error)
	Get(namespace, name string, opts metav1.GetOptions) (*v1alpha1.Policy, error)
	Update(*v1alpha1.Policy) (*v1alpha1.Policy, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	List(namespace string, opts metav1.ListOptions) (*PolicyList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)

	Cache() PolicyClientCache

	OnCreate(ctx context.Context, name string, sync PolicyChangeHandlerFunc)
	OnChange(ctx context.Context, name string, sync PolicyChangeHandlerFunc)
	OnRemove(ctx context.Context, name string, sync PolicyChangeHandlerFunc)
	Enqueue(namespace, name string)

	Generic() controller.GenericController
	ObjectClient() *objectclient.ObjectClient
	Interface() PolicyInterface
}

type PolicyClientCache

type PolicyClientCache interface {
	Get(namespace, name string) (*v1alpha1.Policy, error)
	List(namespace string, selector labels.Selector) ([]*v1alpha1.Policy, error)

	Index(name string, indexer PolicyIndexer)
	GetIndexed(name, key string) ([]*v1alpha1.Policy, error)
}

type PolicyController

type PolicyController interface {
	Generic() controller.GenericController
	Informer() cache.SharedIndexInformer
	Lister() PolicyLister
	AddHandler(ctx context.Context, name string, handler PolicyHandlerFunc)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler PolicyHandlerFunc)
	Enqueue(namespace, name string)
	Sync(ctx context.Context) error
	Start(ctx context.Context, threadiness int) error
}

type PolicyHandlerFunc

type PolicyHandlerFunc func(key string, obj *v1alpha1.Policy) (runtime.Object, error)

func NewPolicyLifecycleAdapter

func NewPolicyLifecycleAdapter(name string, clusterScoped bool, client PolicyInterface, l PolicyLifecycle) PolicyHandlerFunc

type PolicyIndexer

type PolicyIndexer func(obj *v1alpha1.Policy) ([]string, error)

type PolicyInterface

type PolicyInterface interface {
	ObjectClient() *objectclient.ObjectClient
	Create(*v1alpha1.Policy) (*v1alpha1.Policy, error)
	GetNamespaced(namespace, name string, opts metav1.GetOptions) (*v1alpha1.Policy, error)
	Get(name string, opts metav1.GetOptions) (*v1alpha1.Policy, error)
	Update(*v1alpha1.Policy) (*v1alpha1.Policy, error)
	Delete(name string, options *metav1.DeleteOptions) error
	DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
	List(opts metav1.ListOptions) (*PolicyList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Controller() PolicyController
	AddHandler(ctx context.Context, name string, sync PolicyHandlerFunc)
	AddLifecycle(ctx context.Context, name string, lifecycle PolicyLifecycle)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync PolicyHandlerFunc)
	AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle PolicyLifecycle)
}

type PolicyLifecycle

type PolicyLifecycle interface {
	Create(obj *v1alpha1.Policy) (runtime.Object, error)
	Remove(obj *v1alpha1.Policy) (runtime.Object, error)
	Updated(obj *v1alpha1.Policy) (runtime.Object, error)
}

type PolicyList

type PolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []v1alpha1.Policy
}

func (*PolicyList) DeepCopy

func (in *PolicyList) DeepCopy() *PolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyList.

func (*PolicyList) DeepCopyInto

func (in *PolicyList) DeepCopyInto(out *PolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PolicyList) DeepCopyObject

func (in *PolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PolicyLister

type PolicyLister interface {
	List(namespace string, selector labels.Selector) (ret []*v1alpha1.Policy, err error)
	Get(namespace, name string) (*v1alpha1.Policy, error)
}

Jump to

Keyboard shortcuts

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