Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { NewSession() (Session, error) Get(Session, string, string, interface{}) error Put(Session, string, string, interface{}) error Del(Session, string, string) error GetSong(Session, api.SongID) (*api.Song, bool) GetSongWithoutDupes(Session, api.SongID) (*api.Song, bool) PutSong(Session, *api.Song) error GetSongFingerprint(Session, api.SongID) (*api.Fingerprint, error) PutSongFingerprint(Session, api.SongID, *api.Fingerprint) error GetSongAcousticData(Session, *api.Song) (*api.AcousticData, error) PutSongAcousticData(Session, *api.Song, *api.AcousticData) error GetSongAcousticCorrelation(Session, api.SongID, api.SongID) (float32, error) GetSongAcousticCorrelations(Session, api.SongID) ([]api.AcousticCorrelation, error) PutSongAcousticCorrelation(Session, api.SongID, api.SongID, float32) error GetAudioFile(Session, string) (*api.AudioFile, bool) PutAudioFile(Session, *api.AudioFile) error GetUser(Session, string) (*api.User, bool) PutUser(Session, *api.User) error GetAuthKey(Session, string) (*api.AuthKey, bool) PutAuthKey(Session, *api.AuthKey) error AppendPlayLog(Session, *api.PlayLogEntry) error GetPlayLog(Session, string) (*api.PlayLogEntry, bool) GetMarkovMap(Session, string) (*api.MarkovMap, bool) PutMarkovMap(Session, string, *api.MarkovMap) error GetArtists(Session, string) ([]string, error) }
Database is the high-level interface to the database layer.
type DatabaseClient ¶
DatabaseClient is the low-level interface to a database client.
type Index ¶
type Index interface { AddDoc(id api.SongID, doc api.Document) error DeleteDoc(id api.SongID) error Search(query string) api.SongSet Scan() []api.SongID }
Index is the client interface to the indexing service.
type Session ¶
type Session interface { Get(bucket, key string, obj interface{}) error Put(bucket, key string, obj interface{}) error Del(bucket, key string) error Scan(bucket, startKey, endKey string, limit int) (Iterator, error) ScanKeys(bucket, startKey, endKey string, limit int) (Iterator, error) Close() }
Session represents a database session. Whether this can be associated with a transaction or not is something that depends on the implementation.
Directories ¶
Path | Synopsis |
---|---|
client
The database service consists of a set of high-level operations built on top of a simple key/value store.
|
The database service consists of a set of high-level operations built on top of a simple key/value store. |
The index package implements a distributed search index.
|
The index package implements a distributed search index. |
The storage package implements a simple distributed blob store.
|
The storage package implements a simple distributed blob store. |
A persistent task queue server.
|
A persistent task queue server. |
task_requeue
Re-add orphaned tasks to the task_queue.
|
Re-add orphaned tasks to the task_queue. |
Click to show internal directories.
Click to hide internal directories.