Documentation ¶
Index ¶
- Constants
- type HTTPClient
- type Operation
- func (o *Operation) AddContexts(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) AddRemoteProvider(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) DeleteRemoteProvider(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GetAllRemoteProviders(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GetRESTHandlers() []rest.Handler
- func (o *Operation) RefreshAllRemoteProviders(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) RefreshRemoteProvider(rw http.ResponseWriter, req *http.Request)
- type Option
Constants ¶
const ( OperationID = "/ld" AddContextsPath = OperationID + "/context" AddRemoteProviderPath = OperationID + "/remote-provider" RefreshRemoteProviderPath = OperationID + "/remote-provider/{id}/refresh" DeleteRemoteProviderPath = OperationID + "/remote-provider/{id}" GetAllRemoteProvidersPath = OperationID + "/remote-providers" RefreshAllRemoteProvidersPath = OperationID + "/remote-providers/refresh" )
constants for the JSON-LD operations.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
HTTPClient represents an HTTP client.
type Operation ¶
type Operation struct {
// contains filtered or unexported fields
}
Operation contains REST operations provided by JSON-LD API.
func (*Operation) AddContexts ¶
func (o *Operation) AddContexts(rw http.ResponseWriter, req *http.Request)
AddContexts swagger:route POST /ld/context ld addContextsReq
Adds JSON-LD contexts to the underlying storage.
Responses:
default: genericError
func (*Operation) AddRemoteProvider ¶
func (o *Operation) AddRemoteProvider(rw http.ResponseWriter, req *http.Request)
AddRemoteProvider swagger:route POST /ld/remote-provider ld addRemoteProviderReq
Adds remote provider and JSON-LD contexts from that provider to the underlying storage.
Responses:
default: genericError
func (*Operation) DeleteRemoteProvider ¶
func (o *Operation) DeleteRemoteProvider(rw http.ResponseWriter, req *http.Request)
DeleteRemoteProvider swagger:route DELETE /ld/remote-provider/{id} ld deleteRemoteProviderReq
Deletes remote provider and JSON-LD contexts from that provider from the underlying storage.
Responses:
default: genericError
func (*Operation) GetAllRemoteProviders ¶
func (o *Operation) GetAllRemoteProviders(rw http.ResponseWriter, req *http.Request)
GetAllRemoteProviders swagger:route GET /ld/remote-providers ld getAllRemoteProvidersReq
Gets all remote providers from the underlying storage.
Responses:
default: genericError 200: getAllRemoteProvidersResp
func (*Operation) GetRESTHandlers ¶
GetRESTHandlers gets all controller API handlers available for this service.
func (*Operation) RefreshAllRemoteProviders ¶
func (o *Operation) RefreshAllRemoteProviders(rw http.ResponseWriter, req *http.Request)
RefreshAllRemoteProviders swagger:route POST /ld/remote-providers/refresh ld refreshAllRemoteProvidersReq
Updates contexts from all remote providers in the underlying storage.
Responses:
default: genericError
func (*Operation) RefreshRemoteProvider ¶
func (o *Operation) RefreshRemoteProvider(rw http.ResponseWriter, req *http.Request)
RefreshRemoteProvider swagger:route POST /ld/remote-provider/{id}/refresh ld refreshRemoteProviderReq
Updates contexts from the remote provider.
Responses:
default: genericError
type Option ¶
type Option func(opts *options)
Option configures the JSON-LD controller options.
func WithHTTPClient ¶
func WithHTTPClient(client HTTPClient) Option
WithHTTPClient sets the custom HTTP client.