// Code generated by goctl. DO NOT EDIT.
// goctl 1.9.2
// Source: game.proto

package gameservice

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

	GameService 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)
	}

	defaultGameService struct {
		cli zrpc.Client
	}
)

func NewGameService(cli zrpc.Client) GameService {
	return &defaultGameService{
		cli: cli,
	}
}

// -----------------------games-----------------------
func (m *defaultGameService) AddGames(ctx context.Context, in *AddGamesReq, opts ...grpc.CallOption) (*AddGamesResp, error) {
	client := pb.NewGameServiceClient(m.cli.Conn())
	return client.AddGames(ctx, in, opts...)
}

func (m *defaultGameService) UpdateGames(ctx context.Context, in *UpdateGamesReq, opts ...grpc.CallOption) (*UpdateGamesResp, error) {
	client := pb.NewGameServiceClient(m.cli.Conn())
	return client.UpdateGames(ctx, in, opts...)
}

func (m *defaultGameService) DelGames(ctx context.Context, in *DelGamesReq, opts ...grpc.CallOption) (*DelGamesResp, error) {
	client := pb.NewGameServiceClient(m.cli.Conn())
	return client.DelGames(ctx, in, opts...)
}

func (m *defaultGameService) GetGamesById(ctx context.Context, in *GetGamesByIdReq, opts ...grpc.CallOption) (*GetGamesByIdResp, error) {
	client := pb.NewGameServiceClient(m.cli.Conn())
	return client.GetGamesById(ctx, in, opts...)
}

func (m *defaultGameService) SearchGames(ctx context.Context, in *SearchGamesReq, opts ...grpc.CallOption) (*SearchGamesResp, error) {
	client := pb.NewGameServiceClient(m.cli.Conn())
	return client.SearchGames(ctx, in, opts...)
}
