Documentation
      ¶
    
    
  
    
  
    Index ¶
- func APILastCommits(host, id string) string
 - func APILastCommitsOfBranch(host, id, branch string) string
 - func APILastCommitsOfPath(host, id, branch, path string) string
 - func APIMetadata(host, id string) string
 - func APIRaw(host, owner, repo, path string) string
 - func APIRepoTree(host, id, branch string) string
 - type Commit
 - type GitLabAPI
 - type Headers
 - type IGitLabAPI
 - type InnerTree
 - type ObjectType
 - type Tree
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APILastCommits ¶
APILastCommits GitLab : List repository commits API Ref: https://docs.gitlab.com/ee/api/commits.html#list-repository-commits Example: https://gitlab.com/api/v4/projects/nanuchi%2Fdeveloping-with-docker/repository/commits
func APILastCommitsOfBranch ¶
APILastCommitsOfBranch GitLab : Last commits of specific branch API Ref: https://docs.gitlab.com/ee/api/commits.html#list-repository-commits Example: https://gitlab.com/api/v4/projects/nanuchi%2Fdeveloping-with-docker/repository/commits?ref_name=feature/k8s-in-hour
func APILastCommitsOfPath ¶
APILastCommitsOfPath GitLab : Last commits of specific branch & specified path API Ref: https://docs.gitlab.com/ee/api/commits.html#list-repository-commits Example: https://gitlab.com/api/v4/projects/nanuchi%2Fdeveloping-with-docker/repository/commits?ref_name=master&path=app/server.js
func APIMetadata ¶
APIDefaultBranch GitLab : Branch metadata; list repo branches API Ref: https://docs.gitlab.com/ee/api/branches.html#list-repository-branches Example: https://gitlab.com/api/v4/projects/nanuchi%2Fdeveloping-with-docker/repository/branches
func APIRaw ¶
APIRaw GitLab : Get raw file from repository API Ref: https://docs.gitlab.com/ee/api/repository_files.html#get-raw-file-from-repository Example: https://gitlab.com/api/v4/projects/23383112/repository/files/app%2Findex.html/raw
func APIRepoTree ¶
APIRepoTree GitLab tree api API Ref: https://docs.gitlab.com/ee/api/repositories.html
Types ¶
type Commit ¶
type Commit struct {
	ID             string    `json:"id"`
	ShortID        string    `json:"short_id"`
	CreatedAt      time.Time `json:"created_at"`
	Title          string    `json:"title"`
	Message        string    `json:"message"`
	AuthorName     string    `json:"author_name"`
	AuthorEmail    string    `json:"author_email"`
	AuthoredDate   time.Time `json:"authored_date"`
	CommitterName  string    `json:"committer_name"`
	CommitterEmail string    `json:"committer_email"`
	CommitterDate  time.Time `json:"committed_date"`
	WebURL         string    `json:"web_url"`
	ParentIDS      []string  `json:"parent_ids"`
}
    LatestCommit returned structure
type GitLabAPI ¶
type GitLabAPI struct {
	// contains filtered or unexported fields
}
    func NewGitLabAPI ¶
func (*GitLabAPI) GetDefaultBranchName ¶
func (*GitLabAPI) GetLatestCommit ¶
type IGitLabAPI ¶
type InnerTree ¶
type InnerTree struct {
	ID   string     `json:"id"`
	Name string     `json:"name"`
	Type ObjectType `json:"type"`
	Path string     `json:"path"`
	Mode string     `json:"mode"`
}
    type ObjectType ¶
type ObjectType string
const ( ObjectTypeDir ObjectType = "tree" ObjectTypeFile ObjectType = "blob" )
type Tree ¶
type Tree []InnerTree
func (*Tree) ListAllDirs ¶
ListAllDirs list all directories in repo tree
func (*Tree) ListAllFiles ¶
ListAllFiles list all files in repo tree