activities

package
v0.19.771 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activities

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

func New

func New(params Params) *Activities

func (*Activities) CheckNoopPlan

func (a *Activities) CheckNoopPlan(ctx context.Context, req *CheckNoopPlanRequest) (bool, error)

@temporal-gen activity @max-retries 1

func (*Activities) CreateApprovalResponse

@temporal-gen activity @schedule-to-close-timeout 1m @start-to-close-timeout 10s

func (*Activities) EvaluateSinglePolicy

@temporal-gen activity @max-retries 1 @schedule-to-close-timeout 2m @start-to-close-timeout 1m30s

func (*Activities) GetApprovalPlan

func (a *Activities) GetApprovalPlan(ctx context.Context, req GetApprovalPlanRequest) (*ApprovalPlan, error)

@temporal-gen activity @max-retries 1

func (*Activities) PersistPolicyReport added in v0.19.771

@temporal-gen activity @max-retries 3 @schedule-to-close-timeout 2m @start-to-close-timeout 1m30s

func (*Activities) PkgWorkflowsFlowCreateFlowSteps

func (a *Activities) PkgWorkflowsFlowCreateFlowSteps(ctx context.Context, reqs CreateFlowStepsRequest) ([]*app.WorkflowStep, error)

@temporal-gen activity

func (*Activities) PkgWorkflowsFlowGetFlow

func (a *Activities) PkgWorkflowsFlowGetFlow(ctx context.Context, req GetFlowRequest) (*app.Workflow, error)

@temporal-gen activity @by-id ID

func (*Activities) PkgWorkflowsFlowGetFlowSteps

func (a *Activities) PkgWorkflowsFlowGetFlowSteps(ctx context.Context, req GetFlowStepsRequest) ([]app.WorkflowStep, error)

@temporal-gen activity @by-id FlowID

func (*Activities) PkgWorkflowsFlowGetFlowsStep

func (a *Activities) PkgWorkflowsFlowGetFlowsStep(ctx context.Context, req GetFlowStepRequest) (*app.WorkflowStep, error)

@temporal-gen activity @by-id FlowStepID

func (*Activities) PkgWorkflowsFlowResetFlowFinishedAt

func (a *Activities) PkgWorkflowsFlowResetFlowFinishedAt(ctx context.Context, req ResetFlowFinishedAtRequest) error

@temporal-gen activity @by-id ID

func (*Activities) PkgWorkflowsFlowUpdateFlowFinishedAt

func (a *Activities) PkgWorkflowsFlowUpdateFlowFinishedAt(ctx context.Context, req UpdateFlowFinishedAtRequest) error

@temporal-gen activity @by-id ID

func (*Activities) PkgWorkflowsFlowUpdateFlowStartedAt

func (a *Activities) PkgWorkflowsFlowUpdateFlowStartedAt(ctx context.Context, req UpdateFlowStartedAtRequest) error

@temporal-gen activity @by-id ID

func (*Activities) PkgWorkflowsFlowUpdateFlowStepFinishedAt

func (a *Activities) PkgWorkflowsFlowUpdateFlowStepFinishedAt(ctx context.Context, req UpdateFlowStepFinishedAtRequest) error

@temporal-gen activity @by-id ID

func (*Activities) PkgWorkflowsFlowUpdateFlowStepStartedAt

func (a *Activities) PkgWorkflowsFlowUpdateFlowStepStartedAt(ctx context.Context, req UpdateFlowStepStartedAtRequest) error

@temporal-gen activity @by-id ID

func (*Activities) PkgWorkflowsFlowUpdateFlowStepTargetStatus

func (a *Activities) PkgWorkflowsFlowUpdateFlowStepTargetStatus(ctx context.Context, req UpdateFlowStepTargetStatusRequest) error

@temporal-gen activity

func (*Activities) PrepPolicyEvaluation

@temporal-gen activity @max-retries 1 @schedule-to-close-timeout 5m @start-to-close-timeout 4m

type ApprovalPlan

type ApprovalPlan struct {
	RunnerJobType app.RunnerJobType `json:"runner_job_type" temporaljson:"runner_job_type,omitempty"`
	PlanContents  []byte            `json:"plan_contents" temporaljson:"plan_contents,omitempty"`
}

func (*ApprovalPlan) IsNoopPlan

func (p *ApprovalPlan) IsNoopPlan() (bool, error)

type CheckNoopPlanRequest

type CheckNoopPlanRequest struct {
	StepTargetID string `validate:"required"`
}

type CreateFlowStep

type CreateFlowStep struct {
	FlowID         string                        `json:"flow_id" validate:"required"`
	OwnerID        string                        `json:"owner_id" validate:"required"`
	OwnerType      string                        `json:"owner_type" validate:"required"`
	Status         app.CompositeStatus           `json:"status"`
	Name           string                        `json:"name"`
	Signal         app.Signal                    `json:"signal"`
	Idx            int                           `json:"idx"`
	ExecutionType  app.WorkflowStepExecutionType `json:"execution_type"`
	Metadata       pgtype.Hstore                 `json:"metadata"`
	Retryable      bool                          `json:"retryable"`
	Skippable      bool                          `json:"skippable"`
	GroupIdx       int                           `json:"group_idx"`
	GroupRetryIdx  int                           `json:"group_retry_idx"`
	StepTargetType string                        `json:"step_target_type"`
	StepTargetID   string                        `json:"step_target_id"`
}

type CreateFlowStepsRequest

type CreateFlowStepsRequest struct {
	Steps []CreateFlowStep `json:"steps" validate:"required"`
}

type CreateStepApprovalResponseRequest

type CreateStepApprovalResponseRequest struct {
	StepApprovalID string                       `json:"step_approval_id" validate:"required"`
	Type           app.WorkflowStepResponseType `json:"type" validate:"required"`
	Note           string                       `json:"note" validate:"required"`
}

type EvaluateSinglePolicyRequest

type EvaluateSinglePolicyRequest struct {
	PolicyID      string `json:"policy_id" validate:"required"`
	Contents      string `json:"contents" validate:"required"`
	InputJSON     []byte `json:"input_json" validate:"required"`
	InputIndex    int    `json:"input_index"`                // Index of the input document being evaluated
	InputIdentity string `json:"input_identity" validate:""` // Human-readable input reference
}

type EvaluateSinglePolicyResult

type EvaluateSinglePolicyResult struct {
	Violations []PolicyViolation `json:"violations" temporaljson:"violations,omitempty"`
}

type GetApprovalPlanRequest

type GetApprovalPlanRequest struct {
	StepTargetID string `validate:"required"`
}

type GetFlowRequest

type GetFlowRequest struct {
	ID string `validate:"required"`
}

type GetFlowStepRequest

type GetFlowStepRequest struct {
	FlowStepID string `json:"flow_step_id" validate:"required"`
}

type GetFlowStepsRequest

type GetFlowStepsRequest struct {
	FlowID string `json:"flow_id" validate:"required"`
}

type GetRunnerJobExecutionRequest

type GetRunnerJobExecutionRequest struct {
	RunnerJobID string `validate:"required"`
}

type GetRunnerJobExecutionResultRequest

type GetRunnerJobExecutionResultRequest struct {
	RunnerJobExecutionID string `validate:"required"`
}

type GetRunnerJobRequest

type GetRunnerJobRequest struct {
	RunnerJobOwnerID string `validate:"required"`
}

type Params

type Params struct {
	fx.In

	DB          *gorm.DB `name:"psql"`
	AppsHelpers *appshelpers.Helpers
}

type PersistPolicyReportRequest added in v0.19.771

type PersistPolicyReportRequest struct {
	OrgID                          string            `json:"org_id" validate:"required"`
	AppID                          string            `json:"app_id" validate:"required"`
	InstallID                      *string           `json:"install_id"`
	InstallSandboxID               *string           `json:"install_sandbox_id"`
	ComponentID                    *string           `json:"component_id"`
	ComponentBuildID               *string           `json:"component_build_id"`
	WorkflowStepPolicyValidationID *string           `json:"workflow_step_policy_validation_id"`
	RunnerJobID                    *string           `json:"runner_job_id"`
	OwnerID                        string            `json:"owner_id" validate:"required"`
	OwnerType                      string            `json:"owner_type" validate:"required"`
	Violations                     []PolicyViolation `json:"violations"`
	PolicyIDs                      []string          `json:"policy_ids"`
	PolicyInputCounts              map[string]int    `json:"policy_input_counts"`
	DenyCount                      int               `json:"deny_count"`
	WarnCount                      int               `json:"warn_count"`
	PassCount                      int               `json:"pass_count"`

	// Human-readable names for display in reports
	OrgName       string `json:"org_name"`
	AppName       string `json:"app_name"`
	InstallName   string `json:"install_name"`
	ComponentName string `json:"component_name"`
}

