aliyun-client

module
v0.0.0-...-4fbaa37 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2019 License: MIT

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)
    }
}

Contact

route666@live.cn

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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