Documentation
¶
Index ¶
- Constants
- func AddBookmarksUpdate(update *scbus.ModelUpdatePacketType, bookmarks []*BookmarkType, ...)
- func DeleteBookmark(ctx context.Context, bookmarkId string) error
- func EditBookmark(ctx context.Context, bookmarkId string, editMap map[string]interface{}) error
- func GetBookmarkIdByArg(ctx context.Context, bookmarkArg string) (string, error)
- func GetBookmarkIdsByCmdStr(ctx context.Context, cmdStr string) ([]string, error)
- func InsertBookmark(ctx context.Context, bm *BookmarkType) error
- type BookmarkType
- type BookmarksUpdate
Constants ¶
View Source
const ( BookmarkField_Desc = "desc" BookmarkField_CmdStr = "cmdstr" )
Variables ¶
This section is empty.
Functions ¶
func AddBookmarksUpdate ¶
func AddBookmarksUpdate(update *scbus.ModelUpdatePacketType, bookmarks []*BookmarkType, selectedBookmark *string)
func EditBookmark ¶
func GetBookmarkIdByArg ¶
func GetBookmarkIdsByCmdStr ¶
func InsertBookmark ¶
func InsertBookmark(ctx context.Context, bm *BookmarkType) error
ignores OrderIdx field
Types ¶
type BookmarkType ¶
type BookmarkType struct {
BookmarkId string `json:"bookmarkid"`
CreatedTs int64 `json:"createdts"`
CmdStr string `json:"cmdstr"`
Alias string `json:"alias,omitempty"`
Tags []string `json:"tags"`
Description string `json:"description"`
OrderIdx int64 `json:"orderidx"`
Remove bool `json:"remove,omitempty"`
}
func GetBookmarkById ¶
func GetBookmarks ¶
func GetBookmarks(ctx context.Context, tag string) ([]*BookmarkType, error)
func (*BookmarkType) FromMap ¶
func (bm *BookmarkType) FromMap(m map[string]interface{}) bool
func (*BookmarkType) GetSimpleKey ¶
func (bm *BookmarkType) GetSimpleKey() string
func (*BookmarkType) ToMap ¶
func (bm *BookmarkType) ToMap() map[string]interface{}
type BookmarksUpdate ¶
type BookmarksUpdate struct {
Bookmarks []*BookmarkType `json:"bookmarks"`
SelectedBookmark string `json:"selectedbookmark,omitempty"`
}
func (BookmarksUpdate) GetType ¶
func (BookmarksUpdate) GetType() string
Click to show internal directories.
Click to hide internal directories.