Documentation ¶
Index ¶
- Variables
- type DB
- func (m *DB) AuthenticateUser(email, password string) (*models.User, error)
- func (d *DB) Connect(dialect string, dsn string) error
- func (m *DB) CreateIfNotExists(name string) (*models.Tag, error)
- func (m *DB) GetBookmark(id uint, user *models.User) (*models.Bookmark, error)
- func (m *DB) GetBookmarks(user *models.User) ([]*models.Bookmark, error)
- func (m *DB) GetTag(id uint) (*models.Tag, error)
- func (m *DB) GetTagByName(name string, user *models.User) (*models.Tag, error)
- func (m *DB) GetTags(user *models.User) ([]*models.Tag, error)
- func (m *DB) GetUser(id uint) (*models.User, error)
- func (m *DB) InsertBookmark(bookmark *models.Bookmark) error
- func (m *DB) InsertTag(tag *models.Tag) (uint, error)
- func (m *DB) InsertUser(name, email, password string) error
- func (m *DB) LatestBookmarks() ([]*models.Bookmark, error)
- func (m *DB) LatestTags() ([]*models.Tag, error)
- func (d *DB) Migrate() error
- func (m *DB) UpdateBookmark(bookmark *models.Bookmark) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DialectNotSupported = errors.New("Dialect not supported. [sqlite, postgres]")
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) AuthenticateUser ¶
func (*DB) CreateIfNotExists ¶
CreateIfNotExists gets a single tag from the DB or create it if it doesn't exist
func (*DB) GetBookmark ¶
GetBookmark gets a single bookmark from the DB
func (*DB) GetBookmarks ¶
GetBookmarks gets all bookmarks
func (*DB) GetTagByName ¶
Get gets a single tag from the DB by name
func (*DB) InsertBookmark ¶
InsertBookmark adds a bookmark to the DB
func (*DB) InsertUser ¶
func (*DB) LatestBookmarks ¶
LatestBookmarks gets the 100 most recent bookmarks from the DB
func (*DB) LatestTags ¶
Latest gets the 10 most recent tags from the DB
Click to show internal directories.
Click to hide internal directories.