Documentation ¶
Index ¶
Constants ¶
View Source
const ErrCodeNoSuchBucket = "NoSuchBucket"
ErrCodeNoSuchBucket is the error code "NoSuchBucket" returned by SDK
Variables ¶
This section is empty.
Functions ¶
func GenerateObservation ¶
func GenerateObservation(r sdk.GetBucketInfoResult) v1alpha1.BucketObservation
GenerateObservation generates BucketObservation from bucket information
func IsNotFoundError ¶
IsNotFoundError checks whether the error is an NotFound error
func IsUpdateToDate ¶
func IsUpdateToDate(cr *v1alpha1.Bucket, bucket *sdk.GetBucketInfoResult) bool
IsUpdateToDate checks whether cr is up to date
Types ¶
type ClientInterface ¶
type ClientInterface interface { Describe(name string) (*sdk.GetBucketInfoResult, error) Create(name string, bucket v1alpha1.BucketParameter) error Update(name string, aclStr string) error Delete(name string) error }
ClientInterface will help fakeOSSClient in unit tests
type SDKClient ¶
SDKClient is the SDK client for Bucket
func NewClient ¶
func NewClient(ctx context.Context, endpoint string, accessKeyID string, accessKeySecret string, stsToken string) (*SDKClient, error)
NewClient will create OSS client
func (*SDKClient) Create ¶
func (c *SDKClient) Create(name string, bucket v1alpha1.BucketParameter) error
Create creates Bucket bucket
Click to show internal directories.
Click to hide internal directories.