Documentation
¶
Index ¶
- Constants
- func AppendAssets[T Asset](r *Resources, items []T)
- type Asset
- type BucketManager
- type BucketObject
- type BucketResult
- type DBManager
- type Database
- type Domain
- type Enumerator
- type ErrNoSuchKey
- type Event
- type EventReader
- type Host
- type IAMManager
- type IAMResult
- type Log
- type Options
- type Provider
- type Record
- type ResourceError
- type Resources
- type Sms
- type SmsSign
- type SmsTemplate
- type Storage
- type User
- type VMExecutor
Constants ¶
const ( AssetHost = "host" AssetStorage = "storage" AssetUser = "user" AssetDatabase = "database" AssetDomain = "domain" AssetLog = "log" )
Asset type constants. Providers and payloads should reference these rather than raw strings to keep the grouping key canonical.
Variables ¶
This section is empty.
Functions ¶
func AppendAssets ¶ added in v0.2.0
AppendAssets copies a typed slice into r.Assets as Asset values. Provider implementations use this to flow a []Host / []Storage / ... into the open asset list without writing the boxing loop inline.
Types ¶
type Asset ¶ added in v0.2.0
type Asset interface {
AssetType() string
}
Asset is any cloud resource that can be enumerated and rendered. New asset types (FaaS, K8s clusters, container registries, etc.) only need to implement AssetType() to flow through the existing asset-inventory pipeline.
type BucketManager ¶ added in v0.2.0
type BucketManager interface {
Provider
BucketDump(ctx context.Context, action, bucketName string) ([]BucketResult, error)
}
BucketManager powers the bucket-check payload.
type BucketObject ¶ added in v0.3.0
type BucketResult ¶ added in v0.3.0
type BucketResult struct {
Action string
BucketName string
ObjectCount int64
Objects []BucketObject
Message string
}
func AggregateBucketResults ¶ added in v0.3.0
func AggregateBucketResults(action, bucketName string, results []BucketResult) BucketResult
type Database ¶
type Enumerator ¶ added in v0.2.0
Enumerator powers the asset-inventory (`cloudlist`) payload.
type ErrNoSuchKey ¶
type ErrNoSuchKey struct {
Name string
}
ErrNoSuchKey means no such key exists in metadata.
func (*ErrNoSuchKey) Error ¶
func (e *ErrNoSuchKey) Error() string
Error returns the value of the metadata key
type EventReader ¶ added in v0.2.0
EventReader powers the event-check payload.
type Host ¶
type Host struct {
HostName string `table:"HostName"`
ID string `table:"Instance ID"`
State string `table:"State"`
PublicIPv4 string `table:"Public IP"`
PrivateIpv4 string `table:"Private IP"`
OSType string `table:"OS Type"`
DNSName string `table:"DNS Name"`
Public bool `table:"Public"`
Region string `table:"Region"`
}
type IAMManager ¶ added in v0.2.0
type IAMManager interface {
Provider
UserManagement(action, username, password string) (IAMResult, error)
}
IAMManager powers the iam-user-check payload.
type Log ¶ added in v0.1.2
type Provider ¶
type Provider interface {
Name() string
}
Provider is the minimum contract every cloud must satisfy. Capability interfaces below (Enumerator, IAMManager, etc.) extend it optionally; a payload type-asserts for the capability it needs and fails gracefully when the current provider does not implement it.
type ResourceError ¶ added in v0.2.0
type Resources ¶
type Resources struct {
Provider string
Assets []Asset
Sms Sms
Errors []ResourceError
}
type Sms ¶ added in v0.0.6
type Sms struct {
Signs []SmsSign
Templates []SmsTemplate
DailySize int64
}
type SmsTemplate ¶ added in v0.0.6
type Storage ¶
type User ¶
type VMExecutor ¶ added in v0.2.0
VMExecutor powers the instance-cmd-check / shell payloads.