Skip to content

TencentCloudBase/cloudrun-gin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloudrun-gin

快速开始

前往 腾讯云托管快速开始页面,选择相应语言的模版,根据引导完成部署。

本地调试

Dockerfile 最佳实践

请参考 优化容器镜像

目录结构说明

.
├── Dockerfile
├── README.md
├── go.mod
├── go.sum
├── internal
│   ├── controllers
│   │   ├── user.go
│   │   └── welcome.go
│   ├── routes
│   │   └── routes.go
│   └── service
│       └── user.go
├── main.go
└── static
    └── html
        └── index.html

服务 API 文档

GET /apis/users

获取用户列表

请求参数

返回参数

  • total: 用户总数
  • items: 返回用户列表

返回结果示例

{
  "total": 2,
  "items": [
    {
      "id": 0,
      "name": "zhangsan"
    },
    {
      "id": 1,
      "name": "lisi"
    }
  ]
}

调用示例

curl https://<云托管域名>/apis/users

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published