utils

package
v0.0.0-...-78f8b4d Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ok = iota
	ParamError
	DatabaseError
	FailedAuthentication
	FailedCodeVerify
)

Variables

This section is empty.

Functions

func CodeVerify

func CodeVerify(phone string, codeStr string, reuse bool) error

func Error

func Error(ctx *gin.Context, code int, msg string)

func Success

func Success(ctx *gin.Context, data interface{})

Types

type Response

type Response struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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