Skip to content

Commit 6f8cd19

Browse files
committed
feat: health api
1 parent b5fbe3c commit 6f8cd19

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

api/core/core.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/core/v1/health.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package v1
2+
3+
import (
4+
"github.com/gogf/gf/v2/frame/g"
5+
)
6+
7+
type HealthReq struct {
8+
g.Meta `path:"/health" tags:"Health" method:"get" summary:"Health Check"`
9+
}
10+
11+
type HealthRes struct {
12+
g.Meta `mime:"application/json"`
13+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package core
2+
3+
import (
4+
"context"
5+
6+
"ImageGo/api/core/v1"
7+
)
8+
9+
func (c *ControllerV1) Health(ctx context.Context, req *v1.HealthReq) (res *v1.HealthRes, err error) {
10+
return nil, nil
11+
}

0 commit comments

Comments
 (0)