Documentation
¶
Index ¶
- Constants
- func GetAccessToken(ctx context.Context, code string) (*oauth2.Token, error)
- func GetGitlabProjects(workspace *model.Workspace, accessToken string) ([]*modelInputs.GitlabProject, error)
- func GetOAuthConfig() (*oauth2.Config, []oauth2.AuthCodeOption, error)
- func GetRefreshToken(ctx context.Context, oldToken *oauth2.Token) (*oauth2.Token, error)
- func RevokeGitlabAccessToken(accessToken string) error
- func SearchGitlabIssues(accessToken string, query string) ([]*modelInputs.IssuesSearchResult, error)
- type Author
- type GitlabIssue
- type GitlabProjectResponse
- type GitlabTokenResponse
- type Links
- type Namespace
- type NewGitlabIssuePayload
- type References
- type TaskCompletionStatus
- type TimeStats
Constants ¶
View Source
const ( AuthBaseUrl = "https://gitlab.com" ApiBaseUrl = "https://gitlab.com/api/v4" )
Variables ¶
This section is empty.
Functions ¶
func GetGitlabProjects ¶
func GetGitlabProjects(workspace *model.Workspace, accessToken string) ([]*modelInputs.GitlabProject, error)
func GetOAuthConfig ¶
func GetOAuthConfig() (*oauth2.Config, []oauth2.AuthCodeOption, error)
func GetRefreshToken ¶
func RevokeGitlabAccessToken ¶
func SearchGitlabIssues ¶
func SearchGitlabIssues(accessToken string, query string) ([]*modelInputs.IssuesSearchResult, error)
Types ¶
type GitlabIssue ¶
type GitlabIssue struct {
ID int `json:"id"`
IID int `json:"iid"`
ProjectID int `json:"project_id"`
Title string `json:"title"`
Description string `json:"description"`
State string `json:"state"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ClosedAt *time.Time `json:"closed_at"`
ClosedBy *int `json:"closed_by"`
Labels []string `json:"labels"`
Milestone *int `json:"milestone"`
Assignees []int `json:"assignees"`
Author Author `json:"author"`
Type string `json:"type"`
Assignee *int `json:"assignee"`
UserNotesCount int `json:"user_notes_count"`
MergeRequestsCount int `json:"merge_requests_count"`
Upvotes int `json:"upvotes"`
Downvotes int `json:"downvotes"`
DueDate *time.Time `json:"due_date"`
Confidential bool `json:"confidential"`
DiscussionLocked *bool `json:"discussion_locked"`
IssueType string `json:"issue_type"`
WebURL string `json:"web_url"`
TimeStats TimeStats `json:"time_stats"`
TaskCompletionStatus TaskCompletionStatus `json:"task_completion_status"`
BlockingIssuesCount int `json:"blocking_issues_count"`
HasTasks bool `json:"has_tasks"`
TaskStatus string `json:"task_status"`
Links Links `json:"_links"`
References References `json:"references"`
Severity string `json:"severity"`
Subscribed bool `json:"subscribed"`
MovedToID *int `json:"moved_to_id"`
ServiceDeskReplyTo *string `json:"service_desk_reply_to"`
}
func CreateGitlabTask ¶
func CreateGitlabTask(accessToken string, projectId string, payload NewGitlabIssuePayload) (*GitlabIssue, error)
type GitlabProjectResponse ¶
type GitlabProjectResponse struct {
ID int `json:"id"`
Description *string `json:"description"`
Name string `json:"name"`
NameWithNamespace string `json:"name_with_namespace"`
Path string `json:"path"`
PathWithNamespace string `json:"path_with_namespace"`
CreatedAt time.Time `json:"created_at"`
DefaultBranch string `json:"default_branch"`
TagList []string `json:"tag_list"`
Topics []string `json:"topics"`
SSHURLToRepo string `json:"ssh_url_to_repo"`
HTTPURLToRepo string `json:"http_url_to_repo"`
WebURL string `json:"web_url"`
ReadmeURL string `json:"readme_url"`
ForksCount int `json:"forks_count"`
AvatarURL *string `json:"avatar_url"`
StarCount int `json:"star_count"`
LastActivityAt time.Time `json:"last_activity_at"`
Namespace Namespace `json:"namespace"`
}
type GitlabTokenResponse ¶
type NewGitlabIssuePayload ¶
type References ¶
type TaskCompletionStatus ¶
Click to show internal directories.
Click to hide internal directories.