search

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	/*
	   Search searches for projects and repositories

	   The Search endpoint returns information about the projects and repositories offered at public status or related to the current logged in user. The response includes the project and repository list in a proper display order.*/
	Search(ctx context.Context, params *SearchParams) (*SearchOK, error)
}

API is the interface of the search client

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for search API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry, authInfo runtime.ClientAuthInfoWriter) *Client

New creates a new search API client.

func (*Client) Search

func (a *Client) Search(ctx context.Context, params *SearchParams) (*SearchOK, error)

Search searches for projects and repositories

The Search endpoint returns information about the projects and repositories offered at public status or related to the current logged in user. The response includes the project and repository list in a proper display order.

type SearchInternalServerError

type SearchInternalServerError struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *models.Errors
}

SearchInternalServerError describes a response with status code 500, with default header values.

Internal server error

func NewSearchInternalServerError

func NewSearchInternalServerError() *SearchInternalServerError

NewSearchInternalServerError creates a SearchInternalServerError with default headers values

func (*SearchInternalServerError) Error

func (o *SearchInternalServerError) Error() string

func (*SearchInternalServerError) GetPayload

func (o *SearchInternalServerError) GetPayload() *models.Errors

func (*SearchInternalServerError) IsClientError

func (o *SearchInternalServerError) IsClientError() bool

IsClientError returns true when this search internal server error response has a 4xx status code

func (*SearchInternalServerError) IsCode

func (o *SearchInternalServerError) IsCode(code int) bool

IsCode returns true when this search internal server error response a status code equal to that given

func (*SearchInternalServerError) IsRedirect

func (o *SearchInternalServerError) IsRedirect() bool

IsRedirect returns true when this search internal server error response has a 3xx status code

func (*SearchInternalServerError) IsServerError

func (o *SearchInternalServerError) IsServerError() bool

IsServerError returns true when this search internal server error response has a 5xx status code

func (*SearchInternalServerError) IsSuccess

func (o *SearchInternalServerError) IsSuccess() bool

IsSuccess returns true when this search internal server error response has a 2xx status code

func (*SearchInternalServerError) String

func (o *SearchInternalServerError) String() string

type SearchOK

type SearchOK struct {
	Payload *models.Search
}

SearchOK describes a response with status code 200, with default header values.

An array of search results

func NewSearchOK

func NewSearchOK() *SearchOK

NewSearchOK creates a SearchOK with default headers values

func (*SearchOK) Error

func (o *SearchOK) Error() string

func (*SearchOK) GetPayload

func (o *SearchOK) GetPayload() *models.Search

func (*SearchOK) IsClientError

func (o *SearchOK) IsClientError() bool

IsClientError returns true when this search o k response has a 4xx status code

func (*SearchOK) IsCode

func (o *SearchOK) IsCode(code int) bool

IsCode returns true when this search o k response a status code equal to that given

func (*SearchOK) IsRedirect

func (o *SearchOK) IsRedirect() bool

IsRedirect returns true when this search o k response has a 3xx status code

func (*SearchOK) IsServerError

func (o *SearchOK) IsServerError() bool

IsServerError returns true when this search o k response has a 5xx status code

func (*SearchOK) IsSuccess

func (o *SearchOK) IsSuccess() bool

IsSuccess returns true when this search o k response has a 2xx status code

func (*SearchOK) String

func (o *SearchOK) String() string

type SearchParams

type SearchParams struct {

	/* XRequestID.

	   An unique ID for the request
	*/
	XRequestID *string

	/* Q.

	   Search parameter for project and repository name.
	*/
	Q string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

SearchParams contains all the parameters to send to the API endpoint

for the search operation.

Typically these are written to a http.Request.

func NewSearchParams

func NewSearchParams() *SearchParams

NewSearchParams creates a new SearchParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewSearchParamsWithContext

func NewSearchParamsWithContext(ctx context.Context) *SearchParams

NewSearchParamsWithContext creates a new SearchParams object with the ability to set a context for a request.

func NewSearchParamsWithHTTPClient

func NewSearchParamsWithHTTPClient(client *http.Client) *SearchParams

NewSearchParamsWithHTTPClient creates a new SearchParams object with the ability to set a custom HTTPClient for a request.

func NewSearchParamsWithTimeout

func NewSearchParamsWithTimeout(timeout time.Duration) *SearchParams

NewSearchParamsWithTimeout creates a new SearchParams object with the ability to set a timeout on a request.

func (*SearchParams) SetContext

func (o *SearchParams) SetContext(ctx context.Context)

SetContext adds the context to the search params

func (*SearchParams) SetDefaults

func (o *SearchParams) SetDefaults()

SetDefaults hydrates default values in the search params (not the query body).

All values with no default are reset to their zero value.

func (*SearchParams) SetHTTPClient

func (o *SearchParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the search params

func (*SearchParams) SetQ

func (o *SearchParams) SetQ(q string)

SetQ adds the q to the search params

func (*SearchParams) SetTimeout

func (o *SearchParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the search params

func (*SearchParams) SetXRequestID

func (o *SearchParams) SetXRequestID(xRequestID *string)

SetXRequestID adds the xRequestId to the search params

func (*SearchParams) WithContext

func (o *SearchParams) WithContext(ctx context.Context) *SearchParams

WithContext adds the context to the search params

func (*SearchParams) WithDefaults

func (o *SearchParams) WithDefaults() *SearchParams

WithDefaults hydrates default values in the search params (not the query body).

All values with no default are reset to their zero value.

func (*SearchParams) WithHTTPClient

func (o *SearchParams) WithHTTPClient(client *http.Client) *SearchParams

WithHTTPClient adds the HTTPClient to the search params

func (*SearchParams) WithQ

func (o *SearchParams) WithQ(q string) *SearchParams

WithQ adds the q to the search params

func (*SearchParams) WithTimeout

func (o *SearchParams) WithTimeout(timeout time.Duration) *SearchParams

WithTimeout adds the timeout to the search params

func (*SearchParams) WithXRequestID

func (o *SearchParams) WithXRequestID(xRequestID *string) *SearchParams

WithXRequestID adds the xRequestID to the search params

func (*SearchParams) WriteToRequest

func (o *SearchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type SearchReader

type SearchReader struct {
	// contains filtered or unexported fields
}

SearchReader is a Reader for the Search structure.

func (*SearchReader) ReadResponse

func (o *SearchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL