v20240216

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package v20240216 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CliTestFlow

type CliTestFlow struct {
	// Name The flow which the scan is triggered for.
	Name CliTestFlowName `json:"name"`
}

CliTestFlow defines model for CliTestFlow.

type CliTestFlowName

type CliTestFlowName string

CliTestFlowName The flow which the scan is triggered for.

const (
	CliTest CliTestFlowName = "cli_test"
)

Defines values for CliTestFlowName.

type Component

type Component struct {
	// CreatedAt Point in time in which this component was created
	CreatedAt time.Time `json:"created_at"`

	// FindingsUrl Optional URL containing the findings for this component
	FindingsUrl *string `json:"findings_url,omitempty"`

	// Id ID of this component as provided by the scanner
	Id string `json:"id"`

	// Name Human readable name of this component as provided by the scanner
	Name string `json:"name"`

	// Type Identifies the type of this component as provided by the scanner among the ones supported by Snyk
	Type string `json:"type"`
}

Component A component identifies a subset of the given repository (a file, a bunch of files, the entire repo, or perhaps a fragment of a file) that may contain findings attached to it. E.g. server/package.json for SCA or a java repository for SAST

type FindingsUrl added in v1.7.0

type FindingsUrl struct {
	Attributes struct {
		// Url A GET-able self-signed URL with a short TTL to retrieve findings
		Url string `json:"url"`
	} `json:"attributes"`
	Id   openapi_types.UUID `json:"id"`
	Type FindingsUrlType    `json:"type"`
}

FindingsUrl defines model for FindingsUrl.

type FindingsUrlType added in v1.7.0

type FindingsUrlType string

FindingsUrlType defines model for FindingsUrl.Type.

const (
	FindingsUrlTypeFindingsUrl FindingsUrlType = "findings_url"
)

Defines values for FindingsUrlType.

type Flow

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

Flow defines model for Flow.

func (Flow) AsCliTestFlow

func (t Flow) AsCliTestFlow() (CliTestFlow, error)

AsCliTestFlow returns the union data inside the Flow as a CliTestFlow

func (Flow) AsIdeTestFlow added in v1.7.0

func (t Flow) AsIdeTestFlow() (IdeTestFlow, error)

AsIdeTestFlow returns the union data inside the Flow as a IdeTestFlow

func (Flow) AsMonitorFlow

func (t Flow) AsMonitorFlow() (MonitorFlow, error)

AsMonitorFlow returns the union data inside the Flow as a MonitorFlow

func (Flow) Discriminator

func (t Flow) Discriminator() (string, error)

func (*Flow) FromCliTestFlow

func (t *Flow) FromCliTestFlow(v CliTestFlow) error

FromCliTestFlow overwrites any union data inside the Flow as the provided CliTestFlow

func (*Flow) FromIdeTestFlow added in v1.7.0

func (t *Flow) FromIdeTestFlow(v IdeTestFlow) error

FromIdeTestFlow overwrites any union data inside the Flow as the provided IdeTestFlow

func (*Flow) FromMonitorFlow

func (t *Flow) FromMonitorFlow(v MonitorFlow) error

FromMonitorFlow overwrites any union data inside the Flow as the provided MonitorFlow

func (Flow) MarshalJSON

func (t Flow) MarshalJSON() ([]byte, error)

func (*Flow) MergeCliTestFlow

func (t *Flow) MergeCliTestFlow(v CliTestFlow) error

MergeCliTestFlow performs a merge with any union data inside the Flow, using the provided CliTestFlow

func (*Flow) MergeIdeTestFlow added in v1.7.0

func (t *Flow) MergeIdeTestFlow(v IdeTestFlow) error

MergeIdeTestFlow performs a merge with any union data inside the Flow, using the provided IdeTestFlow

func (*Flow) MergeMonitorFlow

func (t *Flow) MergeMonitorFlow(v MonitorFlow) error

MergeMonitorFlow performs a merge with any union data inside the Flow, using the provided MonitorFlow

