server

package
v0.0.0-...-4ebe90f Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2016 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package server implements the core of the SysDB web server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// TemplatePath specifies the relative or absolute location of template files.
	TemplatePath string

	// StaticPath specifies the relative or absolute location of static files.
	StaticPath string

	// Root mount point of the server.
	Root string
}

A Config specifies configuration values for a SysDB web server.

type Server

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

A Server implements an http.Handler that serves the SysDB user interface.

func New

func New(addr, user string, cfg Config) (*Server, error)

New constructs a new SysDB web server using the specified configuration.

func (*Server) Root

func (s *Server) Root() string

Root returns the root mount point of the server suitable for use as a path prefix.

func (*Server) ServeHTTP

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

ServeHTTP implements the http.Handler interface and serves the SysDB user interface.

Jump to

Keyboard shortcuts

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