http

package
v0.0.0-...-ab4b146 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCabby

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

NewCabby returns a new http server

func RouteRequest

func RouteRequest(h RequestHandler) http.HandlerFunc

RouteRequest takes a RequestHandler and routes requests to its methods

func WithMimeType

func WithMimeType(h http.HandlerFunc, mh, mv string) http.HandlerFunc

WithMimeType decorates a handle with content type check

Types

type APIRootHandler

type APIRootHandler struct {
	APIRootService cabby.APIRootService
}

APIRootHandler holds a cabby APIRootService

func (APIRootHandler) Get

Get handles a get request

func (APIRootHandler) Post

Post handles post request

type CollectionHandler

type CollectionHandler struct {
	CollectionService cabby.CollectionService
}

CollectionHandler handles Collection requestion

func (CollectionHandler) Get

Get handles a get request

func (CollectionHandler) Post

Post handles post request

type CollectionsHandler

type CollectionsHandler struct {
	CollectionService cabby.CollectionService
}

CollectionsHandler handles Collections requests

func (CollectionsHandler) Get

Get handles a get request

func (CollectionsHandler) Post

Post handles post request

type DiscoveryHandler

type DiscoveryHandler struct {
	DiscoveryService cabby.DiscoveryService
	Port             int
}

DiscoveryHandler holds a cabby DiscoveryService

func (DiscoveryHandler) Get

Get serves a discovery resource

func (DiscoveryHandler) Post

Post handles post request

type ManifestHandler

type ManifestHandler struct {
	ManifestService cabby.ManifestService
}

ManifestHandler holds a cabby ManifestService

func (ManifestHandler) Get

Get serves a manifest resource

func (ManifestHandler) Post

Post handles post request

type ObjectsHandler

type ObjectsHandler struct {
	ObjectService    cabby.ObjectService
	StatusService    cabby.StatusService
	MaxContentLength int64
}

ObjectsHandler handles Objects requests

func (ObjectsHandler) Get

Get handles a get request

func (ObjectsHandler) Post

Post handles post request

type RequestHandler

type RequestHandler interface {
	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) Get

Get serves a status resource

func (StatusHandler) Post

Post handles post request

Jump to

Keyboard shortcuts

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