v1alpha3

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v1alpha3 contains managed resources for GCP storage services such as GCS buckets. +kubebuilder:object:generate=true +groupName=storage.gcp.crossplane.io +versionName=v1alpha3

Index

Constants

View Source
const (
	Group   = "storage.gcp.crossplane.io"
	Version = "v1alpha3"
)

Package type metadata.

Variables

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

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)
View Source
var (
	BucketKind             = reflect.TypeOf(Bucket{}).Name()
	BucketGroupKind        = schema.GroupKind{Group: Group, Kind: BucketKind}.String()
	BucketKindAPIVersion   = BucketKind + "." + SchemeGroupVersion.String()
	BucketGroupVersionKind = SchemeGroupVersion.WithKind(BucketKind)
)

Bucket type metadata.

Functions

func CopyBucketSpecAttrs

func CopyBucketSpecAttrs(ba *BucketSpecAttrs) *storage.BucketAttrs

CopyBucketSpecAttrs create a copy in storage format

func CopyToACLRule

func CopyToACLRule(ar ACLRule) storage.ACLRule

CopyToACLRule create a copy in storage format

func CopyToACLRules

func CopyToACLRules(r []ACLRule) []storage.ACLRule

CopyToACLRules create a copy in storage format

func CopyToBucketAttrs

func CopyToBucketAttrs(ba *BucketUpdatableAttrs) *storage.BucketAttrs

CopyToBucketAttrs create a copy in storage format

func CopyToBucketEncryption

func CopyToBucketEncryption(e *BucketEncryption) *storage.BucketEncryption

CopyToBucketEncryption create a copy in storage format

func CopyToBucketLogging

func CopyToBucketLogging(l *BucketLogging) *storage.BucketLogging

CopyToBucketLogging create a copy in storage format

func CopyToBucketPolicyOnly

func CopyToBucketPolicyOnly(bp *BucketPolicyOnly) storage.BucketPolicyOnly

CopyToBucketPolicyOnly creates storage equivalent

func CopyToBucketUpdateAttrs

func CopyToBucketUpdateAttrs(ba BucketUpdatableAttrs, labels map[string]string) storage.BucketAttrsToUpdate

CopyToBucketUpdateAttrs create a copy in storage format

func CopyToBucketWebsite

func CopyToBucketWebsite(w *BucketWebsite) *storage.BucketWebsite

CopyToBucketWebsite create a copy in storage format

func CopyToCORS

func CopyToCORS(c CORS) storage.CORS

CopyToCORS create a copy in storage format

func CopyToCORSList

func CopyToCORSList(c []CORS) []storage.CORS

CopyToCORSList create a copy in storage format

func CopyToLifecycle

func CopyToLifecycle(lf Lifecycle) storage.Lifecycle

CopyToLifecycle create a copy in storage format

func CopyToLifecycleCondition

func CopyToLifecycleCondition(lc LifecycleCondition) storage.LifecycleCondition

CopyToLifecycleCondition create a copy in storage format

func CopyToLifecyleAction

func CopyToLifecyleAction(la LifecycleAction) storage.LifecycleAction

CopyToLifecyleAction create a copy in storage format

func CopyToLifecyleRule

func CopyToLifecyleRule(lr LifecycleRule) storage.LifecycleRule

CopyToLifecyleRule create a copy in storage format

func CopyToProjectTeam

func CopyToProjectTeam(pt *ProjectTeam) *storage.ProjectTeam

CopyToProjectTeam create a copy in storage format

func CopyToRetentionPolicy

func CopyToRetentionPolicy(rp *RetentionPolicy) *storage.RetentionPolicy

CopyToRetentionPolicy create a copy in storage format

Types

type ACLRule

