html

package
v0.0.0-...-0992052 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package html contain the http server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Name    string
	ID      int
	Pw      []byte
	Disable bool
	// contains filtered or unexported fields
}

Client the login object. Hold information of the user including loged-in information.

type Clients

type Clients struct {
	List   map[string]*Client
	NextID int
	// contains filtered or unexported fields
}

Clients the clients list.

func NewClients

func NewClients(games *games.Server) (clients *Clients)

func (*Clients) SetGameServer

func (clients *Clients) SetGameServer(games *games.Server) (oldGames *games.Server)

SetGameServer set the game server. The old game server is return, if set to nil all http server will return game server down. lock is used.

type ErrDown

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

ErrDown err when server is down.

func NewErrDown

func NewErrDown(reason string) (e *ErrDown)

func (*ErrDown) Error

func (e *ErrDown) Error() string

type ErrExist

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

ErrExist when user name and password combination do no match or user do not exist.

func NewErrExist

func NewErrExist(txt string) (e *ErrExist)

func (*ErrExist) Error

func (e *ErrExist) Error() string

type ErrSize

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

ErrSize err when password or name do meet size limits.

func NewErrSize

func NewErrSize(name int, pw int) (e *ErrSize)

func (*ErrSize) Error

func (e *ErrSize) Error() string

type Pages

type Pages struct {
	*sync.RWMutex
	// contains filtered or unexported fields
}

Pages is a html file cache with a read write log.

func NewPages

func NewPages() (pages *Pages)

type Server

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

Server a http server.

func New

func New(errCh chan<- error, port string, save bool, saveDir string, archiverPort int) (s *Server, err error)

New creates a new Server.

func (*Server) Start

func (s *Server) Start()

Start starts the server.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server.

Jump to

Keyboard shortcuts

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