func (*Flow) UnmarshalJSON

func (t *Flow) UnmarshalJSON(b []byte) error

func (Flow) ValueByDiscriminator

func (t Flow) ValueByDiscriminator() (interface{}, error)

type IdeTestFlow added in v1.7.0

type IdeTestFlow struct {
	// Name The flow which the scan is triggered for.
	Name IdeTestFlowName `json:"name"`
}

IdeTestFlow defines model for IdeTestFlow.

type IdeTestFlowName added in v1.7.0

type IdeTestFlowName string

IdeTestFlowName The flow which the scan is triggered for.

const (
	IdeTest IdeTestFlowName = "ide_test"
)

Defines values for IdeTestFlowName.

type LegacyFlowProperties

type LegacyFlowProperties struct {
	ImportId         openapi_types.UUID `json:"import_id"`
	ImportedTargetId openapi_types.UUID `json:"imported_target_id"`
	TargetReference  *string            `json:"target_reference,omitempty"`
	WorkspaceUrl     string             `json:"workspace_url"`
}

LegacyFlowProperties defines model for LegacyFlowProperties.

type MonitorFlow

type MonitorFlow struct {
	LegacyProperties *LegacyFlowProperties `json:"legacy_properties,omitempty"`

	// Name The flow which the scan is triggered for.
	Name MonitorFlowName `json:"name"`
}

MonitorFlow defines model for MonitorFlow.

type MonitorFlowName

type MonitorFlowName string

MonitorFlowName The flow which the scan is triggered for.

const (
	Monitor MonitorFlowName = "monitor"
)

Defines values for MonitorFlowName.

type PostFindingsUrlRequest added in v1.7.0

type PostFindingsUrlRequest struct {
	Data struct {
		Attributes struct {
			// ComponentId ID of this component as provided by the scanner
			ComponentId string `json:"component_id"`

			// ScannerName Name of the scanner which reports findings
			ScannerName string `json:"scanner_name"`
		} `json:"attributes"`
		Id   *openapi_types.UUID            `json:"id,omitempty"`
		Type PostFindingsUrlRequestDataType `json:"type"`
	} `json:"data"`
}

PostFindingsUrlRequest defines model for PostFindingsUrlRequest.

type PostFindingsUrlRequestDataType added in v1.7.0

type PostFindingsUrlRequestDataType string

PostFindingsUrlRequestDataType defines model for PostFindingsUrlRequest.Data.Type.

const (
	PostFindingsUrlRequestDataTypeFindingsUrl PostFindingsUrlRequestDataType = "findings_url"
)

Defines values for PostFindingsUrlRequestDataType.

type PostFindingsUrlResponse added in v1.7.0

type PostFindingsUrlResponse struct {
	Data    FindingsUrl            `json:"data"`
	Jsonapi *externalRef0.JsonApi  `json:"jsonapi,omitempty"`
	Links   *externalRef0.SelfLink `json:"links,omitempty"`
}

PostFindingsUrlResponse defines model for PostFindingsUrlResponse.

type PostScanRequest

type PostScanRequest struct {
	Data struct {
		Attributes struct {
			Flow Flow `json:"flow"`

			// ScanOptions Additional options for the scan
			ScanOptions *struct {
				// LimitScanToFiles The findings will be limited to a subset of files only.
				LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"`
			} `json:"scan_options,omitempty"`

			// WorkspaceId ID of the workspace to be scanned. We are migrating from URL to the ID - please send both fields until we can drop the URL.
			WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"`

			// WorkspaceUrl The URI of the workspace to be scanned as returned by the workspace service.
			WorkspaceUrl string `json:"workspace_url"`
		} `json:"attributes"`
		Id   *openapi_types.UUID     `json:"id,omitempty"`
		Type PostScanRequestDataType `json:"type"`
	} `json:"data"`
}

PostScanRequest defines model for PostScanRequest.

type PostScanRequestDataType

type PostScanRequestDataType string

