Documentation ¶
Index ¶
- func HandleForRequest(h *graph.Handle, wtyp string, wopt graph.Options, r *http.Request) (*graph.Handle, error)
- type APIv2
- func (api *APIv2) ServeDelete(w http.ResponseWriter, r *http.Request)
- func (api *APIv2) ServeFormats(w http.ResponseWriter, r *http.Request)
- func (api *APIv2) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (api *APIv2) ServeNamespaceRules(w http.ResponseWriter, r *http.Request)
- func (api *APIv2) ServeNodeDelete(w http.ResponseWriter, r *http.Request)
- func (api *APIv2) ServeQuery(w http.ResponseWriter, r *http.Request)
- func (api *APIv2) ServeRead(w http.ResponseWriter, r *http.Request)
- func (api *APIv2) ServeWrite(w http.ResponseWriter, r *http.Request)
- func (api *APIv2) SetBatchSize(n int)
- func (api *APIv2) SetQueryLimit(n int)
- func (api *APIv2) SetQueryTimeout(dt time.Duration)
- func (api *APIv2) SetReadOnly(ro bool)
- type AcceptSpec
- type HandlerWrapper
- type NamespaceRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIv2 ¶
type APIv2 struct {
// contains filtered or unexported fields
}
APIv2 holds state and configuration of a request
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 ¶
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)
ServeDelete deletes data received in the request body from the database. Responds with how many quads were deleted.
func (*APIv2) ServeFormats ¶
func (api *APIv2) ServeFormats(w http.ResponseWriter, r *http.Request)
ServeFormats responds with formats known for the database
func (*APIv2) ServeHTTP ¶
func (api *APIv2) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler
func (*APIv2) ServeNamespaceRules ¶
func (api *APIv2) ServeNamespaceRules(w http.ResponseWriter, r *http.Request)
ServeNamespaceRules serves requests for the namespace rules resource. The resource supports getting all registered rules and registering a rule. The resource wraps the quad/voc module.
func (*APIv2) ServeNodeDelete ¶
func (api *APIv2) ServeNodeDelete(w http.ResponseWriter, r *http.Request)
ServeNodeDelete deletes all data associated with a node (an entity). Responds with how many quads were deleted.
func (*APIv2) ServeQuery ¶
func (api *APIv2) ServeQuery(w http.ResponseWriter, r *http.Request)
ServeQuery executes a query received in the request and responds with the result
func (*APIv2) ServeRead ¶
func (api *APIv2) ServeRead(w http.ResponseWriter, r *http.Request)
ServeRead responds with quads read from the database
func (*APIv2) ServeWrite ¶
func (api *APIv2) ServeWrite(w http.ResponseWriter, r *http.Request)
ServeWrite writes data received in the request body to the database
func (*APIv2) SetBatchSize ¶
SetBatchSize sets batch-size mode for the request
func (*APIv2) SetQueryLimit ¶
SetQueryLimit sets query limit for the request
func (*APIv2) SetQueryTimeout ¶
SetQueryTimeout sets query timeout for the request
func (*APIv2) SetReadOnly ¶
SetReadOnly sets read-only mode for the request
type AcceptSpec ¶
AcceptSpec describes an Accept* header.
func ParseAccept ¶
func ParseAccept(header http.Header, key string) (specs []AcceptSpec)
ParseAccept parses Accept* headers.
type HandlerWrapper ¶
HandlerWrapper accepts a handler, wraps it with additional functionality and returns a new handler
type NamespaceRule ¶
NamespaceRule defines a prefix for a namespace when prepended to the suffix of a compact IRI, results in an IRI. For example rdfs is a prefix for the namespace http://www.w3.org/2000/01/rdf-schema#.