Documentation ¶
Overview ¶
Package v1 is a container for endpoints that are used to power the v1 of the service.
Index ¶
- type AccountOwner
- type AccountOwnerInsertHandler
- type CloudAssetChanges
- type CloudAssetDetails
- type CloudAssetFetchAllByTimeStampPageParameters
- type CloudAssetFetchAllByTimestampParameters
- type CloudAssetFetchByHostnameParameters
- type CloudAssetFetchByIPParameters
- type CloudAssetFetchByResourceIDParameters
- type CloudAssets
- type CloudFetchAllAssetsByTimeHandler
- type CloudFetchAllAssetsByTimePageHandler
- type CloudFetchByHostnameHandler
- type CloudFetchByIPHandler
- type CloudFetchByResourceIDHandler
- type CloudInsertHandler
- type ForceSchemaHandler
- type GetSchemaVersionHandler
- type InvalidInput
- type NetworkChanges
- type NotFound
- type PagedCloudAssets
- type Person
- type SchemaState
- type SchemaVersion
- type SchemaVersionStepDownHandler
- type SchemaVersionStepUpHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountOwner ¶ added in v0.24.1
type AccountOwner struct { AccountID string `json:"accountId"` Owner Person `json:"owner"` Champions []Person `json:"champions"` }
AccountOwner represents an incoming AWS account with its owner and account champions to be inserted or updated
type AccountOwnerInsertHandler ¶ added in v0.24.1
type AccountOwnerInsertHandler struct { LogFn domain.LogFn StatFn domain.StatFn AccountOwnerStorer domain.AccountOwnerStorer }
AccountOwnerInsertHandler defines a lambda handler for updating or inserting account owner and account ID
func (*AccountOwnerInsertHandler) Handle ¶ added in v0.24.1
func (h *AccountOwnerInsertHandler) Handle(ctx context.Context, input AccountOwner) error
Handle handles the insert or update operation for account owner
type CloudAssetChanges ¶
type CloudAssetChanges struct { Changes []NetworkChanges `json:"changes"` ChangeTime string `json:"changeTime"` ResourceType string `json:"resourceType"` AccountID string `json:"accountId"` Region string `json:"region"` ARN string `json:"arn"` Tags map[string]string `json:"tags"` }
CloudAssetChanges represents the incoming payload
type CloudAssetDetails ¶
type CloudAssetDetails struct { PrivateIPAddresses []string `json:"privateIpAddresses"` PublicIPAddresses []string `json:"publicIpAddresses"` Hostnames []string `json:"hostnames"` ResourceType string `json:"resourceType"` AccountID string `json:"accountId"` Region string `json:"region"` ARN string `json:"arn"` Tags map[string]string `json:"tags"` AccountOwner domain.AccountOwner `json:"accountOwner"` }
CloudAssetDetails represent an asset and associated attributes
type CloudAssetFetchAllByTimeStampPageParameters ¶ added in v0.9.0
type CloudAssetFetchAllByTimeStampPageParameters struct {
PageToken string `json:"pageToken"`
}
CloudAssetFetchAllByTimeStampPageParameters represents the request for subsequent pages of bulk fetching cloud assets
type CloudAssetFetchAllByTimestampParameters ¶ added in v0.9.0
type CloudAssetFetchAllByTimestampParameters struct { Timestamp string `json:"time"` Count uint `json:"count"` Offset uint `json:"offset"` Type string `json:"type"` }
CloudAssetFetchAllByTimestampParameters represents the incoming payload for bulk fetching cloud assets for point in time with optional pagination
type CloudAssetFetchByHostnameParameters ¶
type CloudAssetFetchByHostnameParameters struct { Hostname string `json:"hostname"` Timestamp string `json:"time"` }
CloudAssetFetchByHostnameParameters represents the incoming payload for fetching cloud assets by hostname
type CloudAssetFetchByIPParameters ¶
type CloudAssetFetchByIPParameters struct { IPAddress string `json:"ipAddress"` Timestamp string `json:"time"` }
CloudAssetFetchByIPParameters represents the incoming payload for fetching cloud assets by IP address
type CloudAssetFetchByResourceIDParameters ¶ added in v0.37.0
type CloudAssetFetchByResourceIDParameters struct { ResourceID string `json:"resourceid"` Timestamp string `json:"time"` }
CloudAssetFetchByResourceIDParameters represents the incoming payload for fetching cloud assets by resource ID
type CloudAssets ¶
type CloudAssets struct {
Assets []CloudAssetDetails `json:"assets"`
}
CloudAssets represents a list of assets
type CloudFetchAllAssetsByTimeHandler ¶ added in v0.9.0
type CloudFetchAllAssetsByTimeHandler struct { LogFn domain.LogFn StatFn domain.StatFn Fetcher domain.CloudAllAssetsByTimeFetcher }
CloudFetchAllAssetsByTimeHandler defines a lambda handler for bulk fetching cloud assets known at specific point in time
func (*CloudFetchAllAssetsByTimeHandler) Handle ¶ added in v0.9.0
func (h *CloudFetchAllAssetsByTimeHandler) Handle(ctx context.Context, input CloudAssetFetchAllByTimestampParameters) (PagedCloudAssets, error)
Handle handles fetching cloud assets with pagination
type CloudFetchAllAssetsByTimePageHandler ¶ added in v0.9.0
type CloudFetchAllAssetsByTimePageHandler struct { LogFn domain.LogFn StatFn domain.StatFn Fetcher domain.CloudAllAssetsByTimeFetcher }
CloudFetchAllAssetsByTimePageHandler defines a lambda handler for bulk fetching subsequent pages of cloud assets known at specific point in time
func (*CloudFetchAllAssetsByTimePageHandler) Handle ¶ added in v0.9.0
func (h *CloudFetchAllAssetsByTimePageHandler) Handle(ctx context.Context, input CloudAssetFetchAllByTimeStampPageParameters) (PagedCloudAssets, error)
Handle handles subsequent page fetching of cloud assets
type CloudFetchByHostnameHandler ¶
type CloudFetchByHostnameHandler struct { LogFn domain.LogFn StatFn domain.StatFn Fetcher domain.CloudAssetByHostnameFetcher }
CloudFetchByHostnameHandler defines a lambda handler for fetching cloud assets with a given hostname
func (*CloudFetchByHostnameHandler) Handle ¶
func (h *CloudFetchByHostnameHandler) Handle(ctx context.Context, input CloudAssetFetchByHostnameParameters) (CloudAssets, error)
Handle handles fetching cloud assets by hostname
type CloudFetchByIPHandler ¶
type CloudFetchByIPHandler struct { LogFn domain.LogFn StatFn domain.StatFn Fetcher domain.CloudAssetByIPFetcher }
CloudFetchByIPHandler defines a lambda handler for fetching cloud assets with a given IP address
func (*CloudFetchByIPHandler) Handle ¶
func (h *CloudFetchByIPHandler) Handle(ctx context.Context, input CloudAssetFetchByIPParameters) (CloudAssets, error)
Handle handles fetching cloud assets by IP address
type CloudFetchByResourceIDHandler ¶ added in v0.37.0
type CloudFetchByResourceIDHandler struct { LogFn domain.LogFn StatFn domain.StatFn Fetcher domain.CloudAssetByResourceIDFetcher }
CloudFetchByResourceIDHandler defines a lambda handler for fetching cloud assets, account owner and champions with a given resource ID
func (*CloudFetchByResourceIDHandler) Handle ¶ added in v0.37.0
func (h *CloudFetchByResourceIDHandler) Handle(ctx context.Context, input CloudAssetFetchByResourceIDParameters) (CloudAssets, error)
Handle handles fetching cloud assets, account owner and champions by resource ID
type CloudInsertHandler ¶
type CloudInsertHandler struct { LogFn domain.LogFn StatFn domain.StatFn CloudAssetStorer domain.CloudAssetStorer }
CloudInsertHandler defines a lambda handler for inserting new cloud asset or changes to existing cloud assets
func (*CloudInsertHandler) Handle ¶
func (h *CloudInsertHandler) Handle(ctx context.Context, input CloudAssetChanges) error
Handle handles the insert operation for cloud assets
type ForceSchemaHandler ¶ added in v0.16.0
type ForceSchemaHandler struct { LogFn domain.LogFn SchemaVersionForcer domain.SchemaVersionForcer }
ForceSchemaHandler defines a lambda handler for forcing database schema version after failed migration
func (*ForceSchemaHandler) Handle ¶ added in v0.16.0
func (h *ForceSchemaHandler) Handle(ctx context.Context, input SchemaVersion) error
Handle handles the call to force database schema version after failed migration
type GetSchemaVersionHandler ¶ added in v0.13.0
type GetSchemaVersionHandler struct { LogFn domain.LogFn Getter domain.SchemaVersionGetter }
GetSchemaVersionHandler handles requests for getting the currently active database schema version
func (*GetSchemaVersionHandler) Handle ¶ added in v0.13.0
func (h *GetSchemaVersionHandler) Handle(ctx context.Context) (SchemaState, error)
Handle handles the request for schema version
type InvalidInput ¶
InvalidInput is an error indicating the request was malformed
func (InvalidInput) Error ¶
func (i InvalidInput) Error() string
type NetworkChanges ¶
type NetworkChanges struct { PrivateIPAddresses []string `json:"privateIpAddresses"` PublicIPAddresses []string `json:"publicIpAddresses"` Hostnames []string `json:"hostnames"` RelatedResources []string `json:"relatedResources"` ChangeType string `json:"changeType"` }
NetworkChanges detail the changes in ip addresses and host names for an asset
type NotFound ¶
type NotFound struct {
ID string
}
NotFound is an error indicating no assets with the given ID were found
type PagedCloudAssets ¶ added in v0.9.0
type PagedCloudAssets struct { CloudAssets NextPageToken string `json:"nextPageToken"` }
PagedCloudAssets represents a list of assets with next page token for bulk requests
type Person ¶ added in v0.24.1
type Person struct { Name string `json:"name"` Login string `json:"login"` Email string `json:"email"` Valid bool `json:"valid"` }
Person represents an incoming details about an AWS account owner and/or champion to be inserted or updated
type SchemaState ¶ added in v0.31.0
SchemaState represents current database schema version and state
type SchemaVersion ¶ added in v0.13.0
type SchemaVersion struct {
Version uint `json:"version"`
}
SchemaVersion represents a database schema version
type SchemaVersionStepDownHandler ¶ added in v0.13.0
type SchemaVersionStepDownHandler struct { LogFn domain.LogFn Migrator domain.SchemaMigratorDown }
SchemaVersionStepDownHandler handles requests for schema migration
func (*SchemaVersionStepDownHandler) Handle ¶ added in v0.13.0
func (h *SchemaVersionStepDownHandler) Handle(ctx context.Context) (SchemaVersion, error)
Handle handles the database schema change request
type SchemaVersionStepUpHandler ¶ added in v0.13.0
type SchemaVersionStepUpHandler struct { LogFn domain.LogFn Migrator domain.SchemaMigratorUp }
SchemaVersionStepUpHandler handles requests for schema migration
func (*SchemaVersionStepUpHandler) Handle ¶ added in v0.13.0
func (h *SchemaVersionStepUpHandler) Handle(ctx context.Context) (SchemaVersion, error)
Handle handles the database schema change requests