v1alpha1

package
v0.0.0-...-398aefc Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +k8s:openapi-gen=true +groupName=captainhook.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeBuilder for building the schema :).
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme helper
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: captainhookio.GroupName, Version: captainhookio.Version}

SchemeGroupVersion is group version used to register these objects.

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource.

Types

type Hook

type Hook struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	Spec   HookSpec   `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
	Status HookStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

Hook represents a webhook.

func (*Hook) DeepCopy

func (in *Hook) DeepCopy() *Hook

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

func (*Hook) DeepCopyInto

func (in *Hook) DeepCopyInto(out *Hook)

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

func (*Hook) DeepCopyObject

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

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

type HookList

type HookList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Hook `json:"items"`
}

HookList is a list of TypeMeta resources.

func (*HookList) DeepCopy

func (in *HookList) DeepCopy() *HookList

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

func (*HookList) DeepCopyInto

func (in *HookList) DeepCopyInto(out *HookList)

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

func (*HookList) DeepCopyObject

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

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

type HookPhase

type HookPhase string

HookStatusType is the status of a hook; usually success or failed at completion.

const (
	// HookPhaseNone an hook step has not started yet.
	HookPhaseNone HookPhase = ""
	// HookPhasePending the hook currently being relayed.
	HookPhasePending HookPhase = "Pending"
	// HookPhaseStatus the hook has been relayed.
	HookPhaseSending HookPhase = "Sending"
	// HookPhaseStatus the hook has been relayed.
	HookPhaseSuccess HookPhase = "Success"
	// HookPhaseStatus the hook has failed to be relayed.
	HookPhaseFailed HookPhase = "Failed"
)

type HookSpec

type HookSpec struct {
	ForwardURL string              `json:"forwardURL" protobuf:"bytes,1,opt,name=forwardURL"`
	Body       string              `json:"body" protobuf:"bytes,2,opt,name=body"`
	Headers    map[string][]string `json:"headers,omitempty" protobuf:"bytes,3,opt,name=headers"`
}

HookSpec is the specification of a Hook.

func (*HookSpec) DeepCopy

func (in *HookSpec) DeepCopy() *HookSpec

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

func (*HookSpec) DeepCopyInto

func (in *HookSpec) DeepCopyInto(out *HookSpec)

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

type HookStatus

type HookStatus struct {
	Phase              HookPhase    `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PodPhase"`
	Attempts           int          `json:"attempts,omitempty" protobuf:"bytes,2,opt,name=attempts"`
	Message            string       `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
	NoRetryBefore      *metav1.Time `json:"noRetryBefore,omitempty" protobuf:"bytes,4,opt,name=noRetryBefore"`
	CompletedTimestamp *metav1.Time `json:"completedTimestamp,omitempty" protobuf:"bytes,5,opt,name=completedTimestamp"`
}

HookStatus is the status for a Hook resource.

func (*HookStatus) DeepCopy

func (in *HookStatus) DeepCopy() *HookStatus

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

func (*HookStatus) DeepCopyInto

func (in *HookStatus) DeepCopyInto(out *HookStatus)

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

Jump to

Keyboard shortcuts

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