Documentation ¶
Index ¶
- type Database
- func (d *Database) BeginTranscoding() (value.Entry, error)
- func (d *Database) CancelTranscoding(entry value.Entry) error
- func (d *Database) Close() error
- func (d *Database) CompleteTranscoding(entry value.Entry) error
- func (d *Database) Remove(entry value.Entry) error
- func (d *Database) Upsert(entry value.Entry) error
- type ErrAlreadyExists
- type ErrNotFound
- type ErrUnknownVersion
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 - Represents a connection to a goamt SQLite database and exposes a thread safe interface.
func Create ¶
Create - Create a new database, returning an error if an existing database already exists.
func Open ¶
Open - Open an existing database returning an error if the provided database is missing or an unsupported version.
func (*Database) BeginTranscoding ¶
BeginTranscoding - Retrieve an untranscoded entry from the database, note that a job will be created for the provided entry which should be completed/cancelled (in the event of a failure, this will happen the next time the database is opened).
func (*Database) CancelTranscoding ¶
CancelTranscoding - Cancel the job for the provided entry.
func (*Database) Close ¶
Close - Close the database, the database should not be used after it has been closed.
func (*Database) CompleteTranscoding ¶
CompleteTranscoding - Rehash and mark the provided entry as having been transcoded.
type ErrAlreadyExists ¶
type ErrAlreadyExists struct {
// contains filtered or unexported fields
}
ErrAlreadyExists - Returned when the user attempts to create a database which already exists.
func (*ErrAlreadyExists) Error ¶
func (e *ErrAlreadyExists) Error() string
type ErrNotFound ¶
type ErrNotFound struct {
// contains filtered or unexported fields
}
ErrNotFound - Returned when the user attempts to open a database which doesn't exist.
func (*ErrNotFound) Error ¶
func (e *ErrNotFound) Error() string
type ErrUnknownVersion ¶
type ErrUnknownVersion struct {
// contains filtered or unexported fields
}
ErrUnknownVersion - Returned when the user attempts to open a database with an unknown version.
func (*ErrUnknownVersion) Error ¶
func (e *ErrUnknownVersion) Error() string