routers

package
v0.0.0-...-36a84b4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFleetRoutes

func RegisterFleetRoutes(db *gorm.DB, router *gin.Engine)

func RegisterMinerRoutes

func RegisterMinerRoutes(db *gorm.DB, router *gin.Engine)

func RegisterMinerTimeSeriesRoutes

func RegisterMinerTimeSeriesRoutes(router *gin.Engine)

func RegisterScannerRoutes

func RegisterScannerRoutes(db *gorm.DB, router *gin.Engine)

TODO: separate the response logic into controller layer

Types

type FleetRequest

type FleetRequest struct {
	FleetID uint `json:"fleet_id"`
}

type MinerControlRequest

type MinerControlRequest struct {
	MacAddresses []string             `json:"mac_addresses"`
	Command      miner_domain.Command `json:"command"`
}

type MinerDetailRequest

type MinerDetailRequest struct {
	MacAddress string `json:"mac_address"`
}

type MinerTimeSeriesRequest

type MinerTimeSeriesRequest struct {
	MacAddress string `json:"mac_address"`

	Interval     int    `json:"interval"`      // NOTE: max-min timestamp range
	IntervalUnit string `json:"interval_unit"` // NOTE: h or m

	Window     int    `json:"window"`
	WindowUnit string `json:"window_unit"` // NOTE: h or m
}

Jump to

Keyboard shortcuts

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