initdb

package
v8.0.0-...-0afa3f7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, driver string, opts ...Option) (db *multitenancy.DB, cleanup func(), err error)

func CreateExampleData

func CreateExampleData(ctx context.Context, db *multitenancy.DB, opts ...CreateExampleDataOption) (err error)

func MakeBook

func MakeBook(tenant *models.Tenant, id int) *models.Book

func MakeTenant

func MakeTenant(id int) *models.Tenant

Types

type CreateExampleDataOption

type CreateExampleDataOption func(*CreateExampleDataOptions)

type CreateExampleDataOptions

type CreateExampleDataOptions struct {
	TenantCount int
	BookCount   int
}

type Option

type Option func(*Options)

type Options

type Options struct {
	MySQLInitScriptFilePath string
}

Jump to

Keyboard shortcuts

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