 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func LoadFileOrURL(fileRef string) ([]byte, error)
- func ValidateAndExtractName(explicitName, filePath string) (string, error)
- func WithSkipPolicyEvaluation() func(*AttestationStatus)
- type APITokenCreate
- type APITokenItem
- type APITokenList
- type APITokenRevoke
- type ActionsOpts
- type Annotation
- type ArtifactDownload
- type ArtifactDownloadOpts
- type ArtifactUpload
- type ArtifactUploadOpts
- type AttachedIntegrationAdd
- type AttachedIntegrationDelete
- type AttachedIntegrationItem
- type AttachedIntegrationList
- type AttestationAdd
- type AttestationAddOpts
- type AttestationInit
- type AttestationInitOpts
- type AttestationInitRunOpts
- type AttestationPush
- type AttestationPushOpts
- type AttestationReset
- type AttestationResetOpts
- type AttestationResult
- type AttestationResultRunnerContext
- type AttestationStatus
- type AttestationStatusMaterial
- type AttestationStatusOpt
- type AttestationStatusOpts
- type AttestationStatusResult
- type AttestationStatusWorkflowMeta
- type AttestationVerifyAction
- type AvailableIntegrationDescribe
- type AvailableIntegrationItem
- type AvailableIntegrationList
- type CASArtifact
- type CASBackendAdd
- type CASBackendDelete
- type CASBackendItem
- type CASBackendLimits
- type CASBackendList
- type CASBackendUpdate
- type ConfigContextItem
- type ConfigCurrentContext
- type ContractRawBody
- type DeleteAccount
- type EnvVar
- type ErrRunnerContextNotFound
- type JSONSchema
- type ListMembersOpts
- type ListMembershipResult
- type Material
- type MembershipDelete
- type MembershipItem
- type MembershipLeave
- type MembershipList
- type MembershipSetCurrent
- type MembershipUpdate
- type NewCASBackendAddOpts
- type NewCASBackendUpdateOpts
- type NewOrgUpdateOpts
- type NewWorkflowCreateOpts
- type OffsetPagination
- type OrgCreate
- type OrgInvitationCreate
- type OrgInvitationItem
- type OrgInvitationListSent
- type OrgInvitationRevoke
- type OrgItem
- type OrgUpdate
- type OrganizationDelete
- type PaginatedWorkflowRunItem
- type PaginationOpts
- type PluginDescribe
- type PluginDescribeResult
- type PluginExec
- type PluginExecResult
- type PluginInstall
- type PluginInstallOptions
- type PluginInstallResult
- type PluginList
- type PluginListResult
- type PolicyEval
- type PolicyEvalOpts
- type PolicyEvaluation
- type PolicyEvaluationStatus
- type PolicyInit
- type PolicyInitOpts
- type PolicyLint
- type PolicyLintOpts
- type PolicyLintResult
- type PolicyReference
- type PolicyViolation
- type ProjectVersion
- type ReferrerDiscover
- type ReferrerDiscoverPublic
- type ReferrerItem
- type RegisteredIntegrationAdd
- type RegisteredIntegrationDelete
- type RegisteredIntegrationDescribe
- type RegisteredIntegrationItem
- type RegisteredIntegrationList
- type Role
- type Roles
- type ScopedEntity
- type SignServerOpts
- type UserItem
- type ValidationStatus
- type WorkflowContractApply
- type WorkflowContractCreate
- type WorkflowContractDelete
- type WorkflowContractDescribe
- type WorkflowContractItem
- type WorkflowContractList
- type WorkflowContractUpdate
- type WorkflowContractVersionItem
- type WorkflowContractWithVersionItem
- type WorkflowCreate
- type WorkflowDelete
- type WorkflowDescribe
- type WorkflowItem
- type WorkflowList
- type WorkflowListResult
- type WorkflowRef
- type WorkflowRunAttestationItem
- type WorkflowRunDescribe
- type WorkflowRunDescribeOpts
- type WorkflowRunItem
- type WorkflowRunItemFull
- type WorkflowRunList
- type WorkflowRunListOpts
- type WorkflowUpdate
- type WorkflowUpdateOpts
Constants ¶
const ( PolicyViolationBlockingStrategyEnforced = "ENFORCED" PolicyViolationBlockingStrategyAdvisory = "ADVISORY" )
const AttestationResetTriggerCancelled = "cancellation"
    const AttestationResetTriggerFailed = "failure"
    Variables ¶
