web_server

package
v0.0.0-...-cb7da3c Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAvatarHandler

func NewAvatarHandler() http.HandlerFunc

func NewFaviconHandler

func NewFaviconHandler() http.HandlerFunc

func NewLoginPageHandler

func NewLoginPageHandler() http.HandlerFunc

Types

type State

type State int
const (
	StateMainPage State = iota
	StateSettings
	StateSelfCheckStraight
	StateSelfCheckBackward
	StateSelfCheckBoth
	StateTypingStraight
	StateTypingBackward
	StateTypingBoth
	StateNotAuthorised
)

func (State) String

func (s State) String() string

type UserSession

type UserSession struct {
	Username   string
	Password   string
	Expiration time.Time
	State      State
	Cookie     string
}

func NewUserSession

func NewUserSession(Username, Password string, Expiration time.Time, State State, Cookie string) *UserSession

func (*UserSession) SetNewState

func (us *UserSession) SetNewState(NewState State) (valid bool)

Jump to

Keyboard shortcuts

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