Help us shape the future of Go! Take the 2026 Go Developer Survey

repository

package
v0.9.78 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	*database.BaseRepository
	// contains filtered or unexported fields
}

func New

func New(
	baseRepository *database.BaseRepository,
	cache cacheAccessor,
	secretCacheTTL time.Duration,
) *Repository

func (*Repository) AssignRoleToUser

func (r *Repository) AssignRoleToUser(ctx context.Context, userID int, roleName string) error

func (*Repository) CreateUser

func (r *Repository) CreateUser(ctx context.Context, user *models.User) error

func (*Repository) DeleteUser

func (r *Repository) DeleteUser(ctx context.Context, user *models.User) error

func (*Repository) GetToken

func (r *Repository) GetToken(ctx context.Context, hashedToken string) (*models.Token, error)

func (*Repository) GetUserByEmail

func (r *Repository) GetUserByEmail(ctx context.Context, email string) (*models.User, error)

func (*Repository) GetUserByID

func (r *Repository) GetUserByID(ctx context.Context, id int) (*models.User, error)

func (*Repository) GetUserByUUID

func (r *Repository) GetUserByUUID(ctx context.Context, uuid string) (*models.User, error)

func (*Repository) ListUsers

func (r *Repository) ListUsers(ctx context.Context, limit, offset int) ([]*models.User, error)

func (*Repository) SaveUserHistoryRecord

func (r *Repository) SaveUserHistoryRecord(ctx context.Context, record *models.UserHistoryRecord) error

func (*Repository) UpdateTokenLastUsed

func (r *Repository) UpdateTokenLastUsed(ctx context.Context, tokenID int, when time.Time) error

func (*Repository) UpdateUser

func (r *Repository) UpdateUser(ctx context.Context, user *models.User) error

Jump to

Keyboard shortcuts

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