Documentation
¶
Index ¶
- type Assignee
- type Author
- type Client
- func (c *Client) ListIssues(ctx context.Context, enterpriseId int, params *IssueListParams) (*ListIssuesResponse, error)
- func (c *Client) NewRequest(ctx context.Context, method, url string, payload interface{}) (*http.Request, error)
- func (c *Client) Send(req *http.Request, v interface{}) error
- func (c *Client) SendWithCookies(req *http.Request, v interface{}) error
- func (c *Client) SetHTTPClient(client *http.Client)
- func (c *Client) SetHTTPCookies(cookiesJar string)
- func (c *Client) SetLog(log io.Writer)
- type ErrorResponse
- type Issue
- type IssueListParams
- type IssueState
- type IssueType
- type ListIssuesResponse
- type SharedListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assignee ¶
type Assignee struct { ID int `json:"id"` Username string `json:"username"` Name string `json:"name"` Remark string `json:"remark"` Pinyin string `json:"pinyin"` AvatarURL string `json:"avatar_url"` IsEnterpriseMember bool `json:"is_enterprise_member"` IsHistoryMember bool `json:"is_history_member"` Outsourced bool `json:"outsourced"` }
type Author ¶
type Author struct { ID int `json:"id"` Username string `json:"username"` Name string `json:"name"` Remark string `json:"remark"` Pinyin string `json:"pinyin"` AvatarURL string `json:"avatar_url"` IsEnterpriseMember bool `json:"is_enterprise_member"` IsHistoryMember bool `json:"is_history_member"` Outsourced bool `json:"outsourced"` }
type Client ¶
type Client struct { Client *http.Client APIBase string CookiesJar string Log io.Writer // If user set log file name all requests will be logged there // contains filtered or unexported fields }
Client represents a Paypal REST API Client
func (*Client) ListIssues ¶
func (c *Client) ListIssues(ctx context.Context, enterpriseId int, params *IssueListParams) (*ListIssuesResponse, error)
func (*Client) NewRequest ¶
func (c *Client) NewRequest(ctx context.Context, method, url string, payload interface{}) (*http.Request, error)
NewRequest constructs a request Convert payload to a JSON
func (*Client) Send ¶
Send makes a request to the API, the response body will be unmarshalled into v, or if v is an io.Writer, the response will be written to it without decoding
func (*Client) SendWithCookies ¶
func (*Client) SetHTTPClient ¶
SetHTTPClient sets *http.Client to current client
func (*Client) SetHTTPCookies ¶
SetHTTPClient sets cookies to current client
type ErrorResponse ¶
ErrorResponse
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type Issue ¶
type Issue struct { ID int `json:"id"` RootID int `json:"root_id"` ParentID int `json:"parent_id"` ProjectID int `json:"project_id"` Ident string `json:"ident"` Title string `json:"title"` IssueStateID int `json:"issue_state_id"` ProgramID int `json:"program_id"` State string `json:"state"` CommentsCount int `json:"comments_count"` Priority int `json:"priority"` Branch string `json:"branch"` PriorityHuman string `json:"priority_human"` Assignee Assignee `json:"assignee"` Duration int `json:"duration"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Author Author `json:"author"` IssueState IssueState `json:"issue_state"` IssueType IssueType `json:"issue_type"` PlanStartedAt string `json:"plan_started_at,omitempty"` Deadline string `json:"deadline,omitempty"` FinishedAt string `json:"finished_at,omitempty"` StartedAt string `json:"started_at,omitempty"` SecurityHole bool `json:"security_hole"` IsStar bool `json:"is_star"` EstimatedDuration int `json:"estimated_duration"` RegisteredDuration int `json:"registered_duration"` }
type IssueListParams ¶
type IssueListParams struct { ProjectID string `json:"project_id,omitempty"` ProgramID string `json:"program_id,omitempty"` MilestoneID string `json:"milestone_id,omitempty"` State string `json:"state,omitempty"` OnlyRelatedMe string `json:"only_related_me,omitempty"` AssigneeID string `json:"assignee_id,omitempty"` AuthorID string `json:"author_id,omitempty"` CollaboratorIDs string `json:"collaborator_ids,omitempty"` CreatedAt string `json:"created_at,omitempty"` FinishedAt string `json:"finished_at,omitempty"` PlanStartedAt string `json:"plan_started_at,omitempty"` Deadline string `json:"deadline,omitempty"` Search string `json:"search,omitempty"` FilterChild string `json:"filter_child,omitempty"` IssueStateIDs string `json:"issue_state_ids,omitempty"` IssueTypeID string `json:"issue_type_id,omitempty"` LabelIDs string `json:"label_ids,omitempty"` Priority string `json:"priority,omitempty"` Sort string `json:"sort,omitempty"` Direction string `json:"direction,omitempty"` Page string `json:"page,omitempty"` PerPage string `json:"per_page,omitempty"` }
type IssueState ¶
type IssueState struct { IssueState string `json:"issue_state"` ID int `json:"id"` Title string `json:"title"` Color string `json:"color"` Icon string `json:"icon"` Command string `json:"command"` Serial int `json:"serial"` IssueTypes []IssueType `json:"issue_types"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
type IssueType ¶
type IssueType struct { ID int `json:"id"` Title string `json:"title"` Template string `json:"template"` Ident string `json:"ident"` Color string `json:"color"` IsSystem bool `json:"is_system"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Category string `json:"category"` Description string `json:"description"` }
type ListIssuesResponse ¶
type ListIssuesResponse struct { Issues []Issue `json:"data"` }
type SharedListResponse ¶
type SharedListResponse struct {
} Click to show internal directories.
Click to hide internal directories.