Documentation ¶
Index ¶
- Variables
- func NewOrderEndpoints() []*api.Endpoint
- func NewUserEndpoints() []*api.Endpoint
- func NewWxEndpoints() []*api.Endpoint
- func RegisterOrderHandler(s server.Server, hdlr OrderHandler, opts ...server.HandlerOption) error
- func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
- func RegisterWxHandler(s server.Server, hdlr WxHandler, opts ...server.HandlerOption) error
- type CreateOrderReq
- func (*CreateOrderReq) Descriptor() ([]byte, []int)
- func (m *CreateOrderReq) GetProducts() []*OrderProduct
- func (*CreateOrderReq) ProtoMessage()
- func (m *CreateOrderReq) Reset()
- func (m *CreateOrderReq) String() string
- func (m *CreateOrderReq) XXX_DiscardUnknown()
- func (m *CreateOrderReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateOrderReq) XXX_Merge(src proto.Message)
- func (m *CreateOrderReq) XXX_Size() int
- func (m *CreateOrderReq) XXX_Unmarshal(b []byte) error
- type CreateOrderRes
- func (*CreateOrderRes) Descriptor() ([]byte, []int)
- func (m *CreateOrderRes) GetOrder() *OrderRecord
- func (*CreateOrderRes) ProtoMessage()
- func (m *CreateOrderRes) Reset()
- func (m *CreateOrderRes) String() string
- func (m *CreateOrderRes) XXX_DiscardUnknown()
- func (m *CreateOrderRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateOrderRes) XXX_Merge(src proto.Message)
- func (m *CreateOrderRes) XXX_Size() int
- func (m *CreateOrderRes) XXX_Unmarshal(b []byte) error
- type GetUserInfoReq
- func (*GetUserInfoReq) Descriptor() ([]byte, []int)
- func (*GetUserInfoReq) ProtoMessage()
- func (m *GetUserInfoReq) Reset()
- func (m *GetUserInfoReq) String() string
- func (m *GetUserInfoReq) XXX_DiscardUnknown()
- func (m *GetUserInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetUserInfoReq) XXX_Merge(src proto.Message)
- func (m *GetUserInfoReq) XXX_Size() int
- func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error
- type GetUserInfoRes
- func (*GetUserInfoRes) Descriptor() ([]byte, []int)
- func (m *GetUserInfoRes) GetUser() *UserRecord
- func (*GetUserInfoRes) ProtoMessage()
- func (m *GetUserInfoRes) Reset()
- func (m *GetUserInfoRes) String() string
- func (m *GetUserInfoRes) XXX_DiscardUnknown()
- func (m *GetUserInfoRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetUserInfoRes) XXX_Merge(src proto.Message)
- func (m *GetUserInfoRes) XXX_Size() int
- func (m *GetUserInfoRes) XXX_Unmarshal(b []byte) error
- type ListOrderReq
- func (*ListOrderReq) Descriptor() ([]byte, []int)
- func (m *ListOrderReq) GetCursor() uint64
- func (*ListOrderReq) ProtoMessage()
- func (m *ListOrderReq) Reset()
- func (m *ListOrderReq) String() string
- func (m *ListOrderReq) XXX_DiscardUnknown()
- func (m *ListOrderReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListOrderReq) XXX_Merge(src proto.Message)
- func (m *ListOrderReq) XXX_Size() int
- func (m *ListOrderReq) XXX_Unmarshal(b []byte) error
- type ListOrderRes
- func (*ListOrderRes) Descriptor() ([]byte, []int)
- func (m *ListOrderRes) GetCursor() uint64
- func (m *ListOrderRes) GetOrders() []*OrderRecord
- func (*ListOrderRes) ProtoMessage()
- func (m *ListOrderRes) Reset()
- func (m *ListOrderRes) String() string
- func (m *ListOrderRes) XXX_DiscardUnknown()
- func (m *ListOrderRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListOrderRes) XXX_Merge(src proto.Message)
- func (m *ListOrderRes) XXX_Size() int
- func (m *ListOrderRes) XXX_Unmarshal(b []byte) error
- type LoginReq
- func (*LoginReq) Descriptor() ([]byte, []int)
- func (m *LoginReq) GetCode() string
- func (*LoginReq) ProtoMessage()
- func (m *LoginReq) Reset()
- func (m *LoginReq) String() string
- func (m *LoginReq) XXX_DiscardUnknown()
- func (m *LoginReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoginReq) XXX_Merge(src proto.Message)
- func (m *LoginReq) XXX_Size() int
- func (m *LoginReq) XXX_Unmarshal(b []byte) error
- type LoginRes
- func (*LoginRes) Descriptor() ([]byte, []int)
- func (m *LoginRes) GetAccessToken() string
- func (m *LoginRes) GetExpiry() int64
- func (m *LoginRes) GetRefreshToken() string
- func (m *LoginRes) GetUid() string
- func (*LoginRes) ProtoMessage()
- func (m *LoginRes) Reset()
- func (m *LoginRes) String() string
- func (m *LoginRes) XXX_DiscardUnknown()
- func (m *LoginRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoginRes) XXX_Merge(src proto.Message)
- func (m *LoginRes) XXX_Size() int
- func (m *LoginRes) XXX_Unmarshal(b []byte) error
- type OrderHandler
- type OrderProduct
- func (*OrderProduct) Descriptor() ([]byte, []int)
- func (m *OrderProduct) GetCount() int32
- func (m *OrderProduct) GetDetail() string
- func (m *OrderProduct) GetName() string
- func (m *OrderProduct) GetOrderId() uint64
- func (m *OrderProduct) GetPrice() int32
- func (m *OrderProduct) GetProductId() string
- func (m *OrderProduct) GetProductSnapshot() uint64
- func (*OrderProduct) ProtoMessage()
- func (m *OrderProduct) Reset()
- func (m *OrderProduct) String() string
- func (m *OrderProduct) XXX_DiscardUnknown()
- func (m *OrderProduct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OrderProduct) XXX_Merge(src proto.Message)
- func (m *OrderProduct) XXX_Size() int
- func (m *OrderProduct) XXX_Unmarshal(b []byte) error
- type OrderRecord
- func (*OrderRecord) Descriptor() ([]byte, []int)
- func (m *OrderRecord) GetAmount() int32
- func (m *OrderRecord) GetCreatedAt() int64
- func (m *OrderRecord) GetDeletedAt() int64
- func (m *OrderRecord) GetDiscount() int32
- func (m *OrderRecord) GetId() uint64
- func (m *OrderRecord) GetPay() int32
- func (m *OrderRecord) GetPayAt() int64
- func (m *OrderRecord) GetProducts() []*OrderProduct
- func (m *OrderRecord) GetState() OrderRecord_State
- func (m *OrderRecord) GetUid() string
- func (m *OrderRecord) GetUpdatedAt() int64
- func (*OrderRecord) ProtoMessage()
- func (m *OrderRecord) Reset()
- func (m *OrderRecord) String() string
- func (m *OrderRecord) XXX_DiscardUnknown()
- func (m *OrderRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OrderRecord) XXX_Merge(src proto.Message)
- func (m *OrderRecord) XXX_Size() int
- func (m *OrderRecord) XXX_Unmarshal(b []byte) error
- type OrderRecord_State
- type OrderService
- type PostpayReq
- func (*PostpayReq) Descriptor() ([]byte, []int)
- func (*PostpayReq) ProtoMessage()
- func (m *PostpayReq) Reset()
- func (m *PostpayReq) String() string
- func (m *PostpayReq) XXX_DiscardUnknown()
- func (m *PostpayReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PostpayReq) XXX_Merge(src proto.Message)
- func (m *PostpayReq) XXX_Size() int
- func (m *PostpayReq) XXX_Unmarshal(b []byte) error
- type PostpayRes
- func (*PostpayRes) Descriptor() ([]byte, []int)
- func (*PostpayRes) ProtoMessage()
- func (m *PostpayRes) Reset()
- func (m *PostpayRes) String() string
- func (m *PostpayRes) XXX_DiscardUnknown()
- func (m *PostpayRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PostpayRes) XXX_Merge(src proto.Message)
- func (m *PostpayRes) XXX_Size() int
- func (m *PostpayRes) XXX_Unmarshal(b []byte) error
- type PrepayReq
- func (*PrepayReq) Descriptor() ([]byte, []int)
- func (*PrepayReq) ProtoMessage()
- func (m *PrepayReq) Reset()
- func (m *PrepayReq) String() string
- func (m *PrepayReq) XXX_DiscardUnknown()
- func (m *PrepayReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrepayReq) XXX_Merge(src proto.Message)
- func (m *PrepayReq) XXX_Size() int
- func (m *PrepayReq) XXX_Unmarshal(b []byte) error
- type PrepayRes
- func (*PrepayRes) Descriptor() ([]byte, []int)
- func (*PrepayRes) ProtoMessage()
- func (m *PrepayRes) Reset()
- func (m *PrepayRes) String() string
- func (m *PrepayRes) XXX_DiscardUnknown()
- func (m *PrepayRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrepayRes) XXX_Merge(src proto.Message)
- func (m *PrepayRes) XXX_Size() int
- func (m *PrepayRes) XXX_Unmarshal(b []byte) error
- type RenewTokenReq
- func (*RenewTokenReq) Descriptor() ([]byte, []int)
- func (m *RenewTokenReq) GetRefreshToken() string
- func (*RenewTokenReq) ProtoMessage()
- func (m *RenewTokenReq) Reset()
- func (m *RenewTokenReq) String() string
- func (m *RenewTokenReq) XXX_DiscardUnknown()
- func (m *RenewTokenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RenewTokenReq) XXX_Merge(src proto.Message)
- func (m *RenewTokenReq) XXX_Size() int
- func (m *RenewTokenReq) XXX_Unmarshal(b []byte) error
- type RenewTokenRes
- func (*RenewTokenRes) Descriptor() ([]byte, []int)
- func (m *RenewTokenRes) GetAccessToken() string
- func (m *RenewTokenRes) GetExpiry() int64
- func (m *RenewTokenRes) GetRefreshToken() string
- func (*RenewTokenRes) ProtoMessage()
- func (m *RenewTokenRes) Reset()
- func (m *RenewTokenRes) String() string
- func (m *RenewTokenRes) XXX_DiscardUnknown()
- func (m *RenewTokenRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RenewTokenRes) XXX_Merge(src proto.Message)
- func (m *RenewTokenRes) XXX_Size() int
- func (m *RenewTokenRes) XXX_Unmarshal(b []byte) error
- type SetUserInfoReq
- func (*SetUserInfoReq) Descriptor() ([]byte, []int)
- func (m *SetUserInfoReq) GetUser() *UserRecord
- func (*SetUserInfoReq) ProtoMessage()
- func (m *SetUserInfoReq) Reset()
- func (m *SetUserInfoReq) String() string
- func (m *SetUserInfoReq) XXX_DiscardUnknown()
- func (m *SetUserInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetUserInfoReq) XXX_Merge(src proto.Message)
- func (m *SetUserInfoReq) XXX_Size() int
- func (m *SetUserInfoReq) XXX_Unmarshal(b []byte) error
- type SetUserInfoRes
- func (*SetUserInfoRes) Descriptor() ([]byte, []int)
- func (*SetUserInfoRes) ProtoMessage()
- func (m *SetUserInfoRes) Reset()
- func (m *SetUserInfoRes) String() string
- func (m *SetUserInfoRes) XXX_DiscardUnknown()
- func (m *SetUserInfoRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetUserInfoRes) XXX_Merge(src proto.Message)
- func (m *SetUserInfoRes) XXX_Size() int
- func (m *SetUserInfoRes) XXX_Unmarshal(b []byte) error
- type SubmitOrderReq
- func (*SubmitOrderReq) Descriptor() ([]byte, []int)
- func (m *SubmitOrderReq) GetOrderId() uint64
- func (*SubmitOrderReq) ProtoMessage()
- func (m *SubmitOrderReq) Reset()
- func (m *SubmitOrderReq) String() string
- func (m *SubmitOrderReq) XXX_DiscardUnknown()
- func (m *SubmitOrderReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SubmitOrderReq) XXX_Merge(src proto.Message)
- func (m *SubmitOrderReq) XXX_Size() int
- func (m *SubmitOrderReq) XXX_Unmarshal(b []byte) error
- type SubmitOrderRes
- func (*SubmitOrderRes) Descriptor() ([]byte, []int)
- func (*SubmitOrderRes) ProtoMessage()
- func (m *SubmitOrderRes) Reset()
- func (m *SubmitOrderRes) String() string
- func (m *SubmitOrderRes) XXX_DiscardUnknown()
- func (m *SubmitOrderRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SubmitOrderRes) XXX_Merge(src proto.Message)
- func (m *SubmitOrderRes) XXX_Size() int
- func (m *SubmitOrderRes) XXX_Unmarshal(b []byte) error
- type UserHandler
- type UserRecord
- func (*UserRecord) Descriptor() ([]byte, []int)
- func (m *UserRecord) GetAgent() string
- func (m *UserRecord) GetAvatar() string
- func (m *UserRecord) GetName() string
- func (m *UserRecord) GetUid() string
- func (m *UserRecord) GetUpdateAt() int64
- func (*UserRecord) ProtoMessage()
- func (m *UserRecord) Reset()
- func (m *UserRecord) String() string
- func (m *UserRecord) XXX_DiscardUnknown()
- func (m *UserRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserRecord) XXX_Merge(src proto.Message)
- func (m *UserRecord) XXX_Size() int
- func (m *UserRecord) XXX_Unmarshal(b []byte) error
- type UserService
- type WxHandler
- type WxService
Constants ¶
This section is empty.
Variables ¶
View Source
var OrderRecord_State_name = map[int32]string{
0: "CREATED",
1: "SUBMITTED",
2: "PAID",
}
View Source
var OrderRecord_State_value = map[string]int32{
"CREATED": 0,
"SUBMITTED": 1,
"PAID": 2,
}
Functions ¶
func NewOrderEndpoints ¶
func NewUserEndpoints ¶
func NewWxEndpoints ¶
func RegisterOrderHandler ¶
func RegisterOrderHandler(s server.Server, hdlr OrderHandler, opts ...server.HandlerOption) error
func RegisterUserHandler ¶
func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
func RegisterWxHandler ¶
Types ¶
type CreateOrderReq ¶
type CreateOrderReq struct { // 订单内包含的商品,只需要填 product_id 和 count Products []*OrderProduct `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CreateOrderReq) Descriptor ¶
func (*CreateOrderReq) Descriptor() ([]byte, []int)
func (*CreateOrderReq) GetProducts ¶
func (m *CreateOrderReq) GetProducts() []*OrderProduct
func (*CreateOrderReq) ProtoMessage ¶
func (*CreateOrderReq) ProtoMessage()
func (*CreateOrderReq) Reset ¶
func (m *CreateOrderReq) Reset()
func (*CreateOrderReq) String ¶
func (m *CreateOrderReq) String() string
func (*CreateOrderReq) XXX_DiscardUnknown ¶
func (m *CreateOrderReq) XXX_DiscardUnknown()
func (*CreateOrderReq) XXX_Marshal ¶
func (m *CreateOrderReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateOrderReq) XXX_Merge ¶
func (m *CreateOrderReq) XXX_Merge(src proto.Message)
func (*CreateOrderReq) XXX_Size ¶
func (m *CreateOrderReq) XXX_Size() int
func (*CreateOrderReq) XXX_Unmarshal ¶
func (m *CreateOrderReq) XXX_Unmarshal(b []byte) error
type CreateOrderRes ¶
type CreateOrderRes struct { // 创建成功的订单 Order *OrderRecord `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CreateOrderRes) Descriptor ¶
func (*CreateOrderRes) Descriptor() ([]byte, []int)
func (*CreateOrderRes) GetOrder ¶
func (m *CreateOrderRes) GetOrder() *OrderRecord
func (*CreateOrderRes) ProtoMessage ¶
func (*CreateOrderRes) ProtoMessage()
func (*CreateOrderRes) Reset ¶
func (m *CreateOrderRes) Reset()
func (*CreateOrderRes) String ¶
func (m *CreateOrderRes) String() string
func (*CreateOrderRes) XXX_DiscardUnknown ¶
func (m *CreateOrderRes) XXX_DiscardUnknown()
func (*CreateOrderRes) XXX_Marshal ¶
func (m *CreateOrderRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateOrderRes) XXX_Merge ¶
func (m *CreateOrderRes) XXX_Merge(src proto.Message)
func (*CreateOrderRes) XXX_Size ¶
func (m *CreateOrderRes) XXX_Size() int
func (*CreateOrderRes) XXX_Unmarshal ¶
func (m *CreateOrderRes) XXX_Unmarshal(b []byte) error
type GetUserInfoReq ¶
type GetUserInfoReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetUserInfoReq) Descriptor ¶
func (*GetUserInfoReq) Descriptor() ([]byte, []int)
func (*GetUserInfoReq) ProtoMessage ¶
func (*GetUserInfoReq) ProtoMessage()
func (*GetUserInfoReq) Reset ¶
func (m *GetUserInfoReq) Reset()
func (*GetUserInfoReq) String ¶
func (m *GetUserInfoReq) String() string
func (*GetUserInfoReq) XXX_DiscardUnknown ¶
func (m *GetUserInfoReq) XXX_DiscardUnknown()
func (*GetUserInfoReq) XXX_Marshal ¶
func (m *GetUserInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetUserInfoReq) XXX_Merge ¶
func (m *GetUserInfoReq) XXX_Merge(src proto.Message)
func (*GetUserInfoReq) XXX_Size ¶
func (m *GetUserInfoReq) XXX_Size() int
func (*GetUserInfoReq) XXX_Unmarshal ¶
func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error
type GetUserInfoRes ¶
type GetUserInfoRes struct { User *UserRecord `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetUserInfoRes) Descriptor ¶
func (*GetUserInfoRes) Descriptor() ([]byte, []int)
func (*GetUserInfoRes) GetUser ¶
func (m *GetUserInfoRes) GetUser() *UserRecord
func (*GetUserInfoRes) ProtoMessage ¶
func (*GetUserInfoRes) ProtoMessage()
func (*GetUserInfoRes) Reset ¶
func (m *GetUserInfoRes) Reset()
func (*GetUserInfoRes) String ¶
func (m *GetUserInfoRes) String() string
func (*GetUserInfoRes) XXX_DiscardUnknown ¶
func (m *GetUserInfoRes) XXX_DiscardUnknown()
func (*GetUserInfoRes) XXX_Marshal ¶
func (m *GetUserInfoRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetUserInfoRes) XXX_Merge ¶
func (m *GetUserInfoRes) XXX_Merge(src proto.Message)
func (*GetUserInfoRes) XXX_Size ¶
func (m *GetUserInfoRes) XXX_Size() int
func (*GetUserInfoRes) XXX_Unmarshal ¶
func (m *GetUserInfoRes) XXX_Unmarshal(b []byte) error
type ListOrderReq ¶
type ListOrderReq struct { // 翻页游标:初始值是 0, 下次用服务端返回的 cursor. 当服务端返回 cursor 0 时,翻页结束。 Cursor uint64 `protobuf:"varint,1,opt,name=cursor,proto3" json:"cursor,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListOrderReq) Descriptor ¶
func (*ListOrderReq) Descriptor() ([]byte, []int)
func (*ListOrderReq) GetCursor ¶
func (m *ListOrderReq) GetCursor() uint64
func (*ListOrderReq) ProtoMessage ¶
func (*ListOrderReq) ProtoMessage()
func (*ListOrderReq) Reset ¶
func (m *ListOrderReq) Reset()
func (*ListOrderReq) String ¶
func (m *ListOrderReq) String() string
func (*ListOrderReq) XXX_DiscardUnknown ¶
func (m *ListOrderReq) XXX_DiscardUnknown()
func (*ListOrderReq) XXX_Marshal ¶
func (m *ListOrderReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListOrderReq) XXX_Merge ¶
func (m *ListOrderReq) XXX_Merge(src proto.Message)
func (*ListOrderReq) XXX_Size ¶
func (m *ListOrderReq) XXX_Size() int
func (*ListOrderReq) XXX_Unmarshal ¶
func (m *ListOrderReq) XXX_Unmarshal(b []byte) error
type ListOrderRes ¶
type ListOrderRes struct { // 订单列表 Orders []*OrderRecord `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` // 翻页游标:用于下次请求。 Cursor uint64 `protobuf:"varint,2,opt,name=cursor,proto3" json:"cursor,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListOrderRes) Descriptor ¶
func (*ListOrderRes) Descriptor() ([]byte, []int)
func (*ListOrderRes) GetCursor ¶
func (m *ListOrderRes) GetCursor() uint64
func (*ListOrderRes) GetOrders ¶
func (m *ListOrderRes) GetOrders() []*OrderRecord
func (*ListOrderRes) ProtoMessage ¶
func (*ListOrderRes) ProtoMessage()
func (*ListOrderRes) Reset ¶
func (m *ListOrderRes) Reset()
func (*ListOrderRes) String ¶
func (m *ListOrderRes) String() string
func (*ListOrderRes) XXX_DiscardUnknown ¶
func (m *ListOrderRes) XXX_DiscardUnknown()
func (*ListOrderRes) XXX_Marshal ¶
func (m *ListOrderRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListOrderRes) XXX_Merge ¶
func (m *ListOrderRes) XXX_Merge(src proto.Message)
func (*ListOrderRes) XXX_Size ¶
func (m *ListOrderRes) XXX_Size() int
func (*ListOrderRes) XXX_Unmarshal ¶
func (m *ListOrderRes) XXX_Unmarshal(b []byte) error
type LoginReq ¶
type LoginReq struct { // 用户登录凭证(有效期五分钟)。开发者需要在开发者服务器后台调用 auth.code2Session, // 使用 code 换取 openid、unionid、session_key 等信息 Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoginReq) Descriptor ¶
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) XXX_DiscardUnknown ¶
func (m *LoginReq) XXX_DiscardUnknown()
func (*LoginReq) XXX_Marshal ¶
func (*LoginReq) XXX_Unmarshal ¶
type LoginRes ¶
type LoginRes struct { // 该用户调用开发者服务器后台的凭据,用来识别用户身份 AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // 用来换取新的 access_token,客户端应该保存在本地存储 RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // access_token 凭证到期的时间,格式为Unix时间戳 Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"` // 用户的唯一ID Uid string `protobuf:"bytes,4,opt,name=uid,proto3" json:"uid,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoginRes) Descriptor ¶
func (*LoginRes) GetAccessToken ¶
func (*LoginRes) GetRefreshToken ¶
func (*LoginRes) ProtoMessage ¶
func (*LoginRes) ProtoMessage()
func (*LoginRes) XXX_DiscardUnknown ¶
func (m *LoginRes) XXX_DiscardUnknown()
func (*LoginRes) XXX_Marshal ¶
func (*LoginRes) XXX_Unmarshal ¶
type OrderHandler ¶
type OrderHandler interface { // 创建订单 Create(context.Context, *CreateOrderReq, *CreateOrderRes) error // 提交订单 Submit(context.Context, *SubmitOrderReq, *SubmitOrderRes) error // 查询自己的订单 List(context.Context, *ListOrderReq, *ListOrderRes) error }
type OrderProduct ¶
type OrderProduct struct { OrderId uint64 `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Price int32 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` Count int32 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"` ProductSnapshot uint64 `protobuf:"varint,6,opt,name=product_snapshot,json=productSnapshot,proto3" json:"product_snapshot,omitempty"` Detail string `protobuf:"bytes,7,opt,name=detail,proto3" json:"detail,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
订单内的商品
func (*OrderProduct) Descriptor ¶
func (*OrderProduct) Descriptor() ([]byte, []int)
func (*OrderProduct) GetCount ¶
func (m *OrderProduct) GetCount() int32
func (*OrderProduct) GetDetail ¶
func (m *OrderProduct) GetDetail() string
func (*OrderProduct) GetName ¶
func (m *OrderProduct) GetName() string
func (*OrderProduct) GetOrderId ¶
func (m *OrderProduct) GetOrderId() uint64
func (*OrderProduct) GetPrice ¶
func (m *OrderProduct) GetPrice() int32
func (*OrderProduct) GetProductId ¶
func (m *OrderProduct) GetProductId() string
func (*OrderProduct) GetProductSnapshot ¶
func (m *OrderProduct) GetProductSnapshot() uint64
func (*OrderProduct) ProtoMessage ¶
func (*OrderProduct) ProtoMessage()
func (*OrderProduct) Reset ¶
func (m *OrderProduct) Reset()
func (*OrderProduct) String ¶
func (m *OrderProduct) String() string
func (*OrderProduct) XXX_DiscardUnknown ¶
func (m *OrderProduct) XXX_DiscardUnknown()
func (*OrderProduct) XXX_Marshal ¶
func (m *OrderProduct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OrderProduct) XXX_Merge ¶
func (m *OrderProduct) XXX_Merge(src proto.Message)
func (*OrderProduct) XXX_Size ¶
func (m *OrderProduct) XXX_Size() int
func (*OrderProduct) XXX_Unmarshal ¶
func (m *OrderProduct) XXX_Unmarshal(b []byte) error
type OrderRecord ¶
type OrderRecord struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` State OrderRecord_State `protobuf:"varint,3,opt,name=state,proto3,enum=liveuser.OrderRecord_State" json:"state,omitempty"` Amount int32 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` Discount int32 `protobuf:"varint,5,opt,name=discount,proto3" json:"discount,omitempty"` Pay int32 `protobuf:"varint,6,opt,name=pay,proto3" json:"pay,omitempty"` PayAt int64 `protobuf:"varint,7,opt,name=pay_at,json=payAt,proto3" json:"pay_at,omitempty"` Products []*OrderProduct `protobuf:"bytes,8,rep,name=products,proto3" json:"products,omitempty"` CreatedAt int64 `protobuf:"varint,1002,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt int64 `protobuf:"varint,1003,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` DeletedAt int64 `protobuf:"varint,1004,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
一条订单
func (*OrderRecord) Descriptor ¶
func (*OrderRecord) Descriptor() ([]byte, []int)
func (*OrderRecord) GetAmount ¶
func (m *OrderRecord) GetAmount() int32
func (*OrderRecord) GetCreatedAt ¶
func (m *OrderRecord) GetCreatedAt() int64
func (*OrderRecord) GetDeletedAt ¶
func (m *OrderRecord) GetDeletedAt() int64
func (*OrderRecord) GetDiscount ¶
func (m *OrderRecord) GetDiscount() int32
func (*OrderRecord) GetId ¶
func (m *OrderRecord) GetId() uint64
func (*OrderRecord) GetPay ¶
func (m *OrderRecord) GetPay() int32
func (*OrderRecord) GetPayAt ¶
func (m *OrderRecord) GetPayAt() int64
func (*OrderRecord) GetProducts ¶
func (m *OrderRecord) GetProducts() []*OrderProduct
func (*OrderRecord) GetState ¶
func (m *OrderRecord) GetState() OrderRecord_State
func (*OrderRecord) GetUid ¶
func (m *OrderRecord) GetUid() string
func (*OrderRecord) GetUpdatedAt ¶
func (m *OrderRecord) GetUpdatedAt() int64
func (*OrderRecord) ProtoMessage ¶
func (*OrderRecord) ProtoMessage()
func (*OrderRecord) Reset ¶
func (m *OrderRecord) Reset()
func (*OrderRecord) String ¶
func (m *OrderRecord) String() string
func (*OrderRecord) XXX_DiscardUnknown ¶
func (m *OrderRecord) XXX_DiscardUnknown()
func (*OrderRecord) XXX_Marshal ¶
func (m *OrderRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OrderRecord) XXX_Merge ¶
func (m *OrderRecord) XXX_Merge(src proto.Message)
func (*OrderRecord) XXX_Size ¶
func (m *OrderRecord) XXX_Size() int
func (*OrderRecord) XXX_Unmarshal ¶
func (m *OrderRecord) XXX_Unmarshal(b []byte) error
type OrderRecord_State ¶
type OrderRecord_State int32
订单的状态枚举值
const ( OrderRecord_CREATED OrderRecord_State = 0 OrderRecord_SUBMITTED OrderRecord_State = 1 OrderRecord_PAID OrderRecord_State = 2 )
func (OrderRecord_State) EnumDescriptor ¶
func (OrderRecord_State) EnumDescriptor() ([]byte, []int)
func (OrderRecord_State) String ¶
func (x OrderRecord_State) String() string
type OrderService ¶
type OrderService interface { // 创建订单 Create(ctx context.Context, in *CreateOrderReq, opts ...client.CallOption) (*CreateOrderRes, error) // 提交订单 Submit(ctx context.Context, in *SubmitOrderReq, opts ...client.CallOption) (*SubmitOrderRes, error) // 查询自己的订单 List(ctx context.Context, in *ListOrderReq, opts ...client.CallOption) (*ListOrderRes, error) }
func NewOrderService ¶
func NewOrderService(name string, c client.Client) OrderService
type PostpayReq ¶
type PostpayReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PostpayReq) Descriptor ¶
func (*PostpayReq) Descriptor() ([]byte, []int)
func (*PostpayReq) ProtoMessage ¶
func (*PostpayReq) ProtoMessage()
func (*PostpayReq) Reset ¶
func (m *PostpayReq) Reset()
func (*PostpayReq) String ¶
func (m *PostpayReq) String() string
func (*PostpayReq) XXX_DiscardUnknown ¶
func (m *PostpayReq) XXX_DiscardUnknown()
func (*PostpayReq) XXX_Marshal ¶
func (m *PostpayReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PostpayReq) XXX_Merge ¶
func (m *PostpayReq) XXX_Merge(src proto.Message)
func (*PostpayReq) XXX_Size ¶
func (m *PostpayReq) XXX_Size() int
func (*PostpayReq) XXX_Unmarshal ¶
func (m *PostpayReq) XXX_Unmarshal(b []byte) error
type PostpayRes ¶
type PostpayRes struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PostpayRes) Descriptor ¶
func (*PostpayRes) Descriptor() ([]byte, []int)
func (*PostpayRes) ProtoMessage ¶
func (*PostpayRes) ProtoMessage()
func (*PostpayRes) Reset ¶
func (m *PostpayRes) Reset()
func (*PostpayRes) String ¶
func (m *PostpayRes) String() string
func (*PostpayRes) XXX_DiscardUnknown ¶
func (m *PostpayRes) XXX_DiscardUnknown()
func (*PostpayRes) XXX_Marshal ¶
func (m *PostpayRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PostpayRes) XXX_Merge ¶
func (m *PostpayRes) XXX_Merge(src proto.Message)
func (*PostpayRes) XXX_Size ¶
func (m *PostpayRes) XXX_Size() int
func (*PostpayRes) XXX_Unmarshal ¶
func (m *PostpayRes) XXX_Unmarshal(b []byte) error
type PrepayReq ¶
type PrepayReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PrepayReq) Descriptor ¶
func (*PrepayReq) ProtoMessage ¶
func (*PrepayReq) ProtoMessage()
func (*PrepayReq) XXX_DiscardUnknown ¶
func (m *PrepayReq) XXX_DiscardUnknown()
func (*PrepayReq) XXX_Marshal ¶
func (*PrepayReq) XXX_Unmarshal ¶
type PrepayRes ¶
type PrepayRes struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PrepayRes) Descriptor ¶
func (*PrepayRes) ProtoMessage ¶
func (*PrepayRes) ProtoMessage()
func (*PrepayRes) XXX_DiscardUnknown ¶
func (m *PrepayRes) XXX_DiscardUnknown()
func (*PrepayRes) XXX_Marshal ¶
func (*PrepayRes) XXX_Unmarshal ¶
type RenewTokenReq ¶
type RenewTokenReq struct { // 客户端保存在本地存储的上次的 refresh_token RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RenewTokenReq) Descriptor ¶
func (*RenewTokenReq) Descriptor() ([]byte, []int)
func (*RenewTokenReq) GetRefreshToken ¶
func (m *RenewTokenReq) GetRefreshToken() string
func (*RenewTokenReq) ProtoMessage ¶
func (*RenewTokenReq) ProtoMessage()
func (*RenewTokenReq) Reset ¶
func (m *RenewTokenReq) Reset()
func (*RenewTokenReq) String ¶
func (m *RenewTokenReq) String() string
func (*RenewTokenReq) XXX_DiscardUnknown ¶
func (m *RenewTokenReq) XXX_DiscardUnknown()
func (*RenewTokenReq) XXX_Marshal ¶
func (m *RenewTokenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RenewTokenReq) XXX_Merge ¶
func (m *RenewTokenReq) XXX_Merge(src proto.Message)
func (*RenewTokenReq) XXX_Size ¶
func (m *RenewTokenReq) XXX_Size() int
func (*RenewTokenReq) XXX_Unmarshal ¶
func (m *RenewTokenReq) XXX_Unmarshal(b []byte) error
type RenewTokenRes ¶
type RenewTokenRes struct { // 该用户调用开发者服务器后台的凭据,用来识别用户身份 AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // 用来换取新的 access_token,客户端应该保存在本地存储。 // 取决于是否开启了 Refresh Token Rotation,它可能与请求时的 refresh_token 不同 RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // access_token 凭证到期的时间,格式为Unix时间戳 Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RenewTokenRes) Descriptor ¶
func (*RenewTokenRes) Descriptor() ([]byte, []int)
func (*RenewTokenRes) GetAccessToken ¶
func (m *RenewTokenRes) GetAccessToken() string
func (*RenewTokenRes) GetExpiry ¶
func (m *RenewTokenRes) GetExpiry() int64
func (*RenewTokenRes) GetRefreshToken ¶
func (m *RenewTokenRes) GetRefreshToken() string
func (*RenewTokenRes) ProtoMessage ¶
func (*RenewTokenRes) ProtoMessage()
func (*RenewTokenRes) Reset ¶
func (m *RenewTokenRes) Reset()
func (*RenewTokenRes) String ¶
func (m *RenewTokenRes) String() string
func (*RenewTokenRes) XXX_DiscardUnknown ¶
func (m *RenewTokenRes) XXX_DiscardUnknown()
func (*RenewTokenRes) XXX_Marshal ¶
func (m *RenewTokenRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RenewTokenRes) XXX_Merge ¶
func (m *RenewTokenRes) XXX_Merge(src proto.Message)
func (*RenewTokenRes) XXX_Size ¶
func (m *RenewTokenRes) XXX_Size() int
func (*RenewTokenRes) XXX_Unmarshal ¶
func (m *RenewTokenRes) XXX_Unmarshal(b []byte) error
type SetUserInfoReq ¶
type SetUserInfoReq struct { // 需要更新的用户信息。其中 uid, update_at 可以不填。 User *UserRecord `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SetUserInfoReq) Descriptor ¶
func (*SetUserInfoReq) Descriptor() ([]byte, []int)
func (*SetUserInfoReq) GetUser ¶
func (m *SetUserInfoReq) GetUser() *UserRecord
func (*SetUserInfoReq) ProtoMessage ¶
func (*SetUserInfoReq) ProtoMessage()
func (*SetUserInfoReq) Reset ¶
func (m *SetUserInfoReq) Reset()
func (*SetUserInfoReq) String ¶
func (m *SetUserInfoReq) String() string
func (*SetUserInfoReq) XXX_DiscardUnknown ¶
func (m *SetUserInfoReq) XXX_DiscardUnknown()
func (*SetUserInfoReq) XXX_Marshal ¶
func (m *SetUserInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetUserInfoReq) XXX_Merge ¶
func (m *SetUserInfoReq) XXX_Merge(src proto.Message)
func (*SetUserInfoReq) XXX_Size ¶
func (m *SetUserInfoReq) XXX_Size() int
func (*SetUserInfoReq) XXX_Unmarshal ¶
func (m *SetUserInfoReq) XXX_Unmarshal(b []byte) error
type SetUserInfoRes ¶
type SetUserInfoRes struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SetUserInfoRes) Descriptor ¶
func (*SetUserInfoRes) Descriptor() ([]byte, []int)
func (*SetUserInfoRes) ProtoMessage ¶
func (*SetUserInfoRes) ProtoMessage()
func (*SetUserInfoRes) Reset ¶
func (m *SetUserInfoRes) Reset()
func (*SetUserInfoRes) String ¶
func (m *SetUserInfoRes) String() string
func (*SetUserInfoRes) XXX_DiscardUnknown ¶
func (m *SetUserInfoRes) XXX_DiscardUnknown()
func (*SetUserInfoRes) XXX_Marshal ¶
func (m *SetUserInfoRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetUserInfoRes) XXX_Merge ¶
func (m *SetUserInfoRes) XXX_Merge(src proto.Message)
func (*SetUserInfoRes) XXX_Size ¶
func (m *SetUserInfoRes) XXX_Size() int
func (*SetUserInfoRes) XXX_Unmarshal ¶
func (m *SetUserInfoRes) XXX_Unmarshal(b []byte) error
type SubmitOrderReq ¶
type SubmitOrderReq struct { OrderId uint64 `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SubmitOrderReq) Descriptor ¶
func (*SubmitOrderReq) Descriptor() ([]byte, []int)
func (*SubmitOrderReq) GetOrderId ¶
func (m *SubmitOrderReq) GetOrderId() uint64
func (*SubmitOrderReq) ProtoMessage ¶
func (*SubmitOrderReq) ProtoMessage()
func (*SubmitOrderReq) Reset ¶
func (m *SubmitOrderReq) Reset()
func (*SubmitOrderReq) String ¶
func (m *SubmitOrderReq) String() string
func (*SubmitOrderReq) XXX_DiscardUnknown ¶
func (m *SubmitOrderReq) XXX_DiscardUnknown()
func (*SubmitOrderReq) XXX_Marshal ¶
func (m *SubmitOrderReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SubmitOrderReq) XXX_Merge ¶
func (m *SubmitOrderReq) XXX_Merge(src proto.Message)
func (*SubmitOrderReq) XXX_Size ¶
func (m *SubmitOrderReq) XXX_Size() int
func (*SubmitOrderReq) XXX_Unmarshal ¶
func (m *SubmitOrderReq) XXX_Unmarshal(b []byte) error
type SubmitOrderRes ¶
type SubmitOrderRes struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SubmitOrderRes) Descriptor ¶
func (*SubmitOrderRes) Descriptor() ([]byte, []int)
func (*SubmitOrderRes) ProtoMessage ¶
func (*SubmitOrderRes) ProtoMessage()
func (*SubmitOrderRes) Reset ¶
func (m *SubmitOrderRes) Reset()
func (*SubmitOrderRes) String ¶
func (m *SubmitOrderRes) String() string
func (*SubmitOrderRes) XXX_DiscardUnknown ¶
func (m *SubmitOrderRes) XXX_DiscardUnknown()
func (*SubmitOrderRes) XXX_Marshal ¶
func (m *SubmitOrderRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SubmitOrderRes) XXX_Merge ¶
func (m *SubmitOrderRes) XXX_Merge(src proto.Message)
func (*SubmitOrderRes) XXX_Size ¶
func (m *SubmitOrderRes) XXX_Size() int
func (*SubmitOrderRes) XXX_Unmarshal ¶
func (m *SubmitOrderRes) XXX_Unmarshal(b []byte) error
type UserHandler ¶
type UserHandler interface { // 新增或更新自己的用户信息 Set(context.Context, *SetUserInfoReq, *SetUserInfoRes) error // 获取自己的用户信息 Get(context.Context, *GetUserInfoReq, *GetUserInfoRes) error }
type UserRecord ¶
type UserRecord struct { Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Agent string `protobuf:"bytes,3,opt,name=agent,proto3" json:"agent,omitempty"` UpdateAt int64 `protobuf:"varint,4,opt,name=update_at,json=updateAt,proto3" json:"update_at,omitempty"` Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
UserRecord 是用户信息
func (*UserRecord) Descriptor ¶
func (*UserRecord) Descriptor() ([]byte, []int)
func (*UserRecord) GetAgent ¶
func (m *UserRecord) GetAgent() string
func (*UserRecord) GetAvatar ¶
func (m *UserRecord) GetAvatar() string
func (*UserRecord) GetName ¶
func (m *UserRecord) GetName() string
func (*UserRecord) GetUid ¶
func (m *UserRecord) GetUid() string
func (*UserRecord) GetUpdateAt ¶
func (m *UserRecord) GetUpdateAt() int64
func (*UserRecord) ProtoMessage ¶
func (*UserRecord) ProtoMessage()
func (*UserRecord) Reset ¶
func (m *UserRecord) Reset()
func (*UserRecord) String ¶
func (m *UserRecord) String() string
func (*UserRecord) XXX_DiscardUnknown ¶
func (m *UserRecord) XXX_DiscardUnknown()
func (*UserRecord) XXX_Marshal ¶
func (m *UserRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UserRecord) XXX_Merge ¶
func (m *UserRecord) XXX_Merge(src proto.Message)
func (*UserRecord) XXX_Size ¶
func (m *UserRecord) XXX_Size() int
func (*UserRecord) XXX_Unmarshal ¶
func (m *UserRecord) XXX_Unmarshal(b []byte) error
type UserService ¶
type UserService interface { // 新增或更新自己的用户信息 Set(ctx context.Context, in *SetUserInfoReq, opts ...client.CallOption) (*SetUserInfoRes, error) // 获取自己的用户信息 Get(ctx context.Context, in *GetUserInfoReq, opts ...client.CallOption) (*GetUserInfoRes, error) }
func NewUserService ¶
func NewUserService(name string, c client.Client) UserService
type WxHandler ¶
type WxHandler interface { // 客户端调用 wx.login() 获取临时登录凭证 code ,用此接口回传到开发者服务器。 // 开发者服务器处理之后,返回开发者服务器的自定义登录态。 // 关于自定义登录态的解释,可以参考 https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/ Login(context.Context, *LoginReq, *LoginRes) error // 开发者服务器的自定义登录态里的 access_token 到期之前,用此接口获取新的 access_token。 RenewToken(context.Context, *RenewTokenReq, *RenewTokenRes) error // 下单。调用该接口在微信支付服务后台生成预支付交易单,返回正确的预支付交易会话标识。 Prepay(context.Context, *PrepayReq, *PrepayRes) error // 支付通知。微信支付通过支付通知接口将用户支付成功消息通知给开发者服务器。 Postpay(context.Context, *PostpayReq, *PostpayRes) error }
type WxService ¶
type WxService interface { // 客户端调用 wx.login() 获取临时登录凭证 code ,用此接口回传到开发者服务器。 // 开发者服务器处理之后,返回开发者服务器的自定义登录态。 // 关于自定义登录态的解释,可以参考 https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/ Login(ctx context.Context, in *LoginReq, opts ...client.CallOption) (*LoginRes, error) // 开发者服务器的自定义登录态里的 access_token 到期之前,用此接口获取新的 access_token。 RenewToken(ctx context.Context, in *RenewTokenReq, opts ...client.CallOption) (*RenewTokenRes, error) // 下单。调用该接口在微信支付服务后台生成预支付交易单,返回正确的预支付交易会话标识。 Prepay(ctx context.Context, in *PrepayReq, opts ...client.CallOption) (*PrepayRes, error) // 支付通知。微信支付通过支付通知接口将用户支付成功消息通知给开发者服务器。 Postpay(ctx context.Context, in *PostpayReq, opts ...client.CallOption) (*PostpayRes, error) }
Click to show internal directories.
Click to hide internal directories.