Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterTransactionHTTPServer(s *http.Server, srv TransactionHTTPServer)
- func RegisterTransactionServer(s grpc.ServiceRegistrar, srv TransactionServer)
- type CreateTxReq
- func (*CreateTxReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTxReq) GetQuantity() int32
- func (x *CreateTxReq) GetTxAmount() float32
- func (x *CreateTxReq) GetTxNo() string
- func (x *CreateTxReq) GetTxStatus() string
- func (x *CreateTxReq) GetTxType() string
- func (x *CreateTxReq) GetUserId() int64
- func (*CreateTxReq) ProtoMessage()
- func (x *CreateTxReq) ProtoReflect() protoreflect.Message
- func (x *CreateTxReq) Reset()
- func (x *CreateTxReq) String() string
- type CreateTxResp
- type DeleteTxReq
- type DeleteTxResp
- type Duration
- type GetTxReq
- type ListTxDateRangeReq
- func (*ListTxDateRangeReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListTxDateRangeReq) GetLeftDate() int64
- func (x *ListTxDateRangeReq) GetRightTxDate() int64
- func (*ListTxDateRangeReq) ProtoMessage()
- func (x *ListTxDateRangeReq) ProtoReflect() protoreflect.Message
- func (x *ListTxDateRangeReq) Reset()
- func (x *ListTxDateRangeReq) String() string
- type ListTxReq
- func (*ListTxReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListTxReq) GetKeyword() string
- func (x *ListTxReq) GetPaymentId() int64
- func (x *ListTxReq) GetTxDateRange() *ListTxDateRangeReq
- func (x *ListTxReq) GetTxStatus() int64
- func (x *ListTxReq) GetTxType() string
- func (x *ListTxReq) GetUserId() int64
- func (*ListTxReq) ProtoMessage()
- func (x *ListTxReq) ProtoReflect() protoreflect.Message
- func (x *ListTxReq) Reset()
- func (x *ListTxReq) String() string
- type ListTxResp
- type TransactionClient
- type TransactionHTTPClient
- type TransactionHTTPClientImpl
- func (c *TransactionHTTPClientImpl) CreateTx(ctx context.Context, in *CreateTxReq, opts ...http.CallOption) (*CreateTxResp, error)
- func (c *TransactionHTTPClientImpl) DeleteTx(ctx context.Context, in *DeleteTxReq, opts ...http.CallOption) (*DeleteTxResp, error)
- func (c *TransactionHTTPClientImpl) GetTx(ctx context.Context, in *GetTxReq, opts ...http.CallOption) (*TxResp, error)
- func (c *TransactionHTTPClientImpl) GetTxByTxNo(ctx context.Context, in *GetTxReq, opts ...http.CallOption) (*TxResp, error)
- func (c *TransactionHTTPClientImpl) ListTx(ctx context.Context, in *ListTxReq, opts ...http.CallOption) (*ListTxResp, error)
- func (c *TransactionHTTPClientImpl) ListTxByPaymentId(ctx context.Context, in *ListTxReq, opts ...http.CallOption) (*ListTxResp, error)
- func (c *TransactionHTTPClientImpl) ListTxByTxDateRange(ctx context.Context, in *ListTxDateRangeReq, opts ...http.CallOption) (*ListTxResp, error)
- func (c *TransactionHTTPClientImpl) ListTxByTxStatus(ctx context.Context, in *ListTxReq, opts ...http.CallOption) (*ListTxResp, error)
- func (c *TransactionHTTPClientImpl) ListTxByTxType(ctx context.Context, in *ListTxReq, opts ...http.CallOption) (*ListTxResp, error)
- func (c *TransactionHTTPClientImpl) ListTxByUserId(ctx context.Context, in *ListTxReq, opts ...http.CallOption) (*ListTxResp, error)
- func (c *TransactionHTTPClientImpl) UpdateTx(ctx context.Context, in *UpdateTxReq, opts ...http.CallOption) (*UpdateTxResp, error)
- type TransactionHTTPServer
- type TransactionServer
- type TxItemResp
- func (*TxItemResp) Descriptor() ([]byte, []int)deprecated
- func (x *TxItemResp) GetAuthor() string
- func (x *TxItemResp) GetBookId() int64
- func (x *TxItemResp) GetImageUrl() string
- func (x *TxItemResp) GetIsbn() string
- func (x *TxItemResp) GetPrice() string
- func (x *TxItemResp) GetPublisherId() int64
- func (x *TxItemResp) GetQuantity() int32
- func (x *TxItemResp) GetTitle() string
- func (x *TxItemResp) GetTxId() int64
- func (x *TxItemResp) GetTxItemId() int64
- func (x *TxItemResp) GetTxType() string
- func (*TxItemResp) ProtoMessage()
- func (x *TxItemResp) ProtoReflect() protoreflect.Message
- func (x *TxItemResp) Reset()
- func (x *TxItemResp) String() string
- type TxResp
- func (*TxResp) Descriptor() ([]byte, []int)deprecated
- func (x *TxResp) GetPaymentId() int64
- func (x *TxResp) GetQuantity() int32
- func (x *TxResp) GetTxAmount() float32
- func (x *TxResp) GetTxDate() *durationpb.Duration
- func (x *TxResp) GetTxId() int64
- func (x *TxResp) GetTxItems() []*TxItemResp
- func (x *TxResp) GetTxNo() string
- func (x *TxResp) GetTxStatus() string
- func (x *TxResp) GetTxType() string
- func (x *TxResp) GetUserId() int64
- func (*TxResp) ProtoMessage()
- func (x *TxResp) ProtoReflect() protoreflect.Message
- func (x *TxResp) Reset()
- func (x *TxResp) String() string
- type UnimplementedTransactionServer
- func (UnimplementedTransactionServer) CreateTx(context.Context, *CreateTxReq) (*CreateTxResp, error)
- func (UnimplementedTransactionServer) DeleteTx(context.Context, *DeleteTxReq) (*DeleteTxResp, error)
- func (UnimplementedTransactionServer) GetTx(context.Context, *GetTxReq) (*TxResp, error)
- func (UnimplementedTransactionServer) GetTxByTxNo(context.Context, *GetTxReq) (*TxResp, error)
- func (UnimplementedTransactionServer) ListTx(context.Context, *ListTxReq) (*ListTxResp, error)
- func (UnimplementedTransactionServer) ListTxByPaymentId(context.Context, *ListTxReq) (*ListTxResp, error)
- func (UnimplementedTransactionServer) ListTxByTxDateRange(context.Context, *ListTxDateRangeReq) (*ListTxResp, error)
- func (UnimplementedTransactionServer) ListTxByTxStatus(context.Context, *ListTxReq) (*ListTxResp, error)
- func (UnimplementedTransactionServer) ListTxByTxType(context.Context, *ListTxReq) (*ListTxResp, error)
- func (UnimplementedTransactionServer) ListTxByUserId(context.Context, *ListTxReq) (*ListTxResp, error)
- func (UnimplementedTransactionServer) UpdateTx(context.Context, *UpdateTxReq) (*UpdateTxResp, error)
- type UnsafeTransactionServer
- type UpdateTxReq
- func (*UpdateTxReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateTxReq) GetPaymentId() int64
- func (x *UpdateTxReq) GetQuantity() int32
- func (x *UpdateTxReq) GetTxAmount() float32
- func (x *UpdateTxReq) GetTxDate() *durationpb.Duration
- func (x *UpdateTxReq) GetTxId() int64
- func (x *UpdateTxReq) GetTxNo() string
- func (x *UpdateTxReq) GetTxStatus() string
- func (x *UpdateTxReq) GetTxType() string
- func (x *UpdateTxReq) GetUserId() int64
- func (*UpdateTxReq) ProtoMessage()
- func (x *UpdateTxReq) ProtoReflect() protoreflect.Message
- func (x *UpdateTxReq) Reset()
- func (x *UpdateTxReq) String() string
- type UpdateTxResp
Constants ¶
const ( Transaction_CreateTx_FullMethodName = "/api.transaction.service.v1.Transaction/CreateTx" Transaction_UpdateTx_FullMethodName = "/api.transaction.service.v1.Transaction/UpdateTx" Transaction_DeleteTx_FullMethodName = "/api.transaction.service.v1.Transaction/DeleteTx" Transaction_GetTx_FullMethodName = "/api.transaction.service.v1.Transaction/GetTx" Transaction_ListTx_FullMethodName = "/api.transaction.service.v1.Transaction/ListTx" Transaction_GetTxByTxNo_FullMethodName = "/api.transaction.service.v1.Transaction/GetTxByTxNo" Transaction_ListTxByTxType_FullMethodName = "/api.transaction.service.v1.Transaction/ListTxByTxType" Transaction_ListTxByUserId_FullMethodName = "/api.transaction.service.v1.Transaction/ListTxByUserId" Transaction_ListTxByPaymentId_FullMethodName = "/api.transaction.service.v1.Transaction/ListTxByPaymentId" Transaction_ListTxByTxStatus_FullMethodName = "/api.transaction.service.v1.Transaction/ListTxByTxStatus" Transaction_ListTxByTxDateRange_FullMethodName = "/api.transaction.service.v1.Transaction/ListTxByTxDateRange" )
const OperationTransactionCreateTx = "/api.transaction.service.v1.Transaction/CreateTx"
const OperationTransactionDeleteTx = "/api.transaction.service.v1.Transaction/DeleteTx"
const OperationTransactionGetTx = "/api.transaction.service.v1.Transaction/GetTx"
const OperationTransactionGetTxByTxNo = "/api.transaction.service.v1.Transaction/GetTxByTxNo"
const OperationTransactionListTx = "/api.transaction.service.v1.Transaction/ListTx"
const OperationTransactionListTxByPaymentId = "/api.transaction.service.v1.Transaction/ListTxByPaymentId"
const OperationTransactionListTxByTxDateRange = "/api.transaction.service.v1.Transaction/ListTxByTxDateRange"
const OperationTransactionListTxByTxStatus = "/api.transaction.service.v1.Transaction/ListTxByTxStatus"
const OperationTransactionListTxByTxType = "/api.transaction.service.v1.Transaction/ListTxByTxType"
const OperationTransactionListTxByUserId = "/api.transaction.service.v1.Transaction/ListTxByUserId"
const OperationTransactionUpdateTx = "/api.transaction.service.v1.Transaction/UpdateTx"
Variables ¶
var File_api_transaction_service_v1_transaction_proto protoreflect.FileDescriptor
var Transaction_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.transaction.service.v1.Transaction", HandlerType: (*TransactionServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateTx", Handler: _Transaction_CreateTx_Handler, }, { MethodName: "UpdateTx", Handler: _Transaction_UpdateTx_Handler, }, { MethodName: "DeleteTx", Handler: _Transaction_DeleteTx_Handler, }, { MethodName: "GetTx", Handler: _Transaction_GetTx_Handler, }, { MethodName: "ListTx", Handler: _Transaction_ListTx_Handler, }, { MethodName: "GetTxByTxNo", Handler: _Transaction_GetTxByTxNo_Handler, }, { MethodName: "ListTxByTxType", Handler: _Transaction_ListTxByTxType_Handler, }, { MethodName: "ListTxByUserId", Handler: _Transaction_ListTxByUserId_Handler, }, { MethodName: "ListTxByPaymentId", Handler: _Transaction_ListTxByPaymentId_Handler, }, { MethodName: "ListTxByTxStatus", Handler: _Transaction_ListTxByTxStatus_Handler, }, { MethodName: "ListTxByTxDateRange", Handler: _Transaction_ListTxByTxDateRange_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/github.com/xuanyiying/publication-shop/app/transaction/service/v1/transaction.proto", }
Transaction_ServiceDesc is the grpc.ServiceDesc for Transaction service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTransactionHTTPServer ¶
func RegisterTransactionHTTPServer(s *http.Server, srv TransactionHTTPServer)
func RegisterTransactionServer ¶
func RegisterTransactionServer(s grpc.ServiceRegistrar, srv TransactionServer)
Types ¶
type CreateTxReq ¶
type CreateTxReq struct { TxNo string `protobuf:"bytes,1,opt,name=txNo,proto3" json:"txNo,omitempty"` TxType string `protobuf:"bytes,2,opt,name=txType,proto3" json:"txType,omitempty"` UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` Quantity int32 `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"` TxStatus string `protobuf:"bytes,5,opt,name=txStatus,proto3" json:"txStatus,omitempty"` TxAmount float32 `protobuf:"fixed32,6,opt,name=txAmount,proto3" json:"txAmount,omitempty"` // contains filtered or unexported fields }
func (*CreateTxReq) Descriptor
deprecated
func (*CreateTxReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateTxReq.ProtoReflect.Descriptor instead.
func (*CreateTxReq) GetQuantity ¶
func (x *CreateTxReq) GetQuantity() int32
func (*CreateTxReq) GetTxAmount ¶
func (x *CreateTxReq) GetTxAmount() float32
func (*CreateTxReq) GetTxNo ¶
func (x *CreateTxReq) GetTxNo() string
func (*CreateTxReq) GetTxStatus ¶
func (x *CreateTxReq) GetTxStatus() string
func (*CreateTxReq) GetTxType ¶
func (x *CreateTxReq) GetTxType() string
func (*CreateTxReq) GetUserId ¶
func (x *CreateTxReq) GetUserId() int64
func (*CreateTxReq) ProtoMessage ¶
func (*CreateTxReq) ProtoMessage()
func (*CreateTxReq) ProtoReflect ¶
func (x *CreateTxReq) ProtoReflect() protoreflect.Message
func (*CreateTxReq) Reset ¶
func (x *CreateTxReq) Reset()
func (*CreateTxReq) String ¶
func (x *CreateTxReq) String() string
type CreateTxResp ¶
type CreateTxResp struct { TxId int64 `protobuf:"varint,1,opt,name=txId,proto3" json:"txId,omitempty"` // contains filtered or unexported fields }
func (*CreateTxResp) Descriptor
deprecated
func (*CreateTxResp) Descriptor() ([]byte, []int)
Deprecated: Use CreateTxResp.ProtoReflect.Descriptor instead.
func (*CreateTxResp) GetTxId ¶
func (x *CreateTxResp) GetTxId() int64
func (*CreateTxResp) ProtoMessage ¶
func (*CreateTxResp) ProtoMessage()
func (*CreateTxResp) ProtoReflect ¶
func (x *CreateTxResp) ProtoReflect() protoreflect.Message
func (*CreateTxResp) Reset ¶
func (x *CreateTxResp) Reset()
func (*CreateTxResp) String ¶
func (x *CreateTxResp) String() string
type DeleteTxReq ¶
type DeleteTxReq struct { TxId int64 `protobuf:"varint,1,opt,name=txId,proto3" json:"txId,omitempty"` // contains filtered or unexported fields }
func (*DeleteTxReq) Descriptor
deprecated
func (*DeleteTxReq) Descriptor() ([]byte, []int)
Deprecated: Use DeleteTxReq.ProtoReflect.Descriptor instead.
func (*DeleteTxReq) GetTxId ¶
func (x *DeleteTxReq) GetTxId() int64
func (*DeleteTxReq) ProtoMessage ¶
func (*DeleteTxReq) ProtoMessage()
func (*DeleteTxReq) ProtoReflect ¶
func (x *DeleteTxReq) ProtoReflect() protoreflect.Message
func (*DeleteTxReq) Reset ¶
func (x *DeleteTxReq) Reset()
func (*DeleteTxReq) String ¶
func (x *DeleteTxReq) String() string
type DeleteTxResp ¶
type DeleteTxResp struct { TxId int64 `protobuf:"varint,1,opt,name=txId,proto3" json:"txId,omitempty"` // contains filtered or unexported fields }
func (*DeleteTxResp) Descriptor
deprecated
func (*DeleteTxResp) Descriptor() ([]byte, []int)
Deprecated: Use DeleteTxResp.ProtoReflect.Descriptor instead.
func (*DeleteTxResp) GetTxId ¶
func (x *DeleteTxResp) GetTxId() int64
func (*DeleteTxResp) ProtoMessage ¶
func (*DeleteTxResp) ProtoMessage()
func (*DeleteTxResp) ProtoReflect ¶
func (x *DeleteTxResp) ProtoReflect() protoreflect.Message
func (*DeleteTxResp) Reset ¶
func (x *DeleteTxResp) Reset()
func (*DeleteTxResp) String ¶
func (x *DeleteTxResp) String() string
type Duration ¶
type Duration = durationpb.Duration
type GetTxReq ¶
type GetTxReq struct { TxId int64 `protobuf:"varint,1,opt,name=txId,proto3" json:"txId,omitempty"` // contains filtered or unexported fields }
func (*GetTxReq) Descriptor
deprecated
func (*GetTxReq) ProtoMessage ¶
func (*GetTxReq) ProtoMessage()
func (*GetTxReq) ProtoReflect ¶
func (x *GetTxReq) ProtoReflect() protoreflect.Message
type ListTxDateRangeReq ¶
type ListTxDateRangeReq struct { LeftDate int64 `protobuf:"varint,1,opt,name=leftDate,proto3" json:"leftDate,omitempty"` RightTxDate int64 `protobuf:"varint,2,opt,name=rightTxDate,proto3" json:"rightTxDate,omitempty"` // contains filtered or unexported fields }
func (*ListTxDateRangeReq) Descriptor
deprecated
func (*ListTxDateRangeReq) Descriptor() ([]byte, []int)
Deprecated: Use ListTxDateRangeReq.ProtoReflect.Descriptor instead.
func (*ListTxDateRangeReq) GetLeftDate ¶
func (x *ListTxDateRangeReq) GetLeftDate() int64
func (*ListTxDateRangeReq) GetRightTxDate ¶
func (x *ListTxDateRangeReq) GetRightTxDate() int64
func (*ListTxDateRangeReq) ProtoMessage ¶
func (*ListTxDateRangeReq) ProtoMessage()
func (*ListTxDateRangeReq) ProtoReflect ¶
func (x *ListTxDateRangeReq) ProtoReflect() protoreflect.Message
func (*ListTxDateRangeReq) Reset ¶
func (x *ListTxDateRangeReq) Reset()
func (*ListTxDateRangeReq) String ¶
func (x *ListTxDateRangeReq) String() string
type ListTxReq ¶
type ListTxReq struct { Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` TxType string `protobuf:"bytes,2,opt,name=txType,proto3" json:"txType,omitempty"` UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` PaymentId int64 `protobuf:"varint,4,opt,name=paymentId,proto3" json:"paymentId,omitempty"` TxStatus int64 `protobuf:"varint,5,opt,name=txStatus,proto3" json:"txStatus,omitempty"` TxDateRange *ListTxDateRangeReq `protobuf:"bytes,6,opt,name=txDateRange,proto3" json:"txDateRange,omitempty"` // contains filtered or unexported fields }
func (*ListTxReq) Descriptor
deprecated
func (*ListTxReq) GetKeyword ¶
func (*ListTxReq) GetPaymentId ¶
func (*ListTxReq) GetTxDateRange ¶
func (x *ListTxReq) GetTxDateRange() *ListTxDateRangeReq
func (*ListTxReq) GetTxStatus ¶
func (*ListTxReq) ProtoMessage ¶
func (*ListTxReq) ProtoMessage()
func (*ListTxReq) ProtoReflect ¶
func (x *ListTxReq) ProtoReflect() protoreflect.Message
type ListTxResp ¶
type ListTxResp struct { // 注意:这里需要定义返回的列表,例如: Transactions []*TxResp `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` // contains filtered or unexported fields }
func (*ListTxResp) Descriptor
deprecated
func (*ListTxResp) Descriptor() ([]byte, []int)
Deprecated: Use ListTxResp.ProtoReflect.Descriptor instead.
func (*ListTxResp) GetTransactions ¶
func (x *ListTxResp) GetTransactions() []*TxResp
func (*ListTxResp) ProtoMessage ¶
func (*ListTxResp) ProtoMessage()
func (*ListTxResp) ProtoReflect ¶
func (x *ListTxResp) ProtoReflect() protoreflect.Message
func (*ListTxResp) Reset ¶
func (x *ListTxResp) Reset()
func (*ListTxResp) String ¶
func (x *ListTxResp) String() string
type TransactionClient ¶
type TransactionClient interface { CreateTx(ctx context.Context, in *CreateTxReq, opts ...grpc.CallOption) (*CreateTxResp, error) UpdateTx(ctx context.Context, in *UpdateTxReq, opts ...grpc.CallOption) (*UpdateTxResp, error) DeleteTx(ctx context.Context, in *DeleteTxReq, opts ...grpc.CallOption) (*DeleteTxResp, error) GetTx(ctx context.Context, in *GetTxReq, opts ...grpc.CallOption) (*TxResp, error) ListTx(ctx context.Context, in *ListTxReq, opts ...grpc.CallOption) (*ListTxResp, error) GetTxByTxNo(ctx context.Context, in *GetTxReq, opts ...grpc.CallOption) (*TxResp, error) ListTxByTxType(ctx context.Context, in *ListTxReq, opts ...grpc.CallOption) (*ListTxResp, error) ListTxByUserId(ctx context.Context, in *ListTxReq, opts ...grpc.CallOption) (*ListTxResp, error) ListTxByPaymentId(ctx context.Context, in *ListTxReq, opts ...grpc.CallOption) (*ListTxResp, error) ListTxByTxStatus(ctx context.Context, in *ListTxReq, opts ...grpc.CallOption) (*ListTxResp, error) ListTxByTxDateRange(ctx context.Context, in *ListTxDateRangeReq, opts ...grpc.CallOption) (*ListTxResp, error) }
TransactionClient is the client API for Transaction 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 NewTransactionClient ¶
func NewTransactionClient(cc grpc.ClientConnInterface) TransactionClient
type TransactionHTTPClient ¶
type TransactionHTTPClient interface { CreateTx(ctx context.Context, req *CreateTxReq, opts ...http.CallOption) (rsp *CreateTxResp, err error) DeleteTx(ctx context.Context, req *DeleteTxReq, opts ...http.CallOption) (rsp *DeleteTxResp, err error) GetTx(ctx context.Context, req *GetTxReq, opts ...http.CallOption) (rsp *TxResp, err error) GetTxByTxNo(ctx context.Context, req *GetTxReq, opts ...http.CallOption) (rsp *TxResp, err error) ListTx(ctx context.Context, req *ListTxReq, opts ...http.CallOption) (rsp *ListTxResp, err error) ListTxByPaymentId(ctx context.Context, req *ListTxReq, opts ...http.CallOption) (rsp *ListTxResp, err error) ListTxByTxDateRange(ctx context.Context, req *ListTxDateRangeReq, opts ...http.CallOption) (rsp *ListTxResp, err error) ListTxByTxStatus(ctx context.Context, req *ListTxReq, opts ...http.CallOption) (rsp *ListTxResp, err error) ListTxByTxType(ctx context.Context, req *ListTxReq, opts ...http.CallOption) (rsp *ListTxResp, err error) ListTxByUserId(ctx context.Context, req *ListTxReq, opts ...http.CallOption) (rsp *ListTxResp, err error) UpdateTx(ctx context.Context, req *UpdateTxReq, opts ...http.CallOption) (rsp *UpdateTxResp, err error) }
func NewTransactionHTTPClient ¶
func NewTransactionHTTPClient(client *http.Client) TransactionHTTPClient
type TransactionHTTPClientImpl ¶
type TransactionHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*TransactionHTTPClientImpl) CreateTx ¶
func (c *TransactionHTTPClientImpl) CreateTx(ctx context.Context, in *CreateTxReq, opts ...http.CallOption) (*CreateTxResp, error)
func (*TransactionHTTPClientImpl) DeleteTx ¶
func (c *TransactionHTTPClientImpl) DeleteTx(ctx context.Context, in *DeleteTxReq, opts ...http.CallOption) (*DeleteTxResp, error)
func (*TransactionHTTPClientImpl) GetTx ¶
func (c *TransactionHTTPClientImpl) GetTx(ctx context.Context, in *GetTxReq, opts ...http.CallOption) (*TxResp, error)
func (*TransactionHTTPClientImpl) GetTxByTxNo ¶
func (c *TransactionHTTPClientImpl) GetTxByTxNo(ctx context.Context, in *GetTxReq, opts ...http.CallOption) (*TxResp, error)
func (*TransactionHTTPClientImpl) ListTx ¶
func (c *TransactionHTTPClientImpl) ListTx(ctx context.Context, in *ListTxReq, opts ...http.CallOption) (*ListTxResp, error)
func (*TransactionHTTPClientImpl) ListTxByPaymentId ¶
func (c *TransactionHTTPClientImpl) ListTxByPaymentId(ctx context.Context, in *ListTxReq, opts ...http.CallOption) (*ListTxResp, error)
func (*TransactionHTTPClientImpl) ListTxByTxDateRange ¶
func (c *TransactionHTTPClientImpl) ListTxByTxDateRange(ctx context.Context, in *ListTxDateRangeReq, opts ...http.CallOption) (*ListTxResp, error)
func (*TransactionHTTPClientImpl) ListTxByTxStatus ¶
func (c *TransactionHTTPClientImpl) ListTxByTxStatus(ctx context.Context, in *ListTxReq, opts ...http.CallOption) (*ListTxResp, error)
func (*TransactionHTTPClientImpl) ListTxByTxType ¶
func (c *TransactionHTTPClientImpl) ListTxByTxType(ctx context.Context, in *ListTxReq, opts ...http.CallOption) (*ListTxResp, error)
func (*TransactionHTTPClientImpl) ListTxByUserId ¶
func (c *TransactionHTTPClientImpl) ListTxByUserId(ctx context.Context, in *ListTxReq, opts ...http.CallOption) (*ListTxResp, error)
func (*TransactionHTTPClientImpl) UpdateTx ¶
func (c *TransactionHTTPClientImpl) UpdateTx(ctx context.Context, in *UpdateTxReq, opts ...http.CallOption) (*UpdateTxResp, error)
type TransactionHTTPServer ¶
type TransactionHTTPServer interface { CreateTx(context.Context, *CreateTxReq) (*CreateTxResp, error) DeleteTx(context.Context, *DeleteTxReq) (*DeleteTxResp, error) GetTx(context.Context, *GetTxReq) (*TxResp, error) GetTxByTxNo(context.Context, *GetTxReq) (*TxResp, error) ListTx(context.Context, *ListTxReq) (*ListTxResp, error) ListTxByPaymentId(context.Context, *ListTxReq) (*ListTxResp, error) ListTxByTxDateRange(context.Context, *ListTxDateRangeReq) (*ListTxResp, error) ListTxByTxStatus(context.Context, *ListTxReq) (*ListTxResp, error) ListTxByTxType(context.Context, *ListTxReq) (*ListTxResp, error) ListTxByUserId(context.Context, *ListTxReq) (*ListTxResp, error) UpdateTx(context.Context, *UpdateTxReq) (*UpdateTxResp, error) }
type TransactionServer ¶
type TransactionServer interface { CreateTx(context.Context, *CreateTxReq) (*CreateTxResp, error) UpdateTx(context.Context, *UpdateTxReq) (*UpdateTxResp, error) DeleteTx(context.Context, *DeleteTxReq) (*DeleteTxResp, error) GetTx(context.Context, *GetTxReq) (*TxResp, error) ListTx(context.Context, *ListTxReq) (*ListTxResp, error) GetTxByTxNo(context.Context, *GetTxReq) (*TxResp, error) ListTxByTxType(context.Context, *ListTxReq) (*ListTxResp, error) ListTxByUserId(context.Context, *ListTxReq) (*ListTxResp, error) ListTxByPaymentId(context.Context, *ListTxReq) (*ListTxResp, error) ListTxByTxStatus(context.Context, *ListTxReq) (*ListTxResp, error) ListTxByTxDateRange(context.Context, *ListTxDateRangeReq) (*ListTxResp, error) // contains filtered or unexported methods }
TransactionServer is the server API for Transaction service. All implementations must embed UnimplementedTransactionServer for forward compatibility
type TxItemResp ¶
type TxItemResp struct { TxItemId int64 `protobuf:"varint,1,opt,name=txItemId,proto3" json:"txItemId,omitempty"` // 交易明细ID,主键 TxType string `protobuf:"bytes,2,opt,name=txType,proto3" json:"txType,omitempty"` // 交易类型(买或卖) TxId int64 `protobuf:"varint,3,opt,name=txId,proto3" json:"txId,omitempty"` // 交易ID BookId int64 `protobuf:"varint,4,opt,name=bookId,proto3" json:"bookId,omitempty"` // 书籍ID Quantity int32 `protobuf:"varint,5,opt,name=quantity,proto3" json:"quantity,omitempty"` // 交易数量 Price string `protobuf:"bytes,6,opt,name=price,proto3" json:"price,omitempty"` // 交易价格 Isbn string `protobuf:"bytes,7,opt,name=isbn,proto3" json:"isbn,omitempty"` // ISBN Title string `protobuf:"bytes,8,opt,name=title,proto3" json:"title,omitempty"` // 书名 Author string `protobuf:"bytes,9,opt,name=author,proto3" json:"author,omitempty"` // 主编 PublisherId int64 `protobuf:"varint,10,opt,name=publisherId,proto3" json:"publisherId,omitempty"` // 出版社ID ImageUrl string `protobuf:"bytes,11,opt,name=imageUrl,proto3" json:"imageUrl,omitempty"` // 图片URL // contains filtered or unexported fields }
func (*TxItemResp) Descriptor
deprecated
func (*TxItemResp) Descriptor() ([]byte, []int)
Deprecated: Use TxItemResp.ProtoReflect.Descriptor instead.
func (*TxItemResp) GetAuthor ¶
func (x *TxItemResp) GetAuthor() string
func (*TxItemResp) GetBookId ¶
func (x *TxItemResp) GetBookId() int64
func (*TxItemResp) GetImageUrl ¶
func (x *TxItemResp) GetImageUrl() string
func (*TxItemResp) GetIsbn ¶
func (x *TxItemResp) GetIsbn() string
func (*TxItemResp) GetPrice ¶
func (x *TxItemResp) GetPrice() string
func (*TxItemResp) GetPublisherId ¶
func (x *TxItemResp) GetPublisherId() int64
func (*TxItemResp) GetQuantity ¶
func (x *TxItemResp) GetQuantity() int32
func (*TxItemResp) GetTitle ¶
func (x *TxItemResp) GetTitle() string
func (*TxItemResp) GetTxId ¶
func (x *TxItemResp) GetTxId() int64
func (*TxItemResp) GetTxItemId ¶
func (x *TxItemResp) GetTxItemId() int64
func (*TxItemResp) GetTxType ¶
func (x *TxItemResp) GetTxType() string
func (*TxItemResp) ProtoMessage ¶
func (*TxItemResp) ProtoMessage()
func (*TxItemResp) ProtoReflect ¶
func (x *TxItemResp) ProtoReflect() protoreflect.Message
func (*TxItemResp) Reset ¶
func (x *TxItemResp) Reset()
func (*TxItemResp) String ¶
func (x *TxItemResp) String() string
type TxResp ¶
type TxResp struct { TxId int64 `protobuf:"varint,1,opt,name=txId,proto3" json:"txId,omitempty"` TxNo string `protobuf:"bytes,2,opt,name=txNo,proto3" json:"txNo,omitempty"` TxType string `protobuf:"bytes,3,opt,name=txType,proto3" json:"txType,omitempty"` UserId int64 `protobuf:"varint,4,opt,name=userId,proto3" json:"userId,omitempty"` Quantity int32 `protobuf:"varint,5,opt,name=quantity,proto3" json:"quantity,omitempty"` TxStatus string `protobuf:"bytes,6,opt,name=txStatus,proto3" json:"txStatus,omitempty"` TxAmount float32 `protobuf:"fixed32,7,opt,name=txAmount,proto3" json:"txAmount,omitempty"` TxDate *durationpb.Duration `protobuf:"bytes,8,opt,name=txDate,proto3" json:"txDate,omitempty"` PaymentId int64 `protobuf:"varint,9,opt,name=paymentId,proto3" json:"paymentId,omitempty"` TxItems []*TxItemResp `protobuf:"bytes,10,rep,name=txItems,proto3" json:"txItems,omitempty"` // contains filtered or unexported fields }
func (*TxResp) Descriptor
deprecated
func (*TxResp) GetPaymentId ¶
func (*TxResp) GetQuantity ¶
func (*TxResp) GetTxAmount ¶
func (*TxResp) GetTxDate ¶
func (x *TxResp) GetTxDate() *durationpb.Duration
func (*TxResp) GetTxItems ¶
func (x *TxResp) GetTxItems() []*TxItemResp
func (*TxResp) GetTxStatus ¶
func (*TxResp) ProtoMessage ¶
func (*TxResp) ProtoMessage()
func (*TxResp) ProtoReflect ¶
func (x *TxResp) ProtoReflect() protoreflect.Message
type UnimplementedTransactionServer ¶
type UnimplementedTransactionServer struct { }
UnimplementedTransactionServer must be embedded to have forward compatible implementations.
func (UnimplementedTransactionServer) CreateTx ¶
func (UnimplementedTransactionServer) CreateTx(context.Context, *CreateTxReq) (*CreateTxResp, error)
func (UnimplementedTransactionServer) DeleteTx ¶
func (UnimplementedTransactionServer) DeleteTx(context.Context, *DeleteTxReq) (*DeleteTxResp, error)
func (UnimplementedTransactionServer) GetTxByTxNo ¶
func (UnimplementedTransactionServer) ListTx ¶
func (UnimplementedTransactionServer) ListTx(context.Context, *ListTxReq) (*ListTxResp, error)
func (UnimplementedTransactionServer) ListTxByPaymentId ¶
func (UnimplementedTransactionServer) ListTxByPaymentId(context.Context, *ListTxReq) (*ListTxResp, error)
func (UnimplementedTransactionServer) ListTxByTxDateRange ¶
func (UnimplementedTransactionServer) ListTxByTxDateRange(context.Context, *ListTxDateRangeReq) (*ListTxResp, error)
func (UnimplementedTransactionServer) ListTxByTxStatus ¶
func (UnimplementedTransactionServer) ListTxByTxStatus(context.Context, *ListTxReq) (*ListTxResp, error)
func (UnimplementedTransactionServer) ListTxByTxType ¶
func (UnimplementedTransactionServer) ListTxByTxType(context.Context, *ListTxReq) (*ListTxResp, error)
func (UnimplementedTransactionServer) ListTxByUserId ¶
func (UnimplementedTransactionServer) ListTxByUserId(context.Context, *ListTxReq) (*ListTxResp, error)
func (UnimplementedTransactionServer) UpdateTx ¶
func (UnimplementedTransactionServer) UpdateTx(context.Context, *UpdateTxReq) (*UpdateTxResp, error)
type UnsafeTransactionServer ¶
type UnsafeTransactionServer interface {
// contains filtered or unexported methods
}
UnsafeTransactionServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TransactionServer will result in compilation errors.
type UpdateTxReq ¶
type UpdateTxReq struct { TxId int64 `protobuf:"varint,1,opt,name=txId,proto3" json:"txId,omitempty"` TxNo string `protobuf:"bytes,2,opt,name=txNo,proto3" json:"txNo,omitempty"` TxType string `protobuf:"bytes,3,opt,name=txType,proto3" json:"txType,omitempty"` UserId int64 `protobuf:"varint,4,opt,name=userId,proto3" json:"userId,omitempty"` Quantity int32 `protobuf:"varint,5,opt,name=quantity,proto3" json:"quantity,omitempty"` TxStatus string `protobuf:"bytes,6,opt,name=txStatus,proto3" json:"txStatus,omitempty"` TxAmount float32 `protobuf:"fixed32,7,opt,name=txAmount,proto3" json:"txAmount,omitempty"` TxDate *durationpb.Duration `protobuf:"bytes,8,opt,name=txDate,proto3" json:"txDate,omitempty"` PaymentId int64 `protobuf:"varint,9,opt,name=paymentId,proto3" json:"paymentId,omitempty"` // contains filtered or unexported fields }
func (*UpdateTxReq) Descriptor
deprecated
func (*UpdateTxReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateTxReq.ProtoReflect.Descriptor instead.
func (*UpdateTxReq) GetPaymentId ¶
func (x *UpdateTxReq) GetPaymentId() int64
func (*UpdateTxReq) GetQuantity ¶
func (x *UpdateTxReq) GetQuantity() int32
func (*UpdateTxReq) GetTxAmount ¶
func (x *UpdateTxReq) GetTxAmount() float32
func (*UpdateTxReq) GetTxDate ¶
func (x *UpdateTxReq) GetTxDate() *durationpb.Duration
func (*UpdateTxReq) GetTxId ¶
func (x *UpdateTxReq) GetTxId() int64
func (*UpdateTxReq) GetTxNo ¶
func (x *UpdateTxReq) GetTxNo() string
func (*UpdateTxReq) GetTxStatus ¶
func (x *UpdateTxReq) GetTxStatus() string
func (*UpdateTxReq) GetTxType ¶
func (x *UpdateTxReq) GetTxType() string
func (*UpdateTxReq) GetUserId ¶
func (x *UpdateTxReq) GetUserId() int64
func (*UpdateTxReq) ProtoMessage ¶
func (*UpdateTxReq) ProtoMessage()
func (*UpdateTxReq) ProtoReflect ¶
func (x *UpdateTxReq) ProtoReflect() protoreflect.Message
func (*UpdateTxReq) Reset ¶
func (x *UpdateTxReq) Reset()
func (*UpdateTxReq) String ¶
func (x *UpdateTxReq) String() string
type UpdateTxResp ¶
type UpdateTxResp struct { TxId int64 `protobuf:"varint,1,opt,name=txId,proto3" json:"txId,omitempty"` // contains filtered or unexported fields }
func (*UpdateTxResp) Descriptor
deprecated
func (*UpdateTxResp) Descriptor() ([]byte, []int)
Deprecated: Use UpdateTxResp.ProtoReflect.Descriptor instead.
func (*UpdateTxResp) GetTxId ¶
func (x *UpdateTxResp) GetTxId() int64
func (*UpdateTxResp) ProtoMessage ¶
func (*UpdateTxResp) ProtoMessage()
func (*UpdateTxResp) ProtoReflect ¶
func (x *UpdateTxResp) ProtoReflect() protoreflect.Message
func (*UpdateTxResp) Reset ¶
func (x *UpdateTxResp) Reset()
func (*UpdateTxResp) String ¶
func (x *UpdateTxResp) String() string