chaoshub

package
v0.0.0-...-d4d4b81 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChaosHub

type ChaosHub struct {
	ID            string  `bson:"chaoshub_id"`
	ProjectID     string  `bson:"project_id"`
	RepoURL       string  `bson:"repo_url"`
	RepoBranch    string  `bson:"repo_branch"`
	HubName       string  `bson:"hub_name"`
	IsPrivate     bool    `bson:"IsPrivate"`
	AuthType      string  `bson:"AuthType"`
	HubType       string  `bson:"hub_type"`
	Token         *string `bson:"Token"`
	UserName      *string `bson:"UserName"`
	Password      *string `bson:"Password"`
	SSHPrivateKey *string `bson:"SSHPrivateKey"`
	SSHPublicKey  *string `bson:"SSHPublicKey"`
	IsRemoved     bool    `bson:"IsRemoved"`
	CreatedAt     string  `bson:"created_at"`
	UpdatedAt     string  `bson:"updated_at"`
	LastSyncedAt  string  `bson:"last_synced_at"`
}

ChaosHub ...

func (*ChaosHub) GetOutputChaosHub

func (c *ChaosHub) GetOutputChaosHub() *model.ChaosHub

GetOutputChaosHub ...

type Operator

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

func NewChaosHubOperator

func NewChaosHubOperator(mongodbOperator mongodb.MongoOperator) *Operator

func (*Operator) CreateChaosHub

func (c *Operator) CreateChaosHub(ctx context.Context, chaosHub *ChaosHub) error

CreateChaosHub creates a private chaosHub for the user in the database

func (*Operator) GetChaosHubByProjectID

func (c *Operator) GetChaosHubByProjectID(ctx context.Context, projectID string) ([]ChaosHub, error)

GetChaosHubByProjectID returns a private Hub based on the projectID

func (*Operator) GetHubByID

func (c *Operator) GetHubByID(ctx context.Context, hubID string, projectID string) (ChaosHub, error)

GetHubByID returns a single chaosHub based on the hubID

func (*Operator) GetHubs

func (c *Operator) GetHubs(ctx context.Context) ([]ChaosHub, error)

GetHubs lists all the chaosHubs that are present

func (*Operator) UpdateChaosHub

func (c *Operator) UpdateChaosHub(ctx context.Context, query bson.D, update bson.D) error

UpdateChaosHub updates the chaosHub

Jump to

Keyboard shortcuts

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