store

package
v0.0.0-...-183713d Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const PasswordHashLen = 14

Variables

View Source
var (
	ErrNotFound  = errors.New("this user doesn't exist in the database")
	ErrWrongPass = errors.New("password is not correct")
)

Functions

This section is empty.

Types

type SQLURL

type SQLURL struct {
	DB *gorm.DB
}

func NewURL

func NewURL(d *gorm.DB) SQLURL

func (SQLURL) Insert

func (u SQLURL) Insert(url model.URL) error

type SQLUser

type SQLUser struct {
	DB *gorm.DB
}

func NewUser

func NewUser(d *gorm.DB) SQLUser

func (SQLUser) Insert

func (u SQLUser) Insert(user model.User) error

func (SQLUser) Retrieve

func (u SQLUser) Retrieve(user model.User) (model.User, error)

type URL

type URL interface {
	Insert(url model.URL) error
}

type User

type User interface {
	Insert(user model.User) error
	Retrieve(user model.User) (model.User, error)
}

Jump to

Keyboard shortcuts

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