tools

package
v0.0.0-...-ddb411c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) (bool, error)

func HashPassword

func HashPassword(password string) (string, error)

func RespondWithError

func RespondWithError(w http.ResponseWriter, code int, message string)

RespondWithError - response with error message

func RespondWithJSON

func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})

RespondWithJSON - json format response

func SetClaimsAndReturnToken

func SetClaimsAndReturnToken(username, email, role string) (string, error)

SetClaimsAndReturnToken generate claims and token

Types

type R

type R map[string]interface{}

Jump to

Keyboard shortcuts

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