Documentation
¶
Index ¶
- Constants
- Variables
- func FetchSyncJobs[OutputType any](collection *mongo.Collection, syncLockDuration time.Duration, maxBatchSize int) (jobs []OutputType, err error)
- type DeploymentCommandIdVersionWrapper
- type DeploymentWithSyncInfo
- type FactoryType
- type Mongo
- func (this *Mongo) CheckDeploymentAccess(user string, deploymentId string) (err error, code int)
- func (this *Mongo) DeleteDependencies(id string) error
- func (this *Mongo) DeleteDeployment(id string, syncDeleteHandler func(messages.DeploymentCommand) error) error
- func (this *Mongo) GetDependencies(user string, deploymentId string) (result dependencymodel.Dependencies, err error, code int)
- func (this *Mongo) GetDependenciesList(user string, limit int, offset int) (result []dependencymodel.Dependencies, err error, code int)
- func (this *Mongo) GetDeployment(user string, deploymentId string) (deployment *deploymentmodel.Deployment, err error, code int)
- func (this *Mongo) GetDeploymentIds(user string) (deployments []string, err error)
- func (this *Mongo) GetSelectedDependencies(user string, ids []string) (result []dependencymodel.Dependencies, err error, code int)
- func (this *Mongo) ListDeployments(user string, listOptions model.DeploymentListOptions) (deployments []deploymentmodel.Deployment, err error)
- func (this *Mongo) RetryDeploymentSync(lockduration time.Duration, ...) error
- func (this *Mongo) SetDependencies(dependencies dependencymodel.Dependencies) error
- func (this *Mongo) SetDeployment(depl messages.DeploymentCommand, ...) error
- type SyncInfo
Constants ¶
View Source
const FetchSyncJobsDefaultBatchSize = 1000
View Source
const SyncDeleteBson = "sync_delete"
View Source
const SyncTodoBson = "sync_todo"
View Source
const SyncUnixTimestampBson = "sync_unix_timestamp"
Variables ¶
View Source
var CreateCollections = []func(db *Mongo, config config.Config) error{}
View Source
var DeploymentBson = getBsonFieldObject[messages.DeploymentCommand]()
View Source
var ErrorUnexpectedDeploymentVersion = errors.New("unexpected deployment version")
View Source
var Factory = FactoryType{}
View Source
var NotDeletedFilterKey = "$or"
View Source
var NotDeletedFilterValue = []interface{}{ bson.M{SyncDeleteBson: bson.M{"$exists": false}}, bson.M{SyncDeleteBson: false}, }
Functions ¶
func FetchSyncJobs ¶ added in v0.0.16
Types ¶
type DeploymentWithSyncInfo ¶ added in v0.0.16
type DeploymentWithSyncInfo struct { messages.DeploymentCommand `bson:",inline"` SyncInfo `bson:",inline"` }
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 (*Mongo) DeleteDependencies ¶
func (*Mongo) DeleteDeployment ¶
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 (*Mongo) GetSelectedDependencies ¶
func (this *Mongo) GetSelectedDependencies(user string, ids []string) (result []dependencymodel.Dependencies, err error, code int)
func (*Mongo) ListDeployments ¶ added in v0.0.14
func (this *Mongo) ListDeployments(user string, listOptions model.DeploymentListOptions) (deployments []deploymentmodel.Deployment, err error)
func (*Mongo) RetryDeploymentSync ¶ added in v0.0.16
func (this *Mongo) RetryDeploymentSync(lockduration time.Duration, syncDeleteHandler func(messages.DeploymentCommand) error, syncHandler func(messages.DeploymentCommand) error) error
func (*Mongo) SetDependencies ¶
func (this *Mongo) SetDependencies(dependencies dependencymodel.Dependencies) error
func (*Mongo) SetDeployment ¶
func (this *Mongo) SetDeployment(depl messages.DeploymentCommand, syncHandler func(messages.DeploymentCommand) error) error
Click to show internal directories.
Click to hide internal directories.