rest

package
v0.0.0-...-7ac24f4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const HOME_ROUTE = "/"
View Source
const PORTS_ROUTE = "/portmanteaus"
View Source
const STATUS_ROUTE = "/status"

Variables

This section is empty.

Functions

func AddPackingHandlers

func AddPackingHandlers(c *PackingRecordContext)

func AddStatusHandlers

func AddStatusHandlers(c *ReadContext)

func SetCommonHeaders

func SetCommonHeaders(w http.ResponseWriter, d bool)

NOTE exported so that main can use it on OPTIONS req handling...

Types

type PackingRecordContext

type PackingRecordContext struct {
	Router   *httprouter.Router
	Recorder PackingRecorder
}

type PackingRecorder

type PackingRecorder interface {
	Record(string, *packing.Port) error
}

type PackingRecorderMock

type PackingRecorderMock struct {
	mock.Mock
}

func (*PackingRecorderMock) Record

func (r *PackingRecorderMock) Record(s string, p *packing.Port) error

Record allows the mock to implement Recorder

type ReadContext

type ReadContext struct {
	Router *httprouter.Router
}

Jump to

Keyboard shortcuts

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