Documentation
¶
Overview ¶
Package search provides FTS and relation-aware catalog browsing.
Index ¶
- type AddressRange
- type AddressUse
- type Edge
- type Inventory
- type NetworkOccupancy
- type Result
- type Site
- type Store
- func (s Store) ByHost(ctx context.Context, id string) (Inventory, error)
- func (s Store) ByNetwork(ctx context.Context, id string) (Inventory, error)
- func (s Store) GetSite(ctx context.Context, idOrName string) (Site, error)
- func (s Store) NetworkOccupancy(ctx context.Context, id string) (NetworkOccupancy, error)
- func (s Store) Search(ctx context.Context, q string) ([]Result, error)
- func (s Store) Topology(ctx context.Context, center string, depth int) (Topology, error)
- func (s Store) TopologyView(ctx context.Context, center string, depth int, view string) (Topology, error)
- type Topology
- type TopologyNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressRange ¶ added in v0.4.0
type AddressUse ¶ added in v0.4.0
type AddressUse struct {
Address string `json:"address"`
IPID string `json:"ip_id"`
HostID string `json:"host_id"`
Gateway bool `json:"gateway,omitempty"`
DHCP bool `json:"dhcp,omitempty"`
Conflict bool `json:"conflict,omitempty"`
}
AddressUse 保留每条登记记录,避免重复地址被集合去重后隐藏冲突。
type NetworkOccupancy ¶ added in v0.4.0
type NetworkOccupancy struct {
CIDR string `json:"cidr"`
Gateway string `json:"gateway,omitempty"`
DHCPRange string `json:"dhcp_range,omitempty"`
Used []AddressUse `json:"used"`
Free []AddressRange `json:"free"`
NextAvailable string `json:"next_available,omitempty"`
}
type Result ¶
type Result struct {
ID string `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
Status string `json:"status"`
SiteID string `json:"site_id,omitempty"`
NetworkID string `json:"network_id,omitempty"`
RouterID string `json:"router_id,omitempty"`
HostID string `json:"host_id,omitempty"`
RelatedIDs []string `json:"related_ids,omitempty"`
// contains filtered or unexported fields
}
type Store ¶
func (Store) NetworkOccupancy ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.