Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_tcc_bank_proto protoreflect.FileDescriptor
var TccBankService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "bankservice.TccBankService", HandlerType: (*TccBankServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Try", Handler: _TccBankService_Try_Handler, }, { MethodName: "Confirm", Handler: _TccBankService_Confirm_Handler, }, { MethodName: "Cancel", Handler: _TccBankService_Cancel_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "tcc_bank.proto", }
TccBankService_ServiceDesc is the grpc.ServiceDesc for TccBankService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTccBankServiceServer ¶
func RegisterTccBankServiceServer(s grpc.ServiceRegistrar, srv TccBankServiceServer)
Types ¶
type TccBankServiceClient ¶
type TccBankServiceClient interface { Try(ctx context.Context, in *TccRequest, opts ...grpc.CallOption) (*TccResponse, error) Confirm(ctx context.Context, in *TccRequest, opts ...grpc.CallOption) (*TccResponse, error) Cancel(ctx context.Context, in *TccRequest, opts ...grpc.CallOption) (*TccResponse, error) }
TccBankServiceClient is the client API for TccBankService 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 NewTccBankServiceClient ¶
func NewTccBankServiceClient(cc grpc.ClientConnInterface) TccBankServiceClient
type TccBankServiceServer ¶
type TccBankServiceServer interface { Try(context.Context, *TccRequest) (*TccResponse, error) Confirm(context.Context, *TccRequest) (*TccResponse, error) Cancel(context.Context, *TccRequest) (*TccResponse, error) // contains filtered or unexported methods }
TccBankServiceServer is the server API for TccBankService service. All implementations must embed UnimplementedTccBankServiceServer for forward compatibility
type TccRequest ¶
type TccRequest struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Account int32 `protobuf:"varint,2,opt,name=account,proto3" json:"account,omitempty"` // contains filtered or unexported fields }
func (*TccRequest) Descriptor
deprecated
func (*TccRequest) Descriptor() ([]byte, []int)
Deprecated: Use TccRequest.ProtoReflect.Descriptor instead.
func (*TccRequest) GetAccount ¶
func (x *TccRequest) GetAccount() int32
func (*TccRequest) GetUserId ¶
func (x *TccRequest) GetUserId() int32
func (*TccRequest) ProtoMessage ¶
func (*TccRequest) ProtoMessage()
func (*TccRequest) ProtoReflect ¶
func (x *TccRequest) ProtoReflect() protoreflect.Message
func (*TccRequest) Reset ¶
func (x *TccRequest) Reset()
func (*TccRequest) String ¶
func (x *TccRequest) String() string
type TccResponse ¶
type TccResponse struct {
// contains filtered or unexported fields
}
func (*TccResponse) Descriptor
deprecated
func (*TccResponse) Descriptor() ([]byte, []int)
Deprecated: Use TccResponse.ProtoReflect.Descriptor instead.
func (*TccResponse) ProtoMessage ¶
func (*TccResponse) ProtoMessage()
func (*TccResponse) ProtoReflect ¶
func (x *TccResponse) ProtoReflect() protoreflect.Message
func (*TccResponse) Reset ¶
func (x *TccResponse) Reset()
func (*TccResponse) String ¶
func (x *TccResponse) String() string
type UnimplementedTccBankServiceServer ¶
type UnimplementedTccBankServiceServer struct { }
UnimplementedTccBankServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTccBankServiceServer) Cancel ¶
func (UnimplementedTccBankServiceServer) Cancel(context.Context, *TccRequest) (*TccResponse, error)
func (UnimplementedTccBankServiceServer) Confirm ¶
func (UnimplementedTccBankServiceServer) Confirm(context.Context, *TccRequest) (*TccResponse, error)
func (UnimplementedTccBankServiceServer) Try ¶
func (UnimplementedTccBankServiceServer) Try(context.Context, *TccRequest) (*TccResponse, error)
type UnsafeTccBankServiceServer ¶
type UnsafeTccBankServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTccBankServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TccBankServiceServer will result in compilation errors.