repository

package
v0.0.0-...-1bf48be Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoleRepository

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

func NewRoleRepository

func NewRoleRepository(dbPath string) *RoleRepository

func (*RoleRepository) Create

func (rr *RoleRepository) Create(ctx context.Context, role *model.Role) (*model.Role, error)

func (*RoleRepository) Delete

func (rr *RoleRepository) Delete(ctx context.Context, id int) error

func (*RoleRepository) GetMany

func (rr *RoleRepository) GetMany(ctx context.Context) ([]*model.Role, error)

func (*RoleRepository) GetManyById

func (rr *RoleRepository) GetManyById(ctx context.Context, ids []int) ([]*model.Role, error)

func (*RoleRepository) GetOne

func (rr *RoleRepository) GetOne(ctx context.Context, id int) (*model.Role, error)

func (*RoleRepository) Update

func (rr *RoleRepository) Update(ctx context.Context, role *model.Role) (*model.Role, error)

type UserRepository

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

func NewUserRepository

func NewUserRepository(dbPath string) *UserRepository

func (*UserRepository) Create

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

func (*UserRepository) Delete

func (ur *UserRepository) Delete(ctx context.Context, id int) error

func (*UserRepository) GetMany

func (ur *UserRepository) GetMany(ctx context.Context) ([]*model.User, error)

func (*UserRepository) GetOne

func (ur *UserRepository) GetOne(ctx context.Context, id int) (*model.User, error)

func (*UserRepository) Update

func (ur *UserRepository) Update(ctx context.Context, user *model.User) (*model.User, error)

func (*UserRepository) UpdatePassword

func (ur *UserRepository) UpdatePassword(
	ctx context.Context,
	user *model.User,
) (*model.User, error)

Jump to

Keyboard shortcuts

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