core

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2019 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
	KeepMetadata 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