Documentation ¶
Overview ¶
Shared utils for postgresql tests.
Index ¶
- Constants
- func GetDbForTest(t *testing.T) *gorm.DB
- func NewExecutionRepo(db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.ExecutionRepoInterface
- func NewLaunchPlanRepo(db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.LaunchPlanRepoInterface
- func NewNodeExecutionRepo(db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.NodeExecutionRepoInterface
- func NewProjectRepo(db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.ProjectRepoInterface
- func NewTaskExecutionRepo(db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.TaskExecutionRepoInterface
- func NewTaskRepo(db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.TaskRepoInterface
- func NewWorkflowRepo(db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.WorkflowRepoInterface
- func ValidateListInput(input interfaces.ListResourceInput) adminErrors.FlyteAdminError
- type ExecutionRepo
- func (r *ExecutionRepo) Create(ctx context.Context, input models.Execution) error
- func (r *ExecutionRepo) Get(ctx context.Context, input interfaces.GetResourceInput) (models.Execution, error)
- func (r *ExecutionRepo) GetByID(ctx context.Context, id uint) (models.Execution, error)
- func (r *ExecutionRepo) List(ctx context.Context, input interfaces.ListResourceInput) (interfaces.ExecutionCollectionOutput, error)
- func (r *ExecutionRepo) Update(ctx context.Context, event models.ExecutionEvent, execution models.Execution) error
- func (r *ExecutionRepo) UpdateExecution(ctx context.Context, execution models.Execution) error
- type LaunchPlanRepo
- func (r *LaunchPlanRepo) Create(ctx context.Context, input models.LaunchPlan) error
- func (r *LaunchPlanRepo) Get(ctx context.Context, input interfaces.GetResourceInput) (models.LaunchPlan, error)
- func (r *LaunchPlanRepo) List(ctx context.Context, input interfaces.ListResourceInput) (interfaces.LaunchPlanCollectionOutput, error)
- func (r *LaunchPlanRepo) ListLaunchPlanIdentifiers(ctx context.Context, input interfaces.ListResourceInput) (interfaces.LaunchPlanCollectionOutput, error)
- func (r *LaunchPlanRepo) SetActive(ctx context.Context, toEnable models.LaunchPlan, toDisable *models.LaunchPlan) error
- func (r *LaunchPlanRepo) Update(ctx context.Context, input models.LaunchPlan) error
- type NodeExecutionRepo
- func (r *NodeExecutionRepo) Create(ctx context.Context, event *models.NodeExecutionEvent, ...) error
- func (r *NodeExecutionRepo) Get(ctx context.Context, input interfaces.GetNodeExecutionInput) (models.NodeExecution, error)
- func (r *NodeExecutionRepo) List(ctx context.Context, input interfaces.ListResourceInput) (interfaces.NodeExecutionCollectionOutput, error)
- func (r *NodeExecutionRepo) ListEvents(ctx context.Context, input interfaces.ListResourceInput) (interfaces.NodeExecutionEventCollectionOutput, error)
- func (r *NodeExecutionRepo) Update(ctx context.Context, event *models.NodeExecutionEvent, ...) error
- type ProjectRepo
- type TaskExecutionRepo
- func (r *TaskExecutionRepo) Create(ctx context.Context, input models.TaskExecution) error
- func (r *TaskExecutionRepo) Get(ctx context.Context, input interfaces.GetTaskExecutionInput) (models.TaskExecution, error)
- func (r *TaskExecutionRepo) List(ctx context.Context, input interfaces.ListResourceInput) (interfaces.TaskExecutionCollectionOutput, error)
- func (r *TaskExecutionRepo) Update(ctx context.Context, execution models.TaskExecution) error
- type TaskRepo
- func (r *TaskRepo) Create(ctx context.Context, input models.Task) error
- func (r *TaskRepo) Get(ctx context.Context, input interfaces.GetResourceInput) (models.Task, error)
- func (r *TaskRepo) List(ctx context.Context, input interfaces.ListResourceInput) (interfaces.TaskCollectionOutput, error)
- func (r *TaskRepo) ListTaskIdentifiers(ctx context.Context, input interfaces.ListResourceInput) (interfaces.TaskCollectionOutput, error)
- type WorkflowRepo
- func (r *WorkflowRepo) Create(ctx context.Context, input models.Workflow) error
- func (r *WorkflowRepo) Get(ctx context.Context, input interfaces.GetResourceInput) (models.Workflow, error)
- func (r *WorkflowRepo) List(ctx context.Context, input interfaces.ListResourceInput) (interfaces.WorkflowCollectionOutput, error)
- func (r *WorkflowRepo) ListIdentifiers(ctx context.Context, input interfaces.ListResourceInput) (interfaces.WorkflowCollectionOutput, error)
Constants ¶
const Closure = "closure"
const Domain = "domain"
const DomainID = "domain_id"
const DomainName = "domain_name"
const Name = "name"
const Project = "project"
const ProjectID = "project_id"
const ProjectName = "project_name"
const Version = "version"
Variables ¶
This section is empty.
Functions ¶
func NewExecutionRepo ¶
func NewExecutionRepo( db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.ExecutionRepoInterface
Returns an instance of ExecutionRepoInterface
func NewLaunchPlanRepo ¶
func NewLaunchPlanRepo( db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.LaunchPlanRepoInterface
Returns an instance of LaunchPlanRepoInterface
func NewNodeExecutionRepo ¶
func NewNodeExecutionRepo( db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.NodeExecutionRepoInterface
Returns an instance of NodeExecutionRepoInterface
func NewProjectRepo ¶
func NewProjectRepo(db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.ProjectRepoInterface
func NewTaskExecutionRepo ¶
func NewTaskExecutionRepo( db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.TaskExecutionRepoInterface
Returns an instance of TaskExecutionRepoInterface
func NewTaskRepo ¶
func NewTaskRepo( db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.TaskRepoInterface
Returns an instance of TaskRepoInterface
func NewWorkflowRepo ¶
func NewWorkflowRepo( db *gorm.DB, errorTransformer errors.ErrorTransformer, scope promutils.Scope) interfaces.WorkflowRepoInterface
Returns an instance of WorkflowRepoInterface
func ValidateListInput ¶
func ValidateListInput(input interfaces.ListResourceInput) adminErrors.FlyteAdminError
Validates there are no missing but required parameters in ListResourceInput
Types ¶
type ExecutionRepo ¶
type ExecutionRepo struct {
// contains filtered or unexported fields
}
Implementation of ExecutionInterface.
func (*ExecutionRepo) Get ¶
func (r *ExecutionRepo) Get(ctx context.Context, input interfaces.GetResourceInput) (models.Execution, error)
func (*ExecutionRepo) List ¶
func (r *ExecutionRepo) List(ctx context.Context, input interfaces.ListResourceInput) ( interfaces.ExecutionCollectionOutput, error)
func (*ExecutionRepo) Update ¶
func (r *ExecutionRepo) Update(ctx context.Context, event models.ExecutionEvent, execution models.Execution) error
func (*ExecutionRepo) UpdateExecution ¶
type LaunchPlanRepo ¶
type LaunchPlanRepo struct {
// contains filtered or unexported fields
}
Implementation of LaunchPlanRepoInterface.
func (*LaunchPlanRepo) Create ¶
func (r *LaunchPlanRepo) Create(ctx context.Context, input models.LaunchPlan) error
func (*LaunchPlanRepo) Get ¶
func (r *LaunchPlanRepo) Get(ctx context.Context, input interfaces.GetResourceInput) (models.LaunchPlan, error)
func (*LaunchPlanRepo) List ¶
func (r *LaunchPlanRepo) List(ctx context.Context, input interfaces.ListResourceInput) ( interfaces.LaunchPlanCollectionOutput, error)
func (*LaunchPlanRepo) ListLaunchPlanIdentifiers ¶
func (r *LaunchPlanRepo) ListLaunchPlanIdentifiers(ctx context.Context, input interfaces.ListResourceInput) ( interfaces.LaunchPlanCollectionOutput, error)
func (*LaunchPlanRepo) SetActive ¶
func (r *LaunchPlanRepo) SetActive( ctx context.Context, toEnable models.LaunchPlan, toDisable *models.LaunchPlan) error
This operation is performed as a two-step transaction because only one launch plan version can be active at a time. Transactional semantics are used to guarantee that setting the desired launch plan to active also disables the existing launch plan version (if any).
func (*LaunchPlanRepo) Update ¶
func (r *LaunchPlanRepo) Update(ctx context.Context, input models.LaunchPlan) error
type NodeExecutionRepo ¶
type NodeExecutionRepo struct {
// contains filtered or unexported fields
}
Implementation of NodeExecutionInterface.
func (*NodeExecutionRepo) Create ¶
func (r *NodeExecutionRepo) Create(ctx context.Context, event *models.NodeExecutionEvent, execution *models.NodeExecution) error
Persist the node execution and the initial event that triggers this execution. If any of the persistence fails rollback the transaction all together.
func (*NodeExecutionRepo) Get ¶
func (r *NodeExecutionRepo) Get(ctx context.Context, input interfaces.GetNodeExecutionInput) (models.NodeExecution, error)
func (*NodeExecutionRepo) List ¶
func (r *NodeExecutionRepo) List(ctx context.Context, input interfaces.ListResourceInput) ( interfaces.NodeExecutionCollectionOutput, error)
func (*NodeExecutionRepo) ListEvents ¶
func (r *NodeExecutionRepo) ListEvents( ctx context.Context, input interfaces.ListResourceInput) (interfaces.NodeExecutionEventCollectionOutput, error)
func (*NodeExecutionRepo) Update ¶
func (r *NodeExecutionRepo) Update(ctx context.Context, event *models.NodeExecutionEvent, nodeExecution *models.NodeExecution) error
Persist the event that triggers an update in execution. If any of the persistence fails rollback the transaction all together.
type ProjectRepo ¶
type ProjectRepo struct {
// contains filtered or unexported fields
}
func (*ProjectRepo) ListAll ¶
func (r *ProjectRepo) ListAll(ctx context.Context, sortParameter common.SortParameter) ([]models.Project, error)
type TaskExecutionRepo ¶
type TaskExecutionRepo struct {
// contains filtered or unexported fields
}
Implementation of TaskExecutionInterface.
func (*TaskExecutionRepo) Create ¶
func (r *TaskExecutionRepo) Create(ctx context.Context, input models.TaskExecution) error
func (*TaskExecutionRepo) Get ¶
func (r *TaskExecutionRepo) Get(ctx context.Context, input interfaces.GetTaskExecutionInput) (models.TaskExecution, error)
func (*TaskExecutionRepo) List ¶
func (r *TaskExecutionRepo) List(ctx context.Context, input interfaces.ListResourceInput) (interfaces.TaskExecutionCollectionOutput, error)
func (*TaskExecutionRepo) Update ¶
func (r *TaskExecutionRepo) Update(ctx context.Context, execution models.TaskExecution) error
type TaskRepo ¶
type TaskRepo struct {
// contains filtered or unexported fields
}
Implementation of TaskRepoInterface.
func (*TaskRepo) Get ¶
func (r *TaskRepo) Get(ctx context.Context, input interfaces.GetResourceInput) (models.Task, error)
func (*TaskRepo) List ¶
func (r *TaskRepo) List( ctx context.Context, input interfaces.ListResourceInput) (interfaces.TaskCollectionOutput, error)
func (*TaskRepo) ListTaskIdentifiers ¶
func (r *TaskRepo) ListTaskIdentifiers(ctx context.Context, input interfaces.ListResourceInput) ( interfaces.TaskCollectionOutput, error)
type WorkflowRepo ¶
type WorkflowRepo struct {
// contains filtered or unexported fields
}
Implementation of WorkflowRepoInterface.
func (*WorkflowRepo) Get ¶
func (r *WorkflowRepo) Get(ctx context.Context, input interfaces.GetResourceInput) (models.Workflow, error)
func (*WorkflowRepo) List ¶
func (r *WorkflowRepo) List( ctx context.Context, input interfaces.ListResourceInput) (interfaces.WorkflowCollectionOutput, error)
func (*WorkflowRepo) ListIdentifiers ¶
func (r *WorkflowRepo) ListIdentifiers(ctx context.Context, input interfaces.ListResourceInput) ( interfaces.WorkflowCollectionOutput, error)