scan

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: MIT Imports: 10 Imported by: 0

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

func (*Client) GetReportLog

func (a *Client) GetReportLog(params *GetReportLogParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetReportLogOK, error)

GetReportLog gets the log of the scan report

Get the log of the scan report

func (*Client) ScanArtifact

func (a *Client) ScanArtifact(params *ScanArtifactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ScanArtifactAccepted, error)

ScanArtifact scans the artifact

Scan the specified artifact

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 {
	GetReportLog(params *GetReportLogParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetReportLogOK, error)

	ScanArtifact(params *ScanArtifactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ScanArtifactAccepted, 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 scan API client.

type GetReportLogForbidden

type GetReportLogForbidden struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
GetReportLogForbidden describes a response with status code 403, with default header values.

Forbidden

func NewGetReportLogForbidden

func NewGetReportLogForbidden() *GetReportLogForbidden

NewGetReportLogForbidden creates a GetReportLogForbidden with default headers values

func (*GetReportLogForbidden) Error

func (o *GetReportLogForbidden) Error() string

func (*GetReportLogForbidden) GetPayload

func (o *GetReportLogForbidden) GetPayload() *model.Errors

type GetReportLogInternalServerError

type GetReportLogInternalServerError struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
GetReportLogInternalServerError describes a response with status code 500, with default header values.

Internal server error

func NewGetReportLogInternalServerError

func NewGetReportLogInternalServerError() *GetReportLogInternalServerError

NewGetReportLogInternalServerError creates a GetReportLogInternalServerError with default headers values

func (*GetReportLogInternalServerError) Error

func (*GetReportLogInternalServerError) GetPayload

func (o *GetReportLogInternalServerError) GetPayload() *model.Errors

type GetReportLogNotFound

type GetReportLogNotFound struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
GetReportLogNotFound describes a response with status code 404, with default header values.

Not found

func NewGetReportLogNotFound

func NewGetReportLogNotFound() *GetReportLogNotFound

NewGetReportLogNotFound creates a GetReportLogNotFound with default headers values

func (*GetReportLogNotFound) Error

func (o *GetReportLogNotFound) Error() string

func (*GetReportLogNotFound) GetPayload

func (o *GetReportLogNotFound) GetPayload() *model.Errors

type GetReportLogOK

type GetReportLogOK struct {
	Payload string
}
GetReportLogOK describes a response with status code 200, with default header values.

Successfully get scan log file

func NewGetReportLogOK

func NewGetReportLogOK() *GetReportLogOK

NewGetReportLogOK creates a GetReportLogOK with default headers values

func (*GetReportLogOK) Error

func (o *GetReportLogOK) Error() string

func (*GetReportLogOK) GetPayload

func (o *GetReportLogOK) GetPayload() string

type GetReportLogParams

type GetReportLogParams struct {

	/* XRequestID.

	   An unique ID for the request
	*/
	XRequestID *string

	/* ProjectName.

	   The name of the project
	*/
	ProjectName string

	/* Reference.

	   The reference of the artifact, can be digest or tag
	*/
	Reference string

	/* ReportID.

	   The report id to get the log
	*/
	ReportID string

	/* RepositoryName.

	   The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
	*/
	RepositoryName string

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

GetReportLogParams contains all the parameters to send to the API endpoint

for the get report log operation.

Typically these are written to a http.Request.

func NewGetReportLogParams

func NewGetReportLogParams() *GetReportLogParams

NewGetReportLogParams creates a new GetReportLogParams 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 NewGetReportLogParamsWithContext

func NewGetReportLogParamsWithContext(ctx context.Context) *GetReportLogParams

NewGetReportLogParamsWithContext creates a new GetReportLogParams object with the ability to set a context for a request.

func NewGetReportLogParamsWithHTTPClient

func NewGetReportLogParamsWithHTTPClient(client *http.Client) *GetReportLogParams

NewGetReportLogParamsWithHTTPClient creates a new GetReportLogParams object with the ability to set a custom HTTPClient for a request.

func NewGetReportLogParamsWithTimeout

func NewGetReportLogParamsWithTimeout(timeout time.Duration) *GetReportLogParams

NewGetReportLogParamsWithTimeout creates a new GetReportLogParams object with the ability to set a timeout on a request.

func (*GetReportLogParams) SetContext

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

SetContext adds the context to the get report log params

func (*GetReportLogParams) SetDefaults

func (o *GetReportLogParams) SetDefaults()

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

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

func (*GetReportLogParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get report log params

func (*GetReportLogParams) SetProjectName

func (o *GetReportLogParams) SetProjectName(projectName string)

SetProjectName adds the projectName to the get report log params

func (*GetReportLogParams) SetReference

func (o *GetReportLogParams) SetReference(reference string)

SetReference adds the reference to the get report log params

func (*GetReportLogParams) SetReportID

func (o *GetReportLogParams) SetReportID(reportID string)

SetReportID adds the reportId to the get report log params

func (*GetReportLogParams) SetRepositoryName

func (o *GetReportLogParams) SetRepositoryName(repositoryName string)

SetRepositoryName adds the repositoryName to the get report log params

func (*GetReportLogParams) SetTimeout

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

SetTimeout adds the timeout to the get report log params

func (*GetReportLogParams) SetXRequestID

func (o *GetReportLogParams) SetXRequestID(xRequestID *string)

SetXRequestID adds the xRequestId to the get report log params

func (*GetReportLogParams) WithContext

WithContext adds the context to the get report log params

func (*GetReportLogParams) WithDefaults

func (o *GetReportLogParams) WithDefaults() *GetReportLogParams

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

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

func (*GetReportLogParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get report log params

func (*GetReportLogParams) WithProjectName

func (o *GetReportLogParams) WithProjectName(projectName string) *GetReportLogParams

WithProjectName adds the projectName to the get report log params

func (*GetReportLogParams) WithReference

func (o *GetReportLogParams) WithReference(reference string) *GetReportLogParams

WithReference adds the reference to the get report log params

func (*GetReportLogParams) WithReportID

func (o *GetReportLogParams) WithReportID(reportID string) *GetReportLogParams

WithReportID adds the reportID to the get report log params

func (*GetReportLogParams) WithRepositoryName

func (o *GetReportLogParams) WithRepositoryName(repositoryName string) *GetReportLogParams

WithRepositoryName adds the repositoryName to the get report log params

func (*GetReportLogParams) WithTimeout

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

WithTimeout adds the timeout to the get report log params

func (*GetReportLogParams) WithXRequestID

func (o *GetReportLogParams) WithXRequestID(xRequestID *string) *GetReportLogParams

WithXRequestID adds the xRequestID to the get report log params

func (*GetReportLogParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetReportLogReader

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

GetReportLogReader is a Reader for the GetReportLog structure.

func (*GetReportLogReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetReportLogUnauthorized

type GetReportLogUnauthorized struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
GetReportLogUnauthorized describes a response with status code 401, with default header values.

Unauthorized

func NewGetReportLogUnauthorized

func NewGetReportLogUnauthorized() *GetReportLogUnauthorized

NewGetReportLogUnauthorized creates a GetReportLogUnauthorized with default headers values

func (*GetReportLogUnauthorized) Error

func (o *GetReportLogUnauthorized) Error() string

func (*GetReportLogUnauthorized) GetPayload

func (o *GetReportLogUnauthorized) GetPayload() *model.Errors

type ScanArtifactAccepted

type ScanArtifactAccepted struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string
}
ScanArtifactAccepted describes a response with status code 202, with default header values.

Accepted

func NewScanArtifactAccepted

func NewScanArtifactAccepted() *ScanArtifactAccepted

NewScanArtifactAccepted creates a ScanArtifactAccepted with default headers values

func (*ScanArtifactAccepted) Error

func (o *ScanArtifactAccepted) Error() string

type ScanArtifactBadRequest

type ScanArtifactBadRequest struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
ScanArtifactBadRequest describes a response with status code 400, with default header values.

Bad request

func NewScanArtifactBadRequest

func NewScanArtifactBadRequest() *ScanArtifactBadRequest

NewScanArtifactBadRequest creates a ScanArtifactBadRequest with default headers values

func (*ScanArtifactBadRequest) Error

func (o *ScanArtifactBadRequest) Error() string

func (*ScanArtifactBadRequest) GetPayload

func (o *ScanArtifactBadRequest) GetPayload() *model.Errors

type ScanArtifactForbidden

type ScanArtifactForbidden struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
ScanArtifactForbidden describes a response with status code 403, with default header values.

Forbidden

func NewScanArtifactForbidden

func NewScanArtifactForbidden() *ScanArtifactForbidden

NewScanArtifactForbidden creates a ScanArtifactForbidden with default headers values

func (*ScanArtifactForbidden) Error

func (o *ScanArtifactForbidden) Error() string

func (*ScanArtifactForbidden) GetPayload

func (o *ScanArtifactForbidden) GetPayload() *model.Errors

type ScanArtifactInternalServerError

type ScanArtifactInternalServerError struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
ScanArtifactInternalServerError describes a response with status code 500, with default header values.

Internal server error

func NewScanArtifactInternalServerError

func NewScanArtifactInternalServerError() *ScanArtifactInternalServerError

NewScanArtifactInternalServerError creates a ScanArtifactInternalServerError with default headers values

func (*ScanArtifactInternalServerError) Error

func (*ScanArtifactInternalServerError) GetPayload

func (o *ScanArtifactInternalServerError) GetPayload() *model.Errors

type ScanArtifactNotFound

type ScanArtifactNotFound struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
ScanArtifactNotFound describes a response with status code 404, with default header values.

Not found

func NewScanArtifactNotFound

func NewScanArtifactNotFound() *ScanArtifactNotFound

NewScanArtifactNotFound creates a ScanArtifactNotFound with default headers values

func (*ScanArtifactNotFound) Error

func (o *ScanArtifactNotFound) Error() string

func (*ScanArtifactNotFound) GetPayload

func (o *ScanArtifactNotFound) GetPayload() *model.Errors

type ScanArtifactParams

type ScanArtifactParams struct {

	/* XRequestID.

	   An unique ID for the request
	*/
	XRequestID *string

	/* ProjectName.

	   The name of the project
	*/
	ProjectName string

	/* Reference.

	   The reference of the artifact, can be digest or tag
	*/
	Reference string

	/* RepositoryName.

	   The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
	*/
	RepositoryName string

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

ScanArtifactParams contains all the parameters to send to the API endpoint

for the scan artifact operation.

Typically these are written to a http.Request.

func NewScanArtifactParams

func NewScanArtifactParams() *ScanArtifactParams

NewScanArtifactParams creates a new ScanArtifactParams 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 NewScanArtifactParamsWithContext

func NewScanArtifactParamsWithContext(ctx context.Context) *ScanArtifactParams

NewScanArtifactParamsWithContext creates a new ScanArtifactParams object with the ability to set a context for a request.

func NewScanArtifactParamsWithHTTPClient

func NewScanArtifactParamsWithHTTPClient(client *http.Client) *ScanArtifactParams

NewScanArtifactParamsWithHTTPClient creates a new ScanArtifactParams object with the ability to set a custom HTTPClient for a request.

func NewScanArtifactParamsWithTimeout

func NewScanArtifactParamsWithTimeout(timeout time.Duration) *ScanArtifactParams

NewScanArtifactParamsWithTimeout creates a new ScanArtifactParams object with the ability to set a timeout on a request.

func (*ScanArtifactParams) SetContext

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

SetContext adds the context to the scan artifact params

func (*ScanArtifactParams) SetDefaults

func (o *ScanArtifactParams) SetDefaults()

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

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

func (*ScanArtifactParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the scan artifact params

func (*ScanArtifactParams) SetProjectName

func (o *ScanArtifactParams) SetProjectName(projectName string)

SetProjectName adds the projectName to the scan artifact params

func (*ScanArtifactParams) SetReference

func (o *ScanArtifactParams) SetReference(reference string)

SetReference adds the reference to the scan artifact params

func (*ScanArtifactParams) SetRepositoryName

func (o *ScanArtifactParams) SetRepositoryName(repositoryName string)

SetRepositoryName adds the repositoryName to the scan artifact params

func (*ScanArtifactParams) SetTimeout

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

SetTimeout adds the timeout to the scan artifact params

func (*ScanArtifactParams) SetXRequestID

func (o *ScanArtifactParams) SetXRequestID(xRequestID *string)

SetXRequestID adds the xRequestId to the scan artifact params

func (*ScanArtifactParams) WithContext

WithContext adds the context to the scan artifact params

func (*ScanArtifactParams) WithDefaults

func (o *ScanArtifactParams) WithDefaults() *ScanArtifactParams

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

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

func (*ScanArtifactParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the scan artifact params

func (*ScanArtifactParams) WithProjectName

func (o *ScanArtifactParams) WithProjectName(projectName string) *ScanArtifactParams

WithProjectName adds the projectName to the scan artifact params

func (*ScanArtifactParams) WithReference

func (o *ScanArtifactParams) WithReference(reference string) *ScanArtifactParams

WithReference adds the reference to the scan artifact params

func (*ScanArtifactParams) WithRepositoryName

func (o *ScanArtifactParams) WithRepositoryName(repositoryName string) *ScanArtifactParams

WithRepositoryName adds the repositoryName to the scan artifact params

func (*ScanArtifactParams) WithTimeout

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

WithTimeout adds the timeout to the scan artifact params

func (*ScanArtifactParams) WithXRequestID

func (o *ScanArtifactParams) WithXRequestID(xRequestID *string) *ScanArtifactParams

WithXRequestID adds the xRequestID to the scan artifact params

func (*ScanArtifactParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ScanArtifactReader

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

ScanArtifactReader is a Reader for the ScanArtifact structure.

func (*ScanArtifactReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type ScanArtifactUnauthorized

type ScanArtifactUnauthorized struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
ScanArtifactUnauthorized describes a response with status code 401, with default header values.

Unauthorized

func NewScanArtifactUnauthorized

func NewScanArtifactUnauthorized() *ScanArtifactUnauthorized

NewScanArtifactUnauthorized creates a ScanArtifactUnauthorized with default headers values

func (*ScanArtifactUnauthorized) Error

func (o *ScanArtifactUnauthorized) Error() string

func (*ScanArtifactUnauthorized) GetPayload

func (o *ScanArtifactUnauthorized) GetPayload() *model.Errors

Jump to

Keyboard shortcuts

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