pkg

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEvents

func GetEvents(cloudtailClient *cloudtrail.Client, startTime time.Time, writeOnly bool) ([]types.Event, error)

getWriteEvents retrieves cloudtrail events since the specified time using the provided cloudtrail client and starttime from since flag.

func Whoami

func Whoami(stsClient sts.Client) (accountArn string, accountId string, err error)

whoami retrieves caller identity information

Types

type QueryOptions

type QueryOptions struct {
	StartTime time.Time
}

type RawEventDetails

type RawEventDetails struct {
	EventVersion string `json:"eventVersion"`
	UserIdentity struct {
		AccountId      string `json:"accountId"`
		SessionContext struct {
			SessionIssuer struct {
				Type     string `json:"type"`
				UserName string `json:"userName"`
				Arn      string `json:"arn"`
			} `json:"sessionIssuer"`
		} `json:"sessionContext"`
	} `json:"userIdentity"`
	EventRegion string `json:"awsRegion"`
	EventId     string `json:"eventID"`
	ErrorCode   string `json:"errorCode"`
}

RawEventDetails struct represents the structure of an AWS raw event

func ExtractUserDetails

func ExtractUserDetails(cloudTrailEvent *string) (*RawEventDetails, error)

Extracts Raw cloudtrailEvent Details

Jump to

Keyboard shortcuts

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