Documentation ¶
Index ¶
- type GitConfigDB
- type Operator
- func (g *Operator) AddGitConfig(ctx context.Context, config *GitConfigDB) error
- func (g *Operator) DeleteGitConfig(ctx context.Context, projectID string) error
- func (g *Operator) GetAllGitConfig(ctx context.Context) ([]GitConfigDB, error)
- func (g *Operator) GetGitConfig(ctx context.Context, projectID string) (*GitConfigDB, error)
- func (g *Operator) ReplaceGitConfig(ctx context.Context, query bson.D, update *GitConfigDB) error
- func (g *Operator) UpdateGitConfig(ctx context.Context, query bson.D, update bson.D) error
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 ...
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 ¶
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 ¶
GetGitConfig retrieves git config using project id
func (*Operator) ReplaceGitConfig ¶
ReplaceGitConfig updates git config matching the query
Click to show internal directories.
Click to hide internal directories.