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 WithContext ¶ added in v0.21.0
WithContext sets the context 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 PipelineInterface ¶ added in v0.20.0
type PipelineInterface interface { // CreatePipelineIndexes defines a function that creates the indexes for the pipelines table. CreatePipelineIndexes(context.Context) error // CreatePipelineTable defines a function that creates the pipelines table. CreatePipelineTable(context.Context, string) error // CountPipelines defines a function that gets the count of all pipelines. CountPipelines(context.Context) (int64, error) // CountPipelinesForRepo defines a function that gets the count of pipelines by repo ID. CountPipelinesForRepo(context.Context, *api.Repo) (int64, error) // CreatePipeline defines a function that creates a new pipeline. CreatePipeline(context.Context, *library.Pipeline) (*library.Pipeline, error) // DeletePipeline defines a function that deletes an existing pipeline. DeletePipeline(context.Context, *library.Pipeline) error // GetPipeline defines a function that gets a pipeline by ID. GetPipeline(context.Context, int64) (*library.Pipeline, error) // GetPipelineForRepo defines a function that gets a pipeline by commit SHA and repo ID. GetPipelineForRepo(context.Context, string, *api.Repo) (*library.Pipeline, error) // ListPipelines defines a function that gets a list of all pipelines. ListPipelines(context.Context) ([]*library.Pipeline, error) // ListPipelinesForRepo defines a function that gets a list of pipelines by repo ID. ListPipelinesForRepo(context.Context, *api.Repo, int, int) ([]*library.Pipeline, int64, error) // UpdatePipeline defines a function that updates an existing pipeline. UpdatePipeline(context.Context, *library.Pipeline) (*library.Pipeline, error) }
PipelineInterface represents the Vela interface for pipeline functions with the supported Database backends.
Click to show internal directories.
Click to hide internal directories.