Help us shape the future of Go! Take the 2026 Go Developer Survey

action

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

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

Variables

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

Functions

This section is empty.

Types

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, digest string) error

type ArtifactDownloadOpts

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

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(integrationID, workflowID 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

type AttestationAdd

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

func NewAttestationAdd

func NewAttestationAdd(cfg *AttestationAddOpts) *AttestationAdd

func (*AttestationAdd) Run

func (action *AttestationAdd) Run(k, v string, annotations map[string]string) error

type AttestationAddOpts

type AttestationAddOpts struct {
	*ActionsOpts
	ArtifactsCASConn   *grpc.ClientConn
	CASURI             string
	ConnectionInsecure bool
}

type AttestationInit

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

func NewAttestationInit

func NewAttestationInit(cfg *AttestationInitOpts) *AttestationInit

func (*AttestationInit) Run

func (action *AttestationInit) Run(contractRevision int) error

type AttestationInitOpts

type AttestationInitOpts struct {
	*ActionsOpts
	Override, DryRun bool
}

type AttestationPush

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

func NewAttestationPush

func NewAttestationPush(cfg *AttestationPushOpts) *AttestationPush

func (*AttestationPush) Run

func (action *AttestationPush) Run(runtimeAnnotations map[string]string) (interface{}, error)

TODO: Return defined type

type AttestationPushOpts

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

type AttestationReset

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

func NewAttestationReset

func NewAttestationReset(opts *ActionsOpts) *AttestationReset

func (*AttestationReset) Run

func (action *AttestationReset) Run(trigger, reason string) error

type AttestationResetOpts

type AttestationResetOpts struct {
	*ActionsOpts
}

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

func (*AttestationStatus) Run

type AttestationStatusOpts

type AttestationStatusOpts struct {
	*ActionsOpts
}

type AttestationStatusResult

type AttestationStatusResult struct {
	InitializedAt *time.Time
	WorkflowMeta  *AttestationStatusWorkflowMeta
	Materials     []AttestationStatusResultMaterial
	EnvVars       map[string]string
	RunnerContext *AttestationResultRunnerContext
	DryRun        bool
	Annotations   []*Annotation
}

type AttestationStatusResultMaterial

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

type AttestationStatusWorkflowMeta

type AttestationStatusWorkflowMeta struct {
	RunID, WorkflowID, Name, Team, Project, ContractRevision string
}

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 {
	ID           string      `json:"id"`
	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(id string) error

type CASBackendItem added in v0.14.0

type CASBackendItem struct {
	ID               string            `json:"id"`
	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       *ConfigContextItemUser
	CurrentOrg        *OrgItem
	CurrentCASBackend *CASBackendItem
}

type ConfigContextItemUser

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

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 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"`
	// filename, container image name, string value, ...
	Value       string        `json:"value"`
	Hash        string        `json:"hash"`
	Type        string        `json:"type"`
	Annotations []*Annotation `json:"annotations,omitempty"`
}

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
}

type MembershipList

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

func NewMembershipList

func NewMembershipList(cfg *ActionsOpts) *MembershipList

func (*MembershipList) Run

func (action *MembershipList) Run() ([]*MembershipItem, error)

type MembershipSetCurrent

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

func NewMembershipSet

func NewMembershipSet(cfg *ActionsOpts) *MembershipSetCurrent

func (*MembershipSetCurrent) Run

func (action *MembershipSetCurrent) Run(id string) (*MembershipItem, error)

type NewCASBackendAddOpts added in v0.14.0

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

type NewCASBackendUpdateOpts added in v0.14.0

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

type NewWorkflowCreateOpts

type NewWorkflowCreateOpts struct {
	Name, Project, Team, ContractID string
}

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 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, 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(id 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"`
	// Integration backend kind, i.e slack, pagerduty, etc
	Kind string `json:"name"`
	// 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 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, 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(contractID 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"`
	ID             string     `json:"id"`
	LatestRevision int        `json:"latestRevision,omitempty"`
	CreatedAt      *time.Time `json:"createdAt"`
	WorkflowIDs    []string   `json:"workflowIDs,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(contractID, name, 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"`
}

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(workflowID string) error

type WorkflowItem

type WorkflowItem struct {
	Name       string           `json:"name"`
	ID         string           `json:"id"`
	Team       string           `json:"team"`
	Project    string           `json:"project,omitempty"`
	CreatedAt  *time.Time       `json:"createdAt"`
	RunsCount  int32            `json:"runsCount"`
	ContractID string           `json:"contractID,omitempty"`
	LastRun    *WorkflowRunItem `json:"lastRun,omitempty"`
}

func (*WorkflowItem) NamespacedName

func (wi *WorkflowItem) NamespacedName() string

type WorkflowItemWithRobotAccount added in v0.14.0

type WorkflowItemWithRobotAccount struct {
	*WorkflowItem
	RobotAccountID  string `json:"robotAccountID,omitempty"`
	RobotAccountKey string `json:"robotAccountKey,omitempty"`
}

type WorkflowList

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

func NewWorkflowList

func NewWorkflowList(cfg *ActionsOpts) *WorkflowList

func (*WorkflowList) Run

func (action *WorkflowList) Run() ([]*WorkflowItem, error)

type WorkflowRobotAccountCreate

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

func NewWorkflowRobotAccountCreate

func NewWorkflowRobotAccountCreate(cfg *ActionsOpts) *WorkflowRobotAccountCreate

func (*WorkflowRobotAccountCreate) Run

func (action *WorkflowRobotAccountCreate) Run(workflowID, name string) (*WorkflowRobotAccountItem, error)

type WorkflowRobotAccountItem

type WorkflowRobotAccountItem struct {
	Name       string `json:"name"`
	ID         string `json:"id"`
	WorkflowID string `json:"workflowID"`
	// Key is returned only during the creation
	Key       string     `json:"key,omitempty"`
	CreatedAt *time.Time `json:"createdAt"`
	RevokedAt *time.Time `json:"revokedAt,omitempty"`
}

type WorkflowRobotAccountList

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

func NewWorkflowRobotAccountList

func NewWorkflowRobotAccountList(cfg *ActionsOpts) *WorkflowRobotAccountList

func (*WorkflowRobotAccountList) Run

func (action *WorkflowRobotAccountList) Run(workflowID string, includeRevoked bool) ([]*WorkflowRobotAccountItem, error)

type WorkflowRobotAccountRevoke

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

func NewWorkflowRobotAccountRevoke

func NewWorkflowRobotAccountRevoke(cfg *ActionsOpts) *WorkflowRobotAccountRevoke

func (*WorkflowRobotAccountRevoke) Run

func (action *WorkflowRobotAccountRevoke) Run(accountID string) error

type WorkflowRunAttestationItem

type WorkflowRunAttestationItem struct {
	ID        string         `json:"id"`
	CreatedAt *time.Time     `json:"createdAt"`
	Envelope  *dsse.Envelope `json:"envelope"`

	Materials []*Material `json:"materials,omitempty"`
	EnvVars   []*EnvVar   `json:"envvars,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

func (action *WorkflowRunDescribe) Run(runID string, verify bool, publicKey string) (*WorkflowRunItemFull, error)

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"`
}

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 {
	WorkflowID string
	Pagination *PaginationOpts
}

Jump to

Keyboard shortcuts

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