api

package
v0.0.0-...-f332ff4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(m map[string]interface{}, name string, params ...interface{}) (result []reflect.Value, err error)

This function expects the call-through function to return two values The first is a file name as a string and the second an error as type error

func GetMapKeys

func GetMapKeys(m map[string]interface{}) (strKeys []string)

func RespondWithError

func RespondWithError(w http.ResponseWriter, code int, message string)

func RespondWithJSON

func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})

func StringInMap

func StringInMap(key string, m map[string]interface{}) bool

Types

type App

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

func New

func New() *App

func (*App) Index

func (a *App) Index(w http.ResponseWriter, r *http.Request)

GET /index

func (*App) Run

func (a *App) Run(addr string)

func (*App) TypeGET

func (a *App) TypeGET(w http.ResponseWriter, r *http.Request)

GET /types/{type}

func (*App) TypeOPTIONS

func (a *App) TypeOPTIONS(w http.ResponseWriter, r *http.Request)

OPTIONS /types/{type}

func (*App) Types

func (a *App) Types(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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