store

package
v0.0.0-...-78a9fc4 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRecordNotFound     = errors.New("record not found")
	ErrEmailAlreadyExists = errors.New("email already exists")
)

Functions

This section is empty.

Types

type GoteRepository

type GoteRepository interface {
	Create(gote *model.Gote) error
	FindByID(int, int) (*model.Gote, error)
	FindByUserID(int) ([]*model.Gote, error)
	Update(gote *model.Gote) error
	DeleteByID(userID int, goteID int) error
}

GoteRepository interface

type Store

type Store interface {
	User() UserRepository
	Gote() GoteRepository
}

Store interface of data models

type UserRepository

type UserRepository interface {
	Create(user *model.User) error
	FindByID(int) (*model.User, error)
	FindByEmail(string) (*model.User, error)
	EmailExists(email string) (bool, error)
}

UserRepository interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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