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 ¶
GistIdFromUrl extracts the url from a string that is either a url to the gist, or a raw id.
func NewCollectionFromGist ¶
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