mu_micro_book_srv_inventory

package
v0.0.0-...-908d554 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Error) GetCode

func (m *Error) GetCode() int32

func (*Error) GetDetail

func (m *Error) GetDetail() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Error) XXX_Merge

func (m *Error) XXX_Merge(src proto.Message)

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

func (m *Error) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Inv) GetBookId

func (m *Inv) GetBookId() int64

func (*Inv) GetCreatedTime

func (m *Inv) GetCreatedTime() int64

func (*Inv) GetId

func (m *Inv) GetId() int64

func (*Inv) GetStock

func (m *Inv) GetStock() int64

func (*Inv) GetUnitPrice

func (m *Inv) GetUnitPrice() int64

func (*Inv) GetUpdatedTime

func (m *Inv) GetUpdatedTime() int64

func (*Inv) GetVersion

func (m *Inv) GetVersion() int64

func (*Inv) ProtoMessage

func (*Inv) ProtoMessage()

func (*Inv) Reset

func (m *Inv) Reset()

func (*Inv) String

func (m *Inv) String() string

func (*Inv) XXX_DiscardUnknown

func (m *Inv) XXX_DiscardUnknown()

func (*Inv) XXX_Marshal

func (m *Inv) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Inv) XXX_Merge

func (m *Inv) XXX_Merge(src proto.Message)

func (*Inv) XXX_Size

func (m *Inv) XXX_Size() int

func (*Inv) XXX_Unmarshal

func (m *Inv) XXX_Unmarshal(b []byte) error

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 InventoryHandler interface {
	Sell(context.Context, *Request, *Response) error
	Confirm(context.Context, *Request, *Response) error
}

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) Descriptor() ([]byte, []int)

func (*Request) GetBookId

func (m *Request) GetBookId() int64

func (*Request) GetHistoryId

func (m *Request) GetHistoryId() int64

func (*Request) GetHistoryState

func (m *Request) GetHistoryState() int32

func (*Request) GetUserId

func (m *Request) GetUserId() int64

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge

func (m *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

func (m *Request) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Response) GetError

func (m *Response) GetError() *Error

func (*Response) GetInv

func (m *Response) GetInv() *Inv

func (*Response) GetInvH

func (m *Response) GetInvH() *InvHistory

func (*Response) GetSuccess

func (m *Response) GetSuccess() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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