var AvailableRoles = Roles{ RoleAdmin, RoleOwner, RoleViewer, RoleMember, RoleContributor, }
var ErrAttestationAlreadyExist = errors.New("attestation already initialized")
    ErrAttestationAlreadyExist means that there is an attestation in progress
var ErrAttestationNotInitialized = errors.New("attestation not yet initialized")
    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 ¶
func LoadFileOrURL ¶
LoadFileOrURL loads a file from a local path or a URL
func ValidateAndExtractName ¶ added in v1.50.0
ValidateAndExtractName validates and extracts a name from either an explicit name parameter OR from metadata.name in the file content. Ensures exactly one source is provided. Returns error when: - Neither explicit name nor metadata.name is provided - Both explicit name and metadata.name are provided (ambiguous)
func WithSkipPolicyEvaluation ¶
func WithSkipPolicyEvaluation() func(*AttestationStatus)
Types ¶
type APITokenCreate ¶
type APITokenCreate struct {
	// contains filtered or unexported fields
}
    func NewAPITokenCreate ¶
func NewAPITokenCreate(cfg *ActionsOpts) *APITokenCreate
func (*APITokenCreate) Run ¶
func (action *APITokenCreate) Run(ctx context.Context, name, description, projectName string, expiresIn *time.Duration) (*APITokenItem, error)
type APITokenItem ¶
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"`
	LastUsedAt   *time.Time    `json:"lastUsedAt,omitempty"`
	ScopedEntity *ScopedEntity `json:"scopedEntity,omitempty"`
}
    type APITokenList ¶
type APITokenList struct {
	// contains filtered or unexported fields
}
    func NewAPITokenList ¶
func NewAPITokenList(cfg *ActionsOpts) *APITokenList
func (*APITokenList) Run ¶
func (action *APITokenList) Run(ctx context.Context, includeRevoked bool, project string, scope string) ([]*APITokenItem, error)
type APITokenRevoke ¶
type APITokenRevoke struct {
	// contains filtered or unexported fields
}
    func NewAPITokenRevoke ¶
func NewAPITokenRevoke(cfg *ActionsOpts) *APITokenRevoke
type ActionsOpts ¶
type Annotation ¶
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 ¶
type AttachedIntegrationAdd struct {
	// contains filtered or unexported fields
}
    Attach a third party integration to a workflow
func NewAttachedIntegrationAdd ¶
func NewAttachedIntegrationAdd(cfg *ActionsOpts) *AttachedIntegrationAdd
func (*AttachedIntegrationAdd) Run ¶
func (action *AttachedIntegrationAdd) Run(integrationName, workflowName, projectName string, options map[string]any) (*AttachedIntegrationItem, error)
type AttachedIntegrationDelete ¶
type AttachedIntegrationDelete struct {
	// contains filtered or unexported fields
}
    func NewAttachedIntegrationDelete ¶
func NewAttachedIntegrationDelete(cfg *ActionsOpts) *AttachedIntegrationDelete
func (*AttachedIntegrationDelete) Run ¶
func (action *AttachedIntegrationDelete) Run(attachmentID string) error
type AttachedIntegrationItem ¶
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 ¶
type AttachedIntegrationList struct {
	// contains filtered or unexported fields
}
    func NewAttachedIntegrationList ¶
