repositories

package
v0.0.0-...-fa3a857 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TenantRepo

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

func NewTenantRepo

func NewTenantRepo(dbpool *pgxpool.Pool) *TenantRepo

func (*TenantRepo) CheckIfExistsById

func (r *TenantRepo) CheckIfExistsById(ctx context.Context, id uint64) (bool, error)

func (*TenantRepo) CheckIfExistsByName

func (r *TenantRepo) CheckIfExistsByName(ctx context.Context, name string) (bool, error)

func (*TenantRepo) GetById

func (r *TenantRepo) GetById(ctx context.Context, id uint64) (*models.Tenant, error)

func (*TenantRepo) GetByUuid

func (r *TenantRepo) GetByUuid(ctx context.Context, uid string) (*models.Tenant, error)

func (*TenantRepo) Insert

func (r *TenantRepo) Insert(ctx context.Context, m *models.Tenant) error

func (*TenantRepo) InsertOrUpdateById

func (r *TenantRepo) InsertOrUpdateById(ctx context.Context, m *models.Tenant) error

func (*TenantRepo) ListAllIds

func (r *TenantRepo) ListAllIds(ctx context.Context) ([]uint64, error)

func (*TenantRepo) ListAllUuids

func (r *TenantRepo) ListAllUuids(ctx context.Context) ([]string, error)

func (*TenantRepo) UpdateById

func (r *TenantRepo) UpdateById(ctx context.Context, m *models.Tenant) error

type UserRepo

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

func NewUserRepo

func NewUserRepo(dbpool *pgxpool.Pool) *UserRepo

func (*UserRepo) CheckIfExistsByEmail

func (r *UserRepo) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error)

func (*UserRepo) CheckIfExistsById

func (r *UserRepo) CheckIfExistsById(ctx context.Context, id uint64) (bool, error)

func (*UserRepo) GetByEmail

func (r *UserRepo) GetByEmail(ctx context.Context, email string) (*models.User, error)

func (*UserRepo) GetById

func (r *UserRepo) GetById(ctx context.Context, id uint64) (*models.User, error)

func (*UserRepo) Insert

func (r *UserRepo) Insert(ctx context.Context, m *models.User) error

func (*UserRepo) InsertOrUpdateByEmail

func (r *UserRepo) InsertOrUpdateByEmail(ctx context.Context, m *models.User) error

func (*UserRepo) InsertOrUpdateById

func (r *UserRepo) InsertOrUpdateById(ctx context.Context, m *models.User) error

func (*UserRepo) UpdateByEmail

func (r *UserRepo) UpdateByEmail(ctx context.Context, m *models.User) error

func (*UserRepo) UpdateById

func (r *UserRepo) UpdateById(ctx context.Context, m *models.User) error

Jump to

Keyboard shortcuts

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