shared

package
v0.0.0-...-84131a9 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupTaskData

func CleanupTaskData(db *sql.DB, tenantID uuid.UUID) error

CleanupTaskData removes task-related data for a tenant

func CleanupTestData

func CleanupTestData(db *sql.DB, tenantID uuid.UUID) error

CleanupTestData removes all test data for a tenant

func CleanupWorkflowData

func CleanupWorkflowData(db *sql.DB, tenantID uuid.UUID) error

CleanupWorkflowData removes workflow-related data for a tenant

func CleanupWorkspaceData

func CleanupWorkspaceData(db *sql.DB, tenantID uuid.UUID) error

CleanupWorkspaceData removes workspace-related data for a tenant

func CreateTestTenant

func CreateTestTenant(db *sql.DB) (uuid.UUID, error)

CreateTestTenant creates a test tenant

func CreateTestUser

func CreateTestUser(db *sql.DB, tenantID uuid.UUID) (uuid.UUID, error)

CreateTestUser creates a test user

func GetTestDatabase

func GetTestDatabase(ctx context.Context) (*sql.DB, error)

GetTestDatabase returns a test database connection

func RunMigrations

func RunMigrations(db *sql.DB) error

RunMigrations runs database migrations

func WaitForCondition

func WaitForCondition(timeout time.Duration, check func() bool) bool

WaitForCondition waits for a condition to be true with timeout

Types

type TestDatabaseConfig

type TestDatabaseConfig struct {
	Host     string
	Port     string
	User     string
	Password string
	Database string
	SSLMode  string
}

TestDatabaseConfig holds test database configuration

func GetTestDatabaseConfig

func GetTestDatabaseConfig() TestDatabaseConfig

GetTestDatabaseConfig returns test database configuration

Jump to

Keyboard shortcuts

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