components

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuyGoodsRequest

type BuyGoodsRequest struct {
	UserId  int64
	GoodsId int32
	BuyNum  uint32
	akasar.AutoMarshal
}

func (*BuyGoodsRequest) AkasarMarshal

func (x *BuyGoodsRequest) AkasarMarshal(enc *codegen.Serializer)

func (*BuyGoodsRequest) AkasarUnmarshal

func (x *BuyGoodsRequest) AkasarUnmarshal(dec *codegen.Deserializer)

type Store

type Store interface {
	BuyGoods(ctx context.Context, req BuyGoodsRequest) error
}

type User

type User interface {
	Login(ctx context.Context, username string, password string) (UserInfo, error)
}

type UserInfo

type UserInfo struct {
	akasar.AutoMarshal
	Id       int64
	Name     string
	CreateAt int64
	VipInfo  *VipInfo
}

func (*UserInfo) AkasarMarshal

func (x *UserInfo) AkasarMarshal(enc *codegen.Serializer)

func (*UserInfo) AkasarUnmarshal

func (x *UserInfo) AkasarUnmarshal(dec *codegen.Deserializer)

type VIP

type VIP interface {
	GetVipInfo(ctx context.Context, userId int64) (*VipInfo, error)
}

type VipInfo

type VipInfo struct {
	akasar.AutoMarshal
	VipLevel VipLevelType
	ExpireAt int64
}

func (*VipInfo) AkasarMarshal

func (x *VipInfo) AkasarMarshal(enc *codegen.Serializer)

func (*VipInfo) AkasarUnmarshal

func (x *VipInfo) AkasarUnmarshal(dec *codegen.Deserializer)

type VipLevelType

type VipLevelType int32
const (
	VipTypeNone  VipLevelType = iota
	VipTypeBasic              = iota
)

Jump to

Keyboard shortcuts

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