type ACLRule struct {
	// Entity refers to a user or group. They are sometimes referred to as grantees.
	// It could be in the form of:
	// "user-<userId>", "user-<email>", "group-<groupId>", "group-<email>",
	// "domain-<domain>" and "project-team-<projectId>".
	//
	// Or one of the predefined constants: AllUsers, AllAuthenticatedUsers.
	Entity string `json:"entity,omitempty"`

	// Role is the access permission for the entity.
	// Valid values are "OWNER", "READER" and "WRITER"
	// +kubebuilder:validation:Enum=OWNER;READER;WRITER
	Role string `json:"role,omitempty"`

	// EntityID is the ID for the entity, if any.
	EntityID string `json:"entityId,omitempty"`

	// The domain associated with the entity, if any.
	Domain string `json:"domain,omitempty"`

	// The email address associated with the entity, if any.
	Email string `json:"email,omitempty"`

	// ProjectTeam that is associated with the entity, if any.
	ProjectTeam *ProjectTeam `json:"projectTeam,omitempty"`
}

ACLRule represents a grant for a role to an entity (user, group or team) for a Google Cloud Storage object or bucket.

func NewACLRule

func NewACLRule(r storage.ACLRule) ACLRule

NewACLRule creates new instance of ACLRule from the storage counterpart

func NewACLRules

func NewACLRules(r []storage.ACLRule) []ACLRule

NewACLRules creates a new instance of ACLRule list from the storage counterpart

func (*ACLRule) DeepCopy

func (in *ACLRule) DeepCopy() *ACLRule

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

func (*ACLRule) DeepCopyInto

func (in *ACLRule) DeepCopyInto(out *ACLRule)

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

type Bucket

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

	Spec   BucketSpec   `json:"spec"`
	Status BucketStatus `json:"status,omitempty"`
}

A Bucket is a managed resource that represents a Google Cloud Storage bucket. +kubebuilder:subresource:status +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +kubebuilder:printcolumn:name="STORAGE_CLASS",type="string",JSONPath=".spec.storageClass" +kubebuilder:printcolumn:name="LOCATION",type="string",JSONPath=".spec.location" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,gcp}

func (*Bucket) DeepCopy

func (in *Bucket) DeepCopy() *Bucket

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

func (*Bucket) DeepCopyInto

func (in *Bucket) DeepCopyInto(out *Bucket)

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

func (*Bucket) DeepCopyObject

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

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

func (*Bucket) GetCondition

func (mg *Bucket) GetCondition(ct xpv1.ConditionType) xpv1.Condition

GetCondition of this Bucket.

func (*Bucket) GetDeletionPolicy

func (mg *Bucket) GetDeletionPolicy() xpv1.DeletionPolicy

GetDeletionPolicy of this Bucket.

func (*Bucket) GetProviderConfigReference

func (mg *Bucket) GetProviderConfigReference() *xpv1.Reference

GetProviderConfigReference of this Bucket.

func (*Bucket) GetProviderReference

func (mg *Bucket) GetProviderReference() *xpv1.Reference

GetProviderReference of this Bucket. Deprecated: Use GetProviderConfigReference.

func (*Bucket) GetPublishConnectionDetailsTo

func (mg *Bucket) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo

GetPublishConnectionDetailsTo of this Bucket.

func (*Bucket) GetWriteConnectionSecretToReference

func (mg *Bucket) GetWriteConnectionSecretToReference() *xpv1.SecretReference

GetWriteConnectionSecretToReference of this Bucket.

func (*Bucket) SetConditions

func (mg *Bucket) SetConditions(c ...xpv1.Condition)

SetConditions of this Bucket.

func (*Bucket) SetDeletionPolicy

func (mg *Bucket) SetDeletionPolicy(r xpv1.DeletionPolicy)

SetDeletionPolicy of this Bucket.

func (*Bucket) SetProviderConfigReference

func (mg *Bucket) SetProviderConfigReference(r *xpv1.Reference)

SetProviderConfigReference of this Bucket.

func (*Bucket) SetProviderReference

func (mg *Bucket) SetProviderReference(r *xpv1.Reference)

SetProviderReference of this Bucket. Deprecated: Use SetProviderConfigReference.

func (*Bucket) SetPublishConnectionDetailsTo

func (mg *Bucket) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo)

SetPublishConnectionDetailsTo of this Bucket.

func (*Bucket) SetWriteConnectionSecretToReference

func (mg *Bucket) SetWriteConnectionSecretToReference(r *xpv1.SecretReference)

SetWriteConnectionSecretToReference of this Bucket.

type BucketEncryption

