db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mysqlxorm.Interface
}

func (*Client) BatchDeletePipelineDefinition

func (client *Client) BatchDeletePipelineDefinition(ids []string, ops ...mysqlxorm.SessionOption) error

func (*Client) BatchDeletePipelineDefinitionExtra

func (client *Client) BatchDeletePipelineDefinitionExtra(ids []string, ops ...mysqlxorm.SessionOption) error

func (*Client) CountPipelineDefinition

func (client *Client) CountPipelineDefinition(session *xorm.Session) (int64, error)

func (*Client) CreatePipelineDefinition

func (client *Client) CreatePipelineDefinition(pipelineDefinition *PipelineDefinition, ops ...mysqlxorm.SessionOption) (err error)

func (*Client) CreatePipelineDefinitionExtra

func (client *Client) CreatePipelineDefinitionExtra(pipelineDefinitionExtra *PipelineDefinitionExtra, ops ...mysqlxorm.SessionOption) (err error)

func (*Client) DeletePipelineDefinition

func (client *Client) DeletePipelineDefinition(id string, ops ...mysqlxorm.SessionOption) error

func (*Client) DeletePipelineDefinitionByRemote

func (client *Client) DeletePipelineDefinitionByRemote(remote string, ops ...mysqlxorm.SessionOption) error

func (*Client) DeletePipelineDefinitionExtraByRemote

func (client *Client) DeletePipelineDefinitionExtraByRemote(remote string, ops ...mysqlxorm.SessionOption) error

func (*Client) DeletePipelineDefinitionExtraExtra

func (client *Client) DeletePipelineDefinitionExtraExtra(id string, ops ...mysqlxorm.SessionOption) error

func (*Client) GetPipelineDefinition

func (client *Client) GetPipelineDefinition(id string, ops ...mysqlxorm.SessionOption) (*PipelineDefinition, error)

func (*Client) GetPipelineDefinitionBySourceID

func (client *Client) GetPipelineDefinitionBySourceID(sourceID string, ops ...mysqlxorm.SessionOption) (*PipelineDefinition, bool, error)

func (*Client) GetPipelineDefinitionExtra

func (client *Client) GetPipelineDefinitionExtra(id string, ops ...mysqlxorm.SessionOption) (*PipelineDefinitionExtra, error)

func (*Client) GetPipelineDefinitionExtraByDefinitionID

func (client *Client) GetPipelineDefinitionExtraByDefinitionID(definitionID string, ops ...mysqlxorm.SessionOption) (*PipelineDefinitionExtra, error)

func (*Client) GetPipelineDefinitionListInSourceIDs

func (client *Client) GetPipelineDefinitionListInSourceIDs(ids []string, ops ...mysqlxorm.SessionOption) ([]PipelineDefinition, error)

func (*Client) ListPipelineDefinition

func (client *Client) ListPipelineDefinition(req *pb.PipelineDefinitionListRequest, ops ...mysqlxorm.SessionOption) ([]PipelineDefinitionSource, int64, error)

func (*Client) ListPipelineDefinitionByRemote

func (client *Client) ListPipelineDefinitionByRemote(remote string, ops ...mysqlxorm.SessionOption) ([]PipelineDefinitionSource, error)

func (*Client) ListPipelineDefinitionExtra

func (client *Client) ListPipelineDefinitionExtra(idList []string, ops ...mysqlxorm.SessionOption) ([]PipelineDefinitionExtra, error)

func (*Client) ListPipelineDefinitionExtraByDefinitionIDList

func (client *Client) ListPipelineDefinitionExtraByDefinitionIDList(definitionIDList []string, ops ...mysqlxorm.SessionOption) ([]PipelineDefinitionExtra, error)

func (*Client) ListUsedRef

func (client *Client) ListUsedRef(req *pb.PipelineDefinitionUsedRefListRequest, ops ...mysqlxorm.SessionOption) (refs []string, err error)

func (*Client) StatisticsGroupByFilePath

func (client *Client) StatisticsGroupByFilePath(req *pb.PipelineDefinitionStatisticsRequest, ops ...mysqlxorm.SessionOption) ([]PipelineDefinitionStatistics, error)

func (*Client) StatisticsGroupByRemote

func (client *Client) StatisticsGroupByRemote(req *pb.PipelineDefinitionStatisticsRequest, ops ...mysqlxorm.SessionOption) ([]PipelineDefinitionStatistics, error)

func (*Client) UpdatePipelineDefinition

func (client *Client) UpdatePipelineDefinition(id string, pipelineDefinition *PipelineDefinition, ops ...mysqlxorm.SessionOption) error

func (*Client) UpdatePipelineDefinitionExtra

func (client *Client) UpdatePipelineDefinitionExtra(id string, pipelineDefinitionExtra *PipelineDefinitionExtra, ops ...mysqlxorm.SessionOption) error

type PipelineDefinition

type PipelineDefinition struct {
	ID                string    `json:"id" xorm:"pk"`
	Location          string    `json:"location"`
	Name              string    `json:"name"`
	CostTime          int64     `json:"costTime"`
	Creator           string    `json:"creator"`
	Executor          string    `json:"executor"`
	SoftDeletedAt     uint64    `json:"softDeletedAt"`
	PipelineSourceId  string    `json:"pipelineSourceId"`
	Category          string    `json:"category"`
	Status            string    `json:"status"`
	StartedAt         time.Time `json:"startedAt,omitempty" xorm:"started_at"`
	EndedAt           time.Time `json:"endedAt,omitempty" xorm:"ended_at"`
	TimeCreated       time.Time `json:"timeCreated,omitempty" xorm:"created_at created"`
	TimeUpdated       time.Time `json:"timeUpdated,omitempty" xorm:"updated_at updated"`
	PipelineID        uint64    `json:"pipelineId"`
	TotalActionNum    int64     `json:"totalActionNum"`
	ExecutedActionNum int64     `json:"executedActionNum"`
	Ref               string    `json:"ref"`
}

func (PipelineDefinition) TableName

func (PipelineDefinition) TableName() string

type PipelineDefinitionExtra

type PipelineDefinitionExtra struct {
	ID                   string                                  `json:"id" xorm:"pk"`
	Extra                apistructs.PipelineDefinitionExtraValue `json:"extra" xorm:"json"`
	TimeCreated          *time.Time                              `json:"timeCreated,omitempty" xorm:"created_at created"`
	TimeUpdated          *time.Time                              `json:"timeUpdated,omitempty" xorm:"updated_at updated"`
	PipelineDefinitionID string                                  `json:"pipelineDefinitionID"`
	PipelineSourceID     string                                  `json:"pipeline_source_id"`
	SoftDeletedAt        uint64                                  `json:"soft_deleted_at"`
}

func (PipelineDefinitionExtra) TableName

func (PipelineDefinitionExtra) TableName() string

type PipelineDefinitionSource

type PipelineDefinitionSource struct {
	PipelineDefinition `xorm:"extends"`

	SourceType string `json:"sourceType"`
	Remote     string `json:"remote"`
	Ref        string `json:"ref"`
	Path       string `json:"path"`
	FileName   string `json:"fileName"`
}

func (*PipelineDefinitionSource) Convert

type PipelineDefinitionStatistics

type PipelineDefinitionStatistics struct {
	Group      string
	FailedNum  uint64
	RunningNum uint64
	TotalNum   uint64
}

Jump to

Keyboard shortcuts

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