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 ¶
- type Source
- func (s Source) DatastoreType() string
- func (s *Source) Delete(store datastore.Datastore) error
- func (s *Source) GetId() string
- func (s *Source) Key() datastore.Key
- func (s *Source) NewSQLModel(key datastore.Key) sql_datastore.Model
- func (s *Source) Read(store datastore.Datastore) error
- func (s *Source) SQLParams(cmd sql_datastore.Cmd) []interface{}
- func (s *Source) SQLQuery(cmd sql_datastore.Cmd) string
- func (s *Source) Save(store datastore.Datastore) (err error)
- func (s *Source) UnmarshalSQL(row sqlutil.Scannable) error
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 ¶
TODO - orderby is currently being ignored, need to fix with support for sorts in datastore queries
func (Source) DatastoreType ¶
func (*Source) NewSQLModel ¶
func (s *Source) NewSQLModel(key datastore.Key) sql_datastore.Model
func (*Source) SQLParams ¶
func (s *Source) SQLParams(cmd sql_datastore.Cmd) []interface{}
Click to show internal directories.
Click to hide internal directories.