asset

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AssetsV2URI = "/api/v2/assets"

AssetsV2URI is the base endpoint for the assets API

View Source
const EmailAssetsV2URI = "/api/v2/assets/email"

EmailAssetsV2URI is the base endpoint for the email assets API

Variables

This section is empty.

Functions

func CreateEmailAsset

func CreateEmailAsset(ctx context.Context, h *api.HTTPAPI, email string, tags map[string]string) (asset.EmailAsset, error)

CreateEmailAsset creates a new email asset

func DeleteAsset

func DeleteAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (models.SuccessIDResponse, error)

DeleteAsset deletes an asset by ID

func DeleteEmailAsset

func DeleteEmailAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (models.SuccessIDResponse, error)

DeleteEmailAsset deletes an email asset by ID

func DisableAsset

func DisableAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (models.SuccessIDResponse, error)

DisableAsset disables an asset by ID

func EnableAsset

func EnableAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (models.SuccessIDResponse, error)

EnableAsset enables an asset by ID

func GetAsset

func GetAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (asset.Asset, error)

GetAsset retrieves a specific asset by ID

func GetAssetAnalytics

func GetAssetAnalytics(ctx context.Context, h *api.HTTPAPI, assetID string, days int) (asset.AssetAnalytics, error)

GetAssetAnalytics retrieves analytics data for an asset

func GetAssetAttacks

func GetAssetAttacks(ctx context.Context, h *api.HTTPAPI, assetID string, opts GetAssetAttacksOpts) (models.ListWithCount[any], error)

GetAssetAttacks retrieves attack executions for a specific asset

func GetAssetExecutions

func GetAssetExecutions(ctx context.Context, h *api.HTTPAPI, assetID string, opts GetAssetExecutionsOpts) (models.ListWithCount[any], error)

GetAssetExecutions retrieves execution reports for a specific asset

func GetAssetPacks

func GetAssetPacks(ctx context.Context, h *api.HTTPAPI, assetID string, opts GetAssetExecutionsOpts) ([]models.PackRun, error)

GetAssetPacks retrieves assessment reports for a specific asset

func GetAssets

func GetAssets(ctx context.Context, h *api.HTTPAPI) ([]asset.Asset, error)

GetAssets retrieves all assets from the API

func GetEmailAsset

func GetEmailAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (asset.EmailAsset, error)

GetEmailAsset retrieves a specific email asset by ID

func GetEmailAssetAnalytics

func GetEmailAssetAnalytics(ctx context.Context, h *api.HTTPAPI, assetID string, days int) (asset.EmailAssetAnalytics, error)

GetEmailAssetAnalytics retrieves analytics data for an email asset

func GetEmailAssets

func GetEmailAssets(ctx context.Context, h *api.HTTPAPI) ([]asset.EmailAsset, error)

GetEmailAssets retrieves all email assets from the API

func GetFilteredAssets added in v1.1.0

func GetFilteredAssets(ctx context.Context, h *api.HTTPAPI, opts GetAssetsOpts) ([]asset.Asset, error)

func GetGmailConfirmationCode

func GetGmailConfirmationCode(ctx context.Context, h *api.HTTPAPI, assetID string) (asset.GmailConfCode, error)

GetGmailConfirmationCode retrieves the Gmail confirmation code for an email asset

func SetAssetTags

func SetAssetTags(ctx context.Context, h *api.HTTPAPI, assetID string, tags map[string]any) (asset.AssetSetTagsResponse, error)

SetAssetTags updates the tags for an asset

func UpdateEmailAsset

func UpdateEmailAsset(ctx context.Context, h *api.HTTPAPI, assetID string, email string, tags map[string]string) (models.SuccessIDResponse, error)

UpdateEmailAsset updates an existing email asset

func VerifyEmailAsset

func VerifyEmailAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (models.SuccessIDResponse, error)

VerifyEmailAsset sends a verification email for an email asset

Types

type GetAssetAttacksOpts

type GetAssetAttacksOpts struct {
	Size   int
	Offset int
	Order  string
	Name   string
}

GetAssetAttacksOpts represents options for listing asset attacks

type GetAssetExecutionsOpts

type GetAssetExecutionsOpts struct {
	Size   int
	Offset int
	Order  string
	Name   string
}

GetAssetExecutionsOpts represents options for listing asset executions

type GetAssetsOpts added in v1.1.0

type GetAssetsOpts struct {
	Connected bool // connected assets
	Available bool // available assets
}

GetAssetsOptions represents options for filtering assets

Jump to

Keyboard shortcuts

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