appWorkflow

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

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

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"`
	WorkflowDAG json.RawMessage `sql:"workflow_dag"`
	AppId       int             `sql:"app_id"`
	models.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"`
	ParentType    string   `sql:"parent_type,notnull"`
	AppWorkflow   *AppWorkflow
	models.AuditLog
}

type AppWorkflowRepository

type AppWorkflowRepository interface {
	SaveAppWorkflow(wf *AppWorkflow) (*AppWorkflow, error)
	UpdateAppWorkflow(wf *AppWorkflow) (*AppWorkflow, error)
	FindByIdAndAppId(id int, appId int) (*AppWorkflow, error)
	FindByAppId(appId int) (appWorkflow []*AppWorkflow, err error)
	DeleteAppWorkflow(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(cdPipelineId int) ([]*AppWorkflowMapping, error)
	FindWFCDMappingByCIPipelineId(cdPipelineId int) ([]*AppWorkflowMapping, error)
	FindWFCDMappingByCDPipelineId(cdPipelineId int) ([]*AppWorkflowMapping, error)
	DeleteAppWorkflowMapping(appWorkflow *AppWorkflowMapping, tx *pg.Tx) error
	FindWFCDMappingByCIPipelineIds(ciPipelineIds []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) DeleteAppWorkflow

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

func (AppWorkflowRepositoryImpl) DeleteAppWorkflowMapping

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

func (AppWorkflowRepositoryImpl) FindByAppId

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

func (AppWorkflowRepositoryImpl) FindByComponent

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

func (AppWorkflowRepositoryImpl) FindByIdAndAppId

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

func (AppWorkflowRepositoryImpl) FindByNameAndAppId

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

func (AppWorkflowRepositoryImpl) FindByWorkflowId

func (impl AppWorkflowRepositoryImpl) FindByWorkflowId(workflowId 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) FindWFCIMappingByCIPipelineId

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

func (AppWorkflowRepositoryImpl) FindWFCIMappingByWorkflowId

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

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) UpdateAppWorkflow

func (impl AppWorkflowRepositoryImpl) UpdateAppWorkflow(wf *AppWorkflow) (*AppWorkflow, 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

Jump to

Keyboard shortcuts

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