ui

package
v0.0.0-...-132a92c Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package 'ui' -server -handler -router -routes

-html/ -images/ -pages/ -scripts/ -style/

Package 'ui' -server -handler -router -routes

-html/ -images/ -pages/ -scripts/ -style/

Package 'ui' -server -handler -router -routes

-html/ -images/ -pages/ -scripts/ -style/

Package 'ui' -server -handler -router -routes

-html/ -images/ -pages/ -scripts/ -style/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Index

func Index(w http.ResponseWriter, r *http.Request, u *UI) error

Index

func SSE

func SSE(w http.ResponseWriter, r *http.Request, u *UI) error

func WebUI

func WebUI(w http.ResponseWriter, r *http.Request, u *UI) error

WebUI

Types

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

func GenerateRoute

func GenerateRoute(n string, m string, p string, h http.HandlerFunc) *Route

type UI

type UI struct {
	Listenaddr               string
	ClientStormControlPeriod int
	// contains filtered or unexported fields
}

func GetUI

func GetUI() *UI

GetUI: method returns global ui

func NewUI

func NewUI(e *environment.Environment, listenaddr string) *UI

NewUI: return a new UI

func (*UI) AddRoute

func (u *UI) AddRoute(route *Route)

AddRoute: add one route to the router

func (*UI) AddRoutes

func (u *UI) AddRoutes(routes []*Route)

AddRoutes: add a set of routes

func (*UI) GenerateRoutes

func (u *UI) GenerateRoutes()

GenerateAPIRoutes: generate a set of routes to serve

func (*UI) GetClientStormControlPeriod

func (u *UI) GetClientStormControlPeriod() int

GetClientStormControlPeriod

func (*UI) GetInputChannel

func (u *UI) GetInputChannel() chan []byte

GetInputChannel

func (*UI) GetListenaddr

func (u *UI) GetListenaddr() string

GetListenaddr

func (*UI) GetRouter

func (u *UI) GetRouter() *mux.Router

GetRouter

func (*UI) GetTemplates

func (u *UI) GetTemplates() *template.Template

GetTemplates

func (*UI) SayHi

func (u *UI) SayHi()

# # Specific methods #---------------------------------------------------------------------

SayHi: do nothing

func (*UI) SetClientStormControlPeriod

func (u *UI) SetClientStormControlPeriod(t int)

SetClientStormControlPeriod

func (*UI) SetInputChannel

func (u *UI) SetInputChannel(i chan []byte)

SetInputChannel

func (*UI) SetListenaddr

func (u *UI) SetListenaddr(l string)

SetListenaddr

func (*UI) SetRouter

func (u *UI) SetRouter(r *mux.Router)

SetRouter

func (*UI) SetTemplates

func (u *UI) SetTemplates(t *template.Template)

SetTemplates

func (*UI) StartReceiver

func (u *UI) StartReceiver() error

StartReceiver: method prepare engine to receive []byte to be sent to client

func (*UI) StartUI

func (u *UI) StartUI()

StartUI: method starts web server

func (*UI) String

func (u *UI) String() string

String: converts a SampleSystem object to string

Jump to

Keyboard shortcuts

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