https://github.com/bytedance/douyincloud-gin-demo
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (2.1%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: bytedance
- License: other
- Language: Go
- Default Branch: main
- Size: 9.77 KB
Statistics
- Stars: 10
- Watchers: 3
- Forks: 12
- Open Issues: 2
- Releases: 0
Metadata Files
README.md
douyincloud-gin-demo
本项目是抖音云平台基于go语言gin框架的开发模版,模版通过使用Redis和MongoDB实现了简单的hello-world功能。\ 抖音云平台支持基于Git代码和Docker镜像部署两种方式。其中,Dockerfile文件可以参考本项目中的Dockerfile文件。 部署在抖音云平台的服务日志需要重定向到标准输出,并在抖音云平台日志功能中查看。
目录结构
~~~
.
├── Dockerfile Dockerfile文件
├── Readme.md Readme文件
├── component 组件目录
│ ├── mongo.go mongo组件
│ ├── redis.go redis组件
│ └── types.go 组件接口声明
├── go.mod go.mod文件
├── go.sum go.sum文件
├── main.go 主函数入口
├── run.sh 容器运行时启动文件
└── service 业务逻辑目录
└── service.go 业务逻辑文件
~~~
请求方法
前往抖音云托管平台「调试」功能界面,进行请求调试。
API说明
GET /api/hello
对组件打招呼
请求参数
target:string组件名:redis,mongodb
响应结果
json
{
"err_no": 0,
"err_msg": "success",
"data": "hello,redis"
}
POST /api/set_name
给组件设置名称
请求参数
target:string组件名:redis,mongodbname:string名称
响应结果
json
{
"err_no": 0,
"err_msg": "success",
"data": ""
}
组件使用注意事项
在抖音云托管平台上启用组件后,抖音云平台会自动将组件的地址,账号,密码以环境变量的方式注入到容器中。\
以Redis为例,在抖音云托管平台启用Redis组件后,平台会生成 REDIS_ADDRESS,REDIS_USERNAME,REDIS_PASSWORD三个环境变量,在业务代码中可以使用如下代码获取相应值。
redisAddr := os.Getenv("REDIS_ADDRESS")
redisUserName := os.Getenv("REDIS_USERNAME")
redisPassword := os.Getenv("REDIS_PASSWORD")
License
This project is licensed under the Apache-2.0 License.
Owner
- Name: Bytedance Inc.
- Login: bytedance
- Kind: organization
- Location: Singapore
- Website: https://opensource.bytedance.com
- Twitter: ByteDanceOSS
- Repositories: 255
- Profile: https://github.com/bytedance
GitHub Events
Total
- Watch event: 4
- Pull request event: 1
- Fork event: 6
Last Year
- Watch event: 4
- Pull request event: 1
- Fork event: 6
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.5
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- kenweiiiiii (2)
- pipiguanli (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- public-cn-beijing.cr.volces.com/public/base golang-1.17.1-alpine3.14 build
- public-cn-beijing.cr.volces.com/public/base alpine-3.13 build
- github.com/cespare/xxhash/v2 v2.1.2
- github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f
- github.com/gin-contrib/sse v0.1.0
- github.com/gin-gonic/gin v1.8.1
- github.com/go-playground/locales v0.14.0
- github.com/go-playground/universal-translator v0.18.0
- github.com/go-playground/validator/v10 v10.10.0
- github.com/go-redis/redis/v8 v8.11.5
- github.com/goccy/go-json v0.9.7
- github.com/golang/snappy v0.0.1
- github.com/json-iterator/go v1.1.12
- github.com/klauspost/compress v1.13.6
- github.com/leodido/go-urn v1.2.1
- github.com/mattn/go-isatty v0.0.14
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421
- github.com/modern-go/reflect2 v1.0.2
- github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe
- github.com/pelletier/go-toml/v2 v2.0.1
- github.com/pkg/errors v0.9.1
- github.com/ugorji/go/codec v1.2.7
- github.com/xdg-go/pbkdf2 v1.0.0
- github.com/xdg-go/scram v1.1.1
- github.com/xdg-go/stringprep v1.0.3
- github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d
- go.mongodb.org/mongo-driver v1.10.0
- golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
- golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2
- golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
- golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e
- golang.org/x/text v0.3.7
- google.golang.org/protobuf v1.28.0
- gopkg.in/yaml.v2 v2.4.0
- github.com/cespare/xxhash/v2 v2.1.2
- github.com/creack/pty v1.1.9
- github.com/davecgh/go-spew v1.1.0
- github.com/davecgh/go-spew v1.1.1
- github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f
- github.com/fsnotify/fsnotify v1.4.9
- github.com/gin-contrib/sse v0.1.0
- github.com/gin-gonic/gin v1.8.1
- github.com/go-playground/assert/v2 v2.0.1
- github.com/go-playground/locales v0.14.0
- github.com/go-playground/universal-translator v0.18.0
- github.com/go-playground/validator/v10 v10.10.0
- github.com/go-redis/redis/v8 v8.11.5
- github.com/goccy/go-json v0.9.7
- github.com/golang/protobuf v1.5.0
- github.com/golang/snappy v0.0.1
- github.com/google/go-cmp v0.5.2
- github.com/google/go-cmp v0.5.5
- github.com/google/gofuzz v1.0.0
- github.com/json-iterator/go v1.1.12
- github.com/klauspost/compress v1.13.6
- github.com/kr/pretty v0.1.0
- github.com/kr/pretty v0.2.1
- github.com/kr/pretty v0.3.0
- github.com/kr/pty v1.1.1
- github.com/kr/text v0.1.0
- github.com/kr/text v0.2.0
- github.com/leodido/go-urn v1.2.1
- github.com/mattn/go-isatty v0.0.14
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421
- github.com/modern-go/reflect2 v1.0.2
- github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe
- github.com/nxadm/tail v1.4.8
- github.com/onsi/ginkgo v1.16.5
- github.com/onsi/gomega v1.18.1
- github.com/pelletier/go-toml/v2 v2.0.1
- github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e
- github.com/pkg/errors v0.9.1
- github.com/pmezard/go-difflib v1.0.0
- github.com/rogpeppe/go-internal v1.6.1
- github.com/rogpeppe/go-internal v1.8.0
- github.com/stretchr/objx v0.1.0
- github.com/stretchr/testify v1.3.0
- github.com/stretchr/testify v1.6.1
- github.com/stretchr/testify v1.7.0
- github.com/stretchr/testify v1.7.1
- github.com/tidwall/pretty v1.0.0
- github.com/ugorji/go v1.2.7
- github.com/ugorji/go/codec v1.2.7
- github.com/xdg-go/pbkdf2 v1.0.0
- github.com/xdg-go/scram v1.1.1
- github.com/xdg-go/stringprep v1.0.3
- github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d
- go.mongodb.org/mongo-driver v1.10.0
- golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97
- golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
- golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
- golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2
- golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
- golang.org/x/sys v0.0.0-20201119102817-f84b799fce68
- golang.org/x/sys v0.0.0-20210423082822-04245dca01da
- golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1
- golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
- golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069
- golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e
- golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1
- golang.org/x/text v0.3.3
- golang.org/x/text v0.3.6
- golang.org/x/text v0.3.7
- golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e
- golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
- google.golang.org/protobuf v1.26.0-rc.1
- google.golang.org/protobuf v1.28.0
- gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
- gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
- gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
- gopkg.in/errgo.v2 v2.1.0
- gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
- gopkg.in/yaml.v2 v2.4.0
- gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
- gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
- gopkg.in/yaml.v3 v3.0.1