action

package
v0.135.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const AttestationResetTriggerCancelled = "cancellation"
View Source
const AttestationResetTriggerFailed = "failure"

Variables

View Source
var AvailableRoles = Roles{
	RoleAdmin,
	RoleOwner,
	RoleViewer,
}
View Source
var ErrAttestationAlreadyExist = errors.New("attestation already initialized")

ErrAttestationAlreadyExist means that there is an attestation in progress

View Source
var ErrAttestationNotInitialized = errors.New("attestation not yet initialized")
View Source
var WorkflowRunStatus = func() map[string]pb.RunStatus {
	res := make(map[string]pb.RunStatus)
	for k, v := range pb.RunStatus_value {
		if k != "RUN_STATUS_UNSPECIFIED" {
			res[strings.Replace(k, "RUN_STATUS_", "", 1)] = pb.RunStatus(v)
		}
	}
	return res
}

WorkflowRunStatus represents the status of a workflow run

Functions

This section is empty.

Types

type APITokenCreate added in v0.55.0

type APITokenCreate struct {
	// contains filtered or unexported fields
}

func NewAPITokenCreate added in v0.55.0

func NewAPITokenCreate(cfg *ActionsOpts) *APITokenCreate

func (*APITokenCreate) Run added in v0.55.0

func (action *APITokenCreate) Run(ctx context.Context, name, description string, expiresIn *time.Duration) (*APITokenItem, error)

type APITokenItem added in v0.55.0

