Documentation
¶
Index ¶
- type GitInterfaceProvider
- type GitProvider
- func (p *GitProvider) Apply(path string, ref interface{}, content []byte) (interface{}, error)
- func (p *GitProvider) CommitStatus(commitMessage, branchName, cid, app string, files interface{}) error
- func (p *GitProvider) Delete(path string, ref interface{}, content []byte) (interface{}, error)
- func (p *GitProvider) Get(name string, gvkRes []byte) ([]byte, error)
- func (p *GitProvider) IsReachable() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitInterfaceProvider ¶
type GitInterfaceProvider interface { AddToCommit(fileName, content string, ref interface{}) interface{} DeleteToCommit(fileName string, ref interface{}) interface{} CommitFiles(app, message string, files interface{}) error ClusterWatcher(ctx context.Context, cid, app, cluster string, waitTime int) error CommitStatus(commitMessage, branchName, cid, app string, files interface{}) error }
type GitProvider ¶
type GitProvider struct { GitUser string GitRepo string GitToken string Cluster string GitType string GitBranch string Url string // contains filtered or unexported fields }
func NewGitProvider ¶
func NewGitProvider() (*GitProvider, error)
Function to create a New gitProvider params : cid, app, cluster, level, namespace string return : GitProvider, error
func (*GitProvider) Apply ¶
func (p *GitProvider) Apply(path string, ref interface{}, content []byte) (interface{}, error)
Function to apply resource to the cluster params : name string, ref interface{}, content []byte return : interface{}, error
func (*GitProvider) CommitStatus ¶
func (p *GitProvider) CommitStatus(commitMessage, branchName, cid, app string, files interface{}) error
Function to commit resources to the cluster params : ctx context.Context, ref interface{} return : error
func (*GitProvider) Delete ¶
func (p *GitProvider) Delete(path string, ref interface{}, content []byte) (interface{}, error)
Function to delete resource from the cluster params : name string, ref interface{}, content []byte return : interface{}, error
func (*GitProvider) Get ¶
func (p *GitProvider) Get(name string, gvkRes []byte) ([]byte, error)
Function to get resource from the cluster params : name string, gvkRes []byte return : []byte, error
func (*GitProvider) IsReachable ¶
func (p *GitProvider) IsReachable() error
Function for cluster reachablity test params : null return : error