func NewAttachedIntegrationList(cfg *ActionsOpts) *AttachedIntegrationList
func (*AttachedIntegrationList) Run ¶
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) GetPolicyEvaluations ¶
func (action *AttestationAdd) GetPolicyEvaluations(ctx context.Context, attestationID string) (map[string][]*PolicyEvaluation, error)
GetPolicyEvaluations is a Wrapper around the getPolicyEvaluations
func (*AttestationAdd) Run ¶
func (action *AttestationAdd) Run(ctx context.Context, attestationID, materialName, materialValue, materialType string, annotations map[string]string) (*AttestationStatusMaterial, 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 ¶
func (action *AttestationInit) Run(ctx context.Context, opts *AttestationInitRunOpts) (string, error)
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 ¶
type AttestationInitRunOpts struct {
	ContractRevision             int
	ProjectName                  string
	ProjectVersion               string
	ProjectVersionMarkAsReleased bool
	WorkflowName                 string
	NewWorkflowContractRef       string
}
    returns the attestation ID
type AttestationPush ¶
type AttestationPush struct {
	*ActionsOpts
	// contains filtered or unexported fields
}
    func NewAttestationPush ¶
func NewAttestationPush(cfg *AttestationPushOpts) (*AttestationPush, error)
type AttestationPushOpts ¶
type AttestationPushOpts struct {
	*ActionsOpts
	KeyPath, CLIVersion, CLIDigest, BundlePath string
	LocalStatePath string
	SignServerOpts *SignServerOpts
}
    type AttestationReset ¶
type AttestationReset struct {
	*ActionsOpts
	// contains filtered or unexported fields
}
    func NewAttestationReset ¶
func NewAttestationReset(cfg *AttestationResetOpts) (*AttestationReset, error)
type AttestationResetOpts ¶
type AttestationResetOpts struct {
	*ActionsOpts
	LocalStatePath string
}
    type AttestationResult ¶
type AttestationResult struct {
	Digest   string                   `json:"digest"`
	Envelope *dsse.Envelope           `json:"envelope"`
	Status   *AttestationStatusResult `json:"status"`
}
    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, opts ...AttestationStatusOpt) (*AttestationStatusResult, error)
type AttestationStatusOpt ¶
type AttestationStatusOpt func(*AttestationStatus)
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                   []AttestationStatusMaterial     `json:"materials"`
	EnvVars                     map[string]string               `json:"envVars"`
	RunnerContext               *AttestationResultRunnerContext `json:"runnerContext"`
	DryRun                      bool                            `json:"dryRun"`
	Annotations                 []*Annotation                   `json:"annotations"`
	IsPushed                    bool                            `json:"isPushed"`
	PolicyEvaluations           map[string][]*PolicyEvaluation  `json:"policy_evaluations,omitempty"`
	HasPolicyViolations         bool                            `json:"has_policy_violations"`
	MustBlockOnPolicyViolations bool                            `json:"must_block_on_policy_violations"`
	TimestampAuthority          string                          `json:"timestamp_authority"`
	// This might only be set if the attestation is pushed
	Digest string `json:"digest"`
	// This is the human readable output of the attestation status
	TerminalOutput []byte `json:"terminal_output"`
}
    type AttestationStatusWorkflowMeta ¶
type AttestationStatusWorkflowMeta struct {
	WorkflowID, Name, Team, Project, ContractRevision, ContractName, Organization string
	ProjectVersion                                                                *ProjectVersion
}
    type AttestationVerifyAction ¶
type AttestationVerifyAction struct {
	// contains filtered or unexported fields
}
    func NewAttestationVerifyAction ¶
func NewAttestationVerifyAction(cfg *ActionsOpts) *AttestationVerifyAction
type AvailableIntegrationDescribe ¶
type AvailableIntegrationDescribe struct {
	// contains filtered or unexported fields
}
    func NewAvailableIntegrationDescribe ¶
