managementinterface

package module
v1.24.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: GPL-3.0 Imports: 22 Imported by: 0

README

management-interface

This is a small web server which supports for management and configuration of Cacophononator devices from the The Cacophony Project.

Installing packr (will be done by make)

This project uses the packr tool to embed static resources (e.g. CSS, JS and image files) into the resulting Go binary.

To install packr from source, run:

go get -u github.com/gobuffalo/packr/packr

Make sure $GOPATH/bin is in your $PATH.

Alternatively download a stable prebuilt release of the packr tool and install it into a directory in your $PATH.

Building

Building will install packr for you. Make sure $GOPATH/bin is in your $PATH. To build the management server for ARM (to run on a Raspberry Pi):

make

To build the management server to run on your development machine:

make build

For either case the resulting executable is managementd.

Running on a Cacophonator

  • Build for ARM (run make)
  • Copy to the Pi: scp managementd pi@[host]
  • SSH to Pi: ssh pi@[host]
  • Stop the running management server: sudo systemctl stop cacophonator-management
  • Run the development version: sudo ./managementd

Releases

Releases are built using TravisCI. To create a release visit the repository on Github and then follow our general instructions for creating a release.

For more about the mechanics of how releases work, see .travis.yml and .goreleaser.yml.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AboutHandler

func AboutHandler(w http.ResponseWriter, r *http.Request, conf *goconfig.Config)

AboutHandler shows the currently installed packages on the device.

func AboutHandlerGen

func AboutHandlerGen(conf *goconfig.Config) func(http.ResponseWriter, *http.Request)

AboutHandlerGen is a wrapper for the AboutHandler function.

func AdvancedMenuHandler

func AdvancedMenuHandler(w http.ResponseWriter, r *http.Request)

AdvancedMenuHandler is a screen to more advanced settings.

func Audiobait added in v1.8.0

func Audiobait(w http.ResponseWriter, r *http.Request)

func CameraHandler

func CameraHandler(w http.ResponseWriter, r *http.Request)

CameraHandler will show a frame from the camera to help with positioning

func CameraSnapshot

func CameraSnapshot(w http.ResponseWriter, r *http.Request)

CameraSnapshot - Still image from Lepton camera

func CheckInterfaceHandler

func CheckInterfaceHandler(w http.ResponseWriter, r *http.Request)

CheckInterfaceHandler checks an interface to see if it is up or down. To do this the ping command is used to send data to Cloudfare at 1.1.1.1

func Config added in v1.7.0

func Config(w http.ResponseWriter, r *http.Request)

Config page to change devices config

func DiskMemoryHandler

func DiskMemoryHandler(w http.ResponseWriter, r *http.Request)

DiskMemoryHandler shows disk space usage and memory usage

func GenLocationHandler

func GenLocationHandler(config *goconfig.Config) func(w http.ResponseWriter, r *http.Request)

func IndexHandler

func IndexHandler(w http.ResponseWriter, r *http.Request)

IndexHandler is the root handler.

func LocationHandler

func LocationHandler(config *goconfig.Config, w http.ResponseWriter, r *http.Request)

LocationHandler shows and updates the location of the device.

func Modem added in v1.18.0

func Modem(w http.ResponseWriter, r *http.Request)

func NetworkHandler

func NetworkHandler(w http.ResponseWriter, r *http.Request)

NetworkHandler - Show the status of each network interface

func Rename

func Rename(w http.ResponseWriter, r *http.Request)

Rename page to change device name and group

func TimeHandler

func TimeHandler(w http.ResponseWriter, r *http.Request)

func WifiNetworkHandler

func WifiNetworkHandler(w http.ResponseWriter, r *http.Request)

WifiNetworkHandler show the wireless networks listed in the wpa_supplicant configuration

Types

type NetworkConfig

type NetworkConfig struct {
	Online bool `yaml:"online"`
}

NetworkConfig is a struct to store our network configuration values in.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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