mongo

package
v0.0.0-...-7974e50 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

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

func Make

func Make(user, pass, host, port, dbName string, logger logging.Logger, tracer trace.Tracer) (Mongo, error)

func (Mongo) Close

func (db Mongo) Close() error

func (Mongo) Create

func (db Mongo) Create(ctx context.Context, token entity.Token) error

func (Mongo) Delete

func (db Mongo) Delete(ctx context.Context, id string) error

func (Mongo) EventHandlers

func (db Mongo) EventHandlers() map[event.EventType][]event.Handler

func (Mongo) Get

func (db Mongo) Get(ctx context.Context, opaqueToken string) (entity.Token, error)

func (Mongo) GetMultiple

func (db Mongo) GetMultiple(ctx context.Context, query filter.Filter) ([]entity.Token, error)

Jump to

Keyboard shortcuts

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