repository

package
v0.0.0-...-91b8838 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package repository provides methods for interacting with the data store.

Index

Constants

This section is empty.

Variables

View Source
var ErrorBadID error = errors.New("bad id")

ErrorBadID is just an error indicating a 'bad id'.

Functions

This section is empty.

Types

type UsersRepository

type UsersRepository interface {
	Save(user *models.User) error
	GetById(id uint64) (user *models.User, err error)
	GetByUid(uid string) (user *models.User, err error)
	GetByEmail(email string) (user *models.User, err error)
	GetAll() (users []*models.User, err error)
	Update(user *models.User) error
	Delete(id uint64) error
}

UsersRepository interface defines the method signatures.

func NewUsersRepository

func NewUsersRepository(conn db.Connection) UsersRepository

NewUsersRepository takes a db connection and returns a UsersRepository.

Jump to

Keyboard shortcuts

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