cayleyhttp

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleForRequest

func HandleForRequest(h *graph.Handle, wtyp string, wopt graph.Options, r *http.Request) (*graph.Handle, error)

Types

type APIv2

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

func NewAPIv2

func NewAPIv2(h *graph.Handle, wrappers ...HandlerWrapper) *APIv2

NewAPIv2 creates a new instance of APIv2 with default options

func NewAPIv2Writer

func NewAPIv2Writer(h *graph.Handle, wtype string, wopts graph.Options, wrappers ...HandlerWrapper) *APIv2

NewAPIv2Writer creates a new instance of APIv2

func NewBoundAPIv2 added in v0.7.8

func NewBoundAPIv2(h *graph.Handle, r *httprouter.Router) *APIv2

NewBoundAPIv2 creates a new instance of APIv2 bound to a given httprouter.Router

func (*APIv2) ServeDelete

func (api *APIv2) ServeDelete(w http.ResponseWriter, r *http.Request)

func (*APIv2) ServeFormats

func (api *APIv2) ServeFormats(w http.ResponseWriter, r *http.Request)

func (*APIv2) ServeHTTP

func (api *APIv2) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*APIv2) ServeNodeDelete

func (api *APIv2) ServeNodeDelete(w http.ResponseWriter, r *http.Request)

func (*APIv2) ServeQuery

func (api *APIv2) ServeQuery(w http.ResponseWriter, r *http.Request)

func (*APIv2) ServeRead

func (api *APIv2) ServeRead(w http.ResponseWriter, r *http.Request)

func (*APIv2) ServeWrite

func (api *APIv2) ServeWrite(w http.ResponseWriter, r *http.Request)

func (*APIv2) SetBatchSize

func (api *APIv2) SetBatchSize(n int)

func (*APIv2) SetQueryLimit

func (api *APIv2) SetQueryLimit(n int)

func (*APIv2) SetQueryTimeout

func (api *APIv2) SetQueryTimeout(dt time.Duration)

func (*APIv2) SetReadOnly

func (api *APIv2) SetReadOnly(ro bool)

type AcceptSpec

type AcceptSpec struct {
	Value string
	Q     float64
}

AcceptSpec describes an Accept* header.

func ParseAccept

func ParseAccept(header http.Header, key string) (specs []AcceptSpec)

ParseAccept parses Accept* headers.

type HandlerWrapper

type HandlerWrapper func(http.Handler) http.Handler

Jump to

Keyboard shortcuts

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