Documentation
¶
Index ¶
Constants ¶
const ( ResourceClassUndefined ResourceClass = "" ResourceClassUnknown ResourceClass = "unknown" ResourceClassAnalytics ResourceClass = "analytics" ResourceClassBlockStorage ResourceClass = "block-storage" ResourceClassCompute ResourceClass = "compute" ResourceClassDatabase ResourceClass = "database" ResourceClassFileStorage ResourceClass = "file-storage" ResourceClassHypervisor ResourceClass = "hypervisor" ResourceClassIdentity ResourceClass = "identity" ResourceClassMessaging ResourceClass = "messaging" ResourceClassNetwork ResourceClass = "network" ResourceClassObjectStorage ResourceClass = "object-storage" ResourceClassObservability ResourceClass = "observability" ResourceClassRegistry ResourceClass = "registry" ResourceClassSecurity ResourceClass = "security" ResourceClassService ResourceClass = "service" ResourceSubClassUndefined ResourceSubClass = "" ResourceSubClassUnknown ResourceSubClass = "unknown" ResourceSubClassAzBlob ResourceSubClass = "azblob" ResourceSubClassFTP ResourceSubClass = "ftp" ResourceSubClassGCS ResourceSubClass = "gcs" ResourceSubClassIMAP ResourceSubClass = "imap" ResourceSubClassMongoDB ResourceSubClass = "mongodb" ResourceSubClassMySQL ResourceSubClass = "mysql" ResourceSubClassPVC ResourceSubClass = "pvc" ResourceSubClassPostgreSQL ResourceSubClass = "postgresql" ResourceSubClassProxmox ResourceSubClass = "proxmox" ResourceSubClassRedis ResourceSubClass = "redis" ResourceSubClassS3 ResourceSubClass = "s3" ResourceSubClassSecretManager ResourceSubClass = "secret-manager" ResourceSubClassSFTP ResourceSubClass = "sftp" ResourceSubClassVMware ResourceSubClass = "vmware" ConnectorTypeImporter ConnectorType = "importer" ConnectorTypeExporter ConnectorType = "exporter" ConnectorTypeStorage ConnectorType = "storage" ConnectorTypeSecretProvider ConnectorType = "secret_provider" ConnectorTypeInventory ConnectorType = "inventory" )
Variables ¶
Functions ¶
func GetClassTree ¶
func GetClassTree() map[ResourceClass][]ResourceSubClass
Types ¶
type ConnectorType ¶
type ConnectorType string
func (ConnectorType) IsValid ¶
func (c ConnectorType) IsValid() bool
type Country ¶
type Country string
Country is where a resource physically sits, as an ISO 3166-1 alpha-2 code. It is an observation, not a rule: whether data is allowed to be there is the control plane's question, not the integration's.
Empty means we cannot tell -- correct for an SFTP host or a local filesystem. It never means "same as the inventory": nothing is inferred from anything else.
func CountryOf ¶
CountryOf normalizes a code, returning "" for anything that is not one. Use it on the way out so an unmapped region becomes "unknown" rather than a bad code.
The shape is checked rather than the code looked up in a list of countries: that list changes, and an integration somewhere we have not heard of should not wait for an SDK release.
type EndpointType ¶
type EndpointType string
const ( EndpointUndefined EndpointType = "" EndpointHost EndpointType = "host" EndpointInet4 EndpointType = "inet4" EndpointInet6 EndpointType = "inet6" EndpointUUID EndpointType = "uuid" EndpointNetwork EndpointType = "network" EndpointIdentifier EndpointType = "identifier" )
func EndpointTypeFromString ¶
func EndpointTypeFromString(t string) (EndpointType, error)
type HostEndpoint ¶
type HostEndpoint struct {
Type EndpointType
Endpoint string
Attributes map[string]string
}
type InventoryEntry ¶
type InventoryEntry struct {
Class ResourceClass // interpreted
SubClass ResourceSubClass // interpreted
Tags []string // <value>, <key>=<value>
// The rest is provider data
URN string //
Name string //
Region string // eu-west-3, paris/dc-1, ...
Service string // s3, ec2, instance, dedicated-server, ...
Resource string // s3:bucket, ec2:volume, ...
Details []byte // Additional backend-specific content
Endpoints []HostEndpoint
// Fill via CountryOf. Report it on every entry you can.
Country Country
}
type ResourceClass ¶
type ResourceClass string
func (ResourceClass) IsValid ¶
func (c ResourceClass) IsValid() bool
type ResourceSubClass ¶
type ResourceSubClass string
func (ResourceSubClass) IsSubClassOf ¶
func (c ResourceSubClass) IsSubClassOf(parent ResourceClass) bool
func (ResourceSubClass) IsValid ¶
func (c ResourceSubClass) IsValid() bool
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
inventory-run
command
|
|
|
secret-run
command
|
|
|
cmd/example-inventory
command
|
|
|
cmd/rot13
command
|
|
|
Package stdioconn provides a net.Conn over a pair of files, such as the standard input and output of a process or the pipes to a child.
|
Package stdioconn provides a net.Conn over a pair of files, such as the standard input and output of a process or the pipes to a child. |