PostScanRequestDataType defines model for PostScanRequest.Data.Type.

const (
	PostScanRequestDataTypeWorkspace PostScanRequestDataType = "workspace"
)

Defines values for PostScanRequestDataType.

type PostScanRequestWithUser added in v1.7.0

type PostScanRequestWithUser struct {
	Data struct {
		Attributes struct {
			Flow Flow `json:"flow"`

			// ScanOptions Additional options for the scan
			ScanOptions *struct {
				// LimitScanToFiles The findings will be limited to a subset of files only.
				LimitScanToFiles *[]string `json:"limit_scan_to_files,omitempty"`
			} `json:"scan_options,omitempty"`

			// UserId Snyk user id who initiates the scan
			UserId *openapi_types.UUID `json:"user_id,omitempty"`

			// WorkspaceId ID of the workspace to be scanned. We are migrating from URL to the ID - please send both fields until we can drop the URL.
			WorkspaceId *openapi_types.UUID `json:"workspace_id,omitempty"`

			// WorkspaceUrl The URI of the workspace to be scanned as returned by the workspace service.
			WorkspaceUrl string `json:"workspace_url"`
		} `json:"attributes"`
		Id   *openapi_types.UUID             `json:"id,omitempty"`
		Type PostScanRequestWithUserDataType `json:"type"`
	} `json:"data"`
}

PostScanRequestWithUser defines model for PostScanRequestWithUser.

type PostScanRequestWithUserDataType added in v1.7.0

type PostScanRequestWithUserDataType string

PostScanRequestWithUserDataType defines model for PostScanRequestWithUser.Data.Type.

const (
	PostScanRequestWithUserDataTypeWorkspace PostScanRequestWithUserDataType = "workspace"
)

Defines values for PostScanRequestWithUserDataType.

type ScanJob

type ScanJob struct {
	Attributes ScanJobBasicAttributes `json:"attributes"`
	Id         openapi_types.UUID     `json:"id"`
	Type       ScanJobType            `json:"type"`
}

ScanJob defines model for ScanJob.

type ScanJobBasicAttributes

type ScanJobBasicAttributes struct {
	// CreatedAt Point in time in which this job was created
	CreatedAt time.Time `json:"created_at"`

	// Status Defines the completion status of this job. The job is considered finished when: - the status is `done` meaning it successfully completed, although some product lines might have reported errors, or timed out - the status is `failed` meaning it prematurely failed to complete and no product line got a chance to report - the status is `timeout` when the overall job did not manage to complete on time The job is considered in progress when: - the status is either `queued` meaning it hasn't been picked up yet by the orchestrator - the status is `in_progress` meaning it has been picked up by the orchestrator but product lines are still scanning
	Status ScanJobBasicAttributesStatus `json:"status"`

	// UserId Snyk user id who initiates the scan
	UserId *openapi_types.UUID `json:"user_id,omitempty"`
}

ScanJobBasicAttributes defines model for ScanJobBasicAttributes.

type ScanJobBasicAttributesStatus

type ScanJobBasicAttributesStatus string

ScanJobBasicAttributesStatus Defines the completion status of this job. The job is considered finished when: - the status is `done` meaning it successfully completed, although some product lines might have reported errors, or timed out - the status is `failed` meaning it prematurely failed to complete and no product line got a chance to report - the status is `timeout` when the overall job did not manage to complete on time The job is considered in progress when: - the status is either `queued` meaning it hasn't been picked up yet by the orchestrator - the status is `in_progress` meaning it has been picked up by the orchestrator but product lines are still scanning

const (
	ScanJobBasicAttributesStatusDone       ScanJobBasicAttributesStatus = "done"
	ScanJobBasicAttributesStatusFailed     ScanJobBasicAttributesStatus = "failed"
	ScanJobBasicAttributesStatusInProgress ScanJobBasicAttributesStatus = "in_progress"
	ScanJobBasicAttributesStatusQueued     ScanJobBasicAttributesStatus = "queued"
	ScanJobBasicAttributesStatusTimeout    ScanJobBasicAttributesStatus = "timeout"
	ScanJobBasicAttributesStatusUnknown    ScanJobBasicAttributesStatus = "unknown"
)

