utils

package
v0.0.0-...-d370aa6 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(hashed, pass string) error

CheckPassword - Compare hash and password

func GetIP

func GetIP(r *http.Request, field string) string

GetIP fetches user ip from context

func GetMe

func GetMe(r *http.Request, field string) *token.Record

GetMe fetches user session from context

func HashedPassword

func HashedPassword(s string) (string, error)

HashedPassword - generate hash of given string

func RandomString

func RandomString(strlen int) string

RandomString returns random string of strlen length with chars from [a-zA-Z0-9]

Types

This section is empty.

Jump to

Keyboard shortcuts

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