gitops

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitConfigDB

type GitConfigDB struct {
	ProjectID     string         `bson:"project_id"`
	RepositoryURL string         `bson:"repo_url"`
	Branch        string         `bson:"branch"`
	LatestCommit  string         `bson:"latest_commit"`
	AuthType      model.AuthType `bson:"auth_type"`
	UserName      *string        `bson:"username"`
	Password      *string        `bson:"password"`
	Token         *string        `bson:"token"`
	SSHPrivateKey *string        `bson:"ssh_private_key"`
}

GitConfigDB ...

func GetGitConfigDB

func GetGitConfigDB(projectID string, config model.GitConfig) GitConfigDB

GetGitConfigDB ...

type Operator

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

Operator is the struct for gitOps operator

func NewGitOpsOperator

func NewGitOpsOperator(mongodbOperator mongodb.MongoOperator) *Operator

NewGitOpsOperator returns a new instance of gitOps operator

func (*Operator) AddGitConfig

func (g *Operator) AddGitConfig(ctx context.Context, config *GitConfigDB) error

AddGitConfig inserts new git config for project

func (*Operator) DeleteGitConfig

func (g *Operator) DeleteGitConfig(ctx context.Context, projectID string) error

DeleteGitConfig removes git config corresponding to the given project id

func (*Operator) GetAllGitConfig

func (g *Operator) GetAllGitConfig(ctx context.Context) ([]GitConfigDB, error)

GetAllGitConfig retrieves all git configs from db

func (*Operator) GetGitConfig

func (g *Operator) GetGitConfig(ctx context.Context, projectID string) (*GitConfigDB, error)

GetGitConfig retrieves git config using project id

func (*Operator) ReplaceGitConfig

func (g *Operator) ReplaceGitConfig(ctx context.Context, query bson.D, update *GitConfigDB) error

ReplaceGitConfig updates git config matching the query

func (*Operator) UpdateGitConfig

func (g *Operator) UpdateGitConfig(ctx context.Context, query bson.D, update bson.D) error

UpdateGitConfig update git config matching the query

Jump to

Keyboard shortcuts

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