jirasdk

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

README

JiraSDK

Go client library for Jira

Requirements

  • Go >= 1.15
  • Jira v8.2.2 (self-host)

Support

用户User

  • Get/Search
  • Assignable

状态Status

  • List
  • Get
  • ProjectGet 项目级Get

项目Project

  • Get/Search
  • Types
  • Post

优先级Priority

  • Get

问题类型IssueType

  • List
  • Get
  • Post

问题issue

  • Meta
  • Get
  • Post
  • Assignee

issue流转Transitions

  • Get
  • Post

issue模块Component

  • Get
  • Post

issue评论Comment

  • Get
  • Post

issue流程管理方案Scheme

  • List
  • Get

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(r *http.Response) error

func Do

func Do(c *http.Client, req *http.Request, v interface{}) (*http.Response, error)

Types

type Client

type Client struct {
	User        *UserService
	Project     *ProjectService
	Issue       *IssueService
	Comment     *CommentService
	IssueType   *IssueTypeService
	Priority    *PriorityService
	Status      *StatusService
	Component   *ComponentService
	Transitions *TransitionsService
	Scheme      *SchemeService
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint, username, password string) (*Client, error)

func (*Client) Do

func (c *Client) Do(req *http.Request, v interface{}) (*http.Response, error)

type CommentBody

type CommentBody struct {
	Self   string `json:"self"`
	ID     string `json:"id"`
	Author struct {
		Self         string `json:"self"`
		Name         string `json:"name"`
		Key          string `json:"key"`
		EmailAddress string `json:"emailAddress"`
		AvatarUrls   struct {
			Four8X48  string `json:"48x48"`
			Two4X24   string `json:"24x24"`
			One6X16   string `json:"16x16"`
			Three2X32 string `json:"32x32"`
		} `json:"avatarUrls"`
		DisplayName string `json:"displayName"`
		Active      bool   `json:"active"`
		TimeZone    string `json:"timeZone"`
	} `json:"author"`
	Body         string `json:"body"`
	UpdateAuthor struct {
		Self         string `json:"self"`
		Name         string `json:"name"`
		Key          string `json:"key"`
		EmailAddress string `json:"emailAddress"`
		AvatarUrls   struct {
			Four8X48  string `json:"48x48"`
			Two4X24   string `json:"24x24"`
			One6X16   string `json:"16x16"`
			Three2X32 string `json:"32x32"`
		} `json:"avatarUrls"`
		DisplayName string `json:"displayName"`
		Active      bool   `json:"active"`
		TimeZone    string `json:"timeZone"`
	} `json:"updateAuthor"`
	Created    string `json:"created"`
	Updated    string `json:"updated"`
	Visibility struct {
		Type  string `json:"type"`
		Value string `json:"value"`
	} `json:"visibility,omitempty"`
}

type CommentService

type CommentService struct {
	// contains filtered or unexported fields
}

func (*CommentService) Get

func (*CommentService) Post

type ComponentGetObject

type ComponentGetObject []ComponentObject

type ComponentGetOption

type ComponentGetOption struct {
	ProjectIdOrKey string `url:"projectIdOrKey"`
}

type ComponentObject

type ComponentObject struct {
	Self                string `json:"self"`
	ID                  string `json:"id"`
	Name                string `json:"name"`
	Lead                Lead   `json:"lead,omitempty"`
	Description         string `json:"description"`
	Assigneetype        string `json:"assigneeType"`
	Assignee            Lead   `json:"assignee,omitempty"`
	Realassigneetype    string `json:"realAssigneeType"`
	Realassignee        Lead   `json:"realassignee,omitempty"`
	Isassigneetypevalid bool   `json:"isAssigneeTypeValid"`
	Project             string `json:"project"`
	Projectid           int    `json:"projectId"`
	Archived            bool   `json:"archived"`
}

type ComponentPostObject

type ComponentPostObject ComponentObject

