chaos_hub

package
v0.0.0-...-bcdb799 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedChaosHubStats

type AggregatedChaosHubStats struct {
	TotalChaosHubs []TotalCount `bson:"total_chaos_hubs"`
}

type ChaosHub

type ChaosHub struct {
	ID                      string `bson:"hub_id"`
	ProjectID               string `bson:"project_id"`
	mongodb.ResourceDetails `bson:",inline"`
	mongodb.Audit           `bson:",inline"`
	RepoURL                 string  `bson:"repo_url"`
	RepoBranch              string  `bson:"repo_branch"`
	IsPrivate               bool    `bson:"is_private"`
	AuthType                string  `bson:"auth_type"`
	HubType                 string  `bson:"hub_type"`
	Token                   *string `bson:"token"`
	UserName                *string `bson:"username"`
	Password                *string `bson:"password"`
	SSHPrivateKey           *string `bson:"ssh_private_key"`
	SSHPublicKey            *string `bson:"ssh_public_key"`
	LastSyncedAt            int64   `bson:"last_synced_at"`
	IsDefault               bool    `bson:"is_default"`
}

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) GetAggregateChaosHubs

func (c *Operator) GetAggregateChaosHubs(ctx context.Context, pipeline mongo.Pipeline) (*mongo.Cursor, error)

GetAggregateChaosHubs takes a mongo pipeline to retrieve the project details from 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

type TotalCount

type TotalCount struct {
	Count int `bson:"count"`
}

Jump to

Keyboard shortcuts

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