Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CreatePostgresTable represents a query to create the Postgres pipelines table. CreatePostgresTable = `` /* 511-byte string literal not displayed */ // CreateSqliteTable represents a query to create the Sqlite pipelines table. CreateSqliteTable = `` /* 480-byte string literal not displayed */ )
View Source
const ( // CreateRepoIDIndex represents a query to create an // index on the pipelines table for the repo_id column. CreateRepoIDIndex = ` CREATE INDEX IF NOT EXISTS pipelines_repo_id ON pipelines (repo_id); ` )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EngineOpt ¶
type EngineOpt func(*engine) error
EngineOpt represents a configuration option to initialize the database engine for Pipelines.
func WithClient ¶
WithClient sets the gorm.io/gorm client in the database engine for Pipelines.
func WithCompressionLevel ¶
WithCompressionLevel sets the compression level in the database engine for Pipelines.
func WithLogger ¶
WithLogger sets the github.com/sirupsen/logrus logger in the database engine for Pipelines.
func WithSkipCreation ¶
WithSkipCreation sets the skip creation logic in the database engine for Pipelines.
type PipelineService ¶
type PipelineService interface { // CreatePipelineIndexes defines a function that creates the indexes for the pipelines table. CreatePipelineIndexes() error // CreatePipelineTable defines a function that creates the pipelines table. CreatePipelineTable(string) error // CountPipelines defines a function that gets the count of all pipelines. CountPipelines() (int64, error) // CountPipelinesForRepo defines a function that gets the count of pipelines by repo ID. CountPipelinesForRepo(*library.Repo) (int64, error) // CreatePipeline defines a function that creates a new pipeline. CreatePipeline(*library.Pipeline) error // DeletePipeline defines a function that deletes an existing pipeline. DeletePipeline(*library.Pipeline) error // GetPipeline defines a function that gets a pipeline by ID. GetPipeline(int64) (*library.Pipeline, error) // GetPipelineForRepo defines a function that gets a pipeline by commit SHA and repo ID. GetPipelineForRepo(string, *library.Repo) (*library.Pipeline, error) // ListPipelines defines a function that gets a list of all pipelines. ListPipelines() ([]*library.Pipeline, error) // ListPipelinesForRepo defines a function that gets a list of pipelines by repo ID. ListPipelinesForRepo(*library.Repo, int, int) ([]*library.Pipeline, int64, error) // UpdatePipeline defines a function that updates an existing pipeline. UpdatePipeline(*library.Pipeline) error }
PipelineService represents the Vela interface for pipeline functions with the supported Database backends.
Click to show internal directories.
Click to hide internal directories.