stores

package
v0.0.0-...-6c0365e Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2017 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoRoom        = errors.New("Room: no room provided")
	ErrDuplicateName = errors.New("Room: that room name is already taken")
)
View Source
var (
	ErrNoUser           = errors.New("No user provided")
	ErrDuplicateEmail   = errors.New("That email is already registered with fixMoto")
	ErrGenericDBProblem = errors.New("There was a problem registering user please try again")
	ErrLoginProblem     = errors.New("That email/password is incorrect")
)

Functions

This section is empty.

Types

type RoomStore

type RoomStore interface {
	GetAll() (*[]*models.Room, error)
	Get(id int64) (*models.Room, error)
	GetWithinRadius(r *models.RoomQuery) (*[]*models.Room, error)
	Create(*models.Room) error
}

func CreateRoomStore

func CreateRoomStore(db *gorm.DB) RoomStore

CreateRoomStore creates the db table and holds a reference to the db connection

type UserStore

type UserStore interface {
	GetAll() (*[]*models.User, error)
	Get(id int64) (*models.User, error)
	GetByEmail(email string) (*models.User, error)
	Create(*models.User) error
}

func CreateUserStore

func CreateUserStore(db *gorm.DB) UserStore

CreateUserStore creates the db table and holds a reference to the db connection

Jump to

Keyboard shortcuts

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