Documentation ¶
Overview ¶
Package order is a generated protocol buffer package.
It is generated from these files:
order.proto
It has these top-level messages:
CreateRequest CreateResponse
Index ¶
- func AcceptOrderServiceClient(lis net.Listener, x OrderService)
- func CheckSign(sign_str, data, salt string) bool
- func ListenAndServeOrderService(network, addr string, x OrderService) error
- func NewOrderServiceServer(x OrderService) *rpc.Server
- func RegisterOrderService(srv *rpc.Server, x OrderService) error
- func Sign(data string, salt string) string
- type CreateRequest
- type CreateResponse
- type OrderCreateRes
- func Create(dbname, site_id string, data map[string]string, url ...string) (*OrderCreateRes, error)
- func CreateByCart(dbname, site_id string, data map[string]interface{}, url ...string) (*OrderCreateRes, error)
- func CreateByChannel(dbname, site_id string, data map[string]string, url ...string) (*OrderCreateRes, error)
- func HandleRes(res *CreateResponse) (*OrderCreateRes, error)
- type OrderService
- type OrderServiceClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptOrderServiceClient ¶
func AcceptOrderServiceClient(lis net.Listener, x OrderService)
AcceptOrderServiceClient accepts connections on the listener and serves requests for each incoming connection. Accept blocks; the caller typically invokes it in a go statement.
func ListenAndServeOrderService ¶
func ListenAndServeOrderService(network, addr string, x OrderService) error
ListenAndServeOrderService listen announces on the local network address laddr and serves the given OrderService implementation.
func NewOrderServiceServer ¶
func NewOrderServiceServer(x OrderService) *rpc.Server
NewOrderServiceServer returns a new OrderService Server.
func RegisterOrderService ¶
func RegisterOrderService(srv *rpc.Server, x OrderService) error
RegisterOrderService publish the given OrderService implementation on the server.
Types ¶
type CreateRequest ¶
type CreateRequest struct { Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` Time *string `protobuf:"bytes,2,opt,name=time" json:"time,omitempty"` Sign *string `protobuf:"bytes,3,opt,name=sign" json:"sign,omitempty"` XXX_unrecognized []byte `json:"-"` }
下单请求结构
func (*CreateRequest) GetData ¶
func (m *CreateRequest) GetData() string
func (*CreateRequest) GetSign ¶
func (m *CreateRequest) GetSign() string
func (*CreateRequest) GetTime ¶
func (m *CreateRequest) GetTime() string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) Reset ¶
func (m *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (m *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` Time *string `protobuf:"bytes,2,opt,name=time" json:"time,omitempty"` Sign *string `protobuf:"bytes,3,opt,name=sign" json:"sign,omitempty"` XXX_unrecognized []byte `json:"-"` }
下单响应结构
func (*CreateResponse) GetData ¶
func (m *CreateResponse) GetData() string
func (*CreateResponse) GetSign ¶
func (m *CreateResponse) GetSign() string
func (*CreateResponse) GetTime ¶
func (m *CreateResponse) GetTime() string
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) Reset ¶
func (m *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (m *CreateResponse) String() string
type OrderCreateRes ¶
type OrderCreateRes struct {
OrderSn string
}
func CreateByCart ¶
func CreateByCart(dbname, site_id string, data map[string]interface{}, url ...string) (*OrderCreateRes, error)
func CreateByChannel ¶
type OrderService ¶
type OrderService interface { Create(in *CreateRequest, out *CreateResponse) error CreateByCart(in *CreateRequest, out *CreateResponse) error }
type OrderServiceClient ¶
func DialOrderService ¶
func DialOrderService(network, addr string) (*OrderServiceClient, *rpc.Client, error)
DialOrderService connects to an OrderService at the specified network address.
func DialOrderServiceTimeout ¶
func DialOrderServiceTimeout(network, addr string, timeout time.Duration) (*OrderServiceClient, *rpc.Client, error)
DialOrderServiceTimeout connects to an OrderService at the specified network address.
func NewOrderServiceClient ¶
func NewOrderServiceClient(conn io.ReadWriteCloser) (*OrderServiceClient, *rpc.Client)
NewOrderServiceClient returns a OrderService rpc.Client and stub to handle requests to the set of OrderService at the other end of the connection.
func (*OrderServiceClient) Create ¶
func (c *OrderServiceClient) Create(in *CreateRequest, out *CreateResponse) error
func (*OrderServiceClient) CreateByCart ¶
func (c *OrderServiceClient) CreateByCart(in *CreateRequest, out *CreateResponse) error