Documentation ¶
Index ¶
- type Client
- func (a *Client) GetRepositoriesWorkspaceRepoSlugFilehistoryNodePath(params *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams, ...) (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK, error)
- func (a *Client) GetRepositoriesWorkspaceRepoSlugSrc(params *GetRepositoriesWorkspaceRepoSlugSrcParams, ...) (*GetRepositoriesWorkspaceRepoSlugSrcOK, error)
- func (a *Client) GetRepositoriesWorkspaceRepoSlugSrcNodePath(params *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams, ...) (*GetRepositoriesWorkspaceRepoSlugSrcNodePathOK, error)
- func (a *Client) PostRepositoriesWorkspaceRepoSlugSrc(params *PostRepositoriesWorkspaceRepoSlugSrcParams, ...) (*PostRepositoriesWorkspaceRepoSlugSrcCreated, error)
- func (a *Client) SetTransport(transport runtime.ClientTransport)
- type ClientService
- type GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound
- type GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK
- type GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams() *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetContext(ctx context.Context)
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetHTTPClient(client *http.Client)
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetNode(node string)
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetPath(path string)
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetQ(q *string)
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetRenames(renames *string)
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetRepoSlug(repoSlug string)
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetSort(sort *string)
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetTimeout(timeout time.Duration)
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetWorkspace(workspace string)
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithNode(node string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithPath(path string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithQ(q *string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithRenames(renames *string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithRepoSlug(repoSlug string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithSort(sort *string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithWorkspace(workspace string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathReader
- type GetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound
- type GetRepositoriesWorkspaceRepoSlugSrcNodePathOK
- type GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParams() *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetContext(ctx context.Context)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetFormat(format *string)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetHTTPClient(client *http.Client)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetMaxDepth(maxDepth *int64)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetNode(node string)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetPath(path string)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetQ(q *string)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetRepoSlug(repoSlug string)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetSort(sort *string)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetTimeout(timeout time.Duration)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetWorkspace(workspace string)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithFormat(format *string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithMaxDepth(maxDepth *int64) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithNode(node string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithPath(path string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithQ(q *string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithRepoSlug(repoSlug string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithSort(sort *string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithWorkspace(workspace string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetRepositoriesWorkspaceRepoSlugSrcNodePathReader
- type GetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555
- type GetRepositoriesWorkspaceRepoSlugSrcNotFound
- type GetRepositoriesWorkspaceRepoSlugSrcOK
- type GetRepositoriesWorkspaceRepoSlugSrcParams
- func NewGetRepositoriesWorkspaceRepoSlugSrcParams() *GetRepositoriesWorkspaceRepoSlugSrcParams
- func NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugSrcParams
- func NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugSrcParams
- func NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugSrcParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetContext(ctx context.Context)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetFormat(format *string)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetHTTPClient(client *http.Client)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetRepoSlug(repoSlug string)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetTimeout(timeout time.Duration)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetWorkspace(workspace string)
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugSrcParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithFormat(format *string) *GetRepositoriesWorkspaceRepoSlugSrcParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugSrcParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithRepoSlug(repoSlug string) *GetRepositoriesWorkspaceRepoSlugSrcParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugSrcParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithWorkspace(workspace string) *GetRepositoriesWorkspaceRepoSlugSrcParams
- func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetRepositoriesWorkspaceRepoSlugSrcReader
- type PostRepositoriesWorkspaceRepoSlugSrcCreated
- type PostRepositoriesWorkspaceRepoSlugSrcForbidden
- type PostRepositoriesWorkspaceRepoSlugSrcNotFound
- type PostRepositoriesWorkspaceRepoSlugSrcParams
- func NewPostRepositoriesWorkspaceRepoSlugSrcParams() *PostRepositoriesWorkspaceRepoSlugSrcParams
- func NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithContext(ctx context.Context) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithHTTPClient(client *http.Client) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithTimeout(timeout time.Duration) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetAuthor(author *string)
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetBranch(branch *string)
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetContext(ctx context.Context)
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetFiles(files *string)
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetHTTPClient(client *http.Client)
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetMessage(message *string)
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetParents(parents *string)
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetRepoSlug(repoSlug string)
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetTimeout(timeout time.Duration)
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetWorkspace(workspace string)
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithAuthor(author *string) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithBranch(branch *string) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithContext(ctx context.Context) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithFiles(files *string) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithHTTPClient(client *http.Client) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithMessage(message *string) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithParents(parents *string) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithRepoSlug(repoSlug string) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithTimeout(timeout time.Duration) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithWorkspace(workspace string) *PostRepositoriesWorkspaceRepoSlugSrcParams
- func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type PostRepositoriesWorkspaceRepoSlugSrcReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for source API
func (*Client) GetRepositoriesWorkspaceRepoSlugFilehistoryNodePath ¶
func (a *Client) GetRepositoriesWorkspaceRepoSlugFilehistoryNodePath(params *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams, authInfo runtime.ClientAuthInfoWriter) (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK, error)
GetRepositoriesWorkspaceRepoSlugFilehistoryNodePath Returns a paginated list of commits that modified the specified file.
Commits are returned in reverse chronological order. This is roughly equivalent to the following commands:
$ git log --follow --date-order <sha> <path> $ hg log --follow <path>
By default, Bitbucket will follow renames and the path name in the returned entries reflects that. This can be turned off using the `?renames=false` query parameter.
Results are returned in descending chronological order by default, and like most endpoints you can [filter and sort](../../../../../../meta/filtering) the response to only provide exactly the data you want.
For example, if you wanted to find commits made before 2011-05-18 against a file named `README.rst`, but you only wanted the path and date, your query would look like this:
```
$ curl 'https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/filehistory/master/README.rst'\ '?fields=values.next,values.path,values.commit.date&q=commit.date<=2011-05-18'
{ "values": [ { "commit": { "date": "2011-05-17T07:32:09+00:00" }, "path": "README.rst" }, { "commit": { "date": "2011-05-16T06:33:28+00:00" }, "path": "README.txt" }, { "commit": { "date": "2011-05-16T06:15:39+00:00" }, "path": "README.txt" } ] }
```
In the response you can see that the file was renamed to `README.rst` by the commit made on 2011-05-16, and was previously named `README.txt`.
func (*Client) GetRepositoriesWorkspaceRepoSlugSrc ¶
func (a *Client) GetRepositoriesWorkspaceRepoSlugSrc(params *GetRepositoriesWorkspaceRepoSlugSrcParams, authInfo runtime.ClientAuthInfoWriter) (*GetRepositoriesWorkspaceRepoSlugSrcOK, error)
GetRepositoriesWorkspaceRepoSlugSrc This endpoint redirects the client to the directory listing of the
root directory on the main branch.
This is equivalent to directly hitting [/2.0/repositories/{username}/{repo_slug}/src/{node}/{path}](src/%7Bnode%7D/%7Bpath%7D) without having to know the name or SHA1 of the repo's main branch.
To create new commits, [POST to this endpoint](#post)
func (*Client) GetRepositoriesWorkspaceRepoSlugSrcNodePath ¶
func (a *Client) GetRepositoriesWorkspaceRepoSlugSrcNodePath(params *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams, authInfo runtime.ClientAuthInfoWriter) (*GetRepositoriesWorkspaceRepoSlugSrcNodePathOK, error)
GetRepositoriesWorkspaceRepoSlugSrcNodePath This endpoints is used to retrieve the contents of a single file,
or the contents of a directory at a specified revision.
## Raw file contents
When `path` points to a file, this endpoint returns the raw contents. The response's Content-Type is derived from the filename extension (not from the contents). The file contents are not processed and no character encoding/recoding is performed and as a result no character encoding is included as part of the Content-Type.
The `Content-Disposition` header will be "attachment" to prevent browsers from running executable files.
If the file is managed by LFS, then a 301 redirect pointing to Atlassian's media services platform is returned.
The response includes an ETag that is based on the contents of the file and its attributes. This means that an empty `__init__.py` always returns the same ETag, regardless on the directory it lives in, or the commit it is on.
## File meta data
When the request for a file path includes the query parameter `?format=meta`, instead of returning the file's raw contents, Bitbucket instead returns the JSON object describing the file's properties:
```javascript $ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests/__init__.py?format=meta
{ "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py" }, "meta": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta" } }, "path": "tests/__init__.py", "commit": { "type": "commit", "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335" }, "html": { "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335" } } }, "attributes": [], "type": "commit_file", "size": 0 }
```
File objects contain an `attributes` element that contains a list of possible modifiers. Currently defined values are:
- `link` -- indicates that the entry is a symbolic link. The contents of the file represent the path the link points to.
- `executable` -- indicates that the file has the executable bit set.
- `subrepository` -- indicates that the entry points to a submodule or subrepo. The contents of the file is the SHA1 of the repository pointed to.
- `binary` -- indicates whether Bitbucket thinks the file is binary.
This endpoint can provide an alternative to how a HEAD request can be used to check for the existence of a file, or a file's size without incurring the overhead of receiving its full contents.
## Directory listings
When `path` points to a directory instead of a file, the response is a paginated list of directory and file objects in the same order as the underlying SCM system would return them.
For example:
```javascript $ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests
{ "pagelen": 10, "values": [ { "path": "tests/test_project", "type": "commit_directory", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/" }, "meta": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta" } }, "commit": { "type": "commit", "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335" }, "html": { "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335" } } } }, { "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py" }, "meta": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta" } }, "path": "tests/__init__.py", "commit": { "type": "commit", "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335" }, "html": { "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335" } } }, "attributes": [], "type": "commit_file", "size": 0 } ], "page": 1, "size": 2 }
```
When listing the contents of the repo's root directory, the use of a trailing slash at the end of the URL is required.
The response by default is not recursive, meaning that only the direct contents of a path are returned. The response does not recurse down into subdirectories. In order to "walk" the entire directory tree, the client can either parse each response and follow the `self` links of each `commit_directory` object, or can specify a `max_depth` to recurse to.
The max_depth parameter will do a breadth-first search to return the contents of the subdirectories up to the depth specified. Breadth-first search was chosen as it leads to the least amount of file system operations for git. If the `max_depth` parameter is specified to be too large, the call will time out and return a 555.
Each returned object is either a `commit_file`, or a `commit_directory`, both of which contain a `path` element. This path is the absolute path from the root of the repository. Each object also contains a `commit` object which embeds the commit the file is on. Note that this is merely the commit that was used in the URL. It is *not* the commit that last modified the file.
Directory objects have 2 representations. Their `self` link returns the paginated contents of the directory. The `meta` link on the other hand returns the actual `directory` object itself, e.g.:
```javascript
{ "path": "tests/test_project", "type": "commit_directory", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/" }, "meta": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta" } }, "commit": { ... } }
```
## Querying, filtering and sorting
Like most API endpoints, this API supports the Bitbucket querying/filtering syntax and so you could filter a directory listing to only include entries that match certain criteria. For instance, to list all binary files over 1kb use the expression:
`size > 1024 and attributes = "binary"`
which after urlencoding yields the query string:
`?q=size%3E1024+and+attributes%3D%22binary%22`
To change the ordering of the response, use the `?sort` parameter:
`.../src/eefd5ef/?sort=-size`
See [filtering and sorting](../../../../../../meta/filtering) for more details.
func (*Client) PostRepositoriesWorkspaceRepoSlugSrc ¶
func (a *Client) PostRepositoriesWorkspaceRepoSlugSrc(params *PostRepositoriesWorkspaceRepoSlugSrcParams, authInfo runtime.ClientAuthInfoWriter) (*PostRepositoriesWorkspaceRepoSlugSrcCreated, error)
PostRepositoriesWorkspaceRepoSlugSrc This endpoint is used to create new commits in the repository by
uploading files.
To add a new file to a repository:
```
$ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \ -F /repo/path/to/image.png=@image.png
```
This will create a new commit on top of the main branch, inheriting the contents of the main branch, but adding (or overwriting) the `image.png` file to the repository in the `/repo/path/to` directory.
To create a commit that deletes files, use the `files` parameter:
```
$ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \ -F files=/file/to/delete/1.txt \ -F files=/file/to/delete/2.txt
```
You can add/modify/delete multiple files in a request. Rename/move a file by deleting the old path and adding the content at the new path.
This endpoint accepts `multipart/form-data` (as in the examples above), as well as `application/x-www-form-urlencoded`.
## multipart/form-data
A `multipart/form-data` post contains a series of "form fields" that identify both the individual files that are being uploaded, as well as additional, optional meta data.
Files are uploaded in file form fields (those that have a `Content-Disposition` parameter) whose field names point to the remote path in the repository where the file should be stored. Path field names are always interpreted to be absolute from the root of the repository, regardless whether the client uses a leading slash (as the above `curl` example did).
File contents are treated as bytes and are not decoded as text.
The commit message, as well as other non-file meta data for the request, is sent along as normal form field elements. Meta data fields share the same namespace as the file objects. For `multipart/form-data` bodies that should not lead to any ambiguity, as the `Content-Disposition` header will contain the `filename` parameter to distinguish between a file named "message" and the commit message field.
## application/x-www-form-urlencoded
It is also possible to upload new files using a simple `application/x-www-form-urlencoded` POST. This can be convenient when uploading pure text files:
```
$ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src \ --data-urlencode "/path/to/me.txt=Lorem ipsum." \ --data-urlencode "message=Initial commit" \ --data-urlencode "author=Erik van Zijst <erik.van.zijst@gmail.com>"
```
There could be a field name clash if a client were to upload a file named "message", as this filename clashes with the meta data property for the commit message. To avoid this and to upload files whose names clash with the meta data properties, use a leading slash for the files, e.g. `curl --data-urlencode "/message=file contents"`.
When an explicit slash is omitted for a file whose path matches that of a meta data parameter, then it is interpreted as meta data, not as a file.
## Executables and links
While this API aims to facilitate the most common use cases, it is possible to perform some more advanced operations like creating a new symlink in the repository, or creating an executable file.
Files can be supplied with a `x-attributes` value in the `Content-Disposition` header. For example, to upload an executable file, as well as create a symlink from `README.txt` to `README`:
``` --===============1438169132528273974== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-ID: "bin/shutdown.sh" Content-Disposition: attachment; filename="shutdown.sh"; x-attributes:"executable"
#!/bin/sh halt
--===============1438169132528273974== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-ID: "/README.txt" Content-Disposition: attachment; filename="README.txt"; x-attributes:"link"
README --===============1438169132528273974==-- ```
Links are files that contain the target path and have `x-attributes:"link"` set.
When overwriting links with files, or vice versa, the newly uploaded file determines both the new contents, as well as the attributes. That means uploading a file without specifying `x-attributes="link"` will create a regular file, even if the parent commit hosted a symlink at the same path.
The same applies to executables. When modifying an existing executable file, the form-data file element must include `x-attributes="executable"` in order to preserve the executable status of the file.
Note that this API does not support the creation or manipulation of subrepos / submodules.
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientService ¶
type ClientService interface { GetRepositoriesWorkspaceRepoSlugFilehistoryNodePath(params *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams, authInfo runtime.ClientAuthInfoWriter) (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK, error) GetRepositoriesWorkspaceRepoSlugSrc(params *GetRepositoriesWorkspaceRepoSlugSrcParams, authInfo runtime.ClientAuthInfoWriter) (*GetRepositoriesWorkspaceRepoSlugSrcOK, error) GetRepositoriesWorkspaceRepoSlugSrcNodePath(params *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams, authInfo runtime.ClientAuthInfoWriter) (*GetRepositoriesWorkspaceRepoSlugSrcNodePathOK, error) PostRepositoriesWorkspaceRepoSlugSrc(params *PostRepositoriesWorkspaceRepoSlugSrcParams, authInfo runtime.ClientAuthInfoWriter) (*PostRepositoriesWorkspaceRepoSlugSrcCreated, error) SetTransport(transport runtime.ClientTransport) }
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new source API client.
type GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound ¶
GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound handles this case with default header values.
If the repository does not exist.
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound ¶
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound() *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound
NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound creates a GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound with default headers values
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound) Error ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound) Error() string
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound) GetPayload ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathNotFound) GetPayload() *models.Error
type GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK ¶
type GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK struct {
Payload *models.PaginatedFiles
}
GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK handles this case with default header values.
A paginated list of commits that modified the specified file
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK ¶
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK() *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK
NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK creates a GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK with default headers values
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK) Error ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK) Error() string
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK) GetPayload ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathOK) GetPayload() *models.PaginatedFiles
type GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams ¶
type GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams struct { /*Node*/ Node string /*Path*/ Path string /*Q Query string to narrow down the response as per [filtering and sorting](../../../../../../meta/filtering). */ Q *string /*Renames When `true`, Bitbucket will follow the history of the file across renames (this is the default behavior). This can be turned off by specifying `false`. */ Renames *string /*RepoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. */ RepoSlug string /*Sort Name of a response property sort the result by as per [filtering and sorting](../../../../../../meta/filtering#query-sort). */ Sort *string /*Workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. */ Workspace string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams contains all the parameters to send to the API endpoint for the get repositories workspace repo slug filehistory node path operation typically these are written to a http.Request
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams ¶
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams() *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams creates a new GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams object with the default values initialized.
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithContext ¶
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithContext creates a new GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams object with the default values initialized, and the ability to set a context for a request
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithHTTPClient ¶
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithHTTPClient creates a new GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams object with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithTimeout ¶
func NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
NewGetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParamsWithTimeout creates a new GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams object with the default values initialized, and the ability to set a timeout on a request
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetContext ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetContext(ctx context.Context)
SetContext adds the context to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetHTTPClient ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetNode ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetNode(node string)
SetNode adds the node to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetPath ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetPath(path string)
SetPath adds the path to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetQ ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetQ(q *string)
SetQ adds the q to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetRenames ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetRenames(renames *string)
SetRenames adds the renames to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetRepoSlug ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetRepoSlug(repoSlug string)
SetRepoSlug adds the repoSlug to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetSort ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetSort(sort *string)
SetSort adds the sort to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetTimeout ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetWorkspace ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) SetWorkspace(workspace string)
SetWorkspace adds the workspace to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithContext ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
WithContext adds the context to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithHTTPClient ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
WithHTTPClient adds the HTTPClient to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithNode ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithNode(node string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
WithNode adds the node to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithPath ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithPath(path string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
WithPath adds the path to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithQ ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithQ(q *string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
WithQ adds the q to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithRenames ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithRenames(renames *string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
WithRenames adds the renames to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithRepoSlug ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithRepoSlug(repoSlug string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
WithRepoSlug adds the repoSlug to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithSort ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithSort(sort *string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
WithSort adds the sort to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithTimeout ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
WithTimeout adds the timeout to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithWorkspace ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WithWorkspace(workspace string) *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams
WithWorkspace adds the workspace to the get repositories workspace repo slug filehistory node path params
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WriteToRequest ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathReader ¶
type GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathReader struct {
// contains filtered or unexported fields
}
GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathReader is a Reader for the GetRepositoriesWorkspaceRepoSlugFilehistoryNodePath structure.
func (*GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathReader) ReadResponse ¶
func (o *GetRepositoriesWorkspaceRepoSlugFilehistoryNodePathReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type GetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound ¶
GetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound handles this case with default header values.
If the path or commit in the URL does not exist.
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound() *GetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound
NewGetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound creates a GetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound with default headers values
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound) Error ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound) Error() string
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound) GetPayload ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathNotFound) GetPayload() *models.Error
type GetRepositoriesWorkspaceRepoSlugSrcNodePathOK ¶
type GetRepositoriesWorkspaceRepoSlugSrcNodePathOK struct {
Payload *models.PaginatedTreeentries
}
GetRepositoriesWorkspaceRepoSlugSrcNodePathOK handles this case with default header values.
If the path matches a file, then the raw contents of the file are returned. If the `format=meta` query parameter is provided, a json document containing the file's meta data is returned. If the `format=rendered` query parameter is provided, the contents of the file in HTML-formated rendered markup is returned. If the path matches a directory, then a paginated list of file and directory entries is returned (if the `format=meta` query parameter was provided, then the json document containing the directory's meta data is returned.)
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathOK ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathOK() *GetRepositoriesWorkspaceRepoSlugSrcNodePathOK
NewGetRepositoriesWorkspaceRepoSlugSrcNodePathOK creates a GetRepositoriesWorkspaceRepoSlugSrcNodePathOK with default headers values
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathOK) Error ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathOK) Error() string
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathOK) GetPayload ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathOK) GetPayload() *models.PaginatedTreeentries
type GetRepositoriesWorkspaceRepoSlugSrcNodePathParams ¶
type GetRepositoriesWorkspaceRepoSlugSrcNodePathParams struct { /*Format If 'meta' is provided, returns the (json) meta data for the contents of the file. If 'rendered' is provided, returns the contents of a non-binary file in HTML-formatted rendered markup. Since Git and Mercurial do not generally track what text encoding scheme is used, this endpoint attempts to detect the most appropriate character encoding. While usually correct, determining the character encoding can be ambiguous which in exceptional cases can lead to misinterpretation of the characters. As such, the raw element in the response object should not be treated as equivalent to the file's actual contents. */ Format *string /*MaxDepth If provided, returns the contents of the repository and its subdirectories recursively until the specified max_depth of nested directories. When omitted, this defaults to 1. */ MaxDepth *int64 /*Node*/ Node string /*Path*/ Path string /*Q Optional filter expression as per [filtering and sorting](../../../../../../meta/filtering). */ Q *string /*RepoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. */ RepoSlug string /*Sort Optional sorting parameter as per [filtering and sorting](../../../../../../meta/filtering#query-sort). */ Sort *string /*Workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. */ Workspace string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
GetRepositoriesWorkspaceRepoSlugSrcNodePathParams contains all the parameters to send to the API endpoint for the get repositories workspace repo slug src node path operation typically these are written to a http.Request
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParams ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParams() *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParams creates a new GetRepositoriesWorkspaceRepoSlugSrcNodePathParams object with the default values initialized.
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithContext ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithContext creates a new GetRepositoriesWorkspaceRepoSlugSrcNodePathParams object with the default values initialized, and the ability to set a context for a request
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithHTTPClient ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithHTTPClient creates a new GetRepositoriesWorkspaceRepoSlugSrcNodePathParams object with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithTimeout ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
NewGetRepositoriesWorkspaceRepoSlugSrcNodePathParamsWithTimeout creates a new GetRepositoriesWorkspaceRepoSlugSrcNodePathParams object with the default values initialized, and the ability to set a timeout on a request
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetContext ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetContext(ctx context.Context)
SetContext adds the context to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetFormat ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetFormat(format *string)
SetFormat adds the format to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetHTTPClient ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetMaxDepth ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetMaxDepth(maxDepth *int64)
SetMaxDepth adds the maxDepth to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetNode ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetNode(node string)
SetNode adds the node to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetPath ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetPath(path string)
SetPath adds the path to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetQ ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetQ(q *string)
SetQ adds the q to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetRepoSlug ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetRepoSlug(repoSlug string)
SetRepoSlug adds the repoSlug to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetSort ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetSort(sort *string)
SetSort adds the sort to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetTimeout ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetWorkspace ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) SetWorkspace(workspace string)
SetWorkspace adds the workspace to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithContext ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
WithContext adds the context to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithFormat ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithFormat(format *string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
WithFormat adds the format to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithHTTPClient ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
WithHTTPClient adds the HTTPClient to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithMaxDepth ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithMaxDepth(maxDepth *int64) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
WithMaxDepth adds the maxDepth to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithNode ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithNode(node string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
WithNode adds the node to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithPath ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithPath(path string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
WithPath adds the path to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithQ ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithQ(q *string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
WithQ adds the q to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithRepoSlug ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithRepoSlug(repoSlug string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
WithRepoSlug adds the repoSlug to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithSort ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithSort(sort *string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
WithSort adds the sort to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithTimeout ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
WithTimeout adds the timeout to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithWorkspace ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WithWorkspace(workspace string) *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams
WithWorkspace adds the workspace to the get repositories workspace repo slug src node path params
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WriteToRequest ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetRepositoriesWorkspaceRepoSlugSrcNodePathReader ¶
type GetRepositoriesWorkspaceRepoSlugSrcNodePathReader struct {
// contains filtered or unexported fields
}
GetRepositoriesWorkspaceRepoSlugSrcNodePathReader is a Reader for the GetRepositoriesWorkspaceRepoSlugSrcNodePath structure.
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathReader) ReadResponse ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type GetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555 ¶
GetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555 handles this case with default header values.
If the call times out, possibly because the specifiedrecursion depth is too large.
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555 ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555() *GetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555
NewGetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555 creates a GetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555 with default headers values
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555) Error ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555) Error() string
func (*GetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555) GetPayload ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNodePathStatus555) GetPayload() *models.Error
type GetRepositoriesWorkspaceRepoSlugSrcNotFound ¶
GetRepositoriesWorkspaceRepoSlugSrcNotFound handles this case with default header values.
If the path or commit in the URL does not exist.
func NewGetRepositoriesWorkspaceRepoSlugSrcNotFound ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcNotFound() *GetRepositoriesWorkspaceRepoSlugSrcNotFound
NewGetRepositoriesWorkspaceRepoSlugSrcNotFound creates a GetRepositoriesWorkspaceRepoSlugSrcNotFound with default headers values
func (*GetRepositoriesWorkspaceRepoSlugSrcNotFound) Error ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNotFound) Error() string
func (*GetRepositoriesWorkspaceRepoSlugSrcNotFound) GetPayload ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcNotFound) GetPayload() *models.Error
type GetRepositoriesWorkspaceRepoSlugSrcOK ¶
type GetRepositoriesWorkspaceRepoSlugSrcOK struct {
Payload *models.PaginatedTreeentries
}
GetRepositoriesWorkspaceRepoSlugSrcOK handles this case with default header values.
If the path matches a file, then the raw contents of the file are returned (unless the `format=meta` query parameter was provided, in which case a json document containing the file's meta data is returned). If the path matches a directory, then a paginated list of file and directory entries is returned (if the `format=meta` query parameter was provided, then the json document containing the directory's meta data is returned).
func NewGetRepositoriesWorkspaceRepoSlugSrcOK ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcOK() *GetRepositoriesWorkspaceRepoSlugSrcOK
NewGetRepositoriesWorkspaceRepoSlugSrcOK creates a GetRepositoriesWorkspaceRepoSlugSrcOK with default headers values
func (*GetRepositoriesWorkspaceRepoSlugSrcOK) Error ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcOK) Error() string
func (*GetRepositoriesWorkspaceRepoSlugSrcOK) GetPayload ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcOK) GetPayload() *models.PaginatedTreeentries
type GetRepositoriesWorkspaceRepoSlugSrcParams ¶
type GetRepositoriesWorkspaceRepoSlugSrcParams struct { /*Format Instead of returning the file's contents, return the (json) meta data for it. */ Format *string /*RepoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. */ RepoSlug string /*Workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. */ Workspace string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
GetRepositoriesWorkspaceRepoSlugSrcParams contains all the parameters to send to the API endpoint for the get repositories workspace repo slug src operation typically these are written to a http.Request
func NewGetRepositoriesWorkspaceRepoSlugSrcParams ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcParams() *GetRepositoriesWorkspaceRepoSlugSrcParams
NewGetRepositoriesWorkspaceRepoSlugSrcParams creates a new GetRepositoriesWorkspaceRepoSlugSrcParams object with the default values initialized.
func NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithContext ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugSrcParams
NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithContext creates a new GetRepositoriesWorkspaceRepoSlugSrcParams object with the default values initialized, and the ability to set a context for a request
func NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithHTTPClient ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugSrcParams
NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithHTTPClient creates a new GetRepositoriesWorkspaceRepoSlugSrcParams object with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithTimeout ¶
func NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugSrcParams
NewGetRepositoriesWorkspaceRepoSlugSrcParamsWithTimeout creates a new GetRepositoriesWorkspaceRepoSlugSrcParams object with the default values initialized, and the ability to set a timeout on a request
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) SetContext ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetContext(ctx context.Context)
SetContext adds the context to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) SetFormat ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetFormat(format *string)
SetFormat adds the format to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) SetHTTPClient ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) SetRepoSlug ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetRepoSlug(repoSlug string)
SetRepoSlug adds the repoSlug to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) SetTimeout ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) SetWorkspace ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) SetWorkspace(workspace string)
SetWorkspace adds the workspace to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) WithContext ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithContext(ctx context.Context) *GetRepositoriesWorkspaceRepoSlugSrcParams
WithContext adds the context to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) WithFormat ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithFormat(format *string) *GetRepositoriesWorkspaceRepoSlugSrcParams
WithFormat adds the format to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) WithHTTPClient ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithHTTPClient(client *http.Client) *GetRepositoriesWorkspaceRepoSlugSrcParams
WithHTTPClient adds the HTTPClient to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) WithRepoSlug ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithRepoSlug(repoSlug string) *GetRepositoriesWorkspaceRepoSlugSrcParams
WithRepoSlug adds the repoSlug to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) WithTimeout ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithTimeout(timeout time.Duration) *GetRepositoriesWorkspaceRepoSlugSrcParams
WithTimeout adds the timeout to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) WithWorkspace ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WithWorkspace(workspace string) *GetRepositoriesWorkspaceRepoSlugSrcParams
WithWorkspace adds the workspace to the get repositories workspace repo slug src params
func (*GetRepositoriesWorkspaceRepoSlugSrcParams) WriteToRequest ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetRepositoriesWorkspaceRepoSlugSrcReader ¶
type GetRepositoriesWorkspaceRepoSlugSrcReader struct {
// contains filtered or unexported fields
}
GetRepositoriesWorkspaceRepoSlugSrcReader is a Reader for the GetRepositoriesWorkspaceRepoSlugSrc structure.
func (*GetRepositoriesWorkspaceRepoSlugSrcReader) ReadResponse ¶
func (o *GetRepositoriesWorkspaceRepoSlugSrcReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type PostRepositoriesWorkspaceRepoSlugSrcCreated ¶
type PostRepositoriesWorkspaceRepoSlugSrcCreated struct { }
PostRepositoriesWorkspaceRepoSlugSrcCreated handles this case with default header values.
func NewPostRepositoriesWorkspaceRepoSlugSrcCreated ¶
func NewPostRepositoriesWorkspaceRepoSlugSrcCreated() *PostRepositoriesWorkspaceRepoSlugSrcCreated
NewPostRepositoriesWorkspaceRepoSlugSrcCreated creates a PostRepositoriesWorkspaceRepoSlugSrcCreated with default headers values
func (*PostRepositoriesWorkspaceRepoSlugSrcCreated) Error ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcCreated) Error() string
type PostRepositoriesWorkspaceRepoSlugSrcForbidden ¶
PostRepositoriesWorkspaceRepoSlugSrcForbidden handles this case with default header values.
If the authenticated user does not have write or admin access
func NewPostRepositoriesWorkspaceRepoSlugSrcForbidden ¶
func NewPostRepositoriesWorkspaceRepoSlugSrcForbidden() *PostRepositoriesWorkspaceRepoSlugSrcForbidden
NewPostRepositoriesWorkspaceRepoSlugSrcForbidden creates a PostRepositoriesWorkspaceRepoSlugSrcForbidden with default headers values
func (*PostRepositoriesWorkspaceRepoSlugSrcForbidden) Error ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcForbidden) Error() string
func (*PostRepositoriesWorkspaceRepoSlugSrcForbidden) GetPayload ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcForbidden) GetPayload() *models.Error
type PostRepositoriesWorkspaceRepoSlugSrcNotFound ¶
PostRepositoriesWorkspaceRepoSlugSrcNotFound handles this case with default header values.
If the repository does not exist.
func NewPostRepositoriesWorkspaceRepoSlugSrcNotFound ¶
func NewPostRepositoriesWorkspaceRepoSlugSrcNotFound() *PostRepositoriesWorkspaceRepoSlugSrcNotFound
NewPostRepositoriesWorkspaceRepoSlugSrcNotFound creates a PostRepositoriesWorkspaceRepoSlugSrcNotFound with default headers values
func (*PostRepositoriesWorkspaceRepoSlugSrcNotFound) Error ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcNotFound) Error() string
func (*PostRepositoriesWorkspaceRepoSlugSrcNotFound) GetPayload ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcNotFound) GetPayload() *models.Error
type PostRepositoriesWorkspaceRepoSlugSrcParams ¶
type PostRepositoriesWorkspaceRepoSlugSrcParams struct { /*Author The raw string to be used as the new commit's author. This string follows the format `Erik van Zijst <evzijst@atlassian.com>`. When omitted, Bitbucket uses the authenticated user's full/display name and primary email address. Commits cannot be created anonymously. */ Author *string /*Branch The name of the branch that the new commit should be created on. When omitted, the commit will be created on top of the main branch and will become the main branch's new head. When a branch name is provided that already exists in the repo, then the commit will be created on top of that branch. In this case, *if* a parent SHA1 was also provided, then it is asserted that the parent is the branch's tip/HEAD at the time the request is made. When this is not the case, a 409 is returned. This API cannot be used to create new anonymous heads in Mercurial repositories. When a new branch name is specified (that does not already exist in the repo), and no parent SHA1s are provided, then the new commit will inherit from the current main branch's tip/HEAD commit, but not advance the main branch. The new commit will be the new branch. When the request *also* specifies a parent SHA1, then the new commit and branch are created directly on top of the parent commit, regardless of the state of the main branch. When a branch name is not specified, but a parent SHA1 is provided, then Bitbucket asserts that it represents the main branch's current HEAD/tip, or a 409 is returned. When a branch name is not specified and the repo is empty, the new commit will become the repo's root commit and will be on the main branch. When a branch name is specified and the repo is empty, the new commit will become the repo's root commit and also define the repo's main branch going forward. This API cannot be used to create additional root commits in non-empty repos. The branch field cannot be repeated. As a side effect, this API can be used to create a new branch without modifying any files, by specifying a new branch name in this field, together with `parents`, but omitting the `files` fields, while not sending any files. This will create a new commit and branch with the same contents as the first parent. The diff of this commit against its first parent will be empty. */ Branch *string /*Files Optional field that declares the files that the request is manipulating. When adding a new file to a repo, or when overwriting an existing file, the client can just upload the full contents of the file in a normal form field and the use of this `files` meta data field is redundant. However, when the `files` field contains a file path that does not have a corresponding, identically-named form field, then Bitbucket interprets that as the client wanting to replace the named file with the null set and the file is deleted instead. Paths in the repo that are referenced in neither files nor an individual file field, remain unchanged and carry over from the parent to the new commit. This API does not support renaming as an explicit feature. To rename a file, simply delete it and recreate it under the new name in the same commit. */ Files *string /*Message The commit message. When omitted, Bitbucket uses a canned string. */ Message *string /*Parents A comma-separated list of SHA1s of the commits that should be the parents of the newly created commit. When omitted, the new commit will inherit from and become a child of the main branch's tip/HEAD commit. When more than one SHA1 is provided, the first SHA1 identifies the commit from which the content will be inherited. When more than 2 parents are provided on a Mercurial repo, a 400 is returned as Mercurial does not support "octopus merges". */ Parents *string /*RepoSlug This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`. */ RepoSlug string /*Workspace This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`. */ Workspace string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
PostRepositoriesWorkspaceRepoSlugSrcParams contains all the parameters to send to the API endpoint for the post repositories workspace repo slug src operation typically these are written to a http.Request
func NewPostRepositoriesWorkspaceRepoSlugSrcParams ¶
func NewPostRepositoriesWorkspaceRepoSlugSrcParams() *PostRepositoriesWorkspaceRepoSlugSrcParams
NewPostRepositoriesWorkspaceRepoSlugSrcParams creates a new PostRepositoriesWorkspaceRepoSlugSrcParams object with the default values initialized.
func NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithContext ¶
func NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithContext(ctx context.Context) *PostRepositoriesWorkspaceRepoSlugSrcParams
NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithContext creates a new PostRepositoriesWorkspaceRepoSlugSrcParams object with the default values initialized, and the ability to set a context for a request
func NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithHTTPClient ¶
func NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithHTTPClient(client *http.Client) *PostRepositoriesWorkspaceRepoSlugSrcParams
NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithHTTPClient creates a new PostRepositoriesWorkspaceRepoSlugSrcParams object with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithTimeout ¶
func NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithTimeout(timeout time.Duration) *PostRepositoriesWorkspaceRepoSlugSrcParams
NewPostRepositoriesWorkspaceRepoSlugSrcParamsWithTimeout creates a new PostRepositoriesWorkspaceRepoSlugSrcParams object with the default values initialized, and the ability to set a timeout on a request
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) SetAuthor ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetAuthor(author *string)
SetAuthor adds the author to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) SetBranch ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetBranch(branch *string)
SetBranch adds the branch to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) SetContext ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetContext(ctx context.Context)
SetContext adds the context to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) SetFiles ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetFiles(files *string)
SetFiles adds the files to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) SetHTTPClient ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) SetMessage ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetMessage(message *string)
SetMessage adds the message to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) SetParents ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetParents(parents *string)
SetParents adds the parents to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) SetRepoSlug ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetRepoSlug(repoSlug string)
SetRepoSlug adds the repoSlug to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) SetTimeout ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) SetWorkspace ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) SetWorkspace(workspace string)
SetWorkspace adds the workspace to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) WithAuthor ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithAuthor(author *string) *PostRepositoriesWorkspaceRepoSlugSrcParams
WithAuthor adds the author to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) WithBranch ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithBranch(branch *string) *PostRepositoriesWorkspaceRepoSlugSrcParams
WithBranch adds the branch to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) WithContext ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithContext(ctx context.Context) *PostRepositoriesWorkspaceRepoSlugSrcParams
WithContext adds the context to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) WithFiles ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithFiles(files *string) *PostRepositoriesWorkspaceRepoSlugSrcParams
WithFiles adds the files to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) WithHTTPClient ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithHTTPClient(client *http.Client) *PostRepositoriesWorkspaceRepoSlugSrcParams
WithHTTPClient adds the HTTPClient to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) WithMessage ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithMessage(message *string) *PostRepositoriesWorkspaceRepoSlugSrcParams
WithMessage adds the message to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) WithParents ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithParents(parents *string) *PostRepositoriesWorkspaceRepoSlugSrcParams
WithParents adds the parents to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) WithRepoSlug ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithRepoSlug(repoSlug string) *PostRepositoriesWorkspaceRepoSlugSrcParams
WithRepoSlug adds the repoSlug to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) WithTimeout ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithTimeout(timeout time.Duration) *PostRepositoriesWorkspaceRepoSlugSrcParams
WithTimeout adds the timeout to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) WithWorkspace ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WithWorkspace(workspace string) *PostRepositoriesWorkspaceRepoSlugSrcParams
WithWorkspace adds the workspace to the post repositories workspace repo slug src params
func (*PostRepositoriesWorkspaceRepoSlugSrcParams) WriteToRequest ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type PostRepositoriesWorkspaceRepoSlugSrcReader ¶
type PostRepositoriesWorkspaceRepoSlugSrcReader struct {
// contains filtered or unexported fields
}
PostRepositoriesWorkspaceRepoSlugSrcReader is a Reader for the PostRepositoriesWorkspaceRepoSlugSrc structure.
func (*PostRepositoriesWorkspaceRepoSlugSrcReader) ReadResponse ¶
func (o *PostRepositoriesWorkspaceRepoSlugSrcReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
Source Files ¶
- get_repositories_workspace_repo_slug_filehistory_node_path_parameters.go
- get_repositories_workspace_repo_slug_filehistory_node_path_responses.go
- get_repositories_workspace_repo_slug_src_node_path_parameters.go
- get_repositories_workspace_repo_slug_src_node_path_responses.go
- get_repositories_workspace_repo_slug_src_parameters.go
- get_repositories_workspace_repo_slug_src_responses.go
- post_repositories_workspace_repo_slug_src_parameters.go
- post_repositories_workspace_repo_slug_src_responses.go
- source_client.go