Documentation ¶
Index ¶
Constants ¶
const APIRootMethods = "Get, Head"
APIRootMethods lists allowed methods
const CollectionMethods = "Get, Head"
CollectionMethods lists allowed methods
const CollectionsMethods = "Get, Head"
CollectionsMethods lists allowed methods
const DiscoveryMethods = "Get, Head"
DiscoveryMethods lists allowed methods
const ManifestMethods = "Get, Head"
ManifestMethods lists allowed methods
const ObjectMethods = "Get, Delete, Head"
ObjectMethods lists allowed methods
const ObjectsMethods = "Get, Head, Post"
ObjectsMethods lists allowed methods
const StatusMethods = "Get, Head"
StatusMethods lists allowed methods
const VersionsMethods = "Get, Head"
VersionsMethods lists allowed methods
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIRootHandler ¶
type APIRootHandler struct {
APIRootService cabby.APIRootService
}
APIRootHandler holds a cabby APIRootService
func (APIRootHandler) Delete ¶
func (h APIRootHandler) Delete(w http.ResponseWriter, r *http.Request)
Delete handler
func (APIRootHandler) Get ¶
func (h APIRootHandler) Get(w http.ResponseWriter, r *http.Request)
Get handles a get request
func (APIRootHandler) Post ¶
func (h APIRootHandler) Post(w http.ResponseWriter, r *http.Request)
Post handler
type CollectionHandler ¶
type CollectionHandler struct {
CollectionService cabby.CollectionService
}
CollectionHandler handles Collection requestion
func (CollectionHandler) Delete ¶
func (h CollectionHandler) Delete(w http.ResponseWriter, r *http.Request)
Delete handler
func (CollectionHandler) Get ¶
func (h CollectionHandler) Get(w http.ResponseWriter, r *http.Request)
Get handles a get request
func (CollectionHandler) Post ¶
func (h CollectionHandler) Post(w http.ResponseWriter, r *http.Request)
Post handler
type CollectionsHandler ¶
type CollectionsHandler struct {
CollectionService cabby.CollectionService
}
CollectionsHandler handles Collections requests
func (CollectionsHandler) Delete ¶
func (h CollectionsHandler) Delete(w http.ResponseWriter, r *http.Request)
Delete handler
func (CollectionsHandler) Get ¶
func (h CollectionsHandler) Get(w http.ResponseWriter, r *http.Request)
Get handles a get request
func (CollectionsHandler) Post ¶
func (h CollectionsHandler) Post(w http.ResponseWriter, r *http.Request)
Post handler
type DiscoveryHandler ¶
type DiscoveryHandler struct { DiscoveryService cabby.DiscoveryService Port int }
DiscoveryHandler holds a cabby DiscoveryService
func (DiscoveryHandler) Delete ¶
func (h DiscoveryHandler) Delete(w http.ResponseWriter, r *http.Request)
Delete handler
func (DiscoveryHandler) Get ¶
func (h DiscoveryHandler) Get(w http.ResponseWriter, r *http.Request)
Get serves a discovery resource
func (DiscoveryHandler) Post ¶
func (h DiscoveryHandler) Post(w http.ResponseWriter, r *http.Request)
Post handler
type ManifestHandler ¶
type ManifestHandler struct {
ManifestService cabby.ManifestService
}
ManifestHandler holds a cabby ManifestService
func (ManifestHandler) Delete ¶
func (h ManifestHandler) Delete(w http.ResponseWriter, r *http.Request)
Delete handler
func (ManifestHandler) Get ¶
func (h ManifestHandler) Get(w http.ResponseWriter, r *http.Request)
Get serves a manifest resource
func (ManifestHandler) Post ¶
func (h ManifestHandler) Post(w http.ResponseWriter, r *http.Request)
Post handler
type ObjectHandler ¶
type ObjectHandler struct {
ObjectService cabby.ObjectService
}
ObjectHandler handles Objects requests
func (ObjectHandler) Delete ¶
func (h ObjectHandler) Delete(w http.ResponseWriter, r *http.Request)
Delete handles a delete of an object; can only be done given an ID
func (ObjectHandler) Get ¶
func (h ObjectHandler) Get(w http.ResponseWriter, r *http.Request)
Get handles a get request for the objects endpoint
func (ObjectHandler) Post ¶
func (h ObjectHandler) Post(w http.ResponseWriter, r *http.Request)
Post handler
type ObjectsHandler ¶
type ObjectsHandler struct { ObjectService cabby.ObjectService StatusService cabby.StatusService MaxContentLength int64 }
ObjectsHandler handles Objects requests
func (ObjectsHandler) Delete ¶
func (h ObjectsHandler) Delete(w http.ResponseWriter, r *http.Request)
Delete handler
func (ObjectsHandler) Get ¶
func (h ObjectsHandler) Get(w http.ResponseWriter, r *http.Request)
Get handles a get request for the objects endpoint
func (ObjectsHandler) Post ¶
func (h ObjectsHandler) Post(w http.ResponseWriter, r *http.Request)
Post handles post request
type RequestHandler ¶
type RequestHandler interface { Delete(w http.ResponseWriter, r *http.Request) Get(w http.ResponseWriter, r *http.Request) Post(w http.ResponseWriter, r *http.Request) }
RequestHandler interface for handling requests
type StatusHandler ¶
type StatusHandler struct {
StatusService cabby.StatusService
}
StatusHandler holds a cabby StatusService
func (StatusHandler) Delete ¶
func (h StatusHandler) Delete(w http.ResponseWriter, r *http.Request)
Delete handler
func (StatusHandler) Get ¶
func (h StatusHandler) Get(w http.ResponseWriter, r *http.Request)
Get serves a status resource
func (StatusHandler) Post ¶
func (h StatusHandler) Post(w http.ResponseWriter, r *http.Request)
Post handler
type VersionsHandler ¶
type VersionsHandler struct {
VersionsService cabby.VersionsService
}
VersionsHandler holds a cabby VersionsService
func (VersionsHandler) Delete ¶
func (h VersionsHandler) Delete(w http.ResponseWriter, r *http.Request)
Delete handler
func (VersionsHandler) Get ¶
func (h VersionsHandler) Get(w http.ResponseWriter, r *http.Request)
Get serves a Versions resource
func (VersionsHandler) Post ¶
func (h VersionsHandler) Post(w http.ResponseWriter, r *http.Request)
Post handler