當前位置: 首頁>>代碼示例>>Golang>>正文


Golang oss.Client類代碼示例

本文整理匯總了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")
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例2: DeleteObject

func DeleteObject(c *oss.Client, opath string) {
	err := c.DeleteObject(opath)
	if err != nil {
		log.Fatalln(err)
	}
	fmt.Println("Delete object ok")
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例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")
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例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)
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例5: PutBucket

func PutBucket(c *oss.Client, bname string) {
	err := c.PutBucket(bname)
	if err != nil {
		log.Fatalln(err)
	}
	fmt.Println("Put bucket ok")
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例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)
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例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)
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例8: GetService

func GetService(c *oss.Client) {
	lar, err := c.GetService()
	if err != nil {
		log.Fatalln(err)
	}
	fmt.Printf("%+v\n", lar)
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例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")
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例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)
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例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")
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例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)
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例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)
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例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")
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go

示例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)
}
開發者ID:cnhans,項目名稱:oss-go-api,代碼行數:7,代碼來源:example.go


注:本文中的github.com/yanunon/oss-go-api/oss.Client類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。