cloudtrail

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

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

Jump to

Keyboard shortcuts

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