Documentation
¶
Index ¶
- type Client
- func (b *Client) Connect() error
- func (b *Client) Devices() []string
- func (b *Client) Publish(devId string, evt events.RequestEvent) error
- func (b *Client) SubscribeAll(handler func(devId string, evt events.ReportEvent)) error
- func (b *Client) Unsubscribe(devID string) error
- func (b *Client) UnsubscribeAll() error
- type ConnectionMode
- type Device
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewBambuClientCloud ¶
func NewBambuClientLan ¶
func (*Client) SubscribeAll ¶
func (b *Client) SubscribeAll(handler func(devId string, evt events.ReportEvent)) error
func (*Client) Unsubscribe ¶
func (*Client) UnsubscribeAll ¶
type ConnectionMode ¶
type ConnectionMode string
const ConnectionModeCloud ConnectionMode = "cloud"
const ConnectionModeLan ConnectionMode = "lan"
type Device ¶
type Device struct {
DevId string `json:"dev_id"`
Name string `json:"name"`
Online bool `json:"online"`
PrintStatus string `json:"print_status"`
DevModelName string `json:"dev_model_name"`
DevProductName string `json:"dev_product_name"`
DevAccessCode string `json:"dev_access_code"`
NozzleDiameter float64 `json:"nozzle_diameter"`
DevStructure string `json:"dev_structure"`
}
Click to show internal directories.
Click to hide internal directories.