Versions in this module Expand all Collapse all v1 v1.0.0 Dec 12, 2025 Changes in this version + func AddBasicAuthHeader(rt http.RoundTripper, cfg tokenGetter) http.RoundTripper + func CurrentLoginName(client *Client, hostname string) (string, error) + func ExtractHeader(name string, dest *string) func(http.RoundTripper) http.RoundTripper + func HandleHTTPError(resp *http.Response) error + func IsConflictError(err error) bool + func IsForbiddenError(err error) bool + func IsNotFoundError(err error) bool + func IsUnauthorizedError(err error) bool + func NewHTTPClient(opts HTTPClientOptions) (*http.Client, error) + func RESTPrefix(hostname string) string + type Author struct + Raw string + User *User + type Branch struct + Links Links + Name string + Target *Commit + Type string + type BranchRef struct + Name string + type Client struct + func NewClientFromHTTP(httpClient *http.Client) *Client + func (c *Client) Delete(hostname string, path string) error + func (c *Client) Get(hostname string, path string, data interface{}) error + func (c *Client) HTTP() *http.Client + func (c *Client) Patch(hostname string, path string, input interface{}, data interface{}) error + func (c *Client) Post(hostname string, path string, input interface{}, data interface{}) error + func (c *Client) Put(hostname string, path string, input interface{}, data interface{}) error + func (c *Client) REST(hostname string, method string, path string, body io.Reader, data interface{}) error + func (c *Client) RESTWithContext(ctx context.Context, hostname string, method string, path string, ...) error + func (c *Client) RESTWithNext(hostname string, method string, path string, body io.Reader, data interface{}) (string, error) + func (c *Client) RESTWithNextURL(method string, url string, body io.Reader, data interface{}) (string, error) + func (c *Client) RESTWithURL(method string, url string, body io.Reader, data interface{}) error + type CloneLink struct + Href string + Name string + type Commit struct + Author Author + Date time.Time + Hash string + Links Links + Message string + Parents []Commit + Repository *Repository + Type string + type Component struct + ID int + Links Links + Name string + type Content struct + HTML string + Markup string + Raw string + type ContentInput struct + Raw string + type CreateIssueInput struct + Assignee *UserRef + Content *ContentInput + Kind string + Priority string + Title string + type CreateProjectInput struct + Description string + IsPrivate bool + Key string + Name string + type CreatePullRequestInput struct + CloseSourceBranch bool + Description string + Destination *CreatePullRequestRef + Reviewers []UserRef + Source CreatePullRequestRef + Title string + type CreatePullRequestRef struct + Branch BranchRef + type DeclinePullRequestInput struct + Reason string + type ErrorResponse struct + Error struct{ ... } + Type string + type HTTPClientOptions struct + AppVersion string + CacheTTL time.Duration + Config tokenGetter + EnableCache bool + Log io.Writer + LogColorize bool + LogVerboseHTTP bool + SkipDefaultHeaders bool + type HTTPError struct + Body string + Message string + RequestURL *url.URL + StatusCode int + func (e HTTPError) Error() string + type InlineComment struct + From int + Path string + To int + type Issue struct + Assignee *User + Component *Component + Content Content + CreatedOn time.Time + EditedOn *time.Time + ID int + Kind string + Links Links + Milestone *Milestone + Priority string + Reporter User + Repository Repository + State string + Title string + Type string + UpdatedOn time.Time + Version *Version + Votes int + Watches int + type IssueComment struct + Content Content + CreatedOn time.Time + ID int + Links Links + Type string + UpdatedOn time.Time + User User + type Link struct + Href string + Name string + type Links struct + Activity *Link + Approve *Link + Avatar *Link + Branches *Link + Clone []CloneLink + Comments *Link + Commits *Link + Decline *Link + Diff *Link + DiffStat *Link + Downloads *Link + Forks *Link + HTML *Link + Issues *Link + Merge *Link + Patch *Link + PullRequests *Link + Self *Link + Statuses *Link + Tags *Link + Watchers *Link + type MergePullRequestInput struct + CloseSourceBranch bool + MergeStrategy string + Message string + type Milestone struct + ID int + Links Links + Name string + type PaginatedResponse struct + Next string + Page int + PageLen int + Previous string + Size int + Values []T + type Participant struct + Approved bool + ParticipatedOn time.Time + Role string + State string + User User + type Project struct + CreatedOn time.Time + Description string + IsPrivate bool + Key string + Links Links + Name string + Owner Workspace + Type string + UUID string + UpdatedOn time.Time + type PullRequest struct + Author User + CloseSourceBranch bool + ClosedBy *User + CommentCount int + CreatedOn time.Time + Description string + Destination PullRequestRef + ID int + Links Links + MergeCommit *Commit + Participants []Participant + Reason string + Reviewers []User + Source PullRequestRef + State PullRequestState + TaskCount int + Title string + Type string + UpdatedOn time.Time + type PullRequestComment struct + Content Content + CreatedOn time.Time + Deleted bool + ID int + Inline *InlineComment + Links Links + Parent *PullRequestComment + Pending bool + Type string + UpdatedOn time.Time + User User + type PullRequestRef struct + Branch Branch + Commit Commit + Repository *Repository + type PullRequestState string + const PullRequestStateDeclined + const PullRequestStateMerged + const PullRequestStateOpen + const PullRequestStateSuperseded + type Repository struct + CreatedOn time.Time + Description string + ForkPolicy string + FullName string + HasIssues bool + HasWiki bool + IsPrivate bool + Language string + Links Links + MainBranch *Branch + Name string + Owner User + Parent *Repository + Project *Project + SCM string + Size int64 + Slug string + Type string + UUID string + UpdatedOn time.Time + Workspace Workspace + type User struct + AccountID string + DisplayName string + Links Links + Nickname string + Type string + UUID string + Username string + func CurrentUser(client *Client, hostname string) (*User, error) + type UserRef struct + AccountID string + UUID string + type Version struct + ID int + Links Links + Name string + type Workspace struct + IsAdmin bool + Links Links + Name string + Slug string + Type string + UUID string