mongo

package
v0.0.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const TIMEOUT = 10 * time.Second

Variables

View Source
var OnIncidentBson = getBsonFieldObject[messages.OnIncident]()

Functions

This section is empty.

Types

type Mongo

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

func New

func New(ctx context.Context, config configuration.Config) (result *Mongo, err error)

func (*Mongo) DeleteByDefinitionId

func (this *Mongo) DeleteByDefinitionId(id string) error

func (*Mongo) DeleteIncidentByDefinitionId

func (this *Mongo) DeleteIncidentByDefinitionId(id string) error

func (*Mongo) DeleteIncidentByInstanceId

func (this *Mongo) DeleteIncidentByInstanceId(id string) error

func (*Mongo) DeleteOnIncidentByDefinitionId

func (this *Mongo) DeleteOnIncidentByDefinitionId(definitionId string) error

func (*Mongo) GetOnIncident

func (this *Mongo) GetOnIncident(definitionId string) (handler messages.OnIncident, exists bool, err error)

func (*Mongo) SaveIncident

func (this *Mongo) SaveIncident(incident messages.Incident) error

func (*Mongo) SaveOnIncident

func (this *Mongo) SaveOnIncident(handler messages.OnIncident) error

Jump to

Keyboard shortcuts

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