util

package
v0.0.0-...-2bdc998 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2018 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeStructFieldValue

func ChangeStructFieldValue(cStruct interface{}, cField string, cValue string)

func Decrypt

func Decrypt(text, key string) (string, error)

func Encrypt

func Encrypt(text, key string) (string, error)

func ErrJSON

func ErrJSON(c echo.Context, err error) error

func ErroJSON

func ErroJSON(c echo.Context, msg string) error

func GetEnv

func GetEnv(env string, def string) string

GetEnv returns a value from a environment variable when the variable is not found it returns the value from the variable def

func JSONaStruct

func JSONaStruct(resp *resty.Response, s, e interface{}) error

func MustGetEnv

func MustGetEnv(env string) string

MustGetEnv crashes the server when a environment variable is not specified

func ParseToken

func ParseToken(token string) string

func PegarID

func PegarID(jwt map[string]interface{}, key string) (string, error)

func PegarIDEcho

func PegarIDEcho(c echo.Context, key string) (string, error)

func PrepareForSQL

func PrepareForSQL(s interface{}, exclude []string) []string

func StructFields

func StructFields(s interface{}) []reflect.StructField

Types

type J

type J map[string]interface{}

func Error

func Error(msg string) J

Jump to

Keyboard shortcuts

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