Documentation ¶
Overview ¶
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
Index ¶
- func NewAnalyzeDependenciesRequest(server string, params *AnalyzeDependenciesParams) (*http.Request, error)
- func NewHealthCheckRequest(server string) (*http.Request, error)
- func NewRetrieveDependenciesRequest(server string, params *RetrieveDependenciesParams) (*http.Request, error)
- type AnalyzeDependenciesParams
- type AnalyzeDependenciesParamsSort
- type AnalyzeDependenciesResponse
- type BadGateway
- type BadRequest
- type Client
- func (c *Client) AnalyzeDependencies(ctx context.Context, params *AnalyzeDependenciesParams, ...) (*http.Response, error)
- func (c *Client) HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RetrieveDependencies(ctx context.Context, params *RetrieveDependenciesParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) AnalyzeDependenciesWithResponse(ctx context.Context, params *AnalyzeDependenciesParams, ...) (*AnalyzeDependenciesResponse, error)
- func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error)
- func (c *ClientWithResponses) RetrieveDependenciesWithResponse(ctx context.Context, params *RetrieveDependenciesParams, ...) (*RetrieveDependenciesResponse, error)
- type ClientWithResponsesInterface
- type Error
- type HealthCheckResponse
- type HttpRequestDoer
- type InternalServerError
- type PaginationInfo
- type PaginationSpec
- type Purl
- type PurlList
- type RequestEditorFn
- type RetrieveDependenciesParams
- type RetrieveDependenciesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAnalyzeDependenciesRequest ¶
func NewAnalyzeDependenciesRequest(server string, params *AnalyzeDependenciesParams) (*http.Request, error)
NewAnalyzeDependenciesRequest generates requests for AnalyzeDependencies
func NewHealthCheckRequest ¶
NewHealthCheckRequest generates requests for HealthCheck
func NewRetrieveDependenciesRequest ¶
func NewRetrieveDependenciesRequest(server string, params *RetrieveDependenciesParams) (*http.Request, error)
NewRetrieveDependenciesRequest generates requests for RetrieveDependencies
Types ¶
type AnalyzeDependenciesParams ¶
type AnalyzeDependenciesParams struct { // PaginationSpec The pagination configuration for the query. // * 'PageSize' specifies the number of results returned // * 'Cursor' is returned by previous calls and specifies what page to return PaginationSpec *PaginationSpec `form:"PaginationSpec,omitempty" json:"PaginationSpec,omitempty"` // Sort The sort order of the packages // * 'frequency' - The packages with the highest number of dependents // * 'scorecard' - The packages with the lowest OpenSSF scorecard score Sort AnalyzeDependenciesParamsSort `form:"sort" json:"sort"` }
AnalyzeDependenciesParams defines parameters for AnalyzeDependencies.
type AnalyzeDependenciesParamsSort ¶
type AnalyzeDependenciesParamsSort string
AnalyzeDependenciesParamsSort defines parameters for AnalyzeDependencies.
const ( Frequency AnalyzeDependenciesParamsSort = "frequency" Scorecard AnalyzeDependenciesParamsSort = "scorecard" )
Defines values for AnalyzeDependenciesParamsSort.
type AnalyzeDependenciesResponse ¶
type AnalyzeDependenciesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PurlList JSON400 *BadRequest JSON500 *InternalServerError JSON502 *BadGateway }
func ParseAnalyzeDependenciesResponse ¶
func ParseAnalyzeDependenciesResponse(rsp *http.Response) (*AnalyzeDependenciesResponse, error)
ParseAnalyzeDependenciesResponse parses an HTTP response from a AnalyzeDependenciesWithResponse call
func (AnalyzeDependenciesResponse) Status ¶
func (r AnalyzeDependenciesResponse) Status() string
Status returns HTTPResponse.Status
func (AnalyzeDependenciesResponse) StatusCode ¶
func (r AnalyzeDependenciesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) AnalyzeDependencies ¶
func (c *Client) AnalyzeDependencies(ctx context.Context, params *AnalyzeDependenciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) HealthCheck ¶
func (*Client) RetrieveDependencies ¶
func (c *Client) RetrieveDependencies(ctx context.Context, params *RetrieveDependenciesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // AnalyzeDependencies request AnalyzeDependencies(ctx context.Context, params *AnalyzeDependenciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) // HealthCheck request HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // RetrieveDependencies request RetrieveDependencies(ctx context.Context, params *RetrieveDependenciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) AnalyzeDependenciesWithResponse ¶
func (c *ClientWithResponses) AnalyzeDependenciesWithResponse(ctx context.Context, params *AnalyzeDependenciesParams, reqEditors ...RequestEditorFn) (*AnalyzeDependenciesResponse, error)
AnalyzeDependenciesWithResponse request returning *AnalyzeDependenciesResponse
func (*ClientWithResponses) HealthCheckWithResponse ¶
func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error)
HealthCheckWithResponse request returning *HealthCheckResponse
func (*ClientWithResponses) RetrieveDependenciesWithResponse ¶
func (c *ClientWithResponses) RetrieveDependenciesWithResponse(ctx context.Context, params *RetrieveDependenciesParams, reqEditors ...RequestEditorFn) (*RetrieveDependenciesResponse, error)
RetrieveDependenciesWithResponse request returning *RetrieveDependenciesResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // AnalyzeDependenciesWithResponse request AnalyzeDependenciesWithResponse(ctx context.Context, params *AnalyzeDependenciesParams, reqEditors ...RequestEditorFn) (*AnalyzeDependenciesResponse, error) // HealthCheckWithResponse request HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) // RetrieveDependenciesWithResponse request RetrieveDependenciesWithResponse(ctx context.Context, params *RetrieveDependenciesParams, reqEditors ...RequestEditorFn) (*RetrieveDependenciesResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type HealthCheckResponse ¶
func ParseHealthCheckResponse ¶
func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error)
ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call
func (HealthCheckResponse) Status ¶
func (r HealthCheckResponse) Status() string
Status returns HTTPResponse.Status
func (HealthCheckResponse) StatusCode ¶
func (r HealthCheckResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InternalServerError ¶
type InternalServerError = Error
InternalServerError defines model for InternalServerError.
type PaginationInfo ¶ added in v0.5.1
type PaginationInfo struct { NextCursor *string `json:"NextCursor,omitempty"` TotalCount *int `json:"TotalCount,omitempty"` }
PaginationInfo Contains the cursor to retrieve more pages. If there are no more, NextCursor will be nil.
type PaginationSpec ¶ added in v0.5.1
type PaginationSpec struct { Cursor *string `json:"Cursor,omitempty"` PageSize *int `json:"PageSize,omitempty"` }
PaginationSpec defines model for PaginationSpec.
type PurlList ¶
type PurlList struct { // PaginationInfo Contains the cursor to retrieve more pages. If there are no more, NextCursor will be nil. PaginationInfo PaginationInfo `json:"PaginationInfo"` PurlList []Purl `json:"PurlList"` }
PurlList defines model for PurlList.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RetrieveDependenciesParams ¶
type RetrieveDependenciesParams struct { // PaginationSpec The pagination configuration for the query. // * 'PageSize' specifies the number of results returned // * 'Cursor' is returned by previous calls and specifies what page to return PaginationSpec *PaginationSpec `form:"PaginationSpec,omitempty" json:"PaginationSpec,omitempty"` // Purl the purl of the dependent package Purl string `form:"purl" json:"purl"` }
RetrieveDependenciesParams defines parameters for RetrieveDependencies.
type RetrieveDependenciesResponse ¶
type RetrieveDependenciesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PurlList JSON400 *BadRequest JSON500 *InternalServerError JSON502 *BadGateway }
func ParseRetrieveDependenciesResponse ¶
func ParseRetrieveDependenciesResponse(rsp *http.Response) (*RetrieveDependenciesResponse, error)
ParseRetrieveDependenciesResponse parses an HTTP response from a RetrieveDependenciesWithResponse call
func (RetrieveDependenciesResponse) Status ¶
func (r RetrieveDependenciesResponse) Status() string
Status returns HTTPResponse.Status
func (RetrieveDependenciesResponse) StatusCode ¶
func (r RetrieveDependenciesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode