jirasdk

package module
v0.1.7 Latest Latest
Warning

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

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

README

JiraSDK

Go client library for Jira

go get -u github.com/ysicing/jirasdk

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

issue搜索IssueSearch

  • Get

issue关注watcher

  • Get
  • Post
  • Del

角色role

  • List
  • Post
  • PGet # 查看项目角色成员
  • PGets # 查看项目角色列表

角色成员roleuser

  • Get
  • Post
  • Del
  • DefaultGet # 全局
  • DefaultPost # 全局
  • DefaultDel # 全局

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 Actor added in v0.1.4

type Actor struct {
	ID          int        `json:"id"`
	DisplayName string     `json:"displayName"`
	Type        string     `json:"type"`
	Name        string     `json:"name"`
	AvatarURL   string     `json:"avatarUrl"`
	ActorUser   ActorUser  `json:"actorUser,omitempty"`
	ActorGroup  ActorGroup `json:"actorGroup,omitempty"`
}

type ActorGroup added in v0.1.4

type ActorGroup struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
}

type ActorUser added in v0.1.4

type ActorUser struct {
	AccountID string `json:"accountId"`
}

type AuthorObject added in v0.1.4

type AuthorObject 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"`
}

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
	IssueSearch *IssueSearchService
	Watcher     *WatcherService
	Role        *RoleService
	RoleUser    *RoleUserService
	CustomField *CustomFieldService
	Workflow    *WorkflowService
	// 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       AuthorObject `json:"author"`
	Body         string       `json:"body"`
	UpdateAuthor AuthorObject `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,omitempty"`
	Assigneetype        string `json:"assigneeType,omitempty"`
	Assignee            Lead   `json:"assignee,omitempty"`
	Realassigneetype    string `json:"realAssigneeType,omitempty"`
	Realassignee        Lead   `json:"realassignee,omitempty"`
	Isassigneetypevalid bool   `json:"isAssigneeTypeValid"`
	Project             string `json:"project,omitempty"`
	Projectid           int    `json:"projectId,omitempty"`
	Archived            bool   `json:"archived,omitempty"`
}

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 CustomFieldService added in v0.1.7

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

func (*CustomFieldService) Get added in v0.1.7

func (u *CustomFieldService) Get(opts *FieldGetOption) (v *FieldGetObject, resp *http.Response, err error)

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 FieldGetObject added in v0.1.7

type FieldGetObject struct {
	MaxResults int           `json:"maxResults"`
	StartAt    int           `json:"startAt"`
	Total      int           `json:"total"`
	IsLast     bool          `json:"isLast"`
	Values     []FieldObject `json:"values"`
}

type FieldGetOption added in v0.1.7

type FieldGetOption struct {
	ProjectId string `url:"projectId"`
}

type FieldObject added in v0.1.7

type FieldObject struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	Description   string `json:"description,omitempty"`
	Type          string `json:"type"`
	SearcherKey   string `json:"searcherKey"`
	Self          string `json:"self"`
	NumericID     int    `json:"numericId"`
	IsLocked      bool   `json:"isLocked"`
	IsManaged     bool   `json:"isManaged"`
	IsAllProjects bool   `json:"isAllProjects"`
	ProjectsCount int    `json:"projectsCount"`
	ScreensCount  int    `json:"screensCount"`
}

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       AuthorObject `json:"author"`
	Body         string       `json:"body"`
	UpdateAuthor AuthorObject `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 IssueFields added in v0.1.4

type IssueFields struct {
	Issuetype             IssueTypeObject `json:"issuetype"`
	Components            []interface{}   `json:"components"`
	Timespent             interface{}     `json:"timespent"`
	Timeoriginalestimate  interface{}     `json:"timeoriginalestimate"`
	Description           interface{}     `json:"description"`
	Project               ProjectObject   `json:"project"`
	FixVersions           []interface{}   `json:"fixVersions"`
	Aggregatetimespent    interface{}     `json:"aggregatetimespent"`
	Resolution            interface{}     `json:"resolution"`
	Customfield10105      string          `json:"customfield_10105"`
	Aggregatetimeestimate interface{}     `json:"aggregatetimeestimate"`
	Resolutiondate        interface{}     `json:"resolutiondate"`
	Workratio             int             `json:"workratio"`
	Summary               string          `json:"summary"`
	LastViewed            string          `json:"lastViewed"`
	Watches               Watches         `json:"watches"`
	Creator               AuthorObject    `json:"creator"`
	Subtasks              []interface{}   `json:"subtasks"`
	Created               string          `json:"created"`
	Reporter              AuthorObject    `json:"reporter"`
	Customfield10000      string          `json:"customfield_10000"`
	Aggregateprogress     struct {
		Progress int `json:"progress"`
		Total    int `json:"total"`
	} `json:"aggregateprogress"`
	Priority                      PriorityObject `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"`
	Issuelinks []interface{} `json:"issuelinks"`
	Votes      Votes         `json:"votes"`
	Assignee   AuthorObject  `json:"assignee"`
	Updated    string        `json:"updated"`
	Status     StatusObject  `json:"status"`
}

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 IssueObject added in v0.1.4