type APITokenItem struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	// JWT is returned only during the creation
	JWT       string     `json:"jwt,omitempty"`
	CreatedAt *time.Time `json:"createdAt"`
	RevokedAt *time.Time `json:"revokedAt,omitempty"`
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`
}

type APITokenList added in v0.55.0

type APITokenList struct {
	// contains filtered or unexported fields
}

func NewAPITokenList added in v0.55.0

func NewAPITokenList(cfg *ActionsOpts) *APITokenList

func (*APITokenList) Run added in v0.55.0

func (action *APITokenList) Run(ctx context.Context, includeRevoked bool) ([]*APITokenItem, error)

type APITokenRevoke added in v0.55.0

type APITokenRevoke struct {
	// contains filtered or unexported fields
}

func NewAPITokenRevoke added in v0.55.0

func NewAPITokenRevoke(cfg *ActionsOpts) *APITokenRevoke

func (*APITokenRevoke) Run added in v0.55.0

func (action *APITokenRevoke) Run(ctx context.Context, name string) error

type ActionsOpts

type ActionsOpts struct {
	CPConnection *grpc.ClientConn
	Logger       zerolog.Logger
}

type Annotation added in v0.15.0

type Annotation struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type ArtifactDownload

type ArtifactDownload struct {
	*ActionsOpts
	// contains filtered or unexported fields
}

func NewArtifactDownload

func NewArtifactDownload(opts *ArtifactDownloadOpts) *ArtifactDownload

func (*ArtifactDownload) Run

func (a *ArtifactDownload) Run(downloadPath, outputFile, digest string) error

type ArtifactDownloadOpts

type ArtifactDownloadOpts struct {
	*ActionsOpts
	ArtifactsCASConn *grpc.ClientConn
	Stdout           io.Writer
}

type ArtifactUpload

type ArtifactUpload struct {
	*ActionsOpts
	// contains filtered or unexported fields
}

func NewArtifactUpload

func NewArtifactUpload(opts *ArtifactUploadOpts) *ArtifactUpload

func (*ArtifactUpload) Run

func (a *ArtifactUpload) Run(filePath string) (*CASArtifact, error)

type ArtifactUploadOpts

type ArtifactUploadOpts struct {
	*ActionsOpts
	ArtifactsCASConn *grpc.ClientConn
}

type AttachedIntegrationAdd added in v0.11.1

type AttachedIntegrationAdd struct {
	// contains filtered or unexported fields
}

Attach a third party integration to a workflow

func NewAttachedIntegrationAdd added in v0.11.1

func NewAttachedIntegrationAdd(cfg *ActionsOpts) *AttachedIntegrationAdd

func (*AttachedIntegrationAdd) Run added in v0.11.1

func (action *AttachedIntegrationAdd) Run(integrationName, workflowName, projectName string, options map[string]any) (*AttachedIntegrationItem, error)

type AttachedIntegrationDelete added in v0.11.1

type AttachedIntegrationDelete struct {
	// contains filtered or unexported fields
}

func NewAttachedIntegrationDelete added in v0.11.1

func NewAttachedIntegrationDelete(cfg *ActionsOpts) *AttachedIntegrationDelete

func (*AttachedIntegrationDelete) Run added in v0.11.1

func (action *AttachedIntegrationDelete) Run(attachmentID string) error

type AttachedIntegrationItem added in v0.11.1

type AttachedIntegrationItem struct {
	ID          string                     `json:"id"`
	CreatedAt   *time.Time                 `json:"createdAt"`
	Config      map[string]interface{}     `json:"config"`
	Integration *RegisteredIntegrationItem `json:"integration"`
	Workflow    *WorkflowItem              `json:"workflow"`
}

type AttachedIntegrationList added in v0.11.1

type AttachedIntegrationList struct {
	// contains filtered or unexported fields
}

func NewAttachedIntegrationList added in v0.11.1

func NewAttachedIntegrationList(cfg *ActionsOpts) *AttachedIntegrationList

func (*AttachedIntegrationList) Run added in v0.11.1

func (action *AttachedIntegrationList) Run(projectName, workflowName string) ([]*AttachedIntegrationItem, error)

type AttestationAdd

type AttestationAdd struct {
	*ActionsOpts
	// contains filtered or unexported fields
}

func NewAttestationAdd

func NewAttestationAdd(cfg *AttestationAddOpts) (*AttestationAdd, error)

func (*AttestationAdd) Run

func (action *AttestationAdd) Run(ctx context.Context, attestationID, materialName, materialValue, materialType string, annotations map[string]string) error

type AttestationAddOpts

type AttestationAddOpts struct {
	*ActionsOpts
	ArtifactsCASConn   *grpc.ClientConn
	CASURI             string
	CASCAPath          string // optional CA certificate for the CAS connection
	ConnectionInsecure bool
	// OCI registry credentials used for CONTAINER_IMAGE material type
	RegistryServer, RegistryUsername, RegistryPassword string
	LocalStatePath                                     string
}

type AttestationInit

type AttestationInit struct {
	*ActionsOpts
	// contains filtered or unexported fields
}

func NewAttestationInit

func NewAttestationInit(cfg *AttestationInitOpts) (*AttestationInit, error)

func (*AttestationInit) Run

type AttestationInitOpts

type AttestationInitOpts struct {
	*ActionsOpts
	DryRun bool
	// Force the initialization and override any existing, in-progress ones.
	// Note that this is only useful when local-based attestation state is configured
	// since it's a protection to make sure you don't override the state by mistake
	Force          bool
	UseRemoteState bool
	LocalStatePath string
}

type AttestationInitRunOpts added in v0.97.5

type AttestationInitRunOpts struct {
	ContractRevision             int
	ProjectName                  string
	ProjectVersion               string
	ProjectVersionMarkAsReleased bool
	WorkflowName                 string
	NewWorkflowContractName      string
}

returns the attestation ID

type AttestationPush

type AttestationPush struct {
	*ActionsOpts
	// contains filtered or unexported fields
}

func NewAttestationPush

func NewAttestationPush(cfg *AttestationPushOpts) (*AttestationPush, error)

func (*AttestationPush) Run

func (action *AttestationPush) Run(ctx context.Context, attestationID string, runtimeAnnotations map[string]string) (*AttestationResult, error)

type AttestationPushOpts

type AttestationPushOpts struct {
	*ActionsOpts
	KeyPath, CLIVersion, CLIDigest, BundlePath string

	SignServerCAPath string
	LocalStatePath   string
}

type AttestationReset

type AttestationReset struct {
	*ActionsOpts
	// contains filtered or unexported fields
}

func NewAttestationReset

func NewAttestationReset(cfg *AttestationResetOpts) (*AttestationReset, error)

func (*AttestationReset) Run

func (action *AttestationReset) Run(ctx context.Context, attestationID, trigger, reason string) error

type AttestationResetOpts

type AttestationResetOpts struct {
	*ActionsOpts
	LocalStatePath string
}

type AttestationResult added in v0.17.0

type AttestationResult struct {
	Digest   string                   `json:"digest"`
	Envelope *dsse.Envelope           `json:"envelope"`
	Status   *AttestationStatusResult `json:"status"`
}

type AttestationResultRunnerContext added in v0.15.0

type AttestationResultRunnerContext struct {
	EnvVars            map[string]string
	JobURL, RunnerType string
}

type AttestationStatus

type AttestationStatus struct {
	*ActionsOpts
	// contains filtered or unexported fields
}

func NewAttestationStatus

func NewAttestationStatus(cfg *AttestationStatusOpts) (*AttestationStatus, error)

func (*AttestationStatus) Run

func (action *AttestationStatus) Run(ctx context.Context, attestationID string) (*AttestationStatusResult, error)

type AttestationStatusOpts

type AttestationStatusOpts struct {
	*ActionsOpts
	UseAttestationRemoteState bool

	LocalStatePath string
	// contains filtered or unexported fields
}

type AttestationStatusResult

type AttestationStatusResult struct {
	AttestationID string                            `json:"attestationID"`
	InitializedAt *time.Time                        `json:"initializedAt"`
	WorkflowMeta  *AttestationStatusWorkflowMeta    `json:"workflowMeta"`
	Materials     []AttestationStatusResultMaterial `json:"materials"`
	EnvVars       map[string]string                 `json:"envVars"`
	RunnerContext *AttestationResultRunnerContext   `json:"runnerContext"`
	DryRun        bool                              `json:"dryRun"`
	Annotations   []*Annotation                     `json:"annotations"`
	IsPushed      bool                              `json:"isPushed"`
}

type AttestationStatusResultMaterial

type AttestationStatusResultMaterial struct {
	*Material
	Set, IsOutput, Required bool
}

type AttestationStatusWorkflowMeta

type AttestationStatusWorkflowMeta struct {
	WorkflowID, Name, Team, Project, ContractRevision, Organization string
	ProjectVersion                                                  *ProjectVersion
}

type AvailableIntegrationDescribe added in v0.11.1

type AvailableIntegrationDescribe struct {
	// contains filtered or unexported fields
}

func NewAvailableIntegrationDescribe added in v0.11.1

func NewAvailableIntegrationDescribe(cfg *ActionsOpts) *AvailableIntegrationDescribe

func (*AvailableIntegrationDescribe) Run added in v0.11.1

type AvailableIntegrationItem added in v0.11.1

type AvailableIntegrationItem struct {
	Name         string      `json:"name"`
	Version      string      `json:"version"`
	Description  string      `json:"description,omitempty"`
	Registration *JSONSchema `json:"registration"`
	Attachment   *JSONSchema `json:"attachment"`
	// Subscribed inputs (material types)
	SubscribedInputs []string `json:"subscribedInputs"`
}

type AvailableIntegrationList added in v0.11.1

type AvailableIntegrationList struct {
	// contains filtered or unexported fields
}

func NewAvailableIntegrationList added in v0.11.1

func NewAvailableIntegrationList(cfg *ActionsOpts) *AvailableIntegrationList

func (*AvailableIntegrationList) Run added in v0.11.1

type CASArtifact

type CASArtifact struct {
	Digest string
	// contains filtered or unexported fields
}

type CASBackendAdd added in v0.14.0

type CASBackendAdd struct {
	// contains filtered or unexported fields
}

func NewCASBackendAdd added in v0.14.0

func NewCASBackendAdd(cfg *ActionsOpts) *CASBackendAdd

func (*CASBackendAdd) Run added in v0.14.0

func (action *CASBackendAdd) Run(opts *NewCASBackendAddOpts) (*CASBackendItem, error)

type CASBackendDelete added in v0.14.0

type CASBackendDelete struct {
	// contains filtered or unexported fields
}

func NewCASBackendDelete added in v0.14.0

func NewCASBackendDelete(cfg *ActionsOpts) *CASBackendDelete

func (*CASBackendDelete) Run added in v0.14.0

func (action *CASBackendDelete) Run(name string) error

type CASBackendItem added in v0.14.0

type CASBackendItem struct {
	ID               string            `json:"id"`
	Name             string            `json:"name"`
	Location         string            `json:"location"`
	Description      string            `json:"description"`
	Provider         string            `json:"provider"`
	Default          bool              `json:"default"`
	Inline           bool              `json:"inline"`
	Limits           *CASBackendLimits `json:"limits"`
	ValidationStatus ValidationStatus  `json:"validationStatus"`

	CreatedAt   *time.Time `json:"createdAt"`
	ValidatedAt *time.Time `json:"validatedAt"`
}

type CASBackendLimits added in v0.14.0

type CASBackendLimits struct {
	// Max number of bytes allowed to be stored in this backend
	MaxBytes int64
}

type CASBackendList added in v0.14.0

type CASBackendList struct {
	// contains filtered or unexported fields
}

func NewCASBackendList added in v0.14.0

func NewCASBackendList(cfg *ActionsOpts) *CASBackendList

func (*CASBackendList) Run added in v0.14.0

func (action *CASBackendList) Run() ([]*CASBackendItem, error)

type CASBackendUpdate added in v0.14.0

type CASBackendUpdate struct {
	// contains filtered or unexported fields
}

func NewCASBackendUpdate added in v0.14.0

func NewCASBackendUpdate(cfg *ActionsOpts) *CASBackendUpdate

func (*CASBackendUpdate) Run added in v0.14.0

type ConfigContextItem

type ConfigContextItem struct {
	CurrentUser       *UserItem
	CurrentMembership *MembershipItem
	CurrentCASBackend *CASBackendItem
}

type ConfigCurrentContext

type ConfigCurrentContext struct {
	// contains filtered or unexported fields
}

func NewConfigCurrentContext

func NewConfigCurrentContext(cfg *ActionsOpts) *ConfigCurrentContext

func (*ConfigCurrentContext) Run

func (action *ConfigCurrentContext) Run() (*ConfigContextItem, error)

type ContractRawBody added in v0.96.0

type ContractRawBody struct {
	Body   string `json:"body"`
	Format string `json:"format"`
}

type DeleteAccount

type DeleteAccount struct {
	*ActionsOpts
}

func NewDeleteAccount

func NewDeleteAccount(cfg *ActionsOpts) *DeleteAccount

func (*DeleteAccount) Run

func (a *DeleteAccount) Run() error

type EnvVar

type EnvVar struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type ErrRunnerContextNotFound

type ErrRunnerContextNotFound struct {
	RunnerType string
}

func (ErrRunnerContextNotFound) Error

func (e ErrRunnerContextNotFound) Error() string

type JSONSchema added in v0.11.1

type JSONSchema struct {
	// Show it as raw string so the json output contains it
	Raw string `json:"schema"`
	// Parsed schema so it can be used for validation or other purposes
	// It's not shown in the json output
	Parsed     *jsonschema.Schema      `json:"-"`
	Properties sdk.SchemaPropertiesMap `json:"-"`
}

type Material

type Material struct {
	Name           string        `json:"name"`
	Value          string        `json:"value"`
	Hash           string        `json:"hash"`
	Tag            string        `json:"tag"`
	Filename       string        `json:"filename"`
	Type           string        `json:"type"`
	Annotations    []*Annotation `json:"annotations,omitempty"`
	UploadedToCAS  bool          `json:"uploadedToCAS,omitempty"`
	EmbeddedInline bool          `json:"embeddedInline,omitempty"`
}

type MembershipDelete added in v0.50.0

type MembershipDelete struct {
	// contains filtered or unexported fields
}

func NewMembershipDelete added in v0.50.0

func NewMembershipDelete(cfg *ActionsOpts) *MembershipDelete

func (*MembershipDelete) Run added in v0.50.0

func (action *MembershipDelete) Run(ctx context.Context, membershipID string) error

type MembershipItem

type MembershipItem struct {
	ID        string     `json:"id"`
	Current   bool       `json:"current"`
	CreatedAt *time.Time `json:"joinedAt"`
	UpdatedAt *time.Time `json:"updatedAt"`
	Org       *OrgItem
	User      *UserItem
	Role      Role `json:"role"`
}

type MembershipLeave added in v0.75.2

type MembershipLeave struct {
	// contains filtered or unexported fields
}

func NewMembershipLeave added in v0.75.2

func NewMembershipLeave(cfg *ActionsOpts) *MembershipLeave

func (*MembershipLeave) Run added in v0.75.2

func (action *MembershipLeave) Run(ctx context.Context, membershipID string) error

type MembershipList

type MembershipList struct {
	// contains filtered or unexported fields
}

func NewMembershipList

func NewMembershipList(cfg *ActionsOpts) *MembershipList

func (*MembershipList) ListMembers added in v0.75.2

func (action *MembershipList) ListMembers(ctx context.Context) ([]*MembershipItem, error)

List members of the current organization

func (*MembershipList) ListOrgs added in v0.75.2

func (action *MembershipList) ListOrgs(ctx context.Context) ([]*MembershipItem, error)

List organizations for the current user

type MembershipSetCurrent

type MembershipSetCurrent struct {
	// contains filtered or unexported fields
}

func NewMembershipSet

func NewMembershipSet(cfg *ActionsOpts) *MembershipSetCurrent

func (*MembershipSetCurrent) Run

type MembershipUpdate added in v0.75.2

type MembershipUpdate struct {
	// contains filtered or unexported fields
}

func NewMembershipUpdate added in v0.75.2

func NewMembershipUpdate(cfg *ActionsOpts) *MembershipUpdate

func (*MembershipUpdate) ChangeRole added in v0.75.2

func (action *MembershipUpdate) ChangeRole(ctx context.Context, membershipID, role string) (*MembershipItem, error)

List organizations for the current user

type NewCASBackendAddOpts added in v0.14.0

type NewCASBackendAddOpts struct {
	Name        string
	Location    string
	Provider    string
	Description string
	Default     bool
	Credentials map[string]any
}

type NewCASBackendUpdateOpts added in v0.14.0

type NewCASBackendUpdateOpts struct {
	Name        string
	Description string
	Default     bool
	Credentials map[string]any
}

type NewWorkflowCreateOpts

type NewWorkflowCreateOpts struct {
	Name, Description, Project, Team, ContractName string
	Public                                         bool
}

type OffsetPagination added in v0.109.0

type OffsetPagination struct {
	Page       int `json:"page"`
	PageSize   int `json:"pageSize"`
	TotalPages int `json:"totalPages"`
	TotalCount int `json:"totalCount"`
}

type OrgCreate added in v0.50.0

type OrgCreate struct {
	// contains filtered or unexported fields
}

func NewOrgCreate added in v0.50.0

func NewOrgCreate(cfg *ActionsOpts) *OrgCreate

func (*OrgCreate) Run added in v0.50.0

func (action *OrgCreate) Run(ctx context.Context, name string) (*OrgItem, error)

type OrgInvitationCreate added in v0.25.0

type OrgInvitationCreate struct {
	// contains filtered or unexported fields
}

func NewOrgInvitationCreate added in v0.25.0

func NewOrgInvitationCreate(cfg *ActionsOpts) *OrgInvitationCreate

func (*OrgInvitationCreate) Run added in v0.25.0

func (action *OrgInvitationCreate) Run(ctx context.Context, receiver, role string) (*OrgInvitationItem, error)

type OrgInvitationItem added in v0.25.0

type OrgInvitationItem struct {
	ID            string     `json:"id"`
	ReceiverEmail string     `json:"receiverEmail"`
	Organization  *OrgItem   `json:"organization"`
	Sender        *UserItem  `json:"sender"`
	Status        string     `json:"status"`
	CreatedAt     *time.Time `json:"createdAt"`
	Role          Role       `json:"role"`
}

type OrgInvitationListSent added in v0.25.0

type OrgInvitationListSent struct {
	// contains filtered or unexported fields
}

func NewOrgInvitationListSent added in v0.25.0

func NewOrgInvitationListSent(cfg *ActionsOpts) *OrgInvitationListSent

func (*OrgInvitationListSent) Run added in v0.25.0

type OrgInvitationRevoke added in v0.25.0

type OrgInvitationRevoke struct {
	// contains filtered or unexported fields
}

func NewOrgInvitationRevoke added in v0.25.0

func NewOrgInvitationRevoke(cfg *ActionsOpts) *OrgInvitationRevoke

func (*OrgInvitationRevoke) Run added in v0.25.0

func (action *OrgInvitationRevoke) Run(ctx context.Context, invitationID string) error

type OrgItem

type OrgItem struct {
	ID, Name  string
	CreatedAt *time.Time
}

type PaginatedWorkflowRunItem

type PaginatedWorkflowRunItem struct {
	Result         []*WorkflowRunItem
	PaginationMeta *PaginationOpts
}

type PaginationOpts

type PaginationOpts struct {
	Limit      int
	NextCursor string
}

type PolicyEvaluation added in v0.96.6

type PolicyEvaluation struct {
	Name            string             `json:"name"`
	MaterialName    string             `json:"material_name,omitempty"`
	Body            string             `json:"body,omitempty"`
	Description     string             `json:"description,omitempty"`
	Annotations     map[string]string  `json:"annotations,omitempty"`
	Violations      []*PolicyViolation `json:"violations,omitempty"`
	PolicyReference *PolicyReference   `json:"policy_reference,omitempty"`
	With            map[string]string  `json:"with,omitempty"`
	Type            string             `json:"type"`
	Skipped         bool               `json:"skipped"`
	SkipReasons     []string           `json:"skip_reasons,omitempty"`
}

type PolicyReference added in v0.96.6

type PolicyReference struct {
	Name   string            `json:"name"`
	Digest map[string]string `json:"digest"`
}

type PolicyViolation added in v0.96.6

type PolicyViolation struct {
	Subject string `json:"subject"`
	Message string `json:"message"`
}

type ProjectVersion added in v0.97.5

type ProjectVersion struct {
	ID             string `json:"id"`
	Version        string `json:"version,omitempty"`
	Prerelease     bool   `json:"prerelease"`
	MarkAsReleased bool   `json:"markAsRelease"`
}

type ReferrerDiscover added in v0.30.0

type ReferrerDiscover struct {
	// contains filtered or unexported fields
}

func NewReferrerDiscoverPrivate added in v0.40.0

func NewReferrerDiscoverPrivate(cfg *ActionsOpts) *ReferrerDiscover

func (*ReferrerDiscover) Run added in v0.30.0

func (action *ReferrerDiscover) Run(ctx context.Context, digest, kind string) (*ReferrerItem, error)

type ReferrerDiscoverPublic added in v0.40.0

type ReferrerDiscoverPublic struct {
	// contains filtered or unexported fields
}

func NewReferrerDiscoverPublicIndex added in v0.40.0

func NewReferrerDiscoverPublicIndex(cfg *ActionsOpts) *ReferrerDiscoverPublic

func (*ReferrerDiscoverPublic) Run added in v0.40.0

func (action *ReferrerDiscoverPublic) Run(ctx context.Context, digest, kind string) (*ReferrerItem, error)

type ReferrerItem added in v0.30.0

type ReferrerItem struct {
	Digest       string            `json:"digest"`
	Kind         string            `json:"kind"`
	Downloadable bool              `json:"downloadable"`
	Public       bool              `json:"public"`
	CreatedAt    *time.Time        `json:"createdAt"`
	References   []*ReferrerItem   `json:"references"`
	Metadata     map[string]string `json:"metadata,omitempty"`
	Annotations  map[string]string `json:"annotations,omitempty"`
}

type RegisteredIntegrationAdd added in v0.11.1

type RegisteredIntegrationAdd struct {
	// contains filtered or unexported fields
}

func NewRegisteredIntegrationAdd added in v0.11.1

func NewRegisteredIntegrationAdd(cfg *ActionsOpts) *RegisteredIntegrationAdd

func (*RegisteredIntegrationAdd) Run added in v0.11.1

func (action *RegisteredIntegrationAdd) Run(pluginID, name, description string, options map[string]any) (*RegisteredIntegrationItem, error)

type RegisteredIntegrationDelete added in v0.11.1

type RegisteredIntegrationDelete struct {
	// contains filtered or unexported fields
}

func NewRegisteredIntegrationDelete added in v0.11.1

func NewRegisteredIntegrationDelete(cfg *ActionsOpts) *RegisteredIntegrationDelete

func (*RegisteredIntegrationDelete) Run added in v0.11.1

func (action *RegisteredIntegrationDelete) Run(name string) error

type RegisteredIntegrationDescribe added in v0.11.1

type RegisteredIntegrationDescribe struct {
	// contains filtered or unexported fields
}

func NewRegisteredIntegrationDescribe added in v0.11.1

func NewRegisteredIntegrationDescribe(cfg *ActionsOpts) *RegisteredIntegrationDescribe

func (*RegisteredIntegrationDescribe) Run added in v0.11.1

type RegisteredIntegrationItem added in v0.11.1

type RegisteredIntegrationItem struct {
	ID string `json:"id"`
	// Registration name used for declarative configuration
	Name string `json:"name"`
	// Integration backend kind, i.e slack, pagerduty, etc
	Kind string `json:"kind"`
	// Integration description for display and differentiation purposes
	Description string                 `json:"description"`
	CreatedAt   *time.Time             `json:"createdAt"`
	Config      map[string]interface{} `json:"config"`
}

type RegisteredIntegrationList added in v0.11.1

type RegisteredIntegrationList struct {
	// contains filtered or unexported fields
}

func NewRegisteredIntegrationList added in v0.11.1

func NewRegisteredIntegrationList(cfg *ActionsOpts) *RegisteredIntegrationList

func (*RegisteredIntegrationList) Run added in v0.11.1

type Role added in v0.75.0

type Role string
const (
	RoleAdmin  Role = "admin"
	RoleOwner  Role = "owner"
	RoleViewer Role = "viewer"
)

type Roles added in v0.75.0

type Roles []Role

func (Roles) String added in v0.75.0

func (roles Roles) String() string

type UserItem added in v0.25.0

type UserItem struct {
	ID, Email string
	CreatedAt *time.Time
}

type ValidationStatus

type ValidationStatus string
const (
	Valid   ValidationStatus = "valid"
	Invalid ValidationStatus = "invalid"
)

type WorkflowContractCreate

type WorkflowContractCreate struct {
	// contains filtered or unexported fields
}

func NewWorkflowContractCreate

func NewWorkflowContractCreate(cfg *ActionsOpts) *WorkflowContractCreate

func (*WorkflowContractCreate) Run

func (action *WorkflowContractCreate) Run(name string, description *string, contractPath string) (*WorkflowContractItem, error)

type WorkflowContractDelete

type WorkflowContractDelete struct {
	// contains filtered or unexported fields
}

func NewWorkflowContractDelete

func NewWorkflowContractDelete(cfg *ActionsOpts) *WorkflowContractDelete

func (*WorkflowContractDelete) Run

func (action *WorkflowContractDelete) Run(name string) error

type WorkflowContractDescribe

type WorkflowContractDescribe struct {
	// contains filtered or unexported fields
}

func NewWorkflowContractDescribe

func NewWorkflowContractDescribe(cfg *ActionsOpts) *WorkflowContractDescribe

func (*WorkflowContractDescribe) Run

type WorkflowContractItem

type WorkflowContractItem struct {
	Name           string         `json:"name"`
	Description    string         `json:"description,omitempty"`
	ID             string         `json:"id"`
	LatestRevision int            `json:"latestRevision,omitempty"`
	CreatedAt      *time.Time     `json:"createdAt"`
	Workflows      []string       `json:"workflows,omitempty"` // TODO: remove this field after all clients are updated
	WorkflowRefs   []*WorkflowRef `json:"workflowRefs,omitempty"`
}

type WorkflowContractList

type WorkflowContractList struct {
	// contains filtered or unexported fields
}

func NewWorkflowContractList

func NewWorkflowContractList(cfg *ActionsOpts) *WorkflowContractList

func (*WorkflowContractList) Run

func (action *WorkflowContractList) Run() ([]*WorkflowContractItem, error)

type WorkflowContractUpdate

type WorkflowContractUpdate struct {
	// contains filtered or unexported fields
}

func NewWorkflowContractUpdate

func NewWorkflowContractUpdate(cfg *ActionsOpts) *WorkflowContractUpdate

func (*WorkflowContractUpdate) Run

func (action *WorkflowContractUpdate) Run(name string, description *string, contractPath string) (*WorkflowContractWithVersionItem, error)

type WorkflowContractVersionItem

type WorkflowContractVersionItem struct {
	ID        string                   `json:"id"`
	Revision  int                      `json:"revision"`
	CreatedAt *time.Time               `json:"createdAt"`
	BodyV1    *schemav1.CraftingSchema `json:"bodyV1"`
	RawBody   *ContractRawBody         `json:"rawBody"`
}

type WorkflowContractWithVersionItem

type WorkflowContractWithVersionItem struct {
	Contract *WorkflowContractItem        `json:"contract"`
	Revision *WorkflowContractVersionItem `json:"revision"`
}

type WorkflowCreate

type WorkflowCreate struct {
	// contains filtered or unexported fields
}

func NewWorkflowCreate

func NewWorkflowCreate(cfg *ActionsOpts) *WorkflowCreate

func (*WorkflowCreate) Run

func (action *WorkflowCreate) Run(opts *NewWorkflowCreateOpts) (*WorkflowItem, error)

type WorkflowDelete

type WorkflowDelete struct {
	// contains filtered or unexported fields
}

func NewWorkflowDelete

func NewWorkflowDelete(cfg *ActionsOpts) *WorkflowDelete

func (*WorkflowDelete) Run

func (action *WorkflowDelete) Run(name, projectName string) error

type WorkflowDescribe added in v0.80.0

type WorkflowDescribe struct {
	// contains filtered or unexported fields
}

func NewWorkflowDescribe added in v0.80.0

func NewWorkflowDescribe(cfg *ActionsOpts) *WorkflowDescribe

func (*WorkflowDescribe) Run added in v0.80.0

func (action *WorkflowDescribe) Run(ctx context.Context, name, projectName string) (*WorkflowItem, error)

type WorkflowItem

type WorkflowItem struct {
	Name                   string           `json:"name"`
	Description            string           `json:"description,omitempty"`
	ID                     string           `json:"id"`
	Team                   string           `json:"team"`
	Project                string           `json:"project,omitempty"`
	CreatedAt              *time.Time       `json:"createdAt"`
	RunsCount              int32            `json:"runsCount"`
	ContractName           string           `json:"contractName,omitempty"`
	ContractRevisionLatest int32            `json:"contractRevisionLatest,omitempty"`
	LastRun                *WorkflowRunItem `json:"lastRun,omitempty"`
	// A public workflow means that any user can
	// - access to all its workflow runs
	// - their attestation and materials
	Public bool `json:"public"`
}

func (*WorkflowItem) NamespacedName

func (wi *WorkflowItem) NamespacedName() string

NamespacedName returns the project and workflow name in a formatted string

type WorkflowList

type WorkflowList struct {
	// contains filtered or unexported fields
}

func NewWorkflowList

func NewWorkflowList(cfg *ActionsOpts) *WorkflowList

NewWorkflowList creates a new instance of WorkflowList

func (*WorkflowList) Run

func (action *WorkflowList) Run(page int, pageSize int) (*WorkflowListResult, error)

Run executes the workflow list action

type WorkflowListResult added in v0.109.0

type WorkflowListResult struct {
	Workflows  []*WorkflowItem   `json:"workflows"`
	Pagination *OffsetPagination `json:"pagination"`
}

WorkflowListResult holds the output of the workflow list action

type WorkflowRef added in v0.96.19

type WorkflowRef struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	ProjectName string `json:"projectName"`
}

type WorkflowRunAttestationItem

type WorkflowRunAttestationItem struct {
	Envelope *dsse.Envelope `json:"envelope"`

	Materials   []*Material   `json:"materials,omitempty"`
	EnvVars     []*EnvVar     `json:"envvars,omitempty"`
	Annotations []*Annotation `json:"annotations,omitempty"`
	// Digest in CAS backend
	Digest string `json:"digest"`
	// Policy violations
	PolicyEvaluations map[string][]*PolicyEvaluation `json:"policy_evaluations,omitempty"`
	// contains filtered or unexported fields
}

func (*WorkflowRunAttestationItem) Statement

type WorkflowRunDescribe

type WorkflowRunDescribe struct {
	// contains filtered or unexported fields
}

func NewWorkflowRunDescribe

func NewWorkflowRunDescribe(cfg *ActionsOpts) *WorkflowRunDescribe

func (*WorkflowRunDescribe) Run

type WorkflowRunDescribeOpts added in v0.92.0

type WorkflowRunDescribeOpts struct {
	RunID, Digest           string
	Verify                  bool
	PublicKeyRef            string
	CertPath, CertChainPath string
}

type WorkflowRunItem

type WorkflowRunItem struct {
	ID                     string                       `json:"id"`
	State                  string                       `json:"state"`
	Reason                 string                       `json:"reason,omitempty"`
	CreatedAt              *time.Time                   `json:"createdAt,omitempty"`
	FinishedAt             *time.Time                   `json:"finishedAt,omitempty"`
	Workflow               *WorkflowItem                `json:"workflow,omitempty"`
	RunURL                 string                       `json:"runURL,omitempty"`
	RunnerType             string                       `json:"runnerType,omitempty"`
	ContractVersion        *WorkflowContractVersionItem `json:"contractVersion,omitempty"`
	ContractRevisionUsed   int                          `json:"contractRevisionUsed"`
	ContractRevisionLatest int                          `json:"contractRevisionLatest"`
	ProjectVersion         *ProjectVersion              `json:"projectVersion,omitempty"`
}

type WorkflowRunItemFull

type WorkflowRunItemFull struct {
	WorkflowRun *WorkflowRunItem            `json:"workflowRun"`
	Workflow    *WorkflowItem               `json:"workflow"`
	Attestation *WorkflowRunAttestationItem `json:"attestation,omitempty"`
	Verified    bool                        `json:"verified"`
}

type WorkflowRunList

type WorkflowRunList struct {
	// contains filtered or unexported fields
}

func NewWorkflowRunList

func NewWorkflowRunList(cfg *ActionsOpts) *WorkflowRunList

func (*WorkflowRunList) Run

type WorkflowRunListOpts

type WorkflowRunListOpts struct {
	WorkflowName, ProjectName string
	Pagination                *PaginationOpts
	Status                    string
}

type WorkflowUpdate added in v0.40.0

type WorkflowUpdate struct {
	// contains filtered or unexported fields
}

func NewWorkflowUpdate added in v0.40.0

func NewWorkflowUpdate(cfg *ActionsOpts) *WorkflowUpdate

func (*WorkflowUpdate) Run added in v0.40.0

func (action *WorkflowUpdate) Run(ctx context.Context, name, project string, opts *WorkflowUpdateOpts) (*WorkflowItem, error)

type WorkflowUpdateOpts added in v0.91.1

type WorkflowUpdateOpts struct {
	Description, Team, ContractName *string
	Public                          *bool
}

Jump to

Keyboard shortcuts

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