apimsg

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJson

func NewJson() *messageJson

Types

type Message

type Message interface {
	Return(w http.ResponseWriter) error
	SetError(options ...Option)
	Raw() interface{}
}

type Option

type Option func(*Options)

func Code

func Code(code int) Option

func Error

func Error(message string) Option

func MapError

func MapError(field string, message string) Option

type Options

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

Jump to

Keyboard shortcuts

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