api

package
v0.0.0-...-14db394 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRouter

func BuildRouter(app *App) *chi.Mux

BuildRouter builds the router

func StartServer

func StartServer() error

StartServer starts the server

Types

type App

type App struct {
}

func (*App) HandleError

func (app *App) HandleError(w http.ResponseWriter, r *http.Request, err error)

HandleError depending on error type

func (*App) HandleMutate

func (app *App) HandleMutate(w http.ResponseWriter, r *http.Request)

type JSONPatchEntry

type JSONPatchEntry struct {
	OP    string          `json:"op"`
	Path  string          `json:"path"`
	Value json.RawMessage `json:"value,omitempty"`
}

type User

type User struct {
	ID   int    `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

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