libbookmarks

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookmarkManager

type BookmarkManager struct {
	Hooks      *bntp.Hooks[domain.Bookmark]
	Repository repository.BookmarkRepository
	Logger     *log.Logger
}

func NewBookmarkManager

func NewBookmarkManager(logger *log.Logger, hooks *bntp.Hooks[domain.Bookmark], repository repository.BookmarkRepository) (BookmarkManager, error)

func (*BookmarkManager) Add

func (m *BookmarkManager) Add(ctx context.Context, bookmarks []*domain.Bookmark) error

TODO: Allow skipping certain hooks.

func (*BookmarkManager) AddType

func (m *BookmarkManager) AddType(ctx context.Context, types []string) error

func (*BookmarkManager) CountAll

func (m *BookmarkManager) CountAll(ctx context.Context) (numRecords int64, err error)

func (*BookmarkManager) CountWhere

func (m *BookmarkManager) CountWhere(ctx context.Context, bookmarkFilter *domain.BookmarkFilter) (numRecords int64, err error)

func (*BookmarkManager) Delete

func (m *BookmarkManager) Delete(ctx context.Context, bookmarks []*domain.Bookmark) error

func (*BookmarkManager) DeleteType

func (m *BookmarkManager) DeleteType(ctx context.Context, types []string) error

func (*BookmarkManager) DeleteWhere

func (m *BookmarkManager) DeleteWhere(ctx context.Context, bookmarkFilter *domain.BookmarkFilter) (numAffectedRecords int64, err error)

func (*BookmarkManager) DoesExist

func (m *BookmarkManager) DoesExist(ctx context.Context, bookmark *domain.Bookmark) (doesExist bool, err error)

func (*BookmarkManager) DoesExistWhere

func (m *BookmarkManager) DoesExistWhere(ctx context.Context, bookmarkFilter *domain.BookmarkFilter) (doesExist bool, err error)

func (*BookmarkManager) GetAll

func (m *BookmarkManager) GetAll(ctx context.Context) (records []*domain.Bookmark, err error)

func (*BookmarkManager) GetAllTypes added in v0.6.0

func (m *BookmarkManager) GetAllTypes(ctx context.Context) ([]string, error)

func (*BookmarkManager) GetFirstWhere

func (m *BookmarkManager) GetFirstWhere(ctx context.Context, bookmarkFilter *domain.BookmarkFilter) (record *domain.Bookmark, err error)

func (*BookmarkManager) GetFromIDs added in v0.6.0

func (m *BookmarkManager) GetFromIDs(ctx context.Context, ids []int64) (records []*domain.Bookmark, err error)

func (*BookmarkManager) GetWhere

func (m *BookmarkManager) GetWhere(ctx context.Context, bookmarkFilter *domain.BookmarkFilter) (records []*domain.Bookmark, err error)

func (*BookmarkManager) Replace

func (m *BookmarkManager) Replace(ctx context.Context, bookmarks []*domain.Bookmark) error

func (*BookmarkManager) Update

func (m *BookmarkManager) Update(ctx context.Context, documents []*domain.Bookmark, documentUpdater *domain.BookmarkUpdater) error

func (*BookmarkManager) UpdateType

func (m *BookmarkManager) UpdateType(ctx context.Context, oldType string, newType string) error

func (*BookmarkManager) UpdateWhere

func (m *BookmarkManager) UpdateWhere(ctx context.Context, bookmarkFilter *domain.BookmarkFilter, bookmarkUpdater *domain.BookmarkUpdater) (numAffectedRecords int64, err error)

func (*BookmarkManager) Upsert

func (m *BookmarkManager) Upsert(ctx context.Context, bookmarks []*domain.Bookmark) error

Jump to

Keyboard shortcuts

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