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 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() error // CreateLogTable defines a function that creates the logs table. CreateLogTable(string) error // CountLogs defines a function that gets the count of all logs. CountLogs() (int64, error) // CountLogsForBuild defines a function that gets the count of logs by build ID. CountLogsForBuild(*library.Build) (int64, error) // CreateLog defines a function that creates a new log. CreateLog(*library.Log) error // DeleteLog defines a function that deletes an existing log. DeleteLog(*library.Log) error // GetLog defines a function that gets a log by ID. GetLog(int64) (*library.Log, error) // GetLogForService defines a function that gets a log by service ID. GetLogForService(*library.Service) (*library.Log, error) // GetLogForStep defines a function that gets a log by step ID. GetLogForStep(*library.Step) (*library.Log, error) // ListLogs defines a function that gets a list of all logs. ListLogs() ([]*library.Log, error) // ListLogsForBuild defines a function that gets a list of logs by build ID. ListLogsForBuild(*library.Build, int, int) ([]*library.Log, int64, error) // UpdateLog defines a function that updates an existing log. UpdateLog(*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.