type ComponentPostOption

type ComponentPostOption struct {
	Project             string `json:"project"`
	Name                string `json:"name"`
	Description         string `json:"description"`
	Leadusername        string `json:"leadUserName,omitempty"`
	Assigneetype        string `json:"assigneeType,omitempty"`
	Isassigneetypevalid bool   `json:"isAssigneeTypeValid,omitempty"`
}

func (*ComponentPostOption) Check

func (c *ComponentPostOption) Check(user string)

type ComponentService

type ComponentService struct {
	// contains filtered or unexported fields
}

func (*ComponentService) Get

func (*ComponentService) Post

type ErrorResponse

type ErrorResponse struct {
	Response      *http.Response    `json:"-"`
	ErrorMessages []string          `json:"errorMessages"`
	Errors        map[string]string `json:"errors"`
}

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type FID

type FID struct {
	ID string `json:"id"`
}

type FName

type FName struct {
	Name string `json:"name"`
}

type FTime

type FTime struct {
	OriginalEstimate  string `json:"originalEstimate"`
	RemainingEstimate string `json:"remainingEstimate"`
}

type Fields

type Fields struct {
	Project          FID      `json:"project"`
	Summary          string   `json:"summary"`
	Issuetype        FID      `json:"issuetype"`
	Assignee         FName    `json:"assignee,omitempty"`
	Reporter         FName    `json:"reporter"`
	Priority         FID      `json:"priority,omitempty"`
	Labels           []string `json:"labels,omitempty"`
	Timetracking     FTime    `json:"timetracking,omitempty"`
	Versions         []FID    `json:"versions,omitempty"`
	Environment      string   `json:"environment,omitempty"`
	Description      string   `json:"description,omitempty"`
	Duedate          string   `json:"duedate,omitempty"`
	FixVersions      []FID    `json:"fixVersions,omitempty"`
	Components       []FID    `json:"component,omitempty"`
	Customfield30000 []string `json:"customfield_30000,omitempty"`
	Customfield20000 string   `json:"customfield_20000,omitempty"`
	Customfield40000 string   `json:"customfield_40000,omitempty"`
	Customfield70000 []string `json:"customfield_70000,omitempty"`
	Customfield60000 string   `json:"customfield_60000,omitempty"`
	Customfield50000 string   `json:"customfield_50000,omitempty"`
	Customfield10000 string   `json:"customfield_10000,omitempty"`
}

type IssueAssigneePutObject

type IssueAssigneePutObject struct{}

type IssueAssigneePutOption

type IssueAssigneePutOption struct {
	Name         string `json:"name"`
	IssueIdOrKey string `url:"issueIdOrKey" json:"-"`
}

type IssueCommentGetObject

type IssueCommentGetObject struct {
	StartAt    int           `json:"startAt"`
	MaxResults int           `json:"maxResults"`
	Total      int           `json:"total"`
	Comments   []CommentBody `json:"comments"`
}

type IssueCommentGetOption

type IssueCommentGetOption struct {
	IssueIdOrKey string `url:"issueIdOrKey"`
}

type IssueCommentPostObject

type IssueCommentPostObject struct {
	Self   string `json:"self"`
	ID     string `json:"id"`
	Author struct {
		Self         string `json:"self"`
		Name         string `json:"name"`
		Key          string `json:"key"`
		EmailAddress string `json:"emailAddress"`
		AvatarUrls   struct {
			Four8X48  string `json:"48x48"`
			Two4X24   string `json:"24x24"`
			One6X16   string `json:"16x16"`
			Three2X32 string `json:"32x32"`
		} `json:"avatarUrls"`
		DisplayName string `json:"displayName"`
		Active      bool   `json:"active"`
		TimeZone    string `json:"timeZone"`
	} `json:"author"`
	Body         string `json:"body"`
	UpdateAuthor struct {
		Self         string `json:"self"`
		Name         string `json:"name"`
		Key          string `json:"key"`
		EmailAddress string `json:"emailAddress"`
		AvatarUrls   struct {
			Four8X48  string `json:"48x48"`
			Two4X24   string `json:"24x24"`
			One6X16   string `json:"16x16"`
			Three2X32 string `json:"32x32"`
		} `json:"avatarUrls"`
		DisplayName string `json:"displayName"`
		Active      bool   `json:"active"`
		TimeZone    string `json:"timeZone"`
	} `json:"updateAuthor"`
	Created    string `json:"created"`
	Updated    string `json:"updated"`
	Visibility struct {
		Type  string `json:"type"`
		Value string `json:"value"`
	} `json:"visibility"`
}

