libs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(dbPass, inputPass string) bool

func CheckToken

func CheckToken(token string) (*claims, error)

func HashPassword

func HashPassword(pass string) (string, error)

func NewToken

func NewToken(username, role string) *claims

Types

type Response

type Response struct {
	Code        int         `json:"-"`
	Status      string      `json:"status"`
	IsError     bool        `json:"isError"`
	Data        interface{} `json:"data,omitempty"`
	Description interface{} `json:"description,omitempty"`
}

func GetResponse

func GetResponse(data interface{}, code int, isError bool) *Response

func (*Response) Send

func (res *Response) Send(w http.ResponseWriter)

Jump to

Keyboard shortcuts

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