本文整理汇总了Golang中github.com/yanunon/oss-go-api/oss.Client类的典型用法代码示例。如果您正苦于以下问题:Golang Client类的具体用法?Golang Client怎么用?Golang Client使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Client类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: CopyObject
func CopyObject(c *oss.Client, dst, src string) {
err := c.CopyObject(dst, src)
if err != nil {
log.Fatalln(err)
}
fmt.Println("Copy object ok")
}
示例2: DeleteObject
func DeleteObject(c *oss.Client, opath string) {
err := c.DeleteObject(opath)
if err != nil {
log.Fatalln(err)
}
fmt.Println("Delete object ok")
}
示例3: PutBucketACL
func PutBucketACL(c *oss.Client, bname string, acl string) {
err := c.PutBucketACL(bname, acl)
if err != nil {
log.Fatalln(err)
}
fmt.Println("Put bucket acl ok")
}
示例4: GetBucketACL
func GetBucketACL(c *oss.Client, bname string) {
acl, err := c.GetBucketACL(bname)
if err != nil {
log.Fatalln(err)
}
fmt.Printf("%+v\n", acl)
}
示例5: PutBucket
func PutBucket(c *oss.Client, bname string) {
err := c.PutBucket(bname)
if err != nil {
log.Fatalln(err)
}
fmt.Println("Put bucket ok")
}
示例6: GetBucket
func GetBucket(c *oss.Client, bname string) {
lbr, err := c.GetBucket(bname, "", "", "", "")
if err != nil {
log.Fatalln(err)
}
fmt.Printf("%+v\n", lbr)
}
示例7: ListParts
func ListParts(c *oss.Client, opath, uploadId string) {
lpr, err := c.ListParts(opath, uploadId)
if err != nil {
log.Fatalln(err)
}
fmt.Printf("%+v\n", lpr)
}
示例8: GetService
func GetService(c *oss.Client) {
lar, err := c.GetService()
if err != nil {
log.Fatalln(err)
}
fmt.Printf("%+v\n", lar)
}
示例9: PutLargeObject
func PutLargeObject(c *oss.Client, opath, fpath string) {
err := c.PutLargeObject(opath, fpath)
if err != nil {
log.Fatalln(err)
}
fmt.Println("put large object ok")
}
示例10: ListMultipartUpload
func ListMultipartUpload(c *oss.Client, bname string) {
lmur, err := c.ListMultipartUpload(bname, nil)
if err != nil {
log.Fatalln(err)
}
fmt.Printf("%+v\n", lmur)
}
示例11: AbortMultipartUpload
func AbortMultipartUpload(c *oss.Client, opath, uploadId string) {
err := c.AbortMultipartUpload(opath, uploadId)
if err != nil {
log.Fatalln(err)
}
fmt.Println("abort multipart upload ok")
}
示例12: GetObjectGroupIndex
func GetObjectGroupIndex(c *oss.Client, gpath string) {
fg, err := c.GetObjectGroupIndex(gpath)
if err != nil {
log.Fatalln(err)
}
fmt.Printf("%+v\n", fg)
}
示例13: PostObjectGroup
func PostObjectGroup(c *oss.Client, cfg oss.CreateFileGroup, gpath string) {
cofg, err := c.PostObjectGroup(cfg, gpath)
if err != nil {
log.Fatalln(err)
}
fmt.Printf("%+v\n", cofg)
}
示例14: DeleteMultipleObject
func DeleteMultipleObject(c *oss.Client, bname string, keys []string) {
err := c.DeleteMultipleObject(bname, keys)
if err != nil {
log.Fatalln(err)
}
fmt.Println("Delete multiple object ok")
}
示例15: HeadObject
func HeadObject(c *oss.Client, opath string) {
header, err := c.HeadObject(opath)
if err != nil {
log.Fatalln(err)
}
fmt.Printf("%+v\n", header)
}