type IssueObject struct {
	Expand string      `json:"expand"`
	ID     string      `json:"id"`
	Self   string      `json:"self"`
	Key    string      `json:"key"`
	Fields IssueFields `json:"fields"`
}

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 IssueSearchObject added in v0.1.4

type IssueSearchObject struct {
	Expand     string        `json:"expand"`
	StartAt    int           `json:"startAt"`
	MaxResults int           `json:"maxResults"`
	Total      int           `json:"total"`
	Issues     []IssueObject `json:"issues"`
}

type IssueSearchOption added in v0.1.4

type IssueSearchOption struct {
	Jql           string `url:"jql"`
	StartAt       int    `url:"startAt"`
	MaxResults    int    `url:"maxResults"`
	ValidateQuery bool   `url:"validateQuery"`
	Fields        string `url:"fields"`
	Expand        string `url:"expand"`
}

func (*IssueSearchOption) Check added in v0.1.4

func (i *IssueSearchOption) Check()

type IssueSearchService added in v0.1.4

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

func (*IssueSearchService) Get added in v0.1.4

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,omitempty"`
	Description string `json:"description,omitempty"`
	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 ProjectCategory added in v0.1.5

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

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 ProjectIssueTypeFieldsObject added in v0.1.7

type ProjectIssueTypeFieldsObject struct {
	ViewScreen ViewScreen `json:"viewScreen"`
}

type ProjectIssueTypeGetObject added in v0.1.7

type ProjectIssueTypeGetObject struct {
	SharedWithProjects   []SharedProjectObject `json:"sharedWithProjects"`
	SharedWithIssueTypes []string              `json:"sharedWithIssueTypes"`
	TotalProjectsCount   int                   `json:"totalProjectsCount"`
	Name                 string                `json:"name"`
	State                string                `json:"state"`
	DisplayName          string                `json:"displayName"`
	IsDraftWithChanges   bool                  `json:"isDraftWithChanges"`
	DraftWithChanges     bool                  `json:"draftWithChanges"`
	HiddenProjectsCount  int                   `json:"hiddenProjectsCount"`
}

type ProjectIssueTypeGetOption added in v0.1.7

type ProjectIssueTypeGetOption struct {
	Project   string `json:"project"`
	Issuetype string `json:"issuetype"`
}

type ProjectObject

