Documentation ¶
Index ¶
- func GetCodeOwnerRepo(codeUrl string) (string, string, error)
- type Client
- type Commit
- type Git
- func (g *Git) Auth() (transport.AuthMethod, error)
- func (g *Git) Clone(ctx context.Context, repoDir string, isBare bool, options *git.CloneOptions) (*git.Repository, error)
- func (g *Git) CreateTag(ctx context.Context, codeUrl, commitId, tagName string) error
- func (g *Git) GetBranchLatestCommit(ctx context.Context, codeUrl, branch string) (*Commit, error)
- func (g *Git) ListRepoBranches(ctx context.Context, codeUrl string) ([]*Reference, error)
- func (g *Git) ListRepositories(ctx context.Context) ([]*Repository, error)
- type Gitee
- func (g *Gitee) Auth() (transport.AuthMethod, error)
- func (g *Gitee) Clone(ctx context.Context, repoDir string, isBare bool, options *git.CloneOptions) (*git.Repository, error)
- func (g *Gitee) CreateTag(ctx context.Context, codeUrl, commitId, tagName string) error
- func (g *Gitee) GetBranchLatestCommit(ctx context.Context, codeUrl, branch string) (*Commit, error)
- func (g *Gitee) ListRepoBranches(ctx context.Context, codeUrl string) ([]*Reference, error)
- func (g *Gitee) ListRepoPullRequests(ctx context.Context, codeUrl string) ([]*PullRequest, error)
- func (g *Gitee) ListRepositories(ctx context.Context) ([]*Repository, error)
- type GiteeBranchCommit
- type GiteeCommit
- type GiteeCreateTagRequest
- type GiteeListPullRequests
- type GiteePullRequest
- type GiteeRepoBranch
- type GiteeRepoBranchListQuery
- type GiteeRepository
- type GiteeRepositoryListQuery
- type GiteeUser
- type Github
- func (g *Github) Auth() (transport.AuthMethod, error)
- func (g *Github) Clone(ctx context.Context, repoDir string, isBare bool, options *git.CloneOptions) (*git.Repository, error)
- func (g *Github) CreateTag(ctx context.Context, codeUrl, commitId, tagName string) error
- func (g *Github) GetBranchLatestCommit(ctx context.Context, codeUrl, branch string) (*Commit, error)
- func (g *Github) ListRepoBranches(ctx context.Context, codeUrl string) ([]*Reference, error)
- func (g *Github) ListRepoPullRequests(ctx context.Context, codeUrl string) ([]*PullRequest, error)
- func (g *Github) ListRepoRefs(ctx context.Context, codeUrl, matchRef string) ([]*Reference, error)
- func (g *Github) ListRepositories(ctx context.Context) ([]*Repository, error)
- type Gitlab
- func (g *Gitlab) Auth() (transport.AuthMethod, error)
- func (g *Gitlab) Clone(ctx context.Context, repoDir string, isBare bool, options *git.CloneOptions) (*git.Repository, error)
- func (g *Gitlab) CreateTag(ctx context.Context, codeUrl, commitId, tagName string) error
- func (g *Gitlab) GetBranchLatestCommit(ctx context.Context, codeUrl, branch string) (*Commit, error)
- func (g *Gitlab) GetPID(codeUrl string) (string, error)
- func (g *Gitlab) ListRepoBranches(ctx context.Context, codeUrl string) ([]*Reference, error)
- func (g *Gitlab) ListRepoPullRequests(ctx context.Context, codeUrl string) ([]*PullRequest, error)
- func (g *Gitlab) ListRepositories(ctx context.Context) ([]*Repository, error)
- type PullRequest
- type Reference
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCodeOwnerRepo ¶
GetCodeOwnerRepo 获取代码库的owner以及repo 如:https://github.com/test/testrepo.git -> test,testrepo git@github.com/test/testrepo.git -> test,testrepo
Types ¶
type Client ¶
type Client interface { Auth() (transport.AuthMethod, error) ListRepositories(ctx context.Context) ([]*Repository, error) ListRepoBranches(ctx context.Context, codeUrl string) ([]*Reference, error) GetBranchLatestCommit(ctx context.Context, codeUrl, branch string) (*Commit, error) Clone(ctx context.Context, repoDir string, isBare bool, options *git.CloneOptions) (*git.Repository, error) CreateTag(ctx context.Context, codeUrl, commitId, tagName string) error }
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
func (*Git) GetBranchLatestCommit ¶
func (*Git) ListRepoBranches ¶
func (*Git) ListRepositories ¶
func (g *Git) ListRepositories(ctx context.Context) ([]*Repository, error)
type Gitee ¶
type Gitee struct {
// contains filtered or unexported fields
}
func (*Gitee) GetBranchLatestCommit ¶
func (*Gitee) ListRepoBranches ¶
func (*Gitee) ListRepoPullRequests ¶
func (*Gitee) ListRepositories ¶
func (g *Gitee) ListRepositories(ctx context.Context) ([]*Repository, error)
type GiteeBranchCommit ¶
type GiteeCommit ¶
type GiteeCreateTagRequest ¶
type GiteeListPullRequests ¶
type GiteePullRequest ¶
type GiteeRepoBranch ¶
type GiteeRepoBranch struct { Commit *GiteeBranchCommit `json:"commit"` Name string `json:"name"` Protected bool `json:"protected"` ProtectedUrl string `json:"protected_url"` }
type GiteeRepository ¶
type GiteeRepositoryListQuery ¶
type GiteeRepositoryListQuery struct {
AccessToken string `json:"access_token" url:"access_token"`
}
type Github ¶
type Github struct {
// contains filtered or unexported fields
}
func (*Github) GetBranchLatestCommit ¶
func (*Github) ListRepoBranches ¶
func (*Github) ListRepoPullRequests ¶
func (*Github) ListRepoRefs ¶
func (*Github) ListRepositories ¶
func (g *Github) ListRepositories(ctx context.Context) ([]*Repository, error)
type Gitlab ¶
type Gitlab struct {
// contains filtered or unexported fields
}
func (*Gitlab) GetBranchLatestCommit ¶
func (*Gitlab) ListRepoBranches ¶
func (*Gitlab) ListRepoPullRequests ¶
func (*Gitlab) ListRepositories ¶
func (g *Gitlab) ListRepositories(ctx context.Context) ([]*Repository, error)
type PullRequest ¶
type Repository ¶
Click to show internal directories.
Click to hide internal directories.