Documentation ¶
Index ¶
- func RegisterInventoryHandler(s server.Server, hdlr InventoryHandler, opts ...server.HandlerOption) error
- type Error
- func (*Error) Descriptor() ([]byte, []int)
- func (m *Error) GetCode() int32
- func (m *Error) GetDetail() string
- func (*Error) ProtoMessage()
- func (m *Error) Reset()
- func (m *Error) String() string
- func (m *Error) XXX_DiscardUnknown()
- func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Error) XXX_Merge(src proto.Message)
- func (m *Error) XXX_Size() int
- func (m *Error) XXX_Unmarshal(b []byte) error
- type Inv
- func (*Inv) Descriptor() ([]byte, []int)
- func (m *Inv) GetBookId() int64
- func (m *Inv) GetCreatedTime() int64
- func (m *Inv) GetId() int64
- func (m *Inv) GetStock() int64
- func (m *Inv) GetUnitPrice() int64
- func (m *Inv) GetUpdatedTime() int64
- func (m *Inv) GetVersion() int64
- func (*Inv) ProtoMessage()
- func (m *Inv) Reset()
- func (m *Inv) String() string
- func (m *Inv) XXX_DiscardUnknown()
- func (m *Inv) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Inv) XXX_Merge(src proto.Message)
- func (m *Inv) XXX_Size() int
- func (m *Inv) XXX_Unmarshal(b []byte) error
- type InvHistory
- func (*InvHistory) Descriptor() ([]byte, []int)
- func (m *InvHistory) GetBookId() int64
- func (m *InvHistory) GetId() int64
- func (m *InvHistory) GetState() int64
- func (m *InvHistory) GetUserId() int64
- func (*InvHistory) ProtoMessage()
- func (m *InvHistory) Reset()
- func (m *InvHistory) String() string
- func (m *InvHistory) XXX_DiscardUnknown()
- func (m *InvHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InvHistory) XXX_Merge(src proto.Message)
- func (m *InvHistory) XXX_Size() int
- func (m *InvHistory) XXX_Unmarshal(b []byte) error
- type InventoryHandler
- type InventoryService
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetBookId() int64
- func (m *Request) GetHistoryId() int64
- func (m *Request) GetHistoryState() int32
- func (m *Request) GetUserId() int64
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetError() *Error
- func (m *Response) GetInv() *Inv
- func (m *Response) GetInvH() *InvHistory
- func (m *Response) GetSuccess() bool
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterInventoryHandler ¶
func RegisterInventoryHandler(s server.Server, hdlr InventoryHandler, opts ...server.HandlerOption) error
Types ¶
type Error ¶
type Error struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Error) Descriptor ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) XXX_DiscardUnknown ¶
func (m *Error) XXX_DiscardUnknown()
func (*Error) XXX_Marshal ¶
func (*Error) XXX_Unmarshal ¶
type Inv ¶
type Inv struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` BookId int64 `protobuf:"varint,2,opt,name=bookId,proto3" json:"bookId,omitempty"` UnitPrice int64 `protobuf:"varint,3,opt,name=unitPrice,proto3" json:"unitPrice,omitempty"` Stock int64 `protobuf:"varint,4,opt,name=stock,proto3" json:"stock,omitempty"` Version int64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` CreatedTime int64 `protobuf:"varint,6,opt,name=createdTime,proto3" json:"createdTime,omitempty"` UpdatedTime int64 `protobuf:"varint,7,opt,name=updatedTime,proto3" json:"updatedTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Inv) Descriptor ¶
func (*Inv) GetCreatedTime ¶
func (*Inv) GetUnitPrice ¶
func (*Inv) GetUpdatedTime ¶
func (*Inv) GetVersion ¶
func (*Inv) ProtoMessage ¶
func (*Inv) ProtoMessage()
func (*Inv) XXX_DiscardUnknown ¶
func (m *Inv) XXX_DiscardUnknown()
func (*Inv) XXX_Unmarshal ¶
type InvHistory ¶
type InvHistory struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` BookId int64 `protobuf:"varint,2,opt,name=bookId,proto3" json:"bookId,omitempty"` UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` State int64 `protobuf:"varint,4,opt,name=state,proto3" json:"state,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*InvHistory) Descriptor ¶
func (*InvHistory) Descriptor() ([]byte, []int)
func (*InvHistory) GetBookId ¶
func (m *InvHistory) GetBookId() int64
func (*InvHistory) GetId ¶
func (m *InvHistory) GetId() int64
func (*InvHistory) GetState ¶
func (m *InvHistory) GetState() int64
func (*InvHistory) GetUserId ¶
func (m *InvHistory) GetUserId() int64
func (*InvHistory) ProtoMessage ¶
func (*InvHistory) ProtoMessage()
func (*InvHistory) Reset ¶
func (m *InvHistory) Reset()
func (*InvHistory) String ¶
func (m *InvHistory) String() string
func (*InvHistory) XXX_DiscardUnknown ¶
func (m *InvHistory) XXX_DiscardUnknown()
func (*InvHistory) XXX_Marshal ¶
func (m *InvHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InvHistory) XXX_Merge ¶
func (m *InvHistory) XXX_Merge(src proto.Message)
func (*InvHistory) XXX_Size ¶
func (m *InvHistory) XXX_Size() int
func (*InvHistory) XXX_Unmarshal ¶
func (m *InvHistory) XXX_Unmarshal(b []byte) error
type InventoryHandler ¶
type InventoryService ¶
type InventoryService interface { Sell(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error) Confirm(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error) }
func NewInventoryService ¶
func NewInventoryService(name string, c client.Client) InventoryService
type Request ¶
type Request struct { BookId int64 `protobuf:"varint,1,opt,name=bookId,proto3" json:"bookId,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` HistoryId int64 `protobuf:"varint,3,opt,name=historyId,proto3" json:"historyId,omitempty"` HistoryState int32 `protobuf:"varint,4,opt,name=historyState,proto3" json:"historyState,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) GetHistoryId ¶
func (*Request) GetHistoryState ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type Response ¶
type Response struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` Inv *Inv `protobuf:"bytes,3,opt,name=inv,proto3" json:"inv,omitempty"` InvH *InvHistory `protobuf:"bytes,4,opt,name=invH,proto3" json:"invH,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) GetInvH ¶
func (m *Response) GetInvH() *InvHistory
func (*Response) GetSuccess ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.