bookmarks

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 DeleteBookmark

func DeleteBookmark(ctx context.Context, bookmarkId string) error

func EditBookmark

func EditBookmark(ctx context.Context, bookmarkId string, editMap map[string]interface{}) error

func GetBookmarkIdByArg

func GetBookmarkIdByArg(ctx context.Context, bookmarkArg string) (string, error)

func GetBookmarkIdsByCmdStr

func GetBookmarkIdsByCmdStr(ctx context.Context, cmdStr string) ([]string, error)

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 GetBookmarkById(ctx context.Context, bookmarkId string, tag string) (*BookmarkType, error)

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

Jump to

Keyboard shortcuts

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