Categorygithub.com/TwoStone/bitbucket-go-client
modulepackage
1.4.0
Repository: https://github.com/twostone/bitbucket-go-client.git
Documentation: pkg.go.dev

# README

Go API client for bitbucket

REST Resources Provided By: Bitbucket Server - REST

This is the reference document for the Atlassian Bitbucket REST API. The REST API is for developers who want to:

  • integrate Bitbucket with other applications;
  • create scripts that interact with Bitbucket; or
  • develop plugins that enhance the Bitbucket UI, using REST to interact with the backend.
You can read more about developing Bitbucket plugins in the Bitbucket Developer Documentation.

Getting started

Because the REST API is based on open standards, you can use any web development language or command line tool capable of generating an HTTP request to access the API. See the developer documentation for a basic usage example.

If you're already working with the Atlassian SDK, the REST API Browser is a great tool for exploring and experimenting with the Bitbucket REST API.

Structure of the REST URIs

Bitbucket's REST APIs provide access to resources (data entities) via URI paths. To use a REST API, your application will make an HTTP request and parse the response. The Bitbucket REST API uses JSON as its communication format, and the standard HTTP methods like GET, PUT, POST and DELETE. URIs for Bitbucket's REST API resource have the following structure:

    http://host:port/context/rest/api-name/api-version/path/to/resource

For example, the following URI would retrieve a page of the latest commits to the jira repository in the Jira project on https://stash.atlassian.com.

    https://stash.atlassian.com/rest/api/1.0/projects/JIRA/repos/jira/commits

See the API descriptions below for a full list of available resources.

Alternatively we also publish a list of resources in WADL format. It is available here.

Paged APIs

Bitbucket uses paging to conserve server resources and limit response size for resources that return potentially large collections of items. A request to a paged API will result in a values array wrapped in a JSON object with some paging metadata, like this:

    {
        \"size\": 3,
        \"limit\": 3,
        \"isLastPage\": false,
        \"values\": [
            { /_* result 0 *_/ },
            { /_* result 1 *_/ },
            { /_* result 2 *_/ }
        ],
        \"start\": 0,
        \"filter\": null,
        \"nextPageStart\": 3
    }

Clients can use the limit and start query parameters to retrieve the desired number of results.

The limit parameter indicates how many results to return per page. Most APIs default to returning 25 if the limit is left unspecified. This number can be increased, but note that a resource-specific hard limit will apply. These hard limits can be configured by server administrators, so it's always best practice to check the limit attribute on the response to see what limit has been applied. The request to get a larger page should look like this:

    http://host:port/context/rest/api-name/api-version/path/to/resource?limit={desired size of page}

For example:

    https://stash.atlassian.com/rest/api/1.0/projects/JIRA/repos/jira/commits?limit=1000

The start parameter indicates which item should be used as the first item in the page of results. All paged responses contain an isLastPage attribute indicating whether another page of items exists.

Important: If more than one page exists (i.e. the response contains \"isLastPage\": false), the response object will also contain a nextPageStart attribute which must be used by the client as the start parameter on the next request. Identifiers of adjacent objects in a page may not be contiguous, so the start of the next page is not necessarily the start of the last page plus the last page's size. A client should always use nextPageStart to avoid unexpected results from a paged API. The request to get a subsequent page should look like this:

    http://host:port/context/rest/api-name/api-version/path/to/resource?start={nextPageStart from previous response}

For example:

    https://stash.atlassian.com/rest/api/1.0/projects/JIRA/repos/jira/commits?start=25

Authentication

Any authentication that works against Bitbucket will work against the REST API. The preferred authentication methods are HTTP Basic (when using SSL) and OAuth. Other supported methods include: HTTP Cookies and Trusted Applications.

You can find OAuth code samples in several programming languages at bitbucket.org/atlassian_tutorial/atlassian-oauth-examples.

The log-in page uses cookie-based authentication, so if you are using Bitbucket in a browser you can call REST from JavaScript on the page and rely on the authentication that the browser has established.

Errors & Validation

If a request fails due to client error, the resource will return an HTTP response code in the 40x range. These can be broadly categorised into:

HTTP CodeDescription
400 (Bad Request) One or more of the required parameters or attributes:
  • were missing from the request;
  • incorrectly formatted; or
  • inappropriate in the given context.
401 (Unauthorized) Either:
  • Authentication is required but was not attempted.
  • Authentication was attempted but failed.
  • Authentication was successful but the authenticated user does not have the requisite permission for the resource.
See the individual resource documentation for details of required permissions.
403 (Forbidden) Actions are usually \"forbidden\" if they involve breaching the licensed user limit of the server, or degrading the authenticated user's permission level. See the individual resource documentation for more details.
404 (Not Found) The entity you are attempting to access, or the project or repository containing it, does not exist.
405 (Method Not Allowed) The request HTTP method is not appropriate for the targeted resource. For example an HTTP GET to a resource that only accepts an HTTP POST will result in a 405.
409 (Conflict) The attempted update failed due to some conflict with an existing resource. For example:
  • Creating a project with a key that already exists
  • Merging an out-of-date pull request
  • Deleting a comment that has replies
  • etc.
See the individual resource documentation for more details.
415 (Unsupported Media Type) The request entity has a Content-Type that the server does not support. Almost all of the Bitbucket REST API accepts application/json format, but check the individual resource documentation for more details. Additionally, double-check that you are setting the Content-Type header correctly on your request (e.g. using -H \"Content-Type: application/json\" in cURL).

For 400 HTTP codes the response will typically contain one or more validation error messages, for example:

    {
        \"errors\": [
            {
                \"context\": \"name\",
                \"message\": \"The name should be between 1 and 255 characters.\",
                \"exceptionName\": null
            },
            {
                \"context\": \"email\",
                \"message\": \"The email should be a valid email address.\",
                \"exceptionName\": null
            }
        ]
    }
    

The context attribute indicates which parameter or request entity attribute failed validation. Note that the context may be null.

For 401, 403, 404 and 409 HTTP codes, the response will contain one or more descriptive error messages:

    {
        \"errors\": [
            {
                \"context\": null,
                \"message\": \"A detailed error message.\",
                \"exceptionName\": null
            }
        ]
    }
    

