api

package
v0.0.0-...-51dbb56 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteJson

func WriteJson(writer http.ResponseWriter, status int, value any) error

////////////////////////////////////////////////////// //////////////////////////////////////////////////////

Types

type APIServer

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

func NewAPIServer

func NewAPIServer(listenAddr string, db models.Dbase) *APIServer

func (*APIServer) Run

func (server *APIServer) Run(port string)

type ApiError

type ApiError struct {
	Error string `json:"error"`
}

type ApiFunc

type ApiFunc func(http.ResponseWriter, *http.Request) error

Jump to

Keyboard shortcuts

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