bucket

package
v0.0.0-...-a87ad93 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new Bucket Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

func ContainsFinalizer

func ContainsFinalizer(instance *ibmcloudv1alpha1.Bucket) bool

ContainsFinalizer check for Finalizer

func DeleteFinalizer

func DeleteFinalizer(instance *ibmcloudv1alpha1.Bucket) []string

DeleteFinalizer delete streams finalizer

func GetCloudEndpoint

func GetCloudEndpoint(region string) (string, error)

GetCloudEndpoint : Return endpoint URL based on region

func InitImmutable

func InitImmutable(bucket *ibmcloudv1alpha1.Bucket) map[string]string

InitImmutable init the immutable checking

Types

type CORSConfiguration

type CORSConfiguration struct {
	CORSRule ConfigCORSRule `xml:"CORSRule"`
}

CORSConfiguration : CORS rules

type ConfigCORSRule

type ConfigCORSRule struct {
	AllowedOrigin string   `xml:"AllowedOrigin"`
	AllowedHeader string   `xml:"AllowedHeader"`
	AllowedMethod []string `xml:"AllowedMethod"`
}

ConfigCORSRule : CORS Configuration

type CreateBucketConfiguration

type CreateBucketConfiguration struct {
	LocationConstraint string `xml:"LocationConstraint"`
}

CreateBucketConfiguration : The postbody for the Bucket creation

type Delete

type Delete struct {
	Object []Object `xml:"Object"`
}

Delete is used to realize the tobe Deleted Object in a Bucket

type Endpoints

type Endpoints struct {
	IdentifyEndpoints struct {
		IAMToken  string `json:"iam_token"`
		IAMPolicy string `json:"iam_policy"`
	} `json:"identity-endpoints"`
	ServiceEndpoints struct {
		CrossRegion map[string]interface{} `json:"cross-region"`
		Regional    map[string]interface{} `json:"regional"`
		SingleSite  map[string]interface{} `json:"single_site"`
	} `json:"service-endpoints"`
}

Endpoints is use to get the endpoint base on location and resilience

type Error

type Error struct {
	Code           string `xml:"Code"`
	Message        string `xml:"Message"`
	Resource       string `xml:"Resource"`
	RequestID      string `xml:"RequestId"`
	HTTPStatusCode int    `xml:"httpStatusCode"`
}
 type retentionFailError struct {
	thisError Error `xml:"Error"`
}

type KeyVal

type KeyVal struct {
	Name  string
	Value string
}

KeyVal is used to keep KeyVal of needed info

type ListBucketResult

type ListBucketResult struct {
	Name      string `xml:"Name"`
	Prefix    string `xml:"Prefix"`
	Marker    string `xml:"Marker"`
	MaxKeys   int    `xml:"MaxKeys"`
	Delimiter string `xml:"Delimiter"`
	Contents  []struct {
		Key          string `xml:"Key"`
		LastModified string `xml:"LastModified"`
		ETag         string `xml:"ETag"`
		Size         int    `xml:"Size"`
		Owner        struct {
			ID          string `xml:"ID"`
			DisplayName string `xml:"DisplayName"`
		} `xml:"Owner"`
		StorageClass string `xml:"StorageClass"`
	}
	IsTruncated bool `xml:"IsTruncated"`
}

ListBucketResult is used to realize Objects in a Bucket

type Object

type Object struct {
	Key string `xml:"Key"`
}

Object is used to keep key info

type ProtectionConfiguration

type ProtectionConfiguration struct {
	Status           string       `xml:"Status"`
	MinimumRetention RetentionDay `xml:"MinimumRetention"`
	MaximumRetention RetentionDay `xml:"MaximumRetention"`
	DefaultRetention RetentionDay `xml:"DefaultRetention"`
}

ProtectionConfiguration : Retention Policy

type ReconcileBucket

type ReconcileBucket struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileBucket reconciles a Bucket object

func (*ReconcileBucket) Reconcile

func (r *ReconcileBucket) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Bucket object and makes changes based on the state read and what is in the Bucket.Spec Automatically generate RBAC rules to allow the Controller to read and write Deployments +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=buckets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=buckets/status,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=,resources=configmaps,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=buckets/finalizers,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=bindings,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=ibmcloud.ibm.com,resources=services,verbs=get;list;watch;create;update;patch;delete

type RetentionDay

type RetentionDay struct {
	Days int `xml:"Days"`
}

RetentionDay : Retention Policy

type WaitItem

type WaitItem struct {
	// contains filtered or unexported fields
}

WaitItem wait for Binding Object to be ready

type WaitQLock

type WaitQLock struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

WaitQLock lock for WaitItem Queue

Jump to

Keyboard shortcuts

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