Documentation
¶
Overview ¶
templ: version: v0.3.1001
templ: version: v0.3.1001
Index ¶
- type Config
- type Module
- func (m *Module) AttachRoutes(router *engine.Router)
- func (m *Module) AttachWorkers(procs *engine.ProcMgr)
- func (m *Module) ConfigSpec() config.Spec
- func (m *Module) GetConfiguredPrinterCount() int
- func (m *Module) SetConfigLoader(store *config.Store)
- func (m *Module) SetTestStream(serial string, source func(ctx context.Context) (io.ReadCloser, error))
- type PrinterConfig
- type PrinterStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Printers []PrinterConfig `json:"printers" config:"label=Printers,item=Printer,key=SerialNumber"`
PollIntervalSeconds int `` /* 179-byte string literal not displayed */
}
Config holds Bambu printer configuration.
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) AttachRoutes ¶
func (*Module) AttachWorkers ¶
func (*Module) ConfigSpec ¶
ConfigSpec returns the Bambu configuration specification.
func (*Module) GetConfiguredPrinterCount ¶
GetConfiguredPrinterCount returns the number of configured printers.
func (*Module) SetConfigLoader ¶
SetConfigLoader sets the typed config loader and performs the initial config load.
func (*Module) SetTestStream ¶
func (m *Module) SetTestStream(serial string, source func(ctx context.Context) (io.ReadCloser, error))
SetTestStream injects a stream multiplexer for the given serial. TEST-ONLY hook; production code populates this map from the bambu config.
type PrinterConfig ¶
type PrinterConfig struct {
Name string `json:"name" config:"label=Name,required,placeholder=e.g. Lab Printer 1"`
Host string `json:"host" config:"label=Host/IP Address,required,placeholder=e.g. 192.168.1.100"`
AccessCode string `json:"access_code" config:"label=Access Code"`
SerialNumber string `json:"serial_number" config:"label=Serial Number,required,placeholder=e.g. 01P00A123456789"`
}
PrinterConfig holds configuration for a single Bambu printer.
type PrinterStatus ¶
type PrinterStatus struct {
bambu.PrinterData
PrinterName string `json:"printer_name"`
SerialNumber string `json:"serial_number"`
JobFinishedTimestamp *int64 `json:"job_finished_timestamp"`
ErrorCode string `json:"error_code"`
StopRequested bool `json:"stop_requested"`
}
func (PrinterStatus) OwnerDiscordHandle ¶
func (p PrinterStatus) OwnerDiscordHandle() string
Click to show internal directories.
Click to hide internal directories.