Documentation ¶
Index ¶
- type ResultShellyInfo
- type ShellyPlug
- func (sp *ShellyPlug) GetTargets() []discovery.DiscoveryTarget
- func (sp *ShellyPlug) Run()
- func (sp *ShellyPlug) SetHttpAuth(username, password string)
- func (sp *ShellyPlug) SetTargets(targets []discovery.DiscoveryTarget)
- func (sp *ShellyPlug) SetTimeout(timeout time.Duration)
- func (sp *ShellyPlug) SetUserAgent(val string)
- func (sp *ShellyPlug) UseDiscovery()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResultShellyInfo ¶
type ResultShellyInfo struct { Name string `json:"name"` ID string `json:"id"` Mac string `json:"mac"` Model string `json:"model"` Gen *int `json:"gen"` FwID string `json:"fw_id"` Ver string `json:"ver"` App string `json:"app"` AuthEn bool `json:"auth_en"` AuthDomain interface{} `json:"auth_domain"` }
type ShellyPlug ¶
type ShellyPlug struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, registry *prometheus.Registry, logger *zap.SugaredLogger) *ShellyPlug
func (*ShellyPlug) GetTargets ¶
func (sp *ShellyPlug) GetTargets() []discovery.DiscoveryTarget
func (*ShellyPlug) Run ¶
func (sp *ShellyPlug) Run()
func (*ShellyPlug) SetHttpAuth ¶
func (sp *ShellyPlug) SetHttpAuth(username, password string)
func (*ShellyPlug) SetTargets ¶
func (sp *ShellyPlug) SetTargets(targets []discovery.DiscoveryTarget)
func (*ShellyPlug) SetTimeout ¶
func (sp *ShellyPlug) SetTimeout(timeout time.Duration)
func (*ShellyPlug) SetUserAgent ¶
func (sp *ShellyPlug) SetUserAgent(val string)
func (*ShellyPlug) UseDiscovery ¶
func (sp *ShellyPlug) UseDiscovery()
Click to show internal directories.
Click to hide internal directories.