type IssueCommentPostOption

type IssueCommentPostOption struct {
	IssueIdOrKey string          `url:"issueIdOrKey" json:"-"`
	Body         string          `json:"body"`
	Visibility   IssueVisibility `json:"visibility,omitempty"`
}

type IssueGetObject

type IssueGetObject struct {
	Expand string `json:"expand"`
	ID     string `json:"id"`
	Self   string `json:"self"`
	Key    string `json:"key"`
	Fields struct {
		Issuetype struct {
			Self        string `json:"self"`
			ID          string `json:"id"`
			Description string `json:"description"`
			IconURL     string `json:"iconUrl"`
			Name        string `json:"name"`
			Subtask     bool   `json:"subtask"`
			AvatarID    int    `json:"avatarId"`
		} `json:"issuetype"`
		Components           []interface{} `json:"component"`
		Timespent            interface{}   `json:"timespent"`
		Timeoriginalestimate interface{}   `json:"timeoriginalestimate"`
		Description          interface{}   `json:"description"`
		Project              struct {
			Self           string `json:"self"`
			ID             string `json:"id"`
			Key            string `json:"key"`
			Name           string `json:"name"`
			ProjectTypeKey string `json:"projectTypeKey"`
			AvatarUrls     struct {
				Four8X48  string `json:"48x48"`
				Two4X24   string `json:"24x24"`
				One6X16   string `json:"16x16"`
				Three2X32 string `json:"32x32"`
			} `json:"avatarUrls"`
		} `json:"project"`
		FixVersions        []interface{} `json:"fixVersions"`
		Aggregatetimespent interface{}   `json:"aggregatetimespent"`
		Resolution         interface{}   `json:"resolution"`
		Timetracking       struct {
		} `json:"timetracking"`
		Customfield10105      string        `json:"customfield_10105"`
		Attachment            []interface{} `json:"attachment"`
		Aggregatetimeestimate interface{}   `json:"aggregatetimeestimate"`
		Resolutiondate        interface{}   `json:"resolutiondate"`
		Workratio             int           `json:"workratio"`
		Summary               string        `json:"summary"`
		LastViewed            string        `json:"lastViewed"`
		Watches               struct {
			Self       string `json:"self"`
			WatchCount int    `json:"watchCount"`
			IsWatching bool   `json:"isWatching"`
		} `json:"watches"`
		Creator struct {
			Self         string `json:"self"`
			Name         string `json:"name"`
			Key          string `json:"key"`
			EmailAddress string `json:"emailAddress"`
			AvatarUrls   struct {
				Four8X48  string `json:"48x48"`
				Two4X24   string `json:"24x24"`
				One6X16   string `json:"16x16"`
				Three2X32 string `json:"32x32"`
			} `json:"avatarUrls"`
			DisplayName string `json:"displayName"`
			Active      bool   `json:"active"`
			TimeZone    string `json:"timeZone"`
		} `json:"creator"`
		Subtasks []interface{} `json:"subtasks"`
		Created  string        `json:"created"`
		Reporter struct {
			Self         string `json:"self"`
			Name         string `json:"name"`
			Key          string `json:"key"`
			EmailAddress string `json:"emailAddress"`
			AvatarUrls   struct {
				Four8X48  string `json:"48x48"`
				Two4X24   string `json:"24x24"`
				One6X16   string `json:"16x16"`
				Three2X32 string `json:"32x32"`
			} `json:"avatarUrls"`
			DisplayName string `json:"displayName"`
			Active      bool   `json:"active"`
			TimeZone    string `json:"timeZone"`
		} `json:"reporter"`
		Customfield10000  string `json:"customfield_10000"`
		Aggregateprogress struct {
			Progress int `json:"progress"`
			Total    int `json:"total"`
		} `json:"aggregateprogress"`
		Priority struct {
			Self    string `json:"self"`
			IconURL string `json:"iconUrl"`
			Name    string `json:"name"`
			ID      string `json:"id"`
		} `json:"priority"`
		Customfield10100              interface{}   `json:"customfield_10100"`
		Customfield10101              interface{}   `json:"customfield_10101"`
		Labels                        []string      `json:"labels"`
		Environment                   interface{}   `json:"environment"`
		Timeestimate                  interface{}   `json:"timeestimate"`
		Aggregatetimeoriginalestimate interface{}   `json:"aggregatetimeoriginalestimate"`
		Versions                      []interface{} `json:"versions"`
		Duedate                       interface{}   `json:"duedate"`
		Progress                      struct {
			Progress int `json:"progress"`
			Total    int `json:"total"`
		} `json:"progress"`
		Comment struct {
			Comments   []interface{} `json:"comments"`
			MaxResults int           `json:"maxResults"`
			Total      int           `json:"total"`
			StartAt    int           `json:"startAt"`
		} `json:"comment"`
		Issuelinks []interface{} `json:"issuelinks"`
		Votes      struct {
			Self     string `json:"self"`
			Votes    int    `json:"votes"`
			HasVoted bool   `json:"hasVoted"`
		} `json:"votes"`
		Worklog struct {
			StartAt    int           `json:"startAt"`
			MaxResults int           `json:"maxResults"`
			Total      int           `json:"total"`
			Worklogs   []interface{} `json:"worklogs"`
		} `json:"worklog"`
		Assignee struct {
			Self         string `json:"self"`
			Name         string `json:"name"`
			Key          string `json:"key"`
			EmailAddress string `json:"emailAddress"`
			AvatarUrls   struct {
				Four8X48  string `json:"48x48"`
				Two4X24   string `json:"24x24"`
				One6X16   string `json:"16x16"`
				Three2X32 string `json:"32x32"`
			} `json:"avatarUrls"`
			DisplayName string `json:"displayName"`
			Active      bool   `json:"active"`
			TimeZone    string `json:"timeZone"`
		} `json:"assignee"`
		Updated string `json:"updated"`
		Status  struct {
			Self           string `json:"self"`
			Description    string `json:"description"`
			IconURL        string `json:"iconUrl"`
			Name           string `json:"name"`
			ID             string `json:"id"`
			StatusCategory struct {
				Self      string `json:"self"`
				ID        int    `json:"id"`
				Key       string `json:"key"`
				ColorName string `json:"colorName"`
				Name      string `json:"name"`
			} `json:"statusCategory"`
		} `json:"status"`
	} `json:"fields"`
}

