Documentation ¶
Index ¶
- func GetCloneUrl(protocol, host, owner, repo string) string
- type AddedBy
- type Commit
- type CommitsResponse
- type GitnessClient
- func (g *GitnessClient) GetCommits(owner string, repositoryName string, branch *string) (*[]Commit, error)
- func (g *GitnessClient) GetDefaultBranch(url string) (*string, error)
- func (g *GitnessClient) GetLastCommitSha(repoURL string, branch *string) (string, error)
- func (g *GitnessClient) GetPr(repoURL string, prNumber uint32) (*PullRequest, error)
- func (g *GitnessClient) GetRepoBranches(repositoryId string, namespaceId string) ([]*RepoBranch, error)
- func (g *GitnessClient) GetRepoPRs(repositoryId string, namespaceId string) ([]*PR, error)
- func (g *GitnessClient) GetRepoRef(url string) (*string, error)
- func (g *GitnessClient) GetRepositories(namespace string) ([]Repository, error)
- func (g *GitnessClient) GetRepository(url string) (*Repository, error)
- func (g *GitnessClient) GetSpaceAdmin(spaceName string) (*SpaceMemberResponse, error)
- func (g *GitnessClient) GetSpaces() ([]MembershipResponse, error)
- func (g *GitnessClient) GetUser() (*UserResponse, error)
- type MembershipResponse
- type PR
- type Principal
- type PullRequest
- type RepoBranch
- type Repository
- type Space
- type SpaceMemberResponse
- type User
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCloneUrl ¶
Types ¶
type Commit ¶
type Commit struct { Sha string `json:"sha"` ParentShas []string `json:"parent_shas"` Title string `json:"title"` Message string `json:"message"` Author struct { Identity struct { Name string `json:"name"` Email string `json:"email"` } `json:"identity"` When time.Time `json:"when"` } `json:"author"` Committer struct { Identity struct { Name string `json:"name"` Email string `json:"email"` } `json:"identity"` When time.Time `json:"when"` } `json:"committer"` Stats struct { Total struct { Insertions int `json:"insertions"` Deletions int `json:"deletions"` Changes int `json:"changes"` } `json:"total"` } `json:"stats"` }
type CommitsResponse ¶
type CommitsResponse struct {
Commits []Commit `json:"commits"`
}
type GitnessClient ¶
func NewGitnessClient ¶
func NewGitnessClient(token string, baseUrl *url.URL) *GitnessClient
func (*GitnessClient) GetCommits ¶ added in v0.26.0
func (*GitnessClient) GetDefaultBranch ¶ added in v0.26.0
func (g *GitnessClient) GetDefaultBranch(url string) (*string, error)
func (*GitnessClient) GetLastCommitSha ¶
func (g *GitnessClient) GetLastCommitSha(repoURL string, branch *string) (string, error)
func (*GitnessClient) GetPr ¶
func (g *GitnessClient) GetPr(repoURL string, prNumber uint32) (*PullRequest, error)
func (*GitnessClient) GetRepoBranches ¶
func (g *GitnessClient) GetRepoBranches(repositoryId string, namespaceId string) ([]*RepoBranch, error)
func (*GitnessClient) GetRepoPRs ¶
func (g *GitnessClient) GetRepoPRs(repositoryId string, namespaceId string) ([]*PR, error)
func (*GitnessClient) GetRepoRef ¶
func (g *GitnessClient) GetRepoRef(url string) (*string, error)
func (*GitnessClient) GetRepositories ¶
func (g *GitnessClient) GetRepositories(namespace string) ([]Repository, error)
func (*GitnessClient) GetRepository ¶ added in v0.26.0
func (g *GitnessClient) GetRepository(url string) (*Repository, error)
func (*GitnessClient) GetSpaceAdmin ¶
func (g *GitnessClient) GetSpaceAdmin(spaceName string) (*SpaceMemberResponse, error)
func (*GitnessClient) GetSpaces ¶
func (g *GitnessClient) GetSpaces() ([]MembershipResponse, error)
func (*GitnessClient) GetUser ¶
func (g *GitnessClient) GetUser() (*UserResponse, error)
type MembershipResponse ¶
type PullRequest ¶
type PullRequest struct { GitUrl string Number int `json:"number"` Created int64 `json:"created"` Edited int64 `json:"edited"` State string `json:"state"` IsDraft bool `json:"is_draft"` Title string `json:"title"` Description string `json:"description"` SourceRepoID int `json:"source_repo_id"` SourceBranch string `json:"source_branch"` SourceSha string `json:"source_sha"` TargetRepoID int `json:"target_repo_id"` TargetBranch string `json:"target_branch"` Merged *bool `json:"merged"` MergeMethod *string `json:"merge_method"` MergeCheckStatus string `json:"merge_check_status"` MergeTargetSha string `json:"merge_target_sha"` MergeBaseSha string `json:"merge_base_sha"` Author struct { ID int `json:"id"` UID string `json:"uid"` DisplayName string `json:"display_name"` Email string `json:"email"` Type string `json:"type"` Created int64 `json:"created"` Updated int64 `json:"updated"` } `json:"author"` Merger *struct { ID int `json:"id"` UID string `json:"uid"` DisplayName string `json:"display_name"` Email string `json:"email"` Type string `json:"type"` Created int64 `json:"created"` Updated int64 `json:"updated"` } `json:"merger"` Stats struct { Commits int `json:"commits"` FilesChanged int `json:"files_changed"` } `json:"stats"` }
type RepoBranch ¶
type Repository ¶
type Repository struct { Id int `json:"id"` ParentId int `json:"parent_id"` Identifier string `json:"identifier"` Path string `json:"path"` Description string `json:"description"` IsPublic bool `json:"is_public"` CreatedBy int `json:"created_by"` Created int64 `json:"created"` Updated int64 `json:"updated"` Size int `json:"size"` SizeUpdated int `json:"size_updated"` DefaultBranch string `json:"default_branch"` ForkId int `json:"fork_id"` NumForks int `json:"num_forks"` NumPulls int `json:"num_pulls"` NumClosedPulls int `json:"num_closed_pulls"` NumOpenPulls int `json:"num_open_pulls"` NumMergedPulls int `json:"num_merged_pulls"` Importing bool `json:"importing"` GitUrl string `json:"git_url"` Uid string `json:"uid"` }
type Space ¶
type Space struct { ID int `json:"id"` ParentID int `json:"parent_id"` Path string `json:"path"` Identifier string `json:"identifier"` Description string `json:"description"` IsPublic bool `json:"is_public"` CreatedBy int `json:"created_by"` Created int64 `json:"created"` Updated int64 `json:"updated"` UID string `json:"uid"` }
type SpaceMemberResponse ¶
Click to show internal directories.
Click to hide internal directories.