http

package
v0.0.0-...-cd9fc01 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const APIRootMethods = "Get, Head"

APIRootMethods lists allowed methods

View Source
const CollectionMethods = "Get, Head"

CollectionMethods lists allowed methods

View Source
const CollectionsMethods = "Get, Head"

CollectionsMethods lists allowed methods

View Source
const DiscoveryMethods = "Get, Head"

DiscoveryMethods lists allowed methods

View Source
const ManifestMethods = "Get, Head"

ManifestMethods lists allowed methods

View Source
const ObjectMethods = "Get, Delete, Head"

ObjectMethods lists allowed methods

View Source
const ObjectsMethods = "Get, Head, Post"

ObjectsMethods lists allowed methods

View Source
const StatusMethods = "Get, Head"

StatusMethods lists allowed methods

View Source
const VersionsMethods = "Get, Head"

VersionsMethods lists allowed methods

Variables

This section is empty.

Functions

func NewCabby

func NewCabby(ds cabby.DataStore, c cabby.Config) *http.Server

NewCabby returns a new http server

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

Get handles a get request

func (APIRootHandler) Post

Post handler

type CollectionHandler

type CollectionHandler struct {
	CollectionService cabby.CollectionService
}

CollectionHandler handles Collection requestion

func (CollectionHandler) Delete

Delete handler

func (CollectionHandler) Get

Get handles a get request

func (CollectionHandler) Post

Post handler

type CollectionsHandler

type CollectionsHandler struct {
	CollectionService cabby.CollectionService
}

CollectionsHandler handles Collections requests

func (CollectionsHandler) Delete

Delete handler

func (CollectionsHandler) Get

Get handles a get request

func (CollectionsHandler) Post

Post handler

type DiscoveryHandler

type DiscoveryHandler struct {
	DiscoveryService cabby.DiscoveryService
	Port             int
}

DiscoveryHandler holds a cabby DiscoveryService

func (DiscoveryHandler) Delete

Delete handler

func (DiscoveryHandler) Get

Get serves a discovery resource

func (DiscoveryHandler) Post

Post handler

type ManifestHandler

type ManifestHandler struct {
	ManifestService cabby.ManifestService
}

ManifestHandler holds a cabby ManifestService

func (ManifestHandler) Delete

Delete handler

func (ManifestHandler) Get

Get serves a manifest resource

func (ManifestHandler) Post

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

Get handles a get request for the objects endpoint

func (ObjectHandler) Post

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

Get handles a get request for the objects endpoint

func (ObjectsHandler) Post

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

Get serves a status resource

func (StatusHandler) Post

Post handler

type VersionsHandler

type VersionsHandler struct {
	VersionsService cabby.VersionsService
}

VersionsHandler holds a cabby VersionsService

func (VersionsHandler) Delete

Delete handler

func (VersionsHandler) Get

Get serves a Versions resource

func (VersionsHandler) Post

Post handler

Jump to

Keyboard shortcuts

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