devices

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDeviceClassTargets

func LoadDeviceClassTargets(deviceClassTargetCfgs map[string]*config.BackupTargetConfig) (map[string]*DeviceClassTarget, error)

func LoadDeviceClasses

func LoadDeviceClasses(deviceClassCfgs map[string]*config.DeviceClassConfig) (map[string]*DeviceClass, error)

func LoadDevices

func LoadDevices(deviceGroupCfgs map[string]*config.DeviceGroupConfig, deviceClasses map[string]*DeviceClass, authProviders *auth.ProviderPool) (map[string]*Device, error)

Types

type Device

type Device struct {
	Name             string
	Class            *DeviceClass
	Address          string
	AuthProviderName string
	AuthPath         string
	Auth             auth.Auth
}

Device represents a network device to be managed

type DeviceClass

type DeviceClass struct {
	Targets map[string]*DeviceClassTarget
}

DeviceClass represents a class of devices

type DeviceClassTarget

type DeviceClassTarget struct {
	Name  string
	Macro *otto.Script
}

func NewDeviceClassTarget

func NewDeviceClassTarget(name string, macroSrc string) (*DeviceClassTarget, error)

Jump to

Keyboard shortcuts

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