Documentation
¶
Index ¶
- Constants
- type APIError
- type Client
- func (c *Client) CopyPackage(owner, repo, identifier, destinationRepo string) (*Package, error)
- func (c *Client) CreateVulnerabilityPolicy(org string, req VulnerabilityPolicyRequest) (*VulnerabilityPolicy, error)
- func (c *Client) CreateWebhook(owner, repository, targetURL, signatureKey string, events []string) (*Webhook, error)
- func (c *Client) DeletePackage(owner, repository, identifier string) error
- func (c *Client) DeleteVulnerabilityPolicy(org, slugPerm string) error
- func (c *Client) DeleteWebhook(owner, repository, slugPerm string) error
- func (c *Client) GetOrganization(org string) (*Organization, error)
- func (c *Client) GetPackage(owner, repo, identifier string) (*Package, error)
- func (c *Client) GetPackageVulnerabilities(owner, repo, identifier string) ([]VulnerabilityScanResult, error)
- func (c *Client) GetRepository(owner, identifier string) (*Repository, error)
- func (c *Client) GetSelf() (*User, error)
- func (c *Client) GetVulnerabilityPolicy(org, slugPerm string) (*VulnerabilityPolicy, error)
- func (c *Client) GetWebhook(owner, repository, slugPerm string) (*Webhook, error)
- func (c *Client) ListOrganizations() ([]Organization, error)
- func (c *Client) ListPackages(owner, repo string) ([]Package, error)
- func (c *Client) ListPackagesWithFilters(owner, repo, query string) ([]Package, error)
- func (c *Client) ListRepositories() ([]Repository, error)
- func (c *Client) ListVulnerabilityPolicies(org string) ([]VulnerabilityPolicy, error)
- func (c *Client) MovePackage(owner, repo, identifier, destinationRepo string) (*Package, error)
- func (c *Client) QuarantinePackage(owner, repo, identifier string, release bool) (*Package, error)
- func (c *Client) ResyncPackage(owner, repository, identifier string) (*Package, error)
- func (c *Client) ScanPackage(owner, repo, identifier string) error
- func (c *Client) TagPackage(owner, repository, identifier string, request PackageTagRequest) (*Package, error)
- func (c *Client) UpdateWebhook(owner, repository, slugPerm, targetURL, signatureKey string, events []string) (*Webhook, error)
- type Cloudsmith
- func (c *Cloudsmith) Actions() []core.Action
- func (c *Cloudsmith) Cleanup(ctx core.IntegrationCleanupContext) error
- func (c *Cloudsmith) Configuration() []configuration.Field
- func (c *Cloudsmith) Description() string
- func (c *Cloudsmith) HandleHook(ctx core.IntegrationHookContext) error
- func (c *Cloudsmith) HandleRequest(ctx core.HTTPRequestContext)
- func (c *Cloudsmith) Hooks() []core.Hook
- func (c *Cloudsmith) Icon() string
- func (c *Cloudsmith) Instructions() string
- func (c *Cloudsmith) Label() string
- func (c *Cloudsmith) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (c *Cloudsmith) Name() string
- func (c *Cloudsmith) Sync(ctx core.SyncContext) error
- func (c *Cloudsmith) Triggers() []core.Trigger
- type Configuration
- type CreateVulnerabilityPolicy
- func (c *CreateVulnerabilityPolicy) Cancel(ctx core.ExecutionContext) error
- func (c *CreateVulnerabilityPolicy) Cleanup(ctx core.SetupContext) error
- func (c *CreateVulnerabilityPolicy) Color() string
- func (c *CreateVulnerabilityPolicy) Configuration() []configuration.Field
- func (c *CreateVulnerabilityPolicy) Description() string
- func (c *CreateVulnerabilityPolicy) Documentation() string
- func (c *CreateVulnerabilityPolicy) ExampleOutput() map[string]any
- func (c *CreateVulnerabilityPolicy) Execute(ctx core.ExecutionContext) error
- func (c *CreateVulnerabilityPolicy) HandleHook(ctx core.ActionHookContext) error
- func (c *CreateVulnerabilityPolicy) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *CreateVulnerabilityPolicy) Hooks() []core.Hook
- func (c *CreateVulnerabilityPolicy) Icon() string
- func (c *CreateVulnerabilityPolicy) Label() string
- func (c *CreateVulnerabilityPolicy) Name() string
- func (c *CreateVulnerabilityPolicy) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateVulnerabilityPolicy) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *CreateVulnerabilityPolicy) Setup(ctx core.SetupContext) error
- type CreateVulnerabilityPolicySpec
- type DeletePackage
- func (d *DeletePackage) Cancel(ctx core.ExecutionContext) error
- func (d *DeletePackage) Cleanup(ctx core.SetupContext) error
- func (d *DeletePackage) Color() string
- func (d *DeletePackage) Configuration() []configuration.Field
- func (d *DeletePackage) Description() string
- func (d *DeletePackage) Documentation() string
- func (d *DeletePackage) ExampleOutput() map[string]any
- func (d *DeletePackage) Execute(ctx core.ExecutionContext) error
- func (d *DeletePackage) HandleHook(ctx core.ActionHookContext) error
- func (d *DeletePackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (d *DeletePackage) Hooks() []core.Hook
- func (d *DeletePackage) Icon() string
- func (d *DeletePackage) Label() string
- func (d *DeletePackage) Name() string
- func (d *DeletePackage) OutputChannels(configuration any) []core.OutputChannel
- func (d *DeletePackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (d *DeletePackage) Setup(ctx core.SetupContext) error
- type DeleteVulnerabilityPolicy
- func (d *DeleteVulnerabilityPolicy) Cancel(ctx core.ExecutionContext) error
- func (d *DeleteVulnerabilityPolicy) Cleanup(ctx core.SetupContext) error
- func (d *DeleteVulnerabilityPolicy) Color() string
- func (d *DeleteVulnerabilityPolicy) Configuration() []configuration.Field
- func (d *DeleteVulnerabilityPolicy) Description() string
- func (d *DeleteVulnerabilityPolicy) Documentation() string
- func (d *DeleteVulnerabilityPolicy) ExampleOutput() map[string]any
- func (d *DeleteVulnerabilityPolicy) Execute(ctx core.ExecutionContext) error
- func (d *DeleteVulnerabilityPolicy) HandleHook(ctx core.ActionHookContext) error
- func (d *DeleteVulnerabilityPolicy) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (d *DeleteVulnerabilityPolicy) Hooks() []core.Hook
- func (d *DeleteVulnerabilityPolicy) Icon() string
- func (d *DeleteVulnerabilityPolicy) Label() string
- func (d *DeleteVulnerabilityPolicy) Name() string
- func (d *DeleteVulnerabilityPolicy) OutputChannels(configuration any) []core.OutputChannel
- func (d *DeleteVulnerabilityPolicy) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (d *DeleteVulnerabilityPolicy) Setup(ctx core.SetupContext) error
- type DeleteVulnerabilityPolicyResult
- type DeleteVulnerabilityPolicySpec
- type GetPackage
- func (g *GetPackage) Cancel(ctx core.ExecutionContext) error
- func (g *GetPackage) Cleanup(ctx core.SetupContext) error
- func (g *GetPackage) Color() string
- func (g *GetPackage) Configuration() []configuration.Field
- func (g *GetPackage) Description() string
- func (g *GetPackage) Documentation() string
- func (g *GetPackage) ExampleOutput() map[string]any
- func (g *GetPackage) Execute(ctx core.ExecutionContext) error
- func (g *GetPackage) HandleHook(ctx core.ActionHookContext) error
- func (g *GetPackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (g *GetPackage) Hooks() []core.Hook
- func (g *GetPackage) Icon() string
- func (g *GetPackage) Label() string
- func (g *GetPackage) Name() string
- func (g *GetPackage) OutputChannels(configuration any) []core.OutputChannel
- func (g *GetPackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (g *GetPackage) Setup(ctx core.SetupContext) error
- type GetPackageSpec
- type GetPackageVulnerabilities
- func (g *GetPackageVulnerabilities) Cancel(ctx core.ExecutionContext) error
- func (g *GetPackageVulnerabilities) Cleanup(ctx core.SetupContext) error
- func (g *GetPackageVulnerabilities) Color() string
- func (g *GetPackageVulnerabilities) Configuration() []configuration.Field
- func (g *GetPackageVulnerabilities) Description() string
- func (g *GetPackageVulnerabilities) Documentation() string
- func (g *GetPackageVulnerabilities) ExampleOutput() map[string]any
- func (g *GetPackageVulnerabilities) Execute(ctx core.ExecutionContext) error
- func (g *GetPackageVulnerabilities) HandleHook(ctx core.ActionHookContext) error
- func (g *GetPackageVulnerabilities) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (g *GetPackageVulnerabilities) Hooks() []core.Hook
- func (g *GetPackageVulnerabilities) Icon() string
- func (g *GetPackageVulnerabilities) Label() string
- func (g *GetPackageVulnerabilities) Name() string
- func (g *GetPackageVulnerabilities) OutputChannels(configuration any) []core.OutputChannel
- func (g *GetPackageVulnerabilities) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (g *GetPackageVulnerabilities) Setup(ctx core.SetupContext) error
- type GetPackageVulnerabilitiesSpec
- type GetRepository
- func (g *GetRepository) Cancel(ctx core.ExecutionContext) error
- func (g *GetRepository) Cleanup(ctx core.SetupContext) error
- func (g *GetRepository) Color() string
- func (g *GetRepository) Configuration() []configuration.Field
- func (g *GetRepository) Description() string
- func (g *GetRepository) Documentation() string
- func (g *GetRepository) ExampleOutput() map[string]any
- func (g *GetRepository) Execute(ctx core.ExecutionContext) error
- func (g *GetRepository) HandleHook(ctx core.ActionHookContext) error
- func (g *GetRepository) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (g *GetRepository) Hooks() []core.Hook
- func (g *GetRepository) Icon() string
- func (g *GetRepository) Label() string
- func (g *GetRepository) Name() string
- func (g *GetRepository) OutputChannels(configuration any) []core.OutputChannel
- func (g *GetRepository) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (g *GetRepository) Setup(ctx core.SetupContext) error
- type GetRepositorySpec
- type GetVulnerabilityPolicy
- func (g *GetVulnerabilityPolicy) Cancel(ctx core.ExecutionContext) error
- func (g *GetVulnerabilityPolicy) Cleanup(ctx core.SetupContext) error
- func (g *GetVulnerabilityPolicy) Color() string
- func (g *GetVulnerabilityPolicy) Configuration() []configuration.Field
- func (g *GetVulnerabilityPolicy) Description() string
- func (g *GetVulnerabilityPolicy) Documentation() string
- func (g *GetVulnerabilityPolicy) ExampleOutput() map[string]any
- func (g *GetVulnerabilityPolicy) Execute(ctx core.ExecutionContext) error
- func (g *GetVulnerabilityPolicy) HandleHook(ctx core.ActionHookContext) error
- func (g *GetVulnerabilityPolicy) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (g *GetVulnerabilityPolicy) Hooks() []core.Hook
- func (g *GetVulnerabilityPolicy) Icon() string
- func (g *GetVulnerabilityPolicy) Label() string
- func (g *GetVulnerabilityPolicy) Name() string
- func (g *GetVulnerabilityPolicy) OutputChannels(configuration any) []core.OutputChannel
- func (g *GetVulnerabilityPolicy) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (g *GetVulnerabilityPolicy) Setup(ctx core.SetupContext) error
- type GetVulnerabilityPolicySpec
- type ListPackages
- func (l *ListPackages) Cancel(ctx core.ExecutionContext) error
- func (l *ListPackages) Cleanup(ctx core.SetupContext) error
- func (l *ListPackages) Color() string
- func (l *ListPackages) Configuration() []configuration.Field
- func (l *ListPackages) Description() string
- func (l *ListPackages) Documentation() string
- func (l *ListPackages) ExampleOutput() map[string]any
- func (l *ListPackages) Execute(ctx core.ExecutionContext) error
- func (l *ListPackages) HandleHook(ctx core.ActionHookContext) error
- func (l *ListPackages) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (l *ListPackages) Hooks() []core.Hook
- func (l *ListPackages) Icon() string
- func (l *ListPackages) Label() string
- func (l *ListPackages) Name() string
- func (l *ListPackages) OutputChannels(configuration any) []core.OutputChannel
- func (l *ListPackages) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (l *ListPackages) Setup(ctx core.SetupContext) error
- type ListPackagesResult
- type ListPackagesSpec
- type Metadata
- type OnPackageCreated
- func (t *OnPackageCreated) Cleanup(ctx core.TriggerContext) error
- func (t *OnPackageCreated) Color() string
- func (t *OnPackageCreated) Configuration() []configuration.Field
- func (t *OnPackageCreated) Description() string
- func (t *OnPackageCreated) Documentation() string
- func (t *OnPackageCreated) ExampleData() map[string]any
- func (t *OnPackageCreated) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)
- func (t *OnPackageCreated) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnPackageCreated) Hooks() []core.Hook
- func (t *OnPackageCreated) Icon() string
- func (t *OnPackageCreated) Label() string
- func (t *OnPackageCreated) Name() string
- func (t *OnPackageCreated) Setup(ctx core.TriggerContext) error
- type OnPackageCreatedConfiguration
- type OnPackageCreatedMetadata
- type OnSecurityScanCompleted
- func (t *OnSecurityScanCompleted) Cleanup(ctx core.TriggerContext) error
- func (t *OnSecurityScanCompleted) Color() string
- func (t *OnSecurityScanCompleted) Configuration() []configuration.Field
- func (t *OnSecurityScanCompleted) Description() string
- func (t *OnSecurityScanCompleted) Documentation() string
- func (t *OnSecurityScanCompleted) ExampleData() map[string]any
- func (t *OnSecurityScanCompleted) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)
- func (t *OnSecurityScanCompleted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnSecurityScanCompleted) Hooks() []core.Hook
- func (t *OnSecurityScanCompleted) Icon() string
- func (t *OnSecurityScanCompleted) Label() string
- func (t *OnSecurityScanCompleted) Name() string
- func (t *OnSecurityScanCompleted) Setup(ctx core.TriggerContext) error
- type OnSecurityScanCompletedConfiguration
- type OnSecurityScanCompletedMetadata
- type Organization
- type Package
- type PackageCreatedEvent
- type PackageNodeMetadata
- type PackageQuarantineRequest
- type PackageResult
- type PackageSpec
- type PackageTagRequest
- type PromotePackage
- func (p *PromotePackage) Cancel(ctx core.ExecutionContext) error
- func (p *PromotePackage) Cleanup(ctx core.SetupContext) error
- func (p *PromotePackage) Color() string
- func (p *PromotePackage) Configuration() []configuration.Field
- func (p *PromotePackage) Description() string
- func (p *PromotePackage) Documentation() string
- func (p *PromotePackage) ExampleOutput() map[string]any
- func (p *PromotePackage) Execute(ctx core.ExecutionContext) error
- func (p *PromotePackage) HandleHook(ctx core.ActionHookContext) error
- func (p *PromotePackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (p *PromotePackage) Hooks() []core.Hook
- func (p *PromotePackage) Icon() string
- func (p *PromotePackage) Label() string
- func (p *PromotePackage) Name() string
- func (p *PromotePackage) OutputChannels(configuration any) []core.OutputChannel
- func (p *PromotePackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (p *PromotePackage) Setup(ctx core.SetupContext) error
- type PromotePackageSpec
- type QuarantinePackage
- func (q *QuarantinePackage) Cancel(ctx core.ExecutionContext) error
- func (q *QuarantinePackage) Cleanup(ctx core.SetupContext) error
- func (q *QuarantinePackage) Color() string
- func (q *QuarantinePackage) Configuration() []configuration.Field
- func (q *QuarantinePackage) Description() string
- func (q *QuarantinePackage) Documentation() string
- func (q *QuarantinePackage) ExampleOutput() map[string]any
- func (q *QuarantinePackage) Execute(ctx core.ExecutionContext) error
- func (q *QuarantinePackage) HandleHook(ctx core.ActionHookContext) error
- func (q *QuarantinePackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (q *QuarantinePackage) Hooks() []core.Hook
- func (q *QuarantinePackage) Icon() string
- func (q *QuarantinePackage) Label() string
- func (q *QuarantinePackage) Name() string
- func (q *QuarantinePackage) OutputChannels(configuration any) []core.OutputChannel
- func (q *QuarantinePackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (q *QuarantinePackage) Setup(ctx core.SetupContext) error
- type QuarantinePackageSpec
- type Repository
- type RepositoryNodeMetadata
- type RepositoryRef
- type ResyncPackage
- func (r *ResyncPackage) Cancel(ctx core.ExecutionContext) error
- func (r *ResyncPackage) Cleanup(ctx core.SetupContext) error
- func (r *ResyncPackage) Color() string
- func (r *ResyncPackage) Configuration() []configuration.Field
- func (r *ResyncPackage) Description() string
- func (r *ResyncPackage) Documentation() string
- func (r *ResyncPackage) ExampleOutput() map[string]any
- func (r *ResyncPackage) Execute(ctx core.ExecutionContext) error
- func (r *ResyncPackage) HandleHook(ctx core.ActionHookContext) error
- func (r *ResyncPackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (r *ResyncPackage) Hooks() []core.Hook
- func (r *ResyncPackage) Icon() string
- func (r *ResyncPackage) Label() string
- func (r *ResyncPackage) Name() string
- func (r *ResyncPackage) OutputChannels(configuration any) []core.OutputChannel
- func (r *ResyncPackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (r *ResyncPackage) Setup(ctx core.SetupContext) error
- type ScanPackage
- func (s *ScanPackage) Cancel(ctx core.ExecutionContext) error
- func (s *ScanPackage) Cleanup(ctx core.SetupContext) error
- func (s *ScanPackage) Color() string
- func (s *ScanPackage) Configuration() []configuration.Field
- func (s *ScanPackage) Description() string
- func (s *ScanPackage) Documentation() string
- func (s *ScanPackage) ExampleOutput() map[string]any
- func (s *ScanPackage) Execute(ctx core.ExecutionContext) error
- func (s *ScanPackage) HandleHook(ctx core.ActionHookContext) error
- func (s *ScanPackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (s *ScanPackage) Hooks() []core.Hook
- func (s *ScanPackage) Icon() string
- func (s *ScanPackage) Label() string
- func (s *ScanPackage) Name() string
- func (s *ScanPackage) OutputChannels(configuration any) []core.OutputChannel
- func (s *ScanPackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (s *ScanPackage) Setup(ctx core.SetupContext) error
- type ScanPackageResult
- type ScanPackageSpec
- type SecurityScanEvent
- type TagPackage
- func (t *TagPackage) Cancel(ctx core.ExecutionContext) error
- func (t *TagPackage) Cleanup(ctx core.SetupContext) error
- func (t *TagPackage) Color() string
- func (t *TagPackage) Configuration() []configuration.Field
- func (t *TagPackage) Description() string
- func (t *TagPackage) Documentation() string
- func (t *TagPackage) ExampleOutput() map[string]any
- func (t *TagPackage) Execute(ctx core.ExecutionContext) error
- func (t *TagPackage) HandleHook(ctx core.ActionHookContext) error
- func (t *TagPackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *TagPackage) Hooks() []core.Hook
- func (t *TagPackage) Icon() string
- func (t *TagPackage) Label() string
- func (t *TagPackage) Name() string
- func (t *TagPackage) OutputChannels(configuration any) []core.OutputChannel
- func (t *TagPackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (t *TagPackage) Setup(ctx core.SetupContext) error
- type TagPackageSpec
- type TrimmedPackage
- type User
- type VulnerabilityPackageRef
- type VulnerabilityPolicy
- type VulnerabilityPolicyNodeMetadata
- type VulnerabilityPolicyRequest
- type VulnerabilityScan
- type VulnerabilityScanResult
- type Webhook
Constants ¶
const ( PackageResyncedPayloadType = "cloudsmith.package.resynced" PackageTaggedPayloadType = "cloudsmith.package.tagged" PackageDeletedPayloadType = "cloudsmith.package.deleted" )
const ( SeverityLow = "Low" SeverityMedium = "Medium" SeverityHigh = "High" SeverityCritical = "Critical" )
const ( PromoteModeMove = "move" PromoteModeCopy = "copy" )
const ( QuarantineActionQuarantine = "Quarantine" QuarantineActionRelease = "Release" )
const ( TagActionAdd = "Add" TagActionClear = "Clear" TagActionReplace = "Replace" TagActionRemove = "Remove" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a thin wrapper around the Cloudsmith v1 HTTP API.
func NewClient ¶
func NewClient(http core.HTTPContext, ctx core.IntegrationContext) (*Client, error)
func (*Client) CopyPackage ¶ added in v0.28.0
CopyPackage copies a package to a destination repository within the same namespace. Returns the copied package in the destination.
func (*Client) CreateVulnerabilityPolicy ¶ added in v0.28.0
func (c *Client) CreateVulnerabilityPolicy(org string, req VulnerabilityPolicyRequest) (*VulnerabilityPolicy, error)
CreateVulnerabilityPolicy creates a new vulnerability policy in an organization.
func (*Client) CreateWebhook ¶ added in v0.27.0
func (c *Client) CreateWebhook(owner, repository, targetURL, signatureKey string, events []string) (*Webhook, error)
CreateWebhook registers a webhook on a repository (owner/repository) that posts the given events to targetURL as a JSON object. When signatureKey is non-empty, Cloudsmith signs each delivery with HMAC-SHA1 of the body using that key (sent in the X-Cloudsmith-Signature header).
func (*Client) DeletePackage ¶ added in v0.27.0
func (*Client) DeleteVulnerabilityPolicy ¶ added in v0.28.0
DeleteVulnerabilityPolicy removes a vulnerability policy by its permanent slug.
func (*Client) DeleteWebhook ¶ added in v0.27.0
DeleteWebhook removes a webhook from a repository by its permanent slug.
func (*Client) GetOrganization ¶ added in v0.28.0
func (c *Client) GetOrganization(org string) (*Organization, error)
GetOrganization fetches a single organization by its slug.
func (*Client) GetPackage ¶
GetPackage fetches a single package identified by namespace, repository slug, and package identifier.
func (*Client) GetPackageVulnerabilities ¶ added in v0.28.0
func (c *Client) GetPackageVulnerabilities(owner, repo, identifier string) ([]VulnerabilityScanResult, error)
GetPackageVulnerabilities fetches vulnerability scan results for a package. Uses the /vulnerabilities/{owner}/{repo}/{package}/ endpoint, which is a separate top-level resource from the /packages/ sub-resource tree. Returns the full list of scan results (most recent first).
func (*Client) GetRepository ¶
func (c *Client) GetRepository(owner, identifier string) (*Repository, error)
GetRepository fetches a single repository identified by namespace (owner) and slug.
func (*Client) GetVulnerabilityPolicy ¶ added in v0.28.0
func (c *Client) GetVulnerabilityPolicy(org, slugPerm string) (*VulnerabilityPolicy, error)
GetVulnerabilityPolicy fetches a single vulnerability policy by its permanent slug.
func (*Client) GetWebhook ¶ added in v0.27.0
GetWebhook fetches a webhook by its permanent slug. The error (including not-found) lets callers detect a webhook that was removed at Cloudsmith.
func (*Client) ListOrganizations ¶ added in v0.28.0
func (c *Client) ListOrganizations() ([]Organization, error)
ListOrganizations returns every organization the authenticated user belongs to, following all pages until the API returns a page smaller than organizationPageSize.
func (*Client) ListPackages ¶
ListPackages returns all packages in the given repository, following pagination.
func (*Client) ListPackagesWithFilters ¶ added in v0.28.0
ListPackagesWithFilters returns packages filtered by a Lucene-style query string, following pagination. An empty query returns all packages.
func (*Client) ListRepositories ¶
func (c *Client) ListRepositories() ([]Repository, error)
ListRepositories returns every repository the authenticated user can access, following all pages until the API returns a page smaller than repositoryPageSize.
func (*Client) ListVulnerabilityPolicies ¶ added in v0.28.0
func (c *Client) ListVulnerabilityPolicies(org string) ([]VulnerabilityPolicy, error)
ListVulnerabilityPolicies returns all vulnerability policies in an organization, following pagination.
func (*Client) MovePackage ¶ added in v0.28.0
MovePackage moves a package to a destination repository within the same namespace. The package is removed from the source repository after a successful move. Returns the moved package in the destination.
func (*Client) QuarantinePackage ¶ added in v0.28.0
QuarantinePackage quarantines or releases a package. Set release=true to release a previously quarantined package.
func (*Client) ResyncPackage ¶ added in v0.27.0
func (*Client) ScanPackage ¶ added in v0.28.0
ScanPackage schedules a vulnerability scan for the given package.
func (*Client) TagPackage ¶ added in v0.27.0
func (c *Client) TagPackage(owner, repository, identifier string, request PackageTagRequest) (*Package, error)
func (*Client) UpdateWebhook ¶ added in v0.27.0
func (c *Client) UpdateWebhook(owner, repository, slugPerm, targetURL, signatureKey string, events []string) (*Webhook, error)
UpdateWebhook re-asserts an existing webhook's desired state (PATCH): target URL, subscribed events, active flag, and signing key. A webhook can be disabled or have its events edited out of band at Cloudsmith, and the signature_key is only set on write and never returned — re-applying all of these on reconcile keeps deliveries flowing and verifiable without recreating the webhook.
type Cloudsmith ¶
type Cloudsmith struct{}
func (*Cloudsmith) Actions ¶
func (c *Cloudsmith) Actions() []core.Action
func (*Cloudsmith) Cleanup ¶
func (c *Cloudsmith) Cleanup(ctx core.IntegrationCleanupContext) error
func (*Cloudsmith) Configuration ¶
func (c *Cloudsmith) Configuration() []configuration.Field
func (*Cloudsmith) Description ¶
func (c *Cloudsmith) Description() string
func (*Cloudsmith) HandleHook ¶
func (c *Cloudsmith) HandleHook(ctx core.IntegrationHookContext) error
func (*Cloudsmith) HandleRequest ¶
func (c *Cloudsmith) HandleRequest(ctx core.HTTPRequestContext)
func (*Cloudsmith) Hooks ¶
func (c *Cloudsmith) Hooks() []core.Hook
func (*Cloudsmith) Icon ¶
func (c *Cloudsmith) Icon() string
func (*Cloudsmith) Instructions ¶
func (c *Cloudsmith) Instructions() string
func (*Cloudsmith) Label ¶
func (c *Cloudsmith) Label() string
func (*Cloudsmith) ListResources ¶
func (c *Cloudsmith) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
func (*Cloudsmith) Name ¶
func (c *Cloudsmith) Name() string
func (*Cloudsmith) Sync ¶
func (c *Cloudsmith) Sync(ctx core.SyncContext) error
func (*Cloudsmith) Triggers ¶
func (c *Cloudsmith) Triggers() []core.Trigger
type Configuration ¶
type Configuration struct {
APIKey string `json:"apiKey"`
}
type CreateVulnerabilityPolicy ¶ added in v0.28.0
type CreateVulnerabilityPolicy struct{}
func (*CreateVulnerabilityPolicy) Cancel ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Cancel(ctx core.ExecutionContext) error
func (*CreateVulnerabilityPolicy) Cleanup ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Cleanup(ctx core.SetupContext) error
func (*CreateVulnerabilityPolicy) Color ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Color() string
func (*CreateVulnerabilityPolicy) Configuration ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Configuration() []configuration.Field
func (*CreateVulnerabilityPolicy) Description ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Description() string
func (*CreateVulnerabilityPolicy) Documentation ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Documentation() string
func (*CreateVulnerabilityPolicy) ExampleOutput ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) ExampleOutput() map[string]any
func (*CreateVulnerabilityPolicy) Execute ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Execute(ctx core.ExecutionContext) error
func (*CreateVulnerabilityPolicy) HandleHook ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) HandleHook(ctx core.ActionHookContext) error
func (*CreateVulnerabilityPolicy) HandleWebhook ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*CreateVulnerabilityPolicy) Hooks ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Hooks() []core.Hook
func (*CreateVulnerabilityPolicy) Icon ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Icon() string
func (*CreateVulnerabilityPolicy) Label ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Label() string
func (*CreateVulnerabilityPolicy) Name ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Name() string
func (*CreateVulnerabilityPolicy) OutputChannels ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) OutputChannels(configuration any) []core.OutputChannel
func (*CreateVulnerabilityPolicy) ProcessQueueItem ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*CreateVulnerabilityPolicy) Setup ¶ added in v0.28.0
func (c *CreateVulnerabilityPolicy) Setup(ctx core.SetupContext) error
type CreateVulnerabilityPolicySpec ¶ added in v0.28.0
type CreateVulnerabilityPolicySpec struct {
Organization string `json:"organization" mapstructure:"organization"`
Name string `json:"name" mapstructure:"name"`
Description string `json:"description" mapstructure:"description"`
MinSeverity string `json:"minSeverity" mapstructure:"minSeverity"`
PackageQueryString string `json:"packageQueryString" mapstructure:"packageQueryString"`
OnViolationQuarantine bool `json:"onViolationQuarantine" mapstructure:"onViolationQuarantine"`
AllowUnknownSeverity bool `json:"allowUnknownSeverity" mapstructure:"allowUnknownSeverity"`
}
type DeletePackage ¶ added in v0.27.0
type DeletePackage struct{}
func (*DeletePackage) Cancel ¶ added in v0.27.0
func (d *DeletePackage) Cancel(ctx core.ExecutionContext) error
func (*DeletePackage) Cleanup ¶ added in v0.27.0
func (d *DeletePackage) Cleanup(ctx core.SetupContext) error
func (*DeletePackage) Color ¶ added in v0.27.0
func (d *DeletePackage) Color() string
func (*DeletePackage) Configuration ¶ added in v0.27.0
func (d *DeletePackage) Configuration() []configuration.Field
func (*DeletePackage) Description ¶ added in v0.27.0
func (d *DeletePackage) Description() string
func (*DeletePackage) Documentation ¶ added in v0.27.0
func (d *DeletePackage) Documentation() string
func (*DeletePackage) ExampleOutput ¶ added in v0.27.0
func (d *DeletePackage) ExampleOutput() map[string]any
func (*DeletePackage) Execute ¶ added in v0.27.0
func (d *DeletePackage) Execute(ctx core.ExecutionContext) error
func (*DeletePackage) HandleHook ¶ added in v0.27.0
func (d *DeletePackage) HandleHook(ctx core.ActionHookContext) error
func (*DeletePackage) HandleWebhook ¶ added in v0.27.0
func (d *DeletePackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*DeletePackage) Hooks ¶ added in v0.27.0
func (d *DeletePackage) Hooks() []core.Hook
func (*DeletePackage) Icon ¶ added in v0.27.0
func (d *DeletePackage) Icon() string
func (*DeletePackage) Label ¶ added in v0.27.0
func (d *DeletePackage) Label() string
func (*DeletePackage) Name ¶ added in v0.27.0
func (d *DeletePackage) Name() string
func (*DeletePackage) OutputChannels ¶ added in v0.27.0
func (d *DeletePackage) OutputChannels(configuration any) []core.OutputChannel
func (*DeletePackage) ProcessQueueItem ¶ added in v0.27.0
func (d *DeletePackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*DeletePackage) Setup ¶ added in v0.27.0
func (d *DeletePackage) Setup(ctx core.SetupContext) error
type DeleteVulnerabilityPolicy ¶ added in v0.28.0
type DeleteVulnerabilityPolicy struct{}
func (*DeleteVulnerabilityPolicy) Cancel ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Cancel(ctx core.ExecutionContext) error
func (*DeleteVulnerabilityPolicy) Cleanup ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Cleanup(ctx core.SetupContext) error
func (*DeleteVulnerabilityPolicy) Color ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Color() string
func (*DeleteVulnerabilityPolicy) Configuration ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Configuration() []configuration.Field
func (*DeleteVulnerabilityPolicy) Description ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Description() string
func (*DeleteVulnerabilityPolicy) Documentation ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Documentation() string
func (*DeleteVulnerabilityPolicy) ExampleOutput ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) ExampleOutput() map[string]any
func (*DeleteVulnerabilityPolicy) Execute ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Execute(ctx core.ExecutionContext) error
func (*DeleteVulnerabilityPolicy) HandleHook ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) HandleHook(ctx core.ActionHookContext) error
func (*DeleteVulnerabilityPolicy) HandleWebhook ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*DeleteVulnerabilityPolicy) Hooks ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Hooks() []core.Hook
func (*DeleteVulnerabilityPolicy) Icon ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Icon() string
func (*DeleteVulnerabilityPolicy) Label ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Label() string
func (*DeleteVulnerabilityPolicy) Name ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Name() string
func (*DeleteVulnerabilityPolicy) OutputChannels ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) OutputChannels(configuration any) []core.OutputChannel
func (*DeleteVulnerabilityPolicy) ProcessQueueItem ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*DeleteVulnerabilityPolicy) Setup ¶ added in v0.28.0
func (d *DeleteVulnerabilityPolicy) Setup(ctx core.SetupContext) error
type DeleteVulnerabilityPolicyResult ¶ added in v0.28.0
type DeleteVulnerabilityPolicyResult struct {
Organization string `json:"organization"`
SlugPerm string `json:"slug_perm"`
Deleted bool `json:"deleted"`
}
DeleteVulnerabilityPolicyResult is the payload emitted after a successful delete. The Cloudsmith API returns 204 with no body, so we echo the deleted policy's identity for downstream steps.
type DeleteVulnerabilityPolicySpec ¶ added in v0.28.0
type GetPackage ¶
type GetPackage struct{}
func (*GetPackage) Cancel ¶
func (g *GetPackage) Cancel(ctx core.ExecutionContext) error
func (*GetPackage) Cleanup ¶
func (g *GetPackage) Cleanup(ctx core.SetupContext) error
func (*GetPackage) Color ¶
func (g *GetPackage) Color() string
func (*GetPackage) Configuration ¶
func (g *GetPackage) Configuration() []configuration.Field
func (*GetPackage) Description ¶
func (g *GetPackage) Description() string
func (*GetPackage) Documentation ¶
func (g *GetPackage) Documentation() string
func (*GetPackage) ExampleOutput ¶
func (g *GetPackage) ExampleOutput() map[string]any
func (*GetPackage) Execute ¶
func (g *GetPackage) Execute(ctx core.ExecutionContext) error
func (*GetPackage) HandleHook ¶
func (g *GetPackage) HandleHook(ctx core.ActionHookContext) error
func (*GetPackage) HandleWebhook ¶
func (g *GetPackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*GetPackage) Hooks ¶
func (g *GetPackage) Hooks() []core.Hook
func (*GetPackage) Icon ¶
func (g *GetPackage) Icon() string
func (*GetPackage) Label ¶
func (g *GetPackage) Label() string
func (*GetPackage) Name ¶
func (g *GetPackage) Name() string
func (*GetPackage) OutputChannels ¶
func (g *GetPackage) OutputChannels(configuration any) []core.OutputChannel
func (*GetPackage) ProcessQueueItem ¶
func (g *GetPackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*GetPackage) Setup ¶
func (g *GetPackage) Setup(ctx core.SetupContext) error
type GetPackageSpec ¶
type GetPackageVulnerabilities ¶ added in v0.28.0
type GetPackageVulnerabilities struct{}
func (*GetPackageVulnerabilities) Cancel ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Cancel(ctx core.ExecutionContext) error
func (*GetPackageVulnerabilities) Cleanup ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Cleanup(ctx core.SetupContext) error
func (*GetPackageVulnerabilities) Color ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Color() string
func (*GetPackageVulnerabilities) Configuration ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Configuration() []configuration.Field
func (*GetPackageVulnerabilities) Description ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Description() string
func (*GetPackageVulnerabilities) Documentation ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Documentation() string
func (*GetPackageVulnerabilities) ExampleOutput ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) ExampleOutput() map[string]any
func (*GetPackageVulnerabilities) Execute ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Execute(ctx core.ExecutionContext) error
func (*GetPackageVulnerabilities) HandleHook ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) HandleHook(ctx core.ActionHookContext) error
func (*GetPackageVulnerabilities) HandleWebhook ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*GetPackageVulnerabilities) Hooks ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Hooks() []core.Hook
func (*GetPackageVulnerabilities) Icon ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Icon() string
func (*GetPackageVulnerabilities) Label ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Label() string
func (*GetPackageVulnerabilities) Name ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Name() string
func (*GetPackageVulnerabilities) OutputChannels ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) OutputChannels(configuration any) []core.OutputChannel
func (*GetPackageVulnerabilities) ProcessQueueItem ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*GetPackageVulnerabilities) Setup ¶ added in v0.28.0
func (g *GetPackageVulnerabilities) Setup(ctx core.SetupContext) error
type GetPackageVulnerabilitiesSpec ¶ added in v0.28.0
type GetRepository ¶
type GetRepository struct{}
func (*GetRepository) Cancel ¶
func (g *GetRepository) Cancel(ctx core.ExecutionContext) error
func (*GetRepository) Cleanup ¶
func (g *GetRepository) Cleanup(ctx core.SetupContext) error
func (*GetRepository) Color ¶
func (g *GetRepository) Color() string
func (*GetRepository) Configuration ¶
func (g *GetRepository) Configuration() []configuration.Field
func (*GetRepository) Description ¶
func (g *GetRepository) Description() string
func (*GetRepository) Documentation ¶
func (g *GetRepository) Documentation() string
func (*GetRepository) ExampleOutput ¶
func (g *GetRepository) ExampleOutput() map[string]any
func (*GetRepository) Execute ¶
func (g *GetRepository) Execute(ctx core.ExecutionContext) error
func (*GetRepository) HandleHook ¶
func (g *GetRepository) HandleHook(ctx core.ActionHookContext) error
func (*GetRepository) HandleWebhook ¶
func (g *GetRepository) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*GetRepository) Hooks ¶
func (g *GetRepository) Hooks() []core.Hook
func (*GetRepository) Icon ¶
func (g *GetRepository) Icon() string
func (*GetRepository) Label ¶
func (g *GetRepository) Label() string
func (*GetRepository) Name ¶
func (g *GetRepository) Name() string
func (*GetRepository) OutputChannels ¶
func (g *GetRepository) OutputChannels(configuration any) []core.OutputChannel
func (*GetRepository) ProcessQueueItem ¶
func (g *GetRepository) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*GetRepository) Setup ¶
func (g *GetRepository) Setup(ctx core.SetupContext) error
type GetRepositorySpec ¶
type GetRepositorySpec struct {
Repository string `json:"repository" mapstructure:"repository"`
}
type GetVulnerabilityPolicy ¶ added in v0.28.0
type GetVulnerabilityPolicy struct{}
func (*GetVulnerabilityPolicy) Cancel ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Cancel(ctx core.ExecutionContext) error
func (*GetVulnerabilityPolicy) Cleanup ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Cleanup(ctx core.SetupContext) error
func (*GetVulnerabilityPolicy) Color ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Color() string
func (*GetVulnerabilityPolicy) Configuration ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Configuration() []configuration.Field
func (*GetVulnerabilityPolicy) Description ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Description() string
func (*GetVulnerabilityPolicy) Documentation ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Documentation() string
func (*GetVulnerabilityPolicy) ExampleOutput ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) ExampleOutput() map[string]any
func (*GetVulnerabilityPolicy) Execute ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Execute(ctx core.ExecutionContext) error
func (*GetVulnerabilityPolicy) HandleHook ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) HandleHook(ctx core.ActionHookContext) error
func (*GetVulnerabilityPolicy) HandleWebhook ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*GetVulnerabilityPolicy) Hooks ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Hooks() []core.Hook
func (*GetVulnerabilityPolicy) Icon ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Icon() string
func (*GetVulnerabilityPolicy) Label ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Label() string
func (*GetVulnerabilityPolicy) Name ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Name() string
func (*GetVulnerabilityPolicy) OutputChannels ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) OutputChannels(configuration any) []core.OutputChannel
func (*GetVulnerabilityPolicy) ProcessQueueItem ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*GetVulnerabilityPolicy) Setup ¶ added in v0.28.0
func (g *GetVulnerabilityPolicy) Setup(ctx core.SetupContext) error
type GetVulnerabilityPolicySpec ¶ added in v0.28.0
type ListPackages ¶ added in v0.28.0
type ListPackages struct{}
func (*ListPackages) Cancel ¶ added in v0.28.0
func (l *ListPackages) Cancel(ctx core.ExecutionContext) error
func (*ListPackages) Cleanup ¶ added in v0.28.0
func (l *ListPackages) Cleanup(ctx core.SetupContext) error
func (*ListPackages) Color ¶ added in v0.28.0
func (l *ListPackages) Color() string
func (*ListPackages) Configuration ¶ added in v0.28.0
func (l *ListPackages) Configuration() []configuration.Field
func (*ListPackages) Description ¶ added in v0.28.0
func (l *ListPackages) Description() string
func (*ListPackages) Documentation ¶ added in v0.28.0
func (l *ListPackages) Documentation() string
func (*ListPackages) ExampleOutput ¶ added in v0.28.0
func (l *ListPackages) ExampleOutput() map[string]any
func (*ListPackages) Execute ¶ added in v0.28.0
func (l *ListPackages) Execute(ctx core.ExecutionContext) error
func (*ListPackages) HandleHook ¶ added in v0.28.0
func (l *ListPackages) HandleHook(ctx core.ActionHookContext) error
func (*ListPackages) HandleWebhook ¶ added in v0.28.0
func (l *ListPackages) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*ListPackages) Hooks ¶ added in v0.28.0
func (l *ListPackages) Hooks() []core.Hook
func (*ListPackages) Icon ¶ added in v0.28.0
func (l *ListPackages) Icon() string
func (*ListPackages) Label ¶ added in v0.28.0
func (l *ListPackages) Label() string
func (*ListPackages) Name ¶ added in v0.28.0
func (l *ListPackages) Name() string
func (*ListPackages) OutputChannels ¶ added in v0.28.0
func (l *ListPackages) OutputChannels(configuration any) []core.OutputChannel
func (*ListPackages) ProcessQueueItem ¶ added in v0.28.0
func (l *ListPackages) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*ListPackages) Setup ¶ added in v0.28.0
func (l *ListPackages) Setup(ctx core.SetupContext) error
type ListPackagesResult ¶ added in v0.28.0
type ListPackagesResult struct {
Packages []TrimmedPackage `json:"packages"`
}
ListPackagesResult is the single payload emitted by ListPackages.Execute.
type ListPackagesSpec ¶ added in v0.28.0
type ListPackagesSpec struct {
Repository string `json:"repository" mapstructure:"repository"`
SyncStatus string `json:"syncStatus" mapstructure:"syncStatus"`
QuarantineStatus string `json:"quarantineStatus" mapstructure:"quarantineStatus"`
VulnerabilityStatus string `json:"vulnerabilityStatus" mapstructure:"vulnerabilityStatus"`
}
type OnPackageCreated ¶ added in v0.27.0
type OnPackageCreated struct{}
func (*OnPackageCreated) Cleanup ¶ added in v0.27.0
func (t *OnPackageCreated) Cleanup(ctx core.TriggerContext) error
func (*OnPackageCreated) Color ¶ added in v0.27.0
func (t *OnPackageCreated) Color() string
func (*OnPackageCreated) Configuration ¶ added in v0.27.0
func (t *OnPackageCreated) Configuration() []configuration.Field
func (*OnPackageCreated) Description ¶ added in v0.27.0
func (t *OnPackageCreated) Description() string
func (*OnPackageCreated) Documentation ¶ added in v0.27.0
func (t *OnPackageCreated) Documentation() string
func (*OnPackageCreated) ExampleData ¶ added in v0.27.0
func (t *OnPackageCreated) ExampleData() map[string]any
func (*OnPackageCreated) HandleHook ¶ added in v0.27.0
func (t *OnPackageCreated) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)
func (*OnPackageCreated) HandleWebhook ¶ added in v0.27.0
func (t *OnPackageCreated) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*OnPackageCreated) Hooks ¶ added in v0.27.0
func (t *OnPackageCreated) Hooks() []core.Hook
func (*OnPackageCreated) Icon ¶ added in v0.27.0
func (t *OnPackageCreated) Icon() string
func (*OnPackageCreated) Label ¶ added in v0.27.0
func (t *OnPackageCreated) Label() string
func (*OnPackageCreated) Name ¶ added in v0.27.0
func (t *OnPackageCreated) Name() string
func (*OnPackageCreated) Setup ¶ added in v0.27.0
func (t *OnPackageCreated) Setup(ctx core.TriggerContext) error
type OnPackageCreatedConfiguration ¶ added in v0.27.0
type OnPackageCreatedConfiguration struct {
Repository string `json:"repository" mapstructure:"repository"`
}
type OnPackageCreatedMetadata ¶ added in v0.27.0
type OnPackageCreatedMetadata struct {
Repository *RepositoryRef `json:"repository" mapstructure:"repository"`
WebhookURL string `json:"webhookUrl" mapstructure:"webhookUrl"`
WebhookID string `json:"webhookId" mapstructure:"webhookId"`
}
type OnSecurityScanCompleted ¶ added in v0.27.0
type OnSecurityScanCompleted struct{}
func (*OnSecurityScanCompleted) Cleanup ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) Cleanup(ctx core.TriggerContext) error
func (*OnSecurityScanCompleted) Color ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) Color() string
func (*OnSecurityScanCompleted) Configuration ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) Configuration() []configuration.Field
func (*OnSecurityScanCompleted) Description ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) Description() string
func (*OnSecurityScanCompleted) Documentation ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) Documentation() string
func (*OnSecurityScanCompleted) ExampleData ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) ExampleData() map[string]any
func (*OnSecurityScanCompleted) HandleHook ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)
func (*OnSecurityScanCompleted) HandleWebhook ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*OnSecurityScanCompleted) Hooks ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) Hooks() []core.Hook
func (*OnSecurityScanCompleted) Icon ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) Icon() string
func (*OnSecurityScanCompleted) Label ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) Label() string
func (*OnSecurityScanCompleted) Name ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) Name() string
func (*OnSecurityScanCompleted) Setup ¶ added in v0.27.0
func (t *OnSecurityScanCompleted) Setup(ctx core.TriggerContext) error
type OnSecurityScanCompletedConfiguration ¶ added in v0.27.0
type OnSecurityScanCompletedConfiguration struct {
Repository string `json:"repository" mapstructure:"repository"`
}
type OnSecurityScanCompletedMetadata ¶ added in v0.27.0
type OnSecurityScanCompletedMetadata struct {
Repository *RepositoryRef `json:"repository" mapstructure:"repository"`
WebhookURL string `json:"webhookUrl" mapstructure:"webhookUrl"`
WebhookID string `json:"webhookId" mapstructure:"webhookId"`
}
type Organization ¶ added in v0.28.0
type Organization struct {
Name string `json:"name"`
Slug string `json:"slug"`
SlugPerm string `json:"slug_perm"`
}
Organization is the subset of a Cloudsmith organization used to populate the organization resource selector.
type Package ¶
type Package struct {
// Identity
Slug string `json:"slug"`
SlugPerm string `json:"slug_perm"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
Version string `json:"version"`
Filename string `json:"filename"`
Format string `json:"format"`
Repository string `json:"repository"`
Namespace string `json:"namespace"`
UploadedAt string `json:"uploaded_at"`
Uploader string `json:"uploader"`
// Status
Status int `json:"status"`
StatusStr string `json:"status_str"`
StatusReason string `json:"status_reason"`
StatusUpdatedAt string `json:"status_updated_at"`
// Stage / sync
Stage int `json:"stage"`
StageStr string `json:"stage_str"`
StageUpdatedAt string `json:"stage_updated_at"`
IsSyncAwaiting bool `json:"is_sync_awaiting"`
IsSyncCompleted bool `json:"is_sync_completed"`
IsSyncFailed bool `json:"is_sync_failed"`
IsSyncInFlight bool `json:"is_sync_in_flight"`
IsSyncInProgress bool `json:"is_sync_in_progress"`
SyncFinishedAt string `json:"sync_finished_at"`
SyncProgress int `json:"sync_progress"`
// Quarantine / policy
IsQuarantined bool `json:"is_quarantined"`
PolicyViolated bool `json:"policy_violated"`
License string `json:"license"`
// Security scanning
SecurityScanStatus string `json:"security_scan_status"`
SecurityScanStartedAt string `json:"security_scan_started_at"`
SecurityScanCompletedAt string `json:"security_scan_completed_at"`
VulnerabilityResultsURL string `json:"vulnerability_scan_results_url"`
// Checksums
ChecksumMD5 string `json:"checksum_md5"`
ChecksumSHA1 string `json:"checksum_sha1"`
ChecksumSHA256 string `json:"checksum_sha256"`
ChecksumSHA512 string `json:"checksum_sha512"`
// URLs
SelfURL string `json:"self_url"`
SelfHTMLURL string `json:"self_html_url"`
SelfWebappURL string `json:"self_webapp_url"`
CDNURL string `json:"cdn_url"`
// Size / metadata
Size int64 `json:"size"`
SizeStr string `json:"size_str"`
Description string `json:"description"`
Summary string `json:"summary"`
// Tags
Tags map[string]any `json:"tags"`
TagsImmutable map[string]any `json:"tags_immutable"`
}
Package represents a Cloudsmith package with its metadata.
type PackageCreatedEvent ¶ added in v0.27.0
type PackageCreatedEvent struct {
Event string `json:"event"`
Namespace string `json:"namespace"`
Repository string `json:"repository"`
Name string `json:"name"`
Version string `json:"version"`
SlugPerm string `json:"slug_perm"`
Format string `json:"format"`
License string `json:"license"`
Uploader string `json:"uploader"`
UploadedAt string `json:"uploaded_at"`
Status string `json:"status"`
}
PackageCreatedEvent is the payload emitted to downstream nodes for each newly created package.
type PackageNodeMetadata ¶
type PackageNodeMetadata struct {
RepositoryID string `json:"repositoryId" mapstructure:"repositoryId"`
RepositoryName string `json:"repositoryName" mapstructure:"repositoryName"`
RepositoryNamespace string `json:"repositoryNamespace" mapstructure:"repositoryNamespace"`
RepositorySlug string `json:"repositorySlug" mapstructure:"repositorySlug"`
PackageID string `json:"packageId" mapstructure:"packageId"`
PackageName string `json:"packageName" mapstructure:"packageName"`
}
PackageNodeMetadata caches both the repository and package display names so the UI can show human-readable labels without extra API calls.
type PackageQuarantineRequest ¶ added in v0.28.0
type PackageQuarantineRequest struct {
Release bool `json:"release"`
}
PackageQuarantineRequest is the request body for the quarantine endpoint.
type PackageResult ¶ added in v0.27.0
type PackageSpec ¶ added in v0.27.0
type PackageTagRequest ¶ added in v0.27.0
type PackageTagRequest struct {
Action string `json:"action,omitempty"`
IsImmutable bool `json:"is_immutable,omitempty"`
Tags []string `json:"tags,omitempty"`
}
PackageTagRequest is the request body for the Cloudsmith tag endpoint.
type PromotePackage ¶ added in v0.28.0
type PromotePackage struct{}
func (*PromotePackage) Cancel ¶ added in v0.28.0
func (p *PromotePackage) Cancel(ctx core.ExecutionContext) error
func (*PromotePackage) Cleanup ¶ added in v0.28.0
func (p *PromotePackage) Cleanup(ctx core.SetupContext) error
func (*PromotePackage) Color ¶ added in v0.28.0
func (p *PromotePackage) Color() string
func (*PromotePackage) Configuration ¶ added in v0.28.0
func (p *PromotePackage) Configuration() []configuration.Field
func (*PromotePackage) Description ¶ added in v0.28.0
func (p *PromotePackage) Description() string
func (*PromotePackage) Documentation ¶ added in v0.28.0
func (p *PromotePackage) Documentation() string
func (*PromotePackage) ExampleOutput ¶ added in v0.28.0
func (p *PromotePackage) ExampleOutput() map[string]any
func (*PromotePackage) Execute ¶ added in v0.28.0
func (p *PromotePackage) Execute(ctx core.ExecutionContext) error
func (*PromotePackage) HandleHook ¶ added in v0.28.0
func (p *PromotePackage) HandleHook(ctx core.ActionHookContext) error
func (*PromotePackage) HandleWebhook ¶ added in v0.28.0
func (p *PromotePackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*PromotePackage) Hooks ¶ added in v0.28.0
func (p *PromotePackage) Hooks() []core.Hook
func (*PromotePackage) Icon ¶ added in v0.28.0
func (p *PromotePackage) Icon() string
func (*PromotePackage) Label ¶ added in v0.28.0
func (p *PromotePackage) Label() string
func (*PromotePackage) Name ¶ added in v0.28.0
func (p *PromotePackage) Name() string
func (*PromotePackage) OutputChannels ¶ added in v0.28.0
func (p *PromotePackage) OutputChannels(configuration any) []core.OutputChannel
func (*PromotePackage) ProcessQueueItem ¶ added in v0.28.0
func (p *PromotePackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*PromotePackage) Setup ¶ added in v0.28.0
func (p *PromotePackage) Setup(ctx core.SetupContext) error
type PromotePackageSpec ¶ added in v0.28.0
type PromotePackageSpec struct {
SourceRepository string `json:"sourceRepository" mapstructure:"sourceRepository"`
Package string `json:"package" mapstructure:"package"`
DestinationRepository string `json:"destinationRepository" mapstructure:"destinationRepository"`
Mode string `json:"mode" mapstructure:"mode"`
}
type QuarantinePackage ¶ added in v0.28.0
type QuarantinePackage struct{}
func (*QuarantinePackage) Cancel ¶ added in v0.28.0
func (q *QuarantinePackage) Cancel(ctx core.ExecutionContext) error
func (*QuarantinePackage) Cleanup ¶ added in v0.28.0
func (q *QuarantinePackage) Cleanup(ctx core.SetupContext) error
func (*QuarantinePackage) Color ¶ added in v0.28.0
func (q *QuarantinePackage) Color() string
func (*QuarantinePackage) Configuration ¶ added in v0.28.0
func (q *QuarantinePackage) Configuration() []configuration.Field
func (*QuarantinePackage) Description ¶ added in v0.28.0
func (q *QuarantinePackage) Description() string
func (*QuarantinePackage) Documentation ¶ added in v0.28.0
func (q *QuarantinePackage) Documentation() string
func (*QuarantinePackage) ExampleOutput ¶ added in v0.28.0
func (q *QuarantinePackage) ExampleOutput() map[string]any
func (*QuarantinePackage) Execute ¶ added in v0.28.0
func (q *QuarantinePackage) Execute(ctx core.ExecutionContext) error
func (*QuarantinePackage) HandleHook ¶ added in v0.28.0
func (q *QuarantinePackage) HandleHook(ctx core.ActionHookContext) error
func (*QuarantinePackage) HandleWebhook ¶ added in v0.28.0
func (q *QuarantinePackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*QuarantinePackage) Hooks ¶ added in v0.28.0
func (q *QuarantinePackage) Hooks() []core.Hook
func (*QuarantinePackage) Icon ¶ added in v0.28.0
func (q *QuarantinePackage) Icon() string
func (*QuarantinePackage) Label ¶ added in v0.28.0
func (q *QuarantinePackage) Label() string
func (*QuarantinePackage) Name ¶ added in v0.28.0
func (q *QuarantinePackage) Name() string
func (*QuarantinePackage) OutputChannels ¶ added in v0.28.0
func (q *QuarantinePackage) OutputChannels(configuration any) []core.OutputChannel
func (*QuarantinePackage) ProcessQueueItem ¶ added in v0.28.0
func (q *QuarantinePackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*QuarantinePackage) Setup ¶ added in v0.28.0
func (q *QuarantinePackage) Setup(ctx core.SetupContext) error
type QuarantinePackageSpec ¶ added in v0.28.0
type Repository ¶
type Repository struct {
Name string `json:"name"`
Slug string `json:"slug"`
SlugPerm string `json:"slug_perm"`
Namespace string `json:"namespace"`
NamespaceURL string `json:"namespace_url"`
Description string `json:"description"`
RepositoryType string `json:"repository_type_str"`
ContentKind string `json:"content_kind"`
StorageRegion string `json:"storage_region"`
CDNUrl string `json:"cdn_url"`
SelfURL string `json:"self_url"`
SelfHTMLUrl string `json:"self_html_url"`
SelfWebappURL string `json:"self_webapp_url"`
IsPrivate bool `json:"is_private"`
IsPublic bool `json:"is_public"`
IsOpenSource bool `json:"is_open_source"`
Size int64 `json:"size"`
SizeStr string `json:"size_str"`
PackageCount int64 `json:"package_count"`
PackageGroupCount int64 `json:"package_group_count"`
NumDownloads int64 `json:"num_downloads"`
NumQuarantinedPackages int64 `json:"num_quarantined_packages"`
NumPolicyViolatedPackages int64 `json:"num_policy_violated_packages"`
CreatedAt string `json:"created_at"`
}
Repository holds the Cloudsmith repository fields most useful for workflows.
type RepositoryNodeMetadata ¶
type RepositoryNodeMetadata struct {
RepositoryID string `json:"repositoryId" mapstructure:"repositoryId"`
RepositoryName string `json:"repositoryName" mapstructure:"repositoryName"`
RepositoryNamespace string `json:"repositoryNamespace" mapstructure:"repositoryNamespace"`
RepositorySlug string `json:"repositorySlug" mapstructure:"repositorySlug"`
}
RepositoryNodeMetadata caches the human-readable repository name so the UI can display it without re-fetching from the API on every render.
type RepositoryRef ¶ added in v0.27.0
type RepositoryRef struct {
Namespace string `json:"namespace" mapstructure:"namespace"`
Slug string `json:"slug" mapstructure:"slug"`
}
RepositoryRef identifies the repository a webhook trigger watches.
type ResyncPackage ¶ added in v0.27.0
type ResyncPackage struct{}
func (*ResyncPackage) Cancel ¶ added in v0.27.0
func (r *ResyncPackage) Cancel(ctx core.ExecutionContext) error
func (*ResyncPackage) Cleanup ¶ added in v0.27.0
func (r *ResyncPackage) Cleanup(ctx core.SetupContext) error
func (*ResyncPackage) Color ¶ added in v0.27.0
func (r *ResyncPackage) Color() string
func (*ResyncPackage) Configuration ¶ added in v0.27.0
func (r *ResyncPackage) Configuration() []configuration.Field
func (*ResyncPackage) Description ¶ added in v0.27.0
func (r *ResyncPackage) Description() string
func (*ResyncPackage) Documentation ¶ added in v0.27.0
func (r *ResyncPackage) Documentation() string
func (*ResyncPackage) ExampleOutput ¶ added in v0.27.0
func (r *ResyncPackage) ExampleOutput() map[string]any
func (*ResyncPackage) Execute ¶ added in v0.27.0
func (r *ResyncPackage) Execute(ctx core.ExecutionContext) error
func (*ResyncPackage) HandleHook ¶ added in v0.27.0
func (r *ResyncPackage) HandleHook(ctx core.ActionHookContext) error
func (*ResyncPackage) HandleWebhook ¶ added in v0.27.0
func (r *ResyncPackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*ResyncPackage) Hooks ¶ added in v0.27.0
func (r *ResyncPackage) Hooks() []core.Hook
func (*ResyncPackage) Icon ¶ added in v0.27.0
func (r *ResyncPackage) Icon() string
func (*ResyncPackage) Label ¶ added in v0.27.0
func (r *ResyncPackage) Label() string
func (*ResyncPackage) Name ¶ added in v0.27.0
func (r *ResyncPackage) Name() string
func (*ResyncPackage) OutputChannels ¶ added in v0.27.0
func (r *ResyncPackage) OutputChannels(configuration any) []core.OutputChannel
func (*ResyncPackage) ProcessQueueItem ¶ added in v0.27.0
func (r *ResyncPackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*ResyncPackage) Setup ¶ added in v0.27.0
func (r *ResyncPackage) Setup(ctx core.SetupContext) error
type ScanPackage ¶ added in v0.28.0
type ScanPackage struct{}
func (*ScanPackage) Cancel ¶ added in v0.28.0
func (s *ScanPackage) Cancel(ctx core.ExecutionContext) error
func (*ScanPackage) Cleanup ¶ added in v0.28.0
func (s *ScanPackage) Cleanup(ctx core.SetupContext) error
func (*ScanPackage) Color ¶ added in v0.28.0
func (s *ScanPackage) Color() string
func (*ScanPackage) Configuration ¶ added in v0.28.0
func (s *ScanPackage) Configuration() []configuration.Field
func (*ScanPackage) Description ¶ added in v0.28.0
func (s *ScanPackage) Description() string
func (*ScanPackage) Documentation ¶ added in v0.28.0
func (s *ScanPackage) Documentation() string
func (*ScanPackage) ExampleOutput ¶ added in v0.28.0
func (s *ScanPackage) ExampleOutput() map[string]any
func (*ScanPackage) Execute ¶ added in v0.28.0
func (s *ScanPackage) Execute(ctx core.ExecutionContext) error
func (*ScanPackage) HandleHook ¶ added in v0.28.0
func (s *ScanPackage) HandleHook(ctx core.ActionHookContext) error
func (*ScanPackage) HandleWebhook ¶ added in v0.28.0
func (s *ScanPackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*ScanPackage) Hooks ¶ added in v0.28.0
func (s *ScanPackage) Hooks() []core.Hook
func (*ScanPackage) Icon ¶ added in v0.28.0
func (s *ScanPackage) Icon() string
func (*ScanPackage) Label ¶ added in v0.28.0
func (s *ScanPackage) Label() string
func (*ScanPackage) Name ¶ added in v0.28.0
func (s *ScanPackage) Name() string
func (*ScanPackage) OutputChannels ¶ added in v0.28.0
func (s *ScanPackage) OutputChannels(configuration any) []core.OutputChannel
func (*ScanPackage) ProcessQueueItem ¶ added in v0.28.0
func (s *ScanPackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*ScanPackage) Setup ¶ added in v0.28.0
func (s *ScanPackage) Setup(ctx core.SetupContext) error
type ScanPackageResult ¶ added in v0.28.0
type ScanPackageSpec ¶ added in v0.28.0
type SecurityScanEvent ¶ added in v0.27.0
type SecurityScanEvent struct {
Event string `json:"event"`
Namespace string `json:"namespace"`
Repository string `json:"repository"`
Name string `json:"name"`
Version string `json:"version"`
SlugPerm string `json:"slug_perm"`
Format string `json:"format"`
SecurityScanStatus string `json:"security_scan_status"`
VulnerabilityScanResultsURL string `json:"vulnerability_scan_results_url"`
HasVulnerabilities bool `json:"has_vulnerabilities"`
MaxSeverity string `json:"max_severity"`
NumVulnerabilities int `json:"num_vulnerabilities"`
}
SecurityScanEvent is the payload emitted to downstream nodes when a package's security scan completes.
type TagPackage ¶ added in v0.27.0
type TagPackage struct{}
func (*TagPackage) Cancel ¶ added in v0.27.0
func (t *TagPackage) Cancel(ctx core.ExecutionContext) error
func (*TagPackage) Cleanup ¶ added in v0.27.0
func (t *TagPackage) Cleanup(ctx core.SetupContext) error
func (*TagPackage) Color ¶ added in v0.27.0
func (t *TagPackage) Color() string
func (*TagPackage) Configuration ¶ added in v0.27.0
func (t *TagPackage) Configuration() []configuration.Field
func (*TagPackage) Description ¶ added in v0.27.0
func (t *TagPackage) Description() string
func (*TagPackage) Documentation ¶ added in v0.27.0
func (t *TagPackage) Documentation() string
func (*TagPackage) ExampleOutput ¶ added in v0.27.0
func (t *TagPackage) ExampleOutput() map[string]any
func (*TagPackage) Execute ¶ added in v0.27.0
func (t *TagPackage) Execute(ctx core.ExecutionContext) error
func (*TagPackage) HandleHook ¶ added in v0.27.0
func (t *TagPackage) HandleHook(ctx core.ActionHookContext) error
func (*TagPackage) HandleWebhook ¶ added in v0.27.0
func (t *TagPackage) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*TagPackage) Hooks ¶ added in v0.27.0
func (t *TagPackage) Hooks() []core.Hook
func (*TagPackage) Icon ¶ added in v0.27.0
func (t *TagPackage) Icon() string
func (*TagPackage) Label ¶ added in v0.27.0
func (t *TagPackage) Label() string
func (*TagPackage) Name ¶ added in v0.27.0
func (t *TagPackage) Name() string
func (*TagPackage) OutputChannels ¶ added in v0.27.0
func (t *TagPackage) OutputChannels(configuration any) []core.OutputChannel
func (*TagPackage) ProcessQueueItem ¶ added in v0.27.0
func (t *TagPackage) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*TagPackage) Setup ¶ added in v0.27.0
func (t *TagPackage) Setup(ctx core.SetupContext) error
type TagPackageSpec ¶ added in v0.27.0
type TagPackageSpec struct {
PackageSpec `mapstructure:",squash"`
Action string `json:"action" mapstructure:"action"`
IsImmutable bool `json:"isImmutable" mapstructure:"isImmutable"`
Tags []string `json:"tags" mapstructure:"tags"`
}
type TrimmedPackage ¶ added in v0.28.0
type TrimmedPackage struct {
Description string `json:"description"`
DisplayName string `json:"display_name"`
Format string `json:"format"`
IsQuarantined bool `json:"is_quarantined"`
License string `json:"license"`
PolicyViolated bool `json:"policy_violated"`
Repository string `json:"repository"`
SecurityScanStatus string `json:"security_scan_status"`
SlugPerm string `json:"slug_perm"`
StageStr string `json:"stage_str"`
StatusStr string `json:"status_str"`
Tags map[string]any `json:"tags"`
}
TrimmedPackage holds the subset of package fields emitted in the list result.
type VulnerabilityPackageRef ¶ added in v0.28.0
type VulnerabilityPackageRef struct {
Identifier string `json:"identifier"`
Name string `json:"name"`
Version string `json:"version"`
URL string `json:"url"`
}
VulnerabilityPackageRef is the package reference embedded in a vulnerability scan result.
type VulnerabilityPolicy ¶ added in v0.28.0
type VulnerabilityPolicy struct {
Name string `json:"name"`
Description string `json:"description"`
MinSeverity string `json:"min_severity"`
PackageQueryString string `json:"package_query_string"`
OnViolationQuarantine bool `json:"on_violation_quarantine"`
AllowUnknownSeverity bool `json:"allow_unknown_severity"`
SlugPerm string `json:"slug_perm"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
VulnerabilityPolicy is an organization-scoped package vulnerability policy.
type VulnerabilityPolicyNodeMetadata ¶ added in v0.28.0
type VulnerabilityPolicyNodeMetadata struct {
OrganizationSlug string `json:"organizationSlug" mapstructure:"organizationSlug"`
OrganizationName string `json:"organizationName" mapstructure:"organizationName"`
PolicyID string `json:"policyId" mapstructure:"policyId"`
PolicyName string `json:"policyName" mapstructure:"policyName"`
}
VulnerabilityPolicyNodeMetadata caches human-readable organization and policy names so the UI can display them without re-fetching on every render.
type VulnerabilityPolicyRequest ¶ added in v0.28.0
type VulnerabilityPolicyRequest struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
MinSeverity string `json:"min_severity,omitempty"`
PackageQueryString string `json:"package_query_string,omitempty"`
OnViolationQuarantine bool `json:"on_violation_quarantine"`
AllowUnknownSeverity bool `json:"allow_unknown_severity"`
}
VulnerabilityPolicyRequest is the create/update body for a vulnerability policy. Only name is required; min_severity defaults to "Critical" at Cloudsmith.
type VulnerabilityScan ¶ added in v0.27.0
type VulnerabilityScan struct {
Identifier string `json:"identifier"`
CreatedAt string `json:"created_at"`
HasVulnerabilities bool `json:"has_vulnerabilities"`
MaxSeverity string `json:"max_severity"`
NumVulnerabilities int `json:"num_vulnerabilities"`
}
VulnerabilityScan is a package's security-scan summary, delivered under context.vulnerability_scan_results on a package.security_scanned webhook.
type VulnerabilityScanResult ¶ added in v0.28.0
type VulnerabilityScanResult struct {
Identifier string `json:"identifier"`
CreatedAt string `json:"created_at"`
Package *VulnerabilityPackageRef `json:"package"`
ScanID *string `json:"scan_id"`
HasVulnerabilities bool `json:"has_vulnerabilities"`
NumVulnerabilities int `json:"num_vulnerabilities"`
MaxSeverity string `json:"max_severity,omitempty"`
}
VulnerabilityScanResult is one entry returned by the /vulnerabilities/ endpoint. Each entry represents a completed scan for a specific package version.
Source Files
¶
- client.go
- cloudsmith.go
- common.go
- create_vulnerability_policy.go
- delete_package.go
- delete_vulnerability_policy.go
- example.go
- get_package.go
- get_package_vulnerabilities.go
- get_repository.go
- get_vulnerability_policy.go
- list_packages.go
- list_resources.go
- on_package_created.go
- on_security_scan_completed.go
- promote_package.go
- quarantine_package.go
- resync_package.go
- scan_package.go
- tag_package.go
- webhook_trigger.go