type IssueGetOption

type IssueGetOption struct {
	IssueIdOrKey  string `url:"issueIdOrKey"`
	UpdateHistory bool   `url:"updateHistory,omitempty"`
}

type IssueMetaObject

type IssueMetaObject struct {
	Expand   string          `json:"expand"`
	Projects []ProjectObject `json:"projects"`
}

type IssueMetaOption

type IssueMetaOption struct {
	ProjectIds     string `url:"projectIds"`
	ProjectKeys    string `url:"projectKeys"`
	IssuetypeIds   string `url:"issuetypeIds"`
	IssuetypeNames string `url:"issuetypeNames"`
}

type IssuePostObject

type IssuePostObject struct {
	ID   string `json:"id"`
	Key  string `json:"key"`
	Self string `json:"self"`
}

type IssuePostOption

type IssuePostOption struct {
	Fields Fields `json:"fields"`
}

type IssueService

type IssueService struct {
	// contains filtered or unexported fields
}

func (*IssueService) Assignee

func (u *IssueService) Assignee(opts *IssueAssigneePutOption) (v *IssueAssigneePutObject, resp *http.Response, err error)

func (*IssueService) Get

func (u *IssueService) Get(opts *IssueGetOption) (v *IssueGetObject, resp *http.Response, err error)

