Documentation
¶
Index ¶
- Constants
- func CreateEmailAsset(ctx context.Context, h *api.HTTPAPI, email string, tags map[string]string) (asset.EmailAsset, error)
- func DeleteAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (models.SuccessIDResponse, error)
- func DeleteEmailAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (models.SuccessIDResponse, error)
- func DisableAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (models.SuccessIDResponse, error)
- func EnableAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (models.SuccessIDResponse, error)
- func GetAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (asset.Asset, error)
- func GetAssetAnalytics(ctx context.Context, h *api.HTTPAPI, assetID string, days int) (asset.AssetAnalytics, error)
- func GetAssetAttacks(ctx context.Context, h *api.HTTPAPI, assetID string, opts GetAssetAttacksOpts) (models.ListWithCount[any], error)
- func GetAssetExecutions(ctx context.Context, h *api.HTTPAPI, assetID string, ...) (models.ListWithCount[any], error)
- func GetAssetPacks(ctx context.Context, h *api.HTTPAPI, assetID string, ...) ([]models.PackRun, error)
- func GetAssets(ctx context.Context, h *api.HTTPAPI) ([]asset.Asset, error)
- func GetEmailAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (asset.EmailAsset, error)
- func GetEmailAssetAnalytics(ctx context.Context, h *api.HTTPAPI, assetID string, days int) (asset.EmailAssetAnalytics, error)
- func GetEmailAssets(ctx context.Context, h *api.HTTPAPI) ([]asset.EmailAsset, error)
- func GetFilteredAssets(ctx context.Context, h *api.HTTPAPI, opts GetAssetsOpts) ([]asset.Asset, error)
- func GetGmailConfirmationCode(ctx context.Context, h *api.HTTPAPI, assetID string) (asset.GmailConfCode, error)
- func SetAssetTags(ctx context.Context, h *api.HTTPAPI, assetID string, tags map[string]any) (asset.AssetSetTagsResponse, error)
- func UpdateEmailAsset(ctx context.Context, h *api.HTTPAPI, assetID string, email string, ...) (models.SuccessIDResponse, error)
- func VerifyEmailAsset(ctx context.Context, h *api.HTTPAPI, assetID string) (models.SuccessIDResponse, error)
- type GetAssetAttacksOpts
- type GetAssetExecutionsOpts
- type GetAssetsOpts
Constants ¶
const AssetsV2URI = "/api/v2/assets"
AssetsV2URI is the base endpoint for the assets API
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 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 GetEmailAsset ¶
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 ¶
GetEmailAssets retrieves all email assets from the API
func GetFilteredAssets ¶ added in v1.1.0
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 ¶
GetAssetAttacksOpts represents options for listing asset attacks
type GetAssetExecutionsOpts ¶
GetAssetExecutionsOpts represents options for listing asset executions
type GetAssetsOpts ¶ added in v1.1.0
GetAssetsOptions represents options for filtering assets