gitsupport

package
v0.0.0-...-bb2f907 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 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 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

Jump to

Keyboard shortcuts

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