func NewAvailableIntegrationDescribe(cfg *ActionsOpts) *AvailableIntegrationDescribe
func (*AvailableIntegrationDescribe) Run ¶
func (action *AvailableIntegrationDescribe) Run(name string) (*AvailableIntegrationItem, error)
type AvailableIntegrationItem ¶
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 ¶
type AvailableIntegrationList struct {
	// contains filtered or unexported fields
}
    func NewAvailableIntegrationList ¶
func NewAvailableIntegrationList(cfg *ActionsOpts) *AvailableIntegrationList
func (*AvailableIntegrationList) Run ¶
func (action *AvailableIntegrationList) Run() ([]*AvailableIntegrationItem, error)
type CASArtifact ¶
type CASArtifact struct {
	Digest string
	// contains filtered or unexported fields
}
    type CASBackendAdd ¶
type CASBackendAdd struct {
	// contains filtered or unexported fields
}
    func NewCASBackendAdd ¶
func NewCASBackendAdd(cfg *ActionsOpts) *CASBackendAdd
func (*CASBackendAdd) Run ¶
func (action *CASBackendAdd) Run(opts *NewCASBackendAddOpts) (*CASBackendItem, error)
type CASBackendDelete ¶
type CASBackendDelete struct {
	// contains filtered or unexported fields
}
    func NewCASBackendDelete ¶
func NewCASBackendDelete(cfg *ActionsOpts) *CASBackendDelete
func (*CASBackendDelete) Run ¶
func (action *CASBackendDelete) Run(name string) error
type CASBackendItem ¶
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"`
	ValidationError  *string           `json:"validationError,omitempty"`
	CreatedAt   *time.Time `json:"createdAt"`
	ValidatedAt *time.Time `json:"validatedAt"`
}
    type CASBackendLimits ¶
type CASBackendLimits struct {
	// Max number of bytes allowed to be stored in this backend
	MaxBytes int64
}
    type CASBackendList ¶
type CASBackendList struct {
	// contains filtered or unexported fields
}
    func NewCASBackendList ¶
func NewCASBackendList(cfg *ActionsOpts) *CASBackendList
func (*CASBackendList) Run ¶
func (action *CASBackendList) Run() ([]*CASBackendItem, error)
type CASBackendUpdate ¶
type CASBackendUpdate struct {
	// contains filtered or unexported fields
}
    func NewCASBackendUpdate ¶
func NewCASBackendUpdate(cfg *ActionsOpts) *CASBackendUpdate
func (*CASBackendUpdate) Run ¶
func (action *CASBackendUpdate) Run(opts *NewCASBackendUpdateOpts) (*CASBackendItem, error)
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 ¶
type DeleteAccount ¶
type DeleteAccount struct {
	*ActionsOpts
}
    func NewDeleteAccount ¶
func NewDeleteAccount(cfg *ActionsOpts) *DeleteAccount
func (*DeleteAccount) Run ¶
func (a *DeleteAccount) Run() error
type ErrRunnerContextNotFound ¶
type ErrRunnerContextNotFound struct {
	RunnerType string
}
    func (ErrRunnerContextNotFound) Error ¶
func (e ErrRunnerContextNotFound) Error() string
type JSONSchema ¶
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 ListMembersOpts ¶
type ListMembersOpts struct {
	// MembershipID Optional, if provided, filters by a specific membership ID
	MembershipID *string
	// Name is the name of the user to filter by
	Name *string
	// Email is the email of the user to filter by
	Email *string
	// Role is the role of the user to filter by
	Role *string
}
    type ListMembershipResult ¶
type ListMembershipResult struct {
	Memberships    []*MembershipItem
	PaginationMeta *OffsetPagination
}
    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 ¶
type MembershipDelete struct {
	// contains filtered or unexported fields
}
    func NewMembershipDelete ¶
func NewMembershipDelete(cfg *ActionsOpts) *MembershipDelete
type MembershipItem ¶
type MembershipLeave ¶
type MembershipLeave struct {
	// contains filtered or unexported fields
}
    func NewMembershipLeave ¶
