utils

package
v0.0.0-...-df4207d Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInput

func GetInput(body io.Reader, to interface{}, v *validator.Validate) error

func IsPhoneNumber

func IsPhoneNumber(fl validator.FieldLevel) bool

func IsRegexp

func IsRegexp(fl validator.FieldLevel) bool

func IsTimeRFC3339

func IsTimeRFC3339(fl validator.FieldLevel) bool

func IsTimeUnixMicro

func IsTimeUnixMicro(fl validator.FieldLevel) bool

func Logger

func Logger(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

Logger middleware handles the HTTP log.

func NewValidate

func NewValidate() *validator.Validate

func UnixMicroStringToTime

func UnixMicroStringToTime(s string) (time.Time, error)

UnixMicroStringToTime returns the time.Time corresponding to the given Unix micro time string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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