daos

package
v0.10.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

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

func New

func New(
	dbConn *gorm.DB,
	tenantConfig *config.TenantConfig,
	databaseConfig *config.DatabaseConfig,
) *Dao

func (*Dao) AutoMigrateSchemas

func (d *Dao) AutoMigrateSchemas(args ...string) error

func (*Dao) CreateAdmin

func (d *Dao) CreateAdmin(admin *entities.Admin) error

func (*Dao) CreateAuth

func (d *Dao) CreateAuth(auth *entities.Auth) error

func (*Dao) CreateSchema

func (d *Dao) CreateSchema(schemaName string) error

func (*Dao) DB

func (d *Dao) DB() *gorm.DB

func (*Dao) Delete

func (d *Dao) Delete(model entities.Model) error

func (*Dao) DropSchema

func (d *Dao) DropSchema(schemaName string) error

func (*Dao) FindAdminByEmail

func (d *Dao) FindAdminByEmail(email string) (*entities.Admin, error)

func (*Dao) FindAdminById

func (d *Dao) FindAdminById(id uuid.UUID) (*entities.Admin, error)

func (*Dao) FindAuthByIdentity

func (d *Dao) FindAuthByIdentity(identity string) (*entities.Auth, error)

func (*Dao) FindBy

func (d *Dao) FindBy(model entities.Model, where any) error

func (*Dao) MigrateSchema

func (d *Dao) MigrateSchema(schemaName string, args ...string) error

func (*Dao) ResetSchema

func (d *Dao) ResetSchema() error

func (*Dao) Save

func (d *Dao) Save(model entities.Model) error

func (*Dao) SaveAdmin

func (d *Dao) SaveAdmin(admin *entities.Admin) error

func (*Dao) Update

func (d *Dao) Update(model entities.Model, where any, column string, value any) error

func (*Dao) UpdatePassword

func (d *Dao) UpdatePassword(identity, newPasswordHash string) error

func (*Dao) Updates

func (d *Dao) Updates(model entities.Model, updates entities.Model) error

func (*Dao) WithSchemaSession

func (d *Dao) WithSchemaSession(schemaName string) (*gorm.DB, error)

Jump to

Keyboard shortcuts

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