func NewMembershipLeave(cfg *ActionsOpts) *MembershipLeave
type MembershipList ¶
type MembershipList struct {
	// contains filtered or unexported fields
}
    func NewMembershipList ¶
func NewMembershipList(cfg *ActionsOpts) *MembershipList
func (*MembershipList) ListMembers ¶
func (action *MembershipList) ListMembers(ctx context.Context, page int, pageSize int, opts *ListMembersOpts) (*ListMembershipResult, error)
ListMembers lists the members of an organization with pagination and optional filters.
func (*MembershipList) ListOrgs ¶
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 ¶
func (action *MembershipSetCurrent) Run(ctx context.Context, id string) (*MembershipItem, error)
type MembershipUpdate ¶
type MembershipUpdate struct {
	// contains filtered or unexported fields
}
    func NewMembershipUpdate ¶
func NewMembershipUpdate(cfg *ActionsOpts) *MembershipUpdate
func (*MembershipUpdate) ChangeRole ¶
func (action *MembershipUpdate) ChangeRole(ctx context.Context, membershipID, role string) (*MembershipItem, error)
List organizations for the current user
type NewCASBackendAddOpts ¶
type NewCASBackendUpdateOpts ¶
type NewOrgUpdateOpts ¶
type NewWorkflowCreateOpts ¶
type OffsetPagination ¶
type OrgCreate ¶
type OrgCreate struct {
	// contains filtered or unexported fields
}
    func NewOrgCreate ¶
func NewOrgCreate(cfg *ActionsOpts) *OrgCreate
type OrgInvitationCreate ¶
type OrgInvitationCreate struct {
	// contains filtered or unexported fields
}
    func NewOrgInvitationCreate ¶
func NewOrgInvitationCreate(cfg *ActionsOpts) *OrgInvitationCreate
func (*OrgInvitationCreate) Run ¶
func (action *OrgInvitationCreate) Run(ctx context.Context, receiver, role string) (*OrgInvitationItem, error)
type OrgInvitationItem ¶
type OrgInvitationListSent ¶
type OrgInvitationListSent struct {
	// contains filtered or unexported fields
}
    func NewOrgInvitationListSent ¶
func NewOrgInvitationListSent(cfg *ActionsOpts) *OrgInvitationListSent
func (*OrgInvitationListSent) Run ¶
func (action *OrgInvitationListSent) Run(ctx context.Context) ([]*OrgInvitationItem, error)
type OrgInvitationRevoke ¶
type OrgInvitationRevoke struct {
	// contains filtered or unexported fields
}
    func NewOrgInvitationRevoke ¶
func NewOrgInvitationRevoke(cfg *ActionsOpts) *OrgInvitationRevoke
type OrgUpdate ¶
type OrgUpdate struct {
	// contains filtered or unexported fields
}
    func NewOrgUpdate ¶
func NewOrgUpdate(cfg *ActionsOpts) *OrgUpdate
type OrganizationDelete ¶
type OrganizationDelete struct {
	// contains filtered or unexported fields
}
    func NewOrganizationDelete ¶
func NewOrganizationDelete(cfg *ActionsOpts) *OrganizationDelete
type PaginatedWorkflowRunItem ¶
type PaginatedWorkflowRunItem struct {
	Result         []*WorkflowRunItem
	PaginationMeta *PaginationOpts
}
    type PaginationOpts ¶
type PluginDescribe ¶
type PluginDescribe struct {
	// contains filtered or unexported fields
}
    PluginInfo handles showing detailed information about a specific plugin
func NewPluginDescribe ¶
func NewPluginDescribe(cfg *ActionsOpts, manager *plugins.Manager) *PluginDescribe
NewPluginDescribe creates a new NewPluginDescribe action
func (*PluginDescribe) Run ¶
func (action *PluginDescribe) Run(_ context.Context, pluginName string) (*PluginDescribeResult, error)
Run executes the NewPluginDescribe action
type PluginDescribeResult ¶
type PluginDescribeResult struct {
	Plugin *plugins.LoadedPlugin
}
    PluginDescribeResult represents the result of getting plugin info
