Documentation ¶
Index ¶
- Constants
- type AccessPolicy
- type AccessPolicyFactory
- type COSSession
- func (s *COSSession) CheckBucketAccess(bucket string) error
- func (s *COSSession) CheckObjectPathExistence(bucket, objectpath string) (bool, error)
- func (s *COSSession) CreateBucket(bucket, locationConstraint string, kpRootKeyCrn string) (string, error)
- func (s *COSSession) DeleteBucket(bucket string) error
- type COSSessionFactory
- type ObjectStorageCredentials
- type ObjectStorageSession
- type ObjectStorageSessionFactory
- type ResourceConfigurationV1
- type UpdateAPFactory
- type UpdateAPObj
- func (c *UpdateAPObj) UpdateAccessPolicy(allowedIps, apiKey, bucketName string, rcc ResourceConfigurationV1) error
- func (uc *UpdateAPObj) UpdateBucketConfig(service *rc.ResourceConfigurationV1, options *rc.UpdateBucketConfigOptions) (res *core.DetailedResponse, err error)
- func (c *UpdateAPObj) UpdateQuotaLimit(quota int64, apiKey, bucketName, osEndpoint, iamEndpoint string, ...) error
Constants ¶
const IAMEPForVPC = "https://private.iam.cloud.ibm.com/identity/token"
const (
KPEncryptionAlgorithm = "AES256" // https://github.com/IBM/ibm-cos-sdk-go/blob/master/service/s3/api.go#L8509-L8511
)
const Private = "private"
const ResourceConfigEPDirect = "https://config.direct.cloud-object-storage.cloud.ibm.com/v1"
const ResourceConfigEPPrivate = "https://config.private.cloud-object-storage.cloud.ibm.com/v1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessPolicy ¶
type AccessPolicy interface { UpdateAccessPolicy(allowedIps, apiKey, bucketName string, rcc ResourceConfigurationV1) error UpdateQuotaLimit(quota int64, apiKey, bucketName, osEndpoint, iamEndpoint string, rcc ResourceConfigurationV1) error }
type AccessPolicyFactory ¶
type AccessPolicyFactory interface {
NewAccessPolicy() AccessPolicy
}
type COSSession ¶
type COSSession struct {
// contains filtered or unexported fields
}
COSSession represents a COS (S3) session
func (*COSSession) CheckBucketAccess ¶
func (s *COSSession) CheckBucketAccess(bucket string) error
CheckBucketAccess method check that a bucket can be accessed
func (*COSSession) CheckObjectPathExistence ¶
func (s *COSSession) CheckObjectPathExistence(bucket, objectpath string) (bool, error)
CheckObjectPathExistence method checks that object-path exists inside bucket
func (*COSSession) CreateBucket ¶
func (s *COSSession) CreateBucket(bucket, locationConstraint string, kpRootKeyCrn string) (string, error)
CreateBucket methods creates a new bucket
func (*COSSession) DeleteBucket ¶
func (s *COSSession) DeleteBucket(bucket string) error
DeleteBucket methods deletes a bucket (with all of its objects)
type COSSessionFactory ¶
type COSSessionFactory struct{}
COSSessionFactory represents a COS (S3) session factory
func (*COSSessionFactory) NewObjectStorageSession ¶
func (s *COSSessionFactory) NewObjectStorageSession(endpoint, region string, creds *ObjectStorageCredentials, logger *zap.Logger) ObjectStorageSession
NewObjectStorageSession method creates a new object store session
type ObjectStorageCredentials ¶
type ObjectStorageCredentials struct { // AccessKey is the account identifier in AWS authentication AccessKey string // SecretKey is the "password" in AWS authentication SecretKey string // APIKey is the "password" in IBM IAM authentication APIKey string // ServiceInstanceID is the account identifier in IBM IAM authentication ServiceInstanceID string //IAMEndpoint ... IAMEndpoint string }
ObjectStorageCredentials holds credentials for accessing an object storage service
type ObjectStorageSession ¶
type ObjectStorageSession interface { // CheckBucketAccess method check that a bucket can be accessed CheckBucketAccess(bucket string) error // CheckObjectPathExistence method checks that object-path exists inside bucket CheckObjectPathExistence(bucket, objectpath string) (bool, error) // CreateBucket methods creates a new bucket CreateBucket(bucket, locationConstraint string, kpRootKeyCrn string) (string, error) // DeleteBucket methods deletes a bucket (with all of its objects) DeleteBucket(bucket string) error }
ObjectStorageSession is an interface of an object store session
type ObjectStorageSessionFactory ¶
type ObjectStorageSessionFactory interface { // NewObjectStorageBackend method creates a new object store session NewObjectStorageSession(endpoint, region string, creds *ObjectStorageCredentials, logger *zap.Logger) ObjectStorageSession }
ObjectStorageSessionFactory is an interface of an object store session factory
type ResourceConfigurationV1 ¶
type ResourceConfigurationV1 interface { // UpdateBucketConfig updates the bucket access policy configuration with given ips UpdateBucketConfig(*rc.ResourceConfigurationV1, *rc.UpdateBucketConfigOptions) (*core.DetailedResponse, error) }
type UpdateAPFactory ¶
type UpdateAPFactory struct{}
func (*UpdateAPFactory) NewAccessPolicy ¶
func (c *UpdateAPFactory) NewAccessPolicy() AccessPolicy
type UpdateAPObj ¶
type UpdateAPObj struct {
// contains filtered or unexported fields
}
func (*UpdateAPObj) UpdateAccessPolicy ¶
func (c *UpdateAPObj) UpdateAccessPolicy(allowedIps, apiKey, bucketName string, rcc ResourceConfigurationV1) error
UpdateAccessPolicy updates the bucket access policy configuration with given ips
func (*UpdateAPObj) UpdateBucketConfig ¶
func (uc *UpdateAPObj) UpdateBucketConfig(service *rc.ResourceConfigurationV1, options *rc.UpdateBucketConfigOptions) (res *core.DetailedResponse, err error)
func (*UpdateAPObj) UpdateQuotaLimit ¶
func (c *UpdateAPObj) UpdateQuotaLimit(quota int64, apiKey, bucketName, osEndpoint, iamEndpoint string, rcc ResourceConfigurationV1) error
UpdateQuotaLimit updates the bucket quota limits