repository

package
v0.0.0-...-7604373 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IUserRepository

type IUserRepository interface {
	Create(ctx context.Context, user *model.User) (*model.User, error)

	GetUsers(ctx context.Context, arg ...func(*gorm.DB)) ([]*model.User, error)

	Get(ctx context.Context, id int64) (*model.User, error)

	GetByUsername(ctx context.Context, username string) (*model.User, error)
}

type UserRepository

type UserRepository struct {
	gormutil.Repo[model.User]
}

func NewUserRepository

func NewUserRepository(db *gorm.DB) *UserRepository

func (*UserRepository) Create

func (u *UserRepository) Create(ctx context.Context, user *model.User) (*model.User, error)

func (*UserRepository) Get

func (u *UserRepository) Get(ctx context.Context, id int64) (*model.User, error)

func (*UserRepository) GetByUsername

func (u *UserRepository) GetByUsername(ctx context.Context, username string) (*model.User, error)

func (*UserRepository) GetUsers

func (u *UserRepository) GetUsers(ctx context.Context, arg ...func(*gorm.DB)) ([]*model.User, error)

Jump to

Keyboard shortcuts

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