web

package
v0.0.0-...-99e368e Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Output

func Output(wm string, port string)

Output starts the server at desired port

Types

type Data

type Data struct {
	CSS        template.CSS
	JS         template.JS
	Layouts    Layouts
	LayoutMaps LayoutMaps
	LayoutName string
}

Data is sent to render the page

type Handler

type Handler struct {
	Template *template.Template
	Data     Data
}

Handler holds data needed for the page

func New

func New(layouts Layouts) Handler

New inits the handler for the web service

func (*Handler) HomeHandler

func (handler *Handler) HomeHandler(w http.ResponseWriter, r *http.Request)

HomeHandler serves root requests

func (Handler) Start

func (handler Handler) Start(port string) error

Start fires up the server

type KeyInfo

type KeyInfo struct {
	I, J, K   int
	Key_size  string
	Key_empty bool
	Key_usage int
	Key       keyboard.Key
}

type LayoutMap

type LayoutMap [][]string

type LayoutMaps

type LayoutMaps map[string]LayoutMap

type Layouts

type Layouts map[string][]modeKeyboards

Jump to

Keyboard shortcuts

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