Documentation ¶
Index ¶
- type Mongo
- func (m *Mongo) AddJob(job *models.Job) (*models.Job, error)
- func (m *Mongo) AddUploadedFile(id string, file *models.UploadedFile) error
- func (m *Mongo) Close(ctx context.Context) error
- func (m *Mongo) GetJob(id string) (*models.Job, error)
- func (m *Mongo) GetJobs(filters []string) ([]models.Job, error)
- func (m *Mongo) HealthCheckClient() *mongohealth.CheckMongoClient
- func (m *Mongo) UpdateJob(id string, job *models.Job) (err error)
- func (m *Mongo) UpdateJobState(id, newState string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mongo ¶
Mongo represents a simplistic MongoDB configuration
func NewDatastore ¶
NewDatastore creates a new mgo.Session with a strong consistency and a write mode of "majority"
func (*Mongo) AddUploadedFile ¶
func (m *Mongo) AddUploadedFile(id string, file *models.UploadedFile) error
AddUploadedFile adds an UploadedFile to an import job
func (*Mongo) HealthCheckClient ¶
func (m *Mongo) HealthCheckClient() *mongohealth.CheckMongoClient
func (*Mongo) UpdateJobState ¶
UpdateJobState changes the state attribute of an import job
Click to show internal directories.
Click to hide internal directories.