index_service

package
v0.96.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

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 index service API

func (*Client) Search

func (a *Client) Search(params *SearchParams, opts ...ClientOption) (*SearchOK, error)

Search searches returns a list of available boxes based on search parameters

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	Search(params *SearchParams, opts ...ClientOption) (*SearchOK, 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 index service API client.

type SearchDefault

type SearchDefault struct {
	Payload *cloud.GoogleRPCStatus
	// contains filtered or unexported fields
}

SearchDefault describes a response with status code -1, with default header values.

An unexpected error response.

func NewSearchDefault

func NewSearchDefault(code int) *SearchDefault

NewSearchDefault creates a SearchDefault with default headers values

func (*SearchDefault) Code

func (o *SearchDefault) Code() int

Code gets the status code for the search default response

func (*SearchDefault) Error

func (o *SearchDefault) Error() string

func (*SearchDefault) GetPayload

func (o *SearchDefault) GetPayload() *cloud.GoogleRPCStatus

func (*SearchDefault) IsClientError

func (o *SearchDefault) IsClientError() bool

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

func (*SearchDefault) IsCode

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

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

func (*SearchDefault) IsRedirect

func (o *SearchDefault) IsRedirect() bool

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

func (*SearchDefault) IsServerError

func (o *SearchDefault) IsServerError() bool

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

func (*SearchDefault) IsSuccess

func (o *SearchDefault) IsSuccess() bool

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

func (*SearchDefault) String

func (o *SearchDefault) String() string

type SearchOK

type SearchOK struct {
	Payload *models.HashicorpCloudVagrant20220930SearchIndexResponse
}

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

A successful response.

func NewSearchOK

func NewSearchOK() *SearchOK

NewSearchOK creates a SearchOK with default headers values

func (*SearchOK) Code

func (o *SearchOK) Code() int

Code gets the status code for the search o k response

func (*SearchOK) Error

func (o *SearchOK) Error() string

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 {

	/* Architectures.

	   Architecture to filter by, if provided.
	*/
	Architectures []string

	/* PaginationNextPageToken.

	     Specifies a page token to use to retrieve the next page. Set this to the
	`next_page_token` returned by previous list requests to get the next page of
	results. If set, `previous_page_token` must not be set.
	*/
	PaginationNextPageToken *string

	/* PaginationPageSize.

	     The max number of results per page that should be returned. If the number
	of available results is larger than `page_size`, a `next_page_token` is
	returned which can be used to get the next page of results in subsequent
	requests. A value of zero will cause `page_size` to be defaulted.

	     Format: int64
	*/
	PaginationPageSize *int64

	/* PaginationPreviousPageToken.

	     Specifies a page token to use to retrieve the previous page. Set this to
	the `previous_page_token` returned by previous list requests to get the
	previous page of results. If set, `next_page_token` must not be set.
	*/
	PaginationPreviousPageToken *string

	/* Providers.

	   Provider to filter by, if provided.
	*/
	Providers []string

	/* Q.

	   The terms to search by.
	*/
	Q *string

	/* SortOrderBy.

	     Specifies the list of per field ordering that should be used for sorting.
	The order matters as rows are sorted in order by fields and when the field
	matches, the next field is used to tie break the ordering.
	The per field default ordering is ascending.

	The fields should be immutabile, unique, and orderable. If the field is
	not unique, more than one sort fields should be passed.

	Example: oder_by=name,age desc,created_at asc
	In that case, 'name' will get the default 'ascending' order.
	*/
	SortOrderBy []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) SetArchitectures

func (o *SearchParams) SetArchitectures(architectures []string)

SetArchitectures adds the architectures to the search params

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) SetPaginationNextPageToken

func (o *SearchParams) SetPaginationNextPageToken(paginationNextPageToken *string)

SetPaginationNextPageToken adds the paginationNextPageToken to the search params

func (*SearchParams) SetPaginationPageSize

func (o *SearchParams) SetPaginationPageSize(paginationPageSize *int64)

SetPaginationPageSize adds the paginationPageSize to the search params

func (*SearchParams) SetPaginationPreviousPageToken

func (o *SearchParams) SetPaginationPreviousPageToken(paginationPreviousPageToken *string)

SetPaginationPreviousPageToken adds the paginationPreviousPageToken to the search params

func (*SearchParams) SetProviders

func (o *SearchParams) SetProviders(providers []string)

SetProviders adds the providers to the search params

func (*SearchParams) SetQ

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

SetQ adds the q to the search params

func (*SearchParams) SetSortOrderBy

func (o *SearchParams) SetSortOrderBy(sortOrderBy []string)

SetSortOrderBy adds the sortOrderBy to the search params

func (*SearchParams) SetTimeout

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

SetTimeout adds the timeout to the search params

func (*SearchParams) WithArchitectures

func (o *SearchParams) WithArchitectures(architectures []string) *SearchParams

WithArchitectures adds the architectures 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) WithPaginationNextPageToken

func (o *SearchParams) WithPaginationNextPageToken(paginationNextPageToken *string) *SearchParams

WithPaginationNextPageToken adds the paginationNextPageToken to the search params

func (*SearchParams) WithPaginationPageSize

func (o *SearchParams) WithPaginationPageSize(paginationPageSize *int64) *SearchParams

WithPaginationPageSize adds the paginationPageSize to the search params

func (*SearchParams) WithPaginationPreviousPageToken

func (o *SearchParams) WithPaginationPreviousPageToken(paginationPreviousPageToken *string) *SearchParams

WithPaginationPreviousPageToken adds the paginationPreviousPageToken to the search params

func (*SearchParams) WithProviders

func (o *SearchParams) WithProviders(providers []string) *SearchParams

WithProviders adds the providers to the search params

func (*SearchParams) WithQ

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

WithQ adds the q to the search params

func (*SearchParams) WithSortOrderBy

func (o *SearchParams) WithSortOrderBy(sortOrderBy []string) *SearchParams

WithSortOrderBy adds the sortOrderBy 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) 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