74 lines
2.4 KiB
Go
74 lines
2.4 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.9.2
|
|
// Source: game.proto
|
|
|
|
package public
|
|
|
|
import (
|
|
"context"
|
|
|
|
"juwan-backend/app/game/rpc/pb"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
AddGamesReq = pb.AddGamesReq
|
|
AddGamesResp = pb.AddGamesResp
|
|
DelGamesReq = pb.DelGamesReq
|
|
DelGamesResp = pb.DelGamesResp
|
|
Games = pb.Games
|
|
GetGamesByIdReq = pb.GetGamesByIdReq
|
|
GetGamesByIdResp = pb.GetGamesByIdResp
|
|
SearchGamesReq = pb.SearchGamesReq
|
|
SearchGamesResp = pb.SearchGamesResp
|
|
UpdateGamesReq = pb.UpdateGamesReq
|
|
UpdateGamesResp = pb.UpdateGamesResp
|
|
|
|
Public interface {
|
|
// -----------------------games-----------------------
|
|
AddGames(ctx context.Context, in *AddGamesReq, opts ...grpc.CallOption) (*AddGamesResp, error)
|
|
UpdateGames(ctx context.Context, in *UpdateGamesReq, opts ...grpc.CallOption) (*UpdateGamesResp, error)
|
|
DelGames(ctx context.Context, in *DelGamesReq, opts ...grpc.CallOption) (*DelGamesResp, error)
|
|
GetGamesById(ctx context.Context, in *GetGamesByIdReq, opts ...grpc.CallOption) (*GetGamesByIdResp, error)
|
|
SearchGames(ctx context.Context, in *SearchGamesReq, opts ...grpc.CallOption) (*SearchGamesResp, error)
|
|
}
|
|
|
|
defaultPublic struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewPublic(cli zrpc.Client) Public {
|
|
return &defaultPublic{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
// -----------------------games-----------------------
|
|
func (m *defaultPublic) AddGames(ctx context.Context, in *AddGamesReq, opts ...grpc.CallOption) (*AddGamesResp, error) {
|
|
client := pb.NewPublicClient(m.cli.Conn())
|
|
return client.AddGames(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPublic) UpdateGames(ctx context.Context, in *UpdateGamesReq, opts ...grpc.CallOption) (*UpdateGamesResp, error) {
|
|
client := pb.NewPublicClient(m.cli.Conn())
|
|
return client.UpdateGames(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPublic) DelGames(ctx context.Context, in *DelGamesReq, opts ...grpc.CallOption) (*DelGamesResp, error) {
|
|
client := pb.NewPublicClient(m.cli.Conn())
|
|
return client.DelGames(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPublic) GetGamesById(ctx context.Context, in *GetGamesByIdReq, opts ...grpc.CallOption) (*GetGamesByIdResp, error) {
|
|
client := pb.NewPublicClient(m.cli.Conn())
|
|
return client.GetGamesById(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultPublic) SearchGames(ctx context.Context, in *SearchGamesReq, opts ...grpc.CallOption) (*SearchGamesResp, error) {
|
|
client := pb.NewPublicClient(m.cli.Conn())
|
|
return client.SearchGames(ctx, in, opts...)
|
|
}
|