mongo

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0, Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateCollections = []func(db *Mongo) error{}

Functions

This section is empty.

Types

type Mongo

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

func New

func New(conf config.Config, ctx context.Context, wg *sync.WaitGroup) (*Mongo, error)

func (*Mongo) CreateId

func (this *Mongo) CreateId() string

func (*Mongo) Disconnect

func (this *Mongo) Disconnect()

func (*Mongo) GetImportType

func (this *Mongo) GetImportType(ctx context.Context, id string) (importType model.ImportType, exists bool, err error)

func (*Mongo) ListImportTypes

func (this *Mongo) ListImportTypes(ctx context.Context, limit int64, offset int64, sort string) (result []model.ImportType, err error)

func (*Mongo) RemoveImportType

func (this *Mongo) RemoveImportType(ctx context.Context, id string) error

func (*Mongo) SetImportType

func (this *Mongo) SetImportType(ctx context.Context, importType model.ImportType) error

func (*Mongo) Transaction

func (this *Mongo) Transaction(ctx context.Context) (resultCtx context.Context, close func(success bool) error, err error)

Jump to

Keyboard shortcuts

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