utils

package
v0.0.0-...-9e59f10 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NOW = time.Now().UTC()

NOW generate current datetime

Functions

func CheckPasshash

func CheckPasshash(password, hash string) bool

CheckPasshash check hashed string

func GeneratePasshash

func GeneratePasshash(password string) (string, error)

GeneratePasshash create hashed string

func GenerateRoutes

func GenerateRoutes() bool

GenerateRoutes automatically

func GenerateToken

func GenerateToken(email string) (string, time.Time, error)

GenerateToken method untuk generate jwt token

func ParseError

func ParseError(input string) string

ParseError --

func ReplacePackages

func ReplacePackages(input string) string

ReplacePackages --

func StructToMap

func StructToMap(st interface{}) map[string]interface{}

StructToMap get map from struct

Types

type APIEndpoint

type APIEndpoint struct {
	Name   string
	Path   string
	Auth   bool
	Method string
	Param  interface{}
}

APIEndpoint struct for api grouping

type APIGroup

type APIGroup struct {
	GroupName string
	Base      string
	Child     []APIEndpoint
}

APIGroup struct for api grouping

Jump to

Keyboard shortcuts

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