1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-28 03:28:13 +00:00

chore(model): create build, stage, step and logs table

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi.Wu
2022-09-01 11:03:50 +08:00
committed by Jason Song
parent e05f224d19
commit e07d416366
7 changed files with 66 additions and 31 deletions

View File

@@ -10,11 +10,14 @@ import (
"code.gitea.io/gitea/modules/log"
pingv1 "gitea.com/gitea/proto-go/ping/v1"
"gitea.com/gitea/proto-go/ping/v1/pingv1connect"
"github.com/bufbuild/connect-go"
)
type Service struct{}
type Service struct {
pingv1connect.UnimplementedPingServiceHandler
}
func (s *Service) Ping(
ctx context.Context,
@@ -22,10 +25,9 @@ func (s *Service) Ping(
) (*connect.Response[pingv1.PingResponse], error) {
log.Info("Content-Type: %s", req.Header().Get("Content-Type"))
log.Info("User-Agent: %s", req.Header().Get("User-Agent"))
log.Info("X-Gitea-Token: %s", req.Header().Get("X-Gitea-Token"))
log.Info("X-Runner-Token: %s", req.Header().Get("X-Runner-Token"))
res := connect.NewResponse(&pingv1.PingResponse{
Data: fmt.Sprintf("Hello, %s!", req.Msg.Data),
})
res.Header().Set("Gitea-Version", "v1")
return res, nil
}