type BucketEncryption struct {
	// A Cloud KMS key name, in the form
	// projects/P/locations/L/keyRings/R/cryptoKeys/K, that will be used to encrypt
	// objects inserted into this bucket, if no encryption method is specified.
	// The key's location must be the same as the bucket's.
	DefaultKMSKeyName string `json:"defaultKmsKeyName,omitempty"`
}

BucketEncryption is a bucket's encryption configuration.

func NewBucketEncryption

func NewBucketEncryption(e *storage.BucketEncryption) *BucketEncryption

NewBucketEncryption creates a new instance of BucketEncryption from the storage counterpart

func (*BucketEncryption) DeepCopy

func (in *BucketEncryption) DeepCopy() *BucketEncryption

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

func (*BucketEncryption) DeepCopyInto

func (in *BucketEncryption) DeepCopyInto(out *BucketEncryption)

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

type BucketList

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

BucketList contains a list of GCPBuckets

func (*BucketList) DeepCopy

func (in *BucketList) DeepCopy() *BucketList

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

func (*BucketList) DeepCopyInto

func (in *BucketList) DeepCopyInto(out *BucketList)

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

func (*BucketList) DeepCopyObject

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

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

func (*BucketList) GetItems

func (l *BucketList) GetItems() []resource.Managed

GetItems of this BucketList.

type BucketLogging

type BucketLogging struct {
	// The destination bucket where the current bucket's logs
	// should be placed.
	LogBucket string `json:"logBucket,omitempty"`

	// A prefix for log object names.
	LogObjectPrefix string `json:"logObjectPrefix,omitempty"`
}

BucketLogging holds the bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.

func NewBucketLogging

func NewBucketLogging(l *storage.BucketLogging) *BucketLogging

NewBucketLogging creates a new instance of BucketLogging from the storage counterpart

func (*BucketLogging) DeepCopy

func (in *BucketLogging) DeepCopy() *BucketLogging

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

func (*BucketLogging) DeepCopyInto

func (in *BucketLogging) DeepCopyInto(out *BucketLogging)

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

type BucketOutputAttrs

type BucketOutputAttrs struct {
	// BucketPolicyOnly configures access checks to use only bucket-level IAM
	// policies.
	BucketPolicyOnly *BucketPolicyOnly `json:"bucketPolicyOnly,omitempty"`

	// Created is the creation time of the bucket.
	Created *metav1.Time `json:"created,omitempty"`

	// Retention policy enforces a minimum retention time for all objects
	// contained in the bucket. A RetentionPolicy of nil implies the bucket
	// has no minimum data retention.
	//
	// This feature is in private alpha release. It is not currently available to
	// most customers. It might be changed in backwards-incompatible ways and is not
	// subject to any SLA or deprecation policy.
	RetentionPolicy *RetentionPolicyStatus `json:"retentionPolicy,omitempty"`
}

BucketOutputAttrs represent the subset of metadata for a Google Cloud Storage bucket limited to output (read-only) fields.

func NewBucketOutputAttrs

func NewBucketOutputAttrs(attrs *storage.BucketAttrs) BucketOutputAttrs

NewBucketOutputAttrs creates new instance of BucketOutputAttrs from storage.BucketAttrs

func (*BucketOutputAttrs) DeepCopy

func (in *BucketOutputAttrs) DeepCopy() *BucketOutputAttrs

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

func (*BucketOutputAttrs) DeepCopyInto

func (in *BucketOutputAttrs) DeepCopyInto(out *BucketOutputAttrs)

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

type BucketParameters

type BucketParameters struct {
	BucketSpecAttrs `json:",inline"`
}

BucketParameters define the desired state of a Google Cloud Storage Bucket. Most fields map directly to a bucket resource: https://cloud.google.com/storage/docs/json_api/v1/buckets#resource

func (*BucketParameters) DeepCopy

func (in *BucketParameters) DeepCopy() *BucketParameters

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

func (*BucketParameters) DeepCopyInto

func (in *BucketParameters) DeepCopyInto(out *BucketParameters)

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

type BucketPolicyOnly

