Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database holds on to metadata. Wow!
func NewDatabase ¶
NewDatabase creates a (postgres) *Database from a database URL string
type LookupSaver ¶
type LookupSaver interface { Save(*Metadata) error Lookup(string, string) (*Metadata, error) LookupAll(string) ([]*Metadata, error) }
LookupSaver is the interface needed for reads and writes of metadata
type Metadata ¶
Metadata is the stuff we care about in the metadata database
func (*Metadata) MarshalJSON ¶
MarshalJSON is all about the JSON, everything as a string per jsonapi
type NullLookupSaver ¶
type NullLookupSaver struct {
// contains filtered or unexported fields
}
NullLookupSaver is the "nullified" implementation of a lookup saver
func NewNullLookupSaver ¶
func NewNullLookupSaver() *NullLookupSaver
NewNullLookupSaver builds a new NullLookupSaver
func (*NullLookupSaver) Lookup ¶
func (nls *NullLookupSaver) Lookup(jobID, path string) (*Metadata, error)
Lookup gets the metadata from the in-memory internal mapping
func (*NullLookupSaver) LookupAll ¶
func (nls *NullLookupSaver) LookupAll(jobID string) ([]*Metadata, error)
LookupAll returns all of the in-memory metadata
func (*NullLookupSaver) Save ¶
func (nls *NullLookupSaver) Save(m *Metadata) error
Save adds the metadata to the in-memory internal mapping
Click to show internal directories.
Click to hide internal directories.