Documentation
¶
Index ¶
- func DebugQuery(msg string, query *cloudtrail.LookupEventsInput)
- type AwsClient
- type CloudTrailEvent
- type CloudTrailRepository
- func (r *CloudTrailRepository) GetRegion() ptypes.AwsRegion
- func (r *CloudTrailRepository) ListEventsByInput(query *cloudtrail.LookupEventsInput) ([]Event, error)
- func (r *CloudTrailRepository) ListEventsByInputAsync(query *cloudtrail.LookupEventsInput) (<-chan Event, <-chan *errors.Error)
- func (r *CloudTrailRepository) ListEventsByLookup(lookup *LookupMiddleware) ([]Event, error)
- func (r *CloudTrailRepository) ListEventsByLookupAsync(lookup *LookupMiddleware) (<-chan Event, <-chan *errors.Error)
- func (r *CloudTrailRepository) ListEventsByLookupCached(cache *cache.DataCache, lookup *LookupMiddleware) (items []Event, err error)
- type Event
- func (e Event) GetName() string
- func (e Event) GetReadOnly() string
- func (e Event) GetResources() []types.Resource
- func (e Event) GetResourcesByType(resourceType cfg.ResourceType) []string
- func (e Event) GetSource() string
- func (e Event) GetSourceIPAddress() string
- func (e Event) GetTagValue(tag string) string
- func (e Event) GetTags() map[string]string
- func (e Event) GetTime() time.Time
- func (e Event) GetUsername() string
- func (e Event) IsReadOnly() bool
- type LookupHandler
- func LookupEndTimeHandler(t time.Time) LookupHandler
- func LookupEventByAttribute(key types.LookupAttributeKey, value string) LookupHandler
- func LookupLimitHandler(limit int32) LookupHandler
- func LookupResourceHandler(e service.EntityInterface) LookupHandler
- func LookupStartTimeHandler(t time.Time) LookupHandler
- type LookupMiddleware
- func (l *LookupMiddleware) Errors() ([]error, bool)
- func (l *LookupMiddleware) Get() *cloudtrail.LookupEventsInput
- func (l *LookupMiddleware) Hash() string
- func (l *LookupMiddleware) WithEndTime(end time.Time) *LookupMiddleware
- func (l *LookupMiddleware) WithEventName(value string) *LookupMiddleware
- func (l *LookupMiddleware) WithHandler(f LookupHandler) *LookupMiddleware
- func (l *LookupMiddleware) WithLimit(limit int32) *LookupMiddleware
- func (l *LookupMiddleware) WithReadOnly(value string) *LookupMiddleware
- func (l *LookupMiddleware) WithResource(value service.EntityInterface) *LookupMiddleware
- func (l *LookupMiddleware) WithResourceId(value string) *LookupMiddleware
- func (l *LookupMiddleware) WithResourceType(value cfg.ResourceType) *LookupMiddleware
- func (l *LookupMiddleware) WithStartTime(start time.Time) *LookupMiddleware
- func (l *LookupMiddleware) WithUsername(value string) *LookupMiddleware
- type UserIdentity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugQuery ¶
func DebugQuery(msg string, query *cloudtrail.LookupEventsInput)
Types ¶
type AwsClient ¶
type AwsClient interface {
GetRegion() ptypes.AwsRegion
GetAccountID() ptypes.AwsAccountID
CloudTrail() *cloudtrail.Client
}
type CloudTrailEvent ¶ added in v0.1.2
type CloudTrailEvent struct {
EventID string `json:"eventID"`
UserIdentity UserIdentity `json:"userIdentity"`
SourceIPAddress string `json:"sourceIPAddress"`
}
CloudTrailEvent represents the structure of a CloudTrail event
type CloudTrailRepository ¶
type CloudTrailRepository struct {
// contains filtered or unexported fields
}
func NewCloudTrailRepository ¶
func NewCloudTrailRepository(ctx context.Context, client AwsClient) *CloudTrailRepository
func (*CloudTrailRepository) GetRegion ¶
func (r *CloudTrailRepository) GetRegion() ptypes.AwsRegion
func (*CloudTrailRepository) ListEventsByInput ¶
func (r *CloudTrailRepository) ListEventsByInput(query *cloudtrail.LookupEventsInput) ([]Event, error)
func (*CloudTrailRepository) ListEventsByInputAsync ¶ added in v0.1.4
func (r *CloudTrailRepository) ListEventsByInputAsync(query *cloudtrail.LookupEventsInput) (<-chan Event, <-chan *errors.Error)
func (*CloudTrailRepository) ListEventsByLookup ¶
func (r *CloudTrailRepository) ListEventsByLookup(lookup *LookupMiddleware) ([]Event, error)
func (*CloudTrailRepository) ListEventsByLookupAsync ¶ added in v0.1.4
func (r *CloudTrailRepository) ListEventsByLookupAsync(lookup *LookupMiddleware) (<-chan Event, <-chan *errors.Error)
func (*CloudTrailRepository) ListEventsByLookupCached ¶
func (r *CloudTrailRepository) ListEventsByLookupCached(cache *cache.DataCache, lookup *LookupMiddleware) (items []Event, err error)
ListEventsByLookupCached a wrapper of EventsByResource method with reading and writing results into a cache
type Event ¶
type Event struct {
service.AbstractResource
types.Event
EventData CloudTrailEvent
}
func (Event) GetReadOnly ¶
func (Event) GetResources ¶
func (Event) GetResourcesByType ¶
func (e Event) GetResourcesByType(resourceType cfg.ResourceType) []string
func (Event) GetSourceIPAddress ¶ added in v0.1.2
func (Event) GetTagValue ¶
func (Event) GetUsername ¶
func (Event) IsReadOnly ¶
type LookupHandler ¶
type LookupHandler func(*cloudtrail.LookupEventsInput) (*cloudtrail.LookupEventsInput, error)
func LookupEndTimeHandler ¶
func LookupEndTimeHandler(t time.Time) LookupHandler
func LookupEventByAttribute ¶
func LookupEventByAttribute(key types.LookupAttributeKey, value string) LookupHandler
func LookupLimitHandler ¶
func LookupLimitHandler(limit int32) LookupHandler
func LookupResourceHandler ¶
func LookupResourceHandler(e service.EntityInterface) LookupHandler
func LookupStartTimeHandler ¶
func LookupStartTimeHandler(t time.Time) LookupHandler
type LookupMiddleware ¶
type LookupMiddleware struct {
// contains filtered or unexported fields
}
func NewLookupMiddleware ¶
func NewLookupMiddleware() *LookupMiddleware
func (*LookupMiddleware) Errors ¶
func (l *LookupMiddleware) Errors() ([]error, bool)
func (*LookupMiddleware) Get ¶
func (l *LookupMiddleware) Get() *cloudtrail.LookupEventsInput
func (*LookupMiddleware) Hash ¶
func (l *LookupMiddleware) Hash() string
func (*LookupMiddleware) WithEndTime ¶
func (l *LookupMiddleware) WithEndTime(end time.Time) *LookupMiddleware
func (*LookupMiddleware) WithEventName ¶
func (l *LookupMiddleware) WithEventName(value string) *LookupMiddleware
func (*LookupMiddleware) WithHandler ¶
func (l *LookupMiddleware) WithHandler(f LookupHandler) *LookupMiddleware
func (*LookupMiddleware) WithLimit ¶
func (l *LookupMiddleware) WithLimit(limit int32) *LookupMiddleware
func (*LookupMiddleware) WithReadOnly ¶
func (l *LookupMiddleware) WithReadOnly(value string) *LookupMiddleware
func (*LookupMiddleware) WithResource ¶
func (l *LookupMiddleware) WithResource(value service.EntityInterface) *LookupMiddleware
func (*LookupMiddleware) WithResourceId ¶
func (l *LookupMiddleware) WithResourceId(value string) *LookupMiddleware
func (*LookupMiddleware) WithResourceType ¶
func (l *LookupMiddleware) WithResourceType(value cfg.ResourceType) *LookupMiddleware
func (*LookupMiddleware) WithStartTime ¶
func (l *LookupMiddleware) WithStartTime(start time.Time) *LookupMiddleware
func (*LookupMiddleware) WithUsername ¶
func (l *LookupMiddleware) WithUsername(value string) *LookupMiddleware
type UserIdentity ¶ added in v0.1.2
type UserIdentity struct {
Type string `json:"type"`
}
UserIdentity represents the user identity information in a CloudTrail event
Click to show internal directories.
Click to hide internal directories.