ibm

package
v0.0.0-...-386d234 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type COS

type COS struct {
	ApiKey            string
	ServiceInstanceID string // resource_instance_id
	AuthEndpoint      string
	ServiceEndpoint   string
	BucketLocation    string
	BucketName        string
	// contains filtered or unexported fields
}

func NewCOS

func NewCOS(apiKey, serInsID, serEP, bucLoc, bucName, prefix string) *COS

func (*COS) GetLastModified

func (cos *COS) GetLastModified(objKey string) (lastModified *time.Time, err error)

func (*COS) GetObjectBody

func (cos *COS) GetObjectBody(name string) (io.ReadCloser, error)

GetObjectBody 返回 io.ReadCloser, 要记得关闭资源.

func (*COS) MakeObjKey

func (cos *COS) MakeObjKey(name string) (objectKeyWithPrefix string)

func (*COS) Upload

func (cos *COS) Upload(objName string, objBody io.Reader) (*s3manager.UploadOutput, error)

func (*COS) UploadFile

func (cos *COS) UploadFile(localFile string) (*s3manager.UploadOutput, error)

Jump to

Keyboard shortcuts

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