mongo

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CleanupLastUpdateTimeBuffer = time.Minute
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(ctx context.Context, conf config.Config) (*Mongo, error)

func (*Mongo) CheckIdList added in v0.0.11

func (this *Mongo) CheckIdList(ids []string) (missingInDb []string, missingInInput []string, err error)

func (*Mongo) CreateId

func (this *Mongo) CreateId() string

func (*Mongo) DeleteProcess

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

func (*Mongo) Disconnect

func (this *Mongo) Disconnect()

func (*Mongo) ListProcesses added in v0.0.9

func (this *Mongo) ListProcesses(ctx context.Context, listOptions model.ListOptions) (result []model.Process, total int64, err error)

func (*Mongo) ProcessCollection added in v0.0.11

func (this *Mongo) ProcessCollection() *mongo.Collection

func (*Mongo) ReadAllPublicProcesses

func (this *Mongo) ReadAllPublicProcesses(ctx context.Context) (processes []model.Process, err error)

func (*Mongo) ReadProcess

func (this *Mongo) ReadProcess(ctx context.Context, id string) (process model.Process, exists bool, err error)

func (*Mongo) SetProcess

func (this *Mongo) SetProcess(ctx context.Context, process model.Process) 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