Documentation ¶
Index ¶
- type SpaceContext
- type SpaceService
- func (ss *SpaceService) AsyncUpload(opts *UploadOptions) (errchan chan<- *UploadResponse)
- func (ss *SpaceService) GetBucket() string
- func (ss *SpaceService) GetEndPoint() string
- func (ss *SpaceService) GetRegion() string
- func (ss *SpaceService) SetBucket(bucket string)
- func (ss *SpaceService) SetEndPoint(endpoint string)
- func (ss *SpaceService) SetRegion(region string)
- func (ss *SpaceService) Upload(opts *UploadOptions) (resp *UploadResponse)
- type UploadOptions
- type UploadResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SpaceContext ¶
SpaceContext context includes EndPoint, Region and FileName info
type SpaceService ¶
type SpaceService struct { Context *SpaceContext AccessKey string AccessSecret string }
SpaceService service defines context
func NewSpaceService ¶
func NewSpaceService(key, secret string) *SpaceService
NewSpaceService service initializer
func (*SpaceService) AsyncUpload ¶
func (ss *SpaceService) AsyncUpload(opts *UploadOptions) (errchan chan<- *UploadResponse)
AsyncUpload async upload
func (*SpaceService) GetEndPoint ¶
func (ss *SpaceService) GetEndPoint() string
GetEndPoint get endpoint
func (*SpaceService) SetBucket ¶
func (ss *SpaceService) SetBucket(bucket string)
SetBucket set bucket
func (*SpaceService) SetEndPoint ¶
func (ss *SpaceService) SetEndPoint(endpoint string)
SetEndPoint set endpoint
func (*SpaceService) SetRegion ¶
func (ss *SpaceService) SetRegion(region string)
SetRegion set region
func (*SpaceService) Upload ¶
func (ss *SpaceService) Upload(opts *UploadOptions) (resp *UploadResponse)
Upload upload file
type UploadOptions ¶
type UploadOptions struct { FileName string // visible to public or not Public bool // Timeout upload timeout Timeout time.Duration // Metadata user metadata Metadata map[string]string }
UploadOptions upload response
type UploadResponse ¶
UploadResponse upload response
Click to show internal directories.
Click to hide internal directories.