database

package
v0.0.0-...-9ea3a31 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package database provides CRUD operations with database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UsersRepository

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

UsersRepository object capable of interacting with UsersRepository

func NewUsersRepository

func NewUsersRepository(db *database.Database, log *logger.Zerolog) *UsersRepository

NewUsersRepository creates a new UsersRepository

func (*UsersRepository) Create

func (repo *UsersRepository) Create(ctx context.Context, in *entity.User) (*entity.User, error)

Create creates new user

func (*UsersRepository) Get

func (repo *UsersRepository) Get(ctx context.Context, filter *entity.UsersFilter) ([]*entity.User, error)

Get returns users

func (*UsersRepository) GetByID

func (repo *UsersRepository) GetByID(ctx context.Context, id int64) (*entity.User, error)

GetByID returns user by id

Jump to

Keyboard shortcuts

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