Documentation
¶
Index ¶
- type BacklogError
- type BacklogErrorResponse
- type Category
- type ChangeLog
- type Client
- func (c *Client) AddComment(issueIDOrKey string, content string) (*Comment, error)
- func (c *Client) CreateIssue(opts *CreateIssueOptions) (*Issue, error)
- func (c *Client) GetCategories(projectIDOrKey string) ([]Category, error)
- func (c *Client) GetComments(issueIDOrKey string, count int, order string) ([]Comment, error)
- func (c *Client) GetIssue(issueIDOrKey string) (*Issue, error)
- func (c *Client) GetIssueTypes(projectIDOrKey string) ([]IssueType, error)
- func (c *Client) GetIssues(opts *GetIssuesOptions) ([]Issue, error)
- func (c *Client) GetMilestones(projectIDOrKey string) ([]Milestone, error)
- func (c *Client) GetMyself() (*User, error)
- func (c *Client) GetPriorities() ([]Priority, error)
- func (c *Client) GetProject(projectIDOrKey string) (*Project, error)
- func (c *Client) GetProjectUsers(projectIDOrKey string) ([]User, error)
- func (c *Client) GetProjects() ([]Project, error)
- func (c *Client) GetStatuses(projectIDOrKey string) ([]Status, error)
- func (c *Client) UpdateIssue(issueIDOrKey string, opts *UpdateIssueOptions) (*Issue, error)
- type Comment
- type CreateIssueOptions
- type GetIssuesOptions
- type Issue
- type IssueType
- type Milestone
- type Priority
- type Project
- type Status
- type UpdateIssueOptions
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BacklogError ¶
type BacklogError struct {
Message string `json:"message"`
Code int `json:"code"`
MoreInfo string `json:"moreInfo"`
}
BacklogError represents an error response from the Backlog API.
type BacklogErrorResponse ¶
type BacklogErrorResponse struct {
Errors []BacklogError `json:"errors"`
}
BacklogErrorResponse wraps the errors array in the API response.
type ChangeLog ¶
type ChangeLog struct {
Field string `json:"field"`
NewValue string `json:"newValue"`
OriginalValue string `json:"originalValue"`
}
ChangeLog represents a field change in a comment.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Backlog API client.
func (*Client) AddComment ¶
AddComment adds a comment to an issue.
func (*Client) CreateIssue ¶
func (c *Client) CreateIssue(opts *CreateIssueOptions) (*Issue, error)
CreateIssue creates a new issue.
func (*Client) GetCategories ¶
GetCategories returns categories for a project.
func (*Client) GetComments ¶
GetComments returns comments for an issue.
func (*Client) GetIssueTypes ¶
GetIssueTypes returns issue types for a project.
func (*Client) GetIssues ¶
func (c *Client) GetIssues(opts *GetIssuesOptions) ([]Issue, error)
GetIssues returns issues matching the given options.
func (*Client) GetMilestones ¶
GetMilestones returns milestones for a project.
func (*Client) GetPriorities ¶
GetPriorities returns all priorities.
func (*Client) GetProject ¶
GetProject returns a single project.
func (*Client) GetProjectUsers ¶
GetProjectUsers returns users belonging to a project.
func (*Client) GetProjects ¶
GetProjects returns all projects.
func (*Client) GetStatuses ¶
GetStatuses returns statuses for a project.
func (*Client) UpdateIssue ¶
func (c *Client) UpdateIssue(issueIDOrKey string, opts *UpdateIssueOptions) (*Issue, error)
UpdateIssue updates an existing issue.
type Comment ¶
type Comment struct {
ID int `json:"id"`
Content string `json:"content"`
CreatedUser *User `json:"createdUser"`
Created string `json:"created"`
ChangeLog []ChangeLog `json:"changeLog"`
}
Comment represents a Backlog comment.
type CreateIssueOptions ¶
type CreateIssueOptions struct {
ProjectID int
Summary string
IssueTypeID int
PriorityID int
Description string
AssigneeID int
DueDate string
StartDate string
MilestoneIDs []int
CategoryIDs []int
}
CreateIssueOptions holds parameters for CreateIssue.
type GetIssuesOptions ¶
type GetIssuesOptions struct {
ProjectIDs []int
AssigneeIDs []int
StatusIDs []int
MilestoneIDs []int
Keyword string
Count int
Offset int
Sort string
Order string
}
GetIssuesOptions holds parameters for GetIssues.
type Issue ¶
type Issue struct {
ID int `json:"id"`
ProjectID int `json:"projectId"`
IssueKey string `json:"issueKey"`
Summary string `json:"summary"`
Description string `json:"description"`
Status *Status `json:"status"`
Assignee *User `json:"assignee"`
Priority *Priority `json:"priority"`
IssueType *IssueType `json:"issueType"`
DueDate string `json:"dueDate"`
StartDate string `json:"startDate"`
CreatedUser *User `json:"createdUser"`
Created string `json:"created"`
Updated string `json:"updated"`
Milestone []Milestone `json:"milestone"`
Category []Category `json:"category"`
}
Issue represents a Backlog issue.
type IssueType ¶
type IssueType struct {
ID int `json:"id"`
ProjectID int `json:"projectId"`
Name string `json:"name"`
Color string `json:"color"`
}
IssueType represents a Backlog issue type.
type Milestone ¶
type Milestone struct {
ID int `json:"id"`
ProjectID int `json:"projectId"`
Name string `json:"name"`
ReleaseDueDate string `json:"releaseDueDate"`
}
Milestone represents a Backlog milestone/version.
type Project ¶
type Project struct {
ID int `json:"id"`
ProjectKey string `json:"projectKey"`
Name string `json:"name"`
Description string `json:"description"`
}
Project represents a Backlog project.
type Status ¶
type Status struct {
ID int `json:"id"`
ProjectID int `json:"projectId"`
Name string `json:"name"`
Color string `json:"color"`
}
Status represents a Backlog status.
type UpdateIssueOptions ¶
type UpdateIssueOptions struct {
Summary *string
Description *string
StatusID *int
AssigneeID *int
PriorityID *int
DueDate *string
StartDate *string
MilestoneIDs []int
CategoryIDs []int
Comment *string
}
UpdateIssueOptions holds parameters for UpdateIssue. Pointer types are used to distinguish between unset and zero values.