type BucketPolicyOnly struct {
	// Enabled specifies whether access checks use only bucket-level IAM
	// policies. Enabled may be disabled until the locked time.
	Enabled bool `json:"enabled,omitempty"`
	// LockedTime specifies the deadline for changing Enabled from true to
	// false.
	LockedTime metav1.Time `json:"lockedTime,omitempty"`
}

BucketPolicyOnly configures access checks to use only bucket-level IAM policies.

func NewBucketPolicyOnly

func NewBucketPolicyOnly(bp storage.BucketPolicyOnly) *BucketPolicyOnly

NewBucketPolicyOnly creates new instance based on the storage object

func (*BucketPolicyOnly) DeepCopy

func (in *BucketPolicyOnly) DeepCopy() *BucketPolicyOnly

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

func (*BucketPolicyOnly) DeepCopyInto

func (in *BucketPolicyOnly) DeepCopyInto(out *BucketPolicyOnly)

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

type BucketSpec

type BucketSpec struct {
	xpv1.ResourceSpec `json:",inline"`
	BucketParameters  `json:",inline"`
}

A BucketSpec defines the desired state of a Bucket.

func (*BucketSpec) DeepCopy

func (in *BucketSpec) DeepCopy() *BucketSpec

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

func (*BucketSpec) DeepCopyInto

func (in *BucketSpec) DeepCopyInto(out *BucketSpec)

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

type BucketSpecAttrs

type BucketSpecAttrs struct {
	BucketUpdatableAttrs `json:",inline"`

	// ACL is the list of access control rules on the bucket.
	ACL []ACLRule `json:"acl,omitempty"`

	// DefaultObjectACL is the list of access controls to
	// apply to new objects when no object ACL is provided.
	DefaultObjectACL []ACLRule `json:"defaultObjectAcl,omitempty"`

	// Location is the location of the bucket. It defaults to "US".
	Location string `json:"location,omitempty"`

	// StorageClass is the default storage class of the bucket. This defines
	// how objects in the bucket are stored and determines the SLA
	// and the cost of storage. Typical values are "MULTI_REGIONAL",
	// "REGIONAL", "NEARLINE", "COLDLINE", "STANDARD" and
	// "DURABLE_REDUCED_AVAILABILITY". Defaults to "STANDARD", which
	// is equivalent to "MULTI_REGIONAL" or "REGIONAL" depending on
	// the bucket's location settings.
	// +kubebuilder:validation:Enum=MULTI_REGIONAL;REGIONAL;NEARLINE;COLDLINE;STANDARD;DURABLE_REDUCED_AVAILABILITY
	StorageClass string `json:"storageClass,omitempty"`
}

BucketSpecAttrs represents the full set of metadata for a Google Cloud Storage bucket limited to all input attributes

func NewBucketSpecAttrs

func NewBucketSpecAttrs(ba *storage.BucketAttrs) BucketSpecAttrs

NewBucketSpecAttrs create new instance from storage BuckateAttrs

func (*BucketSpecAttrs) DeepCopy

func (in *BucketSpecAttrs) DeepCopy() *BucketSpecAttrs

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

func (*BucketSpecAttrs) DeepCopyInto

func (in *BucketSpecAttrs) DeepCopyInto(out *BucketSpecAttrs)

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

type BucketStatus

type BucketStatus struct {
	xpv1.ResourceStatus `json:",inline"`

	BucketOutputAttrs `json:"attributes,omitempty"`
}

A BucketStatus represents the observed state of a Bucket.

func (*BucketStatus) DeepCopy

func (in *BucketStatus) DeepCopy() *BucketStatus

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

func (*BucketStatus) DeepCopyInto

func (in *BucketStatus) DeepCopyInto(out *BucketStatus)

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

type BucketUpdatableAttrs

