server

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type App

type App struct {
	Config          config.Config
	ServiceProvider *serviceprovider.Container
}

App is the structure to set config & service provider of APP

func (*App) AppRoute

func (a *App) AppRoute() *mux.Router

AppRoute will add router

func (*App) InitilizeService

func (a *App) InitilizeService()

InitilizeService weavering services with global variables inside server package

func (*App) LoadConfig

func (a *App) LoadConfig(configPath string) *App

LoadConfig consumes a string of path to the json config file and read config file into Config.

func (*App) Start

func (a *App) Start(host, port string) error

Start consumes two strings, host and port, invoke service initilization and serve on desired host:port

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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