Documentation
¶
Index ¶
- Constants
- type AddIssueOptions
- type AddPullRequestCommentOptions
- type AddPullRequestOptions
- type Assignee
- type Attachment
- type Category
- type ChangeLog
- type Client
- type CustomField
- type CustomFieldItem
- type DiskUsage
- type DiskUsageDetail
- type GetPullRequestCommentOptions
- type Issue
- type IssueType
- type IssuesService
- type Milestone
- type NulabAccount
- type Order
- type Priority
- type Project
- type ProjectsService
- func (s *ProjectsService) GetCategories(ctx context.Context, projectIDOrKey string) ([]*Category, *shared.Response, error)
- func (s *ProjectsService) GetCustomFields(ctx context.Context, projectIDOrKey string) ([]*CustomField, *shared.Response, error)
- func (s *ProjectsService) GetIssueTypes(ctx context.Context, projectIDOrKey string) ([]*IssueType, *shared.Response, error)
- func (s *ProjectsService) GetPriorities(ctx context.Context) ([]*Priority, *shared.Response, error)
- func (s *ProjectsService) GetProject(ctx context.Context, projectIDOrKey string) (*Project, *shared.Response, error)
- func (s *ProjectsService) GetProjectUsers(ctx context.Context, projectIDOrKey string) ([]*User, *shared.Response, error)
- func (s *ProjectsService) GetVersions(ctx context.Context, projectIDOrKey string) ([]*Version, *shared.Response, error)
- type PullRequest
- type PullRequestComment
- type PullRequestsService
- func (s *PullRequestsService) AddPullRequest(ctx context.Context, projectIdOrKey, repoIdOrName string, ...) (*PullRequest, *shared.Response, error)
- func (s *PullRequestsService) AddPullRequestComment(ctx context.Context, projectIdOrKey, repoIdOrName string, number int, ...) (*PullRequestComment, *shared.Response, error)
- func (s *PullRequestsService) GetPullRequest(ctx context.Context, projectIdOrKey, repoIdOrName string, number int) (*PullRequest, *shared.Response, error)
- func (s *PullRequestsService) GetPullRequestComment(ctx context.Context, projectIdOrKey, repoIdOrName string, number int, ...) ([]*PullRequestComment, *shared.Response, error)
- func (s *PullRequestsService) UpdatePullRequestComment(ctx context.Context, projectIdOrKey, repoIdOrName string, ...) (*PullRequestComment, *shared.Response, error)
- type Resolution
- type Space
- type SpaceService
- type Star
- type Status
- type UpdatePullRequestCommentOptions
- type User
- type Version
Constants ¶
const ( APIVersion = "v2" ApiVersionPath = "api/" + APIVersion + "/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddIssueOptions ¶
type AddIssueOptions struct {
ParentIssueID int `json:"parentIssueId,omitempty"`
Description string `json:"description,omitempty"`
StartDate string `json:"startDate,omitempty"`
DueDate string `json:"dueDate,omitempty"`
EstimatedHours float64 `json:"estimatedHours,omitempty"`
ActualHours float64 `json:"actualHours,omitempty"`
CategoryIDs []int `json:"categoryId[],omitempty"`
VersionIDs []int `json:"versionId[],omitempty"`
MilestoneIDs []int `json:"milestoneId[],omitempty"`
AssigneeID int `json:"assigneeId,omitempty"`
NotifiedUserIDs []int `json:"notifiedUserId[],omitempty"`
AttachmentIDs []int `json:"attachmentId[],omitempty"`
CustomFields map[int]interface{} `json:"customField_%v,omitempty"`
CustomFieldOtherValues map[int]interface{} `json:"customField_%v_otherValue,omitempty"`
}
type AddPullRequestCommentOptions ¶ added in v0.10.0
type AddPullRequestOptions ¶ added in v0.9.5
type AddPullRequestOptions struct {
Summary string `json:"summary,omitempty"`
Description string `json:"description,omitempty"`
Base string `json:"base,omitempty"`
Branch string `json:"branch,omitempty"`
IssueID int `json:"issueId,omitempty"`
AssigneeID int `json:"assigneeId,omitempty"`
NotifiedUserID []int `json:"notifiedUserId,omitempty"`
AttachmentID []int `json:"attachmentId,omitempty"`
}
type Attachment ¶
type Client ¶
type Client struct {
Space *SpaceService
Projects *ProjectsService
Issues *IssuesService
PullRequests *PullRequestsService
// contains filtered or unexported fields
}
type CustomField ¶
type CustomField struct {
ID int `json:"id"`
TypeID int `json:"typeId"`
Name string `json:"name"`
Description string `json:"description"`
Required bool `json:"required"`
ApplicableIssueTypes []int `json:"applicableIssueTypes"`
AllowAddItem bool `json:"allowAddItem"`
Items []*CustomFieldItem `json:"items"`
}
type CustomFieldItem ¶
type DiskUsageDetail ¶ added in v0.10.0
type GetPullRequestCommentOptions ¶ added in v0.11.0
type Issue ¶
type Issue struct {
ID int `json:"id"`
ProjectID int `json:"projectId"`
IssueKey string `json:"issueKey"`
KeyID int `json:"keyId"`
IssueType *IssueType `json:"issueType"`
Summary string `json:"summary"`
Description string `json:"description"`
Resolutions *Resolution `json:"resolutions"`
Priority *Priority `json:"priority"`
Status *Status `json:"status"`
Assignee *Assignee `json:"assignee"`
Category []*Category `json:"category"`
Versions []interface{} `json:"versions"`
Milestone []*Milestone `json:"milestone"`
StartDate string `json:"startDate"`
DueDate string `json:"dueDate"`
EstimatedHours float64 `json:"estimatedHours"`
ActualHours float64 `json:"actualHours"`
ParentIssueID *int `json:"parentIssueId"`
CreatedUser *User `json:"createdUser"`
Created *time.Time `json:"created"`
UpdatedUser *User `json:"updatedUser"`
Updated *time.Time `json:"updated"`
CustomFields []interface{} `json:"customFields"`
Attachments []*Attachment `json:"attachments"`
Stars []*Star `json:"stars"`
}
type IssuesService ¶
type IssuesService service
func (*IssuesService) AddIssue ¶
func (s *IssuesService) AddIssue(ctx context.Context, projectID int, summary string, issueTypeID, priorityID int, opt *AddIssueOptions) (*Issue, *shared.Response, error)
AddIssue docs: https://developer.nulab-inc.com/docs/backlog/api/2/add-issue/
type NulabAccount ¶
type Project ¶
type Project struct {
ID int `json:"id"`
ProjectKey string `json:"projectKey"`
Name string `json:"name"`
ChartEnabled bool `json:"chartEnabled"`
SubtaskingEnabled bool `json:"subtaskingEnabled"`
ProjectLeaderCanEditProjectLeader bool `json:"projectLeaderCanEditProjectLeader"`
TextFormattingRule string `json:"textFormattingRule"`
Archived bool `json:"archived"`
}
type ProjectsService ¶
type ProjectsService service
func (*ProjectsService) GetCategories ¶
func (s *ProjectsService) GetCategories(ctx context.Context, projectIDOrKey string) ([]*Category, *shared.Response, error)
GetCategories docs: https://developer.nulab-inc.com/docs/backlog/api/2/get-category-list/
func (*ProjectsService) GetCustomFields ¶
func (s *ProjectsService) GetCustomFields(ctx context.Context, projectIDOrKey string) ([]*CustomField, *shared.Response, error)
GetCustomFields docs: https://developer.nulab-inc.com/docs/backlog/api/2/get-custom-field-list/
func (*ProjectsService) GetIssueTypes ¶
func (s *ProjectsService) GetIssueTypes(ctx context.Context, projectIDOrKey string) ([]*IssueType, *shared.Response, error)
GetIssueTypes docs: https://developer.nulab-inc.com/docs/backlog/api/2/get-issue-type-list/
func (*ProjectsService) GetPriorities ¶
GetPriorities docs: https://developer.nulab-inc.com/docs/backlog/api/2/get-priority-list/
func (*ProjectsService) GetProject ¶
func (s *ProjectsService) GetProject(ctx context.Context, projectIDOrKey string) (*Project, *shared.Response, error)
GetProject docs: https://developer.nulab-inc.com/docs/backlog/api/2/get-project/
func (*ProjectsService) GetProjectUsers ¶
func (s *ProjectsService) GetProjectUsers(ctx context.Context, projectIDOrKey string) ([]*User, *shared.Response, error)
GetProjectUsers docs: https://developer.nulab-inc.com/docs/backlog/api/2/get-project-user-list/ TODO apply excludeGroupMembers option
func (*ProjectsService) GetVersions ¶
func (s *ProjectsService) GetVersions(ctx context.Context, projectIDOrKey string) ([]*Version, *shared.Response, error)
GetVersions docs: https://developer.nulab-inc.com/docs/backlog/api/2/get-version-milestone-list/
type PullRequest ¶
type PullRequest struct {
ID int `json:"id"`
ProjectID int `json:"projectId"`
RepositoryID int `json:"repositoryId"`
Number int `json:"number"`
Summary string `json:"summary"`
Description string `json:"description"`
Base string `json:"base"`
Branch string `json:"branch"`
Status Status `json:"status"`
Assignee User `json:"assignee"`
Issue Issue `json:"issue"`
BaseCommit string `json:"baseCommit"`
BranchCommit string `json:"branchCommit"`
CloseAt time.Time `json:"closeAt"`
MergeAt time.Time `json:"mergeAt"`
CreatedUser User `json:"createdUser"`
Created time.Time `json:"created"`
UpdatedUser User `json:"updatedUser"`
Updated time.Time `json:"updated"`
Attachments []*Attachment `json:"attachments"`
Stars []*Star `json:"stars"`
}
type PullRequestComment ¶ added in v0.10.0
type PullRequestComment struct {
ID int `json:"id"`
Content string `json:"content"`
ChangeLog []*ChangeLog `json:"changeLog"`
CreatedUser *User `json:"createdUser"`
Created *time.Time `json:"created"`
Updated *time.Time `json:"updated"`
Stars []interface{} `json:"stars"`
Notifications []interface{} `json:"notifications"`
}
type PullRequestsService ¶
type PullRequestsService service
func (*PullRequestsService) AddPullRequest ¶ added in v0.9.5
func (s *PullRequestsService) AddPullRequest(ctx context.Context, projectIdOrKey, repoIdOrName string, opt *AddPullRequestOptions) (*PullRequest, *shared.Response, error)
AddPullRequest docs: https://developer.nulab.com/ja/docs/backlog/api/2/add-pull-request/
func (*PullRequestsService) AddPullRequestComment ¶ added in v0.10.0
func (s *PullRequestsService) AddPullRequestComment(ctx context.Context, projectIdOrKey, repoIdOrName string, number int, opt *AddPullRequestCommentOptions) (*PullRequestComment, *shared.Response, error)
AddPullRequestComment docs: https://developer.nulab.com/docs/backlog/api/2/add-pull-request-comment/
func (*PullRequestsService) GetPullRequest ¶
func (s *PullRequestsService) GetPullRequest(ctx context.Context, projectIdOrKey, repoIdOrName string, number int) (*PullRequest, *shared.Response, error)
GetPullRequest docs: https://developer.nulab.com/ja/docs/backlog/api/2/get-pull-request/
func (*PullRequestsService) GetPullRequestComment ¶ added in v0.11.0
func (s *PullRequestsService) GetPullRequestComment(ctx context.Context, projectIdOrKey, repoIdOrName string, number int, opt *GetPullRequestCommentOptions) ([]*PullRequestComment, *shared.Response, error)
GetPullRequestComment docs: https://developer.nulab.com/docs/backlog/api/2/get-pull-request-comment/
func (*PullRequestsService) UpdatePullRequestComment ¶ added in v0.11.0
func (s *PullRequestsService) UpdatePullRequestComment(ctx context.Context, projectIdOrKey, repoIdOrName string, number, commentId int, opt *UpdatePullRequestCommentOptions) (*PullRequestComment, *shared.Response, error)
UpdatePullRequestComment docs: https://developer.nulab.com/docs/backlog/api/2/update-pull-request-comment-information/
type Resolution ¶
type Space ¶
type Space struct {
SpaceKey string `json:"spaceKey"`
Name string `json:"name"`
OwnerID int `json:"ownerId"`
Lang string `json:"lang"`
Timezone string `json:"timezone"`
ReportSendTime string `json:"reportSendTime"`
TextFormattingRule string `json:"textFormattingRule"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
type SpaceService ¶
type SpaceService service
func (*SpaceService) GetSpace ¶
GetSpace docs: https://developer.nulab-inc.com/ja/docs/backlog/api/2/get-space/
func (*SpaceService) GetSpaceDiskUsage ¶ added in v0.10.0
GetSpace docs: https://developer.nulab.com/docs/backlog/api/2/get-space-disk-usage/
type UpdatePullRequestCommentOptions ¶ added in v0.11.0
type UpdatePullRequestCommentOptions struct {
Content string `json:"content"`
}