v1alpha1

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 11 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 (
	// StorageConditionReady has status True when the Storage is ready to send events.
	StorageConditionReady = apis.ConditionReady

	// PullSubscriptionReady has status True when the underlying PullSubscription is ready
	PullSubscriptionReady apis.ConditionType = "PullSubscriptionReady"

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

	// GCSReady has status True when GCS has been configured properly to send Notification events
	GCSReady apis.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 Storage added in v0.8.1

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

	Spec   StorageSpec   `json:"spec"`
	Status StorageStatus `json:"status"`
}

Storage is a specification for a Google Cloud Storage Source resource

func (*Storage) DeepCopy added in v0.8.1

func (in *Storage) DeepCopy() *Storage

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

func (*Storage) DeepCopyInto added in v0.8.1

func (in *Storage) DeepCopyInto(out *Storage)

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

func (*Storage) DeepCopyObject added in v0.8.1

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

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

func (*Storage) GetGroupVersionKind added in v0.8.1

func (storage *Storage) GetGroupVersionKind() schema.GroupVersionKind

func (*Storage) SetDefaults added in v0.8.1

func (g *Storage) SetDefaults(ctx context.Context)

func (*Storage) Validate added in v0.8.1

func (current *Storage) Validate(ctx context.Context) *apis.FieldError

type StorageList added in v0.8.1

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

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

StorageList is a list of Storage resources

func (*StorageList) DeepCopy added in v0.8.1

func (in *StorageList) DeepCopy() *StorageList

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

func (*StorageList) DeepCopyInto added in v0.8.1

func (in *StorageList) DeepCopyInto(out *StorageList)

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

func (*StorageList) DeepCopyObject added in v0.8.1

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

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

type StorageSpec added in v0.8.1

type StorageSpec struct {
	// GCSSecret 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).
	// +optional
	GCSSecret corev1.SecretKeySelector `json:"gcsSecret"`

	// PullSubscriptionSecret is the credential to use for the GCP PubSub Subscription.
	// It is used for the PullSubscription that is used to deliver events from GCS.
	// 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 GCSSecret from above.
	// +optional
	PullSubscriptionSecret *corev1.SecretKeySelector `json:"pullSubscriptionSecret,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"`

	// Project is the ID of the Google Cloud Project that the Bucket being
	// subscribed to exists in.
	Project string `json:"project,omitempty"`

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

	// EventTypes to subscribe to. If unspecified, then subscribe to all events.
	// +optional
	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
	CloudEventOverrides *duckv1beta1.CloudEventOverrides `json:"ceOverrides,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.
	Sink corev1.ObjectReference `json:"sink"`
}

StorageSpec is the spec for a Storage resource

func (*StorageSpec) DeepCopy added in v0.8.1

func (in *StorageSpec) DeepCopy() *StorageSpec

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

func (*StorageSpec) DeepCopyInto added in v0.8.1

func (in *StorageSpec) DeepCopyInto(out *StorageSpec)

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

func (*StorageSpec) SetDefaults added in v0.8.1

func (gs *StorageSpec) SetDefaults(ctx context.Context)

func (*StorageSpec) Validate added in v0.8.1

func (current *StorageSpec) Validate(ctx context.Context) *apis.FieldError

type StorageStatus added in v0.8.1

type StorageStatus struct {
	// inherits duck/v1beta1 Status, 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.
	duckv1beta1.Status `json:",inline"`

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

	// ProjectID is the resolved project ID in use by Storage.
	// +optional
	ProjectID string `json:"projectId,omitempty"`

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

	// SubscriptionID is the created subscription ID used by Storage.
	// +optional
	SubscriptionID string `json:"subscriptionId,omitempty"`

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

StorageStatus is the status for a GCS resource

func (*StorageStatus) DeepCopy added in v0.8.1

func (in *StorageStatus) DeepCopy() *StorageStatus

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

func (*StorageStatus) DeepCopyInto added in v0.8.1

func (in *StorageStatus) DeepCopyInto(out *StorageStatus)

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

func (*StorageStatus) GetCondition added in v0.8.1

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

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

func (*StorageStatus) InitializeConditions added in v0.8.1

func (s *StorageStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*StorageStatus) IsReady added in v0.8.1

func (s *StorageStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*StorageStatus) MarkGCSNotReady added in v0.8.1

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

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

func (*StorageStatus) MarkGCSReady added in v0.8.1

func (s *StorageStatus) MarkGCSReady()

func (*StorageStatus) MarkPubSubTopicNotReady added in v0.8.1

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

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

func (*StorageStatus) MarkPubSubTopicReady added in v0.8.1

func (s *StorageStatus) MarkPubSubTopicReady()

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

func (*StorageStatus) MarkPullSubscriptionNotReady added in v0.8.1

func (s *StorageStatus) MarkPullSubscriptionNotReady(reason, messageFormat string, messageA ...interface{})

MarkPullSubscriptionNotReady sets the condition that the underlying PullSubscription source is not ready and why

func (*StorageStatus) MarkPullSubscriptionReady added in v0.8.1

func (s *StorageStatus) MarkPullSubscriptionReady()

MarkPullSubscriptionReady sets the condition that the underlying PubSub source is ready

Jump to

Keyboard shortcuts

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