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

appWorkflow

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CIPIPELINE string = "CI_PIPELINE"
	CDPIPELINE string = "CD_PIPELINE"
	WEBHOOK    string = "WEBHOOK"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppWorkflow

type AppWorkflow struct {
	TableName   struct{}        `sql:"app_workflow" pg:",discard_unknown_columns"`
	Id          int             `sql:"id,pk"`
	Name        string          `sql:"name,notnull"`
	Active      bool            `sql:"active,notnull"`
	WorkflowDAG json.RawMessage `sql:"workflow_dag"`
	AppId       int             `sql:"app_id"`
	sql.AuditLog
}

type AppWorkflowMapping

type AppWorkflowMapping struct {
	TableName     struct{} `sql:"app_workflow_mapping" pg:",discard_unknown_columns"`
	Id            int      `sql:"id,pk"`
	ComponentId   int      `sql:"component_id,notnull"`
	AppWorkflowId int      `sql:"app_workflow_id"`
	Type          string   `sql:"type,notnull"`
	ParentId      int      `sql:"parent_id"`
	Active        bool     `sql:"active,notnull"`
	ParentType    string   `sql:"parent_type,notnull"`
	AppWorkflow   *AppWorkflow
	sql.AuditLog
}

type AppWorkflowRepository

type AppWorkflowRepository interface {
	SaveAppWorkflow(wf *AppWorkflow) (*AppWorkflow, error)
	SaveAppWorkflowWithTx(wf *AppWorkflow, tx *pg.Tx) (*AppWorkflow, error)
	UpdateAppWorkflow(wf *AppWorkflow) (*AppWorkflow, error)
	FindByIdAndAppId(id int, appId int) (*AppWorkflow, error)
	FindById(id int) (*AppWorkflow, error)
	FindByIds(ids []int) (*AppWorkflow, error)
	FindByAppId(appId int) (appWorkflow []*AppWorkflow, err error)
	FindByAppIds(appIds []int) (appWorkflow []*AppWorkflow, err error)
	DeleteAppWorkflowAndAllMappings(appWorkflow *AppWorkflow, tx *pg.Tx) error

	SaveAppWorkflowMapping(wf *AppWorkflowMapping, tx *pg.Tx) (*AppWorkflowMapping, error)
	FindByWorkflowId(workflowId int) ([]*AppWorkflowMapping, error)

	FindByComponent(id int, componentType string) ([]*AppWorkflowMapping, error)

	FindByNameAndAppId(name string, appId int) (*AppWorkflow, error)
	FindWFCIMappingByWorkflowId(workflowId int) ([]*AppWorkflowMapping, error)
	FindWFAllMappingByWorkflowId(workflowId int) ([]*AppWorkflowMapping, error)
	FindWFCIMappingByCIPipelineId(ciPipelineId int) ([]*AppWorkflowMapping, error)
	FindWFCDMappingByCIPipelineId(ciPipelineId int) ([]*AppWorkflowMapping, error)
	FindWFCDMappingsByWorkflowId(appWorkflowId int) ([]*AppWorkflowMapping, error)
	FindWFCDMappingByCDPipelineId(cdPipelineId int) (*AppWorkflowMapping, error)
	GetParentDetailsByPipelineId(pipelineId int) (*AppWorkflowMapping, error)
	DeleteAppWorkflowMapping(appWorkflow *AppWorkflowMapping, tx *pg.Tx) error
	DeleteAppWorkflowMappingsByCdPipelineId(pipelineId int, tx *pg.Tx) error
	FindWFCDMappingByCIPipelineIds(ciPipelineIds []int) ([]*AppWorkflowMapping, error)
	FindWFCDMappingByParentCDPipelineId(cdPipelineId int) ([]*AppWorkflowMapping, error)
	FindAllWFMappingsByAppId(appId int) ([]*AppWorkflowMapping, error)
	FindWFCDMappingByExternalCiId(externalCiId int) ([]*AppWorkflowMapping, error)
	FindWFCDMappingByExternalCiIdByIdsIn(externalCiId []int) ([]*AppWorkflowMapping, error)
	FindByTypeAndComponentId(wfId int, componentId int, componentType string) (*AppWorkflowMapping, error)
	FindAllWfsHavingCdPipelinesFromSpecificEnvsOnly(envIds []int, appIds []int) ([]*AppWorkflowMapping, error)
	FindCiPipelineIdsFromAppWfIds(appWfIds []int) ([]int, error)
	FindChildCDIdsByParentCDPipelineId(cdPipelineId int) ([]int, error)
	FindByCDPipelineIds(cdPipelineIds []int) ([]*AppWorkflowMapping, error)
	FindByWorkflowIds(workflowIds []int) ([]*AppWorkflowMapping, error)
	FindMappingByAppIds(appIds []int) ([]*AppWorkflowMapping, error)
	UpdateParentComponentDetails(tx *pg.Tx, oldComponentId int, oldComponentType string, newComponentId int, newComponentType string, componentIdsFilter []int) error
	FindWFMappingByComponent(componentType string, componentId int) (*AppWorkflowMapping, error)
	FindByComponentId(componentId int) ([]*AppWorkflowMapping, error)
}

