Documentation
¶
Index ¶
- func CheckRepo()
- func Checkprotocol(v config.Repo) string
- func CloneOnNotExist(repo config.Repo) error
- func GetRepoName(repo config.Repo) string
- func GetRepoOriginalName(repo config.Repo) string
- func IsDuplcatedRepo(repos []config.Repo) (bool, error)
- func LocalRepoAddr(repo config.Repo) string
- func Pull(dst string, opts ...PullOptions) error
- func RunScript(repo config.Repo) (int64, string, error)
- func SearchRepo(ID string) (config.Repo, error)
- func SetBuildStat(id string, stat int)
- func StartPullAndWorkflow(repo config.Repo, hook Hook, action string)
- type CloneOptions
- type Hook
- type PullOptions
- type Pusher
- type UncriticalError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Checkprotocol ¶ added in v0.1.3
Checkprotocol checks protocol
func CloneOnNotExist ¶
CloneOnNotExist clone repo not exist locally
func GetRepoOriginalName ¶ added in v0.3.0
GetRepoOriginal returns reponame withoutgit.
func IsDuplcatedRepo ¶
IsDuplcatedRepo check if repo is dupl in config.
func LocalRepoAddr ¶
LocalRepoAddr returns path repo storage in.
func SearchRepo ¶
Searchinfo returns repo with specified id.
func SetBuildStat ¶ added in v0.3.0
SetBuildStat modify build status of repo.
Types ¶
type CloneOptions ¶
type CloneOptions struct { //hook type Type string //specify protocol Protocol string // Indicates whether the repository should be cloned as a mirror. Mirror bool // sshkey used for clone. Sshkey string // Indicates whether the repository should be cloned in bare format. Bare bool // Indicates whether to suppress the log output. Quiet bool // The branch to check out for the working tree when Bare=false. Branch string //Under http protocol Username string Password string //token (github) Token string // The number of revisions to clone. Depth uint64 // The timeout duration before giving up for each shell command execution. The // default timeout duration will be used when not supplied. Timeout time.Duration }
Gogs code under mit.
type PullOptions ¶
type PullOptions struct { //specify protocol Protocol string // Indicates whether to rebased during pulling. Rebase bool // Git rep Type string // sshkey used for clone. Sshkey string // Under http protocol Username string Password string // Auth type Token string // Indicates whether to pull from all remotes. All bool // The remote to pull updates from when All=false. Remote string // The branch to pull updates from when All=false and Remote is supplied. Branch string // The timeout duration before giving up for each shell command execution. The // default timeout duration will be used when not supplied. Timeout time.Duration }
type UncriticalError ¶
Errors that does not infect cicd.
func CheckRepoConfig ¶
func CheckRepoConfig(repoarray []config.Repo) (string, []UncriticalError, error)
CheckRepoConfig checks if any attr is empty.
Click to show internal directories.
Click to hide internal directories.