app

package
v0.0.0-...-83425ee Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoute

func AddRoute(method string, path string, handleMethod string, handler interface{}) error

func NewLogger

func NewLogger(config ConfigType)

func Ready

func Ready(config map[interface{}]interface{})

func Run

func Run()

func WriteConfig

func WriteConfig(config ConfigType)

must be excuted after App initilized

Types

type Application

type Application struct {
	Server *http.Server
	Config *Config

	Dispatcher *dispatcher.Dispatcher
	// Middleware []*Middleware
	InitOver chan bool
}
var App *Application

func NewApp

func NewApp() *Application

type Config

type Config struct {
	Server *ServerConfig
}

func NewConfig

func NewConfig() *Config

func (*Config) RunAddr

func (c *Config) RunAddr() string

type ConfigType

type ConfigType map[interface{}]interface{}

type ServerConfig

type ServerConfig struct {
	Addr  string
	Port  string
	RunAs string

	LogPath string
	PidPath string
}

func NewServerConfig

func NewServerConfig() *ServerConfig

Jump to

Keyboard shortcuts

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