utils

package
v1.0.2-0...-48f91ac Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B64UrlDecode

func B64UrlDecode(m string) string

func B64UrlEncode

func B64UrlEncode(m string) string

func DefaultPassword

func DefaultPassword() string

func FileNameSplit

func FileNameSplit(fileName string) (string, string)

func FileSize2MB

func FileSize2MB(size int64) string

func GetBasePath

func GetBasePath(path string) string

func GetRequestIp

func GetRequestIp(r *http.Request) string

func GetRequestSession

func GetRequestSession(r *http.Request) (*models.Session, error)

func IsExist

func IsExist(path string) bool

func IsTheRole

func IsTheRole(data map[interface{}]interface{})

func MD5

func MD5(str string) string

func MD5Bytes

func MD5Bytes(str string) []byte

func NewUUID

func NewUUID() string

func NowTimeString

func NowTimeString() string

func Render

func Render(w http.ResponseWriter, tplName string, data interface{})

func S2T

func S2T(s string) time.Time

func SetSessionCookie

func SetSessionCookie(w http.ResponseWriter, val string, age bool)

func SetUserNameCookie

func SetUserNameCookie(w http.ResponseWriter, val string, age bool)

func T2S

func T2S(t time.Time) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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