Documentation ¶
Overview ¶
This package implements the database interface against MongoDB following the collection structure implemented by the Eiffel GraphQL API and Simple Event Sender.
Index ¶
- type Database
- func (m *Database) Close(ctx context.Context) error
- func (m *Database) GetEventByID(ctx context.Context, id string) (drivers.EiffelEvent, error)
- func (m *Database) GetEvents(ctx context.Context, request requests.MultipleEventsRequest) ([]drivers.EiffelEvent, int64, error)
- func (m *Database) UpstreamDownstreamSearch(_ context.Context, _ string) ([]drivers.EiffelEvent, error)
- type Driver
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 is a connected database interface for requesting events from MongoDB.
func (*Database) GetEventByID ¶
GetEventByID gets an event by ID in all collections.
func (*Database) GetEvents ¶
func (m *Database) GetEvents(ctx context.Context, request requests.MultipleEventsRequest) ([]drivers.EiffelEvent, int64, error)
GetEvents gets all events information.
func (*Database) UpstreamDownstreamSearch ¶
func (m *Database) UpstreamDownstreamSearch(_ context.Context, _ string) ([]drivers.EiffelEvent, error)
UpstreamDownstreamSearch searches for events upstream and/or downstream of event by ID.
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Database is a MongoDB database connection.
func (*Driver) Get ¶
func (d *Driver) Get(ctx context.Context, connectionURL *url.URL, logger *log.Entry) (drivers.Database, error)
Get creates and connects a new database.Database interface against MongoDB.
func (*Driver) SupportsScheme ¶
Test whether the MongoDB driver supports a scheme.
Click to show internal directories.
Click to hide internal directories.