httpserver

package
v0.0.0-...-da19eeb Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPServer

func NewHTTPServer(cfg *Config, router http.Handler) *http.Server

Types

type CORSConfig

type CORSConfig struct {
	Origins []string `json:"origins"`
	Methods []string `json:"methods"`
	Headers []string `json:"headers"`
}

type Config

type Config struct {
	Addr string      `json:"addr"`
	CORS *CORSConfig `json:"cors"`
}

Jump to

Keyboard shortcuts

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