Documentation
¶
Index ¶
- func GetGitFileStats(client ClientOperation, gitFiles git.GitFileContentMap) (map[string]any, error)
- func PushInitRepo(client ClientOperation, commitInfo *git.CommitInfo) error
- type ClientOperation
- type MockScmClient
- func (m *MockScmClient) AddRepoSecret(secretKey, secretValue string) error
- func (m *MockScmClient) AddWebhook(webhookConfig *git.WebhookConfig) error
- func (m *MockScmClient) DeleteFiles(commitInfo *git.CommitInfo) error
- func (m *MockScmClient) DeleteRepo() error
- func (m *MockScmClient) DeleteWebhook(webhookConfig *git.WebhookConfig) error
- func (m *MockScmClient) DescribeRepo() (*git.RepoInfo, error)
- func (m *MockScmClient) DownloadRepo() (string, error)
- func (m *MockScmClient) GetPathInfo(path string) ([]*git.RepoFileStatus, error)
- func (m *MockScmClient) InitRepo() error
- func (m *MockScmClient) PushFiles(commitInfo *git.CommitInfo, checkUpdate bool) (bool, error)
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 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)
Click to show internal directories.
Click to hide internal directories.