rest

package
v0.0.0-...-b45cdd6 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotFound = fmt.Errorf("not found")

Functions

func WriteResponse

func WriteResponse(w http.ResponseWriter, r *http.Request, v interface{}, pretty bool)

Types

type BadRequest

type BadRequest struct {
	Msg string
}

func (BadRequest) Error

func (e BadRequest) Error() string

type Buffer

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

Buffer is like bytes.Buffer, but has UnwriteByte method.

func (*Buffer) Bytes

func (w *Buffer) Bytes() []byte

func (*Buffer) UnwriteByte

func (w *Buffer) UnwriteByte()

func (*Buffer) Write

func (w *Buffer) Write(p []byte) (n int, err error)

func (*Buffer) WriteByte

func (w *Buffer) WriteByte(b byte) error

func (*Buffer) WriteString

func (w *Buffer) WriteString(s string) (n int, err error)

type KeyValue

type KeyValue[K comparable, V any] struct {
	Key   K
	Value V
}

type SortedStat

type SortedStat loc_count.StatTree

func (*SortedStat) MarshalJSON

func (st *SortedStat) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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