type BucketUpdatableAttrs struct {
	// BucketPolicyOnly configures access checks to use only bucket-level IAM
	// policies.
	BucketPolicyOnly *BucketPolicyOnly `json:"bucketPolicyOnly,omitempty"`

	// The bucket's Cross-Origin Resource Sharing (CORS) configuration.
	CORS []CORS `json:"cors,omitempty"`

	// DefaultEventBasedHold is the default value for event-based hold on
	// newly created objects in this bucket. It defaults to false.
	DefaultEventBasedHold bool `json:"defaultEventBasedHold,omitempty"`

	// The encryption configuration used by default for newly inserted objects.
	Encryption *BucketEncryption `json:"encryption,omitempty"`

	// Labels are the bucket's labels.
	Labels map[string]string `json:"labels,omitempty"`

	// Lifecycle is the lifecycle configuration for objects in the bucket.
	Lifecycle Lifecycle `json:"lifecycle,omitempty"`

	// The logging configuration.
	Logging *BucketLogging `json:"logging,omitempty"`

	// If not empty, applies a predefined set of access controls. It should be set
	// only when creating a bucket.
	// It is always empty for BucketAttrs returned from the service.
	// See https://cloud.google.com/storage/docs/json_api/v1/buckets/insert
	// for valid values.
	PredefinedACL string `json:"predefinedAcl,omitempty"`

	// If not empty, applies a predefined set of default object access controls.
	// It should be set only when creating a bucket.
	// It is always empty for BucketAttrs returned from the service.
	// See https://cloud.google.com/storage/docs/json_api/v1/buckets/insert
	// for valid values.
	PredefinedDefaultObjectACL string `json:"predefinedDefaultObjectAcl,omitempty"`

	// RequesterPays reports whether the bucket is a Requester Pays bucket.
	// Clients performing operations on Requester Pays buckets must provide
	// a user project (see BucketHandle.UserProject), which will be billed
	// for the operations.
	RequesterPays bool `json:"requesterPays,omitempty"`

	// Retention policy enforces a minimum retention time for all objects
	// contained in the bucket. A RetentionPolicy of nil implies the bucket
	// has no minimum data retention.
	//
	// This feature is in private alpha release. It is not currently available to
	// most customers. It might be changed in backwards-incompatible ways and is not
	// subject to any SLA or deprecation policy.
	RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"`

	// VersioningEnabled reports whether this bucket has versioning enabled.
	VersioningEnabled bool `json:"versioningEnabled,omitempty"`

	// The website configuration.
	Website *BucketWebsite `json:"website,omitempty"`
}

BucketUpdatableAttrs represents the subset of parameters of a Google Cloud Storage bucket that may be updated.

func NewBucketUpdatableAttrs

func NewBucketUpdatableAttrs(ba *storage.BucketAttrs) *BucketUpdatableAttrs

NewBucketUpdatableAttrs creates a new instance of BucketUpdatableAttrs from the storage BucketAttrs

func (*BucketUpdatableAttrs) DeepCopy

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

func (*BucketUpdatableAttrs) DeepCopyInto

func (in *BucketUpdatableAttrs) DeepCopyInto(out *BucketUpdatableAttrs)

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

type BucketWebsite

type BucketWebsite struct {
	// If the requested object path is missing, the service will ensure the path has
	// a trailing '/', append this suffix, and attempt to retrieve the resulting
	// object. This allows the creation of index.html objects to represent directory
	// pages.
	MainPageSuffix string `json:"mainPageSuffix,omitempty"`

	// If the requested object path is missing, and any mainPageSuffix object is
	// missing, if applicable, the service will return the named object from this
	// bucket as the content for a 404 Not Found result.
	NotFoundPage string `json:"notFoundPage,omitempty"`
}

BucketWebsite holds the bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See https://cloud.google.com/storage/docs/static-website for more information.

func NewBucketWebsite

func NewBucketWebsite(w *storage.BucketWebsite) *BucketWebsite

NewBucketWebsite creates a new instance of BucketWebsite from the storage counterpart

func (*BucketWebsite) DeepCopy

func (in *BucketWebsite) DeepCopy() *BucketWebsite

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

func (*BucketWebsite) DeepCopyInto

func (in *BucketWebsite) DeepCopyInto(out *BucketWebsite)

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

type CORS

