lemur

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2019 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const DEFAULT_HTTP_PORT = 8080

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiRoute

type ApiRoute struct {
	Name        string
	Methods     []string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

type HttpServer

type HttpServer struct {
	Router *mux.Router
}

func NewServer

func NewServer() (*HttpServer, error)

func (*HttpServer) AttachFileServer

func (self *HttpServer) AttachFileServer(path, directory string)

func (*HttpServer) AttachHandler

func (self *HttpServer) AttachHandler(path string, handler http.Handler)

func (*HttpServer) AttachHandlerFunc

func (self *HttpServer) AttachHandlerFunc(route ApiRoute)

func (*HttpServer) AttachHandlerFuncs

func (self *HttpServer) AttachHandlerFuncs(routes []ApiRoute)

func (*HttpServer) ListenAndServe

func (self *HttpServer) ListenAndServe(port int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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