search

package
v0.0.0-...-59d2d35 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

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 search API

func (*Client) ListSortOptions

func (a *Client) ListSortOptions(opts ...ClientOption) (*ListSortOptionsOK, error)

ListSortOptions lists search sorting options

func (*Client) ListSortOptionsWithParams

func (a *Client) ListSortOptionsWithParams(params *ListSortOptionsParams, opts ...ClientOption) (*ListSortOptionsOK, error)

func (*Client) Search

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

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

func WithAuthInfo

func WithAuthInfo(authInfo runtime.ClientAuthInfoWriter) ClientOption

WithAuthInfo changes the transport on the client

type ClientService

type ClientService interface {
	ListSortOptions(opts ...ClientOption) (*ListSortOptionsOK, error)
	ListSortOptionsWithParams(params *ListSortOptionsParams, opts ...ClientOption) (*ListSortOptionsOK, error)

	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 search API client.

type ListSortOptionsOK

type ListSortOptionsOK struct {
	Payload *models.ListSortOptionsOKBody
}

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

(empty)

func NewListSortOptionsOK

func NewListSortOptionsOK() *ListSortOptionsOK

NewListSortOptionsOK creates a ListSortOptionsOK with default headers values

func (*ListSortOptionsOK) Code

func (o *ListSortOptionsOK) Code() int

Code gets the status code for the list sort options Ok response

func (*ListSortOptionsOK) Error

func (o *ListSortOptionsOK) Error() string

func (*ListSortOptionsOK) GetPayload

func (*ListSortOptionsOK) IsClientError

func (o *ListSortOptionsOK) IsClientError() bool

IsClientError returns true when this list sort options Ok response has a 4xx status code

func (*ListSortOptionsOK) IsCode

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

IsCode returns true when this list sort options Ok response a status code equal to that given

func (*ListSortOptionsOK) IsRedirect

func (o *ListSortOptionsOK) IsRedirect() bool

IsRedirect returns true when this list sort options Ok response has a 3xx status code

func (*ListSortOptionsOK) IsServerError

func (o *ListSortOptionsOK) IsServerError() bool

IsServerError returns true when this list sort options Ok response has a 5xx status code

func (*ListSortOptionsOK) IsSuccess

func (o *ListSortOptionsOK) IsSuccess() bool

IsSuccess returns true when this list sort options Ok response has a 2xx status code

func (*ListSortOptionsOK) String

func (o *ListSortOptionsOK) String() string

type ListSortOptionsParams

type ListSortOptionsParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

ListSortOptionsParams contains all the parameters to send to the API endpoint

for the list sort options operation.

Typically these are written to a http.Request.

func NewListSortOptionsParams

func NewListSortOptionsParams() *ListSortOptionsParams

NewListSortOptionsParams creates a new ListSortOptionsParams 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 NewListSortOptionsParamsWithContext

func NewListSortOptionsParamsWithContext(ctx context.Context) *ListSortOptionsParams

NewListSortOptionsParamsWithContext creates a new ListSortOptionsParams object with the ability to set a context for a request.

func NewListSortOptionsParamsWithHTTPClient

func NewListSortOptionsParamsWithHTTPClient(client *http.Client) *ListSortOptionsParams

NewListSortOptionsParamsWithHTTPClient creates a new ListSortOptionsParams object with the ability to set a custom HTTPClient for a request.

func NewListSortOptionsParamsWithTimeout

func NewListSortOptionsParamsWithTimeout(timeout time.Duration) *ListSortOptionsParams

NewListSortOptionsParamsWithTimeout creates a new ListSortOptionsParams object with the ability to set a timeout on a request.

func (*ListSortOptionsParams) SetContext

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

SetContext adds the context to the list sort options params

func (*ListSortOptionsParams) SetDefaults

func (o *ListSortOptionsParams) SetDefaults()

SetDefaults hydrates default values in the list sort options params (not the query body).

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

func (*ListSortOptionsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the list sort options params

func (*ListSortOptionsParams) SetTimeout

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

SetTimeout adds the timeout to the list sort options params

func (*ListSortOptionsParams) WithContext

WithContext adds the context to the list sort options params

func (*ListSortOptionsParams) WithDefaults

func (o *ListSortOptionsParams) WithDefaults() *ListSortOptionsParams

WithDefaults hydrates default values in the list sort options params (not the query body).

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

func (*ListSortOptionsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the list sort options params

func (*ListSortOptionsParams) WithTimeout

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

WithTimeout adds the timeout to the list sort options params

func (*ListSortOptionsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ListSortOptionsReader

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

ListSortOptionsReader is a Reader for the ListSortOptions structure.

func (*ListSortOptionsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type ListSortOptionsUnauthorized

type ListSortOptionsUnauthorized struct {
	Payload *models.ErrorResponseBody
}

ListSortOptionsUnauthorized describes a response with status code 401, with default header values.

UnauthorizedError is returned when the request is not authenticated.

func NewListSortOptionsUnauthorized

func NewListSortOptionsUnauthorized() *ListSortOptionsUnauthorized

NewListSortOptionsUnauthorized creates a ListSortOptionsUnauthorized with default headers values

func (*ListSortOptionsUnauthorized) Code

func (o *ListSortOptionsUnauthorized) Code() int

Code gets the status code for the list sort options unauthorized response

func (*ListSortOptionsUnauthorized) Error

func (*ListSortOptionsUnauthorized) GetPayload

func (*ListSortOptionsUnauthorized) IsClientError

func (o *ListSortOptionsUnauthorized) IsClientError() bool

IsClientError returns true when this list sort options unauthorized response has a 4xx status code

func (*ListSortOptionsUnauthorized) IsCode

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

IsCode returns true when this list sort options unauthorized response a status code equal to that given

func (*ListSortOptionsUnauthorized) IsRedirect

func (o *ListSortOptionsUnauthorized) IsRedirect() bool

IsRedirect returns true when this list sort options unauthorized response has a 3xx status code

func (*ListSortOptionsUnauthorized) IsServerError

func (o *ListSortOptionsUnauthorized) IsServerError() bool

IsServerError returns true when this list sort options unauthorized response has a 5xx status code

func (*ListSortOptionsUnauthorized) IsSuccess

func (o *ListSortOptionsUnauthorized) IsSuccess() bool

IsSuccess returns true when this list sort options unauthorized response has a 2xx status code

func (*ListSortOptionsUnauthorized) String

func (o *ListSortOptionsUnauthorized) String() string

type SearchInternalServerError

type SearchInternalServerError struct {
	Payload *models.ErrorResponseBody
}

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

InternalServerError is a general error indicating something went wrong internally.

func NewSearchInternalServerError

func NewSearchInternalServerError() *SearchInternalServerError

NewSearchInternalServerError creates a SearchInternalServerError with default headers values

func (*SearchInternalServerError) Code

func (o *SearchInternalServerError) Code() int

Code gets the status code for the search internal server error response

func (*SearchInternalServerError) Error

func (o *SearchInternalServerError) Error() string

func (*SearchInternalServerError) GetPayload

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.HitList
}

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

(empty)

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 Ok response

func (*SearchOK) Error

func (o *SearchOK) Error() string

func (*SearchOK) GetPayload

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

func (*SearchOK) IsClientError

func (o *SearchOK) IsClientError() bool

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

func (*SearchOK) IsCode

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

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

func (*SearchOK) IsRedirect

func (o *SearchOK) IsRedirect() bool

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

func (*SearchOK) IsServerError

func (o *SearchOK) IsServerError() bool

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

func (*SearchOK) IsSuccess

func (o *SearchOK) IsSuccess() bool

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

func (*SearchOK) String

func (o *SearchOK) String() string

type SearchParams

type SearchParams struct {

	/* DashboardIds.

	     List of dashboard id’s to search for
	This is deprecated: users should use the `dashboardUIDs` query parameter instead
	*/
	DashboardIds []int64

	/* DashboardUIDs.

	   List of dashboard uid’s to search for
	*/
	DashboardUIDs []string

	/* Deleted.

	   Flag indicating if only soft deleted Dashboards should be returned
	*/
	Deleted *bool

	/* FolderIds.

	     List of folder id’s to search in for dashboards
	If it's `0` then it will query for the top level folders
	This is deprecated: users should use the `folderUIDs` query parameter instead
	*/
	FolderIds []int64

	/* FolderUIDs.

	     List of folder UID’s to search in for dashboards
	If it's an empty string then it will query for the top level folders
	*/
	FolderUIDs []string

	/* Limit.

	   Limit the number of returned results (max 5000)

	   Format: int64
	*/
	Limit *int64

	/* Page.

	   Use this parameter to access hits beyond limit. Numbering starts at 1. limit param acts as page size. Only available in Grafana v6.2+.

	   Format: int64
	*/
	Page *int64

	/* Permission.

	   Set to `Edit` to return dashboards/folders that the user can edit

	   Default: "View"
	*/
	Permission *string

	/* Query.

	   Search Query
	*/
	Query *string

	/* Sort.

	   Sort method; for listing all the possible sort methods use the search sorting endpoint.

	   Default: "alpha-asc"
	*/
	Sort *string

	/* Starred.

	   Flag indicating if only starred Dashboards should be returned
	*/
	Starred *bool

	/* Tag.

	   List of tags to search for
	*/
	Tag []string

	/* Type.

	   Type to search for, dash-folder or dash-db
	*/
	Type *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) SetDashboardIds

func (o *SearchParams) SetDashboardIds(dashboardIds []int64)

SetDashboardIds adds the dashboardIds to the search params

func (*SearchParams) SetDashboardUIDs

func (o *SearchParams) SetDashboardUIDs(dashboardUIDs []string)

SetDashboardUIDs adds the dashboardUiDs 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) SetDeleted

func (o *SearchParams) SetDeleted(deleted *bool)

SetDeleted adds the deleted to the search params

func (*SearchParams) SetFolderIds

func (o *SearchParams) SetFolderIds(folderIds []int64)

SetFolderIds adds the folderIds to the search params

func (*SearchParams) SetFolderUIDs

func (o *SearchParams) SetFolderUIDs(folderUIDs []string)

SetFolderUIDs adds the folderUiDs to the search params

func (*SearchParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the search params

func (*SearchParams) SetLimit

func (o *SearchParams) SetLimit(limit *int64)

SetLimit adds the limit to the search params

func (*SearchParams) SetPage

func (o *SearchParams) SetPage(page *int64)

SetPage adds the page to the search params

func (*SearchParams) SetPermission

func (o *SearchParams) SetPermission(permission *string)

SetPermission adds the permission to the search params

func (*SearchParams) SetQuery

func (o *SearchParams) SetQuery(query *string)

SetQuery adds the query to the search params

func (*SearchParams) SetSort

func (o *SearchParams) SetSort(sort *string)

SetSort adds the sort to the search params

func (*SearchParams) SetStarred

func (o *SearchParams) SetStarred(starred *bool)

SetStarred adds the starred to the search params

func (*SearchParams) SetTag

func (o *SearchParams) SetTag(tag []string)

SetTag adds the tag to the search params

func (*SearchParams) SetTimeout

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

SetTimeout adds the timeout to the search params

func (*SearchParams) SetType

func (o *SearchParams) SetType(typeVar *string)

SetType adds the type 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) WithDashboardIds

func (o *SearchParams) WithDashboardIds(dashboardIds []int64) *SearchParams

WithDashboardIds adds the dashboardIds to the search params

func (*SearchParams) WithDashboardUIDs

func (o *SearchParams) WithDashboardUIDs(dashboardUIDs []string) *SearchParams

WithDashboardUIDs adds the dashboardUIDs 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) WithDeleted

func (o *SearchParams) WithDeleted(deleted *bool) *SearchParams

WithDeleted adds the deleted to the search params

func (*SearchParams) WithFolderIds

func (o *SearchParams) WithFolderIds(folderIds []int64) *SearchParams

WithFolderIds adds the folderIds to the search params

func (*SearchParams) WithFolderUIDs

func (o *SearchParams) WithFolderUIDs(folderUIDs []string) *SearchParams

WithFolderUIDs adds the folderUIDs to the search params

func (*SearchParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the search params

func (*SearchParams) WithLimit

func (o *SearchParams) WithLimit(limit *int64) *SearchParams

WithLimit adds the limit to the search params

func (*SearchParams) WithPage

func (o *SearchParams) WithPage(page *int64) *SearchParams

WithPage adds the page to the search params

func (*SearchParams) WithPermission

func (o *SearchParams) WithPermission(permission *string) *SearchParams

WithPermission adds the permission to the search params

func (*SearchParams) WithQuery

func (o *SearchParams) WithQuery(query *string) *SearchParams

WithQuery adds the query to the search params

func (*SearchParams) WithSort

func (o *SearchParams) WithSort(sort *string) *SearchParams

WithSort adds the sort to the search params

func (*SearchParams) WithStarred

func (o *SearchParams) WithStarred(starred *bool) *SearchParams

WithStarred adds the starred to the search params

func (*SearchParams) WithTag

func (o *SearchParams) WithTag(tag []string) *SearchParams

WithTag adds the tag 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) WithType

func (o *SearchParams) WithType(typeVar *string) *SearchParams

WithType adds the typeVar 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.

type SearchUnauthorized

type SearchUnauthorized struct {
	Payload *models.ErrorResponseBody
}

SearchUnauthorized describes a response with status code 401, with default header values.

UnauthorizedError is returned when the request is not authenticated.

func NewSearchUnauthorized

func NewSearchUnauthorized() *SearchUnauthorized

NewSearchUnauthorized creates a SearchUnauthorized with default headers values

func (*SearchUnauthorized) Code

func (o *SearchUnauthorized) Code() int

Code gets the status code for the search unauthorized response

func (*SearchUnauthorized) Error

func (o *SearchUnauthorized) Error() string

func (*SearchUnauthorized) GetPayload

func (o *SearchUnauthorized) GetPayload() *models.ErrorResponseBody

func (*SearchUnauthorized) IsClientError

func (o *SearchUnauthorized) IsClientError() bool

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

func (*SearchUnauthorized) IsCode

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

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

func (*SearchUnauthorized) IsRedirect

func (o *SearchUnauthorized) IsRedirect() bool

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

func (*SearchUnauthorized) IsServerError

func (o *SearchUnauthorized) IsServerError() bool

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

func (*SearchUnauthorized) IsSuccess

func (o *SearchUnauthorized) IsSuccess() bool

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

func (*SearchUnauthorized) String

func (o *SearchUnauthorized) String() string

type SearchUnprocessableEntity

type SearchUnprocessableEntity struct {
	Payload *models.ErrorResponseBody
}

SearchUnprocessableEntity describes a response with status code 422, with default header values.

UnprocessableEntityError

func NewSearchUnprocessableEntity

func NewSearchUnprocessableEntity() *SearchUnprocessableEntity

NewSearchUnprocessableEntity creates a SearchUnprocessableEntity with default headers values

func (*SearchUnprocessableEntity) Code

func (o *SearchUnprocessableEntity) Code() int

Code gets the status code for the search unprocessable entity response

func (*SearchUnprocessableEntity) Error

func (o *SearchUnprocessableEntity) Error() string

func (*SearchUnprocessableEntity) GetPayload

func (*SearchUnprocessableEntity) IsClientError

func (o *SearchUnprocessableEntity) IsClientError() bool

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

func (*SearchUnprocessableEntity) IsCode

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

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

func (*SearchUnprocessableEntity) IsRedirect

func (o *SearchUnprocessableEntity) IsRedirect() bool

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

func (*SearchUnprocessableEntity) IsServerError

func (o *SearchUnprocessableEntity) IsServerError() bool

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

func (*SearchUnprocessableEntity) IsSuccess

func (o *SearchUnprocessableEntity) IsSuccess() bool

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

func (*SearchUnprocessableEntity) String

func (o *SearchUnprocessableEntity) String() string

Jump to

Keyboard shortcuts

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