cloudsmith

package
v0.28.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PackageResyncedPayloadType = "cloudsmith.package.resynced"
	PackageTaggedPayloadType   = "cloudsmith.package.tagged"
	PackageDeletedPayloadType  = "cloudsmith.package.deleted"
)
View Source
const (
	SeverityLow      = "Low"
	SeverityMedium   = "Medium"
	SeverityHigh     = "High"
	SeverityCritical = "Critical"
)
View Source
const (
	PromoteModeMove = "move"
	PromoteModeCopy = "copy"
)
View Source
const (
	QuarantineActionQuarantine = "Quarantine"
	QuarantineActionRelease    = "Release"
)
View Source
const (
	TagActionAdd     = "Add"
	TagActionClear   = "Clear"
	TagActionReplace = "Replace"
	TagActionRemove  = "Remove"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	StatusCode int
	Body       []byte
}

func (*APIError) Error

func (e *APIError) Error() string

type Client

type Client struct {
	APIKey string

	BaseURL string
	// contains filtered or unexported fields
}

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

func (c *Client) CopyPackage(owner, repo, identifier, destinationRepo string) (*Package, error)

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 (c *Client) DeletePackage(owner, repository, identifier string) error

func (*Client) DeleteVulnerabilityPolicy added in v0.28.0

func (c *Client) DeleteVulnerabilityPolicy(org, slugPerm string) error

DeleteVulnerabilityPolicy removes a vulnerability policy by its permanent slug.

func (*Client) DeleteWebhook added in v0.27.0

func (c *Client) DeleteWebhook(owner, repository, slugPerm string) error

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

func (c *Client) GetPackage(owner, repo, identifier string) (*Package, error)

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) GetSelf

func (c *Client) GetSelf() (*User, error)

GetSelf validates the API key by fetching the authenticated user.

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

func (c *Client) GetWebhook(owner, repository, slugPerm string) (*Webhook, error)

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

func (c *Client) ListPackages(owner, repo string) ([]Package, error)

ListPackages returns all packages in the given repository, following pagination.

func (*Client) ListPackagesWithFilters added in v0.28.0

func (c *Client) ListPackagesWithFilters(owner, repo, query string) ([]Package, error)

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

func (c *Client) MovePackage(owner, repo, identifier, destinationRepo string) (*Package, error)

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

func (c *Client) QuarantinePackage(owner, repo, identifier string, release bool) (*Package, error)

QuarantinePackage quarantines or releases a package. Set release=true to release a previously quarantined package.

func (*Client) ResyncPackage added in v0.27.0

func (c *Client) ResyncPackage(owner, repository, identifier string) (*Package, error)

func (*Client) ScanPackage added in v0.28.0

func (c *Client) ScanPackage(owner, repo, identifier string) error

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 (*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 (*CreateVulnerabilityPolicy) Cleanup added in v0.28.0

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 (*CreateVulnerabilityPolicy) HandleHook added in v0.28.0

func (*CreateVulnerabilityPolicy) HandleWebhook added in v0.28.0

func (*CreateVulnerabilityPolicy) Hooks added in v0.28.0

func (c *CreateVulnerabilityPolicy) Hooks() []core.Hook

func (*CreateVulnerabilityPolicy) Icon added in v0.28.0

func (*CreateVulnerabilityPolicy) Label added in v0.28.0

func (c *CreateVulnerabilityPolicy) Label() string

func (*CreateVulnerabilityPolicy) Name added in v0.28.0

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

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 (*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 (*DeleteVulnerabilityPolicy) Cleanup added in v0.28.0

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 (*DeleteVulnerabilityPolicy) HandleHook added in v0.28.0

func (*DeleteVulnerabilityPolicy) HandleWebhook added in v0.28.0

func (*DeleteVulnerabilityPolicy) Hooks added in v0.28.0

func (d *DeleteVulnerabilityPolicy) Hooks() []core.Hook

func (*DeleteVulnerabilityPolicy) Icon added in v0.28.0

func (*DeleteVulnerabilityPolicy) Label added in v0.28.0

func (d *DeleteVulnerabilityPolicy) Label() string

func (*DeleteVulnerabilityPolicy) Name added in v0.28.0

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

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 DeleteVulnerabilityPolicySpec struct {
	Organization string `json:"organization" mapstructure:"organization"`
	Policy       string `json:"policy" mapstructure:"policy"`
}

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 (*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 GetPackageSpec struct {
	Repository string `json:"repository" mapstructure:"repository"`
	Package    string `json:"package" mapstructure:"package"`
}

type GetPackageVulnerabilities added in v0.28.0

type GetPackageVulnerabilities struct{}

func (*GetPackageVulnerabilities) Cancel added in v0.28.0

func (*GetPackageVulnerabilities) Cleanup added in v0.28.0

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 (*GetPackageVulnerabilities) HandleHook added in v0.28.0

func (*GetPackageVulnerabilities) HandleWebhook added in v0.28.0

func (*GetPackageVulnerabilities) Hooks added in v0.28.0

func (g *GetPackageVulnerabilities) Hooks() []core.Hook

func (*GetPackageVulnerabilities) Icon added in v0.28.0

func (*GetPackageVulnerabilities) Label added in v0.28.0

func (g *GetPackageVulnerabilities) Label() string

func (*GetPackageVulnerabilities) Name added in v0.28.0

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

type GetPackageVulnerabilitiesSpec added in v0.28.0

type GetPackageVulnerabilitiesSpec struct {
	Repository string `json:"repository" mapstructure:"repository"`
	Package    string `json:"package" mapstructure:"package"`
}

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 (*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 (*GetVulnerabilityPolicy) Cleanup added in v0.28.0

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 (*GetVulnerabilityPolicy) HandleHook added in v0.28.0

func (*GetVulnerabilityPolicy) HandleWebhook added in v0.28.0

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

type GetVulnerabilityPolicySpec added in v0.28.0

type GetVulnerabilityPolicySpec struct {
	Organization string `json:"organization" mapstructure:"organization"`
	Policy       string `json:"policy" mapstructure:"policy"`
}

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 (*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 Metadata

type Metadata struct {
	UserSlug  string `json:"userSlug"`
	UserName  string `json:"userName"`
	UserEmail string `json:"userEmail"`
}

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 (*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 (*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 (*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

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 PackageResult struct {
	Repository string   `json:"repository"`
	Package    string   `json:"package"`
	Data       *Package `json:"data,omitempty"`
}

type PackageSpec added in v0.27.0

type PackageSpec struct {
	Repository string `json:"repository" mapstructure:"repository"`
	Package    string `json:"package" mapstructure:"package"`
}

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 (*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 (*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 (*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 QuarantinePackageSpec struct {
	Repository string `json:"repository" mapstructure:"repository"`
	Package    string `json:"package" mapstructure:"package"`
	Action     string `json:"action" mapstructure:"action"`
}

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 (*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 (*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 ScanPackageResult struct {
	Repository string `json:"repository"`
	Package    string `json:"package"`
}

type ScanPackageSpec added in v0.28.0

type ScanPackageSpec struct {
	Repository string `json:"repository" mapstructure:"repository"`
	Package    string `json:"package" mapstructure:"package"`
}

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 (*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 User

type User struct {
	Authenticated bool   `json:"authenticated"`
	Email         string `json:"email"`
	Name          string `json:"name"`
	Slug          string `json:"slug"`
}

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.

type Webhook added in v0.27.0

type Webhook struct {
	SlugPerm  string   `json:"slug_perm"`
	TargetURL string   `json:"target_url"`
	Events    []string `json:"events"`
	IsActive  bool     `json:"is_active"`
}

Webhook is the subset of a Cloudsmith webhook this integration manages.

Jump to

Keyboard shortcuts

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