server

package
v0.0.0-...-220885e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2017 License: MIT Imports: 20 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 {
	Addr      string
	QueueDir  string
	SecretKey string
	Conn      *db.Conn
	Queue     *queue.Queue
}

Config provides parameters for the web server.

type Server

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

Server provides the web interface for the application.

func New

func New(cfg *Config) (*Server, error)

New creates a new server instance.

func (*Server) Close

func (s *Server) Close()

Close shuts down the web server.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP does preparatory work for the handlers, attempting to load the current user from the database.

Jump to

Keyboard shortcuts

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