mongo

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateCollections = []func(db *Mongo) error{}
View Source
var DesignBson = getBsonFieldObject[model.SmartServiceDesign]()
View Source
var ErrDesignNotFound = errors.New("design not found")
View Source
var ErrInstanceNotFound = errors.New("instance not found")
View Source
var ErrModuleNotFound = errors.New("module not found")
View Source
var ErrReleaseNotFound = errors.New("release not found")
View Source
var ErrVariableNotFound = errors.New("variable not found")
View Source
var InstanceBson = getBsonFieldObject[model.SmartServiceInstance]()
View Source
var ModuleBson = getBsonFieldObject[model.SmartServiceModule]()
View Source
var ReleaseBson = getBsonFieldObject[model.SmartServiceReleaseExtended]()
View Source
var VariableBson = getBsonFieldObject[model.SmartServiceInstanceVariable]()

Functions

This section is empty.

Types

type Mongo

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

func New

func New(conf configuration.Config) (*Mongo, error)

func (*Mongo) AddToRunningMaintenanceIds

func (this *Mongo) AddToRunningMaintenanceIds(instanceId string, maintenanceId string) error

func (*Mongo) DeleteDesign

func (this *Mongo) DeleteDesign(id string, userId string) (error, int)

func (*Mongo) DeleteInstance

func (this *Mongo) DeleteInstance(id string, userId string) (err error, code int)

func (*Mongo) DeleteModule

func (this *Mongo) DeleteModule(id string, userId string) (error, int)

func (*Mongo) DeleteRelease

func (this *Mongo) DeleteRelease(id string) (error, int)

func (*Mongo) DeleteVariable

func (this *Mongo) DeleteVariable(instanceId string, userId string, variableName string) (error, int)

func (*Mongo) GetDesign

func (this *Mongo) GetDesign(id string, userId string) (result model.SmartServiceDesign, err error, code int)

func (*Mongo) GetInstance

func (this *Mongo) GetInstance(id string, userId string) (result model.SmartServiceInstance, err error, code int)

func (*Mongo) GetModule

func (this *Mongo) GetModule(id string, userId string) (result model.SmartServiceModule, err error, code int)

func (*Mongo) GetRelease

func (this *Mongo) GetRelease(id string) (result model.SmartServiceReleaseExtended, err error, code int)

func (*Mongo) GetReleaseListByIds

func (this *Mongo) GetReleaseListByIds(ids []string, sort string) (result []model.SmartServiceReleaseExtended, err error)

func (*Mongo) GetReleasesByDesignId

func (this *Mongo) GetReleasesByDesignId(designId string) (result []model.SmartServiceReleaseExtended, err error)

func (*Mongo) GetVariable

func (this *Mongo) GetVariable(instanceId string, userId string, variableName string) (result model.SmartServiceInstanceVariable, err error, code int)

func (*Mongo) ListAllModules

func (this *Mongo) ListAllModules(query model.ModuleQueryOptions) (result []model.SmartServiceModule, err error, code int)

func (*Mongo) ListAllVariables

func (this *Mongo) ListAllVariables(query model.VariableQueryOptions) (result []model.SmartServiceInstanceVariable, err error, code int)

func (*Mongo) ListDesigns

func (this *Mongo) ListDesigns(userId string, query model.DesignQueryOptions) (result []model.SmartServiceDesign, err error, code int)

func (*Mongo) ListInstances

func (this *Mongo) ListInstances(userId string, query model.InstanceQueryOptions) (result []model.SmartServiceInstance, err error, code int)

func (*Mongo) ListModules

func (this *Mongo) ListModules(userId string, query model.ModuleQueryOptions) (result []model.SmartServiceModule, err error, code int)

func (*Mongo) ListVariables

func (this *Mongo) ListVariables(instanceId string, userId string, query model.VariableQueryOptions) (result []model.SmartServiceInstanceVariable, err error, code int)

func (*Mongo) RemoveFromRunningMaintenanceIds

func (this *Mongo) RemoveFromRunningMaintenanceIds(instanceId string, removeMaintenanceIds []string) error

func (*Mongo) RemoveModulesOfInstance

func (this *Mongo) RemoveModulesOfInstance(instanceId string, userId string) (error, int)

func (*Mongo) RemoveVariablesOfInstance

func (this *Mongo) RemoveVariablesOfInstance(instanceId string, userId string) (error, int)

func (*Mongo) SetDesign

func (this *Mongo) SetDesign(element model.SmartServiceDesign) (error, int)

func (*Mongo) SetInstance

func (this *Mongo) SetInstance(element model.SmartServiceInstance) (error, int)

func (*Mongo) SetInstanceError

func (this *Mongo) SetInstanceError(id string, userId string, errMsg string) error

func (*Mongo) SetModule

func (this *Mongo) SetModule(element model.SmartServiceModule) (error, int)

func (*Mongo) SetModules

func (this *Mongo) SetModules(elements []model.SmartServiceModule) (error, int)

func (*Mongo) SetRelease

func (this *Mongo) SetRelease(element model.SmartServiceReleaseExtended) (error, int)

func (*Mongo) SetReleaseError

func (this *Mongo) SetReleaseError(id string, errMsg string) error

func (*Mongo) SetVariable

type QueryOptions

type QueryOptions interface {
	GetLimit() int64
	GetOffset() int64
	GetSort() string
}

Jump to

Keyboard shortcuts

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