mongodb

package
v0.0.0-...-830f6a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

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

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) Close

func (m *Database) Close(ctx context.Context) error

Close the database connection.

func (*Database) GetEventByID

func (m *Database) GetEventByID(ctx context.Context, id string) (drivers.EiffelEvent, error)

GetEventByID gets an event by ID in all collections.

func (*Database) GetEvents

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

func (d *Driver) SupportsScheme(scheme string) bool

Test whether the MongoDB driver supports a scheme.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL