Documentation ¶
Index ¶
- Constants
- type CodeBaseAPI
- func (c *CodeBaseAPI) Activities(since time.Time, user User, descriptor Descriptor) (events []Event)
- func (c *CodeBaseAPI) AuthUser() (user User)
- func (c *CodeBaseAPI) CurrentMilestone() (current Milestone)
- func (c *CodeBaseAPI) Milesones() (milestones []Milestone)
- func (c *CodeBaseAPI) NotesForTicket(id int) []TicketNote
- func (c *CodeBaseAPI) TicketById(id int) (ticket Ticket, err error)
- func (c *CodeBaseAPI) TicketsForMilestone(milestone Milestone) (tickets []Ticket)
- func (c *CodeBaseAPI) User(firstName, lastname, username string) (user User)
- func (c *CodeBaseAPI) UsersInProject() []User
- type Descriptor
- type Event
- type EventChanges
- type Milestone
- func (m *Milestone) DaysToEnd() (int64, error)
- func (m *Milestone) DaysToEndStr() string
- func (m *Milestone) DeadlineTime() (t time.Time, err error)
- func (m *Milestone) EstimatedTimeDuration() time.Duration
- func (m *Milestone) IsActive() bool
- func (m *Milestone) StartAtTime() (t time.Time, err error)
- func (m Milestone) String() string
- func (m *Milestone) WorkingDaysInSprint() (int64, error)
- type Ticket
- type TicketByAssignee
- type TicketNote
- type User
- type WorkingDays
Constants ¶
View Source
const ( CHANGE_ASSIGNEE = "assignee" CHANGE_CATEGORY = "category" CHANGE_MILESTONE = "milestone" CHANGE_NEW_TICKET = "new ticket" CHANGE_PRIORITY = "priority" CHANGE_STATUS = "status" )
View Source
const (
TYPE_NEW_TICKET = "ticketing_ticket"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeBaseAPI ¶
type CodeBaseAPI struct { Project string // contains filtered or unexported fields }
func NewCodeBaseClient ¶
func NewCodeBaseClient(username, apiKey, project string) *CodeBaseAPI
Build new Codebase client to access specific project. Project can be changes later on
func (*CodeBaseAPI) Activities ¶
func (c *CodeBaseAPI) Activities(since time.Time, user User, descriptor Descriptor) (events []Event)
func (*CodeBaseAPI) AuthUser ¶
func (c *CodeBaseAPI) AuthUser() (user User)
Fetch User object for currently authenticated user
func (*CodeBaseAPI) CurrentMilestone ¶
func (c *CodeBaseAPI) CurrentMilestone() (current Milestone)
func (*CodeBaseAPI) Milesones ¶
func (c *CodeBaseAPI) Milesones() (milestones []Milestone)
func (*CodeBaseAPI) NotesForTicket ¶
func (c *CodeBaseAPI) NotesForTicket(id int) []TicketNote
func (*CodeBaseAPI) TicketById ¶
func (c *CodeBaseAPI) TicketById(id int) (ticket Ticket, err error)
func (*CodeBaseAPI) TicketsForMilestone ¶
func (c *CodeBaseAPI) TicketsForMilestone(milestone Milestone) (tickets []Ticket)
func (*CodeBaseAPI) User ¶
func (c *CodeBaseAPI) User(firstName, lastname, username string) (user User)
Fetch User based on first name
func (*CodeBaseAPI) UsersInProject ¶
func (c *CodeBaseAPI) UsersInProject() []User
type Descriptor ¶
type Event ¶
type Event struct { Id int `xml:"id"` Title string `xml:"title"` Date string `xml:"timestamp"` Type string `xml:"type"` HtmlTitle string `xml:"html-title"` HtmlText string `xml:"html-text"` UserID int `xml:"user-id"` UserEmail string `xml:"actor-email"` ProjectID int `xml:"project-id"` Deleted bool `xml:"deleted"` Avatar string `xml:"avatar-url"` Raw struct { TicketID int `xml:"number"` Subject string `xml:"subject"` Content string `xml:"content"` Changes EventChanges `xml:"changes"` ProjectPermalink string `xml:"project-permalink"` } `xml:"raw-properties"` }
func (*Event) Changes ¶
func (e *Event) Changes(descriptor Descriptor) string
func (*Event) HasChanges ¶
func (e *Event) HasChanges(descriptor Descriptor) bool
type EventChanges ¶
type EventChanges struct { Status []string `json:"status_id" xml:"status-id>status-id"` Assignee []string `json:"assignee_id" xml:"assignee-id>assignee-id"` Subject []string `json:"subject" xml:"subject>subject"` Priority []string `json:"priority_id" xml:"priority-id>priority-id"` Milestone []string `json:"milestone_id" xml:"milestone-id>milestone-id"` Category []string `json:"category_id" xml:"category-id>category-id"` }
type Milestone ¶
type Milestone struct { Id int `xml:"id"` Name string `xml:"name"` StartAt string `xml:"start-at"` Deadline string `xml:"deadline"` Status string `xml:"status"` Description string `xml:"description"` EstimatedTime int64 `xml:"estimated-time"` }
func (*Milestone) DaysToEndStr ¶
func (*Milestone) EstimatedTimeDuration ¶
func (*Milestone) WorkingDaysInSprint ¶
type Ticket ¶
type Ticket struct { Id int `xml:"ticket-id"` Summary string `xml:"summary"` TicketType string `xml:"ticket-type"` Assignee string `xml:"assignee"` Status string `xml:"status>name"` Priority string `xml:"priority>name"` EstimationRaw string `xml:"estimated-time"` Reporter string `xml:"reporter"` Category string `xml:"category>name"` Milestone Milestone `xml:"milestone"` StartOn string `xml:"start-on"` Deadline string `xml:"deadline"` UpdatedAt time.Time `xml:"updated-at"` CreatedAt time.Time `xml:"created-at"` TotalTimeSpent int `xml:"total-time-spent"` BlockedBy []int `xml:"blocked-by>blocked-by"` Blocking []int `xml:"blocking>blocking"` }
func (*Ticket) Estimation ¶
func (*Ticket) IsAssigned ¶
type TicketByAssignee ¶
type TicketByAssignee []Ticket
func (TicketByAssignee) Len ¶
func (t TicketByAssignee) Len() int
func (TicketByAssignee) Less ¶
func (t TicketByAssignee) Less(i, j int) bool
func (TicketByAssignee) Swap ¶
func (t TicketByAssignee) Swap(i, j int)
type TicketNote ¶
type TicketNote struct { // Attachements []Attachement Content string `xml:"content"` Id int `xml:"id"` UpdatedAt time.Time `xml:"updated-at"` CreatedAt time.Time `xml:"created-at"` UserID int `xml:"user-id"` UpdatesRaw string `xml:"updates"` }
func (*TicketNote) Changes ¶
func (t *TicketNote) Changes(descriptor Descriptor) string
func (*TicketNote) ChangesState ¶
func (t *TicketNote) ChangesState() bool
func (*TicketNote) Updates ¶
func (t *TicketNote) Updates() (updates EventChanges)
type User ¶
type WorkingDays ¶
func (WorkingDays) SinceUnix ¶
func (w WorkingDays) SinceUnix() int64
Click to show internal directories.
Click to hide internal directories.