gist

package
v0.0.0-...-a3f3dab Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2017 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectionFromGistId

func CollectionFromGistId(store datastore.Datastore, gistid, creatorId string) (*core.Collection, error)

CollectionFromGistId creates a core.Collection from a gist

func EnsureCollection

func EnsureCollection(store datastore.Datastore, col *core.Collection) error

EnsureCollection makes sure a collection exists, and if it doesn't creates one TODO - this is a candidate for moving into the core package

func GistIdFromUrl

func GistIdFromUrl(rawurl string) (string, error)

GistIdFromUrl extracts the url from a string that is either a url to the gist, or a raw id.

func NewCollectionFromGist

func NewCollectionFromGist() tasks.Taskable

Types

type CollectionFromGist

type CollectionFromGist struct {
	// title for collection if no collection present
	GistUrl string `json:"gistUrl"`
	// author of gist
	CreatorId string `json:"creatorId"`
	// contains filtered or unexported fields
}

CollectionFromGist creates a collection from a gist of urls the gist requires a file called urls.txt be defined, and be one-url-per-line. an optional collection.json sets the title, description, and url properties of the collection

func (*CollectionFromGist) Do

func (t *CollectionFromGist) Do(pch chan tasks.Progress)

func (*CollectionFromGist) SetDatastore

func (t *CollectionFromGist) SetDatastore(store datastore.Datastore)

CollectionFromGist task needs to talk to an underlying database it's expected that the task executor will call this method before calling Do

func (*CollectionFromGist) Valid

func (t *CollectionFromGist) Valid() error

Jump to

Keyboard shortcuts

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