api

package
v0.0.0-...-8717a1f Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2020 License: GPL-2.0 Imports: 10 Imported by: 0

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
	Address string
}

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

func NewServer

func NewServer(cfg config.ApiConfig, 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

Jump to

Keyboard shortcuts

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