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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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