Documentation ¶
Index ¶
- type Connection
- func (c *Connection) Close()
- func (c *Connection) FindOneGeoBy(location string) (primitive.M, error)
- func (c *Connection) GetConditionalDocument(data *domain.JobPost) bson.D
- func (c *Connection) GetGeoDocument(geocoding interface{}) bson.D
- func (c *Connection) InsertBatch(documents []interface{}, stats *domain.Stats)
- func (c *Connection) InsertBatchStats(status string, total int, stats *domain.Stats)
- func (c *Connection) InsertOneGeocoding(location string, geocoding interface{})
- type Geocoding
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Client *mongo.Client Database *mongo.Database JobPostsCollection *mongo.Collection GeoCollection *mongo.Collection BatchesCollection *mongo.Collection Context context.Context }
func Connect ¶
func Connect(config *configuration.Configuration) *Connection
func (*Connection) Close ¶
func (c *Connection) Close()
func (*Connection) FindOneGeoBy ¶
func (c *Connection) FindOneGeoBy(location string) (primitive.M, error)
func (*Connection) GetConditionalDocument ¶
func (c *Connection) GetConditionalDocument(data *domain.JobPost) bson.D
func (*Connection) GetGeoDocument ¶
func (c *Connection) GetGeoDocument(geocoding interface{}) bson.D
func (*Connection) InsertBatch ¶
func (c *Connection) InsertBatch(documents []interface{}, stats *domain.Stats)
func (*Connection) InsertBatchStats ¶
func (c *Connection) InsertBatchStats(status string, total int, stats *domain.Stats)
func (*Connection) InsertOneGeocoding ¶
func (c *Connection) InsertOneGeocoding(location string, geocoding interface{})
Click to show internal directories.
Click to hide internal directories.