pusher/handler.go
timerzz 4ec0cd1564
Some checks failed
Build image / build (push) Failing after 4m48s
feat 测试
2024-05-20 17:57:25 +08:00

40 lines
1.3 KiB
Go

package main
import (
"context"
"gitea.timerzz.com/kedaya_haitao/pusher/biz/service"
config "gitea.timerzz.com/kedaya_haitao/pusher/kitex_gen/config"
push "gitea.timerzz.com/kedaya_haitao/pusher/kitex_gen/push"
)
// PushServiceImpl implements the last service interface defined in the IDL.
type PushServiceImpl struct{}
// Push implements the PushServiceImpl interface.
func (s *PushServiceImpl) Push(ctx context.Context, req *push.PushReq) (resp *push.Resp, err error) {
resp, err = service.NewPushService(ctx).Run(req)
return resp, err
}
// Add implements the PushServiceImpl interface.
func (s *PushServiceImpl) Add(ctx context.Context, req *config.PusherConfig) (resp *push.Resp, err error) {
resp, err = service.NewAddService(ctx).Run(req)
return resp, err
}
// List implements the PushServiceImpl interface.
func (s *PushServiceImpl) List(ctx context.Context, req *push.ListPusherRequest) (resp *push.ListPusherResponse, err error) {
resp, err = service.NewListService(ctx).Run(req)
return resp, err
}
// GetPusherOptions implements the PushServiceImpl interface.
func (s *PushServiceImpl) GetPusherOptions(ctx context.Context) (resp *push.GetPusherOptionsResponse, err error) {
resp, err = service.NewGetPusherOptionsService(ctx).Run()
return resp, err
}