scm

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGitFileStats added in v0.10.3

func GetGitFileStats(client ClientOperation, gitFiles git.GitFileContentMap) (map[string]any, error)

func PushInitRepo

func PushInitRepo(client ClientOperation, commitInfo *git.CommitInfo) error

Types

type ClientOperation

type ClientOperation interface {
	InitRepo() error
	DeleteRepo() error
	DownloadRepo() (string, error)
	DescribeRepo() (*git.RepoInfo, error)
	PushFiles(commitInfo *git.CommitInfo, checkUpdate bool) (bool, error)
	DeleteFiles(commitInfo *git.CommitInfo) error
	GetPathInfo(path string) ([]*git.RepoFileStatus, error)
	AddWebhook(webhookConfig *git.WebhookConfig) error
	DeleteWebhook(webhookConfig *git.WebhookConfig) error
	AddRepoSecret(secretKey, secretValue string) error
}

func NewClient

func NewClient(repoInfo *git.RepoInfo) (ClientOperation, error)

func NewClientWithAuth added in v0.10.0

func NewClientWithAuth(repoInfo *git.RepoInfo) (ClientOperation, error)

type MockScmClient added in v0.10.0

type MockScmClient struct {
	InitRaiseError         error
	PushRaiseError         error
	GetPathInfoError       error
	DownloadRepoError      error
	AddRepoSecretError     error
	DownloadRepoValue      string
	NeedRollBack           bool
	DeleteFuncIsRun        bool
	GetPathInfoReturnValue []*git.RepoFileStatus
}

func (*MockScmClient) AddRepoSecret added in v0.10.0

func (m *MockScmClient) AddRepoSecret(secretKey, secretValue string) error

func (*MockScmClient) AddWebhook added in v0.10.0

func (m *MockScmClient) AddWebhook(webhookConfig *git.WebhookConfig) error

func (*MockScmClient) DeleteFiles added in v0.10.0

func (m *MockScmClient) DeleteFiles(commitInfo *git.CommitInfo) error

func (*MockScmClient) DeleteRepo added in v0.10.0

func (m *MockScmClient) DeleteRepo() error

func (*MockScmClient) DeleteWebhook added in v0.10.0

func (m *MockScmClient) DeleteWebhook(webhookConfig *git.WebhookConfig) error

func (*MockScmClient) DescribeRepo added in v0.10.0

func (m *MockScmClient) DescribeRepo() (*git.RepoInfo, error)

func (*MockScmClient) DownloadRepo added in v0.10.0

func (m *MockScmClient) DownloadRepo() (string, error)

func (*MockScmClient) GetPathInfo added in v0.10.0

func (m *MockScmClient) GetPathInfo(path string) ([]*git.RepoFileStatus, error)

func (*MockScmClient) InitRepo added in v0.10.0

func (m *MockScmClient) InitRepo() error

func (*MockScmClient) PushFiles added in v0.10.0

func (m *MockScmClient) PushFiles(commitInfo *git.CommitInfo, checkUpdate bool) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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