type AppWorkflowRepositoryImpl

type AppWorkflowRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewAppWorkflowRepositoryImpl

func NewAppWorkflowRepositoryImpl(Logger *zap.SugaredLogger, dbConnection *pg.DB) *AppWorkflowRepositoryImpl

func (AppWorkflowRepositoryImpl) DeleteAppWorkflowAndAllMappings added in v1.7.0

func (impl AppWorkflowRepositoryImpl) DeleteAppWorkflowAndAllMappings(appWorkflow *AppWorkflow, tx *pg.Tx) error

func (AppWorkflowRepositoryImpl) DeleteAppWorkflowMapping

func (impl AppWorkflowRepositoryImpl) DeleteAppWorkflowMapping(appWorkflow *AppWorkflowMapping, tx *pg.Tx) error

func (AppWorkflowRepositoryImpl) DeleteAppWorkflowMappingsByCdPipelineId added in v0.6.4

func (impl AppWorkflowRepositoryImpl) DeleteAppWorkflowMappingsByCdPipelineId(pipelineId int, tx *pg.Tx) error

func (AppWorkflowRepositoryImpl) FindAllWFMappingsByAppId added in v0.6.0

func (impl AppWorkflowRepositoryImpl) FindAllWFMappingsByAppId(appId int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindAllWfsHavingCdPipelinesFromSpecificEnvsOnly added in v0.6.6

func (impl AppWorkflowRepositoryImpl) FindAllWfsHavingCdPipelinesFromSpecificEnvsOnly(envIds []int, appIds []int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindByAppId

func (impl AppWorkflowRepositoryImpl) FindByAppId(appId int) (appWorkflow []*AppWorkflow, err error)

func (AppWorkflowRepositoryImpl) FindByAppIds added in v0.6.13

func (impl AppWorkflowRepositoryImpl) FindByAppIds(appIds []int) (appWorkflow []*AppWorkflow, err error)

func (AppWorkflowRepositoryImpl) FindByCDPipelineIds added in v0.6.15

func (impl AppWorkflowRepositoryImpl) FindByCDPipelineIds(cdPipelineIds []int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindByComponent

func (impl AppWorkflowRepositoryImpl) FindByComponent(id int, componentType string) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindByComponentId added in v0.6.26

func (impl AppWorkflowRepositoryImpl) FindByComponentId(componentId int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindById added in v0.6.6

func (impl AppWorkflowRepositoryImpl) FindById(id int) (*AppWorkflow, error)

func (AppWorkflowRepositoryImpl) FindByIdAndAppId

func (impl AppWorkflowRepositoryImpl) FindByIdAndAppId(id int, appId int) (*AppWorkflow, error)

func (AppWorkflowRepositoryImpl) FindByIds added in v0.6.6

func (impl AppWorkflowRepositoryImpl) FindByIds(ids []int) (*AppWorkflow, error)

func (AppWorkflowRepositoryImpl) FindByNameAndAppId

func (impl AppWorkflowRepositoryImpl) FindByNameAndAppId(name string, appId int) (*AppWorkflow, error)

func (AppWorkflowRepositoryImpl) FindByTypeAndComponentId added in v0.6.9

func (impl AppWorkflowRepositoryImpl) FindByTypeAndComponentId(wfId int, componentId int, componentType string) (*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindByWorkflowId

func (impl AppWorkflowRepositoryImpl) FindByWorkflowId(workflowId int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindByWorkflowIds added in v0.6.15

func (impl AppWorkflowRepositoryImpl) FindByWorkflowIds(workflowIds []int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindChildCDIdsByParentCDPipelineId added in v0.6.9

func (impl AppWorkflowRepositoryImpl) FindChildCDIdsByParentCDPipelineId(cdPipelineId int) ([]int, error)

func (AppWorkflowRepositoryImpl) FindCiPipelineIdsFromAppWfIds added in v0.6.9

func (impl AppWorkflowRepositoryImpl) FindCiPipelineIdsFromAppWfIds(appWfIds []int) ([]int, error)

func (AppWorkflowRepositoryImpl) FindMappingByAppIds added in v0.6.15

func (impl AppWorkflowRepositoryImpl) FindMappingByAppIds(appIds []int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindWFAllMappingByWorkflowId

func (impl AppWorkflowRepositoryImpl) FindWFAllMappingByWorkflowId(workflowId int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindWFCDMappingByCDPipelineId

func (impl AppWorkflowRepositoryImpl) FindWFCDMappingByCDPipelineId(cdPipelineId int) (*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindWFCDMappingByCIPipelineId

func (impl AppWorkflowRepositoryImpl) FindWFCDMappingByCIPipelineId(ciPipelineId int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindWFCDMappingByCIPipelineIds

func (impl AppWorkflowRepositoryImpl) FindWFCDMappingByCIPipelineIds(ciPipelineIds []int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindWFCDMappingByExternalCiId added in v0.6.9

func (impl AppWorkflowRepositoryImpl) FindWFCDMappingByExternalCiId(externalCiId int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindWFCDMappingByExternalCiIdByIdsIn added in v0.6.17

func (impl AppWorkflowRepositoryImpl) FindWFCDMappingByExternalCiIdByIdsIn(externalCiId []int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindWFCDMappingByParentCDPipelineId added in v0.3.12

func (impl AppWorkflowRepositoryImpl) FindWFCDMappingByParentCDPipelineId(cdPipelineId int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindWFCDMappingsByWorkflowId added in v0.7.2

func (impl AppWorkflowRepositoryImpl) FindWFCDMappingsByWorkflowId(appWorkflowId int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindWFCIMappingByCIPipelineId

func (impl AppWorkflowRepositoryImpl) FindWFCIMappingByCIPipelineId(ciPipelineId int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindWFCIMappingByWorkflowId

func (impl AppWorkflowRepositoryImpl) FindWFCIMappingByWorkflowId(workflowId int) ([]*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) FindWFMappingByComponent added in v0.6.26

func (impl AppWorkflowRepositoryImpl) FindWFMappingByComponent(componentType string, componentId int) (*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) GetParentDetailsByPipelineId added in v0.6.17

func (impl AppWorkflowRepositoryImpl) GetParentDetailsByPipelineId(pipelineId int) (*AppWorkflowMapping, error)

GetParentDetailsByPipelineId returns app workflow which contains only the parent id and parent type for the given pipeline component id

func (AppWorkflowRepositoryImpl) SaveAppWorkflow

func (impl AppWorkflowRepositoryImpl) SaveAppWorkflow(wf *AppWorkflow) (*AppWorkflow, error)

func (AppWorkflowRepositoryImpl) SaveAppWorkflowMapping

func (impl AppWorkflowRepositoryImpl) SaveAppWorkflowMapping(wf *AppWorkflowMapping, tx *pg.Tx) (*AppWorkflowMapping, error)

func (AppWorkflowRepositoryImpl) SaveAppWorkflowWithTx added in v0.6.9

func (impl AppWorkflowRepositoryImpl) SaveAppWorkflowWithTx(wf *AppWorkflow, tx *pg.Tx) (*AppWorkflow, error)

func (AppWorkflowRepositoryImpl) UpdateAppWorkflow

func (impl AppWorkflowRepositoryImpl) UpdateAppWorkflow(wf *AppWorkflow) (*AppWorkflow, error)

func (AppWorkflowRepositoryImpl) UpdateParentComponentDetails added in v0.6.26

func (impl AppWorkflowRepositoryImpl) UpdateParentComponentDetails(tx *pg.Tx, oldParentId int, oldParentType string, newParentId int, newParentType string, componentIdFilter []int) error

type WorkflowDAG

type WorkflowDAG struct {
	CiPipelines []int `json:"ciPipelines"`
	CdPipelines []int `json:"cdPipelines"`
}

TODO: Suraj - This is v1, it has to be evolved later

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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