model

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Debug   = "debug"
	Release = "release"
)
View Source
const (
	Phone   = 0
	Email   = 1
	Address = 2
)
View Source
const (
	ParamSvcUrl   = "serviceUrl"
	ParamCodeType = "codetype"
	ParamMobile   = "mobile"
	ParamEmail    = "email"
	ParamMsg      = "msg"
	ParamTicket   = "ticket"
	ParamBizId    = "biz"
	ParamCode     = "code"
)
View Source
const (
	Quick  = "quick"
	Bind   = "bind"
	Export = "export"
)

Variables

View Source
var (
	ErrQueryType = errors.New("query type no support")
)

Functions

func VerifyQueryFormat

func VerifyQueryFormat(query string) (int, string)

Types

type AddrBackup

type AddrBackup struct {
	Address    string    `json:"address" gorm:"primary_key;column:address;type:varchar(255);comment:'用户地址'"`
	Area       string    `json:"area" gorm:"column:area;type:varchar(4);comment:'区号'"`
	Phone      string    `json:"phone" gorm:"column:phone;type:varchar(11);comment:'手机号'"`
	Email      string    `json:"email" gorm:"column:email;type:varchar(30);comment:'邮箱'"`
	Mnemonic   string    `json:"mnemonic" gorm:"column:mnemonic;type:varchar(1020);comment:'助记词'"`
	PrivateKey string    `json:"private_key" gorm:"column:private_key;type:varchar(1020);comment:'加密私钥'"`
	UpdateTime time.Time `json:"update_time" gorm:"column:update_time;type:datetime;comment:'更新时间'"`
	CreateTime time.Time `json:"create_time" gorm:"column:create_time;type:datetime;comment:'创建时间'"`
}

func (*AddrBackup) TableName

func (d *AddrBackup) TableName() string

TableName returns the table name of the DtalkAddrBackup model

type AddrMove

type AddrMove struct {
	BtyAddr string `json:"bty_addr" gorm:"primary_key;column:bty_addr;type:varchar(255);comment:'bty地址'"`
	BtcAddr string `json:"btc_addr" gorm:"column:btc_addr;type:varchar(255);not null;comment:'btc地址'"`
	State   int32  `json:"state" gorm:"column:state;type:tinyint(255);comment:'0->对应关系已建立;1-> 好友关系已迁移'"`
}

func (*AddrMove) TableName

func (d *AddrMove) TableName() string

TableName returns the table name of the DtalkAddrMove model

type AddrRelate

type AddrRelate struct {
	Address    string    `json:"address" gorm:"primary_key;column:address;type:varchar(255);comment:'用户地址'"`
	Area       string    `json:"area" gorm:"column:area;type:varchar(4);comment:'区号'"`
	Phone      string    `json:"phone" gorm:"column:phone;type:varchar(11);comment:'手机号'"`
	Email      string    `json:"email" gorm:"column:email;type:varchar(30);comment:'邮箱'"`
	Mnemonic   string    `json:"mnemonic" gorm:"column:mnemonic;type:varchar(1020);comment:'助记词'"`
	PrivateKey string    `json:"private_key" gorm:"column:private_key;type:varchar(1020);comment:'加密私钥'"`
	UpdateTime time.Time `json:"update_time" gorm:"column:update_time;type:datetime;comment:'更新时间'"`
	CreateTime time.Time `json:"create_time" gorm:"column:create_time;type:datetime;comment:'创建时间'"`
}

func (*AddrRelate) TableName

func (d *AddrRelate) TableName() string

TableName returns the table name of the DtalkAddrBackup model

type GeneralResponse

type GeneralResponse struct {
	Code    int         `json:"code"`
	Message int         `json:"message"`
	Data    interface{} `json:"data"`
}

type GetAddressRequest

type GetAddressRequest struct {
	Query string `json:"query" binding:"required"`
}

type GetAddressResponse

type GetAddressResponse struct {
	Address string `json:"address"`
}

type Query

type Query struct {
	Tp    int
	Query string
}

func NewQuery

func NewQuery(str string) *Query

type Validate

type Validate interface {
	Send(map[string]string) (interface{}, error)
	ValidateCode(map[string]string) error
}

Jump to

Keyboard shortcuts

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