Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_api_trans_v1_trans_proto protoreflect.FileDescriptor
var Trans_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.trans.v1.Trans", HandlerType: (*TransServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TransIn", Handler: _Trans_TransIn_Handler, }, { MethodName: "TransOut", Handler: _Trans_TransOut_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/trans/v1/trans.proto", }
Trans_ServiceDesc is the grpc.ServiceDesc for Trans service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTransServer ¶
func RegisterTransServer(s grpc.ServiceRegistrar, srv TransServer)
Types ¶
type AdjustInfo ¶
type AdjustInfo struct { Amount int64 `protobuf:"varint,1,opt,name=Amount,proto3" json:"Amount,omitempty"` UserID int64 `protobuf:"varint,2,opt,name=UserID,proto3" json:"UserID,omitempty"` // contains filtered or unexported fields }
func (*AdjustInfo) Descriptor
deprecated
func (*AdjustInfo) Descriptor() ([]byte, []int)
Deprecated: Use AdjustInfo.ProtoReflect.Descriptor instead.
func (*AdjustInfo) GetAmount ¶
func (x *AdjustInfo) GetAmount() int64
func (*AdjustInfo) GetUserID ¶
func (x *AdjustInfo) GetUserID() int64
func (*AdjustInfo) ProtoMessage ¶
func (*AdjustInfo) ProtoMessage()
func (*AdjustInfo) ProtoReflect ¶
func (x *AdjustInfo) ProtoReflect() protoreflect.Message
func (*AdjustInfo) Reset ¶
func (x *AdjustInfo) Reset()
func (*AdjustInfo) String ¶
func (x *AdjustInfo) String() string
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type TransClient ¶
type TransClient interface { TransIn(ctx context.Context, in *AdjustInfo, opts ...grpc.CallOption) (*Response, error) TransOut(ctx context.Context, in *AdjustInfo, opts ...grpc.CallOption) (*Response, error) }
TransClient is the client API for Trans 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 NewTransClient ¶
func NewTransClient(cc grpc.ClientConnInterface) TransClient
type TransServer ¶
type TransServer interface { TransIn(context.Context, *AdjustInfo) (*Response, error) TransOut(context.Context, *AdjustInfo) (*Response, error) // contains filtered or unexported methods }
TransServer is the server API for Trans service. All implementations must embed UnimplementedTransServer for forward compatibility
type UnimplementedTransServer ¶
type UnimplementedTransServer struct { }
UnimplementedTransServer must be embedded to have forward compatible implementations.
func (UnimplementedTransServer) TransIn ¶
func (UnimplementedTransServer) TransIn(context.Context, *AdjustInfo) (*Response, error)
func (UnimplementedTransServer) TransOut ¶
func (UnimplementedTransServer) TransOut(context.Context, *AdjustInfo) (*Response, error)
type UnsafeTransServer ¶
type UnsafeTransServer interface {
// contains filtered or unexported methods
}
UnsafeTransServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TransServer will result in compilation errors.