Documentation
¶
Overview ¶
Package bookmark implements the bookmark management capability.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Descriptor ¶
func Descriptor(backend, app string, svc Service) hub.Descriptor
func RegisterService ¶
RegisterService registers the bookmark capability with the hub and ability registry. It returns nil and logs a warning when svc is nil (provider not configured).
Types ¶
type ListQuery ¶
type ListQuery struct {
Page ability.PageRequest
Archived *bool
Favourited *bool
Tags []string
}
type SearchQuery ¶
type SearchQuery struct {
Page ability.PageRequest
Q string
}
type Service ¶
type Service interface {
List(ctx context.Context, q *ListQuery) (*ability.ListResult[ability.Bookmark], error)
Get(ctx context.Context, id string) (*ability.Bookmark, error)
Create(ctx context.Context, url string) (*ability.Bookmark, error)
Delete(ctx context.Context, id string) error
Archive(ctx context.Context, id string) (bool, error)
Search(ctx context.Context, q *SearchQuery) (*ability.ListResult[ability.Bookmark], error)
AttachTags(ctx context.Context, id string, tags []string) error
DetachTags(ctx context.Context, id string, tags []string) error
CheckURL(ctx context.Context, url string) (exists bool, id string, err error)
}
Click to show internal directories.
Click to hide internal directories.