Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CreatePostgresTable represents a query to create the Postgres steps table. CreatePostgresTable = `` /* 529-byte string literal not displayed */ // CreateSqliteTable represents a query to create the Sqlite steps table. CreateSqliteTable = `` /* 472-byte string literal not displayed */ )
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 Steps.
func WithClient ¶
WithClient sets the gorm.io/gorm client in the database engine for Steps.
func WithContext ¶ added in v0.23.0
WithContext sets the context in the database engine for Steps.
func WithLogger ¶
WithLogger sets the github.com/sirupsen/logrus logger in the database engine for Steps.
func WithSkipCreation ¶
WithSkipCreation sets the skip creation logic in the database engine for Steps.
type StepInterface ¶ added in v0.20.0
type StepInterface interface { // CreateStepTable defines a function that creates the steps table. CreateStepTable(context.Context, string) error // CleanSteps defines a function that sets running or pending steps to error status before a given created time. CleanSteps(context.Context, string, int64) (int64, error) // CountSteps defines a function that gets the count of all steps. CountSteps(context.Context) (int64, error) // CountStepsForBuild defines a function that gets the count of steps by build ID. CountStepsForBuild(context.Context, *api.Build, map[string]interface{}) (int64, error) // CreateStep defines a function that creates a new step. CreateStep(context.Context, *library.Step) (*library.Step, error) // DeleteStep defines a function that deletes an existing step. DeleteStep(context.Context, *library.Step) error // GetStep defines a function that gets a step by ID. GetStep(context.Context, int64) (*library.Step, error) // GetStepForBuild defines a function that gets a step by number and build ID. GetStepForBuild(context.Context, *api.Build, int) (*library.Step, error) // ListSteps defines a function that gets a list of all steps. ListSteps(ctx context.Context) ([]*library.Step, error) // ListStepsForBuild defines a function that gets a list of steps by build ID. ListStepsForBuild(context.Context, *api.Build, map[string]interface{}, int, int) ([]*library.Step, int64, error) // ListStepImageCount defines a function that gets a list of all step images and the count of their occurrence. ListStepImageCount(context.Context) (map[string]float64, error) // ListStepStatusCount defines a function that gets a list of all step statuses and the count of their occurrence. ListStepStatusCount(context.Context) (map[string]float64, error) // UpdateStep defines a function that updates an existing step. UpdateStep(context.Context, *library.Step) (*library.Step, error) }
StepInterface represents the Vela interface for step functions with the supported Database backends.
Click to show internal directories.
Click to hide internal directories.