discover

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 11 Imported by: 1

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

func (*Client) GetHosts

func (a *Client) GetHosts(params *GetHostsParams, opts ...ClientOption) (*GetHostsOK, error)

GetHosts gets details on assets by providing one or more i ds

func (*Client) QueryHosts

func (a *Client) QueryHosts(params *QueryHostsParams, opts ...ClientOption) (*QueryHostsOK, error)

QueryHosts searches for assets in your environment by providing an f q l falcon query language filter and paging details returns a set of asset i ds which match the filter criteria

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 {
	GetHosts(params *GetHostsParams, opts ...ClientOption) (*GetHostsOK, error)

	QueryHosts(params *QueryHostsParams, opts ...ClientOption) (*QueryHostsOK, 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 discover API client.

type GetHostsBadRequest

type GetHostsBadRequest struct {

	/* Trace-ID: submit to support if resolving an issue
	 */
	XCSTRACEID string

	/* Request limit per minute.
	 */
	XRateLimitLimit int64

	/* The number of requests remaining for the sliding one minute window.
	 */
	XRateLimitRemaining int64

	Payload *models.MsaReplyMetaOnly
}
GetHostsBadRequest describes a response with status code 400, with default header values.

Bad Request

func NewGetHostsBadRequest

func NewGetHostsBadRequest() *GetHostsBadRequest

NewGetHostsBadRequest creates a GetHostsBadRequest with default headers values

func (*GetHostsBadRequest) Error

func (o *GetHostsBadRequest) Error() string

func (*GetHostsBadRequest) GetPayload

func (o *GetHostsBadRequest) GetPayload() *models.MsaReplyMetaOnly

type GetHostsDefault

type GetHostsDefault struct {
	Payload *models.DomainDiscoverAPIHostEntitiesResponse
	// contains filtered or unexported fields
}
GetHostsDefault describes a response with status code -1, with default header values.

OK

func NewGetHostsDefault

func NewGetHostsDefault(code int) *GetHostsDefault

NewGetHostsDefault creates a GetHostsDefault with default headers values

func (*GetHostsDefault) Code

func (o *GetHostsDefault) Code() int

Code gets the status code for the get hosts default response

func (*GetHostsDefault) Error

func (o *GetHostsDefault) Error() string

func (*GetHostsDefault) GetPayload

type GetHostsForbidden

type GetHostsForbidden struct {

	/* Trace-ID: submit to support if resolving an issue
	 */
	XCSTRACEID string

	/* Request limit per minute.
	 */
	XRateLimitLimit int64

	/* The number of requests remaining for the sliding one minute window.
	 */
	XRateLimitRemaining int64

	Payload *models.MsaReplyMetaOnly
}
GetHostsForbidden describes a response with status code 403, with default header values.

Forbidden

func NewGetHostsForbidden

func NewGetHostsForbidden() *GetHostsForbidden

NewGetHostsForbidden creates a GetHostsForbidden with default headers values

func (*GetHostsForbidden) Error

func (o *GetHostsForbidden) Error() string

func (*GetHostsForbidden) GetPayload

func (o *GetHostsForbidden) GetPayload() *models.MsaReplyMetaOnly

type GetHostsInternalServerError

type GetHostsInternalServerError struct {

	/* Trace-ID: submit to support if resolving an issue
	 */
	XCSTRACEID string

	/* Request limit per minute.
	 */
	XRateLimitLimit int64

	/* The number of requests remaining for the sliding one minute window.
	 */
	XRateLimitRemaining int64

	Payload *models.MsaReplyMetaOnly
}
GetHostsInternalServerError describes a response with status code 500, with default header values.

Internal Server Error

func NewGetHostsInternalServerError

func NewGetHostsInternalServerError() *GetHostsInternalServerError

NewGetHostsInternalServerError creates a GetHostsInternalServerError with default headers values

func (*GetHostsInternalServerError) Error

func (*GetHostsInternalServerError) GetPayload

type GetHostsOK

type GetHostsOK struct {

	/* Trace-ID: submit to support if resolving an issue
	 */
	XCSTRACEID string

	/* Request limit per minute.
	 */
	XRateLimitLimit int64

	/* The number of requests remaining for the sliding one minute window.
	 */
	XRateLimitRemaining int64

	Payload *models.DomainDiscoverAPIHostEntitiesResponse
}
GetHostsOK describes a response with status code 200, with default header values.

OK

func NewGetHostsOK

func NewGetHostsOK() *GetHostsOK

NewGetHostsOK creates a GetHostsOK with default headers values

func (*GetHostsOK) Error

func (o *GetHostsOK) Error() string

func (*GetHostsOK) GetPayload

type GetHostsParams

type GetHostsParams struct {

	/* Ids.

	   One or more asset IDs (max: 100). Find asset IDs with GET `/discover/queries/hosts/v1`
	*/
	Ids []string

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

GetHostsParams contains all the parameters to send to the API endpoint

for the get hosts operation.

Typically these are written to a http.Request.

func NewGetHostsParams

func NewGetHostsParams() *GetHostsParams

NewGetHostsParams creates a new GetHostsParams 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 NewGetHostsParamsWithContext

func NewGetHostsParamsWithContext(ctx context.Context) *GetHostsParams

NewGetHostsParamsWithContext creates a new GetHostsParams object with the ability to set a context for a request.

func NewGetHostsParamsWithHTTPClient

func NewGetHostsParamsWithHTTPClient(client *http.Client) *GetHostsParams

NewGetHostsParamsWithHTTPClient creates a new GetHostsParams object with the ability to set a custom HTTPClient for a request.

func NewGetHostsParamsWithTimeout

func NewGetHostsParamsWithTimeout(timeout time.Duration) *GetHostsParams

NewGetHostsParamsWithTimeout creates a new GetHostsParams object with the ability to set a timeout on a request.

func (*GetHostsParams) SetContext

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

SetContext adds the context to the get hosts params

func (*GetHostsParams) SetDefaults

func (o *GetHostsParams) SetDefaults()

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

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

func (*GetHostsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get hosts params

func (*GetHostsParams) SetIds

func (o *GetHostsParams) SetIds(ids []string)

SetIds adds the ids to the get hosts params

func (*GetHostsParams) SetTimeout

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

SetTimeout adds the timeout to the get hosts params

func (*GetHostsParams) WithContext

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

WithContext adds the context to the get hosts params

func (*GetHostsParams) WithDefaults

func (o *GetHostsParams) WithDefaults() *GetHostsParams

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

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

func (*GetHostsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get hosts params

func (*GetHostsParams) WithIds

func (o *GetHostsParams) WithIds(ids []string) *GetHostsParams

WithIds adds the ids to the get hosts params

func (*GetHostsParams) WithTimeout

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

WithTimeout adds the timeout to the get hosts params

func (*GetHostsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetHostsReader

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

GetHostsReader is a Reader for the GetHosts structure.

func (*GetHostsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetHostsTooManyRequests

type GetHostsTooManyRequests struct {

	/* Trace-ID: submit to support if resolving an issue
	 */
	XCSTRACEID string

	/* Request limit per minute.
	 */
	XRateLimitLimit int64

	/* The number of requests remaining for the sliding one minute window.
	 */
	XRateLimitRemaining int64

	/* Too many requests, retry after this time (as milliseconds since epoch)
	 */
	XRateLimitRetryAfter int64

	Payload *models.MsaReplyMetaOnly
}
GetHostsTooManyRequests describes a response with status code 429, with default header values.

Too Many Requests

func NewGetHostsTooManyRequests

func NewGetHostsTooManyRequests() *GetHostsTooManyRequests

NewGetHostsTooManyRequests creates a GetHostsTooManyRequests with default headers values

func (*GetHostsTooManyRequests) Error

func (o *GetHostsTooManyRequests) Error() string

func (*GetHostsTooManyRequests) GetPayload

type QueryHostsBadRequest

type QueryHostsBadRequest struct {

	/* Trace-ID: submit to support if resolving an issue
	 */
	XCSTRACEID string

	/* Request limit per minute.
	 */
	XRateLimitLimit int64

	/* The number of requests remaining for the sliding one minute window.
	 */
	XRateLimitRemaining int64

	Payload *models.MsaReplyMetaOnly
}
QueryHostsBadRequest describes a response with status code 400, with default header values.

Bad Request

func NewQueryHostsBadRequest

func NewQueryHostsBadRequest() *QueryHostsBadRequest

NewQueryHostsBadRequest creates a QueryHostsBadRequest with default headers values

func (*QueryHostsBadRequest) Error

func (o *QueryHostsBadRequest) Error() string

func (*QueryHostsBadRequest) GetPayload

func (o *QueryHostsBadRequest) GetPayload() *models.MsaReplyMetaOnly

type QueryHostsDefault

type QueryHostsDefault struct {
	Payload *models.MsaQueryResponse
	// contains filtered or unexported fields
}
QueryHostsDefault describes a response with status code -1, with default header values.

OK

func NewQueryHostsDefault

func NewQueryHostsDefault(code int) *QueryHostsDefault

NewQueryHostsDefault creates a QueryHostsDefault with default headers values

func (*QueryHostsDefault) Code

func (o *QueryHostsDefault) Code() int

Code gets the status code for the query hosts default response

func (*QueryHostsDefault) Error

func (o *QueryHostsDefault) Error() string

func (*QueryHostsDefault) GetPayload

func (o *QueryHostsDefault) GetPayload() *models.MsaQueryResponse

type QueryHostsForbidden

type QueryHostsForbidden struct {

	/* Trace-ID: submit to support if resolving an issue
	 */
	XCSTRACEID string

	/* Request limit per minute.
	 */
	XRateLimitLimit int64

	/* The number of requests remaining for the sliding one minute window.
	 */
	XRateLimitRemaining int64

	Payload *models.MsaReplyMetaOnly
}
QueryHostsForbidden describes a response with status code 403, with default header values.

Forbidden

func NewQueryHostsForbidden

func NewQueryHostsForbidden() *QueryHostsForbidden

NewQueryHostsForbidden creates a QueryHostsForbidden with default headers values

func (*QueryHostsForbidden) Error

func (o *QueryHostsForbidden) Error() string

func (*QueryHostsForbidden) GetPayload

func (o *QueryHostsForbidden) GetPayload() *models.MsaReplyMetaOnly

type QueryHostsInternalServerError

type QueryHostsInternalServerError struct {

	/* Trace-ID: submit to support if resolving an issue
	 */
	XCSTRACEID string

	/* Request limit per minute.
	 */
	XRateLimitLimit int64

	/* The number of requests remaining for the sliding one minute window.
	 */
	XRateLimitRemaining int64

	Payload *models.MsaReplyMetaOnly
}
QueryHostsInternalServerError describes a response with status code 500, with default header values.

Internal Server Error

func NewQueryHostsInternalServerError

func NewQueryHostsInternalServerError() *QueryHostsInternalServerError

NewQueryHostsInternalServerError creates a QueryHostsInternalServerError with default headers values

func (*QueryHostsInternalServerError) Error

func (*QueryHostsInternalServerError) GetPayload

type QueryHostsOK

type QueryHostsOK struct {

	/* Trace-ID: submit to support if resolving an issue
	 */
	XCSTRACEID string

	/* Request limit per minute.
	 */
	XRateLimitLimit int64

	/* The number of requests remaining for the sliding one minute window.
	 */
	XRateLimitRemaining int64

	Payload *models.MsaQueryResponse
}
QueryHostsOK describes a response with status code 200, with default header values.

OK

func NewQueryHostsOK

func NewQueryHostsOK() *QueryHostsOK

NewQueryHostsOK creates a QueryHostsOK with default headers values

func (*QueryHostsOK) Error

func (o *QueryHostsOK) Error() string

func (*QueryHostsOK) GetPayload

func (o *QueryHostsOK) GetPayload() *models.MsaQueryResponse

type QueryHostsParams

type QueryHostsParams struct {

	/* Filter.

	     Filter assets using an FQL query. Common filter options include:

	<ul><li>entity_type:'managed'</li><li>product_type_desc:'Workstation'</li><li>platform_name:'Windows'</li><li>last_seen_timestamp:>'now-7d'</li></ul>
	*/
	Filter *string

	/* Limit.

	   The number of asset IDs to return in this response (min: 1, max: 100, default: 100). Use with the `offset` parameter to manage pagination of results.
	*/
	Limit *int64

	/* Offset.

	   An offset used with the `limit` parameter to manage pagination of results. On your first request, don’t provide an `offset`. On subsequent requests, provide the `offset` from the previous response to continue from that place in the results.
	*/
	Offset *int64

	/* Sort.

	     Sort assets by their properties. A single sort field is allowed. Common sort options include:

	<ul><li>hostname|asc</li><li>product_type_desc|desc</li></ul>
	*/
	Sort *string

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

QueryHostsParams contains all the parameters to send to the API endpoint

for the query hosts operation.

Typically these are written to a http.Request.

func NewQueryHostsParams

func NewQueryHostsParams() *QueryHostsParams

NewQueryHostsParams creates a new QueryHostsParams 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 NewQueryHostsParamsWithContext

func NewQueryHostsParamsWithContext(ctx context.Context) *QueryHostsParams

NewQueryHostsParamsWithContext creates a new QueryHostsParams object with the ability to set a context for a request.

func NewQueryHostsParamsWithHTTPClient

func NewQueryHostsParamsWithHTTPClient(client *http.Client) *QueryHostsParams

NewQueryHostsParamsWithHTTPClient creates a new QueryHostsParams object with the ability to set a custom HTTPClient for a request.

func NewQueryHostsParamsWithTimeout

func NewQueryHostsParamsWithTimeout(timeout time.Duration) *QueryHostsParams

NewQueryHostsParamsWithTimeout creates a new QueryHostsParams object with the ability to set a timeout on a request.

func (*QueryHostsParams) SetContext

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

SetContext adds the context to the query hosts params

func (*QueryHostsParams) SetDefaults

func (o *QueryHostsParams) SetDefaults()

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

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

func (*QueryHostsParams) SetFilter

func (o *QueryHostsParams) SetFilter(filter *string)

SetFilter adds the filter to the query hosts params

func (*QueryHostsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the query hosts params

func (*QueryHostsParams) SetLimit

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

SetLimit adds the limit to the query hosts params

func (*QueryHostsParams) SetOffset

func (o *QueryHostsParams) SetOffset(offset *int64)

SetOffset adds the offset to the query hosts params

func (*QueryHostsParams) SetSort

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

SetSort adds the sort to the query hosts params

func (*QueryHostsParams) SetTimeout

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

SetTimeout adds the timeout to the query hosts params

func (*QueryHostsParams) WithContext

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

WithContext adds the context to the query hosts params

func (*QueryHostsParams) WithDefaults

func (o *QueryHostsParams) WithDefaults() *QueryHostsParams

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

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

func (*QueryHostsParams) WithFilter

func (o *QueryHostsParams) WithFilter(filter *string) *QueryHostsParams

WithFilter adds the filter to the query hosts params

func (*QueryHostsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the query hosts params

func (*QueryHostsParams) WithLimit

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

WithLimit adds the limit to the query hosts params

func (*QueryHostsParams) WithOffset

func (o *QueryHostsParams) WithOffset(offset *int64) *QueryHostsParams

WithOffset adds the offset to the query hosts params

func (*QueryHostsParams) WithSort

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

WithSort adds the sort to the query hosts params

func (*QueryHostsParams) WithTimeout

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

WithTimeout adds the timeout to the query hosts params

func (*QueryHostsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type QueryHostsReader

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

QueryHostsReader is a Reader for the QueryHosts structure.

func (*QueryHostsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type QueryHostsTooManyRequests

type QueryHostsTooManyRequests struct {

	/* Trace-ID: submit to support if resolving an issue
	 */
	XCSTRACEID string

	/* Request limit per minute.
	 */
	XRateLimitLimit int64

	/* The number of requests remaining for the sliding one minute window.
	 */
	XRateLimitRemaining int64

	/* Too many requests, retry after this time (as milliseconds since epoch)
	 */
	XRateLimitRetryAfter int64

	Payload *models.MsaReplyMetaOnly
}
QueryHostsTooManyRequests describes a response with status code 429, with default header values.

Too Many Requests

func NewQueryHostsTooManyRequests

func NewQueryHostsTooManyRequests() *QueryHostsTooManyRequests

NewQueryHostsTooManyRequests creates a QueryHostsTooManyRequests with default headers values

func (*QueryHostsTooManyRequests) Error

func (o *QueryHostsTooManyRequests) Error() string

func (*QueryHostsTooManyRequests) GetPayload

Jump to

Keyboard shortcuts

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