type CORS struct {
	// MaxAge is the value to return in the Access-Control-Max-Age
	// header used in preflight responses.
	MaxAge metav1.Duration `json:"maxAge,omitempty"`

	// Methods is the list of HTTP methods on which to include CORS response
	// headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list
	// of methods, and means "any method".
	Methods []string `json:"methods,omitempty"`

	// Origins is the list of Origins eligible to receive CORS response
	// headers. Note: "*" is permitted in the list of origins, and means
	// "any Origin".
	Origins []string `json:"origins,omitempty"`

	// ResponseHeaders is the list of HTTP headers other than the simple
	// response headers to give permission for the user-agent to share
	// across domains.
	ResponseHeaders []string `json:"responseHeaders,omitempty"`
}

CORS is the bucket's Cross-Origin Resource Sharing (CORS) configuration.

func NewCORS

func NewCORS(c storage.CORS) CORS

NewCORS creates a new instance of CORS from the storage counterpart

func NewCORSList

func NewCORSList(c []storage.CORS) []CORS

NewCORSList creates a new instance of CORS list from the storage counterpart

func (*CORS) DeepCopy

func (in *CORS) DeepCopy() *CORS

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

func (*CORS) DeepCopyInto

func (in *CORS) DeepCopyInto(out *CORS)

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

type Lifecycle

type Lifecycle struct {
	Rules []LifecycleRule `json:"rules,omitempty"`
}

Lifecycle is the lifecycle configuration for objects in the bucket.

func NewLifecycle

func NewLifecycle(lf storage.Lifecycle) *Lifecycle

NewLifecycle creates a new instance of Lifecycle from the storage counterpart

func (*Lifecycle) DeepCopy

func (in *Lifecycle) DeepCopy() *Lifecycle

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

func (*Lifecycle) DeepCopyInto

func (in *Lifecycle) DeepCopyInto(out *Lifecycle)

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

type LifecycleAction

type LifecycleAction struct {
	// StorageClass is the storage class to set on matching objects if the Action
	// is "SetStorageClass".
	StorageClass string `json:"storageClass,omitempty"`

	// Type is the type of action to take on matching objects.
	//
	// Acceptable values are "Delete" to delete matching objects and
	// "SetStorageClass" to set the storage class defined in StorageClass on
	// matching objects.
	Type string `json:"type,omitempty"`
}

LifecycleAction is a lifecycle configuration action.

func NewLifecyleAction

func NewLifecyleAction(la storage.LifecycleAction) LifecycleAction

NewLifecyleAction creates a new instance of LifecycleAction from the storage counterpart

func (*LifecycleAction) DeepCopy

func (in *LifecycleAction) DeepCopy() *LifecycleAction

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

func (*LifecycleAction) DeepCopyInto

func (in *LifecycleAction) DeepCopyInto(out *LifecycleAction)

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

type LifecycleCondition

type LifecycleCondition struct {
	// AgeInDays is the age of the object in days.
	AgeInDays int64 `json:"ageInDays,omitempty"`

	// CreatedBefore is the time the object was created.
	//
	// This condition is satisfied when an object is created before midnight of
	// the specified date in UTC.
	// +optional
	CreatedBefore *metav1.Time `json:"createdBefore,omitempty"`

	// Liveness specifies the object's liveness. Relevant only for versioned objects
	Liveness storage.Liveness `json:"liveness,omitempty"`

	// MatchesStorageClasses is the condition matching the object's storage
	// class.
	//
	// Values include "MULTI_REGIONAL", "REGIONAL", "NEARLINE", "COLDLINE",
	// "STANDARD", and "DURABLE_REDUCED_AVAILABILITY".
	MatchesStorageClasses []string `json:"matchesStorageClasses,omitempty"`

	// NumNewerVersions is the condition matching objects with a number of newer versions.
	//
	// If the value is N, this condition is satisfied when there are at least N
	// versions (including the live version) newer than this version of the
	// object.
	NumNewerVersions int64 `json:"numNewerVersions,omitempty"`
}

LifecycleCondition is a set of conditions used to match objects and take an action automatically. All configured conditions must be met for the associated action to be taken.

func NewLifecycleCondition

func NewLifecycleCondition(lc storage.LifecycleCondition) LifecycleCondition

NewLifecycleCondition creates a new instance of LifecycleCondition from the storage counterpart

func (*LifecycleCondition) DeepCopy

