Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) CreateIssue(issue Issue) (*Issue, error)
- func (c *Client) CreateIssueCategory(issueCategory IssueCategory) (*IssueCategory, error)
- func (c *Client) CreateIssueRelation(issueRelation IssueRelation) (*IssueRelation, error)
- func (c *Client) CreateMembership(membership Membership) (*Membership, error)
- func (c *Client) CreateProject(project Project) (*Project, error)
- func (c *Client) CreateTimeEntry(timeEntry TimeEntry) (*TimeEntry, error)
- func (c *Client) CreateVersion(version Version) (*Version, error)
- func (c *Client) CreateWikiPage(projectId int, wikiPage WikiPage) (*WikiPage, error)
- func (c *Client) CustomFields() ([]CustomFieldDefinition, error)
- func (c *Client) DeleteIssue(id int) error
- func (c *Client) DeleteIssueCategory(id int) error
- func (c *Client) DeleteIssueRelation(id int) error
- func (c *Client) DeleteMembership(id int) error
- func (c *Client) DeleteProject(id int) error
- func (c *Client) DeleteTimeEntry(id int) error
- func (c *Client) DeleteVersion(id int) error
- func (c *Client) DeleteWikiPage(projectId int, title string) error
- func (c *Client) Impersonate(username string) *Client
- func (c *Client) Issue(id int) (*Issue, error)
- func (c *Client) IssueCategories(projectId int) ([]IssueCategory, error)
- func (c *Client) IssueCategory(id int) (*IssueCategory, error)
- func (c *Client) IssuePriorities() ([]IssuePriority, error)
- func (c *Client) IssueRelation(id int) (*IssueRelation, error)
- func (c *Client) IssueRelations(issueId int) ([]IssueRelation, error)
- func (c *Client) IssueStatuses() ([]IssueStatus, error)
- func (c *Client) IssueWithArgs(id int, args map[string]string) (*Issue, error)
- func (c *Client) Issues() ([]Issue, error)
- func (c *Client) IssuesByFilter(f *IssueFilter) ([]Issue, error)
- func (c *Client) IssuesByQuery(queryId int) ([]Issue, error)
- func (c *Client) IssuesOf(projectId int) ([]Issue, error)
- func (c *Client) Membership(id int) (*Membership, error)
- func (c *Client) Memberships(projectId int) ([]Membership, error)
- func (c *Client) MyAccount() (*User, error)
- func (c *Client) NewRequest(method string, urlPath string, body io.Reader) (*http.Request, error)
- func (c *Client) News(projectId int) ([]News, error)
- func (c *Client) Project(id int) (*Project, error)
- func (c *Client) Projects() ([]Project, error)
- func (c *Client) Roles() ([]IdName, error)
- func (c *Client) TimeEntries(projectId int) ([]TimeEntry, error)
- func (c *Client) TimeEntriesWithFilter(filter Filter) ([]TimeEntry, error)
- func (c *Client) TimeEntry(id int) (*TimeEntry, error)
- func (c *Client) TimeEntryActivities() ([]TimeEntryActivity, error)
- func (c *Client) Trackers() ([]IdName, error)
- func (c *Client) URLWithFilter(path string, f Filter) (string, error)
- func (c *Client) UpdateCustomField(cf CustomFieldDefinition) error
- func (c *Client) UpdateIssue(issue Issue) error
- func (c *Client) UpdateIssueCategory(issueCategory IssueCategory) error
- func (c *Client) UpdateIssueRelation(issueRelation IssueRelation) error
- func (c *Client) UpdateJournal(journal *Journal) error
- func (c *Client) UpdateMembership(membership Membership) error
- func (c *Client) UpdateProject(project Project) error
- func (c *Client) UpdateTimeEntry(timeEntry TimeEntry) error
- func (c *Client) UpdateVersion(version Version) error
- func (c *Client) UpdateWikiPage(projectId int, wikiPage WikiPage) error
- func (c *Client) Upload(filename string) (*Upload, error)
- func (c *Client) User(id int) (*User, error)
- func (c *Client) UserByIdAndFilter(id int, filter *UserByIdFilter) (*User, error)
- func (c *Client) Users() ([]User, error)
- func (c *Client) UsersWithFilter(filter *UsersFilter) ([]User, error)
- func (c *Client) Version(id int) (*Version, error)
- func (c *Client) Versions(projectId int) ([]Version, error)
- func (c *Client) WikiPage(projectId int, title string) (*WikiPage, error)
- func (c *Client) WikiPageAtVersion(projectId int, title string, version string) (*WikiPage, error)
- func (c *Client) WikiPages(projectId int) ([]WikiPage, error)
- type CustomField
- type CustomFieldDefinition
- type CustomFieldPossibleValue
- type Filter
- type Id
- type IdName
- type Issue
- type IssueCategory
- type IssueFilter
- type IssuePriority
- type IssueRelation
- type IssueStatus
- type Journal
- type JournalDetails
- type Membership
- type News
- type Parent
- type Project
- type TimeEntry
- type TimeEntryActivity
- type Upload
- type User
- type UserByIdFilter
- type UsersFilter
- type Version
- type WikiPage
Constants ¶
View Source
const ( UserStatusAll string = "" UserStatusActive string = "1" UserStatusRegistered string = "2" UserStatusLocked string = "3" )
View Source
const ( UserIncludeMemberships string = "memberships" UserIncludeGroups string = "groups" )
Variables ¶
View Source
var DefaultLimit int = -1 // "-1" means "No setting"
View Source
var DefaultOffset int = -1 //"-1" means "No setting"
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) CreateIssueCategory ¶
func (c *Client) CreateIssueCategory(issueCategory IssueCategory) (*IssueCategory, error)
func (*Client) CreateIssueRelation ¶
func (c *Client) CreateIssueRelation(issueRelation IssueRelation) (*IssueRelation, error)
func (*Client) CreateMembership ¶
func (c *Client) CreateMembership(membership Membership) (*Membership, error)
func (*Client) CreateTimeEntry ¶
func (*Client) CreateWikiPage ¶
CreateWikiPage creates wiki page.
func (*Client) CustomFields ¶
func (c *Client) CustomFields() ([]CustomFieldDefinition, error)
CustomFields consulta los campos personalizados
func (*Client) DeleteIssue ¶
func (*Client) DeleteIssueCategory ¶
func (*Client) DeleteIssueRelation ¶
func (*Client) DeleteMembership ¶
func (*Client) DeleteProject ¶
func (*Client) DeleteTimeEntry ¶
func (*Client) DeleteVersion ¶
func (*Client) DeleteWikiPage ¶
DeleteWikiPage deletes the wiki page given by its title irreversibly.
func (*Client) Impersonate ¶
func (*Client) IssueCategories ¶
func (c *Client) IssueCategories(projectId int) ([]IssueCategory, error)
func (*Client) IssueCategory ¶
func (c *Client) IssueCategory(id int) (*IssueCategory, error)
func (*Client) IssuePriorities ¶
func (c *Client) IssuePriorities() ([]IssuePriority, error)
func (*Client) IssueRelation ¶
func (c *Client) IssueRelation(id int) (*IssueRelation, error)
func (*Client) IssueRelations ¶
func (c *Client) IssueRelations(issueId int) ([]IssueRelation, error)
func (*Client) IssueStatuses ¶
func (c *Client) IssueStatuses() ([]IssueStatus, error)
func (*Client) IssueWithArgs ¶
func (*Client) IssuesByFilter ¶
func (c *Client) IssuesByFilter(f *IssueFilter) ([]Issue, error)
IssuesByFilter filters issues applying the f criteria
func (*Client) Membership ¶
func (c *Client) Membership(id int) (*Membership, error)
func (*Client) Memberships ¶
func (c *Client) Memberships(projectId int) ([]Membership, error)
func (*Client) NewRequest ¶
func (*Client) TimeEntriesWithFilter ¶
TimeEntriesWithFilter send query and return parsed result
func (*Client) TimeEntryActivities ¶
func (c *Client) TimeEntryActivities() ([]TimeEntryActivity, error)
func (*Client) URLWithFilter ¶
URLWithFilter return string url by concat endpoint, path and filter err != nil when endpoin can not parse
func (*Client) UpdateCustomField ¶
func (c *Client) UpdateCustomField(cf CustomFieldDefinition) error
func (*Client) UpdateIssue ¶
func (*Client) UpdateIssueCategory ¶
func (c *Client) UpdateIssueCategory(issueCategory IssueCategory) error
func (*Client) UpdateIssueRelation ¶
func (c *Client) UpdateIssueRelation(issueRelation IssueRelation) error
func (*Client) UpdateJournal ¶
func (*Client) UpdateMembership ¶
func (c *Client) UpdateMembership(membership Membership) error
func (*Client) UpdateProject ¶
func (*Client) UpdateTimeEntry ¶
func (*Client) UpdateVersion ¶
func (*Client) UpdateWikiPage ¶
UpdateWikiPage updates the wiki page given by the Title field of wikiPage.
func (*Client) UserByIdAndFilter ¶
func (c *Client) UserByIdAndFilter(id int, filter *UserByIdFilter) (*User, error)
func (*Client) UsersWithFilter ¶
func (c *Client) UsersWithFilter(filter *UsersFilter) ([]User, error)
func (*Client) WikiPageAtVersion ¶
WikiPageAtVersion fetches the wiki page with the given title at the given version.
type CustomField ¶
type CustomFieldDefinition ¶
type CustomFieldDefinition struct {
Id int `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
CustomizedType string `json:"customized_type"`
FieldFormat string `json:"field_format"`
Regexp string `json:"regexp"`
MinLength *int `json:"min_length"`
MaxLength *int `json:"max_length"`
IsRequired bool `json:"is_required"`
IsFilter bool `json:"is_filter"`
Searchable bool `json:"searchable"`
Multiple bool `json:"multiple"`
DefaultValue interface{} `json:"default_value"`
Visible bool `json:"visible"`
PossibleValues []CustomFieldPossibleValue `json:"possible_values"`
Trackers []IdName `json:"trackers"`
Roles []IdName `json:"roles"`
EditTagStyle *string `json:"edit_tag_style,omitempty"`
}
type CustomFieldPossibleValue ¶
type CustomFieldPossibleValue struct {
Value string
}
func (*CustomFieldPossibleValue) MarshalJSON ¶
func (v *CustomFieldPossibleValue) MarshalJSON() ([]byte, error)
func (*CustomFieldPossibleValue) UnmarshalJSON ¶
func (v *CustomFieldPossibleValue) UnmarshalJSON(b []byte) error
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func (*Filter) ToURLParams ¶
type Issue ¶
type Issue struct {
Id int `json:"id"`
Subject string `json:"subject"`
Description string `json:"description"`
ProjectId int `json:"project_id"`
Project *IdName `json:"project,omitempty"`
TrackerId int `json:"tracker_id"`
Tracker *IdName `json:"tracker,omitempty"`
ParentId int `json:"parent_issue_id,omitempty"`
Parent *Id `json:"parent,omitempty"`
StatusId int `json:"status_id"`
Status *IdName `json:"status,omitempty"`
PriorityId int `json:"priority_id,omitempty"`
Priority *IdName `json:"priority,omitempty"`
Author *IdName `json:"author,omitempty"`
FixedVersion *IdName `json:"fixed_version,omitempty"`
AssignedTo *IdName `json:"assigned_to"`
AssignedToId int `json:"assigned_to_id,omitempty"`
Category *IdName `json:"category"`
CategoryId int `json:"category_id,omitempty"`
Notes string `json:"notes"`
StatusDate string `json:"status_date"`
CreatedOn string `json:"created_on"`
UpdatedOn string `json:"updated_on"`
StartDate string `json:"start_date"`
DueDate string `json:"due_date"`
ClosedOn string `json:"closed_on"`
CustomFields []*CustomField `json:"custom_fields,omitempty"`
Uploads []*Upload `json:"uploads,omitempty"`
DoneRatio float32 `json:"done_ratio,omitempty"`
EstimatedHours float32 `json:"estimated_hours,omitempty"`
Journals []*Journal `json:"journals,omitempty"`
}
func (Issue) MarshalJSON ¶
MarshalJSON marshals issue to JSON. This overrides the default MarshalJSON() to reset parent issue.
type IssueCategory ¶
type IssueFilter ¶
type IssuePriority ¶
type IssueRelation ¶
type IssueStatus ¶
type Journal ¶
type Journal struct {
Id int `json:"id"`
User *IdName `json:"user"`
Notes string `json:"notes"`
CreatedOn string `json:"created_on"`
UpdatedOn string `json:"updated_on,omitempty"`
UpdatedBy *IdName `json:"updated_by,omitempty"`
PrivateNotes bool `json:"private_notes"`
Details []JournalDetails `json:"details"`
}
type JournalDetails ¶
type Membership ¶
type Project ¶
type Project struct {
Id int `json:"id"`
Parent IdName `json:"parent"`
Name string `json:"name"`
Identifier string `json:"identifier"`
Description string `json:"description"`
CreatedOn string `json:"created_on"`
UpdatedOn string `json:"updated_on"`
CustomFields []*CustomField `json:"custom_fields,omitempty"`
}
type TimeEntry ¶
type TimeEntry struct {
Id int `json:"id"`
Project IdName `json:"project"`
Issue Id `json:"issue"`
User IdName `json:"user"`
Activity IdName `json:"activity"`
Hours float32 `json:"hours"`
Comments string `json:"comments"`
SpentOn string `json:"spent_on"`
CreatedOn string `json:"created_on"`
UpdatedOn string `json:"updated_on"`
CustomFields []*CustomField `json:"custom_fields,omitempty"`
}
type TimeEntryActivity ¶
type User ¶
type User struct {
Id int `json:"id"`
Login string `json:"login"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
Mail string `json:"mail"`
CreatedOn string `json:"created_on"`
LatLoginOn string `json:"last_login_on"`
Memberships []Membership `json:"memberships"`
CustomFields []*CustomField `json:"custom_fields,omitempty"`
}
type UserByIdFilter ¶
type UserByIdFilter struct {
Filter
}
func NewUserByIdFilter ¶
func NewUserByIdFilter() *UserByIdFilter
func (*UserByIdFilter) Include ¶
func (uif *UserByIdFilter) Include(include string)
type UsersFilter ¶
type UsersFilter struct {
Filter
}
func NewUsersFilter ¶
func NewUsersFilter() *UsersFilter
func (*UsersFilter) GroupId ¶
func (usf *UsersFilter) GroupId(groupId int)
func (*UsersFilter) Name ¶
func (usf *UsersFilter) Name(name string)
func (*UsersFilter) Status ¶
func (usf *UsersFilter) Status(status string)
type Version ¶
type Version struct {
Id int `json:"id"`
Project IdName `json:"project"`
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status"`
DueDate string `json:"due_date"`
CreatedOn string `json:"created_on"`
UpdatedOn string `json:"updated_on"`
CustomFields []*CustomField `json:"custom_fields,omitempty"`
}
type WikiPage ¶
type WikiPage struct {
Title string `json:"title"`
Parent *Parent `json:"parent,omitempty"`
Text string `json:"text"`
Version interface{} `json:"version,omitempty"`
Author *IdName `json:"author,omitempty"`
Comments string `json:"comments"`
CreatedOn string `json:"created_on,omitempty"`
UpdatedOn string `json:"updated_on,omitempty"`
ParentID int `json:"parent_id"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.