repositories

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookmarkRepository

type BookmarkRepository struct {
	Conn *gorm.DB
}

BookmarkRepository represents the tag's repository contract.

func (*BookmarkRepository) Add

func (r *BookmarkRepository) Add(url string, title string, tags []string, notes string) (*models.Bookmark, error)

Add bookmark

func (*BookmarkRepository) DeleteByURL

func (r *BookmarkRepository) DeleteByURL(url string) (err error)

DeleteByURL removes bookmark and clear not active tags

func (*BookmarkRepository) List

func (r *BookmarkRepository) List(tagNames []string) ([]models.Bookmark, error)

List returns an array of tags.

func (*BookmarkRepository) Update

func (r *BookmarkRepository) Update(url string, newURL string, title string, tags []string, notes string) (*models.Bookmark, error)

Update bookmark

type TagRepository

type TagRepository struct {
	Conn *gorm.DB
}

TagRepository represents the tag's repository contract.

func (*TagRepository) DeleteNotActive

func (r *TagRepository) DeleteNotActive() (err error)

DeleteNotActive removes not used tags

func (*TagRepository) List

func (r *TagRepository) List(onlyActive bool) []models.Tag

List returns an array of tags.

Jump to

Keyboard shortcuts

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