A 500 (Server Error) HTTP code indicates an incorrect resource url or an unexpected server error. Double-check the URL you are trying to access, then report the issue to your server administrator or Atlassian Support if problems persist.

Personal Repositories

Bitbucket allows users to manage their own repositories, called personal repositories. These are repositories associated with the user and to which they always have REPO_ADMIN permission.

Accessing personal repositories via REST is achieved through the normal project-centric REST URLs using the user's slug prefixed by tilde as the project key. E.g. to list personal repositories for a user with slug \"johnsmith\" you would make a GET to:

http://example.com/rest/api/1.0/projects/~johnsmith/repos

In addition to this, Bitbucket allows access to these repositories through an alternate set of user-centric REST URLs beginning with:

http://example.com/rest/api/1.0/users/~{userSlug}/repos
E.g. to list the forks of the repository with slug \"nodejs\" in the personal project of user with slug \"johnsmith\" using the regular REST URL you would make a GET to:
http://example.com/rest/api/1.0/projects/~johnsmith/repos/nodejs/forks
Using the alternate URL, you would make a GET to:
http://example.com/rest/api/1.0/users/johnsmith/repos/nodejs/forks

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import sw "./bitbucket"

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identifield by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://example.com

ClassMethodHTTP requestDescription
BranchesApiCreateBranchPost /rest/branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branchesDelete branch
BranchesApiDeleteBranchDelete /rest/branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branches
BranchesApiGetBranchesPagedGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/branchesGet Branches
BranchesApiGetDefaultBranchGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/branches/defaultGet default branch
BuildStatusApiGetBuildStatusesPagedGet /rest/build-status/1.0/commits/{commitHash}Get build statuses
BuildStatusApiPostBuildResultPost /rest/build-status/1.0/commits/{commitHash}Post build-result
CommitsApiGetCommitGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}Get commit
CommitsApiGetCommitsPagedGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/commitsGet commits
PostWebhookApiDeletePostWebhookDelete /rest/webhook/1.0/projects/{projectKey}/repos/{repositorySlug}/configurations/{ID}Delete post webhook
PostWebhookApiGetPostWebhooksGet /rest/webhook/1.0/projects/{projectKey}/repos/{repositorySlug}/configurationsGet Post Webhooks
ProjectsApiGetProjectGet /rest/api/1.0/projects/{projectKey}REST resource for working with projects
ProjectsApiGetProjectsPagedGet /rest/api/1.0/projectsGet Projects
PullRequestsApiCreatePullRequestPost /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requestsCreate Pull Request
PullRequestsApiDeletePullRequestDelete /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}Delete pull request
PullRequestsApiGetDefaultReviewersGet /rest/default-reviewers/1.0/projects/{projectKey}/repos/{repositorySlug}/reviewersGet default reviewers
PullRequestsApiGetDiffGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}.diffGet PR Diff
PullRequestsApiGetPullRequestGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}Get pull request
PullRequestsApiGetPullRequestsPagedGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requestsGet Pull Request Page
PullRequestsApiGetRestApi10ProjectsProjectKeyReposRepositorySlugPullRequestsPullRequestIdPatchGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}.patchGet PR Patch
PullRequestsApiUpdatePullRequestPut /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}Update pull request
RepositoriesApiBrowseRepositoryPagedGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/browsebrowseRepository
RepositoriesApiBrowseRepositoryPathPagedGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/browse/{path}browseRepositoryPath
RepositoriesApiCreateRepositoryPost /rest/api/1.0/projects/{projectKey}/reposCreate repository
RepositoriesApiGetConfiguredDefaultBranchGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/default-branchGet default branch
RepositoriesApiGetRepositoriesPagedGet /rest/api/1.0/projects/{projectKey}/reposGet Repositories
RepositoriesApiGetRepositoryGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}Get Repository
RepositoriesApiSearchRepositoriesPagedGet /rest/api/1.0/reposSearch repositories
WebhookApiCreateWebhookPost /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/webhooksCreate webhook
WebhookApiDeleteWebhookDelete /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}Delete Webhook
WebhookApiGetWebhookGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}Get Webhook
WebhookApiGetWebhooksPagedGet /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/webhooksGet webhooks
WebhookApiUpdateWebhookPut /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}Update webhook

