Documentation ¶
Index ¶
Constants ¶
View Source
const (
POSTGRES = "postgres"
)
Enumerated list of available database providers. Reserved for future.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaculaJobSummary ¶
type BaculaSummary ¶
type BaculaSummary struct {
ScheduledJobs uint32 `db:"scheduledjobs"`
}
type DB ¶
func (*DB) GetJobsSummary ¶
func (db *DB) GetJobsSummary() ([]*BaculaJobSummary, error)
GetJobsSummary return summary of all jobs
func (*DB) GetLatestJobs ¶
GetLatestJobs return total list of latest jobs
type Datastore ¶
type Datastore interface { GetLatestJobs() ([]*BaculaJob, error) GetJobsSummary() ([]*BaculaJobSummary, error) }
Datastore interface to models
We can then use this interface instead of the direct DB type throughout our application. Also we can easily create mock database responses for any unit tests.
Click to show internal directories.
Click to hide internal directories.