type PluginExec ¶
type PluginExec struct {
	// contains filtered or unexported fields
}
    PluginExec handles executing a command provided by a plugin
func NewPluginExec ¶
func NewPluginExec(cfg *ActionsOpts, manager *plugins.Manager) *PluginExec
NewPluginExec creates a new PluginExec action
func (*PluginExec) Run ¶
func (action *PluginExec) Run(ctx context.Context, pluginName string, commandName string, config plugins.PluginExecConfig) (*PluginExecResult, error)
Run executes the PluginExec action
type PluginExecResult ¶
PluginExecResult represents the result of executing a plugin command
type PluginInstall ¶
type PluginInstall struct {
	// contains filtered or unexported fields
}
    PluginInstall handles downloading a plugin
func NewPluginInstall ¶
func NewPluginInstall(cfg *ActionsOpts, manager *plugins.Manager) *PluginInstall
NewPluginInstall creates a new PluginInstall action
func (*PluginInstall) Run ¶
func (action *PluginInstall) Run(_ context.Context, opts *PluginInstallOptions) (*PluginInstallResult, error)
Run executes the PluginInstall action
type PluginInstallOptions ¶
PluginInstallOptions contains all options for installing a plugin
type PluginInstallResult ¶
type PluginInstallResult struct {
	FilePath string
}
    PluginInstallResult represents the result of installing a plugin
type PluginList ¶
type PluginList struct {
	// contains filtered or unexported fields
}
    PluginList handles listing installed plugins
func NewPluginList ¶
func NewPluginList(cfg *ActionsOpts, manager *plugins.Manager) *PluginList
NewPluginList creates a new PluginList action
func (*PluginList) Run ¶
func (action *PluginList) Run(_ context.Context) (*PluginListResult, error)
Run executes the PluginList action
type PluginListResult ¶
type PluginListResult struct {
	Plugins     map[string]*plugins.LoadedPlugin
	CommandsMap map[string]string // Maps command names to plugin names
}
    PluginListResult represents the result of listing plugins
type PolicyEval ¶
type PolicyEval struct {
	*ActionsOpts
	// contains filtered or unexported fields
}
    func NewPolicyEval ¶
func NewPolicyEval(opts *PolicyEvalOpts, actionOpts *ActionsOpts) (*PolicyEval, error)
func (*PolicyEval) Run ¶
func (action *PolicyEval) Run() (*policydevel.EvalSummary, error)
type PolicyEvalOpts ¶
type PolicyEvaluation ¶
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 PolicyEvaluationStatus ¶
type PolicyInit ¶
type PolicyInit struct {
	*ActionsOpts
	// contains filtered or unexported fields
}
    func NewPolicyInit ¶
func NewPolicyInit(opts *PolicyInitOpts, actionOpts *ActionsOpts) (*PolicyInit, error)
func (*PolicyInit) Run ¶
func (action *PolicyInit) Run() error
type PolicyInitOpts ¶
type PolicyLint ¶
type PolicyLint struct {
	*ActionsOpts
}
    func NewPolicyLint ¶
func NewPolicyLint(actionOpts *ActionsOpts) (*PolicyLint, error)
func (*PolicyLint) Run ¶
func (action *PolicyLint) Run(_ context.Context, opts *PolicyLintOpts) (*PolicyLintResult, error)
type PolicyLintOpts ¶
type PolicyLintResult ¶
type PolicyReference ¶
type PolicyViolation ¶
type ProjectVersion ¶
type ReferrerDiscover ¶
type ReferrerDiscover struct {
	// contains filtered or unexported fields
}
    func NewReferrerDiscoverPrivate ¶
