Documentation ¶
Index ¶
- Constants
- Variables
- func CheckLoginToken(req *url.Values, outOfTime *time.Duration) error
- func CheckVersionValue(query UrlValue, writer http.ResponseWriter) (int, error)
- func ConvertField(arg interface{}, args ...Convert) error
- func ConvertToVOs(vos interface{}, fields interface{})
- func CountHash4(v string) string
- func CountMethodTps(total float64, now time.Time, info string)
- func CountMethodUseTime(now time.Time, info string, duration time.Duration)
- func CreateExcelFile(Create func(xlsx *excelize.File), out io.Writer)
- func CreateRechargeTime(createTime time.Time, TotalPayTime int, month int) string
- func CreateUUID() string
- func CronScan(it interface{}, c *cron.Cron)
- func DateId() string
- func DateIdInt64() int64
- func DecodeDateString(arg string) *time.Time
- func DecodeTimeString(arg string) *time.Time
- func DurationToString(duration time.Duration) string
- func Export(dto ExportDTO, out io.Writer)
- func GetIds(arg interface{}, field string) []string
- func HttpPost(url string, args url.Values) ([]byte, error)
- func JsonFunc(argFunc func(writer http.ResponseWriter, request *http.Request) interface{}) func(writer http.ResponseWriter, request *http.Request)
- func NewOutPut(logpath string) io.Writer
- func PrintTimeString(info string, start time.Time, end time.Time, duration time.Duration) string
- func SetExcelCellValue(xlsx *excelize.File, x int, y int, obj interface{})
- func Sign(data jwt.MapClaims, secret string) string
- func StartTimer(startType StartType, exeType ExecuteType, d time.Duration, fn func())
- func ToAlphaString(value int) string
- func ToDigitString(bytess []byte) string
- func VerifyToken(input string, secret string) (jwt.Claims, error)
- func YuanToFen(arg int) int
- type Convert
- type ExcelTitle
- type ExecuteType
- type ExportDTO
- type MyWrite
- type StartType
- type UrlValue
Constants ¶
View Source
const Key_login_id = "login_id"
View Source
const Key_login_phone = "login_phone"
View Source
const Key_res = "login_res"
View Source
const TokenEncoderString = "123TEST"
Variables ¶
View Source
var Yuan int = 100
Functions ¶
func CheckLoginToken ¶
登录用户插入login_phone,login_id
func CheckVersionValue ¶
func CheckVersionValue(query UrlValue, writer http.ResponseWriter) (int, error)
检查是否有version
func ConvertField ¶
func ConvertToVOs ¶
func ConvertToVOs(vos interface{}, fields interface{})
func CountHash4 ¶
func CountMethodTps ¶
调用次方法 必须加上 defer 关键字!
func CountMethodUseTime ¶
调用次方法 必须加上 defer 关键字!
func CreateRechargeTime ¶
func CreateUUID ¶
func CreateUUID() string
func DateIdInt64 ¶
func DateIdInt64() int64
func DecodeDateString ¶
func DecodeTimeString ¶
func DurationToString ¶
func JsonFunc ¶
func JsonFunc(argFunc func(writer http.ResponseWriter, request *http.Request) interface{}) func(writer http.ResponseWriter, request *http.Request)
func PrintTimeString ¶
func StartTimer ¶
func StartTimer(startType StartType, exeType ExecuteType, d time.Duration, fn func())
启动Timer,调用它请不要使用 go 关键字,内部已经使用协程处理
func ToAlphaString ¶
func ToDigitString ¶
func VerifyToken ¶
Types ¶
type ExcelTitle ¶
type ExecuteType ¶
type ExecuteType int
const ( Execute_Default ExecuteType = iota Execute_coroutine )
type ExportDTO ¶
type ExportDTO struct { Titles []ExcelTitle DataArray interface{} }
type UrlValue ¶
func ParserUrlValues ¶
Click to show internal directories.
Click to hide internal directories.