func (in *LifecycleCondition) DeepCopy() *LifecycleCondition

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

func (*LifecycleCondition) DeepCopyInto

func (in *LifecycleCondition) DeepCopyInto(out *LifecycleCondition)

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

type LifecycleRule

type LifecycleRule struct {
	// Action is the action to take when all of the associated conditions are
	// met.
	Action LifecycleAction `json:"action,omitempty"`

	// Condition is the set of conditions that must be met for the associated
	// action to be taken.
	Condition LifecycleCondition `json:"condition,omitempty"`
}

LifecycleRule is a lifecycle configuration rule.

When all the configured conditions are met by an object in the bucket, the configured action will automatically be taken on that object.

func NewLifecycleRule

func NewLifecycleRule(lr storage.LifecycleRule) LifecycleRule

NewLifecycleRule creates a new instance of LifecycleRule from the storage counterpart

func (*LifecycleRule) DeepCopy

func (in *LifecycleRule) DeepCopy() *LifecycleRule

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

func (*LifecycleRule) DeepCopyInto

func (in *LifecycleRule) DeepCopyInto(out *LifecycleRule)

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

type ProjectTeam

type ProjectTeam struct {
	// ProjectNumber is the number of the project.
	ProjectNumber string `json:"projectNumber,omitempty"`

	// The team. Acceptable values are: "editors", "owners" or "viewers"
	// +kubebuilder:validation:Enum=editors;owners;viewers
	Team string `json:"team,omitempty"`
}

ProjectTeam is the project team associated with the entity, if any.

func NewProjectTeam

func NewProjectTeam(pt *storage.ProjectTeam) *ProjectTeam

NewProjectTeam creates new instance of ProjectTeam from the storage counterpart

func (*ProjectTeam) DeepCopy

func (in *ProjectTeam) DeepCopy() *ProjectTeam

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

func (*ProjectTeam) DeepCopyInto

func (in *ProjectTeam) DeepCopyInto(out *ProjectTeam)

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

type RetentionPolicy

type RetentionPolicy struct {
	// RetentionPeriod specifies the duration value in seconds that objects
	// need to be retained. Retention duration must be greater than zero and
	// less than 100 years. Note that enforcement of retention periods less
	// than a day is not guaranteed. Such periods should only be used for
	// testing purposes.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=3155673600
	RetentionPeriodSeconds int `json:"retentionPeriodSeconds,omitempty"`
}

RetentionPolicy enforces a minimum retention time for all objects contained in the bucket.

Any attempt to overwrite or delete objects younger than the retention period will result in an error. An unlocked retention policy can be modified or removed from the bucket via the Update method. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket.

This feature is in private alpha release. It is not currently available to most customers. It might be changed in backwards-incompatible ways and is not subject to any SLA or deprecation policy.

func NewRetentionPolicy

func NewRetentionPolicy(rp *storage.RetentionPolicy) *RetentionPolicy

NewRetentionPolicy creates a new instance of RetentionPolicy from the storage counterpart

func (*RetentionPolicy) DeepCopy

func (in *RetentionPolicy) DeepCopy() *RetentionPolicy

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

func (*RetentionPolicy) DeepCopyInto

func (in *RetentionPolicy) DeepCopyInto(out *RetentionPolicy)

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

type RetentionPolicyStatus

type RetentionPolicyStatus struct {
	// EffectiveTime is the time from which the policy was enforced and
	// effective.
	EffectiveTime metav1.Time `json:"effectiveTime,omitempty"`

	// IsLocked describes whether the bucket is locked. Once locked, an object
	// retention policy cannot be modified.
	IsLocked bool `json:"isLocked,omitempty"`
}

RetentionPolicyStatus output component of storage.RetentionPolicy

func NewRetentionPolicyStatus

func NewRetentionPolicyStatus(r *storage.RetentionPolicy) *RetentionPolicyStatus

NewRetentionPolicyStatus creates a new instance of RetentionPolicy from the storage counterpart

func (*RetentionPolicyStatus) DeepCopy

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

func (*RetentionPolicyStatus) DeepCopyInto

func (in *RetentionPolicyStatus) DeepCopyInto(out *RetentionPolicyStatus)

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