Documentation ¶
Overview ¶
Package model contains contracts for inventory
Index ¶
- Constants
- func FormatArchitecture(arch string) string
- type ApplicationData
- type BillingInfoData
- type ByNamePublisherVersion
- type ComponentType
- type Config
- type CustomInventoryItem
- type FileData
- type InstanceDetailedInformation
- type InstanceInformation
- type Item
- type NetworkData
- type Policy
- type RegistryData
- type RoleData
- type ServiceData
- type WindowsUpdateData
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 // Bump up to 3MB for agent. We have more strict size limit rule in the micro service. SizeLimitKBPerInventoryType = 3072 // TotalSizeLimitKB represents size limit in KB for 1 PutInventory API call TotalSizeLimitKB = 10240 // Standard name for 64-bit architecture Arch64Bit = "x86_64" // Standard name for 32-bit architecture Arch32Bit = "i386" )
Variables ¶
This section is empty.
Functions ¶
func FormatArchitecture ¶
FormatArchitecture converts different architecture values to the standard inventory value
Types ¶
type ApplicationData ¶
type ApplicationData struct { Name string Publisher string Version string Release string `json:",omitempty"` Epoch string `json:",omitempty"` InstalledTime string `json:",omitempty"` ApplicationType string `json:",omitempty"` Architecture string URL string `json:",omitempty"` Summary string `json:",omitempty"` PackageId 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 BillingInfoData ¶
type BillingInfoData struct {
BillingProductId string
}
BillingInfoData captures all attributes present in AWS:BillingInfo inventory type
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 ¶
type Config struct { Collection string `json:"Collection"` Filters string `json:"Filters"` Location string `json:"Location"` }
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 FileData ¶
type FileData struct { Name string Size string Description string FileVersion string InstalledDate string ModificationTime string LastAccessTime string ProductName string InstalledDir string CompanyName string ProductVersion string ProductLanguage string }
FileData captures all attributes present in AWS:File inventory type
type InstanceDetailedInformation ¶
type InstanceDetailedInformation struct { CPUModel string CPUSpeedMHz string CPUs string CPUSockets string CPUCores string CPUHyperThreadEnabled string OSServicePack string KernelVersion string }
InstanceDetailedInformation captures all attributes present in AWS:InstanceDetailedInformation inventory type
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