Defines values for ScanJobBasicAttributesStatus.

type ScanJobResults

type ScanJobResults struct {
	Attributes struct {
		// Components A list of software components identified during the scan as well as related findings associated to it.
		// E.g. if a Git repository contains 2 NPM projects and javascript code server/package.json and client/package.json, assuming we have SCA and SAST enabled the scan might come back with the following components: - SCA scan: server/package.json - SCA scan: client/package.json - SAST scan: all the code in the repository
		Components []Component `json:"components"`

		// CreatedAt Point in time in which this job was created
		CreatedAt time.Time `json:"created_at"`

		// Status Defines the completion status of this job. The job is considered finished when: - the status is `done` meaning it successfully completed, although some product lines might have reported errors, or timed out - the status is `failed` meaning it prematurely failed to complete and no product line got a chance to report - the status is `timeout` when the overall job did not manage to complete on time The job is considered in progress when: - the status is either `queued` meaning it hasn't been picked up yet by the orchestrator - the status is `in_progress` meaning it has been picked up by the orchestrator but product lines are still scanning
		Status ScanJobResultsAttributesStatus `json:"status"`
	} `json:"attributes"`
	Id   openapi_types.UUID `json:"id"`
	Type ScanJobResultsType `json:"type"`
}

ScanJobResults defines model for ScanJobResults.

type ScanJobResultsAttributesStatus

type ScanJobResultsAttributesStatus string

ScanJobResultsAttributesStatus Defines the completion status of this job. The job is considered finished when: - the status is `done` meaning it successfully completed, although some product lines might have reported errors, or timed out - the status is `failed` meaning it prematurely failed to complete and no product line got a chance to report - the status is `timeout` when the overall job did not manage to complete on time The job is considered in progress when: - the status is either `queued` meaning it hasn't been picked up yet by the orchestrator - the status is `in_progress` meaning it has been picked up by the orchestrator but product lines are still scanning

const (
	ScanJobResultsAttributesStatusDone       ScanJobResultsAttributesStatus = "done"
	ScanJobResultsAttributesStatusFailed     ScanJobResultsAttributesStatus = "failed"
	ScanJobResultsAttributesStatusInProgress ScanJobResultsAttributesStatus = "in_progress"
	ScanJobResultsAttributesStatusQueued     ScanJobResultsAttributesStatus = "queued"
	ScanJobResultsAttributesStatusTimeout    ScanJobResultsAttributesStatus = "timeout"
	ScanJobResultsAttributesStatusUnknown    ScanJobResultsAttributesStatus = "unknown"
)

Defines values for ScanJobResultsAttributesStatus.

type ScanJobResultsType

type ScanJobResultsType string

ScanJobResultsType defines model for ScanJobResults.Type.

const (
	ScanJobResultsTypeScanJobResults ScanJobResultsType = "scan_job_results"
)

Defines values for ScanJobResultsType.

type ScanJobType

type ScanJobType string

ScanJobType defines model for ScanJob.Type.

const (
	ScanJobTypeScanJob ScanJobType = "scan_job"
)

Defines values for ScanJobType.

type ScanResponse

type ScanResponse struct {
	Data    ScanJob                `json:"data"`
	Jsonapi *externalRef0.JsonApi  `json:"jsonapi,omitempty"`
	Links   *externalRef0.SelfLink `json:"links,omitempty"`
}

ScanResponse defines model for ScanResponse.

type ScanResultsResponse

type ScanResultsResponse struct {
	Data    ScanJobResults         `json:"data"`
	Jsonapi *externalRef0.JsonApi  `json:"jsonapi,omitempty"`
	Links   *externalRef0.SelfLink `json:"links,omitempty"`
}

ScanResultsResponse defines model for ScanResultsResponse.

Jump to

Keyboard shortcuts

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