Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrVisibilityInvalid error = errors.New("invalid value for visibility")
)
Functions ¶
This section is empty.
Types ¶
type FakeRepository ¶
func (*FakeRepository) BookmarkGetAll ¶
func (r *FakeRepository) BookmarkGetAll(userUUID string) ([]bookmark.Bookmark, error)
func (*FakeRepository) BookmarkGetAllPrivate ¶
func (r *FakeRepository) BookmarkGetAllPrivate(userUUID string) ([]bookmark.Bookmark, error)
func (*FakeRepository) BookmarkGetAllPublic ¶
func (r *FakeRepository) BookmarkGetAllPublic(userUUID string) ([]bookmark.Bookmark, error)
type Repository ¶
type Repository interface { // BookmarkGetAll returns all bookmarks for a given user UUID. BookmarkGetAll(userUUID string) ([]bookmark.Bookmark, error) // BookmarkGetAllPrivate returns all private bookmarks for a given user UUID. BookmarkGetAllPrivate(userUUID string) ([]bookmark.Bookmark, error) // BookmarkGetAllPublic returns all public bookmarks for a given user UUID. BookmarkGetAllPublic(userUUID string) ([]bookmark.Bookmark, error) }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles bookmark export operations.
func NewService ¶
func NewService(r Repository) *Service
NewService initializes and returns a new Service.
func (*Service) ExportAsNetscapeDocument ¶
func (s *Service) ExportAsNetscapeDocument(userUUID string, visibility Visibility) (*netscape.Document, error)
ExportAsNetscapeDocument exports a given user's bookmarks matching the provided Visibility as a Netscape bookmark document.
type Visibility ¶
type Visibility string
Visibility represents a visibility filter for bookmarks.
const ( // Public and private bookmarks. VisibilityAll Visibility = "all" // Private bookmarks only. VisibilityPrivate Visibility = "private" // Public bookmarks only. VisibilityPublic Visibility = "public" )
Click to show internal directories.
Click to hide internal directories.