webserver

package
v0.0.0-...-301f747 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2015 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package webserver implements a json api for the client to be able to access results from the web.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthorized = errors.New("Unauthorized access")

ErrUnauthorized happens when an unauthorized access occur.

Functions

This section is empty.

Types

type Config

type Config struct {
	UserStore          user.Store
	CrawlerConfigStore crawlerconfig.Store
	UserResultsStore   results.Store
	RSAPublic          []byte
	RSAPrivate         []byte
	CrawlerClient      api.Crawler
}

Config contains parameters to initialize the webserver.

type Webserver

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

Webserver serves as a global context for the server.

func NewWebserver

func NewWebserver(config *Config) *Webserver

NewWebserver creates a new webserver object.

func (*Webserver) Start

func (server *Webserver) Start(httpPort, httpsPort, cert, key string)

Start starts the server at address. Panics if there is an error.

Jump to

Keyboard shortcuts

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