Documentation ¶
Index ¶
- func InitRoute(r fiber.Router)
- type Bookmark
- type BookmarkRepository
- type BookmarkRepositoryDB
- func (d BookmarkRepositoryDB) CreateBookmark(b Bookmark) *exception.AppError
- func (d BookmarkRepositoryDB) CreateTag(t Tag) *exception.AppError
- func (d BookmarkRepositoryDB) DeleteBookmark(id string, userId string) *exception.AppError
- func (d BookmarkRepositoryDB) DeleteTag(id string, userId string) *exception.AppError
- func (d BookmarkRepositoryDB) DeleteUnusedTag(b Bookmark, t Tag) *exception.AppError
- func (d BookmarkRepositoryDB) FindBookmarkByWord(userId string, word string) ([]Bookmark, *exception.AppError)
- func (d BookmarkRepositoryDB) GetAllBookmarks(userId string) ([]Bookmark, *exception.AppError)
- func (d BookmarkRepositoryDB) GetBookmarkById(userId string, id string) (Bookmark, *exception.AppError)
- func (d BookmarkRepositoryDB) GetBookmarkByTag(userId string, tag string) ([]Bookmark, *exception.AppError)
- func (d BookmarkRepositoryDB) GetBookmarkByTags(userId string, tags []string) ([]Bookmark, *exception.AppError)
- func (d BookmarkRepositoryDB) GetTagByName(userId string, name string) (Tag, *exception.AppError)
- func (d BookmarkRepositoryDB) GetTags(userId string) ([]Tag, *exception.AppError)
- func (d BookmarkRepositoryDB) GetUniqueTags(userId string) ([]Tag, *exception.AppError)
- func (d BookmarkRepositoryDB) UpdateBookmark(b Bookmark) *exception.AppError
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bookmark ¶
type Bookmark struct { Id string `gorm:"primaryKey" json:"id"` Name string `json:"name,omitempty"` Url string `json:"url,omitempty"` Icon string `json:"icon,omitempty"` Description string `json:"description,omitempty"` Tags []*Tag `gorm:"many2many:bookmark_tags" json:"tags,omitempty"` UserId string `gorm:"index" json:"-"` }
type BookmarkRepository ¶
type BookmarkRepository interface { GetAllBookmarks(userId string) ([]Bookmark, *exception.AppError) GetBookmarkById(userId string, id string) (Bookmark, *exception.AppError) CreateBookmark(b Bookmark) *exception.AppError UpdateBookmark(b Bookmark) *exception.AppError DeleteBookmark(id string, userId string) *exception.AppError GetBookmarkByTag(userId string, tag string) ([]Bookmark, *exception.AppError) GetBookmarkByTags(userId string, tags []string) ([]Bookmark, *exception.AppError) FindBookmarkByWord(userId string, word string) ([]Bookmark, *exception.AppError) GetTags(userId string) ([]Tag, *exception.AppError) GetUniqueTags(userId string) ([]Tag, *exception.AppError) DeleteTag(id string, userId string) *exception.AppError GetTagByName(userId string, name string) (Tag, *exception.AppError) CreateTag(t Tag) *exception.AppError DeleteUnusedTag(b Bookmark, t Tag) *exception.AppError }
type BookmarkRepositoryDB ¶
type BookmarkRepositoryDB struct {
// contains filtered or unexported fields
}
func NewBookmarkRepository ¶
func NewBookmarkRepository() BookmarkRepositoryDB
func (BookmarkRepositoryDB) CreateBookmark ¶
func (d BookmarkRepositoryDB) CreateBookmark(b Bookmark) *exception.AppError
func (BookmarkRepositoryDB) CreateTag ¶
func (d BookmarkRepositoryDB) CreateTag(t Tag) *exception.AppError
func (BookmarkRepositoryDB) DeleteBookmark ¶
func (d BookmarkRepositoryDB) DeleteBookmark(id string, userId string) *exception.AppError
func (BookmarkRepositoryDB) DeleteTag ¶
func (d BookmarkRepositoryDB) DeleteTag(id string, userId string) *exception.AppError
func (BookmarkRepositoryDB) DeleteUnusedTag ¶
func (d BookmarkRepositoryDB) DeleteUnusedTag(b Bookmark, t Tag) *exception.AppError
func (BookmarkRepositoryDB) FindBookmarkByWord ¶
func (BookmarkRepositoryDB) GetAllBookmarks ¶
func (d BookmarkRepositoryDB) GetAllBookmarks(userId string) ([]Bookmark, *exception.AppError)
func (BookmarkRepositoryDB) GetBookmarkById ¶
func (BookmarkRepositoryDB) GetBookmarkByTag ¶
func (BookmarkRepositoryDB) GetBookmarkByTags ¶
func (BookmarkRepositoryDB) GetTagByName ¶
func (BookmarkRepositoryDB) GetTags ¶
func (d BookmarkRepositoryDB) GetTags(userId string) ([]Tag, *exception.AppError)
func (BookmarkRepositoryDB) GetUniqueTags ¶
func (d BookmarkRepositoryDB) GetUniqueTags(userId string) ([]Tag, *exception.AppError)
func (BookmarkRepositoryDB) UpdateBookmark ¶
func (d BookmarkRepositoryDB) UpdateBookmark(b Bookmark) *exception.AppError
Click to show internal directories.
Click to hide internal directories.