server

package
v0.0.0-...-cb7fb10 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config struct {
	Port     string `toml:"port"`
	Recovery struct{}
	Entrance struct {
		RequestBuffer             int `toml:"request_buffer"`
		RequestTimeoutMillisecond int `toml:"request_timeout_millisecond"`
		MaxConcurrency            int `toml:"max_concurrency"`
	}
	CORS struct {
		AllowAllOrigins   bool     `toml:"allow_all_origins"`
		MaxAge            int      `toml:"max_age"`
		OptionPassThrough bool     `toml:"option_pass_through"`
		AllowedOrigins    []string `toml:"allowed_origins"`
		AllowedMethods    []string `toml:"allowed_methods"`
		AllowedHeaders    []string `toml:"allowed_headers"`
		ExposedHeaders    []string `toml:"exposed_headers"`
	}
}

Functions

func CORS

func CORS() gin.HandlerFunc

func Entrance

func Entrance() gin.HandlerFunc

func Recovery

func Recovery() gin.HandlerFunc

func Register

func Register(configurater func(r *gin.Engine))

func Run

func Run()

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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