Documentation ¶
Index ¶
- Variables
- func HandleError(ctx context.Context, err error)
- func IgnoreErrors(ctx context.Context, err error)
- func LogErrors(ctx context.Context, err error)
- func WithErrorHandler(ctx context.Context, handler ErrorHandler) context.Context
- type Account
- type AccountInfo
- type AccountInfoer
- type Accounts
- func (a Accounts) AccountInfos(ctx context.Context) chan AccountInfo
- func (a Accounts) InRegion(region ...string) RegionalAccounts
- func (a Accounts) NameRecords(ctx context.Context) chan NameRecord
- func (a Accounts) String() string
- func (a Accounts) Unique(ctx context.Context) Accounts
- func (a Accounts) Zones(ctx context.Context) chan Zone
- type Common
- type DBCluster
- type DBClusterer
- type DBInstance
- type DBInstancer
- type ErrorCollector
- type ErrorHandler
- type FieldBuilder
- func (f *FieldBuilder) Add(meta FieldMeta, value string, options ...MetadataOption) *FieldBuilder
- func (f *FieldBuilder) Description(value string) *FieldBuilder
- func (f *FieldBuilder) Done()
- func (f *FieldBuilder) GID(value string) *FieldBuilder
- func (f *FieldBuilder) How(name, value string, options ...MetadataOption) *FieldBuilder
- func (f *FieldBuilder) Name(value string) *FieldBuilder
- func (f *FieldBuilder) Tag(name, value string, options ...MetadataOption) *FieldBuilder
- func (f *FieldBuilder) What(name, value string, options ...MetadataOption) *FieldBuilder
- func (f *FieldBuilder) When(name string, t time.Time, options ...MetadataOption) *FieldBuilder
- func (f *FieldBuilder) Where(name, value string, options ...MetadataOption) *FieldBuilder
- func (f *FieldBuilder) Who(name, value string, options ...MetadataOption) *FieldBuilder
- func (f *FieldBuilder) Why(name, value string, options ...MetadataOption) *FieldBuilder
- type FieldFilter
- type FieldMeta
- type FieldType
- type FieldValue
- type Fielder
- type Fields
- type FieldsAccumulator
- type ID
- type IFieldBuilder
- type Instance
- type Instancer
- type LineFilter
- type MachineImage
- type MachineImager
- type MetadataOption
- type NameRecord
- type NameRecorder
- type Provider
- type ProviderMethod
- type RegionalAccount
- type RegionalAccounts
- func (a RegionalAccounts) DBClusters(ctx context.Context) chan DBCluster
- func (a RegionalAccounts) DBInstances(ctx context.Context) chan DBInstance
- func (a RegionalAccounts) Instances(ctx context.Context) chan Instance
- func (a RegionalAccounts) MachineImages(ctx context.Context) chan MachineImage
- func (a RegionalAccounts) Snapshots(ctx context.Context) chan Snapshot
- func (a RegionalAccounts) Subscriptions(ctx context.Context) chan Subscription
- func (a RegionalAccounts) Topics(ctx context.Context) chan Topic
- func (a RegionalAccounts) Volumes(ctx context.Context) chan Volume
- type Snapshot
- type Snapshoter
- type Sourcer
- type Subscription
- type Subscriptioner
- type Topic
- type Topicer
- type Volume
- type Volumer
- type Zone
- type Zoner
Constants ¶
This section is empty.
Variables ¶
var ( DescriptionMeta = FieldMeta{ Kind: DESCRIPTION, Name: "description", DefaultHidden: true, } NameMeta = FieldMeta{ Kind: NAME, Name: "name", } IDMeta = FieldMeta{ Kind: GID, Name: "ID", } )
var DefaultHidden = func(meta FieldMeta) FieldMeta { meta.DefaultHidden = true return meta }
Functions ¶
func HandleError ¶
func IgnoreErrors ¶
IgnoreErrors ignores all errors. If it returns true, procesing should be aborted
func WithErrorHandler ¶
func WithErrorHandler(ctx context.Context, handler ErrorHandler) context.Context
Types ¶
type Account ¶
type Account interface { fmt.Stringer InRegion(region string) RegionalAccount Name() string Fielder AccountInfoer }
type AccountInfo ¶
type AccountInfo interface { Common Account() Account Ctx() context.Context Name() string ID() string }
AccountInfo gets details about a specific account
type AccountInfoer ¶
type AccountInfoer interface {
AccountInfos(context.Context) chan AccountInfo
}
AccountInfoer marks a type that can provide a channel of AccountInfo
type Accounts ¶
type Accounts []Account
func (Accounts) AccountInfos ¶
func (a Accounts) AccountInfos(ctx context.Context) chan AccountInfo
func (Accounts) InRegion ¶
func (a Accounts) InRegion(region ...string) RegionalAccounts
func (Accounts) NameRecords ¶
func (a Accounts) NameRecords(ctx context.Context) chan NameRecord
type DBClusterer ¶ added in v0.5.0
DBClusterer marks a type that can provide a channel of DBCluster
type DBInstance ¶ added in v0.5.0
type DBInstance interface { Common }
type DBInstancer ¶ added in v0.5.0
type DBInstancer interface {
DBInstances(context.Context) chan DBInstance
}
DBInstancer marks a type that can provide a channel of DBInstance
type ErrorCollector ¶
type ErrorCollector struct {
Error error
}
ErrorCollector uses multierror to accumulate errors into a large list
type ErrorHandler ¶
ErrorHandler is called by individual methods to handle and possibly abort processing
func ErrorContext ¶
func ErrorContext(ctx context.Context) ErrorHandler
type FieldBuilder ¶
type FieldBuilder struct {
Fields Fields
}
func NewBuilder ¶
func NewBuilder() *FieldBuilder
func (*FieldBuilder) Add ¶
func (f *FieldBuilder) Add(meta FieldMeta, value string, options ...MetadataOption) *FieldBuilder
func (*FieldBuilder) Description ¶
func (f *FieldBuilder) Description(value string) *FieldBuilder
func (*FieldBuilder) Done ¶
func (f *FieldBuilder) Done()
Done is syntactic sugar to help make a chain of calls more convenient
func (*FieldBuilder) GID ¶
func (f *FieldBuilder) GID(value string) *FieldBuilder
func (*FieldBuilder) How ¶
func (f *FieldBuilder) How(name, value string, options ...MetadataOption) *FieldBuilder
func (*FieldBuilder) Name ¶
func (f *FieldBuilder) Name(value string) *FieldBuilder
func (*FieldBuilder) Tag ¶
func (f *FieldBuilder) Tag(name, value string, options ...MetadataOption) *FieldBuilder
func (*FieldBuilder) What ¶
func (f *FieldBuilder) What(name, value string, options ...MetadataOption) *FieldBuilder
func (*FieldBuilder) When ¶
func (f *FieldBuilder) When(name string, t time.Time, options ...MetadataOption) *FieldBuilder
func (*FieldBuilder) Where ¶
func (f *FieldBuilder) Where(name, value string, options ...MetadataOption) *FieldBuilder
func (*FieldBuilder) Who ¶
func (f *FieldBuilder) Who(name, value string, options ...MetadataOption) *FieldBuilder
func (*FieldBuilder) Why ¶
func (f *FieldBuilder) Why(name, value string, options ...MetadataOption) *FieldBuilder
type FieldFilter ¶
type FieldValue ¶
func NewFieldValue ¶
func NewFieldValue(s string) *FieldValue
func (*FieldValue) Add ¶
func (f *FieldValue) Add(s string)
func (FieldValue) String ¶
func (f FieldValue) String() string
type Fielder ¶
type Fielder interface {
GetFields(builder IFieldBuilder)
}
type Fields ¶
type Fields map[FieldMeta]*FieldValue
type FieldsAccumulator ¶
type FieldsAccumulator struct { Lines []Fields // contains filtered or unexported fields }
func NewAccumulator ¶
func NewAccumulator() FieldsAccumulator
func (*FieldsAccumulator) Add ¶
func (acc *FieldsAccumulator) Add(fielder Fielder)
func (*FieldsAccumulator) Fields ¶
func (acc *FieldsAccumulator) Fields() []FieldMeta
func (*FieldsAccumulator) Print ¶
func (acc *FieldsAccumulator) Print(f FieldFilter, l LineFilter, printTitles bool)
type IFieldBuilder ¶
type IFieldBuilder interface { Who(name, value string, options ...MetadataOption) *FieldBuilder What(name, value string, options ...MetadataOption) *FieldBuilder Where(name, value string, options ...MetadataOption) *FieldBuilder When(name string, t time.Time, options ...MetadataOption) *FieldBuilder How(name, value string, options ...MetadataOption) *FieldBuilder Why(name, value string, options ...MetadataOption) *FieldBuilder Tag(name, value string, options ...MetadataOption) *FieldBuilder GID(value string) *FieldBuilder Name(value string) *FieldBuilder Description(value string) *FieldBuilder Done() }
type LineFilter ¶
type MachineImage ¶
type MachineImage interface { Common }
type MachineImager ¶
type MachineImager interface {
MachineImages(context.Context) chan MachineImage
}
MachineImager marks a type that can provide a channel of MachineImage
type MetadataOption ¶
type NameRecorder ¶
type NameRecorder interface {
NameRecords(context.Context) chan NameRecord
}
NameRecorder marks a type that can provide a channel of NameRecord
type ProviderMethod ¶
type RegionalAccount ¶
type RegionalAccounts ¶
type RegionalAccounts []RegionalAccount
func (RegionalAccounts) DBClusters ¶ added in v0.5.0
func (a RegionalAccounts) DBClusters(ctx context.Context) chan DBCluster
func (RegionalAccounts) DBInstances ¶ added in v0.5.0
func (a RegionalAccounts) DBInstances(ctx context.Context) chan DBInstance
func (RegionalAccounts) Instances ¶
func (a RegionalAccounts) Instances(ctx context.Context) chan Instance
func (RegionalAccounts) MachineImages ¶
func (a RegionalAccounts) MachineImages(ctx context.Context) chan MachineImage
func (RegionalAccounts) Snapshots ¶
func (a RegionalAccounts) Snapshots(ctx context.Context) chan Snapshot
func (RegionalAccounts) Subscriptions ¶ added in v0.4.0
func (a RegionalAccounts) Subscriptions(ctx context.Context) chan Subscription
type Snapshoter ¶
Snapshoter marks a type that can provide a channel of Snapshot
type Subscription ¶ added in v0.4.0
type Subscription interface { Common }
type Subscriptioner ¶ added in v0.4.0
type Subscriptioner interface {
Subscriptions(context.Context) chan Subscription
}
Subscriptioner marks a type that can provide a channel of Subscription