dal

package
v0.0.0-...-1abdf65 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLogRepository

type AccessLogRepository interface {
	Fetch() (*[]models.AccessLog, error)
	GetByUserID(userID int) (*[]models.AccessLog, error)
	Create(accessLog *models.AccessLog) error
}

AccessLogRepository interface

type DAL

type DAL interface {
	OpenConnection(connURL string, debugSQL bool) error
	CloseConnection()
	Users() UserRepository
	AccessLogs() AccessLogRepository
	DB() *pg.DB
}

DAL (Data Access Layer)

func NewDAL

func NewDAL() DAL

NewDAL returns an implementation for the DAL interface

type UserRepository

type UserRepository interface {
	GetByID(id int) (*models.User, error)
	GetByUsername(username string) (*models.User, error)
	Fetch() (*[]models.User, error)
	Create(user *models.User) error
	Update(user *models.User) error
	Delete(id int) error
}

UserRepository interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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