func NewReferrerDiscoverPrivate(cfg *ActionsOpts) *ReferrerDiscover
func (*ReferrerDiscover) Run ¶
func (action *ReferrerDiscover) Run(ctx context.Context, digest, kind string) (*ReferrerItem, error)
type ReferrerDiscoverPublic ¶
type ReferrerDiscoverPublic struct {
	// contains filtered or unexported fields
}
    func NewReferrerDiscoverPublicIndex ¶
func NewReferrerDiscoverPublicIndex(cfg *ActionsOpts) *ReferrerDiscoverPublic
func (*ReferrerDiscoverPublic) Run ¶
func (action *ReferrerDiscoverPublic) Run(ctx context.Context, digest, kind string) (*ReferrerItem, error)
type ReferrerItem ¶
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 ¶
type RegisteredIntegrationAdd struct {
	// contains filtered or unexported fields
}
    func NewRegisteredIntegrationAdd ¶
func NewRegisteredIntegrationAdd(cfg *ActionsOpts) *RegisteredIntegrationAdd
func (*RegisteredIntegrationAdd) Run ¶
func (action *RegisteredIntegrationAdd) Run(pluginID, name, description string, options map[string]any) (*RegisteredIntegrationItem, error)
type RegisteredIntegrationDelete ¶
type RegisteredIntegrationDelete struct {
	// contains filtered or unexported fields
}
    func NewRegisteredIntegrationDelete ¶
func NewRegisteredIntegrationDelete(cfg *ActionsOpts) *RegisteredIntegrationDelete
func (*RegisteredIntegrationDelete) Run ¶
func (action *RegisteredIntegrationDelete) Run(name string) error
type RegisteredIntegrationDescribe ¶
type RegisteredIntegrationDescribe struct {
	// contains filtered or unexported fields
}
    func NewRegisteredIntegrationDescribe ¶
func NewRegisteredIntegrationDescribe(cfg *ActionsOpts) *RegisteredIntegrationDescribe
func (*RegisteredIntegrationDescribe) Run ¶
func (action *RegisteredIntegrationDescribe) Run(name string) (*RegisteredIntegrationItem, error)
type RegisteredIntegrationItem ¶
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 ¶
type RegisteredIntegrationList struct {
	// contains filtered or unexported fields
}
    func NewRegisteredIntegrationList ¶
func NewRegisteredIntegrationList(cfg *ActionsOpts) *RegisteredIntegrationList
func (*RegisteredIntegrationList) Run ¶
func (action *RegisteredIntegrationList) Run() ([]*RegisteredIntegrationItem, error)
type ScopedEntity ¶
type ScopedEntity struct {
	Type string `json:"type"`
	ID   string `json:"id"`
	Name string `json:"name"`
}
    func (*ScopedEntity) String ¶
func (s *ScopedEntity) String() string
type SignServerOpts ¶
type SignServerOpts struct {
	// CA certificate for TLS connection
	CAPath string
	// (optional) Client cert and passphrase for mutual TLS authentication
	AuthClientCertPath, AuthClientCertPass string
}
    SignServerOpts holds SignServer integration options
type UserItem ¶
func (*UserItem) PrintUserProfileWithEmail ¶
PrintUserProfileWithEmail formats the user's profile with their email.
type ValidationStatus ¶
type ValidationStatus string
const ( Valid ValidationStatus = "valid" Invalid ValidationStatus = "invalid" )
type WorkflowContractApply ¶ added in v1.50.0
type WorkflowContractApply struct {
	// contains filtered or unexported fields
}
    func NewWorkflowContractApply ¶ added in v1.50.0
