Documentation
¶
Overview ¶
Package bugzilla can get bugs, attachments and update them Instead of the nice XMLRPC interface, it uses the web interface, in order to allow changing flags (AFAIR) not available in the API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var PriorityMap = map[string]string{
"P0": "P0 - Crit Sit",
"P1": "P1 - Urgent",
"P2": "P2 - High",
"P3": "P3 - Medium",
"P4": "P4 - Low",
"P5": "P5 - None",
}
PriorityMap maps short priority names to the longer ones, as provided by the Web Interface
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { IsObsolete int `xml:"isobsolete,attr" json:"isobsolete"` IsPatch int `xml:"ispatch,attr" json:"ispatch"` IsPrivate int `xml:"isprivate,attr" json:"isprivate"` AttachID int `xml:"attachid" json:"attachid"` Date time.Time // `xml:"date" json:"date"` DeltaTS time.Time // `xml:"delta_ts" json:"delta_ts"` Desc string `xml:"desc" json:"desc"` Filename string `xml:"filename" json:"filename"` Type string `xml:"type" json:"type"` Size int `xml:"size" json:"size"` Attacher User `xml:"attacher" json:"attacher"` Token string `xml:"token" json:"token"` }
Attachment as provided by the bug information page. This struct has only name, size and attachid set when coming from DownloadAttachment, as it's extracted from the HTTP headers.
type Bug ¶
type Bug struct { Reporter User `xml:"reporter" json:"reporter"` AssignedTo User `xml:"assigned_to" json:"assigned_to"` QAContact User `xml:"qa_contact" json:"qa_contact"` Groups []Group `xml:"group" json:"group"` BugID int `xml:"bug_id" json:"bug_id"` // 1047068 CreationTS time.Time `json:"creation_ts"` // 2017-07-03 13:29:00 +0000 ShortDesc string `xml:"short_desc" json:"short_desc"` // L4: test cloud bug DeltaTS time.Time `json:"delta_ts"` // 2019-03-27 10:45:20 +0000 ReporterAccessible int `xml:"reporter_accessible" json:"reporter_accessible"` // 0 CCListAccessible int `xml:"cclist_accessible" json:"cclist_accessible"` // 0 ClassificationID int `xml:"classification_id" json:"classification_id"` // 111 Classification string `xml:"classification" json:"classification"` // foobar Frobnicator Cloud Product string `xml:"product" json:"product"` // foobar Frobnicator Cloud 7 Component string `xml:"component" json:"component"` // Frobtool Version string `xml:"version" json:"version"` // Milestone 8 RepPlatform string `xml:"rep_platform" json:"rep_platform"` // Other OpSys string `xml:"op_sys" json:"op_sys"` // Other BugStatus string `xml:"bug_status" json:"bug_status"` // RESOLVED Resolution string `xml:"resolution" json:"resolution"` // FIXED DupID int `xml:"dup_id" json:"dup_id"` BugFileLoc string `xml:"bug_file_loc" json:"bug_file_loc"` // StatusWhiteboard string `xml:"status_whiteboard" json:"status_whiteboard"` // wasL3:48626 zzz Keywords string `xml:"keywords" json:"keywords"` // DSLA_REQUIRED, DSLA_SOLUTION_PROVIDED Priority string `xml:"priority" json:"priority"` // P5 - None BugSeverity string `xml:"bug_severity" json:"bug_severity"` // Normal TargetMilestone string `xml:"target_milestone" json:"target_milestone"` // --- EverConfirmed int `xml:"everconfirmed" json:"everconfirmed"` // 1 Cc []string `xml:"cc" json:"cc"` // user@foobar.com EstimatedTime string `xml:"estimated_time" json:"estimated_time"` // 0.00 RemainingTime string `xml:"remaining_time" json:"remaining_time"` // 0.00 ActualTime string `xml:"actual_time" json:"actual_time"` // 0.00 CfFoundby []string `xml:"cf_foundby" json:"cf_foundby"` // --- CfNtsPriority []string `xml:"cf_nts_priority" json:"cf_nts_priority"` // CfBizPriority []string `xml:"cf_biz_priority" json:"cf_biz_priority"` // CfBlocker []string `xml:"cf_blocker" json:"cf_blocker"` // --- CfIITDeployment []string `xml:"cf_it_deployment" json:"cf_it_deployment"` // --- Token []string `xml:"token" json:"token"` Votes int `xml:"votes" json:"votes"` // 0 Flags []Flag `xml:"flag" json:"flag"` CommentSortOrder string `xml:"comment_sort_order" json:"comment_sort_order"` // oldest_to_newest Comments []*Comment Attachments []*Attachment }
Bug is a Bug in Bugzilla
type Cacher ¶
type Cacher interface {
GetWriter(id string) io.WriteCloser
}
Cacher should be anything that takes the name of the object to be cached and returns something that can receive writes with the contents and then eventually be closed.
type Changes ¶
type Changes struct { SetNeedinfo string RemoveNeedinfo string ClearNeedinfo bool ClearAllNeedinfos bool AddComment string CommentIsPrivate bool SetURL string SetAssignee string SetPriority string SetDescription string SetWhiteboard string SetStatus string SetResolution string SetDuplicate int AddCc string RemoveCc string CcMyself bool // DeltaTS should have the timestamp of the last change DeltaTS time.Time CheckDeltaTS bool }
Changes to be performed by Update() for a given bug
type Client ¶
type Client struct { Config Config // contains filtered or unexported fields }
Client keeps the state of the client.
func (*Client) DownloadAttachment ¶
func (c *Client) DownloadAttachment(id int) (*Attachment, io.ReadCloser, error)
DownloadAttachment an attachment for download Returns an Attachment with only the Size and Filename filled, a reader and error.
func (*Client) GetBugFromJSON ¶
GetBug gets a *Bug from a JSON blob
type Comment ¶
type Comment struct { IsPrivate int `xml:"isprivate,attr" json:"isprivate"` ID int `xml:"commentid" json:"commentid"` Count int `xml:"comment_count" json:"comment_count"` Who User `xml:"who" json:"who"` BugWhen time.Time TheText string `xml:"thetext" json:"thetext"` }
Comment as in bug comments
type ConnectionError ¶
type ConnectionError struct {
// contains filtered or unexported fields
}
ConnectionError happens when performing the request
func (ConnectionError) Error ¶
func (e ConnectionError) Error() string
type ErrBugzilla ¶
type ErrBugzilla struct {
// contains filtered or unexported fields
}
ErrBugzilla is an error from Bugzilla
func (ErrBugzilla) Error ¶
func (e ErrBugzilla) Error() string
type Flag ¶
type Flag struct { Name string `xml:"name,attr" json:"name"` ID int `xml:"id,attr" json:"id"` TypeID int `xml:"type_id,attr" json:"type_id"` Status string `xml:"status,attr" json:"status"` Setter string `xml:"setter,attr" json:"setter"` Requestee string `xml:"requestee,attr" json:"requestee"` }
Flag represents flags such as needinfo
type RequestError ¶
type RequestError struct {
// contains filtered or unexported fields
}
RequestError happens when building the request
func (RequestError) Error ¶
func (e RequestError) Error() string