cloudsmith

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 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 (
	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) 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) 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) 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) 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) 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) ListPackages

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

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

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) ResyncPackage added in v0.27.0

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

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

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

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