cloudtrail

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2026 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Code generated by generate-cached. DO NOT EDIT.

Index

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
}

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 *v3.Client) *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

func (*CloudTrailRepository) WithCache added in v0.4.0

WithCache returns a CloudTrailRepositoryCached that stores/retrieves results via the given DataCache. The cache namespace is set to "<accountID>:<region>".

type CloudTrailRepositoryCached added in v0.4.0

type CloudTrailRepositoryCached struct {
	// contains filtered or unexported fields
}

CloudTrailRepositoryCached wraps CloudTrailRepository and caches results of Get*/List* calls.

func (*CloudTrailRepositoryCached) ListEventsByInput added in v0.4.0

func (c *CloudTrailRepositoryCached) ListEventsByInput(query *awscloudtrail.LookupEventsInput) ([]Event, error)

ListEventsByInput returns cached results when available, otherwise delegates to the underlying repository.

func (*CloudTrailRepositoryCached) ListEventsByInputAsync added in v0.4.0

func (c *CloudTrailRepositoryCached) ListEventsByInputAsync(query *awscloudtrail.LookupEventsInput) (<-chan Event, <-chan *errors.Error)

ListEventsByInputAsync delegates directly to the underlying repository (channel return – not cached).

func (*CloudTrailRepositoryCached) ListEventsByLookup added in v0.4.0

func (c *CloudTrailRepositoryCached) ListEventsByLookup(lookup *LookupMiddleware) ([]Event, error)

ListEventsByLookup returns cached results when available, otherwise delegates to the underlying repository.

func (*CloudTrailRepositoryCached) ListEventsByLookupAsync added in v0.4.0

func (c *CloudTrailRepositoryCached) ListEventsByLookupAsync(lookup *LookupMiddleware) (<-chan Event, <-chan *errors.Error)

ListEventsByLookupAsync delegates directly to the underlying repository (channel return – not cached).

func (*CloudTrailRepositoryCached) ListEventsByLookupCached added in v0.4.0

func (c *CloudTrailRepositoryCached) ListEventsByLookupCached(cache *cache.DataCache, lookup *LookupMiddleware) ([]Event, error)

ListEventsByLookupCached returns cached results when available, otherwise delegates to the underlying repository.

type Event

type Event struct {
	service.AbstractResource
	types.Event
	EventData CloudTrailEvent
}

func NewEvent

func NewEvent(client AwsClient, event types.Event, eventData CloudTrailEvent) Event

func (Event) GetName

func (e Event) GetName() string

func (Event) GetReadOnly

func (e Event) GetReadOnly() string

func (Event) GetResources

func (e Event) GetResources() []types.Resource

func (Event) GetResourcesByType

func (e Event) GetResourcesByType(resourceType cfg.ResourceType) []string

func (Event) GetSource

func (e Event) GetSource() string

func (Event) GetSourceIPAddress added in v0.1.2

func (e Event) GetSourceIPAddress() string

func (Event) GetTagValue

func (e Event) GetTagValue(tag string) string

func (Event) GetTags

func (e Event) GetTags() map[string]string

func (Event) GetTime

func (e Event) GetTime() time.Time

func (Event) GetUsername

func (e Event) GetUsername() string

func (Event) IsReadOnly

func (e Event) IsReadOnly() bool

type LookupHandler

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.ResourceInterface) 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 (*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 (*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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL