Documentation ¶
Overview ¶
Package cos implements cos code.
Index ¶
- type Cos
- type Service
- func (s *Service) CreateBucket(input *s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
- func (s *Service) CreateBucketWithContext(ctx aws.Context, input *s3.CreateBucketInput, opts ...request.Option) (*s3.CreateBucketOutput, error)
- func (s *Service) DeleteObject(input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
- func (s *Service) GetBucketByName(name string) (*s3.HeadBucketOutput, error)
- func (s *Service) GetObjectRequest(input *s3.GetObjectInput) (*request.Request, *s3.GetObjectOutput)
- func (s *Service) ListObjects(input *s3.ListObjectsInput) (*s3.ListObjectsOutput, error)
- func (s *Service) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error)
- func (s *Service) PutPublicAccessBlock(input *s3.PutPublicAccessBlockInput) (*s3.PutPublicAccessBlockOutput, error)
- type ServiceOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cos ¶
type Cos interface { GetBucketByName(name string) (*s3.HeadBucketOutput, error) CreateBucket(input *s3.CreateBucketInput) (*s3.CreateBucketOutput, error) CreateBucketWithContext(ctx aws.Context, input *s3.CreateBucketInput, opts ...request.Option) (*s3.CreateBucketOutput, error) PutObject(*s3.PutObjectInput) (*s3.PutObjectOutput, error) GetObjectRequest(*s3.GetObjectInput) (*request.Request, *s3.GetObjectOutput) ListObjects(input *s3.ListObjectsInput) (*s3.ListObjectsOutput, error) DeleteObject(input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error) PutPublicAccessBlock(input *s3.PutPublicAccessBlockInput) (*s3.PutPublicAccessBlockOutput, error) }
Cos interface defines a method that a IBMCLOUD service object should implement in order to use the cos package for listing resource instances.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service holds the IBM Cloud Resource Controller Service specific information.
func NewService ¶
func NewService(options ServiceOptions, apikey, serviceInstance string) (*Service, error)
NewService returns a new service for the IBM Cloud Resource Controller api client.
func (*Service) CreateBucket ¶
func (s *Service) CreateBucket(input *s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
CreateBucket creates a new bucket in the COS instance.
func (*Service) CreateBucketWithContext ¶
func (s *Service) CreateBucketWithContext(ctx aws.Context, input *s3.CreateBucketInput, opts ...request.Option) (*s3.CreateBucketOutput, error)
CreateBucketWithContext creates a new bucket with an addition ability to pass context.
func (*Service) DeleteObject ¶
func (s *Service) DeleteObject(input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
DeleteObject deletes a object in a bucket.
func (*Service) GetBucketByName ¶
func (s *Service) GetBucketByName(name string) (*s3.HeadBucketOutput, error)
GetBucketByName returns a bucket with the given name.
func (*Service) GetObjectRequest ¶
func (s *Service) GetObjectRequest(input *s3.GetObjectInput) (*request.Request, *s3.GetObjectOutput)
GetObjectRequest generates a "aws/request.Request" representing the client's request for the GetObject operation.
func (*Service) ListObjects ¶
func (s *Service) ListObjects(input *s3.ListObjectsInput) (*s3.ListObjectsOutput, error)
ListObjects returns the list of objects in a bucket.
func (*Service) PutObject ¶
func (s *Service) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error)
PutObject adds an object to a bucket.
func (*Service) PutPublicAccessBlock ¶
func (s *Service) PutPublicAccessBlock(input *s3.PutPublicAccessBlockInput) (*s3.PutPublicAccessBlockOutput, error)
PutPublicAccessBlock creates or modifies the PublicAccessBlock configuration for a bucket.
type ServiceOptions ¶
type ServiceOptions struct {
*cosSession.Options
}
ServiceOptions holds the IBM Cloud Resource Controller Service Options specific information.