mongo

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoBD

type MongoBD struct {
	database.Database[*mongo.Client, *options.ClientOptions]
}

func (*MongoBD) Connect

func (m *MongoBD) Connect(uri string, database string) error

Метод для установления соединения с репозиторием

func (*MongoBD) CreateIndex

func (m *MongoBD) CreateIndex(ctx context.Context, collectionName string, indexName string, unique bool) error

Метод создания индекса для коллекции

func (*MongoBD) CreateIndexes

func (m *MongoBD) CreateIndexes(opts []abstract.IndexOptions) error

Метод создания индексов для коллекций

func (*MongoBD) GetStorage

func (m *MongoBD) GetStorage(ctx *context.Context, store_name string) *mongo.Collection

Метод для получения хранилища данных

Jump to

Keyboard shortcuts

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