Documentation For Models

Documentation For Authorization

usernamePassword

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

# Functions

CacheExpires helper function to determine remaining time before repeating a request.
NewAPIClient creates a new API client.
NewAPIResponse returns a new APIResonse object.
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
NewBranch instantiates a new Branch object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBranchesPage instantiates a new BranchesPage object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBranchesPageAllOf instantiates a new BranchesPageAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBranchesPageAllOfWithDefaults instantiates a new BranchesPageAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBranchesPageWithDefaults instantiates a new BranchesPage object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBranchMetadata instantiates a new BranchMetadata object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBranchMetadataAheadBehind instantiates a new BranchMetadataAheadBehind object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBranchMetadataAheadBehindWithDefaults instantiates a new BranchMetadataAheadBehind object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBranchMetadataBuildStatus instantiates a new BranchMetadataBuildStatus object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBranchMetadataBuildStatusWithDefaults instantiates a new BranchMetadataBuildStatus object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBranchMetadataJiraIssue instantiates a new BranchMetadataJiraIssue object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBranchMetadataJiraIssueWithDefaults instantiates a new BranchMetadataJiraIssue object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBranchMetadataOutgoingPullRequestOneOf instantiates a new BranchMetadataOutgoingPullRequestOneOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBranchMetadataOutgoingPullRequestOneOf1 instantiates a new BranchMetadataOutgoingPullRequestOneOf1 object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBranchMetadataOutgoingPullRequestOneOf1WithDefaults instantiates a new BranchMetadataOutgoingPullRequestOneOf1 object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBranchMetadataOutgoingPullRequestOneOfWithDefaults instantiates a new BranchMetadataOutgoingPullRequestOneOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBranchMetadataWithDefaults instantiates a new BranchMetadata object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBranchWithDefaults instantiates a new Branch object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBuildStatus instantiates a new BuildStatus object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBuildStatusPage instantiates a new BuildStatusPage object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBuildStatusPageAllOf instantiates a new BuildStatusPageAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBuildStatusPageAllOfWithDefaults instantiates a new BuildStatusPageAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBuildStatusPageWithDefaults instantiates a new BuildStatusPage object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBuildStatusWithDefaults instantiates a new BuildStatus object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewChildren instantiates a new Children object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewChildrenAllOf instantiates a new ChildrenAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewChildrenAllOfValues instantiates a new ChildrenAllOfValues object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewChildrenAllOfValuesWithDefaults instantiates a new ChildrenAllOfValues object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewChildrenAllOfWithDefaults instantiates a new ChildrenAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewChildrenWithDefaults instantiates a new Children object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewCommit instantiates a new Commit object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewCommitParents instantiates a new CommitParents object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewCommitParentsWithDefaults instantiates a new CommitParents object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewCommitsPage instantiates a new CommitsPage object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewCommitsPageAllOf instantiates a new CommitsPageAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewCommitsPageAllOfWithDefaults instantiates a new CommitsPageAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewCommitsPageWithDefaults instantiates a new CommitsPage object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewCommitWithDefaults instantiates a new Commit object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewConfiguration returns a new Configuration object.
NewCreateBranch instantiates a new CreateBranch object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewCreateBranchWithDefaults instantiates a new CreateBranch object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewCreateRepository instantiates a new CreateRepository object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewCreateRepositoryWithDefaults instantiates a new CreateRepository object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewDefaultBranch instantiates a new DefaultBranch object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewDefaultBranchWithDefaults instantiates a new DefaultBranch object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewDeleteBranch instantiates a new DeleteBranch object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewDeleteBranchWithDefaults instantiates a new DeleteBranch object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewDirectory instantiates a new Directory object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewDirectoryWithDefaults instantiates a new Directory object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewErrors instantiates a new Errors object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewErrorsErrors instantiates a new ErrorsErrors object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewErrorsErrorsWithDefaults instantiates a new ErrorsErrors object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewErrorsWithDefaults instantiates a new Errors object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewFile instantiates a new File object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewFileLines instantiates a new FileLines object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewFileLinesWithDefaults instantiates a new FileLines object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewFileOrDirectory instantiates a new FileOrDirectory object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewFileOrDirectoryWithDefaults instantiates a new FileOrDirectory object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewFileWithDefaults instantiates a new File object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewLink instantiates a new Link object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewLinkWithDefaults instantiates a new Link object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPage instantiates a new Page object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPageWithDefaults instantiates a new Page object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPath instantiates a new Path object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPathWithDefaults instantiates a new Path object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPostWebhook instantiates a new PostWebhook object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPostWebhookWithDefaults instantiates a new PostWebhook object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewProject instantiates a new Project object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewProjectLinks instantiates a new ProjectLinks object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewProjectLinksWithDefaults instantiates a new ProjectLinks object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewProjectsPage instantiates a new ProjectsPage object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewProjectsPageAllOf instantiates a new ProjectsPageAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewProjectsPageAllOfWithDefaults instantiates a new ProjectsPageAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewProjectsPageWithDefaults instantiates a new ProjectsPage object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewProjectWithDefaults instantiates a new Project object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPullRequest instantiates a new PullRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPullRequestDelete instantiates a new PullRequestDelete object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPullRequestDeleteWithDefaults instantiates a new PullRequestDelete object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPullRequestLinks instantiates a new PullRequestLinks object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPullRequestLinksWithDefaults instantiates a new PullRequestLinks object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPullRequestsPage instantiates a new PullRequestsPage object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPullRequestsPageAllOf instantiates a new PullRequestsPageAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPullRequestsPageAllOfWithDefaults instantiates a new PullRequestsPageAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPullRequestsPageWithDefaults instantiates a new PullRequestsPage object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPullRequestUpdate instantiates a new PullRequestUpdate object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPullRequestUpdateWithDefaults instantiates a new PullRequestUpdate object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPullRequestWithDefaults instantiates a new PullRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewRepositoriesPage instantiates a new RepositoriesPage object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewRepositoriesPageAllOf instantiates a new RepositoriesPageAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewRepositoriesPageAllOfWithDefaults instantiates a new RepositoriesPageAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewRepositoriesPageWithDefaults instantiates a new RepositoriesPage object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewRepository instantiates a new Repository object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewRepositoryLinks instantiates a new RepositoryLinks object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewRepositoryLinksWithDefaults instantiates a new RepositoryLinks object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewRepositoryRef instantiates a new RepositoryRef object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewRepositoryRefRepository instantiates a new RepositoryRefRepository object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewRepositoryRefRepositoryProject instantiates a new RepositoryRefRepositoryProject object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewRepositoryRefRepositoryProjectWithDefaults instantiates a new RepositoryRefRepositoryProject object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewRepositoryRefRepositoryWithDefaults instantiates a new RepositoryRefRepository object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewRepositoryRefWithDefaults instantiates a new RepositoryRef object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewRepositoryWithDefaults instantiates a new Repository object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUser instantiates a new User object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUserRole instantiates a new UserRole object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUserRoleWithDefaults instantiates a new UserRole object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUserWithDefaults instantiates a new User object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewWebhook instantiates a new Webhook object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewWebhookConfiguration instantiates a new WebhookConfiguration object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewWebhookConfigurationWithDefaults instantiates a new WebhookConfiguration object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewWebhooksPage instantiates a new WebhooksPage object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewWebhooksPageAllOf instantiates a new WebhooksPageAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewWebhooksPageAllOfWithDefaults instantiates a new WebhooksPageAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewWebhooksPageWithDefaults instantiates a new WebhooksPage object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewWebhookWithDefaults instantiates a new Webhook object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
PtrBool is a helper routine that returns a pointer to given integer value.
PtrFloat32 is a helper routine that returns a pointer to given float value.
PtrFloat64 is a helper routine that returns a pointer to given float value.
PtrInt is a helper routine that returns a pointer to given integer value.
PtrInt32 is a helper routine that returns a pointer to given integer value.
PtrInt64 is a helper routine that returns a pointer to given integer value.
PtrString is a helper routine that returns a pointer to given string value.
PtrTime is helper routine that returns a pointer to given Time value.

