test

package
v0.0.0-...-ee8fb57 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnknownDialectError = errors.New("unknown dialect")

Functions

func NewEmailRepo

func NewEmailRepo(init []*ent.Email, primaryEmail *ent.PrimaryEmail) dal.IEmailRepo

func NewPasscodeRepo

func NewPasscodeRepo(init []*ent.Passcode) dal.IPasscodeRepo

func NewRepo

func NewRepo(
	db *ent.Client,
	user []*ent.User,
	waCredential []*ent.WebauthnCredential,
	waSessionData []*ent.WebauthnSessionData,
	passcode []*ent.Passcode,
	email []*ent.Email,
	primaryEmail *ent.PrimaryEmail,
) dal.IAuthRepo

func NewUserRepo

func NewUserRepo(init []*ent.User) dal.IUserRepo

func NewWebauthnCredentialRepo

func NewWebauthnCredentialRepo(init []*ent.WebauthnCredential) dal.IWebauthnCredentialRepo

func NewWebauthnSessionRepo

func NewWebauthnSessionRepo(init []*ent.WebauthnSessionData) dal.IWebauthnSessionRepo

func PurgeDB

func PurgeDB(db *TestDB) error

PurgeDB stops the docker container.

Types

type Ctx

type Ctx = context.Context

type TestDB

type TestDB struct {
	DatabaseUrl string
	DbCon       *sql.DB
	Dialect     string
	// contains filtered or unexported fields
}

func StartDB

func StartDB(name string, dialect string) (*TestDB, error)

StartDB starts a database in a docker container with the specified dialect and name. The name is used to name the container, so that multiple container can be started in parallel.

Jump to

Keyboard shortcuts

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