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) Checker(ctx context.Context, state *healthcheck.CheckState) error
- func (m *Mongo) Close(ctx context.Context) error
- func (m *Mongo) GetJob(id string) (*models.Job, error)
- func (m *Mongo) GetJobs(ctx context.Context, filters []string, offset int, limit int) (*models.JobResults, error)
- func (m *Mongo) HealthCheckClient() *mongohealth.CheckMongoClient
- func (m *Mongo) UpdateJob(id string, job *models.Job) (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) Checker ¶ added in v1.9.0
func (m *Mongo) Checker(ctx context.Context, state *healthcheck.CheckState) error
Checker is called by the healthcheck library to check the health state of this mongoDB instance
func (*Mongo) GetJobs ¶
func (m *Mongo) GetJobs(ctx context.Context, filters []string, offset int, limit int) (*models.JobResults, error)
GetJobs retrieves all import documents matching filters
func (*Mongo) HealthCheckClient ¶
func (m *Mongo) HealthCheckClient() *mongohealth.CheckMongoClient
HealthCheckClient generates a healthcheck client for this mongoDB, with an existing session
Click to show internal directories.
Click to hide internal directories.