Documentation
¶
Index ¶
- type BriefInfo
- type Client
- func (c *Client) AddWatcher(issueId int, watcher Watcher) error
- func (c *Client) ArchiveProject(projectIdOrName interface{}) error
- func (c *Client) CreateIssue(issueNewWrapper IssueToSendWrapper) (Issue, error)
- func (c *Client) CreateProject(projectNewWrapper ProjectToSendWrapper) (Project, error)
- func (c *Client) DeleteIssue(issueId int) error
- func (c *Client) DeleteProject(projectIdOrName interface{}) error
- func (c *Client) GetIssue(issueId int, parameters string) (Issue, error)
- func (c *Client) GetIssues(para *IssueListParameter, filter *IssueListFilter) (IssueList, error)
- func (c *Client) GetProject(projectIdOrName interface{}, parameters string) (Project, error)
- func (c *Client) GetProjectMemberships(projectIdOrName interface{}) (ProjectMembership, error)
- func (c *Client) GetProjects(parameters string) (ProjectList, error)
- func (c *Client) RemoveWatcher(issueId, userId int) error
- func (c *Client) UnarchiveProject(projectIdOrName interface{}) error
- func (c *Client) UpdateIssue(issueId int, issueUpdateWrapper IssueToSendWrapper) error
- func (c *Client) UpdateProject(projectIdOrName interface{}, projectWrapper ProjectWrapper) error
- type CustomFields
- type Issue
- type IssueList
- type IssueListFilter
- type IssueListParameter
- type IssueToSend
- type IssueToSendWrapper
- type IssueWrapper
- type Membership
- type Parent
- type Project
- type ProjectList
- type ProjectMembership
- type ProjectToSend
- type ProjectToSendWrapper
- type ProjectWrapper
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client stores the client information and implement all the api functions to communicate with redmine
func CreateClient ¶
CreateClient returns a client with the given credential for the given redmine domain
func (*Client) AddWatcher ¶
AddWatcher() adds a watch to an issue from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Issues#Adding-a-watcher
func (*Client) ArchiveProject ¶
ArchiveProject() archives the project of given id or identifier from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Projects#Archiving-a-project
func (*Client) CreateIssue ¶
func (c *Client) CreateIssue(issueNewWrapper IssueToSendWrapper) (Issue, error)
CreateIssue() creates a new issue with given parameters from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Issues#Creating-an-issue
func (*Client) CreateProject ¶
func (c *Client) CreateProject(projectNewWrapper ProjectToSendWrapper) (Project, error)
CreateProject() creates a new project with given parameters from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Projects#Creating-a-project
func (*Client) DeleteIssue ¶
DeleteIssue() deletes an issue from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Issues#Deleting-an-issue
func (*Client) DeleteProject ¶
DeleteProject() deletes the project of given id or identifier from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Projects#Deleting-a-project
func (*Client) GetIssue ¶
GetIssue() returns details of an issue with given parameters from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Issues#Showing-an-issue
func (*Client) GetIssues ¶
func (c *Client) GetIssues(para *IssueListParameter, filter *IssueListFilter) (IssueList, error)
GetIssues() returns a paginated list of issues with given parameters and filters. By default, it returns open issues only from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Issues#Listing-issues
func (*Client) GetProject ¶
GetProject() returns details of a project with given parameters from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Projects#Showing-a-project
func (*Client) GetProjectMemberships ¶
func (c *Client) GetProjectMemberships(projectIdOrName interface{}) (ProjectMembership, error)
GetProjects() Returns a paginated list of the project memberships project_id can be either the project numerical id or the project identifier from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Memberships#Project-Memberships
func (*Client) GetProjects ¶
func (c *Client) GetProjects(parameters string) (ProjectList, error)
GetProjects() returns all projects (all public projects and private projects where user have access to) with given parameters from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Projects#Listing-projects
func (*Client) RemoveWatcher ¶
RemoveWatcher() removes a watcher from an issue from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Issues#Removing-a-watcher
func (*Client) UnarchiveProject ¶
UnarchiveProject() unarchives the project of given id or identifier from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Projects#Unarchiving-a-project
func (*Client) UpdateIssue ¶
func (c *Client) UpdateIssue(issueId int, issueUpdateWrapper IssueToSendWrapper) error
UpdateIssue() updates an issue with given parameters from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Issues#Updating-an-issue
func (*Client) UpdateProject ¶
func (c *Client) UpdateProject(projectIdOrName interface{}, projectWrapper ProjectWrapper) error
UpdateProject() updates a project with given parameters from protocol scheme JSON Ref: https://www.redmine.org/projects/redmine/wiki/Rest_Projects#Updating-a-project
type CustomFields ¶
type Issue ¶
type Issue struct { ID int `json:"id"` Project BriefInfo `json:"project"` Tracker BriefInfo `json:"tracker"` Status BriefInfo `json:"status"` Priority BriefInfo `json:"priority"` Author BriefInfo `json:"author"` AssignedTo BriefInfo `json:"assigned_to,omitempty"` Parent Parent `json:"parent,omitempty"` Subject string `json:"subject"` Description string `json:"description"` StartDate string `json:"start_date"` DueDate string `json:"due_date"` DoneRatio int `json:"done_ratio"` IsPrivate bool `json:"is_private"` EstimatedHours interface{} `json:"estimated_hours"` TotalEstimatedHours interface{} `json:"total_estimated_hours"` SpentHours interface{} `json:"spent_hours"` TotalSpentHours interface{} `json:"total_spent_hours"` CreatedOn time.Time `json:"created_on"` UpdatedOn time.Time `json:"updated_on"` ClosedOn interface{} `json:"closed_on"` }
type IssueListFilter ¶
type IssueListFilter struct { IssueId interface{} ProjectId interface{} SubprojectId interface{} TrackerId interface{} StatusId interface{} AssignedToId interface{} ParentId interface{} }
type IssueListParameter ¶
type IssueToSend ¶
type IssueToSendWrapper ¶
type IssueToSendWrapper struct {
Issue IssueToSend `json:"issue"`
}
type IssueWrapper ¶
type IssueWrapper struct {
Issue Issue `json:"issue"`
}
type Membership ¶
type Project ¶
type Project struct { ID int `json:"id"` Name string `json:"name"` Identifier string `json:"identifier"` Description string `json:"description"` Status int `json:"status"` IsPublic bool `json:"is_public"` InheritMembers bool `json:"inherit_members"` CustomFields []CustomFields `json:"custom_fields"` CreatedOn time.Time `json:"created_on"` UpdatedOn time.Time `json:"updated_on"` }
type ProjectList ¶
type ProjectMembership ¶
type ProjectMembership struct { Memberships []Membership `json:"memberships"` TotalCount int `json:"total_count"` Offset int `json:"offset"` Limit int `json:"limit"` }
type ProjectToSend ¶
type ProjectToSend struct { Name string `json:"name"` Identifier string `json:"identifier"` Description string `json:"description"` IsPublic bool `json:"is_public"` ParentId interface{} `json:"parent_id"` InheritMembers bool `json:"inherit_members"` DefaultAssignedToId interface{} `json:"default_assigned_to_id"` DefaultVersionId interface{} `json:"default_version_id"` TrackerIds []interface{} `json:"tracker_ids"` EnabledModuleNames []interface{} `json:"enabled_module_names"` IssueCustomFieldIds []interface{} `json:"issue_custom_field_ids"` }
type ProjectToSendWrapper ¶
type ProjectToSendWrapper struct {
Project ProjectToSend `json:"project"`
}
type ProjectWrapper ¶
type ProjectWrapper struct {
Project Project `json:"project"`
}