lib

package
v0.0.0-...-520fe4f Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContactToken

func ContactToken(number string) (hs []byte)

更新通讯录

func DecodeToken

func DecodeToken(encoded string) (b []byte, err error)

func GenAuthKey

func GenAuthKey(salt string, password string) (authKey string)

func GenSalt

func GenSalt() (salt string)

func GetAccountInfo

func GetAccountInfo(c echo.Context) (account models.Account, err error)

获取账号信息

func GetAccountInfoByNumber

func GetAccountInfoByNumber(number string) (account models.Account, err error)

获取账号信息

func GetOtherAccountInfo

func GetOtherAccountInfo(c echo.Context, phoneNumber string) (account models.Account, err error)

获取账号信息

func Resp

func Resp(c echo.Context, code int, message string, data interface{}) error

func RespOk

func RespOk(c echo.Context, code int, message string) error

func VerificationCode

func VerificationCode(number string) (code string)

Types

type Data

type Data struct {
	TotalRecords int         `json:"total_records"`
	Records      interface{} `json:"records"`
	CurrentPage  int         `json:"current_page"`
	TotalPages   int         `json:"total_pages"`
}

type Paginator

type Paginator struct {
	DB      *gorm.DB
	OrderBy []string
	Page    int
	Limit   int
}

func (*Paginator) Paginate

func (p *Paginator) Paginate(dataSource interface{}) *Data

Jump to

Keyboard shortcuts

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