func NewWorkflowContractApply(cfg *ActionsOpts) *WorkflowContractApply
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, projectName 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 ¶
func (action *WorkflowContractDescribe) Run(name string, rev int32) (*WorkflowContractWithVersionItem, error)
type WorkflowContractItem ¶
type WorkflowContractItem struct {
	Name                    string         `json:"name"`
	Description             string         `json:"description,omitempty"`
	ID                      string         `json:"id"`
	LatestRevision          int            `json:"latestRevision,omitempty"`
	LatestRevisionCreatedAt *time.Time     `json:"latestRevisionCreatedAt,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"`
	ScopedEntity            *ScopedEntity  `json:"scopedEntity,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 ¶
type WorkflowDescribe struct {
	// contains filtered or unexported fields
}
    func NewWorkflowDescribe ¶
func NewWorkflowDescribe(cfg *ActionsOpts) *WorkflowDescribe
func (*WorkflowDescribe) Run ¶
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 ¶
type WorkflowListResult struct {
	Workflows  []*WorkflowItem   `json:"workflows"`
	Pagination *OffsetPagination `json:"pagination"`
}
    WorkflowListResult holds the output of the workflow list action
type WorkflowRef ¶
type WorkflowRunAttestationItem ¶
type WorkflowRunAttestationItem struct {
	Envelope *dsse.Envelope `json:"envelope"`
	Bundle   []byte         `json:"bundle"`
	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"`
	// Policy evaluation status
	PolicyEvaluationStatus *PolicyEvaluationStatus `json:"policy_evaluation_status,omitempty"`
	// contains filtered or unexported fields
}
    func (*WorkflowRunAttestationItem) Statement ¶
func (i *WorkflowRunAttestationItem) Statement() *intoto.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(ctx context.Context, opts *WorkflowRunDescribeOpts) (*WorkflowRunItemFull, error)
type WorkflowRunDescribeOpts ¶
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 ¶
func (action *WorkflowRunList) Run(opts *WorkflowRunListOpts) (*PaginatedWorkflowRunItem, error)
type WorkflowRunListOpts ¶
type WorkflowRunListOpts struct {
	WorkflowName, ProjectName string
	Pagination                *PaginationOpts
	Status                    string
}
    type WorkflowUpdate ¶
type WorkflowUpdate struct {
	// contains filtered or unexported fields
}
    func NewWorkflowUpdate ¶
func NewWorkflowUpdate(cfg *ActionsOpts) *WorkflowUpdate
func (*WorkflowUpdate) Run ¶
func (action *WorkflowUpdate) Run(ctx context.Context, name, project string, opts *WorkflowUpdateOpts) (*WorkflowItem, error)
type WorkflowUpdateOpts ¶
       Source Files
      ¶
      Source Files
      ¶
    
- action.go
- apitoken_create.go
- apitoken_list.go
- apitoken_revoke.go
- artifact_download.go
- artifact_upload.go
- attached_integration_add.go
- attached_integration_delete.go
- attached_integration_list.go
- attestation_add.go
- attestation_init.go
- attestation_push.go
- attestation_reset.go
- attestation_status.go
- attestation_verify.go
- available_integration_describe.go
- available_integration_list.go
- casbackend_add.go
- casbackend_delete.go
- casbackend_list.go
- casbackend_update.go
- config_current_context.go
- delete_account.go
- membership_delete.go
- membership_leave.go
- membership_list.go
- membership_set.go
- membership_update.go
- org_create.go
- org_invitation_create.go
- org_invitation_list_sent.go
- org_invitation_revoke.go
- org_update.go
- organization_delete.go
- plugin_actions.go
- policy_develop_eval.go
- policy_develop_init.go
- policy_develop_lint.go
- referrer_discover.go
- registered_integration_add.go
- registered_integration_delete.go
- registered_integration_describe.go
- registered_integration_list.go
- util.go
- workflow_contract_apply.go
- workflow_contract_create.go
- workflow_contract_delete.go
- workflow_contract_describe.go
- workflow_contract_list.go
- workflow_contract_update.go
- workflow_create.go
- workflow_delete.go
- workflow_describe.go
- workflow_list.go
- workflow_run_describe.go
- workflow_run_list.go
- workflow_update.go