mgo

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 11 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 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 run.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) ([]*run.TestRun, error)

func (*RunDB) ReadTest

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

func (*RunDB) ReadTests

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

func (*RunDB) Upsert

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

Jump to

Keyboard shortcuts

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