func (*IssueService) Meta

func (u *IssueService) Meta(opts *IssueMetaOption) (v *IssueMetaObject, resp *http.Response, err error)

func (*IssueService) Post

func (u *IssueService) Post(opts *IssuePostOption) (v *IssuePostObject, resp *http.Response, err error)

type IssueTransitionsGetObject

type IssueTransitionsGetObject struct {
	Expand      string              `json:"expand"`
	Transitions []TransitionsObject `json:"transitions"`
}

type IssueTransitionsGetOption

type IssueTransitionsGetOption struct {
	IssueIdOrKey string `url:"issueIdOrKey"`
	TransitionId string `url:"transitionId"`
}

type IssueTransitionsPostObject

type IssueTransitionsPostObject struct {
}

type IssueTransitionsPostOption

type IssueTransitionsPostOption struct {
	IssueIdOrKey string `url:"issueIdOrKey" json:"-"`
	//Update TUpdate `json:"update"`
	//Fields TFields`json:"fields"`
	Transition TTransition `json:"transition"`
}

type IssueTypeGetObject

type IssueTypeGetObject IssueTypeObject

type IssueTypeGetOption

type IssueTypeGetOption struct {
	ID string `json:"id"`
}

type IssueTypeListObject

type IssueTypeListObject []IssueTypeObject

type IssueTypeListOption

type IssueTypeListOption struct{}

type IssueTypeObject

type IssueTypeObject struct {
	Self        string `json:"self"`
	ID          string `json:"id"`
	Description string `json:"description"`
	IconURL     string `json:"iconUrl"`
	Name        string `json:"name"`
	Subtask     bool   `json:"subtask"`
	AvatarID    int    `json:"avatarId,omitempty"`
}

type IssueTypePostObject

type IssueTypePostObject IssueTypeObject

type IssueTypePostOption

type IssueTypePostOption struct {
	Name        string        `json:"name"`
	Description string        `json:"description,omitempty"`
	Type        IssueTypeType `json:"type,omitempty"`
}

func (*IssueTypePostOption) Check

func (it *IssueTypePostOption) Check()

type IssueTypeService

type IssueTypeService struct {
	// contains filtered or unexported fields
}

func (*IssueTypeService) Get

func (*IssueTypeService) List

func (*IssueTypeService) Post

type IssueTypeType

type IssueTypeType string
const (
	// Standard 标准
	Standard IssueTypeType = "standard"
	// Subtask 子任务
	Subtask IssueTypeType = "subtask"
)

type IssueVisibility

type IssueVisibility struct {
	Type  string `json:"type,omitempty"`
	Value string `json:"value,omitempty"`
}

type Lead

type Lead struct {
	Self       string `json:"self"`
	Key        string `json:"key"`
	Name       string `json:"name"`
	Avatarurls struct {
		Four8X48  string `json:"48x48"`
		Two4X24   string `json:"24x24"`
		One6X16   string `json:"16x16"`
		Three2X32 string `json:"32x32"`
	} `json:"avatarUrls"`
	Displayname string `json:"displayName"`
	Active      bool   `json:"active"`
}

type PStatusObject

type PStatusObject struct {
	Self     string         `json:"self"`
	ID       string         `json:"id"`
	Name     string         `json:"name"`
	Subtask  bool           `json:"subtask"`
	Statuses []StatusObject `json:"statuses"`
}

