Documentation
¶
Index ¶
- Constants
- type Branch
- type Client
- func (c *Client) Compare(projectID int, from, to string) ([]*gitlab.Diff, error)
- func (c *Client) CreateCommitDiscussion(projectPath, commitHash, comment string) error
- func (c *Client) GetFileContent(projectID int, ref, path string) ([]byte, error)
- func (c *Client) GetLatestCommit(projectID int, branch, path string) (*RepoCommit, error)
- func (c *Client) GetLatestCommitByProName(projectID, branch, path string) (*RepoCommit, error)
- func (c *Client) GetProject(owner, repo string) (*Project, error)
- func (c *Client) GetRawFile(projectID int, sha string, fileName string) (content []byte, err error)
- func (c *Client) GetSingleCommitOfProject(address, token, projectPath, commitSha string) (*gitlab.Commit, error)
- func (c *Client) ListBranches(projectID string) ([]*Branch, error)
- func (c *Client) ListChangedFiles(address, token string, event *gitlab.MergeEvent) ([]string, error)
- func (c *Client) ListGroupProjects(namespace, keyword string) ([]*Project, error)
- func (c *Client) ListNamespaces(keyword string) ([]*Namespace, error)
- func (c *Client) ListOpened(projectID, targetBranch string) ([]*MergeRequest, error)
- func (c *Client) ListTags(projectID string) ([]*Tag, error)
- func (c *Client) ListTree(projectID int, ref string, path string) ([]*gitlab.TreeNode, error)
- func (c *Client) ListUserProjects(owner, keyword string) ([]*Project, error)
- type MergeRequest
- type Namespace
- type Project
- type RepoCommit
- type Tag
Constants ¶
View Source
const DefaultOrgID = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewGitlabClient ¶
func (*Client) CreateCommitDiscussion ¶
func (*Client) GetFileContent ¶
func (*Client) GetLatestCommit ¶
func (c *Client) GetLatestCommit(projectID int, branch, path string) (*RepoCommit, error)
func (*Client) GetLatestCommitByProName ¶
func (c *Client) GetLatestCommitByProName(projectID, branch, path string) (*RepoCommit, error)
GetLatestCommit By string pro
func (*Client) GetRawFile ¶
func (*Client) GetSingleCommitOfProject ¶
func (*Client) ListBranches ¶
List branches by projectID <- urlEncode(namespace/projectName)
func (*Client) ListChangedFiles ¶
func (*Client) ListGroupProjects ¶
func (*Client) ListNamespaces ¶
func (*Client) ListOpened ¶
func (c *Client) ListOpened(projectID, targetBranch string) ([]*MergeRequest, error)
type MergeRequest ¶
type MergeRequest struct {
MRID int `json:"id"`
TargetBranch string `json:"targetBranch"`
SourceBranch string `json:"sourceBranch"`
ProjectID int `json:"projectId"`
Title string `json:"title"`
State string `json:"state"`
CreatedAt int64 `json:"createdAt"`
UpdatedAt int64 `json:"updatedAt"`
AuthorUsername string `json:"authorUsername"`
Number int `json:"number"`
User string `json:"user"`
Base string `json:"base,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.