Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CreatePostgresTable represents a query to create the Postgres dashboards table. CreatePostgresTable = `` /* 279-byte string literal not displayed */ // CreateSqliteTable represents a query to create the Sqlite dashboards table. CreateSqliteTable = `` /* 228-byte string literal not displayed */ )
Variables ¶
View Source
var ( // ErrEmptyDashName defines the error type when a // User type has an empty Name field provided. ErrEmptyDashName = errors.New("empty dashboard name provided") // ErrExceededAdminLimit defines the error type when a // User type has Admins field provided that exceeds the database limit. ErrExceededAdminLimit = errors.New("exceeded admins limit") )
Functions ¶
Types ¶
type DashboardInterface ¶
type DashboardInterface interface { // CreateDashboardTable defines a function that creates the dashboards table. CreateDashboardTable(context.Context, string) error // CreateDashboard defines a function that creates a dashboard. CreateDashboard(context.Context, *api.Dashboard) (*api.Dashboard, error) // DeleteDashboard defines a function that deletes a dashboard. DeleteDashboard(context.Context, *api.Dashboard) error // GetDashboard defines a function that gets a dashboard by ID. GetDashboard(context.Context, string) (*api.Dashboard, error) // UpdateDashboard defines a function that updates a dashboard. UpdateDashboard(context.Context, *api.Dashboard) (*api.Dashboard, error) }
DashboardInterface represents the Vela interface for repo functions with the supported Database backends.
type EngineOpt ¶
type EngineOpt func(*engine) error
EngineOpt represents a configuration option to initialize the database engine for dashboards.
func WithClient ¶
WithClient sets the gorm.io/gorm client in the database engine for dashboards.
func WithContext ¶
WithContext sets the context in the database engine for dashboards.
func WithDriver ¶
WithDriver sets the driver type in the database engine for dashboards.
func WithLogger ¶
WithLogger sets the github.com/sirupsen/logrus logger in the database engine for dashboards.
func WithSkipCreation ¶
WithSkipCreation sets the skip creation logic in the database engine for dashboards.
Click to show internal directories.
Click to hide internal directories.