Documentation ¶
Index ¶
- Variables
- func Slugify(value string) string
- func UpdateApplicationGroups(app *models.App, deviceId int32, existingAppGroups []netbox.ApplicationGroup) []netbox.ApplicationGroup
- func UpdateApplicationPorts(app *models.App, deviceId int32, existingApps []netbox.Application, ...) ([]netbox.ApplicationPort, []int32)
- func UpdateApplications(app *models.App, deviceId int32, existingAppGroups []netbox.ApplicationGroup, ...) ([]netbox.Application, []int32)
- func UpdateDisk(hostDisk models.Disk, deviceId int32, roleId int32, ...) ([]netbox.InventoryItem, []int32)
- func UpdateIPAddresses(value *models.Host, interfaces []netbox.Interface, ...) ([]netbox.IPAddress, []int32)
- func UpdateInterfaces(value *models.Host, deviceId int32, existingInterfaces []netbox.Interface) ([]netbox.Interface, []int32)
- type Actuator
- type ArgusConfig
- type NetboxConverter
- type Storage
- func (s *Storage) AddAgent(uuid string, value models.Agent) error
- func (s *Storage) Get(uuid string) (*models.Host, error)
- func (s *Storage) GetAll() ([]*models.Host, error)
- func (s *Storage) Init() error
- func (s *Storage) MakeUpdate(before, after *models.Host)
- func (s *Storage) UpdateApp(uuid string, value *models.App) (bool, error)
- func (s *Storage) UpdateCpu(uuid string, value *models.Cpu) (bool, error)
- func (s *Storage) UpdateDevice(uuid string, value *models.Device) (bool, error)
- func (s *Storage) UpdateDisk(uuid string, value *models.Disk) (bool, error)
- func (s *Storage) UpdateNetwork(uuid string, value *models.Network) (bool, error)
- func (s *Storage) UpdateRam(uuid string, value *models.Ram) (bool, error)
- type VersionSearcher
- type VersionSearcherConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrHostNotFound = fmt.Errorf("could not find host") ErrDuplicateHost = fmt.Errorf("duplicate host") )
Functions ¶
func Slugify ¶
adapted from django slugify: https://github.com/django/django/blob/574ee4023e15cfb195833edfbaed353f8021c62f/django/utils/text.py#L421 converts a string into a url friendly string
func UpdateApplicationGroups ¶
func UpdateApplicationGroups(app *models.App, deviceId int32, existingAppGroups []netbox.ApplicationGroup) []netbox.ApplicationGroup
func UpdateApplicationPorts ¶
func UpdateApplicationPorts(app *models.App, deviceId int32, existingApps []netbox.Application, existingAppPorts []netbox.ApplicationPort) ([]netbox.ApplicationPort, []int32)
func UpdateApplications ¶
func UpdateApplications(app *models.App, deviceId int32, existingAppGroups []netbox.ApplicationGroup, existingApps []netbox.Application) ([]netbox.Application, []int32)
func UpdateDisk ¶
func UpdateDisk(hostDisk models.Disk, deviceId int32, roleId int32, existingDisks []netbox.InventoryItem) ([]netbox.InventoryItem, []int32)
func UpdateIPAddresses ¶
Types ¶
type ArgusConfig ¶
type ArgusConfig struct {
Server string
}
type NetboxConverter ¶
type NetboxConverter struct { }
func (*NetboxConverter) ConvertHost ¶
func (nc *NetboxConverter) ConvertHost(value *models.Host) *netbox.DeviceWithConfigContext
func (*NetboxConverter) UpdateDevice ¶
func (nc *NetboxConverter) UpdateDevice(value *models.Host, device *netbox.DeviceWithConfigContext)
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func (*Storage) MakeUpdate ¶
func (*Storage) UpdateDevice ¶
func (*Storage) UpdateDisk ¶
func (*Storage) UpdateNetwork ¶
type VersionSearcher ¶
type VersionSearcher struct {
// contains filtered or unexported fields
}
func NewSearcher ¶
func NewSearcher(config VersionSearcherConfig) *VersionSearcher
func (*VersionSearcher) Search ¶
func (v *VersionSearcher) Search() error
type VersionSearcherConfig ¶
type VersionSearcherConfig struct { Backend *backend.Backend Argus *ArgusConfig }
Click to show internal directories.
Click to hide internal directories.