Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CreatePostgresTable represents a query to create the Postgres logs table. CreatePostgresTable = `` /* 229-byte string literal not displayed */ // CreateSqliteTable represents a query to create the Sqlite logs table. CreateSqliteTable = `` /* 243-byte string literal not displayed */ )
View Source
const ( // CreateBuildIDIndex represents a query to create an // index on the logs table for the build_id column. CreateBuildIDIndex = ` CREATE INDEX IF NOT EXISTS logs_build_id ON logs (build_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 Logs.
func WithClient ¶
WithClient sets the gorm.io/gorm client in the database engine for Logs.
func WithCompressionLevel ¶
WithCompressionLevel sets the compression level in the database engine for Logs.
func WithContext ¶ added in v0.21.0
WithContext sets the context in the database engine for Logs.
func WithLogger ¶
WithLogger sets the github.com/sirupsen/logrus logger in the database engine for Logs.
func WithSkipCreation ¶
WithSkipCreation sets the skip creation logic in the database engine for Logs.
type LogInterface ¶ added in v0.20.0
type LogInterface interface { // CreateLogIndexes defines a function that creates the indexes for the logs table. CreateLogIndexes(context.Context) error // CreateLogTable defines a function that creates the logs table. CreateLogTable(context.Context, string) error // CountLogs defines a function that gets the count of all logs. CountLogs(context.Context) (int64, error) // CountLogsForBuild defines a function that gets the count of logs by build ID. CountLogsForBuild(context.Context, *api.Build) (int64, error) // CreateLog defines a function that creates a new log. CreateLog(context.Context, *library.Log) error // DeleteLog defines a function that deletes an existing log. DeleteLog(context.Context, *library.Log) error // GetLog defines a function that gets a log by ID. GetLog(context.Context, int64) (*library.Log, error) // GetLogForService defines a function that gets a log by service ID. GetLogForService(context.Context, *library.Service) (*library.Log, error) // GetLogForStep defines a function that gets a log by step ID. GetLogForStep(context.Context, *library.Step) (*library.Log, error) // ListLogs defines a function that gets a list of all logs. ListLogs(context.Context) ([]*library.Log, error) // ListLogsForBuild defines a function that gets a list of logs by build ID. ListLogsForBuild(context.Context, *api.Build, int, int) ([]*library.Log, int64, error) // UpdateLog defines a function that updates an existing log. UpdateLog(context.Context, *library.Log) error }
LogInterface represents the Vela interface for log functions with the supported Database backends.
Click to show internal directories.
Click to hide internal directories.