mongodb

package
v0.0.0-...-d523446 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//Database ...
	Database *mongo.Database
)

Functions

func DeleteChaosWorkflow

func DeleteChaosWorkflow(workflowid string) (bool, error)

func InsertChaosWorkflow

func InsertChaosWorkflow(chaosWorkflow ChaosWorkFlowInput) error

func InsertCluster

func InsertCluster(cluster Cluster) error

func UpdateCluster

func UpdateCluster(query bson.D, update bson.D) error

func UpsertWorkflowRun

func UpsertWorkflowRun(wfRun WorkflowRun) error

Types

type ChaosWorkFlowInput

type ChaosWorkFlowInput struct {
	WorkflowID          string             `bson:"workflow_id"`
	WorkflowManifest    string             `bson:"workflow_manifest"`
	CronSyntax          string             `bson:"cronSyntax"`
	WorkflowName        string             `bson:"Workflow_name"`
	WorkflowDescription string             `bson:"Workflow_description"`
	Weightages          []*WeightagesInput `bson:"Weightages"`
	IsCustomWorkflow    bool               `bson:"isCustomWorkflow"`
	UpdatedAt           string             `bson:"updated_at"`
	CreatedAt           string             `bson:"created_at"`
	ProjectID           string             `bson:"project_id"`
	ClusterID           string             `bson:"cluster_id"`
}

type Cluster

type Cluster struct {
	ClusterID          string  `bson:"cluster_id"`
	ProjectID          string  `bson:"project_id"`
	ClusterName        string  `bson:"cluster_name"`
	Description        *string `bson:"description"`
	PlatformName       string  `bson:"platform_name"`
	AccessKey          string  `bson:"access_key"`
	IsRegistered       bool    `bson:"is_registered"`
	IsClusterConfirmed bool    `bson:"is_cluster_confirmed"`
	IsActive           bool    `bson:"is_active"`
	UpdatedAt          string  `bson:"updated_at"`
	CreatedAt          string  `bson:"created_at"`
	ClusterType        string  `bson:"cluster_type"`
}

func GetCluster

func GetCluster(cluster_id string) (Cluster, error)

func GetClusterWithProjectID

func GetClusterWithProjectID(project_id string, cluster_type *string) ([]*Cluster, error)

type WeightagesInput

type WeightagesInput struct {
	ExperimentName string `bson:"experiment_name"`
	Weightage      int    `bson:"weightage"`
}

type WorkflowRun

type WorkflowRun struct {
	WorkflowRunID string `bson:"workflow_run_id"`
	WorkflowID    string `bson:"workflow_id"`
	ClusterName   string `bson:"cluster_name"`
	LastUpdated   string `bson:"last_updated"`
	ProjectID     string `bson:"project_id"`
	ClusterID     string `bson:"cluster_id"`
	WorkflowName  string `bson:"workflow_name"`
	ExecutionData string `bson:"execution_data"`
}

func GetWorkflowRuns

func GetWorkflowRuns(_pid string) ([]WorkflowRun, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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