type ProjectObject struct {
	Expand      string `json:"expand,omitempty"`
	Self        string `json:"self,omitempty"`
	ID          string `json:"id,omitempty"`
	Key         string `json:"key"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	AvatarUrls  struct {
		Four8X48  string `json:"48x48"`
		Two4X24   string `json:"24x24"`
		One6X16   string `json:"16x16"`
		Three2X32 string `json:"32x32"`
	} `json:"avatarUrls,omitempty"`
	ProjectCategory ProjectCategory   `json:"projectCategory,omitempty"`
	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"`
	Components      []ComponentObject `json:"components,omitempty"`
	IssueTypes      []IssueTypeObject `json:"issueTypes,omitempty"`
	AssigneeType    string            `json:"assigneeType"`
	Versions        []interface{}     `json:"versions,omitempty"`
	Archived        bool              `json:"archived,omitempty"`
	Roles           Roles             `json:"roles,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 ProjectSearchObject added in v0.1.3

type ProjectSearchObject ProjectObject

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) IssueTypeFields added in v0.1.7

func (u *ProjectService) IssueTypeFields(opts *ProjectIssueTypeGetOption) (v *ProjectIssueTypeFieldsObject, resp *http.Response, err error)

func (*ProjectService) IssueTypeWorkflow added in v0.1.7

func (u *ProjectService) IssueTypeWorkflow(opts *ProjectIssueTypeGetOption) (v *ProjectIssueTypeGetObject, 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 *ProjectSearchObject, 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 RoleGetObject added in v0.1.4

type RoleGetObject RoleUserGetObject

type RoleGetOption added in v0.1.4

type RoleGetOption struct {
	ProjectIdOrKey string `url:"projectIdOrKey"`
	ID             string `url:"id"`
}

type RoleListObject added in v0.1.4

type RoleListObject []RoleObject

type RoleListOption added in v0.1.4

type RoleListOption struct{}

type RoleObject added in v0.1.4

type RoleObject struct {
	Self        string    `json:"self" structs:"self"`
	Name        string    `json:"name" structs:"name"`
	ID          int       `json:"id" structs:"id"`
	Description string    `json:"description" structs:"description"`
	Actors      []Actor   `json:"actors" structs:"actors"`
	Scope       RoleScope `json:"scope,omitempty"`
}

type RolePGetsObject added in v0.1.4

type RolePGetsObject struct{}

type RolePostObject added in v0.1.4

type RolePostObject RoleUserGetObject

type RolePostOption added in v0.1.4

type RolePostOption struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type RoleScope added in v0.1.4

type RoleScope struct {
	Type    string `json:"type"`
	Project struct {
		ID   string `json:"id"`
		Key  string `json:"key"`
		Name string `json:"name"`
	} `json:"project"`
}

type RoleService added in v0.1.4

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

func (*RoleService) List added in v0.1.4

func (u *RoleService) List(opts *RoleListOption) (v *RoleListObject, resp *http.Response, err error)

func (*RoleService) PGet added in v0.1.4

func (u *RoleService) PGet(opts *RoleGetOption) (v *RoleGetObject, resp *http.Response, err error)

func (*RoleService) PGets added in v0.1.4

func (u *RoleService) PGets(opts *RoleGetOption) (v *interface{}, resp *http.Response, err error)

func (*RoleService) Post added in v0.1.4

func (u *RoleService) Post(opts *RolePostOption) (v *RolePostObject, resp *http.Response, err error)

type RoleUserDelObject added in v0.1.4

type RoleUserDelObject RoleUserGetObject

type RoleUserDelOption added in v0.1.4

type RoleUserDelOption struct {
	ID   string `url:"id" json:"-"`
	User string `url:"user"`
	// Group string `url:"group"`
	ProjectIdOrKey string `url:"projectIdOrKey" json:"-"`
}

type RoleUserGetObject added in v0.1.4

type RoleUserGetObject struct {
	Self             string    `json:"self"`
	Name             string    `json:"name"`
	ID               int       `json:"id"`
	Description      string    `json:"description"`
	Actors           []Actor   `json:"actors"`
	Scope            RoleScope `json:"scope,omitempty"`
	TranslatedName   string    `json:"translatedName,omitempty"`
	CurrentUserRole  bool      `json:"currentUserRole,omitempty"`
	Admin            bool      `json:"admin,omitempty"`
	RoleConfigurable bool      `json:"roleConfigurable,omitempty"`
	Default          bool      `json:"default,omitempty"`
}

type RoleUserGetOption added in v0.1.4

type RoleUserGetOption struct {
	ID             string `url:"id"`
	ProjectIdOrKey string `url:"projectIdOrKey"`
}

type RoleUserPostObject added in v0.1.4

type RoleUserPostObject RoleUserGetObject

type RoleUserPostOption added in v0.1.4

type RoleUserPostOption struct {
	ID             string   `url:"id" json:"-"`
	User           []string `json:"user"`
	ProjectIdOrKey string   `url:"projectIdOrKey" json:"-"`
}

type RoleUserService added in v0.1.4

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

func (*RoleUserService) DefaultDel added in v0.1.4

func (u *RoleUserService) DefaultDel(opts *RoleUserDelOption) (v *RoleUserDelObject, resp *http.Response, err error)

DefaultDel

func (*RoleUserService) DefaultGet added in v0.1.4

func (u *RoleUserService) DefaultGet(opts *RoleUserGetOption) (v *RoleUserGetObject, resp *http.Response, err error)

DefaultGet

func (*RoleUserService) DefaultPost added in v0.1.4

func (u *RoleUserService) DefaultPost(opts *RoleUserPostOption) (v *RoleUserPostObject, resp *http.Response, err error)

DefaultPost

func (*RoleUserService) Del added in v0.1.4

func (u *RoleUserService) Del(opts *RoleUserDelOption) (v *RoleUserDelObject, resp *http.Response, err error)

Del

func (*RoleUserService) Get added in v0.1.4

func (u *RoleUserService) Get(opts *RoleUserGetOption) (v *RoleUserGetObject, resp *http.Response, err error)

Get 项目级

func (*RoleUserService) Post added in v0.1.4

func (u *RoleUserService) Post(opts *RoleUserPostOption) (v *RoleUserPostObject, resp *http.Response, err error)

Post

type Roles added in v0.1.3

type Roles struct {
	Administrators string `json:"Administrators"`
}

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 SharedProjectObject added in v0.1.7

type SharedProjectObject struct {
	Expand      string `json:"expand,omitempty"`
	Self        string `json:"self,omitempty"`
	ID          int64  `json:"id,omitempty"`
	Key         string `json:"key"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	AvatarUrls  struct {
		Four8X48  string `json:"48x48"`
		Two4X24   string `json:"24x24"`
		One6X16   string `json:"16x16"`
		Three2X32 string `json:"32x32"`
	} `json:"avatarUrls,omitempty"`
	ProjectCategory ProjectCategory   `json:"projectCategory,omitempty"`
	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"`
	Components      []ComponentObject `json:"components,omitempty"`
	IssueTypes      []IssueTypeObject `json:"issueTypes,omitempty"`
	AssigneeType    string            `json:"assigneeType"`
	Versions        []interface{}     `json:"versions,omitempty"`
	Archived        bool              `json:"archived,omitempty"`
	Roles           Roles             `json:"roles,omitempty"`
}

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   StatusObject `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 ViewScreen added in v0.1.7

type ViewScreen struct {
	SharedWithProjects   []SharedProjectObject `json:"sharedWithProjects"`
	SharedWithIssueTypes []string              `json:"sharedWithIssueTypes"`
	TotalProjectsCount   int                   `json:"totalProjectsCount"`
	ScreenID             int                   `json:"screenId"`
	ScreenName           string                `json:"screenName"`
	CanEdit              bool                  `json:"canEdit"`
	State                string                `json:"state"`
	HiddenProjectsCount  int                   `json:"hiddenProjectsCount"`
}

type Votes added in v0.1.4

type Votes struct {
	Self     string `json:"self"`
	Votes    int    `json:"votes"`
	HasVoted bool   `json:"hasVoted"`
}

type WatcherGetObject added in v0.1.4

type WatcherGetObject struct {
	Self       string         `json:"self"`
	IsWatching bool           `json:"isWatching"`
	WatchCount int            `json:"watchCount"`
	Watchers   []AuthorObject `json:"watchers"`
}

type WatcherObject added in v0.1.4

type WatcherObject struct{}

type WatcherOption added in v0.1.4

type WatcherOption struct {
	IssueIdOrKey string `url:"issueIdOrKey"`
	Username     string `url:"username"`
}

type WatcherService added in v0.1.4

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

func (*WatcherService) Del added in v0.1.4

func (u *WatcherService) Del(opts *WatcherOption) (v *WatcherObject, resp *http.Response, err error)

func (*WatcherService) Get added in v0.1.4

func (u *WatcherService) Get(opts *WatcherOption) (v *WatcherGetObject, resp *http.Response, err error)

func (*WatcherService) Post added in v0.1.4

func (u *WatcherService) Post(opts *WatcherOption) (v *WatcherObject, resp *http.Response, err error)

type Watches added in v0.1.4

type Watches struct {
	Self       string `json:"self"`
	WatchCount int    `json:"watchCount"`
	IsWatching bool   `json:"isWatching"`
}

type WorkflowGetObject added in v0.1.7

type WorkflowGetObject []WorkflowObject

type WorkflowGetOption added in v0.1.7

type WorkflowGetOption struct {
	WorkflowName string `url:"workflowName"`
}

type WorkflowObject added in v0.1.7

type WorkflowObject struct {
	Name             string `json:"name"`
	Description      string `json:"description"`
	Steps            int    `json:"steps"`
	Default          bool   `json:"default"`
	LastModifiedDate string `json:"lastModifiedDate,omitempty"`
	LastModifiedUser string `json:"lastModifiedUser,omitempty"`
}

type WorkflowService added in v0.1.7

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

func (*WorkflowService) Get added in v0.1.7

func (u *WorkflowService) Get(opts *WorkflowGetOption) (v *WorkflowGetObject, resp *http.Response, err error)

type WorklogObject

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

Jump to

Keyboard shortcuts

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