Documentation ¶
Index ¶
- type Client
- type ClientService
- type SearchAccountBadRequest
- type SearchAccountNotFound
- type SearchAccountOK
- type SearchAccountParams
- func (o *SearchAccountParams) SetContext(ctx context.Context)
- func (o *SearchAccountParams) SetHTTPClient(client *http.Client)
- func (o *SearchAccountParams) SetPage(page *int32)
- func (o *SearchAccountParams) SetPagelen(pagelen *int32)
- func (o *SearchAccountParams) SetSearchQuery(searchQuery string)
- func (o *SearchAccountParams) SetTimeout(timeout time.Duration)
- func (o *SearchAccountParams) SetWorkspace(workspace string)
- func (o *SearchAccountParams) WithContext(ctx context.Context) *SearchAccountParams
- func (o *SearchAccountParams) WithHTTPClient(client *http.Client) *SearchAccountParams
- func (o *SearchAccountParams) WithPage(page *int32) *SearchAccountParams
- func (o *SearchAccountParams) WithPagelen(pagelen *int32) *SearchAccountParams
- func (o *SearchAccountParams) WithSearchQuery(searchQuery string) *SearchAccountParams
- func (o *SearchAccountParams) WithTimeout(timeout time.Duration) *SearchAccountParams
- func (o *SearchAccountParams) WithWorkspace(workspace string) *SearchAccountParams
- func (o *SearchAccountParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type SearchAccountReader
- type SearchAccountTooManyRequests
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 search API
func (*Client) SearchAccount ¶
func (a *Client) SearchAccount(params *SearchAccountParams) (*SearchAccountOK, error)
SearchAccount searches for code in the repositories of the specified workspace searching across all repositories curl https api bitbucket org 2 0 workspaces workspace slug or uuid search code search query foo size 1 page 1 pagelen 10 query substituted false values type code search result content match count 2 content matches lines line 2 segments line 3 segments text def text foo match true text line 4 segments text print snek line 5 segments path matches text src text foo match true text py file path src foo py type commit file links self href https api bitbucket org 2 0 repositories my workspace demo src ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b src foo py note that searches can match in the file s text content matches the path path matches or both as in the example above you can use the same syntax for the search query as in the UI e g to only search within a specific repository curl https api bitbucket org 2 0 workspaces my workspace search code search query foo repo demo results from the demo repository similar to other a p is you can request more fields using a fields query parameter e g to get some more information about the repository of matched files the 2 b is a URL encoded curl https api bitbucket org 2 0 workspaces my workspace search code search query foo and fields 2 bvalues file commit repository size 1 page 1 pagelen 10 query substituted false values type code search result content match count 1 content matches path matches file commit type commit hash ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b links self href https api bitbucket org 2 0 repositories my workspace demo commit ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b html href https bitbucket org my workspace demo commits ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b repository name demo type repository full name my workspace demo links self href https api bitbucket org 2 0 repositories my workspace demo html href https bitbucket org my workspace demo avatar href https bytebucket org ravatar 7 b850e1749 781a 4115 9316 df39d0600e7a 7 d ts default uuid 850e1749 781a 4115 9316 df39d0600e7a type commit file links self href https api bitbucket org 2 0 repositories my workspace demo src ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b src foo py path src foo py try fields 2 bvalues to get an idea what s possible
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientService ¶
type ClientService interface { SearchAccount(params *SearchAccountParams) (*SearchAccountOK, 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 search API client.
type SearchAccountBadRequest ¶
SearchAccountBadRequest handles this case with default header values.
If the search request was invalid due to one of the following reasons:
* the specified type of target account doesn”t match the actual account type;
* malformed pagination properties;
* missing or malformed search query, in the latter case an error key will be returned in `error.data.key` property.
func NewSearchAccountBadRequest ¶
func NewSearchAccountBadRequest() *SearchAccountBadRequest
NewSearchAccountBadRequest creates a SearchAccountBadRequest with default headers values
func (*SearchAccountBadRequest) Error ¶
func (o *SearchAccountBadRequest) Error() string
func (*SearchAccountBadRequest) GetPayload ¶
func (o *SearchAccountBadRequest) GetPayload() *models.Error
type SearchAccountNotFound ¶
SearchAccountNotFound handles this case with default header values.
Search is not enabled for the requested workspace, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on
func NewSearchAccountNotFound ¶
func NewSearchAccountNotFound() *SearchAccountNotFound
NewSearchAccountNotFound creates a SearchAccountNotFound with default headers values
func (*SearchAccountNotFound) Error ¶
func (o *SearchAccountNotFound) Error() string
func (*SearchAccountNotFound) GetPayload ¶
func (o *SearchAccountNotFound) GetPayload() *models.Error
type SearchAccountOK ¶
type SearchAccountOK struct {
Payload *models.SearchResultPage
}
SearchAccountOK handles this case with default header values.
Successful search
func NewSearchAccountOK ¶
func NewSearchAccountOK() *SearchAccountOK
NewSearchAccountOK creates a SearchAccountOK with default headers values
func (*SearchAccountOK) Error ¶
func (o *SearchAccountOK) Error() string
func (*SearchAccountOK) GetPayload ¶
func (o *SearchAccountOK) GetPayload() *models.SearchResultPage
type SearchAccountParams ¶
type SearchAccountParams struct { /*Page Which page of the search results to retrieve */ Page *int32 /*Pagelen How many search results to retrieve per page */ Pagelen *int32 /*SearchQuery The search query */ SearchQuery string /*Workspace The workspace to search in; either the slug or the UUID in curly braces */ Workspace string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
SearchAccountParams contains all the parameters to send to the API endpoint for the search account operation typically these are written to a http.Request
func NewSearchAccountParams ¶
func NewSearchAccountParams() *SearchAccountParams
NewSearchAccountParams creates a new SearchAccountParams object with the default values initialized.
func NewSearchAccountParamsWithContext ¶
func NewSearchAccountParamsWithContext(ctx context.Context) *SearchAccountParams
NewSearchAccountParamsWithContext creates a new SearchAccountParams object with the default values initialized, and the ability to set a context for a request
func NewSearchAccountParamsWithHTTPClient ¶
func NewSearchAccountParamsWithHTTPClient(client *http.Client) *SearchAccountParams
NewSearchAccountParamsWithHTTPClient creates a new SearchAccountParams object with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewSearchAccountParamsWithTimeout ¶
func NewSearchAccountParamsWithTimeout(timeout time.Duration) *SearchAccountParams
NewSearchAccountParamsWithTimeout creates a new SearchAccountParams object with the default values initialized, and the ability to set a timeout on a request
func (*SearchAccountParams) SetContext ¶
func (o *SearchAccountParams) SetContext(ctx context.Context)
SetContext adds the context to the search account params
func (*SearchAccountParams) SetHTTPClient ¶
func (o *SearchAccountParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the search account params
func (*SearchAccountParams) SetPage ¶
func (o *SearchAccountParams) SetPage(page *int32)
SetPage adds the page to the search account params
func (*SearchAccountParams) SetPagelen ¶
func (o *SearchAccountParams) SetPagelen(pagelen *int32)
SetPagelen adds the pagelen to the search account params
func (*SearchAccountParams) SetSearchQuery ¶
func (o *SearchAccountParams) SetSearchQuery(searchQuery string)
SetSearchQuery adds the searchQuery to the search account params
func (*SearchAccountParams) SetTimeout ¶
func (o *SearchAccountParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the search account params
func (*SearchAccountParams) SetWorkspace ¶
func (o *SearchAccountParams) SetWorkspace(workspace string)
SetWorkspace adds the workspace to the search account params
func (*SearchAccountParams) WithContext ¶
func (o *SearchAccountParams) WithContext(ctx context.Context) *SearchAccountParams
WithContext adds the context to the search account params
func (*SearchAccountParams) WithHTTPClient ¶
func (o *SearchAccountParams) WithHTTPClient(client *http.Client) *SearchAccountParams
WithHTTPClient adds the HTTPClient to the search account params
func (*SearchAccountParams) WithPage ¶
func (o *SearchAccountParams) WithPage(page *int32) *SearchAccountParams
WithPage adds the page to the search account params
func (*SearchAccountParams) WithPagelen ¶
func (o *SearchAccountParams) WithPagelen(pagelen *int32) *SearchAccountParams
WithPagelen adds the pagelen to the search account params
func (*SearchAccountParams) WithSearchQuery ¶
func (o *SearchAccountParams) WithSearchQuery(searchQuery string) *SearchAccountParams
WithSearchQuery adds the searchQuery to the search account params
func (*SearchAccountParams) WithTimeout ¶
func (o *SearchAccountParams) WithTimeout(timeout time.Duration) *SearchAccountParams
WithTimeout adds the timeout to the search account params
func (*SearchAccountParams) WithWorkspace ¶
func (o *SearchAccountParams) WithWorkspace(workspace string) *SearchAccountParams
WithWorkspace adds the workspace to the search account params
func (*SearchAccountParams) WriteToRequest ¶
func (o *SearchAccountParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type SearchAccountReader ¶
type SearchAccountReader struct {
// contains filtered or unexported fields
}
SearchAccountReader is a Reader for the SearchAccount structure.
func (*SearchAccountReader) ReadResponse ¶
func (o *SearchAccountReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type SearchAccountTooManyRequests ¶
SearchAccountTooManyRequests handles this case with default header values.
Too many requests, try again later
func NewSearchAccountTooManyRequests ¶
func NewSearchAccountTooManyRequests() *SearchAccountTooManyRequests
NewSearchAccountTooManyRequests creates a SearchAccountTooManyRequests with default headers values
func (*SearchAccountTooManyRequests) Error ¶
func (o *SearchAccountTooManyRequests) Error() string
func (*SearchAccountTooManyRequests) GetPayload ¶
func (o *SearchAccountTooManyRequests) GetPayload() *models.Error