Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT.
Index ¶
- Constants
- func NewGetOrganizationOrganizationIdApplicationsRequest(server string, organizationId string) (*http.Request, error)
- func NewGetScansScanIdRequest(server string, scanId string) (*http.Request, error)
- func NewPostApplicationApplicationIdStartScanRequest(server string, applicationId string, ...) (*http.Request, error)
- func NewPostApplicationApplicationIdStartScanRequestWithBody(server string, applicationId string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostApplicationsApplicationIdUploadIntrospectionRequest(server string, applicationId string, ...) (*http.Request, error)
- func NewPostApplicationsApplicationIdUploadIntrospectionRequestWithBody(server string, applicationId string, contentType string, body io.Reader) (*http.Request, error)
- type Application
- type Client
- func (c *Client) GetOrganizationOrganizationIdApplications(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetScansScanId(ctx context.Context, scanId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostApplicationApplicationIdStartScan(ctx context.Context, applicationId string, ...) (*http.Response, error)
- func (c *Client) PostApplicationApplicationIdStartScanWithBody(ctx context.Context, applicationId string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostApplicationsApplicationIdUploadIntrospection(ctx context.Context, applicationId string, ...) (*http.Response, error)
- func (c *Client) PostApplicationsApplicationIdUploadIntrospectionWithBody(ctx context.Context, applicationId string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetOrganizationOrganizationIdApplicationsWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*GetOrganizationOrganizationIdApplicationsResponse, error)
- func (c *ClientWithResponses) GetScansScanIdWithResponse(ctx context.Context, scanId string, reqEditors ...RequestEditorFn) (*GetScansScanIdResponse, error)
- func (c *ClientWithResponses) PostApplicationApplicationIdStartScanWithBodyWithResponse(ctx context.Context, applicationId string, contentType string, body io.Reader, ...) (*PostApplicationApplicationIdStartScanResponse, error)
- func (c *ClientWithResponses) PostApplicationApplicationIdStartScanWithResponse(ctx context.Context, applicationId string, ...) (*PostApplicationApplicationIdStartScanResponse, error)
- func (c *ClientWithResponses) PostApplicationsApplicationIdUploadIntrospectionWithBodyWithResponse(ctx context.Context, applicationId string, contentType string, body io.Reader, ...) (*PostApplicationsApplicationIdUploadIntrospectionResponse, error)
- func (c *ClientWithResponses) PostApplicationsApplicationIdUploadIntrospectionWithResponse(ctx context.Context, applicationId string, ...) (*PostApplicationsApplicationIdUploadIntrospectionResponse, error)
- type ClientWithResponsesInterface
- type GetOrganizationOrganizationIdApplicationsResponse
- type GetScansScanIdResponse
- type HttpRequestDoer
- type IntrospectionResponse
- type PostApplicationApplicationIdStartScanJSONBody
- type PostApplicationApplicationIdStartScanJSONRequestBody
- type PostApplicationApplicationIdStartScanResponse
- type PostApplicationsApplicationIdUploadIntrospectionJSONBody
- type PostApplicationsApplicationIdUploadIntrospectionJSONRequestBody
- type PostApplicationsApplicationIdUploadIntrospectionResponse
- type RequestEditorFn
- type Scan
Constants ¶
const (
ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewGetOrganizationOrganizationIdApplicationsRequest ¶
func NewGetOrganizationOrganizationIdApplicationsRequest(server string, organizationId string) (*http.Request, error)
NewGetOrganizationOrganizationIdApplicationsRequest generates requests for GetOrganizationOrganizationIdApplications
func NewGetScansScanIdRequest ¶
NewGetScansScanIdRequest generates requests for GetScansScanId
func NewPostApplicationApplicationIdStartScanRequest ¶
func NewPostApplicationApplicationIdStartScanRequest(server string, applicationId string, body PostApplicationApplicationIdStartScanJSONRequestBody) (*http.Request, error)
NewPostApplicationApplicationIdStartScanRequest calls the generic PostApplicationApplicationIdStartScan builder with application/json body
func NewPostApplicationApplicationIdStartScanRequestWithBody ¶
func NewPostApplicationApplicationIdStartScanRequestWithBody(server string, applicationId string, contentType string, body io.Reader) (*http.Request, error)
NewPostApplicationApplicationIdStartScanRequestWithBody generates requests for PostApplicationApplicationIdStartScan with any type of body
func NewPostApplicationsApplicationIdUploadIntrospectionRequest ¶
func NewPostApplicationsApplicationIdUploadIntrospectionRequest(server string, applicationId string, body PostApplicationsApplicationIdUploadIntrospectionJSONRequestBody) (*http.Request, error)
NewPostApplicationsApplicationIdUploadIntrospectionRequest calls the generic PostApplicationsApplicationIdUploadIntrospection builder with application/json body
func NewPostApplicationsApplicationIdUploadIntrospectionRequestWithBody ¶
func NewPostApplicationsApplicationIdUploadIntrospectionRequestWithBody(server string, applicationId string, contentType string, body io.Reader) (*http.Request, error)
NewPostApplicationsApplicationIdUploadIntrospectionRequestWithBody generates requests for PostApplicationsApplicationIdUploadIntrospection with any type of body
Types ¶
type Application ¶
type Application struct {
CreatedAt *string `json:"createdAt,omitempty"`
Cron *string `json:"cron,omitempty"`
HasCI *bool `json:"hasCI,omitempty"`
Id *string `json:"id,omitempty"`
LastSuccessfulScan *Scan `json:"lastSuccessfulScan,omitempty"`
Name *string `json:"name,omitempty"`
Scans *[]Scan `json:"scans,omitempty"`
Url *string `json:"url,omitempty"`
}
Application defines model for Application.
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) GetOrganizationOrganizationIdApplications ¶
func (*Client) GetScansScanId ¶
func (*Client) PostApplicationApplicationIdStartScan ¶
func (c *Client) PostApplicationApplicationIdStartScan(ctx context.Context, applicationId string, body PostApplicationApplicationIdStartScanJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostApplicationApplicationIdStartScanWithBody ¶
func (*Client) PostApplicationsApplicationIdUploadIntrospection ¶
func (c *Client) PostApplicationsApplicationIdUploadIntrospection(ctx context.Context, applicationId string, body PostApplicationsApplicationIdUploadIntrospectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// PostApplicationApplicationIdStartScanWithBody request with any body
PostApplicationApplicationIdStartScanWithBody(ctx context.Context, applicationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostApplicationApplicationIdStartScan(ctx context.Context, applicationId string, body PostApplicationApplicationIdStartScanJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostApplicationsApplicationIdUploadIntrospectionWithBody request with any body
PostApplicationsApplicationIdUploadIntrospectionWithBody(ctx context.Context, applicationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostApplicationsApplicationIdUploadIntrospection(ctx context.Context, applicationId string, body PostApplicationsApplicationIdUploadIntrospectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetOrganizationOrganizationIdApplications request
GetOrganizationOrganizationIdApplications(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetScansScanId request
GetScansScanId(ctx context.Context, scanId string, 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) GetOrganizationOrganizationIdApplicationsWithResponse ¶
func (c *ClientWithResponses) GetOrganizationOrganizationIdApplicationsWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*GetOrganizationOrganizationIdApplicationsResponse, error)
GetOrganizationOrganizationIdApplicationsWithResponse request returning *GetOrganizationOrganizationIdApplicationsResponse
func (*ClientWithResponses) GetScansScanIdWithResponse ¶
func (c *ClientWithResponses) GetScansScanIdWithResponse(ctx context.Context, scanId string, reqEditors ...RequestEditorFn) (*GetScansScanIdResponse, error)
GetScansScanIdWithResponse request returning *GetScansScanIdResponse
func (*ClientWithResponses) PostApplicationApplicationIdStartScanWithBodyWithResponse ¶
func (c *ClientWithResponses) PostApplicationApplicationIdStartScanWithBodyWithResponse(ctx context.Context, applicationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationApplicationIdStartScanResponse, error)
PostApplicationApplicationIdStartScanWithBodyWithResponse request with arbitrary body returning *PostApplicationApplicationIdStartScanResponse
func (*ClientWithResponses) PostApplicationApplicationIdStartScanWithResponse ¶
func (c *ClientWithResponses) PostApplicationApplicationIdStartScanWithResponse(ctx context.Context, applicationId string, body PostApplicationApplicationIdStartScanJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationApplicationIdStartScanResponse, error)
func (*ClientWithResponses) PostApplicationsApplicationIdUploadIntrospectionWithBodyWithResponse ¶
func (c *ClientWithResponses) PostApplicationsApplicationIdUploadIntrospectionWithBodyWithResponse(ctx context.Context, applicationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsApplicationIdUploadIntrospectionResponse, error)
PostApplicationsApplicationIdUploadIntrospectionWithBodyWithResponse request with arbitrary body returning *PostApplicationsApplicationIdUploadIntrospectionResponse
func (*ClientWithResponses) PostApplicationsApplicationIdUploadIntrospectionWithResponse ¶
func (c *ClientWithResponses) PostApplicationsApplicationIdUploadIntrospectionWithResponse(ctx context.Context, applicationId string, body PostApplicationsApplicationIdUploadIntrospectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsApplicationIdUploadIntrospectionResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// PostApplicationApplicationIdStartScanWithBodyWithResponse request with any body
PostApplicationApplicationIdStartScanWithBodyWithResponse(ctx context.Context, applicationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationApplicationIdStartScanResponse, error)
PostApplicationApplicationIdStartScanWithResponse(ctx context.Context, applicationId string, body PostApplicationApplicationIdStartScanJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationApplicationIdStartScanResponse, error)
// PostApplicationsApplicationIdUploadIntrospectionWithBodyWithResponse request with any body
PostApplicationsApplicationIdUploadIntrospectionWithBodyWithResponse(ctx context.Context, applicationId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApplicationsApplicationIdUploadIntrospectionResponse, error)
PostApplicationsApplicationIdUploadIntrospectionWithResponse(ctx context.Context, applicationId string, body PostApplicationsApplicationIdUploadIntrospectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApplicationsApplicationIdUploadIntrospectionResponse, error)
// GetOrganizationOrganizationIdApplicationsWithResponse request
GetOrganizationOrganizationIdApplicationsWithResponse(ctx context.Context, organizationId string, reqEditors ...RequestEditorFn) (*GetOrganizationOrganizationIdApplicationsResponse, error)
// GetScansScanIdWithResponse request
GetScansScanIdWithResponse(ctx context.Context, scanId string, reqEditors ...RequestEditorFn) (*GetScansScanIdResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GetOrganizationOrganizationIdApplicationsResponse ¶
type GetOrganizationOrganizationIdApplicationsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]Application
}
func ParseGetOrganizationOrganizationIdApplicationsResponse ¶
func ParseGetOrganizationOrganizationIdApplicationsResponse(rsp *http.Response) (*GetOrganizationOrganizationIdApplicationsResponse, error)
ParseGetOrganizationOrganizationIdApplicationsResponse parses an HTTP response from a GetOrganizationOrganizationIdApplicationsWithResponse call
func (GetOrganizationOrganizationIdApplicationsResponse) Status ¶
func (r GetOrganizationOrganizationIdApplicationsResponse) Status() string
Status returns HTTPResponse.Status
func (GetOrganizationOrganizationIdApplicationsResponse) StatusCode ¶
func (r GetOrganizationOrganizationIdApplicationsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetScansScanIdResponse ¶
func ParseGetScansScanIdResponse ¶
func ParseGetScansScanIdResponse(rsp *http.Response) (*GetScansScanIdResponse, error)
ParseGetScansScanIdResponse parses an HTTP response from a GetScansScanIdWithResponse call
func (GetScansScanIdResponse) Status ¶
func (r GetScansScanIdResponse) Status() string
Status returns HTTPResponse.Status
func (GetScansScanIdResponse) StatusCode ¶
func (r GetScansScanIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type IntrospectionResponse ¶
type IntrospectionResponse struct {
ApplicationId *string `json:"applicationId,omitempty"`
Id *string `json:"id,omitempty"`
}
IntrospectionResponse defines model for IntrospectionResponse.
type PostApplicationApplicationIdStartScanJSONBody ¶
type PostApplicationApplicationIdStartScanJSONBody struct {
// CommitHash See the commit identification section.
CommitHash *string `json:"commitHash,omitempty"`
// ConfigurationOverride See the configuration override section.
ConfigurationOverride *string `json:"configurationOverride,omitempty"`
// Introspection The stringified JSON introspection. See the introspection update section.
Introspection *string `json:"introspection,omitempty"`
}
PostApplicationApplicationIdStartScanJSONBody defines parameters for PostApplicationApplicationIdStartScan.
type PostApplicationApplicationIdStartScanJSONRequestBody ¶
type PostApplicationApplicationIdStartScanJSONRequestBody PostApplicationApplicationIdStartScanJSONBody
PostApplicationApplicationIdStartScanJSONRequestBody defines body for PostApplicationApplicationIdStartScan for application/json ContentType.
type PostApplicationApplicationIdStartScanResponse ¶
type PostApplicationApplicationIdStartScanResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
}
func ParsePostApplicationApplicationIdStartScanResponse ¶
func ParsePostApplicationApplicationIdStartScanResponse(rsp *http.Response) (*PostApplicationApplicationIdStartScanResponse, error)
ParsePostApplicationApplicationIdStartScanResponse parses an HTTP response from a PostApplicationApplicationIdStartScanWithResponse call
func (PostApplicationApplicationIdStartScanResponse) Status ¶
func (r PostApplicationApplicationIdStartScanResponse) Status() string
Status returns HTTPResponse.Status
func (PostApplicationApplicationIdStartScanResponse) StatusCode ¶
func (r PostApplicationApplicationIdStartScanResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostApplicationsApplicationIdUploadIntrospectionJSONBody ¶
type PostApplicationsApplicationIdUploadIntrospectionJSONBody struct {
// IntrospectionResponse The stringified JSON introspection. See the introspection update section.
IntrospectionResponse string `json:"introspectionResponse"`
}
PostApplicationsApplicationIdUploadIntrospectionJSONBody defines parameters for PostApplicationsApplicationIdUploadIntrospection.
type PostApplicationsApplicationIdUploadIntrospectionJSONRequestBody ¶
type PostApplicationsApplicationIdUploadIntrospectionJSONRequestBody PostApplicationsApplicationIdUploadIntrospectionJSONBody
PostApplicationsApplicationIdUploadIntrospectionJSONRequestBody defines body for PostApplicationsApplicationIdUploadIntrospection for application/json ContentType.
type PostApplicationsApplicationIdUploadIntrospectionResponse ¶
type PostApplicationsApplicationIdUploadIntrospectionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *IntrospectionResponse
}
func ParsePostApplicationsApplicationIdUploadIntrospectionResponse ¶
func ParsePostApplicationsApplicationIdUploadIntrospectionResponse(rsp *http.Response) (*PostApplicationsApplicationIdUploadIntrospectionResponse, error)
ParsePostApplicationsApplicationIdUploadIntrospectionResponse parses an HTTP response from a PostApplicationsApplicationIdUploadIntrospectionWithResponse call
func (PostApplicationsApplicationIdUploadIntrospectionResponse) Status ¶
func (r PostApplicationsApplicationIdUploadIntrospectionResponse) Status() string
Status returns HTTPResponse.Status
func (PostApplicationsApplicationIdUploadIntrospectionResponse) StatusCode ¶
func (r PostApplicationsApplicationIdUploadIntrospectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Scan ¶
type Scan struct {
Alerts *[]map[string]interface{} `json:"alerts,omitempty"`
Application *Application `json:"application,omitempty"`
CommitHash *string `json:"commitHash,omitempty"`
CompletionRatio *float32 `json:"completionRatio,omitempty"`
Configuration *map[string]interface{} `json:"configuration,omitempty"`
CreatedAt *string `json:"createdAt,omitempty"`
Id *string `json:"id,omitempty"`
Score *float32 `json:"score,omitempty"`
Status *string `json:"status,omitempty"`
}
Scan defines model for Scan.