type PriorityGetObject

type PriorityGetObject []PriorityObject

type PriorityGetOption

type PriorityGetOption struct{}

type PriorityObject

type PriorityObject struct {
	Self        string `json:"self"`
	StatusColor string `json:"statusColor"`
	Description string `json:"description"`
	IconURL     string `json:"iconUrl"`
	Name        string `json:"name"`
	ID          string `json:"id"`
}

type PriorityService

type PriorityService struct {
	// contains filtered or unexported fields
}

func (*PriorityService) Get

func (u *PriorityService) Get(opts *PriorityGetOption) (v *PriorityGetObject, resp *http.Response, err error)

type ProjectGetObject

type ProjectGetObject []ProjectObject

type ProjectGetOption

type ProjectGetOption struct {
	IncludeArchived bool   `url:"includeArchived,omitempty"`
	Expand          string `json:"expand,omitempty"`
}

func (*ProjectGetOption) Check

func (p *ProjectGetOption) Check()

type ProjectObject

type ProjectObject struct {
	Expand     string `json:"expand,omitempty"`
	Self       string `json:"self"`
	ID         string `json:"id"`
	Key        string `json:"key"`
	Name       string `json:"name"`
	AvatarUrls struct {
		Four8X48  string `json:"48x48"`
		Two4X24   string `json:"24x24"`
		One6X16   string `json:"16x16"`
		Three2X32 string `json:"32x32"`
	} `json:"avatarUrls"`
	ProjectTypeKey string            `json:"projectTypeKey,omitempty"`
	Projectkeys    []string          `json:"projectKeys,omitempty"`
	Issuetypes     []IssueTypeObject `json:"issuetypes,omitempty"`
	Lead           Lead              `json:"lead,omitempty"`
	URL            string            `json:"url,omitempty"`
}

type ProjectPostObject

type ProjectPostObject struct {
	Self string `json:"self"`
	ID   int    `json:"id"`
	Key  string `json:"key"`
}

type ProjectPostOption

type ProjectPostOption struct {
	Key                 string `json:"key"`
	Name                string `json:"name"`
	Projecttypekey      string `json:"projectTypeKey,omitempty"`
	Projecttemplatekey  string `json:"projectTemplateKey,omitempty"`
	Description         string `json:"description,omitempty"`
	Lead                string `json:"lead,omitempty"`
	URL                 string `json:"url,omitempty"`
	Assigneetype        string `json:"assigneeType,omitempty"`
	Avatarid            int    `json:"avatarId,omitempty"`
	Issuesecurityscheme int    `json:"issueSecurityScheme,omitempty"`
	Permissionscheme    int    `json:"permissionScheme,omitempty"`
	Notificationscheme  int    `json:"notificationScheme,omitempty"`
	Categoryid          int    `json:"categoryId,omitempty"`
}

func (*ProjectPostOption) Check

func (p *ProjectPostOption) Check(user string)

type ProjectSearchOption

type ProjectSearchOption struct {
	IncludeArchived bool   `url:"includeArchived,omitempty"`
	Search          string `url:"search,omitempty"`
	MaxResults      int    `url:"maxResults,omitempty"`
	Expand          string `json:"expand,omitempty"`
}

func (*ProjectSearchOption) Check

func (p *ProjectSearchOption) Check()

type ProjectService

type ProjectService struct {
	// contains filtered or unexported fields
}

func (*ProjectService) Get

func (u *ProjectService) Get(opts *ProjectGetOption) (v *ProjectGetObject, resp *http.Response, err error)

func (*ProjectService) Post

func (u *ProjectService) Post(opts *ProjectPostOption) (v *ProjectPostObject, resp *http.Response, err error)

func (*ProjectService) Search

func (u *ProjectService) Search(opts *ProjectSearchOption) (v *ProjectGetObject, resp *http.Response, err error)

func (*ProjectService) Types

type ProjectStatusGetOptions

type ProjectStatusGetOptions struct {
	ProjectIdOrKey string `url:"projectIdOrKey"`
}

type ProjectStatusObject

type ProjectStatusObject []PStatusObject

type ProjectTypeGetObject

type ProjectTypeGetObject []ProjectTypeObject

type ProjectTypeGetOption

type ProjectTypeGetOption struct{}

type ProjectTypeObject

type ProjectTypeObject struct {
	Key                string `json:"key"`
	Formattedkey       string `json:"formattedKey"`
	Descriptioni18Nkey string `json:"descriptionI18nKey"`
	Icon               string `json:"icon"`
	Color              string `json:"color"`
}

type SchemeGetObject

type SchemeGetObject struct {
	Expand           string            `json:"expand"`
	Self             string            `json:"self"`
	ID               string            `json:"id"`
	Name             string            `json:"name"`
	DefaultIssueType IssueTypeObject   `json:"defaultIssueType,omitempty"`
	IssueTypes       []IssueTypeObject `json:"issueTypes,omitempty"`
}

type SchemeGetOptions

type SchemeGetOptions struct {
	SchemeId string `url:"schemeId"`
	Expand   string `url:"expand"`
}

func (*SchemeGetOptions) Check

func (s *SchemeGetOptions) Check()

type SchemeListObject

type SchemeListObject struct {
	Expand  string         `json:"expand"`
	Schemes []SchemeObject `json:"schemes"`
}

type SchemeListOptions

type SchemeListOptions struct{}

type SchemeObject

type SchemeObject struct {
	Self        string `json:"self"`
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

type SchemeService

type SchemeService struct {
	// contains filtered or unexported fields
}

func (*SchemeService) Get

func (u *SchemeService) Get(opts *SchemeGetOptions) (v *SchemeGetObject, resp *http.Response, err error)

func (*SchemeService) List

func (u *SchemeService) List(opts *SchemeListOptions) (v *SchemeListObject, resp *http.Response, err error)

type StatusGetObject

type StatusGetObject []StatusObject

type StatusGetOptions

type StatusGetOptions struct {
	IdOrName string `url:"idOrName"`
}

type StatusObject

type StatusObject struct {
	Self           string `json:"self"`
	Description    string `json:"description"`
	IconURL        string `json:"iconUrl"`
	Name           string `json:"name"`
	ID             string `json:"id"`
	StatusCategory struct {
		Self      string `json:"self"`
		ID        int    `json:"id"`
		Key       string `json:"key"`
		ColorName string `json:"colorName"`
		Name      string `json:"name"`
	} `json:"statusCategory"`
}

type StatusService

type StatusService struct {
	// contains filtered or unexported fields
}

func (*StatusService) Get

func (u *StatusService) Get(opts *StatusGetOptions) (v *StatusObject, resp *http.Response, err error)

func (*StatusService) List

func (u *StatusService) List(opts *StatusGetOptions) (v *StatusGetObject, resp *http.Response, err error)

func (*StatusService) ProjectStatusGet

func (u *StatusService) ProjectStatusGet(opts *ProjectStatusGetOptions) (v *ProjectStatusObject, resp *http.Response, err error)

type TFields

type TFields struct {
	Assignee struct {
		Name string `json:"name"`
	} `json:"assignee"`
	Resolution struct {
		Name string `json:"name"`
	} `json:"resolution"`
}

type TTransition

type TTransition struct {
	ID string `json:"id"`
}

type TUpdate

type TUpdate struct {
	Comment []struct {
		Add struct {
			Body string `json:"body"`
		} `json:"add"`
	} `json:"comment"`
}

type TransitionsObject

type TransitionsObject struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	To   struct {
		Self           string `json:"self"`
		Description    string `json:"description"`
		IconURL        string `json:"iconUrl"`
		Name           string `json:"name"`
		ID             string `json:"id"`
		StatusCategory struct {
			Self      string `json:"self"`
			ID        int    `json:"id"`
			Key       string `json:"key"`
			ColorName string `json:"colorName"`
			Name      string `json:"name"`
		} `json:"statusCategory"`
	} `json:"to"`
}

type TransitionsService

type TransitionsService struct {
	// contains filtered or unexported fields
}

func (*TransitionsService) Get

issue流转

func (*TransitionsService) Post

type UserAssignableObject

type UserAssignableObject []UserObject

type UserAssignableOption

type UserAssignableOption struct {
	UserName           string `url:"username"`
	Project            string `url:"project"`
	MaxResults         int    `url:"maxResults,omitempty"`
	IssueKey           string `url:"issueKey,omitempty"`
	ActionDescriptorId int    `url:"actionDescriptorId,omitempty"`
	StartAt            int    `url:"startAt,omitempty"`
}

type UserGetObject

type UserGetObject struct {
	Self         string `json:"self"`
	Key          string `json:"key"`
	Name         string `json:"name"`
	EmailAddress string `json:"emailAddress"`
	AvatarUrls   struct {
		Four8X48  string `json:"48x48"`
		Two4X24   string `json:"24x24"`
		One6X16   string `json:"16x16"`
		Three2X32 string `json:"32x32"`
	} `json:"avatarUrls"`
	DisplayName string `json:"displayName"`
	Active      bool   `json:"active"`
	TimeZone    string `json:"timeZone"`
	Locale      string `json:"locale"`
	Groups      struct {
		Size  int           `json:"size"`
		Items []interface{} `json:"items"`
	} `json:"groups"`
	ApplicationRoles struct {
		Size  int           `json:"size"`
		Items []interface{} `json:"items"`
	} `json:"applicationRoles"`
	Expand string `json:"expand"`
}

type UserGetOption

type UserGetOption struct {
	UserName string `url:"username"`
	Key      string `url:"key,omitempty"`
}

type UserObject

type UserObject struct {
	Self         string `json:"self"`
	Key          string `json:"key"`
	Name         string `json:"name"`
	EmailAddress string `json:"emailAddress"`
	AvatarUrls   struct {
		Four8X48  string `json:"48x48"`
		Two4X24   string `json:"24x24"`
		One6X16   string `json:"16x16"`
		Three2X32 string `json:"32x32"`
	} `json:"avatarUrls"`
	DisplayName string `json:"displayName"`
	Active      bool   `json:"active"`
	TimeZone    string `json:"timeZone"`
	Locale      string `json:"locale"`
}

type UserSearchObject

type UserSearchObject []UserObject

type UserSearchOption

type UserSearchOption struct {
	UserName        string `url:"username"`
	MaxResults      int    `url:"maxResults,omitempty"`
	IncludeActive   bool   `url:"includeActive,omitempty"`
	IncludeInactive bool   `url:"include_inactive,omitempty"`
	StartAt         int    `url:"startAt,omitempty"`
}

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

func (*UserService) Assignable

func (u *UserService) Assignable(opts *UserAssignableOption) (v *UserAssignableObject, resp *http.Response, err error)

func (*UserService) Get

func (u *UserService) Get(opts *UserGetOption) (v *UserGetObject, resp *http.Response, err error)

func (*UserService) Search

func (u *UserService) Search(opts *UserSearchOption) (v *UserSearchObject, resp *http.Response, err error)

type WorklogObject

type WorklogObject struct {
	Add struct {
		TimeSpent string `json:"timeSpent"`
		Started   string `json:"started"`
	} `json:"add"`
}

Directories

Path Synopsis
example
assignee command
comment command
component command
issue command
issuetype command
priority command
project_create command
project_get command
scheme command
status command
transitions command
user command

Jump to

Keyboard shortcuts

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