handler

package
v0.2.1-0...-d023f04 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DtleDriver *dtle.Driver
View Source
var NomadHost, ApiAddr, ConsulAddr string

Functions

func BindAndValidate

func BindAndValidate(logger g.LoggerType, c echo.Context, reqParam interface{}) error

func BuildUrl

func BuildUrl(path string) string

func DecodeBody

func DecodeBody(req *http.Request, out interface{}) error

decodeBody is used to decode a JSON request body

func DecryptPassword

func DecryptPassword(password string, rsaPrivateKey string) (realPwd string, err error)

func DecryptPasswordSupportNoRsaKey

func DecryptPasswordSupportNoRsaKey(password string, rsaPrivateKey string) (realPwd string, err error)

func InvokeApiWithKvData

func InvokeApiWithKvData(method, uri string, args map[string]string, respStruct interface{}, header ...http.Header) (err error)

func InvokeHttpUrlWithBody

func InvokeHttpUrlWithBody(method, url string, body []byte, respStruct interface{}) error

func InvokePostApiWithJson

func InvokePostApiWithJson(url string, reqJson []byte, respStruct interface{}) error

func IsEmpty

func IsEmpty(value interface{}) bool

func NewLogger

func NewLogger() g.LoggerType

Types

type CustomValidator

type CustomValidator struct {
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator() *CustomValidator

func (*CustomValidator) Validate

func (cv *CustomValidator) Validate(i interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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