Documentation ¶
Index ¶
- Constants
- type Order
- type OrderProduct
- type OrderService
- func (o *OrderService) Create(ctx context.Context, req *liveuser.CreateOrderReq, ...) error
- func (o *OrderService) Init(sqlDB *bun.DB)
- func (o *OrderService) InitMicroClient(serivce micro.Service, namespace string)
- func (o *OrderService) List(ctx context.Context, req *liveuser.ListOrderReq, res *liveuser.ListOrderRes) error
- func (o *OrderService) Submit(ctx context.Context, req *liveuser.SubmitOrderReq, ...) error
- type OrderState
- type Server
- type SessionResponse
- type User
- type UserRecord
- type Wx
- func (w *Wx) Init(serivce micro.Service, namespace string)
- func (w *Wx) Login(ctx context.Context, req *liveuser.LoginReq, res *liveuser.LoginRes) error
- func (w *Wx) Postpay(ctx context.Context, req *liveuser.PostpayReq, res *liveuser.PostpayRes) error
- func (w *Wx) Prepay(ctx context.Context, req *liveuser.PrepayReq, res *liveuser.PrepayRes) error
- func (w *Wx) RenewToken(ctx context.Context, req *liveuser.RenewTokenReq, res *liveuser.RenewTokenRes) error
Constants ¶
View Source
const (
ServiceName = "liveuser"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Order ¶
type Order struct { ID uint64 `bun:",pk"` // 订单编号 UID string // 下单的用户ID State OrderState // 订单状态 Amount int32 // 商品总额(单位:分) Discount int32 // 折扣(单位:分) Pay int32 // 实付款(单位:分) PayAt time.Time // 支付时间 CreatedAt time.Time // 下单时间 UpdatedAt time.Time // 订单状态更新时间 DeletedAt time.Time }
func (*Order) AfterCreateTable ¶
type OrderProduct ¶
type OrderProduct struct { OrderID uint64 // 订单编号 ProductID string // 商品编号 Name string // 商品名称 Price int32 // 购买时的商品价格(单位:分) Count int32 // 购买的数量 Snapshot uint64 // 购买时的商品快照 Detail string // 商品详情(JSON格式) }
func (*OrderProduct) AfterCreateTable ¶
func (p *OrderProduct) AfterCreateTable(ctx context.Context, query *bun.CreateTableQuery) error
type OrderService ¶
type OrderService struct {
// contains filtered or unexported fields
}
func (*OrderService) Create ¶
func (o *OrderService) Create(ctx context.Context, req *liveuser.CreateOrderReq, res *liveuser.CreateOrderRes) error
func (*OrderService) Init ¶
func (o *OrderService) Init(sqlDB *bun.DB)
func (*OrderService) InitMicroClient ¶
func (o *OrderService) InitMicroClient(serivce micro.Service, namespace string)
func (*OrderService) List ¶
func (o *OrderService) List(ctx context.Context, req *liveuser.ListOrderReq, res *liveuser.ListOrderRes) error
func (*OrderService) Submit ¶
func (o *OrderService) Submit(ctx context.Context, req *liveuser.SubmitOrderReq, res *liveuser.SubmitOrderRes) error
type OrderState ¶
type OrderState liveuser.OrderRecord_State
type Server ¶
type SessionResponse ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) Get ¶
func (u *User) Get(ctx context.Context, req *liveuser.GetUserInfoReq, res *liveuser.GetUserInfoRes) error
func (*User) Set ¶
func (u *User) Set(ctx context.Context, req *liveuser.SetUserInfoReq, res *liveuser.SetUserInfoRes) error
type UserRecord ¶
type Wx ¶
type Wx struct {
// contains filtered or unexported fields
}
func (*Wx) Postpay ¶
func (w *Wx) Postpay(ctx context.Context, req *liveuser.PostpayReq, res *liveuser.PostpayRes) error
func (*Wx) RenewToken ¶
func (w *Wx) RenewToken(ctx context.Context, req *liveuser.RenewTokenReq, res *liveuser.RenewTokenRes) error
Click to show internal directories.
Click to hide internal directories.