respond

package
v0.0.0-...-98da78b Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Standard

type Standard struct {
	Message string      `json:"message,omitempty"`
	Data    interface{} `json:"data"`
}

type Writer

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

func Write

func Write(w *http.ResponseWriter) *Writer

func (*Writer) Status

func (rw *Writer) Status(status int) *Writer

func (*Writer) WithErr

func (rw *Writer) WithErr(message error)

func (*Writer) WithErrs

func (rw *Writer) WithErrs(errors []string)

func (*Writer) WithJson

func (rw *Writer) WithJson(payload interface{})

Jump to

Keyboard shortcuts

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