Documentation
¶
Overview ¶
Package v20241221 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- Constants
- func NewCreateTestRequestWithApplicationVndAPIPlusJSONBody(server string, orgId externalRef2.OrgId, params *CreateTestParams, ...) (*http.Request, error)
- func NewCreateTestRequestWithBody(server string, orgId externalRef2.OrgId, params *CreateTestParams, ...) (*http.Request, error)
- func NewGetTestResultRequest(server string, orgId externalRef2.OrgId, testId externalRef2.TestId, ...) (*http.Request, error)
- type Client
- func (c *Client) CreateTestWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, ...) (*http.Response, error)
- func (c *Client) CreateTestWithBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, ...) (*http.Response, error)
- func (c *Client) GetTestResult(ctx context.Context, orgId externalRef2.OrgId, testId externalRef2.TestId, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateTestWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, ...) (*CreateTestResponse, error)
- func (c *ClientWithResponses) CreateTestWithBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, ...) (*CreateTestResponse, error)
- func (c *ClientWithResponses) GetTestResultWithResponse(ctx context.Context, orgId externalRef2.OrgId, testId externalRef2.TestId, ...) (*GetTestResultResponse, error)
- type ClientWithResponsesInterface
- type CreateTestApplicationVndAPIPlusJSONRequestBody
- type CreateTestOption
- type CreateTestParams
- type CreateTestResponse
- type GetTestResultParams
- type GetTestResultResponse
- type HttpRequestDoer
- type RequestEditorFn
Constants ¶
const ApiVersion = "2024-12-21"
const (
BearerAuthScopes = "bearerAuth.Scopes"
)
const DocumentApiVersion = "2024-10-15~experimental"
Variables ¶
This section is empty.
Functions ¶
func NewCreateTestRequestWithApplicationVndAPIPlusJSONBody ¶
func NewCreateTestRequestWithApplicationVndAPIPlusJSONBody(server string, orgId externalRef2.OrgId, params *CreateTestParams, body CreateTestApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)
NewCreateTestRequestWithApplicationVndAPIPlusJSONBody calls the generic CreateTest builder with application/vnd.api+json body
func NewCreateTestRequestWithBody ¶
func NewCreateTestRequestWithBody(server string, orgId externalRef2.OrgId, params *CreateTestParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateTestRequestWithBody generates requests for CreateTest with any type of body
func NewGetTestResultRequest ¶
func NewGetTestResultRequest(server string, orgId externalRef2.OrgId, testId externalRef2.TestId, params *GetTestResultParams) (*http.Request, error)
NewGetTestResultRequest generates requests for GetTestResult
Types ¶
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) CreateTestWithApplicationVndAPIPlusJSONBody ¶
func (c *Client) CreateTestWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, body CreateTestApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateTestWithBody ¶
func (c *Client) CreateTestWithBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetTestResult ¶
func (c *Client) GetTestResult(ctx context.Context, orgId externalRef2.OrgId, testId externalRef2.TestId, params *GetTestResultParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // CreateTestWithBody request with any body CreateTestWithBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateTestWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, body CreateTestApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetTestResult request GetTestResult(ctx context.Context, orgId externalRef2.OrgId, testId externalRef2.TestId, params *GetTestResultParams, 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) CreateTestWithApplicationVndAPIPlusJSONBodyWithResponse ¶
func (c *ClientWithResponses) CreateTestWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, body CreateTestApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestResponse, error)
func (*ClientWithResponses) CreateTestWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateTestWithBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestResponse, error)
CreateTestWithBodyWithResponse request with arbitrary body returning *CreateTestResponse
func (*ClientWithResponses) GetTestResultWithResponse ¶
func (c *ClientWithResponses) GetTestResultWithResponse(ctx context.Context, orgId externalRef2.OrgId, testId externalRef2.TestId, params *GetTestResultParams, reqEditors ...RequestEditorFn) (*GetTestResultResponse, error)
GetTestResultWithResponse request returning *GetTestResultResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // CreateTestWithBodyWithResponse request with any body CreateTestWithBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestResponse, error) CreateTestWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateTestParams, body CreateTestApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestResponse, error) // GetTestResultWithResponse request GetTestResultWithResponse(ctx context.Context, orgId externalRef2.OrgId, testId externalRef2.TestId, params *GetTestResultParams, reqEditors ...RequestEditorFn) (*GetTestResultResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateTestApplicationVndAPIPlusJSONRequestBody ¶
type CreateTestApplicationVndAPIPlusJSONRequestBody = externalRef1.CreateTestRequestBody
CreateTestApplicationVndAPIPlusJSONRequestBody defines body for CreateTest for application/vnd.api+json ContentType.
func NewCreateTestApplicationBody ¶
func NewCreateTestApplicationBody(options ...CreateTestOption) *CreateTestApplicationVndAPIPlusJSONRequestBody
type CreateTestOption ¶
type CreateTestOption func(*CreateTestApplicationVndAPIPlusJSONRequestBody)
func WithInputBundle ¶
func WithInputBundle(id string, localFilePath string, repoUrl *string, limitTestToFiles []string) CreateTestOption
func WithScanType ¶
func WithScanType(t v20241221.Scan) CreateTestOption
type CreateTestParams ¶
type CreateTestParams struct { // Version The requested version of the endpoint to process the request Version externalRef0.Version `form:"version" json:"version"` }
CreateTestParams defines parameters for CreateTest.
type CreateTestResponse ¶
type CreateTestResponse struct { Body []byte HTTPResponse *http.Response ApplicationvndApiJSON201 *externalRef1.TestResponse ApplicationvndApiJSON400 *externalRef0.N400 ApplicationvndApiJSON401 *externalRef0.N401 ApplicationvndApiJSON403 *externalRef0.N403 ApplicationvndApiJSON404 *externalRef0.N404 ApplicationvndApiJSON429 *externalRef0.ErrorDocument ApplicationvndApiJSON500 *externalRef0.N500 }
func ParseCreateTestResponse ¶
func ParseCreateTestResponse(rsp *http.Response) (*CreateTestResponse, error)
ParseCreateTestResponse parses an HTTP response from a CreateTestWithResponse call
func (CreateTestResponse) Status ¶
func (r CreateTestResponse) Status() string
Status returns HTTPResponse.Status
func (CreateTestResponse) StatusCode ¶
func (r CreateTestResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTestResultParams ¶
type GetTestResultParams struct { // Version The requested version of the endpoint to process the request Version externalRef0.Version `form:"version" json:"version"` }
GetTestResultParams defines parameters for GetTestResult.
type GetTestResultResponse ¶
type GetTestResultResponse struct { Body []byte HTTPResponse *http.Response ApplicationvndApiJSON200 *externalRef1.TestResult ApplicationvndApiJSON400 *externalRef0.N400 ApplicationvndApiJSON401 *externalRef0.N401 ApplicationvndApiJSON403 *externalRef0.N403 ApplicationvndApiJSON404 *externalRef0.N404 ApplicationvndApiJSON429 *externalRef0.ErrorDocument ApplicationvndApiJSON500 *externalRef0.N500 }
func ParseGetTestResultResponse ¶
func ParseGetTestResultResponse(rsp *http.Response) (*GetTestResultResponse, error)
ParseGetTestResultResponse parses an HTTP response from a GetTestResultWithResponse call
func (GetTestResultResponse) Status ¶
func (r GetTestResultResponse) Status() string
Status returns HTTPResponse.Status
func (GetTestResultResponse) StatusCode ¶
func (r GetTestResultResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
Directories
¶
Path | Synopsis |
---|---|
Package v20241221 provides primitives to interact with the openapi HTTP API.
|
Package v20241221 provides primitives to interact with the openapi HTTP API. |
Package v20241221 provides primitives to interact with the openapi HTTP API.
|
Package v20241221 provides primitives to interact with the openapi HTTP API. |
Package v20241221 provides primitives to interact with the openapi HTTP API.
|
Package v20241221 provides primitives to interact with the openapi HTTP API. |