api

package
v0.0.0-...-94e7ec6 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HomePageContent The text to be displayed on the home page
	HomePageContent string = `` /* 293-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	Get() map[string]http.HandlerFunc
	Post() map[string]http.HandlerFunc
	Running() func()
}

API provides the interface through which it is possible to expose API on the Core Server

func NewHome

func NewHome() API

func NewIndex

func NewIndex() API

type Empty

type Empty struct{}

Empty the Api interface implementation for the Empty Api

func (Empty) Get

func (h Empty) Get() map[string]http.HandlerFunc

Get Implements the Get API for the Empty definition

func (Empty) Post

func (h Empty) Post() map[string]http.HandlerFunc

Post Implements the Post API for the Empty definition

func (Empty) Running

func (h Empty) Running() func()

type Handler

type Handler struct {
	Runnings []func()
	// contains filtered or unexported fields
}

Handler implements the http handeling of a sip instance

func (*Handler) Add

func (rh *Handler) Add(a API) error

Add adds a map of Api implementations to the Handler instance

func (*Handler) AddCore

func (rh *Handler) AddCore()

AddCore adds the core API implementations to the Handler instance

func (*Handler) Running

func (rh *Handler) Running()

func (*Handler) ServeHTTP

func (rh *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Home

type Home struct{}

Home the Api interface implementation for the Home Api

func (Home) Get

func (h Home) Get() map[string]http.HandlerFunc

Get Implements the Get API for the Home definition

func (Home) Post

func (h Home) Post() map[string]http.HandlerFunc

Post Implements the Post API for the Home definition

func (Home) Running

func (h Home) Running() func()

type Index

type Index struct {
	// contains filtered or unexported fields
}

Index the Api interface implementation for the Index Api

func (Index) Get

func (h Index) Get() map[string]http.HandlerFunc

Get Implements the Get API for the Index definition

func (Index) Post

func (h Index) Post() map[string]http.HandlerFunc

Post Implements the Post API for the Index definition

func (Index) Running

func (h Index) Running() func()

Jump to

Keyboard shortcuts

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