Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bookmark ¶
type Bookmark struct { ID string `gorm:"primary_key;TYPE:varchar(255);COLUMN:id"` Path string `gorm:"TYPE:varchar(255);COLUMN:path;NOT NULL;INDEX:IX_PATH;INDEX:IX_PATH_USER"` DisplayName string `gorm:"TYPE:varchar(128);COLUMN:display_name;NOT NULL"` URL string `gorm:"TYPE:varchar(512);COLUMN:url;NOT NULL;INDEX:IX_SORT_ORDER"` SortOrder int `gorm:"COLUMN:sort_order;DEFAULT:0;NOT NULL"` Type NodeType `gorm:"COLUMN:type;DEFAULT:0;NOT NULL"` UserName string `gorm:"TYPE:varchar(128);COLUMN:user_name;NOT NULL;INDEX:IX_USER;INDEX:IX_PATH_USER"` Created time.Time `gorm:"COLUMN:created;NOT NULL"` Modified *time.Time `gorm:"COLUMN:modified"` ChildCount int `gorm:"COLUMN:child_count;DEFAULT:0;NOT NULL"` AccessCount int `gorm:"COLUMN:access_count;DEFAULT:0;NOT NULL"` Favicon string `gorm:"TYPE:varchar(128);COLUMN:favicon;NOT NULL"` }
Bookmark maps the database table to a struct
type Repository ¶
type Repository interface { InUnitOfWork(fn func(repo Repository) error) error Create(item Bookmark) (Bookmark, error) Update(item Bookmark) (Bookmark, error) Delete(item Bookmark) error DeletePath(path, username string) error GetAllBookmarks(username string) ([]Bookmark, error) GetBookmarksByPath(path, username string) ([]Bookmark, error) GetBookmarksByPathStart(path, username string) ([]Bookmark, error) GetBookmarksByName(name, username string) ([]Bookmark, error) GetMostRecentBookmarks(username string, limit int) ([]Bookmark, error) GetPathChildCount(path, username string) ([]NodeCount, error) GetAllPaths(username string) ([]string, error) GetBookmarkById(id, username string) (Bookmark, error) GetFolderByPath(path, username string) (Bookmark, error) }
Repository defines methods to interact with a store
Click to show internal directories.
Click to hide internal directories.