utils

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFromMap

func ConvertFromMap(m map[string]any, target any) error

ConvertFromMap uses json to marshal and unmarshal a map into a target type

func SendJsonErrResp added in v1.0.8

func SendJsonErrResp(
	logger log.Logger,
	writer *echo.Response,
	request *http.Request,
	errKind errors.ErrKind,
	message string,
	err error,
	requestID string) error

SendJsonErrResp puts together the error response packet for the APIs

func SendJsonResp added in v1.0.8

func SendJsonResp(
	logger log.Logger,
	writer *echo.Response,
	request *http.Request,
	response interface{},
	statusCode int) error

SendJsonResp puts together the response packet for the APIs

Types

This section is empty.

Jump to

Keyboard shortcuts

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