db

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateCollections = []func(db *Mongo, config config.Config) error{}
View Source
var ErrorUnexpectedDeploymentVersion = errors.New("unexpected deployment version")
View Source
var Factory = FactoryType{}

Functions

This section is empty.

Types

type DeploymentCommandIdVersionWrapper

type DeploymentCommandIdVersionWrapper struct {
	Id      string `json:"id"`
	Owner   string `json:"owner"`
	Version int64  `json:"version"`
}

type FactoryType

type FactoryType struct{}

func (FactoryType) New

func (f FactoryType) New(ctx context.Context, config config.Config) (result interfaces.Database, err error)

type Mongo

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

func (*Mongo) CheckDeploymentAccess

func (this *Mongo) CheckDeploymentAccess(user string, deploymentId string) (err error, code int)

func (*Mongo) DeleteDependencies

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

func (*Mongo) DeleteDeployment

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

func (*Mongo) GetDependencies

func (this *Mongo) GetDependencies(user string, deploymentId string) (result dependencymodel.Dependencies, err error, code int)

func (*Mongo) GetDependenciesList

func (this *Mongo) GetDependenciesList(user string, limit int, offset int) (result []dependencymodel.Dependencies, err error, code int)

func (*Mongo) GetDeployment

func (this *Mongo) GetDeployment(user string, deploymentId string) (deployment *deploymentmodel.Deployment, err error, code int)

func (*Mongo) GetDeploymentIds

func (this *Mongo) GetDeploymentIds(user string) (deployments []string, err error)

func (*Mongo) GetSelectedDependencies

func (this *Mongo) GetSelectedDependencies(user string, ids []string) (result []dependencymodel.Dependencies, err error, code int)

func (*Mongo) SetDependencies

func (this *Mongo) SetDependencies(dependencies dependencymodel.Dependencies) error

func (*Mongo) SetDeployment

func (this *Mongo) SetDeployment(id string, owner string, deployment *deploymentmodel.Deployment) error

Jump to

Keyboard shortcuts

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