utils

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(pass, hashed string) bool

CheckPassword can compare password and hashed password

func GetEnvOrDefault

func GetEnvOrDefault(key, d string) string

GetEnvOrDefault return a env value or a default if not exists

func HashPassword

func HashPassword(password string) (string, error)

HashPassword is helper function to hash password

func ResponseData

func ResponseData(ctx iris.Context, data interface{})

ResponseData is a helper function response data in json format

func ResponseErr

func ResponseErr(ctx iris.Context, err error)

ResponseErr is a helper function response error message in json format

func Uuid

func Uuid() string

Uuid return a uuid

Types

This section is empty.

Jump to

Keyboard shortcuts

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