# Constants

nolint:gomnd.
List of pullRequestState.
List of pullRequestState.
List of pullRequestState.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.
List of webhookEvent.

# Variables

ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAPIKeys takes a string apikey as authentication for the request.
ContextBasicAuth takes BasicAuth as authentication for the request.
ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
ContextOperationServerIndices uses a server configuration from the index mapping.
ContextOperationServerVariables overrides a server configuration variables using operation specific values.
ContextServerIndex uses a server configuration from the index.
ContextServerVariables overrides a server configuration variables.

# Structs

APIClient manages communication with the bitbucket-server-api API v7.3.1 In most cases there should be only one, shared, APIClient.
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
APIResponse stores the API response returned by the server.
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
Branch struct for Branch.
BranchesPage struct for BranchesPage.
BranchesPageAllOf struct for BranchesPageAllOf.
BranchMetadata struct for BranchMetadata.
BranchMetadataAheadBehind struct for BranchMetadataAheadBehind.
BranchMetadataBuildStatus struct for BranchMetadataBuildStatus.
BranchMetadataJiraIssue struct for BranchMetadataJiraIssue.
BranchMetadataOutgoingPullRequest struct for BranchMetadataOutgoingPullRequest.
BranchMetadataOutgoingPullRequestOneOf struct for BranchMetadataOutgoingPullRequestOneOf.
BranchMetadataOutgoingPullRequestOneOf1 struct for BranchMetadataOutgoingPullRequestOneOf1.
BuildStatus struct for BuildStatus.
BuildStatusPage struct for BuildStatusPage.
BuildStatusPageAllOf struct for BuildStatusPageAllOf.
Children struct for Children.
ChildrenAllOf struct for ChildrenAllOf.
ChildrenAllOfValues struct for ChildrenAllOfValues.
Commit A commit.
CommitParents struct for CommitParents.
CommitsPage A list of commits.
CommitsPageAllOf struct for CommitsPageAllOf.
Configuration stores the configuration of the API client.
CreateBranch struct for CreateBranch.
CreateRepository struct for CreateRepository.
DefaultBranch struct for DefaultBranch.
DeleteBranch struct for DeleteBranch.
Directory struct for Directory.
Errors struct for Errors.
ErrorsErrors struct for ErrorsErrors.
File struct for File.
FileLines struct for FileLines.
FileOrDirectory struct for FileOrDirectory.
GenericOpenAPIError Provides access to the body, error and model on returned errors.
Link struct for Link.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Page struct for Page.
Path struct for Path.
PostWebhook struct for PostWebhook.
Project struct for Project.
ProjectLinks struct for ProjectLinks.
ProjectsPage A page of projects.
ProjectsPageAllOf struct for ProjectsPageAllOf.
PullRequest struct for PullRequest.
PullRequestDelete struct for PullRequestDelete.
PullRequestLinks struct for PullRequestLinks.
PullRequestsPage struct for PullRequestsPage.
PullRequestsPageAllOf struct for PullRequestsPageAllOf.
PullRequestUpdate struct for PullRequestUpdate.
RepositoriesPage struct for RepositoriesPage.
RepositoriesPageAllOf struct for RepositoriesPageAllOf.
Repository struct for Repository.
RepositoryLinks struct for RepositoryLinks.
RepositoryRef struct for RepositoryRef.
RepositoryRefRepository struct for RepositoryRefRepository.
RepositoryRefRepositoryProject struct for RepositoryRefRepositoryProject.
ServerConfiguration stores the information about a server.
ServerVariable stores the information about a server variable.
User struct for User.
UserRole struct for UserRole.
Webhook struct for Webhook.
WebhookConfiguration struct for WebhookConfiguration.
WebhooksPage A list of webhooks.
WebhooksPageAllOf struct for WebhooksPageAllOf.

# Type aliases

BranchesApiService BranchesApi service.
BuildStatusApiService BuildStatusApi service.
CommitsApiService CommitsApi service.
PostWebhookApiService PostWebhookApi service.
ProjectsApiService ProjectsApi service.
PullRequestsApiService PullRequestsApi service.
PullRequestState the model 'PullRequestState'.
RepositoriesApiService RepositoriesApi service.
ServerConfigurations stores multiple ServerConfiguration items.
WebhookApiService WebhookApi service.
WebhookEvent the model 'WebhookEvent'.