type PersistPolicyReportResult added in v0.19.771

type PersistPolicyReportResult struct {
	ReportID  string `json:"report_id" temporaljson:"report_id,omitempty"`
	DenyCount int    `json:"deny_count" temporaljson:"deny_count,omitempty"`
	WarnCount int    `json:"warn_count" temporaljson:"warn_count,omitempty"`
	PassCount int    `json:"pass_count" temporaljson:"pass_count,omitempty"`
}

type PolicyToEvaluate

type PolicyToEvaluate struct {
	PolicyID      string `json:"policy_id" temporaljson:"policy_id,omitempty"`
	Contents      string `json:"contents" temporaljson:"contents,omitempty"`
	InputJSON     []byte `json:"input_json" temporaljson:"input_json,omitempty"`
	InputIndex    int    `json:"input_index" temporaljson:"input_index,omitempty"`       // Index of the input document
	InputIdentity string `json:"input_identity" temporaljson:"input_identity,omitempty"` // Human-readable input reference
}

type PolicyViolation

type PolicyViolation = app.PolicyViolation

PolicyViolation is an alias to app.PolicyViolation for use in activity requests/responses.

type PrepPolicyEvaluationRequest

type PrepPolicyEvaluationRequest struct {
	StepTargetID   string `validate:"required"`
	StepTargetType string `validate:"required"`
}

type PrepPolicyEvaluationResult

type PrepPolicyEvaluationResult struct {
	Policies         []PolicyToEvaluate `json:"policies" temporaljson:"policies,omitempty"`
	HasPolicies      bool               `json:"has_policies" temporaljson:"has_policies,omitempty"`
	OrgID            string             `json:"org_id" temporaljson:"org_id,omitempty"`
	AppID            string             `json:"app_id" temporaljson:"app_id,omitempty"`
	InstallID        *string            `json:"install_id" temporaljson:"install_id,omitempty"`
	InstallSandboxID *string            `json:"install_sandbox_id" temporaljson:"install_sandbox_id,omitempty"`
	ComponentID      *string            `json:"component_id" temporaljson:"component_id,omitempty"`
	ComponentBuildID *string            `json:"component_build_id" temporaljson:"component_build_id,omitempty"`
	PolicyIDs        []string           `json:"policy_ids" temporaljson:"policy_ids,omitempty"`
	InputCount       int                `json:"input_count" temporaljson:"input_count,omitempty"`

	// Human-readable names for display in reports
	OrgName       string `json:"org_name" temporaljson:"org_name,omitempty"`
	AppName       string `json:"app_name" temporaljson:"app_name,omitempty"`
	InstallName   string `json:"install_name" temporaljson:"install_name,omitempty"`
	ComponentName string `json:"component_name" temporaljson:"component_name,omitempty"`
}

type ResetFlowFinishedAtRequest

type ResetFlowFinishedAtRequest struct {
	ID string `validate:"required"`
}

type UpdateFlowFinishedAtRequest

type UpdateFlowFinishedAtRequest struct {
	ID string `validate:"required"`
}

type UpdateFlowStartedAtRequest

type UpdateFlowStartedAtRequest struct {
	ID string `validate:"required"`
}

type UpdateFlowStepFinishedAtRequest

type UpdateFlowStepFinishedAtRequest struct {
	ID string `validate:"required"`
}

type UpdateFlowStepStartedAtRequest

type UpdateFlowStepStartedAtRequest struct {
	ID string `validate:"required"`
}

type UpdateFlowStepTargetStatusRequest

type UpdateFlowStepTargetStatusRequest struct {
	StepID            string     `validate:"required"`
	Status            app.Status `validate:"required"`
	StatusDescription string
}

NOTE(jm): once install-deploys and sandbox-runs objects are updated to the composite status type, we will not need to use this type of update flow

Jump to

Keyboard shortcuts

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