data

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Starter)

Option configures a Starter.

func WithAutoMigrateModels

func WithAutoMigrateModels(models ...any) Option

WithAutoMigrateModels specifies models to auto-migrate on database start.

type Starter

type Starter struct {
	// contains filtered or unexported fields
}

Starter auto-configures the DB connection when gorm.io/driver/sqlite is available.

func New

func New(cfg helixconfig.Loader, opts ...Option) *Starter

New creates a Starter using the provided configuration loader.

func (*Starter) Condition

func (s *Starter) Condition() bool

Condition reports whether the data starter should be activated.

func (*Starter) Configure

func (s *Starter) Configure(container *core.Container) error

Configure registers DB components and a lifecycle into the container.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL