v1alpha1

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=knative.dev/eventing-contrib/couchdb/source/pkg/apis/sources +k8s:defaulter-gen=TypeMeta +groupName=sources.knative.dev

Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=sources.knative.dev

Index

Constants

View Source
const (
	// CouchDbConditionReady has status True when the CouchDbSource is ready to send events.
	CouchDbConditionReady = apis.ConditionReady

	// CouchDbConditionSinkProvided has status True when the CouchDbSource has been configured with a sink target.
	CouchDbConditionSinkProvided apis.ConditionType = "SinkProvided"

	// CouchDbConditionDeployed has status True when the CouchDbSource has had it's deployment created.
	CouchDbConditionDeployed apis.ConditionType = "Deployed"
)
View Source
const (
	// CouchDbSourceUpdateEventType is the CouchDbSource CloudEvent type for update.
	CouchDbSourceUpdateEventType = "org.apache.couchdb.document.update"

	// CouchDbSourceDeleteEventType is the CouchDbSource CloudEvent type for deletion.
	CouchDbSourceDeleteEventType = "org.apache.couchdb.document.delete"

	// FeedNormal corresponds to the "normal" feed. The connection to the server
	// is closed after reporting changes.
	FeedNormal = FeedType("normal")

	// FeedContinuous corresponds to the "continuous" feed. The connection to the
	// server stays open after reporting changes.
	FeedContinuous = FeedType("continuous")
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: sources.GroupName, Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)

Functions

func Kind added in v0.14.0

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 CouchDbSource

type CouchDbSource struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CouchDbSourceSpec   `json:"spec,omitempty"`
	Status CouchDbSourceStatus `json:"status,omitempty"`
}

CouchDbSource is the Schema for the githubsources API +k8s:openapi-gen=true

func (*CouchDbSource) DeepCopy

func (in *CouchDbSource) DeepCopy() *CouchDbSource

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

func (*CouchDbSource) DeepCopyInto

func (in *CouchDbSource) DeepCopyInto(out *CouchDbSource)

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

func (*CouchDbSource) DeepCopyObject

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

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

func (*CouchDbSource) GetGroupVersionKind

func (s *CouchDbSource) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*CouchDbSource) SetDefaults

func (c *CouchDbSource) SetDefaults(ctx context.Context)

func (*CouchDbSource) Validate

func (c *CouchDbSource) Validate(ctx context.Context) *apis.FieldError

type CouchDbSourceList

type CouchDbSourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CouchDbSource `json:"items"`
}

CouchDbSourceList contains a list of CouchDbSource

func (*CouchDbSourceList) DeepCopy

func (in *CouchDbSourceList) DeepCopy() *CouchDbSourceList

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

func (*CouchDbSourceList) DeepCopyInto

func (in *CouchDbSourceList) DeepCopyInto(out *CouchDbSourceList)

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

func (*CouchDbSourceList) DeepCopyObject

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

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

type CouchDbSourceSpec

type CouchDbSourceSpec struct {
	// ServiceAccountName holds the name of the Kubernetes service account
	// as which the underlying K8s resources should be run. If unspecified
	// this will default to the "default" service account for the namespace
	// in which the CouchDbSource exists.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// CouchDbCredentials is the credential to use to access CouchDb.
	// Must be a secret. Only Name and Namespace are used.
	CouchDbCredentials corev1.ObjectReference `json:"credentials,omitempty"`

	// Feed changes how CouchDB sends the response.
	// More information: https://docs.couchdb.org/en/stable/api/database/changes.html#changes-feeds
	Feed FeedType `json:"feed"`

	// Database is the database to watch for changes
	Database string `json:"database"`

	// Sink is a reference to an object that will resolve to a domain name to use as the sink.
	// +optional
	Sink *duckv1.Destination `json:"sink,omitempty"`
}

CouchDbSourceSpec defines the desired state of CouchDbSource

func (*CouchDbSourceSpec) DeepCopy

func (in *CouchDbSourceSpec) DeepCopy() *CouchDbSourceSpec

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

func (*CouchDbSourceSpec) DeepCopyInto

func (in *CouchDbSourceSpec) DeepCopyInto(out *CouchDbSourceSpec)

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

func (*CouchDbSourceSpec) SetDefaults

func (cs *CouchDbSourceSpec) SetDefaults(ctx context.Context)

func (*CouchDbSourceSpec) Validate

func (cs *CouchDbSourceSpec) Validate(ctx context.Context) *apis.FieldError

type CouchDbSourceStatus

type CouchDbSourceStatus struct {
	// inherits duck/v1 SourceStatus, which currently provides:
	// * ObservedGeneration - the 'Generation' of the Service that was last
	//   processed by the controller.
	// * Conditions - the latest available observations of a resource's current
	//   state.
	// * SinkURI - the current active sink URI that has been configured for the
	//   Source.
	duckv1.SourceStatus `json:",inline"`
}

CouchDbSourceStatus defines the observed state of CouchDbSource

func (*CouchDbSourceStatus) DeepCopy

func (in *CouchDbSourceStatus) DeepCopy() *CouchDbSourceStatus

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

func (*CouchDbSourceStatus) DeepCopyInto

func (in *CouchDbSourceStatus) DeepCopyInto(out *CouchDbSourceStatus)

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

func (*CouchDbSourceStatus) GetCondition

func (s *CouchDbSourceStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition currently associated with the given type, or nil.

func (*CouchDbSourceStatus) InitializeConditions

func (s *CouchDbSourceStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*CouchDbSourceStatus) IsReady

func (s *CouchDbSourceStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*CouchDbSourceStatus) MarkNoSink

func (s *CouchDbSourceStatus) MarkNoSink(reason, messageFormat string, messageA ...interface{})

MarkNoSink sets the condition that the source does not have a sink configured.

func (*CouchDbSourceStatus) MarkSink

func (s *CouchDbSourceStatus) MarkSink(uri *apis.URL)

MarkSink sets the condition that the source has a sink configured.

func (*CouchDbSourceStatus) PropagateDeploymentAvailability

func (s *CouchDbSourceStatus) PropagateDeploymentAvailability(d *appsv1.Deployment)

PropagateDeploymentAvailability uses the availability of the provided Deployment to determine if CouchDbConditionDeployed should be marked as true or false.

type FeedType

type FeedType string

FeedType is the type of Feed

Jump to

Keyboard shortcuts

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