source

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: 9 Imported by: 0

Documentation

Overview

This package is a carry-over from a previous incarnation of task_mgmt it should be cleaned up & removed in favour of types from the github.com/datatogether/archive package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source struct {
	// version 4 uuid
	Id string `json:"id"`
	// created date rounded to secounds
	Created time.Time `json:"created"`
	// updated date rounded to secounds
	Updated time.Time `json:"updated"`
	// Human-readable title for source
	Title string `json:"title"`
	// Url to source data
	Url string `json:"url"`
	// Checksum of url
	Checksum string `json:"checksum"`
	// any associated metadata
	Meta map[string]interface{} `json:"meta"`
}

Source is an http origin of data TODO - this should be folded into core.Url, feels redundant TODO - ugh, archive already has a "Source" type that we're only able to get around b/c task_mgmt & archive run against different dbs need to destroy this asap

func ListSources

func ListSources(store datastore.Datastore, orderby string, limit, offset int) ([]*Source, error)

TODO - orderby is currently being ignored, need to fix with support for sorts in datastore queries

func (Source) DatastoreType

func (s Source) DatastoreType() string

func (*Source) Delete

func (s *Source) Delete(store datastore.Datastore) error

func (*Source) GetId

func (s *Source) GetId() string

func (*Source) Key

func (s *Source) Key() datastore.Key

func (*Source) NewSQLModel

func (s *Source) NewSQLModel(key datastore.Key) sql_datastore.Model

func (*Source) Read

func (s *Source) Read(store datastore.Datastore) error

func (*Source) SQLParams

func (s *Source) SQLParams(cmd sql_datastore.Cmd) []interface{}

func (*Source) SQLQuery

func (s *Source) SQLQuery(cmd sql_datastore.Cmd) string

func (*Source) Save

func (s *Source) Save(store datastore.Datastore) (err error)

func (*Source) UnmarshalSQL

func (s *Source) UnmarshalSQL(row sqlutil.Scannable) error

Jump to

Keyboard shortcuts

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