initializer

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package initializer initializes warnly for the first time.

Index

Constants

View Source
const (
	// DefaultTeamName is the default team name of the first team created.
	DefaultTeamName = "default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type InitService

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

InitService is a service for initializing (seeding) the database with initial data.

func NewInitService

func NewInitService(
	userStore warnly.UserStore,
	teamStore warnly.TeamStore,
	startUow uow.StartUnitOfWork,
	now func() time.Time,
) *InitService

NewInitService creates a new InitService instance.

func (*InitService) Init

func (s *InitService) Init(ctx context.Context, email, password string) error

Init initializes the database with initial data. It seeds the database with a default team and a default user. If the user already exists, it returns nil without doing anything.

Jump to

Keyboard shortcuts

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