web

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	SimpleResponse
	Message string `json:"message"`
}

ErrorResponse is a response object for errors, containing a result (nok) and a message.

type SimpleResponse

type SimpleResponse struct {
	Result string `json:"result"`
}

SimpleResponse is a simple response object, containing a result (ok, nok).

type SpeedMessage

type SpeedMessage struct {
	Speed string `json:"speed"`
}

SpeedMessage is a message object for speed commands.

type TimerMessage

type TimerMessage struct {
	Duration int `json:"duration"`
}

TimerMessage is a message object for timer commands (should be 15, 30 or 30 minutes).

type WebService

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

WebService is a singleton that encapsulates the web server, and retains a cache of valid API keys.

func GetWebService

func GetWebService() *WebService

GetWebService returns the one and only WebServiceImpl instance.

func (*WebService) Start

func (s *WebService) Start()

Start the web server.

func (*WebService) Stop

func (s *WebService) Stop()

Stop the web server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