store

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes added in v0.3.0

type Attributes struct {
	ID        int64
	Model     string
	Name      string
	Slug      string
	IP        string
	Role      string
	Site      string
	SiteGroup string
	Status    string
	Type      string
	Tenant    string
	CF        map[string]any
}

Attributes is a generalized view on data of different Netbox models used for filtering and indexing

type Device added in v0.3.0

type Device struct {
	*models.DeviceWithConfigContext
	SiteGroup *SiteGroup
}

func (*Device) Attributes added in v0.3.0

func (dev *Device) Attributes() (*Attributes, error)

type Filter added in v0.3.0

type Filter struct {
	// contains filtered or unexported fields
}

func NewFilter added in v0.3.0

func NewFilter(exprs []string) (*Filter, error)

func (*Filter) Run added in v0.3.0

func (filter *Filter) Run(attr *Attributes) (bool, error)

type IPAddress added in v0.3.0

type IPAddress struct {
	*models.IPAddress
	Site      *Site
	SiteGroup *SiteGroup
}

func (*IPAddress) Attributes added in v0.3.0

func (ipaddr *IPAddress) Attributes() (*Attributes, error)

type PollerProfile added in v0.3.0

type PollerProfile struct {
	Realm            string
	Site             string
	SiteGroup        string
	Tenant           string
	DiscoverySites   []string
	DiscoveryTenants []string
}

func (*PollerProfile) FilterExpressions added in v0.3.0

func (profile *PollerProfile) FilterExpressions() []string

type Site added in v0.3.0

type Site struct {
	*models.Site
	SiteGroup *SiteGroup
}

func (*Site) Attributes added in v0.3.0

func (site *Site) Attributes() (*Attributes, error)

type SiteGroup added in v0.3.0

type SiteGroup struct {
	*models.SiteGroup
}

func (*SiteGroup) Attributes added in v0.3.0

func (sg *SiteGroup) Attributes() (*Attributes, error)

type Store added in v0.3.0

type Store struct {
	// contains filtered or unexported fields
}

func NewStore added in v0.3.0

func NewStore(nc *client.NetboxClient) *Store

func (*Store) Devices added in v0.3.0

func (store *Store) Devices(filter *Filter) ([]*Device, error)

func (*Store) IPAddresses added in v0.3.0

func (store *Store) IPAddresses(filter *Filter) ([]*IPAddress, error)

func (*Store) LookupIPAddress added in v0.4.0

func (store *Store) LookupIPAddress(tenant string, address string) (*Attributes, error)

func (*Store) LookupPollerProfile added in v0.4.0

func (store *Store) LookupPollerProfile(name string) (*PollerProfile, error)

func (*Store) Refresh added in v0.3.0

func (store *Store) Refresh() error

func (*Store) SiteGroups added in v0.3.0

func (store *Store) SiteGroups(filter *Filter) ([]*SiteGroup, error)

func (*Store) Sites added in v0.3.0

func (store *Store) Sites(filter *Filter) ([]*Site, error)

func (*Store) Tenants added in v0.3.0

func (store *Store) Tenants(filter *Filter) ([]*Tenant, error)

func (*Store) VirtualMachines added in v0.3.0

func (store *Store) VirtualMachines(filter *Filter) ([]*VirtualMachine, error)

type Tenant added in v0.3.0

type Tenant struct {
	*models.Tenant
}

func (*Tenant) Attributes added in v0.3.0

func (t *Tenant) Attributes() (*Attributes, error)

type VirtualMachine added in v0.3.0

type VirtualMachine struct {
	*models.VirtualMachineWithConfigContext
	SiteGroup *SiteGroup
}

func (*VirtualMachine) Attributes added in v0.3.0

func (vm *VirtualMachine) Attributes() (*Attributes, error)

func (*VirtualMachine) PollerProfile added in v0.3.0

func (vm *VirtualMachine) PollerProfile() (*PollerProfile, error)

Jump to

Keyboard shortcuts

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