Documentation ¶
Overview ¶
Package api provides a framework for scraping the AWS API.
Index ¶
- func DecodeConfig(input interface{}, output interface{}) error
- func FirstError(errors ...error) error
- func SendRecords(ctx context.Context, ch chan<- *Record, name string, s Source) error
- type Config
- type Endpoint
- type Manifest
- type Record
- type Recorder
- type RecorderFunc
- type Request
- type RequestBuilder
- type Runner
- type Service
- type ServiceFunc
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeConfig ¶
func DecodeConfig(input interface{}, output interface{}) error
func FirstError ¶ added in v0.1.7
Types ¶
type Endpoint ¶
type Endpoint map[string]RequestBuilder
Endpoint is a collection of RequestBuilders.
type Manifest ¶
type Manifest struct { Include []string `json:"include"` // Include is a list of actions Exclude []string `json:"exclude"` // Exclude is a list of actions Overrides []*Config `json:"overrides"` // Overrides are key value pairs of configuration data. }
Manifest describes desired actions and any necessary configuration overrides.
type Record ¶
type Record struct { Timestamp *int64 `json:"timestamp,omitempty"` // Optional nanosecond timestamp. Action string `json:"action"` // Action performed. Naming should match IAM policy. ID *string `json:"id,omitempty"` // ID of resource contained in Data. Optional Data interface{} `json:"data"` }
Record is submitted as an observation.
type RecorderFunc ¶
Recorder reads from Record channel, does stuff.
type RequestBuilder ¶
RequestBuilder translates a requested action and config into requests. A given action can translate into multiple requests in a variety of cases: - the action is wildcarded (e.g. Describe*) - the action spawns multiple sub-requests (e.g. DescribeLogStream needs to be run for every LogGroup).
type Runner ¶
type Service ¶
type Service interface {
New(p client.ConfigProvider, opts ...*aws.Config) Endpoint
}
Service (e.g. RDS, IAM, S3) provides the means of creating an Endpoint The client and config options provided end up determining region.
type ServiceFunc ¶
type ServiceFunc func(p client.ConfigProvider, opts ...*aws.Config) Endpoint
ServiceFunc implements Service.
func (ServiceFunc) New ¶
func (s ServiceFunc) New(p client.ConfigProvider, opts ...*aws.Config) Endpoint