jsonapi

package
v0.0.0-...-96209b5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapFunc

func WrapFunc[T any](handlerFunc HandlerFunc[T]) http.HandlerFunc

Types

type AcceptedResponse

type AcceptedResponse struct{}

func (AcceptedResponse) Status

func (AcceptedResponse) Status() int

type Error

type Error struct {
	Status int    `json:"status"`
	Detail string `json:"detail"`
}

func (Error) Error

func (e Error) Error() string

type HandlerFunc

type HandlerFunc[T any] func(*http.Request) (T, error)

type OKResponse

type OKResponse struct{}

func (OKResponse) Status

func (OKResponse) Status() int

type Response

type Response interface {
	Status() int
}

Jump to

Keyboard shortcuts

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