activities

package
v0.19.769 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: AGPL-3.0 Imports: 21 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) 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"`
}

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

type PolicyViolation

type PolicyViolation struct {
	PolicyID string `json:"policy_id" temporaljson:"policy_id,omitempty"`
	Message  string `json:"message" temporaljson:"message,omitempty"`
	Severity string `json:"severity" temporaljson:"severity,omitempty"` // "deny" or "warn"
}

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

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