Documentation ¶
Overview ¶
Package model contains contracts for inventory
Index ¶
Constants ¶
const ( // AWSInstanceInformation is inventory type of instance information AWSInstanceInformation = "AWS:InstanceInformation" // Enabled represents constant string used to enable various components of inventory plugin Enabled = "Enabled" // ErrorThreshold represents error threshold for inventory plugin ErrorThreshold = 10 // InventoryPolicyDocName represents name of inventory policy doc InventoryPolicyDocName = "policy.json" // SizeLimitKBPerInventoryType represents size limit in KB for 1 inventory data type SizeLimitKBPerInventoryType = 200 // TotalSizeLimitKB represents size limit in KB for 1 PutInventory API call TotalSizeLimitKB = 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationData ¶
type ApplicationData struct { Name string Publisher string Version string InstalledTime string `json:",omitempty"` ApplicationType string `json:",omitempty"` Architecture string URL string `json:",omitempty"` CompType ComponentType `json:"-"` }
ApplicationData captures all attributes present in AWS:Application inventory type
func MergeLists ¶
func MergeLists(primary []ApplicationData, secondary []ApplicationData) []ApplicationData
MergeLists combines a list of application data from a secondary source with a list from a primary source and returns a sorted result
type ByNamePublisherVersion ¶
type ByNamePublisherVersion []ApplicationData
ByNamePublisherVersion implements sorting ApplicationData elements by name (case insensitive) then by publisher (case insensitive) then version (by component)
func (ByNamePublisherVersion) Len ¶
func (s ByNamePublisherVersion) Len() int
func (ByNamePublisherVersion) Less ¶
func (s ByNamePublisherVersion) Less(i, j int) bool
func (ByNamePublisherVersion) Swap ¶
func (s ByNamePublisherVersion) Swap(i, j int)
type ComponentType ¶
type ComponentType uint
ComponentType is a flags enum that data providers can set and gatherers can filter on
const (
AWSComponent ComponentType = 1 << iota
)
type Config ¶
Config captures all various properties (including optional) that can be supplied to a gatherer. NOTE: Not all properties will be applicable to all gatherers. E.g: Applications gatherer uses Collection, Files use Filters, Custom uses Collection & Location.
type CustomInventoryItem ¶
CustomInventoryItem represents the schema of custom inventory item
type InstanceInformation ¶
type InstanceInformation struct { AgentStatus string AgentVersion string ComputerName string PlatformName string PlatformType string PlatformVersion string // SSM Inventory expects it InstanceId and not InstanceID InstanceId string // SSM Inventory expects it IpAddress and not IPAddress IpAddress string }
InstanceInformation captures all attributes present in AWS:InstanceInformation inventory type
type Item ¶
type Item struct { Name string //content depends on inventory type - hence set as interface{} here. //e.g: for application - it will contain []ApplicationData, //for instanceInformation - it will contain []InstanceInformation. Content interface{} ContentHash string SchemaVersion string CaptureTime string }
Item encapsulates an inventory item
type NetworkData ¶
type NetworkData struct { Name string SubnetMask string `json:",omitempty"` Gateway string `json:",omitempty"` DHCPServer string `json:",omitempty"` DNSServer string `json:",omitempty"` MacAddress string IPV4 string IPV6 string }
NetworkData captures all attributes present in AWS:Network inventory type