example

package
v0.0.0-...-3915546 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package api is the internal version of the API.

Index

Constants

This section is empty.

Variables

View Source
var (
	ExampleContactStorage = builders.NewApiResource(
		InternalContact,
		func() runtime.Object { return &Contact{} },
		func() runtime.Object { return &ContactList{} },
		&ContactStrategy{builders.StorageStrategySingleton},
	)
	InternalContact = builders.NewInternalResource(
		"contacts",
		"Contact",
		func() runtime.Object { return &Contact{} },
		func() runtime.Object { return &ContactList{} },
	)
	InternalContactStatus = builders.NewInternalResourceStatus(
		"contacts",
		"ContactStatus",
		func() runtime.Object { return &Contact{} },
		func() runtime.Object { return &ContactList{} },
	)
	// Registered resources and subresources
	ApiVersion = builders.NewApiGroup("example.infoblox.com").WithKinds(
		InternalContact,
		InternalContactStatus,
	)

	// Required by code generated by go2idl
	AddToScheme = (&runtime.SchemeBuilder{
		ApiVersion.SchemeBuilder.AddToScheme,
		RegisterDefaults,
	}).AddToScheme
	SchemeBuilder = ApiVersion.SchemeBuilder

	SchemeGroupVersion = ApiVersion.GroupVersion
)

Functions

func Kind

func Kind(kind string) schema.GroupKind

Required by code generated by go2idl Kind takes an unqualified kind and returns a Group qualified GroupKind

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Required by code generated by go2idl Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Contact

type Contact struct {
	metav1.TypeMeta
	metav1.ObjectMeta
	Spec   ContactSpec
	Status ContactStatus
}

func (*Contact) DeepCopy

func (in *Contact) DeepCopy() *Contact

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

func (*Contact) DeepCopyInto

func (in *Contact) DeepCopyInto(out *Contact)

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

func (*Contact) DeepCopyObject

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

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

func (Contact) GetGeneration

func (pc Contact) GetGeneration() int64

func (*Contact) GetObjectMeta

func (pc *Contact) GetObjectMeta() *metav1.ObjectMeta

func (*Contact) GetSpec

func (pc *Contact) GetSpec() interface{}

func (*Contact) GetStatus

func (pc *Contact) GetStatus() interface{}

func (Contact) NewStatus

func (Contact) NewStatus() interface{}

func (*Contact) SetGeneration

func (pc *Contact) SetGeneration(generation int64)

func (*Contact) SetSpec

func (pc *Contact) SetSpec(s interface{})

func (*Contact) SetStatus

func (pc *Contact) SetStatus(s interface{})

type ContactList

type ContactList struct {
	metav1.TypeMeta
	metav1.ListMeta
	Items []Contact
}

func (*ContactList) DeepCopy

func (in *ContactList) DeepCopy() *ContactList

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

func (*ContactList) DeepCopyInto

func (in *ContactList) DeepCopyInto(out *ContactList)

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

func (*ContactList) DeepCopyObject

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

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

type ContactRegistry

type ContactRegistry interface {
	ListContacts(ctx context.Context, options *internalversion.ListOptions) (*ContactList, error)
	GetContact(ctx context.Context, id string, options *metav1.GetOptions) (*Contact, error)
	CreateContact(ctx context.Context, id *Contact) (*Contact, error)
	UpdateContact(ctx context.Context, id *Contact) (*Contact, error)
	DeleteContact(ctx context.Context, id string) (bool, error)
}

Registry is an interface for things that know how to store Contact. +k8s:deepcopy-gen=false

func NewContactRegistry

func NewContactRegistry(sp builders.StandardStorageProvider) ContactRegistry

NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.

type ContactSpec

type ContactSpec struct {
}

func (*ContactSpec) DeepCopy

func (in *ContactSpec) DeepCopy() *ContactSpec

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

func (*ContactSpec) DeepCopyInto

func (in *ContactSpec) DeepCopyInto(out *ContactSpec)

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

type ContactStatus

type ContactStatus struct {
}

func (*ContactStatus) DeepCopy

func (in *ContactStatus) DeepCopy() *ContactStatus

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

func (*ContactStatus) DeepCopyInto

func (in *ContactStatus) DeepCopyInto(out *ContactStatus)

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

type ContactStatusStrategy

type ContactStatusStrategy struct {
	builders.DefaultStatusStorageStrategy
}

+k8s:deepcopy-gen=false

type ContactStrategy

type ContactStrategy struct {
	builders.DefaultStorageStrategy
}

Contact Functions and Structs

+k8s:deepcopy-gen=false

func (ContactStrategy) Validate

Validate checks that an instance of Contact is well formed

Directories

Path Synopsis
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/infobloxopen/konk/test/apiserver/pkg/apis/example +k8s:defaulter-gen=TypeMeta +groupName=example.infoblox.com
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/infobloxopen/konk/test/apiserver/pkg/apis/example +k8s:defaulter-gen=TypeMeta +groupName=example.infoblox.com

Jump to

Keyboard shortcuts

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