v1

package
v0.0.0-...-86dbffa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var File_api_bff_interface_v1_shop_interface_error_proto protoreflect.FileDescriptor
View Source
var File_api_bff_interface_v1_shop_interface_proto protoreflect.FileDescriptor
View Source
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 ErrorGameNotFound(format string, args ...interface{}) *errors.Error

func ErrorUnknownError

func ErrorUnknownError(format string, args ...interface{}) *errors.Error

func IsGameNotFound

func IsGameNotFound(err error) bool

func IsUnknownError

func IsUnknownError(err error) bool

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.

type ShopInterfaceErrorReason

type ShopInterfaceErrorReason int32
const (
	ShopInterfaceErrorReason_UNKNOWN_ERROR  ShopInterfaceErrorReason = 0
	ShopInterfaceErrorReason_GAME_NOT_FOUND ShopInterfaceErrorReason = 1
)

func (ShopInterfaceErrorReason) Descriptor

func (ShopInterfaceErrorReason) Enum

func (ShopInterfaceErrorReason) EnumDescriptor deprecated

func (ShopInterfaceErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use ShopInterfaceErrorReason.Descriptor instead.

func (ShopInterfaceErrorReason) Number

func (ShopInterfaceErrorReason) String

func (x ShopInterfaceErrorReason) String() string

func (ShopInterfaceErrorReason) Type

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 (*ShopInterfaceHTTPClientImpl) ListGame

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) ListGame

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL