bugs

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2020 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRemoveSetInt

type AddRemoveSetInt struct {
	Add    []int `json:"add,omitempty"`
	Remove []int `json:"remove,omitempty"`
	Set    []int `json:"set,omitempty"`
}

type AddRemoveSetString

type AddRemoveSetString struct {
	Add    []string `json:"add,omitempty"`
	Remove []string `json:"remove,omitempty"`
	Set    []string `json:"set,omitempty"`
}

type AddRemoveString

type AddRemoveString struct {
	Add    []string `json:"add,omitempty"`
	Remove []string `json:"remove,omitempty"`
}

type Bug

type Bug struct {
	ActualTime          int64       `json:"actual_time"`
	Alias               []string    `json:"alias"`
	AssignedTo          string      `json:"assignedTo"`
	AssignedToDetail    User        `json:"assigned_to_detail"`
	Blocks              []int       `json:"blocks"`
	CC                  []string    `json:"cc"`
	CcDetail            []User      `json:"cc_detail"`
	Classification      string      `json:"classification"`
	Component           string      `json:"component"`
	CreationTime        string      `json:"creation_time"`
	Creator             string      `json:"creator"`
	CreatorDetail       User        `json:"creator_detail"`
	Deadline            string      `json:"deadline"`
	DependsOn           []int       `json:"depends_on"`
	DupeOf              int         `json:"dupe_of"`
	EstimatedTime       int64       `json:"estimated_time"`
	Flags               []GetFlag   `json:"flags"`
	Groups              []string    `json:"groups"`
	ID                  int         `json:"id"`
	IsCcAccessible      bool        `json:"is_cc_accessible"`
	IsConfirmed         bool        `json:"is_confirmed"`
	IsOpen              bool        `json:"is_open"`
	IsCreatorAccessible bool        `json:"is_creator_accessible"`
	Keywords            []string    `json:"keywords"`
	LastChangeTime      string      `json:"last_change_time"`
	OpSys               string      `json:"op_sys"`
	Platform            string      `json:"platform"`
	Priority            string      `json:"priority"`
	Product             string      `json:"product"`
	QaContact           string      `json:"qa_contact"`
	QaContactDetail     interface{} `json:"qa_contact_detail"`
	RemainingTime       int64       `json:"remaining_time"`
	Resolution          string      `json:"resolution"`
	SeeAlso             []string    `json:"see_also"`
	Severity            string      `json:"severity"`
	Status              string      `json:"status"`
	Summary             string      `json:"summary"`
	TargetMilestone     string      `json:"target_milestone"`
	UpdateToken         string      `json:"update_token"`
	URL                 string      `json:"url"`
	Version             string      `json:"version"`
	Whiteboard          string      `json:"whiteboard"`
}

type BugUpdate

type BugUpdate struct {
	Id             int               `json:"id"`
	Alias          []string          `json:"alias"`
	LastChangeTime string            `json:"last_change_time"`
	Changes        map[string]Change `json:"changes"`
}

type Change

type Change struct {
	Added   string `json:"added"`
	Removed string `json:"removed"`
}

type Comment

type Comment struct {
	Body       string   `json:"body,omitempty"`
	IsPrivate  []string `json:"is_private,omitempty"`
	IsMarkdown []string `json:"is_markdown,omitempty"`
}

type Create

type Create struct {
	Product          string   `json:"product"`
	Component        string   `json:"component"`
	Summary          string   `json:"summary"`
	Version          string   `json:"version"`
	Description      string   `json:"description,omitempty"`
	OpSys            string   `json:"op_sys,omitempty"`
	Platform         string   `json:"platform,omitempty"`
	Priority         string   `json:"priority,omitempty"`
	Severity         string   `json:"severity,omitempty"`
	Alias            []string `json:"alias,omitempty"`
	AssignedTo       string   `json:"assigned_to,omitempty"`
	Cc               []string `json:"cc,omitempty"`
	CommentIsPrivate bool     `json:"comment_is_private,omitempty"`
	CommentTags      []string `json:"comment_tags,omitempty"`
	IsMarkdown       bool     `json:"is_markdown,omitempty"`
	Groups           []string `json:"groups,omitempty"`
	Keywords         []string `json:"keywords,omitempty"`
	QaContact        string   `json:"qa_contact,omitempty"`
	Status           string   `json:"status,omitempty"`
	Resolution       string   `json:"resolution,omitempty"`
	TargetMilestone  string   `json:"target_milestone,omitempty"`
	Type             string   `json:"type,omitempty"`
	Flags            []Flag   `json:"flags,omitempty"`
	api.Post
	api.Ok
}

https://bugzilla.readthedocs.io/en/latest/api/core/v1/bug.html#create-bug

func (*Create) Resource

func (c *Create) Resource() string

type CreateResponse

type CreateResponse struct {
	Id int `json:"id"`
}

type Flag

type Flag struct {
	Name      string `json:"name,omitempty"`
	TypeId    int    `json:"type_id,omitempty"`
	Status    string `json:"status,omitempty"`
	Requestee string `json:"requestee,omitempty"`
}

type Get

type Get struct {
	Id int
	api.Get
	api.Ok
}

https://bugzilla.readthedocs.io/en/latest/api/core/v1/bug.html#get-bug

func (*Get) Resource

func (g *Get) Resource() string

type GetFlag

type GetFlag struct {
	Id               int    `json:"id,omitempty"`
	Name             string `json:"name,omitempty"`
	TypeId           int    `json:"type_id,omitempty"`
	CreationDate     string `json:"creation_date,omitempty"`
	ModificationDate string `json:"modification_date,omitempty"`
	Status           string `json:"status,omitempty"`
	Setter           string `json:"setter,omitempty"`
	Requestee        string `json:"requestee,omitempty"`
}

type GetResponse

type GetResponse struct {
	Faults []string `json:"faults"`
	Bugs   []Bug    `json:"bugs"`
}
type Search struct {
	Ids []int
	api.Get
	api.Ok
}

func (*Search) AddBug

func (s *Search) AddBug(bug int) *Search

func (*Search) AddBugs

func (s *Search) AddBugs(bugs ...int) *Search

func (*Search) Resource

func (s *Search) Resource() string

type Update

type Update struct {
	Id int `json:"-"`
	api.Put
	api.Ok
	Ids                 []int               `json:"ids,omitempty"`
	Alias               *AddRemoveSetString `json:"alias,omitempty"`
	AssignedTo          string              `json:"assigned_to,omitempty"`
	Blocks              []AddRemoveSetInt   `json:"blocks,omitempty"`
	DependsOn           []AddRemoveSetInt   `json:"depends_on,omitempty"`
	Cc                  *AddRemoveString    `json:"cc,omitempty"`
	IsCcAccessible      bool                `json:"is_cc_accessible,omitempty"`
	Comment             *Comment            `json:"comment,omitempty"`
	CommentIsPrivate    map[int]bool        `json:"comment_is_private,omitempty"`
	CommentTags         []string            `json:"comment_tags,omitempty"`
	Component           string              `json:"component,omitempty"`
	Deadline            string              `json:"deadline,omitempty"`
	DupeOf              int                 `json:"dupe_of,omitempty"`
	EstimatedTime       int64               `json:"estimated_time,omitempty"`
	Flags               []UpdateFlag        `json:"flags,omitempty"`
	Groups              *AddRemoveString    `json:"groups,omitempty"`
	Keywords            *AddRemoveSetString `json:"keywords,omitempty"`
	OpSys               string              `json:"op_sys,omitempty"`
	Platform            string              `json:"platform,omitempty"`
	Priority            string              `json:"priority,omitempty"`
	Product             string              `json:"product,omitempty"`
	QaContact           string              `json:"qa_contact,omitempty"`
	IsCreatorAccessible bool                `json:"is_creator_accessible,omitempty"`
	RemainingTime       int64               `json:"remaining_time,omitempty"`
	ResetAssignedTo     bool                `json:"reset_assigned_to,omitempty"`
	ResetQaContact      bool                `json:"reset_qa_contact,omitempty"`
	Resolution          string              `json:"resolution,omitempty"`
	Severity            string              `json:"severity,omitempty"`
	Status              string              `json:"status,omitempty"`
	Summary             string              `json:"summary,omitempty"`
	TargetMilestone     string              `json:"target_milestone,omitempty"`
	Url                 string              `json:"url,omitempty"`
	Version             string              `json:"version,omitempty"`
	Whiteboard          string              `json:"whiteboard,omitempty"`
	WorkTime            int64               `json:"work_time,omitempty"`
}

https://bugzilla.readthedocs.io/en/latest/api/core/v1/bug.html#update-bug

func AddComment

func AddComment(bug int, comment string) *Update

func Invalidate

func Invalidate(bug int, comment string) *Update

Invalidate set the status of the target bug to RESOLVED with the resolution INVALID and posts the provided comment as an explanation for the resolution.

func (*Update) Resource

func (u *Update) Resource() string

type UpdateFlag

type UpdateFlag struct {
	Name      string `json:"name,omitempty"`
	TypeId    int    `json:"type_id,omitempty"`
	Status    string `json:"status"` // required
	Requestee string `json:"Requestee,omitempty"`
	Id        int    `json:"id,omitempty"`
	New       bool   `json:"new,omitempty"`
}

type UpdateResponse

type UpdateResponse struct {
	Bugs []BugUpdate `json:"bugs"`
}

type User

type User struct {
	Id       int    `json:"id,omitempty"`
	RealName string `json:"real_name,omitempty"`
	Name     string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL