database

package
v0.0.0-...-90e109c Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoProvider

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

func NewClient

func NewClient(ctx context.Context, cfg components.Config) MongoProvider

func (MongoProvider) Disconnect

func (m MongoProvider) Disconnect(ctx context.Context) error

func (*MongoProvider) Get

func (m *MongoProvider) Get(ctx context.Context, collection string, filter interface{}, result interface{}) error

func (*MongoProvider) Insert

func (m *MongoProvider) Insert(ctx context.Context, collection string, item interface{}) error

type Provider

type Provider interface {
	Insert(context.Context, string, interface{}) error
	Get(ctx context.Context, collectionName string, filter interface{}, result interface{}) error
	Disconnect(context.Context) error
}

Jump to

Keyboard shortcuts

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