presenter

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UrlQueryBindPayload

func UrlQueryBindPayload(urlQuery url.Values, payload interface{}) error

UrlQueryBindPayload binds url query params to the payload

Types

type JSON

type JSON struct {
	Code    string      `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
	Errors  []string    `json:"errors,omitempty"`
}

func JSONSuccess

func JSONSuccess(httpStatus int, data interface{}) (int, *JSON)

JSONSuccess builds JSON success object

Jump to

Keyboard shortcuts

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