server

package
v0.0.0-...-e2b10d7 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host          string `env:"HCMS_HOST"`
	Port          string `env:"HCMS_PORT"`
	LogLevel      string `env:"HCMS_LOG_LEVEL"`
	TextLogging   bool   `env:"HCMS_TEXT_LOGGING"`
	JwtSecret     string `env:"HCMS_JWT_SECRET"`
	JwtCookieName string `env:"HCMS_JWT_COOKIE_NAME"`
}
var DefaultConfig Config

func ReadConfig

func ReadConfig() *Config

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(config *Config, store cms.Repository) *Handler

NewHandler creates a new top level api handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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