api

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutomationState

type AutomationState struct {
	Enabled        bool      `json:"enabled"`
	TimeMultiplier float64   `json:"time_multiplier"`
	SimulatedTime  time.Time `json:"simulated_time"`
	Profile        string    `json:"profile"`
	UpdateInterval int       `json:"update_interval_ms"`
	// contains filtered or unexported fields
}

AutomationState holds the current automation configuration

type Server

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

Server handles HTTP API requests

func NewServer

func NewServer(modbusServer *modbus.Server) *Server

NewServer creates a new API server

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the HTTP handler

type WriteRequest

type WriteRequest struct {
	Value float64 `json:"value"`
}

WriteRequest is the request body for writing a register

Jump to

Keyboard shortcuts

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