module
Version:
v0.0.0-...-4fbaa37
Opens a new window with list of versions in this module.
Published: Jun 5, 2019
License: MIT
Opens a new window with license information.
README
¶
Aliyun Client
Aliyun client designed for easy use. It's used by my own DongFeng project.
Dependencies
Object Upload
example:
import github.com/ilovelili/aliyun-client/oss
func main() {
oss := NewService("<<api key>>", "<<secret key>>")
oss.SetEndPoint("oss-cn-shanghai.aliyuncs.com")
oss.SetBucket("dong-feng")
opts1 := &UploadOptions{
ObjectName: "test",
Public: true,
IsFolder: true,
}
resp := oss.Upload(opts1)
if resp.Error != nil {
t.Error(resp.Error)
}
opts2 := &UploadOptions{
ObjectName: "../test/index.html",
Public: true,
ParentFolder: "test",
}
resp = oss.Upload(opts2)
if resp.Error != nil {
t.Error(resp.Error)
}
}
route666@live.cn
Directories
¶
Click to show internal directories.
Click to hide internal directories.