repository

package
v0.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	User    UserRepository
	Session SessionRepository
}

Repository collects the repositories for each model

type SessionRepository

type SessionRepository interface {
	CreateSession(session *models.Session) (*models.Session, error)
	UpdateSession(session *models.Session) (*models.Session, error)
	DeleteSession(session *models.Session) (*models.Session, error)
	SelectSession(session *models.Session) (*models.Session, error)
}

SessionRepository represents the set of queries on the Session model

type UserRepository

type UserRepository interface {
	CreateUser(user *models.User) (*models.User, error)
	CheckPassword(id int, pwd string) (bool, error)
	ReadUser(id uint) (*models.User, error)
	ReadUserByEmail(email string) (*models.User, error)
	UpdateUser(user *models.User) (*models.User, error)
	DeleteUser(user *models.User) (*models.User, error)
}

UserRepository represents the set of queries on the User model

type WriteUser

type WriteUser func(user *models.User) (*models.User, error)

WriteUser is the function type for all User write operations

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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