Documentation ¶
Index ¶
- Variables
- func ErrorGameNotFound(format string, args ...interface{}) *errors.Error
- func ErrorUnknownError(format string, args ...interface{}) *errors.Error
- func IsGameNotFound(err error) bool
- func IsUnknownError(err error) bool
- func RegisterShopInterfaceHTTPServer(s *http.Server, srv ShopInterfaceHTTPServer)
- func RegisterShopInterfaceServer(s grpc.ServiceRegistrar, srv ShopInterfaceServer)
- type GetGameReply
- func (*GetGameReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetGameReply) GetCount() int64
- func (x *GetGameReply) GetDescription() string
- func (x *GetGameReply) GetId() int64
- func (x *GetGameReply) GetName() string
- func (*GetGameReply) ProtoMessage()
- func (x *GetGameReply) ProtoReflect() protoreflect.Message
- func (x *GetGameReply) Reset()
- func (x *GetGameReply) String() string
- type GetGameReq
- type ListGameReply
- type ListGameReply_Game
- func (*ListGameReply_Game) Descriptor() ([]byte, []int)deprecated
- func (x *ListGameReply_Game) GetCount() int64
- func (x *ListGameReply_Game) GetDescription() string
- func (x *ListGameReply_Game) GetId() int64
- func (x *ListGameReply_Game) GetName() string
- func (*ListGameReply_Game) ProtoMessage()
- func (x *ListGameReply_Game) ProtoReflect() protoreflect.Message
- func (x *ListGameReply_Game) Reset()
- func (x *ListGameReply_Game) String() string
- type ListGameReq
- func (*ListGameReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListGameReq) GetPageNum() int64
- func (x *ListGameReq) GetPageSize() int64
- func (*ListGameReq) ProtoMessage()
- func (x *ListGameReq) ProtoReflect() protoreflect.Message
- func (x *ListGameReq) Reset()
- func (x *ListGameReq) String() string
- type ShopInterfaceClient
- type ShopInterfaceErrorReason
- func (ShopInterfaceErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ShopInterfaceErrorReason) Enum() *ShopInterfaceErrorReason
- func (ShopInterfaceErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ShopInterfaceErrorReason) Number() protoreflect.EnumNumber
- func (x ShopInterfaceErrorReason) String() string
- func (ShopInterfaceErrorReason) Type() protoreflect.EnumType
- type ShopInterfaceHTTPClient
- type ShopInterfaceHTTPClientImpl
- type ShopInterfaceHTTPServer
- type ShopInterfaceServer
- type UnimplementedShopInterfaceServer
- type UnsafeShopInterfaceServer
Constants ¶
This section is empty.
Variables ¶
var ( ShopInterfaceErrorReason_name = map[int32]string{ 0: "UNKNOWN_ERROR", 1: "GAME_NOT_FOUND", } ShopInterfaceErrorReason_value = map[string]int32{ "UNKNOWN_ERROR": 0, "GAME_NOT_FOUND": 1, } )
Enum value maps for ShopInterfaceErrorReason.
var File_api_bff_interface_v1_shop_interface_error_proto protoreflect.FileDescriptor
var File_api_bff_interface_v1_shop_interface_proto protoreflect.FileDescriptor
var ShopInterface_ServiceDesc = grpc.ServiceDesc{ ServiceName: "shop.interface.v1.ShopInterface", HandlerType: (*ShopInterfaceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListGame", Handler: _ShopInterface_ListGame_Handler, }, { MethodName: "GetGame", Handler: _ShopInterface_GetGame_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/bff/interface/v1/shop_interface.proto", }
ShopInterface_ServiceDesc is the grpc.ServiceDesc for ShopInterface service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ErrorGameNotFound ¶
func ErrorUnknownError ¶
func IsGameNotFound ¶
func IsUnknownError ¶
func RegisterShopInterfaceHTTPServer ¶
func RegisterShopInterfaceHTTPServer(s *http.Server, srv ShopInterfaceHTTPServer)
func RegisterShopInterfaceServer ¶
func RegisterShopInterfaceServer(s grpc.ServiceRegistrar, srv ShopInterfaceServer)
Types ¶
type GetGameReply ¶
type GetGameReply struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*GetGameReply) Descriptor
deprecated
func (*GetGameReply) Descriptor() ([]byte, []int)
Deprecated: Use GetGameReply.ProtoReflect.Descriptor instead.
func (*GetGameReply) GetCount ¶
func (x *GetGameReply) GetCount() int64
func (*GetGameReply) GetDescription ¶
func (x *GetGameReply) GetDescription() string
func (*GetGameReply) GetId ¶
func (x *GetGameReply) GetId() int64
func (*GetGameReply) GetName ¶
func (x *GetGameReply) GetName() string
func (*GetGameReply) ProtoMessage ¶
func (*GetGameReply) ProtoMessage()
func (*GetGameReply) ProtoReflect ¶
func (x *GetGameReply) ProtoReflect() protoreflect.Message
func (*GetGameReply) Reset ¶
func (x *GetGameReply) Reset()
func (*GetGameReply) String ¶
func (x *GetGameReply) String() string
type GetGameReq ¶
type GetGameReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetGameReq) Descriptor
deprecated
func (*GetGameReq) Descriptor() ([]byte, []int)
Deprecated: Use GetGameReq.ProtoReflect.Descriptor instead.
func (*GetGameReq) GetId ¶
func (x *GetGameReq) GetId() int64
func (*GetGameReq) ProtoMessage ¶
func (*GetGameReq) ProtoMessage()
func (*GetGameReq) ProtoReflect ¶
func (x *GetGameReq) ProtoReflect() protoreflect.Message
func (*GetGameReq) Reset ¶
func (x *GetGameReq) Reset()
func (*GetGameReq) String ¶
func (x *GetGameReq) String() string
type ListGameReply ¶
type ListGameReply struct { Results []*ListGameReply_Game `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*ListGameReply) Descriptor
deprecated
func (*ListGameReply) Descriptor() ([]byte, []int)
Deprecated: Use ListGameReply.ProtoReflect.Descriptor instead.
func (*ListGameReply) GetResults ¶
func (x *ListGameReply) GetResults() []*ListGameReply_Game
func (*ListGameReply) ProtoMessage ¶
func (*ListGameReply) ProtoMessage()
func (*ListGameReply) ProtoReflect ¶
func (x *ListGameReply) ProtoReflect() protoreflect.Message
func (*ListGameReply) Reset ¶
func (x *ListGameReply) Reset()
func (*ListGameReply) String ¶
func (x *ListGameReply) String() string
type ListGameReply_Game ¶
type ListGameReply_Game struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*ListGameReply_Game) Descriptor
deprecated
func (*ListGameReply_Game) Descriptor() ([]byte, []int)
Deprecated: Use ListGameReply_Game.ProtoReflect.Descriptor instead.
func (*ListGameReply_Game) GetCount ¶
func (x *ListGameReply_Game) GetCount() int64
func (*ListGameReply_Game) GetDescription ¶
func (x *ListGameReply_Game) GetDescription() string
func (*ListGameReply_Game) GetId ¶
func (x *ListGameReply_Game) GetId() int64
func (*ListGameReply_Game) GetName ¶
func (x *ListGameReply_Game) GetName() string
func (*ListGameReply_Game) ProtoMessage ¶
func (*ListGameReply_Game) ProtoMessage()
func (*ListGameReply_Game) ProtoReflect ¶
func (x *ListGameReply_Game) ProtoReflect() protoreflect.Message
func (*ListGameReply_Game) Reset ¶
func (x *ListGameReply_Game) Reset()
func (*ListGameReply_Game) String ¶
func (x *ListGameReply_Game) String() string
type ListGameReq ¶
type ListGameReq struct { PageNum int64 `protobuf:"varint,1,opt,name=page_num,json=pageNum,proto3" json:"page_num,omitempty"` PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // contains filtered or unexported fields }
func (*ListGameReq) Descriptor
deprecated
func (*ListGameReq) Descriptor() ([]byte, []int)
Deprecated: Use ListGameReq.ProtoReflect.Descriptor instead.
func (*ListGameReq) GetPageNum ¶
func (x *ListGameReq) GetPageNum() int64
func (*ListGameReq) GetPageSize ¶
func (x *ListGameReq) GetPageSize() int64
func (*ListGameReq) ProtoMessage ¶
func (*ListGameReq) ProtoMessage()
func (*ListGameReq) ProtoReflect ¶
func (x *ListGameReq) ProtoReflect() protoreflect.Message
func (*ListGameReq) Reset ¶
func (x *ListGameReq) Reset()
func (*ListGameReq) String ¶
func (x *ListGameReq) String() string
type ShopInterfaceClient ¶
type ShopInterfaceClient interface { ListGame(ctx context.Context, in *ListGameReq, opts ...grpc.CallOption) (*ListGameReply, error) GetGame(ctx context.Context, in *GetGameReq, opts ...grpc.CallOption) (*GetGameReply, error) }
ShopInterfaceClient is the client API for ShopInterface service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewShopInterfaceClient ¶
func NewShopInterfaceClient(cc grpc.ClientConnInterface) ShopInterfaceClient
type ShopInterfaceErrorReason ¶
type ShopInterfaceErrorReason int32
const ( ShopInterfaceErrorReason_UNKNOWN_ERROR ShopInterfaceErrorReason = 0 ShopInterfaceErrorReason_GAME_NOT_FOUND ShopInterfaceErrorReason = 1 )
func (ShopInterfaceErrorReason) Descriptor ¶
func (ShopInterfaceErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ShopInterfaceErrorReason) Enum ¶
func (x ShopInterfaceErrorReason) Enum() *ShopInterfaceErrorReason
func (ShopInterfaceErrorReason) EnumDescriptor
deprecated
func (ShopInterfaceErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ShopInterfaceErrorReason.Descriptor instead.
func (ShopInterfaceErrorReason) Number ¶
func (x ShopInterfaceErrorReason) Number() protoreflect.EnumNumber
func (ShopInterfaceErrorReason) String ¶
func (x ShopInterfaceErrorReason) String() string
func (ShopInterfaceErrorReason) Type ¶
func (ShopInterfaceErrorReason) Type() protoreflect.EnumType
type ShopInterfaceHTTPClient ¶
type ShopInterfaceHTTPClient interface { GetGame(ctx context.Context, req *GetGameReq, opts ...http.CallOption) (rsp *GetGameReply, err error) ListGame(ctx context.Context, req *ListGameReq, opts ...http.CallOption) (rsp *ListGameReply, err error) }
func NewShopInterfaceHTTPClient ¶
func NewShopInterfaceHTTPClient(client *http.Client) ShopInterfaceHTTPClient
type ShopInterfaceHTTPClientImpl ¶
type ShopInterfaceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*ShopInterfaceHTTPClientImpl) GetGame ¶
func (c *ShopInterfaceHTTPClientImpl) GetGame(ctx context.Context, in *GetGameReq, opts ...http.CallOption) (*GetGameReply, error)
func (*ShopInterfaceHTTPClientImpl) ListGame ¶
func (c *ShopInterfaceHTTPClientImpl) ListGame(ctx context.Context, in *ListGameReq, opts ...http.CallOption) (*ListGameReply, error)
type ShopInterfaceHTTPServer ¶
type ShopInterfaceHTTPServer interface { GetGame(context.Context, *GetGameReq) (*GetGameReply, error) ListGame(context.Context, *ListGameReq) (*ListGameReply, error) }
type ShopInterfaceServer ¶
type ShopInterfaceServer interface { ListGame(context.Context, *ListGameReq) (*ListGameReply, error) GetGame(context.Context, *GetGameReq) (*GetGameReply, error) // contains filtered or unexported methods }
ShopInterfaceServer is the server API for ShopInterface service. All implementations must embed UnimplementedShopInterfaceServer for forward compatibility
type UnimplementedShopInterfaceServer ¶
type UnimplementedShopInterfaceServer struct { }
UnimplementedShopInterfaceServer must be embedded to have forward compatible implementations.
func (UnimplementedShopInterfaceServer) GetGame ¶
func (UnimplementedShopInterfaceServer) GetGame(context.Context, *GetGameReq) (*GetGameReply, error)
func (UnimplementedShopInterfaceServer) ListGame ¶
func (UnimplementedShopInterfaceServer) ListGame(context.Context, *ListGameReq) (*ListGameReply, error)
type UnsafeShopInterfaceServer ¶
type UnsafeShopInterfaceServer interface {
// contains filtered or unexported methods
}
UnsafeShopInterfaceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShopInterfaceServer will result in compilation errors.