v1alpha1

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the events v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/google/knative-gcp/pkg/apis/events +k8s:defaulter-gen=TypeMeta +groupName=events.cloud.run

Index

Constants

View Source
const (
	// GCSConditionReady has status True when the GCS is ready to send events.
	GCSConditionReady = duckv1alpha1.ConditionReady

	// PubSubSourceReady has status True when the underlying GCP PubSub Source is ready
	PubSubSourceReady duckv1alpha1.ConditionType = "PubSubSourceReady"

	// PubSubTopicReady has status True when the underlying GCP PubSub topic is ready
	PubSubTopicReady duckv1alpha1.ConditionType = "PubSubTopicReady"

	// GCSReady has status True when GCS has been configured properly to send Notification events
	GCSReady duckv1alpha1.ConditionType = "GCSReady"
)

Variables

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

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 GCS

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

	Spec   GCSSpec   `json:"spec"`
	Status GCSStatus `json:"status"`
}

GCS is a specification for a GCS Source resource

func (*GCS) DeepCopy

func (in *GCS) DeepCopy() *GCS

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

func (*GCS) DeepCopyInto

func (in *GCS) DeepCopyInto(out *GCS)

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

func (*GCS) DeepCopyObject

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

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

func (*GCS) GetGroupVersionKind

func (gcsSource *GCS) GetGroupVersionKind() schema.GroupVersionKind

type GCSList

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

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

GCSList is a list of GCS resources

func (*GCSList) DeepCopy

func (in *GCSList) DeepCopy() *GCSList

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

func (*GCSList) DeepCopyInto

func (in *GCSList) DeepCopyInto(out *GCSList)

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

func (*GCSList) DeepCopyObject

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

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

type GCSSpec

type GCSSpec struct {
	// GCSCredsSecret is the credential to use to create the Notification on the GCS bucket.
	// The value of the secret entry must be a service account key in the JSON format (see
	// https://cloud.google.com/iam/docs/creating-managing-service-account-keys).
	GCSCredsSecret corev1.SecretKeySelector `json:"gcsCredsSecret"`

	// GcpCredsSecret is the credential to use to poll the GCP PubSub Subscription. It is not used
	// to create or delete the Subscription, only to poll it. The value of the secret entry must be
	// a service account key in the JSON format (see
	// https://cloud.google.com/iam/docs/creating-managing-service-account-keys).
	// If omitted, uses GCSCredsSecret from above
	// +optional
	GcpCredsSecret *corev1.SecretKeySelector `json:"gcpCredsSecret,omitempty"`

	// 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 GCS exists.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// GoogleCloudProject is the ID of the Google Cloud Project that the PubSub Topic exists in.
	GoogleCloudProject string `json:"googleCloudProject,omitempty"`

	// Bucket to subscribe to
	Bucket string `json:"bucket"`

	// EventTypes to subscribe to
	EventTypes []string `json:"eventTypes,omitempty"`

	// ObjectNamePrefix limits the notifications to objects with this prefix
	// +optional
	ObjectNamePrefix string `json:"objectNamePrefix,omitempty"`

	// CustomAttributes is the optional list of additional attributes to attach to each Cloud PubSub
	// message published for this notification subscription.
	// +optional
	CustomAttributes map[string]string `json:"customAttributes,omitempty"`

	// PayloadFormat specifies the contents of the message payload.
	// See https://cloud.google.com/storage/docs/pubsub-notifications#payload.
	// +optional
	PayloadFormat string `json:"payloadFormat,omitempty"`

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

GCSSpec is the spec for a GCS resource

func (*GCSSpec) DeepCopy

func (in *GCSSpec) DeepCopy() *GCSSpec

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

func (*GCSSpec) DeepCopyInto

func (in *GCSSpec) DeepCopyInto(out *GCSSpec)

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

type GCSStatus

type GCSStatus struct {
	// Conditions holds the state of a source at a point in time.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions duckv1alpha1.Conditions `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`

	// TODO: add conditions and other stuff here...
	// NotificationID is the ID that GCS identifies this notification as.
	// +optional
	NotificationID string `json:"notificationID,omitempty"`

	// Topic where the notifications are sent to.
	// +optional
	Topic string `json:"topic,omitempty"`

	// SinkURI is the current active sink URI that has been configured for the GCS.
	// +optional
	SinkURI string `json:"sinkUri,omitempty"`
}

GCSStatus is the status for a GCS resource

func (*GCSStatus) DeepCopy

func (in *GCSStatus) DeepCopy() *GCSStatus

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

func (*GCSStatus) DeepCopyInto

func (in *GCSStatus) DeepCopyInto(out *GCSStatus)

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

func (*GCSStatus) GetCondition

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

func (*GCSStatus) InitializeConditions

func (s *GCSStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*GCSStatus) IsReady

func (s *GCSStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*GCSStatus) MarkGCSNotReady

func (s *GCSStatus) MarkGCSNotReady(reason, messageFormat string, messageA ...interface{})

MarkGCSNotReady sets the condition that the GCS has been configured to send Notifications

func (*GCSStatus) MarkGCSReady

func (s *GCSStatus) MarkGCSReady()

func (*GCSStatus) MarkPubSubSourceNotReady

func (s *GCSStatus) MarkPubSubSourceNotReady(reason, messageFormat string, messageA ...interface{})

MarkPubSubNotSourceReady sets the condition that the underlying PubSub source is not ready and why

func (*GCSStatus) MarkPubSubSourceReady

func (s *GCSStatus) MarkPubSubSourceReady()

MarkPubSubSourceReady sets the condition that the underlying PubSub source is ready

func (*GCSStatus) MarkPubSubTopicNotReady

func (s *GCSStatus) MarkPubSubTopicNotReady(reason, messageFormat string, messageA ...interface{})

MarkPubSubTopicNotReady sets the condition that the PubSub topic was not created and why

func (*GCSStatus) MarkPubSubTopicReady

func (s *GCSStatus) MarkPubSubTopicReady()

MarkPubSubTopicReady sets the condition that the underlying PubSub topic was created successfully

Jump to

Keyboard shortcuts

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