core

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadBookmark

func DownloadBookmark(url string) (io.ReadCloser, string, error)

DownloadBookmark downloads bookmarked page from specified URL. Return response body, make sure to close it later.

func ProcessBookmark

func ProcessBookmark(req ProcessRequest) (model.Bookmark, bool, error)

ProcessBookmark process the bookmark and archive it if needed. Return three values, the bookmark itself, is error fatal, and error value.

func RemoveUTMParams

func RemoveUTMParams(url string) (string, error)

RemoveUTMParams removes the UTM parameters from URL.

Types

type ProcessRequest

type ProcessRequest struct {
	DataDir     string
	Bookmark    model.Bookmark
	Content     io.Reader
	ContentType string
	KeepTitle   bool
	KeepExcerpt bool
	LogArchival bool
}

ProcessRequest is the request for processing bookmark.

Jump to

Keyboard shortcuts

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