37 Star 411 Fork 76

GVPrancher/rancher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
remote.go 875 Bytes
一键复制 编辑 原始数据 按行查看 历史
phli 提交于 2018-06-26 16:36 . pipeline new ux
package model
import (
"github.com/rancher/types/apis/project.cattle.io/v3"
)
type Remote interface {
Type() string
CanLogin() bool
CanRepos() bool
CanHook() bool
//Login handle oauth login
Login(code string) (*v3.SourceCodeCredential, error)
Repos(account *v3.SourceCodeCredential) ([]v3.SourceCodeRepository, error)
CreateHook(pipeline *v3.Pipeline, accessToken string) (string, error)
DeleteHook(pipeline *v3.Pipeline, accessToken string) error
GetPipelineFileInRepo(repoURL string, ref string, accessToken string) ([]byte, error)
SetPipelineFileInRepo(repoURL string, ref string, accessToken string, content []byte) error
GetDefaultBranch(repoURL string, accessToken string) (string, error)
GetBranches(repoURL string, accessToken string) ([]string, error)
GetHeadInfo(repoURL string, branch string, accessToken string) (*BuildInfo, error)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/rancher/rancher.git
git@gitee.com:rancher/rancher.git
rancher
rancher
rancher
v2.1.12-rc3

搜索帮助