api

package
v0.0.0-...-9de2c1c Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func EntityResponse

func EntityResponse(req typhon.Request, obj *ld.Object) typhon.Response

TODO: Do something with the Accept header here.

func ErrorCode

func ErrorCode(err error) int

Returns the HTTP status code for an error.

func ErrorFilter

func ErrorFilter(req typhon.Request, next typhon.Service) typhon.Response

func Handler

func Handler(req typhon.Request) typhon.Response

func PanicFilter

func PanicFilter(req typhon.Request, next typhon.Service) (rsp typhon.Response)

func StoresFilter

func StoresFilter(db *gorm.DB, r *redis.Client) typhon.Filter

Types

type Node

type Node interface {
	GET(typhon.Request) typhon.Response
}

func Instantiate

func Instantiate(obj *ld.Object) Node

func Lookup

func Lookup(ctx context.Context, reqURL url.URL) (Node, error)

type Object

type Object struct{ *ld.Object }

func (Object) GET

func (o Object) GET(req typhon.Request) typhon.Response

Jump to

Keyboard shortcuts

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