repository

package
v0.0.0-...-0665d9d Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 5 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 {
	Save(ctx context.Context, user models.User) (int64, error)
	List(ctx context.Context, offset int, limit int) ([]models.User, error)
	FindById(ctx context.Context, id int64) (models.User, error)
}

func NewUserRepository

func NewUserRepository(db *sqlx.DB) IUserRepository

type UserRepository

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

func (*UserRepository) FindById

func (u *UserRepository) FindById(ctx context.Context, id int64) (models.User, error)

func (*UserRepository) List

func (u *UserRepository) List(ctx context.Context, offset int, limit int) ([]models.User, error)

func (*UserRepository) Save

func (u *UserRepository) Save(ctx context.Context, user models.User) (int64, error)

Jump to

Keyboard shortcuts

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