response

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONErrorResponse added in v0.3.0

type JSONErrorResponse struct {
	Error string `json:"error"`
}

JSONErrorResponse struct

func NewJSONErrorResponse added in v0.3.0

func NewJSONErrorResponse(err error) JSONErrorResponse

NewJSONErrorResponse creates a new error response

type Response added in v0.3.0

type Response struct {
	Data      interface{}
	DebugData interface{}
	Code      *int
}

Response struct

func NewDebugErrorResponse added in v0.4.6

func NewDebugErrorResponse(err error, debugErr error) *Response

NewDebugErrorResponse creates a new error response

func NewDebugErrorResponseWithCode added in v0.4.6

func NewDebugErrorResponseWithCode(
	err error,
	debugErr error,
	code int,
) *Response

NewDebugErrorResponseWithCode creates a new error response with a code

func NewDebugResponse added in v0.4.6

func NewDebugResponse(data interface{}, debugData interface{}) *Response

NewDebugResponse creates a new response

func NewDebugResponseWithCode added in v0.4.6

func NewDebugResponseWithCode(
	data interface{},
	debugData interface{},
	code int,
) *Response

NewDebugResponseWithCode creates a new response with a code

func NewErrorResponse

func NewErrorResponse(err error) *Response

NewErrorResponse creates a new error response

func NewErrorResponseWithCode added in v0.3.0

func NewErrorResponseWithCode(err error, code int) *Response

NewErrorResponseWithCode creates a new error response with a code

func NewResponse added in v0.3.0

func NewResponse(data interface{}) *Response

NewResponse creates a new response

func NewResponseWithCode added in v0.3.0

func NewResponseWithCode(data interface{}, code int) *Response

NewResponseWithCode creates a new response with a code

Jump to

Keyboard shortcuts

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