• Stars
    star
    211
  • Rank 186,867 (Top 4 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

腾讯云 COS GO SDK(XML API)

cos-go-sdk-v5

腾讯云对象存储服务 COS(Cloud Object Storage) Go SDK(API 版本:V5 版本的 XML API)。

Install

go get -u github.com/tencentyun/cos-go-sdk-v5

Usage

package main

import (
	"context"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"os"
	"time"
	
	"github.com/tencentyun/cos-go-sdk-v5"
)

func main() {
	//将<bucket>和<region>修改为真实的信息
	//bucket的命名规则为{name}-{appid} ,此处填写的存储桶名称必须为此格式
	u, _ := url.Parse("https://<bucket>.cos.<region>.myqcloud.com")
	b := &cos.BaseURL{BucketURL: u}
	c := cos.NewClient(b, &http.Client{
		//设置超时时间
		Timeout: 100 * time.Second,
		Transport: &cos.AuthorizationTransport{
			//如实填写账号和密钥,也可以设置为环境变量
			SecretID:  os.Getenv("COS_SECRETID"),
			SecretKey: os.Getenv("COS_SECRETKEY"),
		},
	})

	name := "test/hello.txt"
	resp, err := c.Object.Get(context.Background(), name, nil)
	if err != nil {
		panic(err)
	}
	bs, _ := ioutil.ReadAll(resp.Body)
	resp.Body.Close()
	fmt.Printf("%s\n", string(bs))
}

所有的 API 在 example 目录下都有对应的使用示例。

Service API:

Bucket API:

Object API:

数据处理 API:

内容审核 API:

More Repositories

1

qcloud-documents

腾讯云官方文档
HTML
2,548
star
2

wafer

Wafer - 快速构建具备弹性能力的微信小程序
2,170
star
3

TRTCSDK

腾讯云TRTC音视频服务,国内下载镜像:
C++
1,210
star
4

wafer2-startup

Wafer - 腾讯云下一代小程序综合解决方案
JavaScript
1,022
star
5

MLVBSDK

移动直播 SDK,国内下载镜像:
Objective-C
775
star
6

wafer-client-demo

Wafer - 企业级微信小程序全栈方案
JavaScript
507
star
7

wafer2-quickstart

Wafer2 腾讯云一站式小程序解决方案
411
star
8

wafer2-quickstart-nodejs

Wafer2 Node.js 简化版 Demo
JavaScript
363
star
9

wafer-client-sdk

Wafer - 快速构建具备弹性能力的微信小程序
JavaScript
340
star
10

cos-js-sdk-v5

腾讯云 COS JS SDK(XML API)
JavaScript
329
star
11

wafer2-node-sdk

Wafer2 SDK for Node.js
JavaScript
270
star
12

wafer-java-server-sdk

Wafer - 企业级微信小程序全栈方案
Java
261
star
13

wafer-php-server-sdk

Wafer - 企业级微信小程序全栈方案
PHP
254
star
14

cos-nodejs-sdk-v5

腾讯云 COS Nodejs SDK(XML API)
JavaScript
233
star
15

wafer2-client-sdk

Wafer client SDK
JavaScript
225
star
16

qcloud-cos-sts-sdk

QCloud COS STS SDK for Backend Server
Java
200
star
17

wecos

WeCOS——微信小程序 COS 瘦身解决方案
JavaScript
199
star
18

wafer-node-server-demo

Wafer - 企业级微信小程序全栈方案
JavaScript
197
star
19

clb-quic-demo

clb team contribute
Java
196
star
20

wafer2-quickstart-php

Wafer2 PHP 简化版 Demo
PHP
189
star
21

cos-wx-sdk-v5

腾讯云 COS 小程序 SDK(XML API)
JavaScript
189
star
22

cos-php-sdk-v5

cos-php-sdk-v5
PHP
167
star
23

weapp-doc

小程序配置指引、升级方案
165
star
24

TUICallKit

a video calls uikit, include 1v1 calls、group calls etc.
Swift
164
star
25

cos-python-sdk-v5

Python
160
star
26

cos-java-sdk-v5

java sdk for qcloud cos v5 (xml api)
Java
139
star
27

wafer-php-server-demo

Wafer - 企业级微信小程序全栈方案
PHP
138
star
28

wafer-node-server-sdk

Wafer - 企业级微信小程序全栈方案
JavaScript
132
star
29

cosfs

C++
119
star
30

TUIRoomKit

Multi-person Video Conversation uikit, used for various scenarios such as Work Collaboration, Remote Medical, and Online Education.
Java
115
star
31

tencentcloud-exporter

TencentCloud Prometheus Exporter
Go
109
star
32

blog

Blog to share events or technique topics
109
star
33

serverless-demo

demo for serverless
108
star
34

wafer-csharp-server-sdk

Wafer - 企业级微信小程序全栈方案
C#
93
star
35

wecos-ugc-upload-demo

WeCOS-UGC-DEMO资源上传示例
JavaScript
90
star
36

tsf-simple-demo

Tencent Service Framework Demo
Java
85
star
37

TUILiveRoom

腾讯云TRTC针对直播、语聊、视频通话等推出的低代码解决方案~
Java
84
star
38

LiteAVProfessional_Android

84
star
39

scfcli

serverless cli
Python
84
star
40

image-java-sdk-v2.0

Java
84
star
41

TWebLive

Vue
82
star
42

hadoop-cos

hadoop-cos(CosN文件系统)为Apache Hadoop、Spark以及Tez等大数据计算框架集成提供支持,可以像访问HDFS一样读写存储在腾讯云COS上的数据。同时也支持作为Druid等查询与分析引擎的Deep Storage
Java
82
star
43

wafer-node-session

Standalone node session middleware for wechat micro application
JavaScript
81
star
44

wafer2-aai-nodejs

腾讯云小程序解决方案语音识别 Node.js Demo
JavaScript
73
star
45

cos_migrate_tool_v5

Java
67
star
46

TIC

腾讯云互动课堂
C++
65
star
47

coscmd

Python
63
star
48

scf-go-lib

scf go lib
Go
55
star
49

cos-js-sdk-v4

腾讯云 COS JS SDK(JSON API)
JavaScript
50
star
50

cos-cpp-sdk-v5

C++
47
star
51

iot-device-java

IoT Hub & Explorer 设备端 SDK (Java & Android)
Java
46
star
52

imsdk_restapi-php-sdk

IMSDK-PhpServerSDK使用说明 https://www.qcloud.com/doc/product/269/1538
PHP
43
star
53

cos-php-sdk-v4

Php SDK for COS v4
PHP
43
star
54

tls-sig-api-v2-java

Java
42
star
55

qcloud-sdk-dotnet

C#
42
star
56

TencentIMFlutterDemo

腾讯云即时通信IMdemo
Dart
42
star
57

scf-demo-repo

Python
42
star
58

LiteAVProfessional_iOS

Objective-C
40
star
59

iot-link-android

IoT 应用端 App & SDK
Kotlin
40
star
60

cos-python-sdk-v4

Python SDK for COS v4
Python
39
star
61

TUIVoiceRoom

腾讯云TRTC针对直播、语聊、视频通话等推出的低代码解决方案~
Java
39
star
62

cos-ftp-server-V5

腾讯云对象存储(COS-V5)的FTP Server
Python
37
star
63

tc-iot-at-sdk-stm32-freertos-based-example

tc-iot-at-sdk-stm32-freertos-based-example 面向使用支持腾讯AT指令的模组(2/3/4/5G、NB、WIFI等)接入腾讯物联网平台的终端设备开发者,mcu侧使用[腾讯AT_SDK]的移植示例,示例基于STM32F103 MCU和FreeRTOS的软硬件环境如何实现HAL层的移植。
C
37
star
64

wafer2-ci-nodejs-demo

Wafer2 万象优图图像识别 Node.js Demo
JavaScript
36
star
65

vod-js-sdk-v6

TypeScript
36
star
66

coscli

Go
36
star
67

qcloud-iotexplorer-appdev-miniprogram-sdk-demo

36
star
68

vod-xiaoshipin-server

腾讯云小视频APP后台代码
JavaScript
33
star
69

tls-sig-api-v2-php

tls sig api version 2 php
PHP
32
star
70

XiaoZhiBo

Swift
32
star
71

flink-cos-fs

Flink-cos-fs 是腾讯云对象存储系统COS针对Flink的文件系统实现,并且支持了recoverwriter接口。
Java
31
star
72

cos-java-sdk-v4

java sdk for cos v4
Java
31
star
73

qcloud-sdk-ios

腾讯云服务iOS终端SDK
Objective-C
31
star
74

intlcloud-documents

腾讯云国际站官方文档
HTML
30
star
75

qcloud-sdk-android-samples

腾讯云服务Android SDK samples
Java
30
star
76

iot-device-android

IoT Hub & Explorer 设备端 SDK (Java & Android)
Java
29
star
77

tencent-cloud-iotsuite-embedded-c

This project is deperecated, pleases visit: https://github.com/tencentyun/qcloud-iot-explorer-sdk-embedded-c
29
star
78

cos-snippets

COS 官方文档的代码片段
Java
28
star
79

TRTCFlutterScenesDemo

腾讯云实时音视频Flutter版场景Demo
Dart
28
star
80

cos-wx-sdk-v4

腾讯云 COS 微信小程序 SDK(JSON API)
JavaScript
28
star
81

serverless-tencent-scf

Serverless framework provider plugin for Tencent SCF(Serverless Cloud Function)
TypeScript
27
star
82

tsf-go

Go
27
star
83

qcloud-iot-sdk-tencent-at-based

qcloud-iot-sdk-tencent-at-based 面向使用支持腾讯AT指令的模组(2/3/4/5G、NB、WIFI等)接入腾讯物联网平台的终端设备开发者
C
27
star
84

cloudgame-android-sdk

云游戏 Android SDK https://cloud.tencent.com/solution/gs
Java
27
star
85

cmq-java-sdk

Tencent CMQ JAVA SDK
Java
24
star
86

wafer2-game-quickstart-php

Wafer2 微信小游戏快速开发 Demo
PHP
24
star
87

qcloud-iot-sdk-for-stm32withfreeRTOS-example

腾讯云IOT SDK基于stm32+freeRTOS的移植示例,硬件环境为云+开发者大会提供的卡牌开发板
C
23
star
88

cos-java-sdk

对象存储服务(Cloud Object Service)Java SDK使用说明
Java
22
star
89

TUIChorus

腾讯云TRTC针对直播、语聊、视频通话等推出的低代码解决方案~
Java
21
star
90

iotexplorer-h5-panel-demo

腾讯连连自定义 H5 面板 demo
TypeScript
21
star
91

imApiFlutterExample

腾讯云即时通信IM Flutter SDK API Example
Dart
20
star
92

cos-python-sdk

对象存储服务(Cloud Object Service)Python SDK使用说明
Python
20
star
93

tls-sig-api-php

PHP
20
star
94

qcloud-sdk-android

Tencent Cloud COS Android SDK Repository.
Java
20
star
95

cos-php-sdk

对象存储服务(Cloud Object Service)PHP SDK使用说明
PHP
20
star
96

tls-sig-api-java

Java
19
star
97

cmq-java-tcp-sdk

cmq tcp java sdk
Java
19
star
98

iot-link-ios

IoT 应用端 App & SDK
Objective-C
19
star
99

cos-donet-sdk-v4

cos-donet-sdk-v4
C#
18
star
100

qcloud-iot-sdk-android

[DEPRECATED] 请移步至:
Java
18
star