shellyplug

package
v0.0.0-...-0c72a7a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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()

Jump to

Keyboard shortcuts

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