mgo

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(uri string) (*mongo.Client, error)

func NewBrowserMockDB added in v0.5.0

func NewBrowserMockDB(c *kmongo.Collection, log *zap.Logger) *browserMockDB

func NewTelemetryDB added in v0.3.5

func NewTelemetryDB(db *mongo.Database, telemetryTable string, enabled bool, logger *zap.Logger) *telemetryDB

func NewTestCase

func NewTestCase(c *kmongo.Collection, log *zap.Logger) *testCaseDB

Types

type RunDB

type RunDB struct {
	// contains filtered or unexported fields
}

func NewRun

func NewRun(c *kmongo.Collection, test *kmongo.Collection, log *zap.Logger) *RunDB

func (*RunDB) Increment

func (r *RunDB) Increment(ctx context.Context, success, failure bool, id string) error

func (*RunDB) PutTest

func (r *RunDB) PutTest(ctx context.Context, t models.Test) error

func (*RunDB) Read

func (r *RunDB) Read(ctx context.Context, cid string, user, app, id *string, from, to *time.Time, offset int, limit int) ([]*models.TestRun, error)

func (*RunDB) ReadOne added in v0.5.6

func (r *RunDB) ReadOne(ctx context.Context, id string) (*models.TestRun, error)

func (*RunDB) ReadTest

func (r *RunDB) ReadTest(ctx context.Context, id string) (models.Test, error)

func (*RunDB) ReadTests

func (r *RunDB) ReadTests(ctx context.Context, runID string) ([]models.Test, error)

func (*RunDB) Upsert

func (r *RunDB) Upsert(ctx context.Context, testRun models.TestRun) error

Jump to

Keyboard shortcuts

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