server

package
v0.0.0-...-12c9185 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	RegisterRoutes(router *mux.Router)
}

Handler is a contract to every handler that want to be included in the apps

type Server

type Server struct {
	Router *mux.Router
	Port   string
}

Server hold mux Router and information of host port and address of our app

func NewServer

func NewServer(Handlers []Handler) *Server

NewServer create Server from Handler

func (*Server) CreateHttpServer

func (s *Server) CreateHttpServer() *http.Server

CreateHttpServer will return http.Server for flexible use like testing

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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