mock

package
v0.0.0-...-724514a Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct{}

func (*DB) AuthenticateUser

func (m *DB) AuthenticateUser(email, password string) (*models.User, error)

func (*DB) Close

func (d *DB) Close()

func (*DB) Connect

func (d *DB) Connect(dialect string, dsn string) error

func (*DB) CreateIfNotExists

func (m *DB) CreateIfNotExists(name string) (*models.Tag, error)

func (*DB) GetBookmark

func (m *DB) GetBookmark(id uint, user *models.User) (*models.Bookmark, error)

func (*DB) GetBookmarks

func (m *DB) GetBookmarks(user *models.User) ([]*models.Bookmark, error)

func (*DB) GetTag

func (m *DB) GetTag(id uint) (*models.Tag, error)

func (*DB) GetTagByName

func (m *DB) GetTagByName(name string, user *models.User) (*models.Tag, error)

func (*DB) GetTags

func (m *DB) GetTags(*models.User) ([]*models.Tag, error)

func (*DB) GetUser

func (m *DB) GetUser(id uint) (*models.User, error)

func (*DB) InsertBookmark

func (m *DB) InsertBookmark(*models.Bookmark) error

func (*DB) InsertTag

func (m *DB) InsertTag(tag *models.Tag) (uint, error)

func (*DB) InsertUser

func (m *DB) InsertUser(name, email, password string) error

func (*DB) LatestBookmarks

func (m *DB) LatestBookmarks() ([]*models.Bookmark, error)

func (*DB) Migrate

func (d *DB) Migrate() error

func (*DB) UpdateBookmark

func (m *DB) UpdateBookmark(*models.Bookmark) error

Jump to

Keyboard shortcuts

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