Documentation
¶
Overview ¶
Package export implements common exporting functionnality
Index ¶
- Constants
- type BookmarksExporter
- type Exporter
- type JSONExporter
- type NetscapeHTMLExporter
- func (ns *NetscapeHTMLExporter) ExportBookmarks(bookmarks []*gosuki.Bookmark, w io.Writer) error
- func (ns *NetscapeHTMLExporter) MarshalBookmark(book *gosuki.Bookmark) []byte
- func (ns *NetscapeHTMLExporter) WriteFooter(w io.Writer) error
- func (ns *NetscapeHTMLExporter) WriteHeader(w io.Writer) error
- type PocketHTMLExporter
- type RSSXMLExporter
Constants ¶
View Source
const ( // Netscape Bookmark file format NetscapeHTML = iota // Pocket HTML file format PocketHTML // Json pinboard/wallabag file format JSON // Generic RSS-XML format RSS )
export formats
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookmarksExporter ¶
type BookmarksExporter struct {
// bookmark separator (ex: , for json fields)
Separator string
// contains filtered or unexported fields
}
func NewBookmarksExporter ¶
func NewBookmarksExporter( e Exporter, w io.Writer, ) BookmarksExporter
func (BookmarksExporter) ExportBookmarks ¶
func (be BookmarksExporter) ExportBookmarks(bookmarks []*gosuki.Bookmark) error
func (BookmarksExporter) ExportFromRows ¶
func (be BookmarksExporter) ExportFromRows(rows *sqlx.Rows) error
type JSONExporter ¶
type JSONExporter struct{}
func (*JSONExporter) ExportBookmarks ¶
func (*JSONExporter) MarshalBookmark ¶
func (je *JSONExporter) MarshalBookmark(book *gosuki.Bookmark) []byte
func (*JSONExporter) WriteFooter ¶
func (je *JSONExporter) WriteFooter(w io.Writer) error
func (*JSONExporter) WriteHeader ¶
func (je *JSONExporter) WriteHeader(w io.Writer) error
type NetscapeHTMLExporter ¶
type NetscapeHTMLExporter struct{}
func (*NetscapeHTMLExporter) ExportBookmarks ¶
func (*NetscapeHTMLExporter) MarshalBookmark ¶
func (ns *NetscapeHTMLExporter) MarshalBookmark(book *gosuki.Bookmark) []byte
func (*NetscapeHTMLExporter) WriteFooter ¶
func (ns *NetscapeHTMLExporter) WriteFooter(w io.Writer) error
func (*NetscapeHTMLExporter) WriteHeader ¶
func (ns *NetscapeHTMLExporter) WriteHeader(w io.Writer) error
type PocketHTMLExporter ¶
type PocketHTMLExporter struct{}
func (*PocketHTMLExporter) ExportBookmarks ¶
func (*PocketHTMLExporter) MarshalBookmark ¶
func (pe *PocketHTMLExporter) MarshalBookmark(book *gosuki.Bookmark) []byte
func (*PocketHTMLExporter) WriteFooter ¶
func (pe *PocketHTMLExporter) WriteFooter(w io.Writer) error
func (*PocketHTMLExporter) WriteHeader ¶
func (pe *PocketHTMLExporter) WriteHeader(w io.Writer) error
type RSSXMLExporter ¶
type RSSXMLExporter struct{}
func (*RSSXMLExporter) ExportBookmarks ¶
func (*RSSXMLExporter) MarshalBookmark ¶
func (rs *RSSXMLExporter) MarshalBookmark(book *gosuki.Bookmark) []byte
func (*RSSXMLExporter) WriteFooter ¶
func (rs *RSSXMLExporter) WriteFooter(w io.Writer) error
func (*RSSXMLExporter) WriteHeader ¶
func (rs *RSSXMLExporter) WriteHeader(w io.Writer) error
Click to show internal directories.
Click to hide internal directories.