Documentation
¶
Overview ¶
Package database implements the functions, types, and contracts for the module.
Index ¶
Constants ¶
View Source
const ( Module = "storage.database" ErrDatabaseConfigNil = errors.String("database: config is nil") )
Variables ¶
View Source
var DefaultProvider component.Provider = func(ctx context.Context, h component.Handle) (any, error) { cfg, err := comp.AsConfig[databasev1.DatabaseConfig](h) if err != nil { return nil, err } return New(cfg) }
DefaultProvider is the default provider for database components.
Functions ¶
func New ¶
func New(cfg *databasev1.DatabaseConfig, opts ...options.Option) (storageiface.Database, error)
func Resolve ¶ added in v0.2.19
func Resolve(ctx context.Context, source any, opts *component.LoadOptions) (*component.ModuleConfig, error)
Resolve resolves the database configuration.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.