client

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

README

Go API client for client

This is the Anchore Engine API. Provides the primary external API for users of the service.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 0.1.15
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional

Put the package under your project folder and add the following in import:

import "./client"

Documentation for API Endpoints

All URIs are relative to http://localhost/v1

Class Method HTTP request Description
ArchivesApi ArchiveImageAnalysis Post /archives/images
ArchivesApi CreateAnalysisArchiveRule Post /archives/rules
ArchivesApi DeleteAnalysisArchiveRule Delete /archives/rules/{ruleId}
ArchivesApi DeleteArchivedAnalysis Delete /archives/images/{imageDigest}
ArchivesApi GetAnalysisArchiveRule Get /archives/rules/{ruleId}
ArchivesApi GetArchivedAnalysis Get /archives/images/{imageDigest}
ArchivesApi ListAnalysisArchive Get /archives/images
ArchivesApi ListAnalysisArchiveRules Get /archives/rules
ArchivesApi ListArchives Get /archives
DefaultApi GetOauthToken Post /oauth/token
DefaultApi HealthCheck Get /health
DefaultApi ListFileContentSearchResults Get /images/{imageDigest}/artifacts/file_content_search Return a list of analyzer artifacts of the specified type
DefaultApi ListRetrievedFiles Get /images/{imageDigest}/artifacts/retrieved_files Return a list of analyzer artifacts of the specified type
DefaultApi ListSecretSearchResults Get /images/{imageDigest}/artifacts/secret_search Return a list of analyzer artifacts of the specified type
DefaultApi Ping Get /
DefaultApi VersionCheck Get /version
EventsApi DeleteEvent Delete /events/{eventId} Delete Event
EventsApi DeleteEvents Delete /events Delete Events
EventsApi GetEvent Get /events/{eventId} Get Event
EventsApi ListEventTypes Get /event_types List Event Types
EventsApi ListEvents Get /events List Events
IdentityApi AddCredential Post /user/credentials add/replace credential
IdentityApi GetCredentials Get /user/credentials Get current credential summary
IdentityApi GetUser Get /user List authenticated user info
IdentityApi GetUsersAccount Get /account List the account for the authenticated user
ImageContentApi GetImageContentByType Get /images/{imageDigest}/content/{ctype} Get the content of an image by type
ImageContentApi GetImageContentByTypeFiles Get /images/{imageDigest}/content/files Get the content of an image by type files
ImageContentApi GetImageContentByTypeImageId Get /images/by_id/{imageId}/content/{ctype} Get the content of an image by type
ImageContentApi GetImageContentByTypeImageIdFiles Get /images/by_id/{imageId}/content/files Get the content of an image by type files
ImageContentApi GetImageContentByTypeImageIdJavapackage Get /images/by_id/{imageId}/content/java Get the content of an image by type java
ImageContentApi GetImageContentByTypeJavapackage Get /images/{imageDigest}/content/java Get the content of an image by type java
ImageContentApi GetImageContentByTypeMalware Get /images/{imageDigest}/content/malware Get the content of an image by type malware
ImageContentApi ListImageContent Get /images/{imageDigest}/content List image content types
ImageContentApi ListImageContentByImageid Get /images/by_id/{imageId}/content List image content types
ImagesApi AddImage Post /images Submit a new image for analysis by the engine
ImagesApi DeleteImage Delete /images/{imageDigest} Delete an image analysis
ImagesApi DeleteImageByImageId Delete /images/by_id/{imageId} Delete image by docker imageId
ImagesApi DeleteImagesAsync Delete /images Bulk mark images for deletion
ImagesApi GetImage Get /images/{imageDigest} Get image metadata
ImagesApi GetImageByImageId Get /images/by_id/{imageId} Lookup image by docker imageId
ImagesApi GetImageContentByType Get /images/{imageDigest}/content/{ctype} Get the content of an image by type
ImagesApi GetImageContentByTypeFiles Get /images/{imageDigest}/content/files Get the content of an image by type files
ImagesApi GetImageContentByTypeImageId Get /images/by_id/{imageId}/content/{ctype} Get the content of an image by type
ImagesApi GetImageContentByTypeImageIdFiles Get /images/by_id/{imageId}/content/files Get the content of an image by type files
ImagesApi GetImageContentByTypeImageIdJavapackage Get /images/by_id/{imageId}/content/java Get the content of an image by type java
ImagesApi GetImageContentByTypeJavapackage Get /images/{imageDigest}/content/java Get the content of an image by type java
ImagesApi GetImageContentByTypeMalware Get /images/{imageDigest}/content/malware Get the content of an image by type malware
ImagesApi GetImageMetadataByType Get /images/{imageDigest}/metadata/{mtype} Get the metadata of an image by type
ImagesApi GetImagePolicyCheck Get /images/{imageDigest}/check Check policy evaluation status for image
ImagesApi GetImagePolicyCheckByImageId Get /images/by_id/{imageId}/check Check policy evaluation status for image
ImagesApi GetImageVulnerabilitiesByType Get /images/{imageDigest}/vuln/{vtype} Get vulnerabilities by type
ImagesApi GetImageVulnerabilitiesByTypeImageId Get /images/by_id/{imageId}/vuln/{vtype} Get vulnerabilities by type
ImagesApi GetImageVulnerabilityTypes Get /images/{imageDigest}/vuln Get vulnerability types
ImagesApi GetImageVulnerabilityTypesByImageId Get /images/by_id/{imageId}/vuln Get vulnerability types
ImagesApi ListImageContent Get /images/{imageDigest}/content List image content types
ImagesApi ListImageContentByImageid Get /images/by_id/{imageId}/content List image content types
ImagesApi ListImageMetadata Get /images/{imageDigest}/metadata List image metadata types
ImagesApi ListImages Get /images List all visible images
ImportApi ImportImageArchive Post /import/images Import an anchore image tar.gz archive file.
PoliciesApi AddPolicy Post /policies Add a new policy
PoliciesApi DeletePolicy Delete /policies/{policyId} Delete policy
PoliciesApi GetPolicy Get /policies/{policyId} Get specific policy
PoliciesApi ListPolicies Get /policies List policies
PoliciesApi UpdatePolicy Put /policies/{policyId} Update policy
PolicyApi DescribePolicy Get /system/policy_spec Describe the policy language spec implemented by this service.
PolicyEvaluationApi GetImagePolicyCheck Get /images/{imageDigest}/check Check policy evaluation status for image
PolicyEvaluationApi GetImagePolicyCheckByImageId Get /images/by_id/{imageId}/check Check policy evaluation status for image
QueriesApi GetImageContentByType Get /images/{imageDigest}/content/{ctype} Get the content of an image by type
QueriesApi GetImageContentByTypeFiles Get /images/{imageDigest}/content/files Get the content of an image by type files
QueriesApi GetImageContentByTypeImageId Get /images/by_id/{imageId}/content/{ctype} Get the content of an image by type
QueriesApi GetImageContentByTypeImageIdFiles Get /images/by_id/{imageId}/content/files Get the content of an image by type files
QueriesApi GetImageContentByTypeImageIdJavapackage Get /images/by_id/{imageId}/content/java Get the content of an image by type java
QueriesApi GetImageContentByTypeJavapackage Get /images/{imageDigest}/content/java Get the content of an image by type java
QueriesApi GetImageContentByTypeMalware Get /images/{imageDigest}/content/malware Get the content of an image by type malware
QueriesApi GetImageMetadataByType Get /images/{imageDigest}/metadata/{mtype} Get the metadata of an image by type
QueriesApi GetImageVulnerabilitiesByType Get /images/{imageDigest}/vuln/{vtype} Get vulnerabilities by type
QueriesApi GetImageVulnerabilitiesByTypeImageId Get /images/by_id/{imageId}/vuln/{vtype} Get vulnerabilities by type
QueriesApi GetImageVulnerabilityTypes Get /images/{imageDigest}/vuln Get vulnerability types
QueriesApi GetImageVulnerabilityTypesByImageId Get /images/by_id/{imageId}/vuln Get vulnerability types
QueriesApi ListImageContent Get /images/{imageDigest}/content List image content types
QueriesApi ListImageContentByImageid Get /images/by_id/{imageId}/content List image content types
QueriesApi ListImageMetadata Get /images/{imageDigest}/metadata List image metadata types
QueriesApi QueryImagesByPackage Get /query/images/by_package List of images containing given package
QueriesApi QueryImagesByVulnerability Get /query/images/by_vulnerability List images vulnerable to the specific vulnerability ID.
QueriesApi QueryVulnerabilities Get /query/vulnerabilities Listing information about given vulnerability
RegistriesApi CreateRegistry Post /registries Add a new registry
RegistriesApi DeleteRegistry Delete /registries/{registry} Delete a registry configuration
RegistriesApi GetRegistry Get /registries/{registry} Get a specific registry configuration
RegistriesApi ListRegistries Get /registries List configured registries
RegistriesApi UpdateRegistry Put /registries/{registry} Update/replace a registry configuration
RepositoryCredentialsApi AddRepository Post /repositories Add repository to watch
ServicesApi DeleteService Delete /system/services/{servicename}/{hostid} Delete the service config
ServicesApi GetServicesByName Get /system/services/{servicename} Get a service configuration and state
ServicesApi GetServicesByNameAndHost Get /system/services/{servicename}/{hostid} Get service config for a specific host
ServicesApi ListServices Get /system/services List system services
SubscriptionsApi AddSubscription Post /subscriptions Add a subscription of a specific type
SubscriptionsApi DeleteSubscription Delete /subscriptions/{subscriptionId} Delete subscriptions of a specific type
SubscriptionsApi GetSubscription Get /subscriptions/{subscriptionId} Get a specific subscription set
SubscriptionsApi ListSubscriptions Get /subscriptions List all subscriptions
SubscriptionsApi UpdateSubscription Put /subscriptions/{subscriptionId} Update an existing and specific subscription
SummariesApi ListImagetags Get /summaries/imagetags List all visible image digests and tags
SystemApi DeleteFeed Delete /system/feeds/{feed}
SystemApi DeleteFeedGroup Delete /system/feeds/{feed}/{group}
SystemApi DeleteService Delete /system/services/{servicename}/{hostid} Delete the service config
SystemApi DescribeErrorCodes Get /system/error_codes Describe anchore engine error codes.
SystemApi DescribePolicy Get /system/policy_spec Describe the policy language spec implemented by this service.
SystemApi GetServiceDetail Get /system System status
SystemApi GetServicesByName Get /system/services/{servicename} Get a service configuration and state
SystemApi GetServicesByNameAndHost Get /system/services/{servicename}/{hostid} Get service config for a specific host
SystemApi GetStatus Get /status Service status
SystemApi GetSystemFeeds Get /system/feeds list feeds operations and information
SystemApi ListServices Get /system/services List system services
SystemApi PostSystemFeeds Post /system/feeds trigger feeds operations
SystemApi ToggleFeedEnabled Put /system/feeds/{feed}
SystemApi ToggleGroupEnabled Put /system/feeds/{feed}/{group}
UserManagementApi CreateAccount Post /accounts Create a new user. Only avaialble to admin user.
UserManagementApi CreateUser Post /accounts/{accountname}/users Create a new user
UserManagementApi CreateUserCredential Post /accounts/{accountname}/users/{username}/credentials add/replace credential
UserManagementApi DeleteAccount Delete /accounts/{accountname} Delete the specified account, only allowed if the account is in the disabled state. All users will be deleted along with the account and all resources will be garbage collected
UserManagementApi DeleteUser Delete /accounts/{accountname}/users/{username} Delete a specific user credential by username of the credential. Cannot be the credential used to authenticate the request.
UserManagementApi DeleteUserCredential Delete /accounts/{accountname}/users/{username}/credentials Delete a credential by type
UserManagementApi GetAccount Get /accounts/{accountname} Get info about an user. Only available to admin user. Uses the main user Id, not a username.
UserManagementApi GetAccountUser Get /accounts/{accountname}/users/{username} Get a specific user in the specified account
UserManagementApi ListAccounts Get /accounts List user summaries. Only available to the system admin user.
UserManagementApi ListUserCredentials Get /accounts/{accountname}/users/{username}/credentials Get current credential summary
UserManagementApi ListUsers Get /accounts/{accountname}/users List accounts for the user
UserManagementApi UpdateAccountState Put /accounts/{accountname}/state Update the state of an account to either enabled or disabled. For deletion use the DELETE route
VulnerabilitiesApi GetImageVulnerabilitiesByType Get /images/{imageDigest}/vuln/{vtype} Get vulnerabilities by type
VulnerabilitiesApi GetImageVulnerabilitiesByTypeImageId Get /images/by_id/{imageId}/vuln/{vtype} Get vulnerabilities by type
VulnerabilitiesApi GetImageVulnerabilityTypes Get /images/{imageDigest}/vuln Get vulnerability types
VulnerabilitiesApi GetImageVulnerabilityTypesByImageId Get /images/by_id/{imageId}/vuln Get vulnerability types
VulnerabilitiesApi QueryImagesByVulnerability Get /query/images/by_vulnerability List images vulnerable to the specific vulnerability ID.
VulnerabilitiesApi QueryVulnerabilities Get /query/vulnerabilities Listing information about given vulnerability

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

nurmi@anchore.com

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	ArchivesApi *ArchivesApiService

	DefaultApi *DefaultApiService

	EventsApi *EventsApiService

	IdentityApi *IdentityApiService

	ImageContentApi *ImageContentApiService

	ImagesApi *ImagesApiService

	ImportApi *ImportApiService

	PoliciesApi *PoliciesApiService

	PolicyApi *PolicyApiService

	PolicyEvaluationApi *PolicyEvaluationApiService

	QueriesApi *QueriesApiService

	RegistriesApi *RegistriesApiService

	RepositoryCredentialsApi *RepositoryCredentialsApiService

	ServicesApi *ServicesApiService

	SubscriptionsApi *SubscriptionsApiService

	SummariesApi *SummariesApiService

	SystemApi *SystemApiService

	UserManagementApi *UserManagementApiService

	VulnerabilitiesApi *VulnerabilitiesApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Anchore Engine API Server API v0.1.15 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

ChangeBasePath changes base path to allow switching to mocks

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResonse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type AccessCredential

type AccessCredential struct {
	// The timestamp of creation of the credential
	CreatedAt string `json:"created_at,omitempty"`
	// The type of credential
	Type string `json:"type"`
	// The credential value (e.g. the password)
	Value string `json:"value"`
}

AccessCredential A login credential mapped to a user identity. For password credentials, the username to present for Basic auth is the user's username from the user record

type Account

type Account struct {
	// The timestamp when the account was created
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Optional email address associated with the account
	Email string `json:"email,omitempty"`
	// The timestamp of the last update to the account metadata itself (not users or creds)
	LastUpdated time.Time `json:"last_updated,omitempty"`
	// The account identifier, not updatable after creation
	Name string `json:"name"`
	// State of the account. Disabled accounts prevent member users from logging in, deleting accounts are disabled and pending deletion and will be removed once all owned resources are garbage collected by the system
	State string `json:"state,omitempty"`
	// The user type (admin vs user). If not specified in a POST request, 'user' is default
	Type string `json:"type,omitempty"`
}

Account Account information

type AccountCreationRequest

type AccountCreationRequest struct {
	// An optional email to associate with the account for contact purposes
	Email string `json:"email,omitempty"`
	// The account name to use. This will identify the account and must be globally unique in the system.
	Name string `json:"name"`
}

AccountCreationRequest An account to create/add to the system. If already exists will return 400.

type AccountStatus

type AccountStatus struct {
	// The status of the account
	State string `json:"state,omitempty"`
}

AccountStatus A summary of account status

type AddImageOpts

type AddImageOpts struct {
	Force           optional.Bool
	Autosubscribe   optional.Bool
	XAnchoreAccount optional.String
}

AddImageOpts Optional parameters for the method 'AddImage'

type AddPolicyOpts

type AddPolicyOpts struct {
	XAnchoreAccount optional.String
}

AddPolicyOpts Optional parameters for the method 'AddPolicy'

type AddRepositoryOpts

type AddRepositoryOpts struct {
	Autosubscribe   optional.Bool
	Lookuptag       optional.String
	Dryrun          optional.Bool
	XAnchoreAccount optional.String
}

AddRepositoryOpts Optional parameters for the method 'AddRepository'

type AddSubscriptionOpts

type AddSubscriptionOpts struct {
	XAnchoreAccount optional.String
}

AddSubscriptionOpts Optional parameters for the method 'AddSubscription'

type AnalysisArchiveAddResult

type AnalysisArchiveAddResult struct {
	// Details on the status, e.g. the error message
	Detail string `json:"detail,omitempty"`
	// The image digest requested to be added
	Digest string `json:"digest,omitempty"`
	// The status of the archive add operation. Typically either 'archived' or 'error'
	Status string `json:"status,omitempty"`
}

AnalysisArchiveAddResult The result of adding a single digest to the archive

type AnalysisArchiveRulesSummary

type AnalysisArchiveRulesSummary struct {
	// The number of rules for this account
	Count int32 `json:"count,omitempty"`
	// The newest last_updated timestamp from the set of rules
	LastUpdated time.Time `json:"last_updated,omitempty"`
}

AnalysisArchiveRulesSummary Summary of the transition rule set

type AnalysisArchiveSource

type AnalysisArchiveSource struct {
	// The image digest identify the analysis. Archived analyses are based on digest, tag records are restored as analysis is restored.
	Digest string `json:"digest"`
}

AnalysisArchiveSource An image reference in the analysis archive for the purposes of loading analysis from the archive into th working set

type AnalysisArchiveSummary

type AnalysisArchiveSummary struct {
	// The timestamp of the most recent archived image
	LastUpdated time.Time `json:"last_updated,omitempty"`
	// The total sum of all the bytes stored to the backing storage. Accounts for anchore-applied compression, but not compression by the underlying storage system.
	TotalDataBytes int32 `json:"total_data_bytes,omitempty"`
	// The number of unique images (digests) in the archive
	TotalImageCount int32 `json:"total_image_count,omitempty"`
	// The number of tag records (registry/repo:tag pull strings) in the archive. This may include repeated tags but will always have a unique tag->digest mapping per record.
	TotalTagCount int32 `json:"total_tag_count,omitempty"`
}

AnalysisArchiveSummary A summarization of the analysis archive, including size, counts, etc. This archive stores image analysis only, never the actual image content or layers.

type AnalysisArchiveTransitionHistory

type AnalysisArchiveTransitionHistory struct {
	CreatedAt   time.Time `json:"created_at,omitempty"`
	ImageDigest string    `json:"imageDigest,omitempty"`
	LastUpdated time.Time `json:"last_updated,omitempty"`
	RuleId      string    `json:"rule_id,omitempty"`
	Transition  string    `json:"transition,omitempty"`
	// The task that created & updated this entry
	TransitionTaskId string `json:"transition_task_id,omitempty"`
}

AnalysisArchiveTransitionHistory A rule for auto-archiving image analysis by time and/or tag-history

type AnalysisArchiveTransitionRule

type AnalysisArchiveTransitionRule struct {
	// Matches if the analysis is strictly older than this number of days
	AnalysisAgeDays int32         `json:"analysis_age_days,omitempty"`
	CreatedAt       time.Time     `json:"created_at,omitempty"`
	LastUpdated     time.Time     `json:"last_updated,omitempty"`
	Selector        ImageSelector `json:"selector,omitempty"`
	// True if the rule applies to all accounts in the system. This is only available to admin users to update/modify, but all users with permission to list rules can see them
	SystemGlobal bool `json:"system_global,omitempty"`
	// Number of images mapped to the tag that are newer
	TagVersionsNewer int32 `json:"tag_versions_newer,omitempty"`
	// The type of transition to make. If \"archive\", then archive an image from the working set and remove it from the working set. If \"delete\", then match against archived images and delete from the archive if match.
	Transition string `json:"transition"`
}

AnalysisArchiveTransitionRule A rule for auto-archiving image analysis by time and/or tag-history

type AnchoreErrorCode

type AnchoreErrorCode struct {
	// Description of the error code
	Description string `json:"description,omitempty"`
	// Error code name
	Name string `json:"name,omitempty"`
}

AnchoreErrorCode A description of an anchore error code (name, description)

type AnchoreImage

type AnchoreImage struct {
	// A state value for the current status of the analysis progress of the image
	AnalysisStatus string                 `json:"analysis_status,omitempty"`
	Annotations    map[string]interface{} `json:"annotations,omitempty"`
	CreatedAt      time.Time              `json:"created_at,omitempty"`
	ImageDigest    string                 `json:"imageDigest,omitempty"`
	// A metadata content record for a specific image, containing different content type entries
	ImageContent map[string]interface{} `json:"image_content,omitempty"`
	// Details specific to an image reference and type such as tag and image source
	ImageDetail []ImageDetail `json:"image_detail,omitempty"`
	// State of the image
	ImageStatus string    `json:"image_status,omitempty"`
	LastUpdated time.Time `json:"last_updated,omitempty"`
	UserId      string    `json:"userId,omitempty"`
}

AnchoreImage A unique image in the engine. May have multiple tags or references. Unique to an image content across registries or repositories.

type AnchoreImageTagSummary

type AnchoreImageTagSummary struct {
	AnalysisStatus string `json:"analysis_status,omitempty"`
	AnalyzedAt     int32  `json:"analyzed_at,omitempty"`
	CreatedAt      int32  `json:"created_at,omitempty"`
	Fulltag        string `json:"fulltag,omitempty"`
	ImageDigest    string `json:"imageDigest,omitempty"`
	ImageId        string `json:"imageId,omitempty"`
	ImageStatus    string `json:"image_status,omitempty"`
	ParentDigest   string `json:"parentDigest,omitempty"`
	TagDetectedAt  int32  `json:"tag_detected_at,omitempty"`
}

AnchoreImageTagSummary A unique image in the engine.

type ApiErrorResponse

type ApiErrorResponse struct {
	Code int32 `json:"code,omitempty"`
	// Details structure for additional information about the error if available. Content and structure will be error specific.
	Detail    map[string]interface{} `json:"detail,omitempty"`
	ErrorType string                 `json:"error_type,omitempty"`
	Message   string                 `json:"message,omitempty"`
}

ApiErrorResponse Generic HTTP API error response

type ArchiveSummary

type ArchiveSummary struct {
	Images AnalysisArchiveSummary      `json:"images,omitempty"`
	Rules  AnalysisArchiveRulesSummary `json:"rules,omitempty"`
}

ArchiveSummary A summarization of the available archives, a place to for long-term storage of audit, analysis, or other data to remove it from the system's working set but keep it available.

type ArchivedAnalysis

type ArchivedAnalysis struct {
	AnalyzedAt time.Time `json:"analyzed_at,omitempty"`
	// User provided annotations as key-value pairs
	Annotations map[string]interface{} `json:"annotations,omitempty"`
	// The size, in bytes, of the analysis archive file
	ArchiveSizeBytes int32     `json:"archive_size_bytes,omitempty"`
	CreatedAt        time.Time `json:"created_at,omitempty"`
	// The image digest (digest of the manifest describing the image, per docker spec)
	ImageDigest string `json:"imageDigest,omitempty"`
	// List of tags associated with the image digest
	ImageDetail []TagEntry `json:"image_detail,omitempty"`
	LastUpdated time.Time  `json:"last_updated,omitempty"`
	// The digest of a parent manifest (for manifest-list images)
	ParentDigest string `json:"parentDigest,omitempty"`
	// The archival status
	Status string `json:"status,omitempty"`
}

ArchivedAnalysis struct for ArchivedAnalysis

type ArchivesApiService

type ArchivesApiService service

ArchivesApiService ArchivesApi service

func (*ArchivesApiService) ArchiveImageAnalysis

func (a *ArchivesApiService) ArchiveImageAnalysis(ctx _context.Context, imageReferences []string) ([]AnalysisArchiveAddResult, *_nethttp.Response, error)

ArchiveImageAnalysis Method for ArchiveImageAnalysis

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageReferences

@return []AnalysisArchiveAddResult

func (*ArchivesApiService) CreateAnalysisArchiveRule

CreateAnalysisArchiveRule Method for CreateAnalysisArchiveRule

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param rule

@return AnalysisArchiveTransitionRule

func (*ArchivesApiService) DeleteAnalysisArchiveRule

func (a *ArchivesApiService) DeleteAnalysisArchiveRule(ctx _context.Context, ruleId string) (AnalysisArchiveTransitionRule, *_nethttp.Response, error)

DeleteAnalysisArchiveRule Method for DeleteAnalysisArchiveRule

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param ruleId

@return AnalysisArchiveTransitionRule

func (*ArchivesApiService) DeleteArchivedAnalysis

func (a *ArchivesApiService) DeleteArchivedAnalysis(ctx _context.Context, imageDigest string, localVarOptionals *DeleteArchivedAnalysisOpts) (ArchivedAnalysis, *_nethttp.Response, error)

DeleteArchivedAnalysis Method for DeleteArchivedAnalysis Performs a synchronous archive deletion

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *DeleteArchivedAnalysisOpts - Optional Parameters:
  • @param "Force" (optional.Bool) -

@return ArchivedAnalysis

func (*ArchivesApiService) GetAnalysisArchiveRule

func (a *ArchivesApiService) GetAnalysisArchiveRule(ctx _context.Context, ruleId string) (AnalysisArchiveTransitionRule, *_nethttp.Response, error)

GetAnalysisArchiveRule Method for GetAnalysisArchiveRule

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param ruleId

@return AnalysisArchiveTransitionRule

func (*ArchivesApiService) GetArchivedAnalysis

func (a *ArchivesApiService) GetArchivedAnalysis(ctx _context.Context, imageDigest string) (ArchivedAnalysis, *_nethttp.Response, error)

GetArchivedAnalysis Method for GetArchivedAnalysis Returns the archive metadata record identifying the image and tags for the analysis in the archive.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest The image digest to identify the image analysis

@return ArchivedAnalysis

func (*ArchivesApiService) ListAnalysisArchive

func (a *ArchivesApiService) ListAnalysisArchive(ctx _context.Context) ([]ArchivedAnalysis, *_nethttp.Response, error)

ListAnalysisArchive Method for ListAnalysisArchive

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []ArchivedAnalysis

func (*ArchivesApiService) ListAnalysisArchiveRules

func (a *ArchivesApiService) ListAnalysisArchiveRules(ctx _context.Context, localVarOptionals *ListAnalysisArchiveRulesOpts) ([]AnalysisArchiveTransitionRule, *_nethttp.Response, error)

ListAnalysisArchiveRules Method for ListAnalysisArchiveRules

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ListAnalysisArchiveRulesOpts - Optional Parameters:
  • @param "SystemGlobal" (optional.Bool) - If true include system global rules (owned by admin) even for non-admin users. Defaults to true if not set. Can be set to false to exclude globals

@return []AnalysisArchiveTransitionRule

func (*ArchivesApiService) ListArchives

ListArchives Method for ListArchives

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return ArchiveSummary

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	Servers       []ServerConfiguration
	HTTPClient    *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerUrl

func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error)

ServerUrl returns URL based on server settings

type ContentFilesResponse

type ContentFilesResponse struct {
	Content     []ContentFilesResponseContent `json:"content,omitempty"`
	ContentType string                        `json:"content_type,omitempty"`
	ImageDigest string                        `json:"imageDigest,omitempty"`
}

ContentFilesResponse File content listings from images

type ContentFilesResponseContent

type ContentFilesResponseContent struct {
	Filename string  `json:"filename,omitempty"`
	Gid      int32   `json:"gid,omitempty"`
	Linkdest *string `json:"linkdest,omitempty"`
	Mode     string  `json:"mode,omitempty"`
	Sha256   *string `json:"sha256,omitempty"`
	Size     int32   `json:"size,omitempty"`
	Type     string  `json:"type,omitempty"`
	Uid      int32   `json:"uid,omitempty"`
}

ContentFilesResponseContent struct for ContentFilesResponseContent

type ContentJavaPackageResponse

type ContentJavaPackageResponse struct {
	Content     []ContentJavaPackageResponseContent `json:"content,omitempty"`
	ContentType string                              `json:"content_type,omitempty"`
	ImageDigest string                              `json:"imageDigest,omitempty"`
}

ContentJavaPackageResponse Java package content listings from images

type ContentJavaPackageResponseContent

type ContentJavaPackageResponseContent struct {
	ImplementationVersion string `json:"implementation-version,omitempty"`
	Location              string `json:"location,omitempty"`
	MavenVersion          string `json:"maven-version,omitempty"`
	Origin                string `json:"origin,omitempty"`
	Package               string `json:"package,omitempty"`
	SpecificationVersion  string `json:"specification-version,omitempty"`
	Type                  string `json:"type,omitempty"`
}

ContentJavaPackageResponseContent struct for ContentJavaPackageResponseContent

type ContentMalwareResponse

type ContentMalwareResponse struct {
	// List of malware scan results, one per scanner configured to run
	Content     []MalwareScan `json:"content,omitempty"`
	ContentType string        `json:"content_type,omitempty"`
	ImageDigest string        `json:"imageDigest,omitempty"`
}

ContentMalwareResponse Malware listing response

type ContentPackageResponse

type ContentPackageResponse struct {
	Content     []ContentPackageResponseContent `json:"content,omitempty"`
	ContentType string                          `json:"content_type,omitempty"`
	ImageDigest string                          `json:"imageDigest,omitempty"`
}

ContentPackageResponse Package content listings from images

type ContentPackageResponseContent

type ContentPackageResponseContent struct {
	// Deprecated in favor of the 'licenses' field\"
	License  string   `json:"license,omitempty"`
	Licenses []string `json:"licenses,omitempty"`
	Location string   `json:"location,omitempty"`
	Origin   string   `json:"origin,omitempty"`
	Package  string   `json:"package,omitempty"`
	Size     string   `json:"size,omitempty"`
	Type     string   `json:"type,omitempty"`
	Version  string   `json:"version,omitempty"`
}

ContentPackageResponseContent struct for ContentPackageResponseContent

type ContentResponse

type ContentResponse struct {
	Content     []map[string]interface{} `json:"content,omitempty"`
	ContentType string                   `json:"content_type,omitempty"`
	ImageDigest string                   `json:"imageDigest,omitempty"`
}

ContentResponse Generic wrapper for content listings from images

type CreateRegistryOpts

type CreateRegistryOpts struct {
	Validate        optional.Bool
	XAnchoreAccount optional.String
}

CreateRegistryOpts Optional parameters for the method 'CreateRegistry'

type Cvssv2Scores

type Cvssv2Scores struct {
	BaseScore           *float32 `json:"base_score,omitempty"`
	ExploitabilityScore *float32 `json:"exploitability_score,omitempty"`
	ImpactScore         *float32 `json:"impact_score,omitempty"`
}

Cvssv2Scores struct for Cvssv2Scores

type Cvssv3Scores

type Cvssv3Scores struct {
	BaseScore           *float32 `json:"base_score,omitempty"`
	ExploitabilityScore *float32 `json:"exploitability_score,omitempty"`
	ImpactScore         *float32 `json:"impact_score,omitempty"`
}

Cvssv3Scores struct for Cvssv3Scores

type DefaultApiService

type DefaultApiService service

DefaultApiService DefaultApi service

func (*DefaultApiService) GetOauthToken

GetOauthToken Method for GetOauthToken Request a jwt token for subsequent operations, this request is authenticated with normal HTTP auth

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return TokenResponse

func (*DefaultApiService) HealthCheck

func (a *DefaultApiService) HealthCheck(ctx _context.Context) (*_nethttp.Response, error)

HealthCheck Method for HealthCheck Health check, returns 200 and no body if service is running

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

func (*DefaultApiService) ListFileContentSearchResults

func (a *DefaultApiService) ListFileContentSearchResults(ctx _context.Context, imageDigest string) ([]FileContentSearchResult, *_nethttp.Response, error)

ListFileContentSearchResults Return a list of analyzer artifacts of the specified type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest

@return []FileContentSearchResult

func (*DefaultApiService) ListRetrievedFiles

func (a *DefaultApiService) ListRetrievedFiles(ctx _context.Context, imageDigest string) ([]RetrievedFile, *_nethttp.Response, error)

ListRetrievedFiles Return a list of analyzer artifacts of the specified type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest

@return []RetrievedFile

func (*DefaultApiService) ListSecretSearchResults

func (a *DefaultApiService) ListSecretSearchResults(ctx _context.Context, imageDigest string) ([]SecretSearchResult, *_nethttp.Response, error)

ListSecretSearchResults Return a list of analyzer artifacts of the specified type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest

@return []SecretSearchResult

func (*DefaultApiService) Ping

Ping Method for Ping Simple status check

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return string

func (*DefaultApiService) VersionCheck

VersionCheck Method for VersionCheck Returns the version object for the service, including db schema version info

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return ServiceVersion

type DeleteArchivedAnalysisOpts

type DeleteArchivedAnalysisOpts struct {
	Force optional.Bool
}

DeleteArchivedAnalysisOpts Optional parameters for the method 'DeleteArchivedAnalysis'

type DeleteEventOpts

type DeleteEventOpts struct {
	XAnchoreAccount optional.String
}

DeleteEventOpts Optional parameters for the method 'DeleteEvent'

type DeleteEventsOpts

type DeleteEventsOpts struct {
	Before          optional.String
	Since           optional.String
	Level           optional.String
	XAnchoreAccount optional.String
}

DeleteEventsOpts Optional parameters for the method 'DeleteEvents'

type DeleteImageByImageIdOpts

type DeleteImageByImageIdOpts struct {
	Force           optional.Bool
	XAnchoreAccount optional.String
}

DeleteImageByImageIdOpts Optional parameters for the method 'DeleteImageByImageId'

type DeleteImageOpts

type DeleteImageOpts struct {
	Force           optional.Bool
	XAnchoreAccount optional.String
}

DeleteImageOpts Optional parameters for the method 'DeleteImage'

type DeleteImageResponse

type DeleteImageResponse struct {
	Detail string `json:"detail,omitempty"`
	Digest string `json:"digest"`
	// Current status of the image deletion
	Status string `json:"status"`
}

DeleteImageResponse Image deletion response containing status and details

type DeleteImagesAsyncOpts

type DeleteImagesAsyncOpts struct {
	Force           optional.Bool
	XAnchoreAccount optional.String
}

DeleteImagesAsyncOpts Optional parameters for the method 'DeleteImagesAsync'

type DeletePolicyOpts

type DeletePolicyOpts struct {
	XAnchoreAccount optional.String
}

DeletePolicyOpts Optional parameters for the method 'DeletePolicy'

type DeleteRegistryOpts

type DeleteRegistryOpts struct {
	XAnchoreAccount optional.String
}

DeleteRegistryOpts Optional parameters for the method 'DeleteRegistry'

type DeleteSubscriptionOpts

type DeleteSubscriptionOpts struct {
	XAnchoreAccount optional.String
}

DeleteSubscriptionOpts Optional parameters for the method 'DeleteSubscription'

type EventCategory

type EventCategory struct {
	Category      string             `json:"category,omitempty"`
	Description   string             `json:"description,omitempty"`
	Subcategories []EventSubcategory `json:"subcategories,omitempty"`
}

EventCategory A collection of event subcategories

type EventDescription

type EventDescription struct {
	// The message associated with the event type
	Message string `json:"message,omitempty"`
	// The event type. The last component of the fully-qualified event_type (category.subcategory.event)
	Name string `json:"name,omitempty"`
	// The type of resource this event is generated from
	ResourceType string `json:"resource_type,omitempty"`
	// The fully qualified event type as would be seen in the event payload
	Type string `json:"type,omitempty"`
}

EventDescription A description of an event type

type EventResponse

type EventResponse struct {
	CreatedAt     time.Time          `json:"created_at,omitempty"`
	Event         EventResponseEvent `json:"event,omitempty"`
	GeneratedUuid string             `json:"generated_uuid,omitempty"`
}

EventResponse A record of occurance of an asynchronous event triggered either by system or by user activity

type EventResponseEvent

type EventResponseEvent struct {
	Category  string                     `json:"category,omitempty"`
	Details   map[string]interface{}     `json:"details,omitempty"`
	Level     string                     `json:"level,omitempty"`
	Message   string                     `json:"message,omitempty"`
	Resource  EventResponseEventResource `json:"resource,omitempty"`
	Source    EventResponseEventSource   `json:"source,omitempty"`
	Timestamp time.Time                  `json:"timestamp,omitempty"`
	Type      string                     `json:"type,omitempty"`
}

EventResponseEvent struct for EventResponseEvent

type EventResponseEventResource

type EventResponseEventResource struct {
	Id     string `json:"id,omitempty"`
	Type   string `json:"type,omitempty"`
	UserId string `json:"user_id,omitempty"`
}

EventResponseEventResource struct for EventResponseEventResource

type EventResponseEventSource

type EventResponseEventSource struct {
	BaseUrl     string `json:"base_url,omitempty"`
	Hostid      string `json:"hostid,omitempty"`
	RequestId   string `json:"request_id,omitempty"`
	Servicename string `json:"servicename,omitempty"`
}

EventResponseEventSource struct for EventResponseEventSource

type EventSubcategory

type EventSubcategory struct {
	Description string             `json:"description,omitempty"`
	Events      []EventDescription `json:"events,omitempty"`
	Name        string             `json:"name,omitempty"`
}

EventSubcategory A collection of events related to each other

type EventsApiService

type EventsApiService service

EventsApiService EventsApi service

func (*EventsApiService) DeleteEvent

func (a *EventsApiService) DeleteEvent(ctx _context.Context, eventId string, localVarOptionals *DeleteEventOpts) (*_nethttp.Response, error)

DeleteEvent Delete Event Delete an event by its event ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param eventId Event ID of the event to be deleted
  • @param optional nil or *DeleteEventOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

func (*EventsApiService) DeleteEvents

func (a *EventsApiService) DeleteEvents(ctx _context.Context, localVarOptionals *DeleteEventsOpts) ([]string, *_nethttp.Response, error)

DeleteEvents Delete Events Delete all or a subset of events filtered using the optional query parameters

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *DeleteEventsOpts - Optional Parameters:
  • @param "Before" (optional.String) - Delete events that occurred before the timestamp
  • @param "Since" (optional.String) - Delete events that occurred after the timestamp
  • @param "Level" (optional.String) - Delete events that match the level - INFO or ERROR
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*EventsApiService) GetEvent

func (a *EventsApiService) GetEvent(ctx _context.Context, eventId string, localVarOptionals *GetEventOpts) (EventResponse, *_nethttp.Response, error)

GetEvent Get Event Lookup an event by its event ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param eventId Event ID of the event for lookup
  • @param optional nil or *GetEventOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return EventResponse

func (*EventsApiService) ListEventTypes

func (a *EventsApiService) ListEventTypes(ctx _context.Context) ([]EventCategory, *_nethttp.Response, error)

ListEventTypes List Event Types Returns list of event types in the category hierarchy

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []EventCategory

func (*EventsApiService) ListEvents

func (a *EventsApiService) ListEvents(ctx _context.Context, localVarOptionals *ListEventsOpts) (EventsList, *_nethttp.Response, error)

ListEvents List Events Returns a paginated list of events in the descending order of their occurrence. Optional query parameters may be used for filtering results

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ListEventsOpts - Optional Parameters:
  • @param "SourceServicename" (optional.String) - Filter events by the originating service
  • @param "SourceHostid" (optional.String) - Filter events by the originating host ID
  • @param "EventType" (optional.String) - Filter events by a prefix match on the event type (e.g. \"user.image.\")
  • @param "ResourceType" (optional.String) - Filter events by the type of resource - tag, imageDigest, repository etc
  • @param "ResourceId" (optional.String) - Filter events by the id of the resource
  • @param "Level" (optional.String) - Filter events by the level - INFO or ERROR
  • @param "Since" (optional.String) - Return events that occurred after the timestamp
  • @param "Before" (optional.String) - Return events that occurred before the timestamp
  • @param "Page" (optional.Int32) - Pagination controls - return the nth page of results. Defaults to first page if left empty
  • @param "Limit" (optional.Int32) - Number of events in the result set. Defaults to 100 if left empty
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return EventsList

type EventsList

type EventsList struct {
	// Number of events in this page
	ItemCount int32 `json:"item_count,omitempty"`
	// Boolean flag, True indicates there are more events and False otherwise
	NextPage bool `json:"next_page,omitempty"`
	// Page number of this result set
	Page int32 `json:"page,omitempty"`
	// List of events
	Results []EventResponse `json:"results,omitempty"`
}

EventsList Response envelope for paginated listing of events

type FeedGroupMetadata

type FeedGroupMetadata struct {
	CreatedAt   time.Time `json:"created_at,omitempty"`
	LastSync    time.Time `json:"last_sync,omitempty"`
	Name        string    `json:"name,omitempty"`
	RecordCount int32     `json:"record_count,omitempty"`
}

FeedGroupMetadata struct for FeedGroupMetadata

type FeedMetadata

type FeedMetadata struct {
	// Date the metadata record was created in engine (first seen on source)
	CreatedAt    time.Time           `json:"created_at,omitempty"`
	Groups       []FeedGroupMetadata `json:"groups,omitempty"`
	LastFullSync time.Time           `json:"last_full_sync,omitempty"`
	// name of the feed
	Name string `json:"name,omitempty"`
	// Date the metadata was last updated
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

FeedMetadata Metadata on a single feed based on what the engine finds from querying the endpoints

type FeedSyncResult

type FeedSyncResult struct {
	// The name of the feed synced
	Feed string `json:"feed,omitempty"`
	// Array of group sync results
	Groups []GroupSyncResult `json:"groups,omitempty"`
	// The result of the sync operations, either co
	Status string `json:"status,omitempty"`
	// The duratin, in seconds, of the sync of the feed, the sum of all the group syncs
	TotalTimeSeconds float32 `json:"total_time_seconds,omitempty"`
}

FeedSyncResult The result of a sync of a single feed

type FileContentSearchResult

type FileContentSearchResult struct {
	Matches []RegexContentMatch `json:"matches,omitempty"`
	Path    string              `json:"path,omitempty"`
}

FileContentSearchResult The retrieved file entry including content (b64 encoded)

type GateSpec

type GateSpec struct {
	// Description of the gate
	Description string `json:"description,omitempty"`
	// Gate name, as it would appear in a policy document
	Name string `json:"name,omitempty"`
	// State of the gate and transitively all triggers it contains if not 'active'
	State string `json:"state,omitempty"`
	// The name of another trigger that supercedes this on functionally if this is deprecated
	SupercededBy *string `json:"superceded_by,omitempty"`
	// List of the triggers that can fire for this Gate
	Triggers []TriggerSpec `json:"triggers,omitempty"`
}

GateSpec A description of the set of gates available in this engine and the triggers and parameters supported

type GenericOpenAPIError

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

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type GetEventOpts

type GetEventOpts struct {
	XAnchoreAccount optional.String
}

GetEventOpts Optional parameters for the method 'GetEvent'

type GetImageByImageIdOpts

type GetImageByImageIdOpts struct {
	XAnchoreAccount optional.String
}

GetImageByImageIdOpts Optional parameters for the method 'GetImageByImageId'

type GetImageContentByTypeFilesOpts

type GetImageContentByTypeFilesOpts struct {
	XAnchoreAccount optional.String
}

GetImageContentByTypeFilesOpts Optional parameters for the method 'GetImageContentByTypeFiles'

type GetImageContentByTypeImageIdFilesOpts

type GetImageContentByTypeImageIdFilesOpts struct {
	XAnchoreAccount optional.String
}

GetImageContentByTypeImageIdFilesOpts Optional parameters for the method 'GetImageContentByTypeImageIdFiles'

type GetImageContentByTypeImageIdJavapackageOpts

type GetImageContentByTypeImageIdJavapackageOpts struct {
	XAnchoreAccount optional.String
}

GetImageContentByTypeImageIdJavapackageOpts Optional parameters for the method 'GetImageContentByTypeImageIdJavapackage'

type GetImageContentByTypeImageIdOpts

type GetImageContentByTypeImageIdOpts struct {
	XAnchoreAccount optional.String
}

GetImageContentByTypeImageIdOpts Optional parameters for the method 'GetImageContentByTypeImageId'

type GetImageContentByTypeJavapackageOpts

type GetImageContentByTypeJavapackageOpts struct {
	XAnchoreAccount optional.String
}

GetImageContentByTypeJavapackageOpts Optional parameters for the method 'GetImageContentByTypeJavapackage'

type GetImageContentByTypeMalwareOpts

type GetImageContentByTypeMalwareOpts struct {
	XAnchoreAccount optional.String
}

GetImageContentByTypeMalwareOpts Optional parameters for the method 'GetImageContentByTypeMalware'

type GetImageContentByTypeOpts

type GetImageContentByTypeOpts struct {
	XAnchoreAccount optional.String
}

GetImageContentByTypeOpts Optional parameters for the method 'GetImageContentByType'

type GetImageMetadataByTypeOpts

type GetImageMetadataByTypeOpts struct {
	XAnchoreAccount optional.String
}

GetImageMetadataByTypeOpts Optional parameters for the method 'GetImageMetadataByType'

type GetImageOpts

type GetImageOpts struct {
	XAnchoreAccount optional.String
}

GetImageOpts Optional parameters for the method 'GetImage'

type GetImagePolicyCheckByImageIdOpts

type GetImagePolicyCheckByImageIdOpts struct {
	PolicyId        optional.String
	Detail          optional.Bool
	History         optional.Bool
	XAnchoreAccount optional.String
}

GetImagePolicyCheckByImageIdOpts Optional parameters for the method 'GetImagePolicyCheckByImageId'

type GetImagePolicyCheckOpts

type GetImagePolicyCheckOpts struct {
	PolicyId        optional.String
	Detail          optional.Bool
	History         optional.Bool
	Interactive     optional.Bool
	XAnchoreAccount optional.String
}

GetImagePolicyCheckOpts Optional parameters for the method 'GetImagePolicyCheck'

type GetImageVulnerabilitiesByTypeImageIdOpts

type GetImageVulnerabilitiesByTypeImageIdOpts struct {
	XAnchoreAccount optional.String
}

GetImageVulnerabilitiesByTypeImageIdOpts Optional parameters for the method 'GetImageVulnerabilitiesByTypeImageId'

type GetImageVulnerabilitiesByTypeOpts

type GetImageVulnerabilitiesByTypeOpts struct {
	ForceRefresh    optional.Bool
	VendorOnly      optional.Bool
	XAnchoreAccount optional.String
}

GetImageVulnerabilitiesByTypeOpts Optional parameters for the method 'GetImageVulnerabilitiesByType'

type GetImageVulnerabilityTypesByImageIdOpts

type GetImageVulnerabilityTypesByImageIdOpts struct {
	XAnchoreAccount optional.String
}

GetImageVulnerabilityTypesByImageIdOpts Optional parameters for the method 'GetImageVulnerabilityTypesByImageId'

type GetImageVulnerabilityTypesOpts

type GetImageVulnerabilityTypesOpts struct {
	XAnchoreAccount optional.String
}

GetImageVulnerabilityTypesOpts Optional parameters for the method 'GetImageVulnerabilityTypes'

type GetPolicyOpts

type GetPolicyOpts struct {
	Detail          optional.Bool
	XAnchoreAccount optional.String
}

GetPolicyOpts Optional parameters for the method 'GetPolicy'

type GetRegistryOpts

type GetRegistryOpts struct {
	XAnchoreAccount optional.String
}

GetRegistryOpts Optional parameters for the method 'GetRegistry'

type GetSubscriptionOpts

type GetSubscriptionOpts struct {
	XAnchoreAccount optional.String
}

GetSubscriptionOpts Optional parameters for the method 'GetSubscription'

type GroupSyncResult

type GroupSyncResult struct {
	// The name of the group
	Group  string `json:"group,omitempty"`
	Status string `json:"status,omitempty"`
	// The duration of the group sync in seconds
	TotalTimeSeconds float32 `json:"total_time_seconds,omitempty"`
	// The number of images updated by the this group sync, across all accounts. This is typically only non-zero for vulnerability feeds which update images' vulnerability results during the sync.
	UpdatedImageCount int32 `json:"updated_image_count,omitempty"`
	// The number of feed data records synced down as either updates or new records
	UpdatedRecordCount int32 `json:"updated_record_count,omitempty"`
}

GroupSyncResult struct for GroupSyncResult

type IdentityApiService

type IdentityApiService service

IdentityApiService IdentityApi service

func (*IdentityApiService) AddCredential

func (a *IdentityApiService) AddCredential(ctx _context.Context, credential AccessCredential) (User, *_nethttp.Response, error)

AddCredential add/replace credential

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param credential

@return User

func (*IdentityApiService) GetCredentials

GetCredentials Get current credential summary

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []AccessCredential

func (*IdentityApiService) GetUser

GetUser List authenticated user info

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return User

func (*IdentityApiService) GetUsersAccount

func (a *IdentityApiService) GetUsersAccount(ctx _context.Context) (Account, *_nethttp.Response, error)

GetUsersAccount List the account for the authenticated user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Account

type ImageAnalysisRequest

type ImageAnalysisRequest struct {
	// Annotations to be associated with the added image in key/value form
	Annotations map[string]interface{} `json:"annotations,omitempty"`
	// Optional override of the image creation time, only honored when both tag and digest are also supplied  e.g. 2018-10-17T18:14:00Z. Deprecated in favor of the 'source' field
	CreatedAt time.Time `json:"created_at,omitempty"`
	// A digest string for an image, maybe a pull string or just a digest. e.g. nginx@sha256:123 or sha256:abc123. If a pull string, it must have same regisry/repo as the tag field. Deprecated in favor of the 'source' field
	Digest string `json:"digest,omitempty"`
	// Base64 encoded content of the dockerfile for the image, if available. Deprecated in favor of the 'source' field.
	Dockerfile string `json:"dockerfile,omitempty"`
	// Optional. The type of image this is adding, defaults to \"docker\". This can be ommitted until multiple image types are supported.
	ImageType string      `json:"image_type,omitempty"`
	Source    ImageSource `json:"source,omitempty"`
	// Full pullable tag reference for image. e.g. docker.io/nginx:latest. Deprecated in favor of the 'source' field
	Tag string `json:"tag,omitempty"`
}

ImageAnalysisRequest A request to add an image to be watched and analyzed by the engine. Optionally include the dockerfile content. Either source, digest or tag must be present.

type ImageContentApiService

type ImageContentApiService service

ImageContentApiService ImageContentApi service

func (*ImageContentApiService) GetImageContentByType

func (a *ImageContentApiService) GetImageContentByType(ctx _context.Context, imageDigest string, ctype string, localVarOptionals *GetImageContentByTypeOpts) (ContentPackageResponse, *_nethttp.Response, error)

GetImageContentByType Get the content of an image by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param ctype
  • @param optional nil or *GetImageContentByTypeOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentPackageResponse

func (*ImageContentApiService) GetImageContentByTypeFiles

func (a *ImageContentApiService) GetImageContentByTypeFiles(ctx _context.Context, imageDigest string, localVarOptionals *GetImageContentByTypeFilesOpts) (ContentFilesResponse, *_nethttp.Response, error)

GetImageContentByTypeFiles Get the content of an image by type files

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageContentByTypeFilesOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentFilesResponse

func (*ImageContentApiService) GetImageContentByTypeImageId

func (a *ImageContentApiService) GetImageContentByTypeImageId(ctx _context.Context, imageId string, ctype string, localVarOptionals *GetImageContentByTypeImageIdOpts) (ContentPackageResponse, *_nethttp.Response, error)

GetImageContentByTypeImageId Get the content of an image by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param ctype
  • @param optional nil or *GetImageContentByTypeImageIdOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentPackageResponse

func (*ImageContentApiService) GetImageContentByTypeImageIdFiles

func (a *ImageContentApiService) GetImageContentByTypeImageIdFiles(ctx _context.Context, imageId string, localVarOptionals *GetImageContentByTypeImageIdFilesOpts) (ContentFilesResponse, *_nethttp.Response, error)

GetImageContentByTypeImageIdFiles Get the content of an image by type files

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *GetImageContentByTypeImageIdFilesOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentFilesResponse

func (*ImageContentApiService) GetImageContentByTypeImageIdJavapackage

func (a *ImageContentApiService) GetImageContentByTypeImageIdJavapackage(ctx _context.Context, imageId string, localVarOptionals *GetImageContentByTypeImageIdJavapackageOpts) (ContentJavaPackageResponse, *_nethttp.Response, error)

GetImageContentByTypeImageIdJavapackage Get the content of an image by type java

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *GetImageContentByTypeImageIdJavapackageOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentJavaPackageResponse

func (*ImageContentApiService) GetImageContentByTypeJavapackage

func (a *ImageContentApiService) GetImageContentByTypeJavapackage(ctx _context.Context, imageDigest string, localVarOptionals *GetImageContentByTypeJavapackageOpts) (ContentJavaPackageResponse, *_nethttp.Response, error)

GetImageContentByTypeJavapackage Get the content of an image by type java

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageContentByTypeJavapackageOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentJavaPackageResponse

func (*ImageContentApiService) GetImageContentByTypeMalware

func (a *ImageContentApiService) GetImageContentByTypeMalware(ctx _context.Context, imageDigest string, localVarOptionals *GetImageContentByTypeMalwareOpts) (ContentMalwareResponse, *_nethttp.Response, error)

GetImageContentByTypeMalware Get the content of an image by type malware

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageContentByTypeMalwareOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentMalwareResponse

func (*ImageContentApiService) ListImageContent

func (a *ImageContentApiService) ListImageContent(ctx _context.Context, imageDigest string, localVarOptionals *ListImageContentOpts) ([]string, *_nethttp.Response, error)

ListImageContent List image content types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *ListImageContentOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*ImageContentApiService) ListImageContentByImageid

func (a *ImageContentApiService) ListImageContentByImageid(ctx _context.Context, imageId string, localVarOptionals *ListImageContentByImageidOpts) ([]string, *_nethttp.Response, error)

ListImageContentByImageid List image content types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *ListImageContentByImageidOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

type ImageDetail

type ImageDetail struct {
	CreatedAt  time.Time `json:"created_at,omitempty"`
	Dockerfile *string   `json:"dockerfile,omitempty"`
	// Full docker-pullable digest string including the registry url and repository necessary get the image
	Fulldigest string `json:"fulldigest,omitempty"`
	// Full docker-pullable tag string referencing the image
	Fulltag string `json:"fulltag,omitempty"`
	// The parent Anchore Image record to which this detail maps
	ImageDigest string    `json:"imageDigest,omitempty"`
	ImageId     string    `json:"imageId,omitempty"`
	LastUpdated time.Time `json:"last_updated,omitempty"`
	Registry    string    `json:"registry,omitempty"`
	Repo        string    `json:"repo,omitempty"`
	UserId      string    `json:"userId,omitempty"`
}

ImageDetail A metadata detail record for a specific image. Multiple detail records may map a single catalog image.

type ImageFilter

type ImageFilter struct {
	Digest string `json:"digest,omitempty"`
	Tag    string `json:"tag,omitempty"`
}

ImageFilter Filter for an image list by id, tag, or digest, but not both

type ImageRef

type ImageRef struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

ImageRef A reference to an image

type ImageReference

type ImageReference struct {
	// Timestamp, in rfc3339 format, indicating when the image state became 'analyzed' in Anchore Engine.
	AnalyzedAt string `json:"analyzed_at,omitempty"`
	// The image digest
	Digest string `json:"digest,omitempty"`
	// The image id if available
	Id         string     `json:"id,omitempty"`
	TagHistory []TagEntry `json:"tag_history,omitempty"`
}

ImageReference A summary of an image identity, including digest, id (if available), and any tags known to have ever been mapped to the digest

type ImageSelectionRule

type ImageSelectionRule struct {
	Id         string   `json:"id,omitempty"`
	Image      ImageRef `json:"image"`
	Name       string   `json:"name"`
	Registry   string   `json:"registry"`
	Repository string   `json:"repository"`
}

ImageSelectionRule struct for ImageSelectionRule

type ImageSelector

type ImageSelector struct {
	// The registry section of a pull string. e.g. with \"docker.io/anchore/anchore-engine:latest\", this is \"docker.io\"
	Registry string `json:"registry,omitempty"`
	// The repository section of a pull string. e.g. with \"docker.io/anchore/anchore-engine:latest\", this is \"anchore/anchore-engine\"
	Repository string `json:"repository,omitempty"`
	// The tag-only section of a pull string. e.g. with \"docker.io/anchore/anchore-engine:latest\", this is \"latest\"
	Tag string `json:"tag,omitempty"`
}

ImageSelector A set of selection criteria to match an image by a tagged pullstring based on its components, with regex support in each field

type ImageSource

type ImageSource struct {
	Archive *AnalysisArchiveSource `json:"archive,omitempty"`
	Digest  *RegistryDigestSource  `json:"digest,omitempty"`
	Tag     *RegistryTagSource     `json:"tag,omitempty"`
}

ImageSource A set of analysis source types. Only one may be set in any given request.

type ImageWithPackages

type ImageWithPackages struct {
	Image    ImageReference     `json:"image,omitempty"`
	Packages []PackageReference `json:"packages,omitempty"`
}

ImageWithPackages An image record that contains packages

type ImagesApiService

type ImagesApiService service

ImagesApiService ImagesApi service

func (*ImagesApiService) AddImage

func (a *ImagesApiService) AddImage(ctx _context.Context, image ImageAnalysisRequest, localVarOptionals *AddImageOpts) ([]AnchoreImage, *_nethttp.Response, error)

AddImage Submit a new image for analysis by the engine Creates a new analysis task that is executed asynchronously

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param image
  • @param optional nil or *AddImageOpts - Optional Parameters:
  • @param "Force" (optional.Bool) - Override any existing entry in the system
  • @param "Autosubscribe" (optional.Bool) - Instruct engine to automatically begin watching the added tag for updates from registry
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []AnchoreImage

func (*ImagesApiService) DeleteImage

func (a *ImagesApiService) DeleteImage(ctx _context.Context, imageDigest string, localVarOptionals *DeleteImageOpts) (DeleteImageResponse, *_nethttp.Response, error)

DeleteImage Delete an image analysis

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *DeleteImageOpts - Optional Parameters:
  • @param "Force" (optional.Bool) -
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return DeleteImageResponse

func (*ImagesApiService) DeleteImageByImageId

func (a *ImagesApiService) DeleteImageByImageId(ctx _context.Context, imageId string, localVarOptionals *DeleteImageByImageIdOpts) (DeleteImageResponse, *_nethttp.Response, error)

DeleteImageByImageId Delete image by docker imageId

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *DeleteImageByImageIdOpts - Optional Parameters:
  • @param "Force" (optional.Bool) -
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return DeleteImageResponse

func (*ImagesApiService) DeleteImagesAsync

func (a *ImagesApiService) DeleteImagesAsync(ctx _context.Context, imageDigests []string, localVarOptionals *DeleteImagesAsyncOpts) ([]DeleteImageResponse, *_nethttp.Response, error)

DeleteImagesAsync Bulk mark images for deletion Delete analysis for image digests in the list asynchronously

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigests
  • @param optional nil or *DeleteImagesAsyncOpts - Optional Parameters:
  • @param "Force" (optional.Bool) -
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []DeleteImageResponse

func (*ImagesApiService) GetImage

func (a *ImagesApiService) GetImage(ctx _context.Context, imageDigest string, localVarOptionals *GetImageOpts) ([]AnchoreImage, *_nethttp.Response, error)

GetImage Get image metadata

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []AnchoreImage

func (*ImagesApiService) GetImageByImageId

func (a *ImagesApiService) GetImageByImageId(ctx _context.Context, imageId string, localVarOptionals *GetImageByImageIdOpts) ([]AnchoreImage, *_nethttp.Response, error)

GetImageByImageId Lookup image by docker imageId

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *GetImageByImageIdOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []AnchoreImage

func (*ImagesApiService) GetImageContentByType

func (a *ImagesApiService) GetImageContentByType(ctx _context.Context, imageDigest string, ctype string, localVarOptionals *GetImageContentByTypeOpts) (ContentPackageResponse, *_nethttp.Response, error)

GetImageContentByType Get the content of an image by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param ctype
  • @param optional nil or *GetImageContentByTypeOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentPackageResponse

func (*ImagesApiService) GetImageContentByTypeFiles

func (a *ImagesApiService) GetImageContentByTypeFiles(ctx _context.Context, imageDigest string, localVarOptionals *GetImageContentByTypeFilesOpts) (ContentFilesResponse, *_nethttp.Response, error)

GetImageContentByTypeFiles Get the content of an image by type files

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageContentByTypeFilesOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentFilesResponse

func (*ImagesApiService) GetImageContentByTypeImageId

func (a *ImagesApiService) GetImageContentByTypeImageId(ctx _context.Context, imageId string, ctype string, localVarOptionals *GetImageContentByTypeImageIdOpts) (ContentPackageResponse, *_nethttp.Response, error)

GetImageContentByTypeImageId Get the content of an image by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param ctype
  • @param optional nil or *GetImageContentByTypeImageIdOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentPackageResponse

func (*ImagesApiService) GetImageContentByTypeImageIdFiles

func (a *ImagesApiService) GetImageContentByTypeImageIdFiles(ctx _context.Context, imageId string, localVarOptionals *GetImageContentByTypeImageIdFilesOpts) (ContentFilesResponse, *_nethttp.Response, error)

GetImageContentByTypeImageIdFiles Get the content of an image by type files

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *GetImageContentByTypeImageIdFilesOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentFilesResponse

func (*ImagesApiService) GetImageContentByTypeImageIdJavapackage

func (a *ImagesApiService) GetImageContentByTypeImageIdJavapackage(ctx _context.Context, imageId string, localVarOptionals *GetImageContentByTypeImageIdJavapackageOpts) (ContentJavaPackageResponse, *_nethttp.Response, error)

GetImageContentByTypeImageIdJavapackage Get the content of an image by type java

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *GetImageContentByTypeImageIdJavapackageOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentJavaPackageResponse

func (*ImagesApiService) GetImageContentByTypeJavapackage

func (a *ImagesApiService) GetImageContentByTypeJavapackage(ctx _context.Context, imageDigest string, localVarOptionals *GetImageContentByTypeJavapackageOpts) (ContentJavaPackageResponse, *_nethttp.Response, error)

GetImageContentByTypeJavapackage Get the content of an image by type java

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageContentByTypeJavapackageOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentJavaPackageResponse

func (*ImagesApiService) GetImageContentByTypeMalware

func (a *ImagesApiService) GetImageContentByTypeMalware(ctx _context.Context, imageDigest string, localVarOptionals *GetImageContentByTypeMalwareOpts) (ContentMalwareResponse, *_nethttp.Response, error)

GetImageContentByTypeMalware Get the content of an image by type malware

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageContentByTypeMalwareOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentMalwareResponse

func (*ImagesApiService) GetImageMetadataByType

func (a *ImagesApiService) GetImageMetadataByType(ctx _context.Context, imageDigest string, mtype string, localVarOptionals *GetImageMetadataByTypeOpts) (MetadataResponse, *_nethttp.Response, error)

GetImageMetadataByType Get the metadata of an image by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param mtype
  • @param optional nil or *GetImageMetadataByTypeOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return MetadataResponse

func (*ImagesApiService) GetImagePolicyCheck

func (a *ImagesApiService) GetImagePolicyCheck(ctx _context.Context, imageDigest string, tag string, localVarOptionals *GetImagePolicyCheckOpts) ([]map[string]interface{}, *_nethttp.Response, error)

GetImagePolicyCheck Check policy evaluation status for image Get the policy evaluation for the given image

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param tag
  • @param optional nil or *GetImagePolicyCheckOpts - Optional Parameters:
  • @param "PolicyId" (optional.String) -
  • @param "Detail" (optional.Bool) -
  • @param "History" (optional.Bool) -
  • @param "Interactive" (optional.Bool) -
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []map[string]interface{}

func (*ImagesApiService) GetImagePolicyCheckByImageId

func (a *ImagesApiService) GetImagePolicyCheckByImageId(ctx _context.Context, imageId string, tag string, localVarOptionals *GetImagePolicyCheckByImageIdOpts) ([]map[string]interface{}, *_nethttp.Response, error)

GetImagePolicyCheckByImageId Check policy evaluation status for image Get the policy evaluation for the given image

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param tag
  • @param optional nil or *GetImagePolicyCheckByImageIdOpts - Optional Parameters:
  • @param "PolicyId" (optional.String) -
  • @param "Detail" (optional.Bool) -
  • @param "History" (optional.Bool) -
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []map[string]interface{}

func (*ImagesApiService) GetImageVulnerabilitiesByType

func (a *ImagesApiService) GetImageVulnerabilitiesByType(ctx _context.Context, imageDigest string, vtype string, localVarOptionals *GetImageVulnerabilitiesByTypeOpts) (VulnerabilityResponse, *_nethttp.Response, error)

GetImageVulnerabilitiesByType Get vulnerabilities by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param vtype
  • @param optional nil or *GetImageVulnerabilitiesByTypeOpts - Optional Parameters:
  • @param "ForceRefresh" (optional.Bool) -
  • @param "VendorOnly" (optional.Bool) -
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return VulnerabilityResponse

func (*ImagesApiService) GetImageVulnerabilitiesByTypeImageId

func (a *ImagesApiService) GetImageVulnerabilitiesByTypeImageId(ctx _context.Context, imageId string, vtype string, localVarOptionals *GetImageVulnerabilitiesByTypeImageIdOpts) (VulnerabilityResponse, *_nethttp.Response, error)

GetImageVulnerabilitiesByTypeImageId Get vulnerabilities by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param vtype
  • @param optional nil or *GetImageVulnerabilitiesByTypeImageIdOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return VulnerabilityResponse

func (*ImagesApiService) GetImageVulnerabilityTypes

func (a *ImagesApiService) GetImageVulnerabilityTypes(ctx _context.Context, imageDigest string, localVarOptionals *GetImageVulnerabilityTypesOpts) ([]string, *_nethttp.Response, error)

GetImageVulnerabilityTypes Get vulnerability types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageVulnerabilityTypesOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*ImagesApiService) GetImageVulnerabilityTypesByImageId

func (a *ImagesApiService) GetImageVulnerabilityTypesByImageId(ctx _context.Context, imageId string, localVarOptionals *GetImageVulnerabilityTypesByImageIdOpts) ([]string, *_nethttp.Response, error)

GetImageVulnerabilityTypesByImageId Get vulnerability types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *GetImageVulnerabilityTypesByImageIdOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*ImagesApiService) ListImageContent

func (a *ImagesApiService) ListImageContent(ctx _context.Context, imageDigest string, localVarOptionals *ListImageContentOpts) ([]string, *_nethttp.Response, error)

ListImageContent List image content types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *ListImageContentOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*ImagesApiService) ListImageContentByImageid

func (a *ImagesApiService) ListImageContentByImageid(ctx _context.Context, imageId string, localVarOptionals *ListImageContentByImageidOpts) ([]string, *_nethttp.Response, error)

ListImageContentByImageid List image content types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *ListImageContentByImageidOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*ImagesApiService) ListImageMetadata

func (a *ImagesApiService) ListImageMetadata(ctx _context.Context, imageDigest string, localVarOptionals *ListImageMetadataOpts) ([]string, *_nethttp.Response, error)

ListImageMetadata List image metadata types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *ListImageMetadataOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*ImagesApiService) ListImages

func (a *ImagesApiService) ListImages(ctx _context.Context, localVarOptionals *ListImagesOpts) ([]AnchoreImage, *_nethttp.Response, error)

ListImages List all visible images List all images visible to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ListImagesOpts - Optional Parameters:
  • @param "History" (optional.Bool) - Include image history in the response
  • @param "Fulltag" (optional.String) - Full docker-pull string to filter results by (e.g. docker.io/library/nginx:latest, or myhost.com:5000/testimages:v1.1.1)
  • @param "ImageStatus" (optional.String) - Filter by image_status value on the record. Default if omitted is 'active'.
  • @param "AnalysisStatus" (optional.String) - Filter by analysis_status value on the record.
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []AnchoreImage

type ImportApiService

type ImportApiService service

ImportApiService ImportApi service

func (*ImportApiService) ImportImageArchive

func (a *ImportApiService) ImportImageArchive(ctx _context.Context, archiveFile *os.File) ([]AnchoreImage, *_nethttp.Response, error)

ImportImageArchive Import an anchore image tar.gz archive file.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param archiveFile anchore image tar archive.

@return []AnchoreImage

type ListAccountsOpts

type ListAccountsOpts struct {
	State optional.String
}

ListAccountsOpts Optional parameters for the method 'ListAccounts'

type ListAnalysisArchiveRulesOpts

type ListAnalysisArchiveRulesOpts struct {
	SystemGlobal optional.Bool
}

ListAnalysisArchiveRulesOpts Optional parameters for the method 'ListAnalysisArchiveRules'

type ListEventsOpts

type ListEventsOpts struct {
	SourceServicename optional.String
	SourceHostid      optional.String
	EventType         optional.String
	ResourceType      optional.String
	ResourceId        optional.String
	Level             optional.String
	Since             optional.String
	Before            optional.String
	Page              optional.Int32
	Limit             optional.Int32
	XAnchoreAccount   optional.String
}

ListEventsOpts Optional parameters for the method 'ListEvents'

type ListImageContentByImageidOpts

type ListImageContentByImageidOpts struct {
	XAnchoreAccount optional.String
}

ListImageContentByImageidOpts Optional parameters for the method 'ListImageContentByImageid'

type ListImageContentOpts

type ListImageContentOpts struct {
	XAnchoreAccount optional.String
}

ListImageContentOpts Optional parameters for the method 'ListImageContent'

type ListImageMetadataOpts

type ListImageMetadataOpts struct {
	XAnchoreAccount optional.String
}

ListImageMetadataOpts Optional parameters for the method 'ListImageMetadata'

type ListImagesOpts

type ListImagesOpts struct {
	History         optional.Bool
	Fulltag         optional.String
	ImageStatus     optional.String
	AnalysisStatus  optional.String
	XAnchoreAccount optional.String
}

ListImagesOpts Optional parameters for the method 'ListImages'

type ListImagetagsOpts

type ListImagetagsOpts struct {
	ImageStatus     optional.Interface
	XAnchoreAccount optional.String
}

ListImagetagsOpts Optional parameters for the method 'ListImagetags'

type ListPoliciesOpts

type ListPoliciesOpts struct {
	Detail          optional.Bool
	XAnchoreAccount optional.String
}

ListPoliciesOpts Optional parameters for the method 'ListPolicies'

type ListRegistriesOpts

type ListRegistriesOpts struct {
	XAnchoreAccount optional.String
}

ListRegistriesOpts Optional parameters for the method 'ListRegistries'

type ListSubscriptionsOpts

type ListSubscriptionsOpts struct {
	SubscriptionKey  optional.String
	SubscriptionType optional.String
	XAnchoreAccount  optional.String
}

ListSubscriptionsOpts Optional parameters for the method 'ListSubscriptions'

type MalwareScan

type MalwareScan struct {
	// Indicates if the scanner is enabled
	Enabled  bool                  `json:"enabled,omitempty"`
	Findings []MalwareScanFindings `json:"findings,omitempty"`
	// Open schema for scanner-specific metadata related to the scan result
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	// The name of the scanner that produced the finding
	Scanner string `json:"scanner,omitempty"`
}

MalwareScan A single scan from a scanner

type MalwareScanFindings

type MalwareScanFindings struct {
	// A path for a file in the image's rootfs
	Path string `json:"path,omitempty"`
	// The malware signature found at the path
	Signature string `json:"signature,omitempty"`
}

MalwareScanFindings struct for MalwareScanFindings

type MappingRule

type MappingRule struct {
	Id    string   `json:"id,omitempty"`
	Image ImageRef `json:"image"`
	Name  string   `json:"name"`
	// Optional single policy to evalute, if set will override any value in policy_ids, for backwards compatibility. Generally, policy_ids should be used even with a array of length 1.
	PolicyId string `json:"policy_id,omitempty"`
	// List of policyIds to evaluate in order, to completion
	PolicyIds    []string `json:"policy_ids,omitempty"`
	Registry     string   `json:"registry"`
	Repository   string   `json:"repository"`
	WhitelistIds []string `json:"whitelist_ids,omitempty"`
}

MappingRule struct for MappingRule

type MetadataResponse

type MetadataResponse struct {
	ImageDigest  string                 `json:"imageDigest,omitempty"`
	Metadata     map[string]interface{} `json:"metadata,omitempty"`
	MetadataType string                 `json:"metadata_type,omitempty"`
}

MetadataResponse Generic wrapper for metadata listings from images

type NvdDataObject

type NvdDataObject struct {
	CvssV2 Cvssv2Scores `json:"cvss_v2,omitempty"`
	CvssV3 Cvssv3Scores `json:"cvss_v3,omitempty"`
	// NVD Vulnerability ID
	Id string `json:"id,omitempty"`
}

NvdDataObject struct for NvdDataObject

type PackageReference

type PackageReference struct {
	// Package name
	Name string `json:"name,omitempty"`
	// Package type (e.g. package, rpm, deb, apk, jar, npm, gem, ...)
	Type string `json:"type,omitempty"`
	// A version for the package. If null, then references all versions
	Version *string `json:"version,omitempty"`
}

PackageReference A record of a software item which is vulnerable or carries a fix for a vulnerability

type PaginatedImageList

type PaginatedImageList struct {
	// True if additional pages exist (page + 1) or False if this is the last page
	NextPage string `json:"next_page,omitempty"`
	// The page number returned (should match the requested page query string param)
	Page string `json:"page,omitempty"`
	// The number of items sent in this response
	ReturnedCount int32               `json:"returned_count,omitempty"`
	Images        []ImageWithPackages `json:"images,omitempty"`
}

PaginatedImageList Pagination wrapped list of images that match some filter

type PaginatedImageListAllOf

type PaginatedImageListAllOf struct {
	Images []ImageWithPackages `json:"images,omitempty"`
}

PaginatedImageListAllOf struct for PaginatedImageListAllOf

type PaginatedVulnerabilityList

type PaginatedVulnerabilityList struct {
	// True if additional pages exist (page + 1) or False if this is the last page
	NextPage string `json:"next_page,omitempty"`
	// The page number returned (should match the requested page query string param)
	Page string `json:"page,omitempty"`
	// The number of items sent in this response
	ReturnedCount int32 `json:"returned_count,omitempty"`
	// The listing of matching vulnerabilities for the query subject to pagination
	Vulnerabilities []StandaloneVulnerability `json:"vulnerabilities,omitempty"`
}

PaginatedVulnerabilityList A paginated listing of vulnerability records sorted by ID in descending order

type PaginatedVulnerabilityListAllOf

type PaginatedVulnerabilityListAllOf struct {
	// The listing of matching vulnerabilities for the query subject to pagination
	Vulnerabilities []StandaloneVulnerability `json:"vulnerabilities,omitempty"`
}

PaginatedVulnerabilityListAllOf struct for PaginatedVulnerabilityListAllOf

type PaginatedVulnerableImageList

type PaginatedVulnerableImageList struct {
	// True if additional pages exist (page + 1) or False if this is the last page
	NextPage string `json:"next_page,omitempty"`
	// The page number returned (should match the requested page query string param)
	Page string `json:"page,omitempty"`
	// The number of items sent in this response
	ReturnedCount int32             `json:"returned_count,omitempty"`
	Images        []VulnerableImage `json:"images,omitempty"`
}

PaginatedVulnerableImageList Pagination wrapped list of images with vulnerabilties that match some filter

type PaginatedVulnerableImageListAllOf

type PaginatedVulnerableImageListAllOf struct {
	Images []VulnerableImage `json:"images,omitempty"`
}

PaginatedVulnerableImageListAllOf struct for PaginatedVulnerableImageListAllOf

type PaginationProperties

type PaginationProperties struct {
	// True if additional pages exist (page + 1) or False if this is the last page
	NextPage string `json:"next_page,omitempty"`
	// The page number returned (should match the requested page query string param)
	Page string `json:"page,omitempty"`
	// The number of items sent in this response
	ReturnedCount int32 `json:"returned_count,omitempty"`
}

PaginationProperties Properties for common pagination handling to be included in any wrapping object that needs pagination elements

type PoliciesApiService

type PoliciesApiService service

PoliciesApiService PoliciesApi service

func (*PoliciesApiService) AddPolicy

func (a *PoliciesApiService) AddPolicy(ctx _context.Context, bundle PolicyBundle, localVarOptionals *AddPolicyOpts) (PolicyBundleRecord, *_nethttp.Response, error)

AddPolicy Add a new policy Adds a new policy bundle to the system

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param bundle
  • @param optional nil or *AddPolicyOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return PolicyBundleRecord

func (*PoliciesApiService) DeletePolicy

func (a *PoliciesApiService) DeletePolicy(ctx _context.Context, policyId string, localVarOptionals *DeletePolicyOpts) (*_nethttp.Response, error)

DeletePolicy Delete policy Delete the specified policy

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param policyId
  • @param optional nil or *DeletePolicyOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

func (*PoliciesApiService) GetPolicy

func (a *PoliciesApiService) GetPolicy(ctx _context.Context, policyId string, localVarOptionals *GetPolicyOpts) ([]PolicyBundleRecord, *_nethttp.Response, error)

GetPolicy Get specific policy Get the policy bundle content

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param policyId
  • @param optional nil or *GetPolicyOpts - Optional Parameters:
  • @param "Detail" (optional.Bool) - Include policy bundle detail in the form of the full bundle content for each entry
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []PolicyBundleRecord

func (*PoliciesApiService) ListPolicies

func (a *PoliciesApiService) ListPolicies(ctx _context.Context, localVarOptionals *ListPoliciesOpts) ([]PolicyBundleRecord, *_nethttp.Response, error)

ListPolicies List policies List all saved policy bundles

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ListPoliciesOpts - Optional Parameters:
  • @param "Detail" (optional.Bool) - Include policy bundle detail in the form of the full bundle content for each entry
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []PolicyBundleRecord

func (*PoliciesApiService) UpdatePolicy

func (a *PoliciesApiService) UpdatePolicy(ctx _context.Context, policyId string, bundle PolicyBundleRecord, localVarOptionals *UpdatePolicyOpts) ([]PolicyBundleRecord, *_nethttp.Response, error)

UpdatePolicy Update policy Update/replace and existing policy

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param policyId
  • @param bundle
  • @param optional nil or *UpdatePolicyOpts - Optional Parameters:
  • @param "Active" (optional.Bool) - Mark policy as active
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []PolicyBundleRecord

type Policy

type Policy struct {
	Comment string       `json:"comment,omitempty"`
	Id      string       `json:"id"`
	Name    string       `json:"name,omitempty"`
	Rules   []PolicyRule `json:"rules,omitempty"`
	Version string       `json:"version"`
}

Policy struct for Policy

type PolicyApiService

type PolicyApiService service

PolicyApiService PolicyApi service

func (*PolicyApiService) DescribePolicy

func (a *PolicyApiService) DescribePolicy(ctx _context.Context) ([]GateSpec, *_nethttp.Response, error)

DescribePolicy Describe the policy language spec implemented by this service. Get the policy language spec for this service

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []GateSpec

type PolicyBundle

type PolicyBundle struct {
	// List of mapping rules that define which images should always result in a STOP/FAIL policy result regardless of policy content or presence in whitelisted_images
	BlacklistedImages []ImageSelectionRule `json:"blacklisted_images,omitempty"`
	// Description of the bundle, human readable
	Comment string `json:"comment,omitempty"`
	// Id of the bundle
	Id string `json:"id"`
	// Mapping rules for defining which policy and whitelist(s) to apply to an image based on a match of the image tag or id. Evaluated in order.
	Mappings []MappingRule `json:"mappings"`
	// Human readable name for the bundle
	Name string `json:"name,omitempty"`
	// Policies which define the go/stop/warn status of an image using rule matches on image properties
	Policies []Policy `json:"policies"`
	// Version id for this bundle format
	Version string `json:"version"`
	// List of mapping rules that define which images should always be passed (unless also on the blacklist), regardless of policy result.
	WhitelistedImages []ImageSelectionRule `json:"whitelisted_images,omitempty"`
	// Whitelists which define which policy matches to disregard explicitly in the final policy decision
	Whitelists []Whitelist `json:"whitelists,omitempty"`
}

PolicyBundle A bundle containing a set of policies, whitelists, and rules for mapping them to specific images

type PolicyBundleRecord

type PolicyBundleRecord struct {
	// True if the bundle is currently defined to be used automatically
	Active      bool      `json:"active,omitempty"`
	CreatedAt   time.Time `json:"created_at,omitempty"`
	LastUpdated time.Time `json:"last_updated,omitempty"`
	// The bundle's identifier
	PolicyId string `json:"policyId,omitempty"`
	// Source location of where the policy bundle originated
	PolicySource string       `json:"policy_source,omitempty"`
	Policybundle PolicyBundle `json:"policybundle,omitempty"`
	// UserId of the user that owns the bundle
	UserId string `json:"userId,omitempty"`
}

PolicyBundleRecord A policy bundle plus some metadata

type PolicyEvaluationApiService

type PolicyEvaluationApiService service

PolicyEvaluationApiService PolicyEvaluationApi service

func (*PolicyEvaluationApiService) GetImagePolicyCheck

func (a *PolicyEvaluationApiService) GetImagePolicyCheck(ctx _context.Context, imageDigest string, tag string, localVarOptionals *GetImagePolicyCheckOpts) ([]map[string]interface{}, *_nethttp.Response, error)

GetImagePolicyCheck Check policy evaluation status for image Get the policy evaluation for the given image

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param tag
  • @param optional nil or *GetImagePolicyCheckOpts - Optional Parameters:
  • @param "PolicyId" (optional.String) -
  • @param "Detail" (optional.Bool) -
  • @param "History" (optional.Bool) -
  • @param "Interactive" (optional.Bool) -
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []map[string]interface{}

func (*PolicyEvaluationApiService) GetImagePolicyCheckByImageId

func (a *PolicyEvaluationApiService) GetImagePolicyCheckByImageId(ctx _context.Context, imageId string, tag string, localVarOptionals *GetImagePolicyCheckByImageIdOpts) ([]map[string]interface{}, *_nethttp.Response, error)

GetImagePolicyCheckByImageId Check policy evaluation status for image Get the policy evaluation for the given image

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param tag
  • @param optional nil or *GetImagePolicyCheckByImageIdOpts - Optional Parameters:
  • @param "PolicyId" (optional.String) -
  • @param "Detail" (optional.Bool) -
  • @param "History" (optional.Bool) -
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []map[string]interface{}

type PolicyRule

type PolicyRule struct {
	Action  string             `json:"action"`
	Gate    string             `json:"gate"`
	Id      string             `json:"id,omitempty"`
	Params  []PolicyRuleParams `json:"params,omitempty"`
	Trigger string             `json:"trigger"`
}

PolicyRule A rule that defines and decision value if the match is found true for a given image.

type PolicyRuleParams

type PolicyRuleParams struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

PolicyRuleParams struct for PolicyRuleParams

type PostSystemFeedsOpts

type PostSystemFeedsOpts struct {
	Flush optional.Bool
	Sync  optional.Bool
}

PostSystemFeedsOpts Optional parameters for the method 'PostSystemFeeds'

type QueriesApiService

type QueriesApiService service

QueriesApiService QueriesApi service

func (*QueriesApiService) GetImageContentByType

func (a *QueriesApiService) GetImageContentByType(ctx _context.Context, imageDigest string, ctype string, localVarOptionals *GetImageContentByTypeOpts) (ContentPackageResponse, *_nethttp.Response, error)

GetImageContentByType Get the content of an image by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param ctype
  • @param optional nil or *GetImageContentByTypeOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentPackageResponse

func (*QueriesApiService) GetImageContentByTypeFiles

func (a *QueriesApiService) GetImageContentByTypeFiles(ctx _context.Context, imageDigest string, localVarOptionals *GetImageContentByTypeFilesOpts) (ContentFilesResponse, *_nethttp.Response, error)

GetImageContentByTypeFiles Get the content of an image by type files

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageContentByTypeFilesOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentFilesResponse

func (*QueriesApiService) GetImageContentByTypeImageId

func (a *QueriesApiService) GetImageContentByTypeImageId(ctx _context.Context, imageId string, ctype string, localVarOptionals *GetImageContentByTypeImageIdOpts) (ContentPackageResponse, *_nethttp.Response, error)

GetImageContentByTypeImageId Get the content of an image by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param ctype
  • @param optional nil or *GetImageContentByTypeImageIdOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentPackageResponse

func (*QueriesApiService) GetImageContentByTypeImageIdFiles

func (a *QueriesApiService) GetImageContentByTypeImageIdFiles(ctx _context.Context, imageId string, localVarOptionals *GetImageContentByTypeImageIdFilesOpts) (ContentFilesResponse, *_nethttp.Response, error)

GetImageContentByTypeImageIdFiles Get the content of an image by type files

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *GetImageContentByTypeImageIdFilesOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentFilesResponse

func (*QueriesApiService) GetImageContentByTypeImageIdJavapackage

func (a *QueriesApiService) GetImageContentByTypeImageIdJavapackage(ctx _context.Context, imageId string, localVarOptionals *GetImageContentByTypeImageIdJavapackageOpts) (ContentJavaPackageResponse, *_nethttp.Response, error)

GetImageContentByTypeImageIdJavapackage Get the content of an image by type java

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *GetImageContentByTypeImageIdJavapackageOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentJavaPackageResponse

func (*QueriesApiService) GetImageContentByTypeJavapackage

func (a *QueriesApiService) GetImageContentByTypeJavapackage(ctx _context.Context, imageDigest string, localVarOptionals *GetImageContentByTypeJavapackageOpts) (ContentJavaPackageResponse, *_nethttp.Response, error)

GetImageContentByTypeJavapackage Get the content of an image by type java

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageContentByTypeJavapackageOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentJavaPackageResponse

func (*QueriesApiService) GetImageContentByTypeMalware

func (a *QueriesApiService) GetImageContentByTypeMalware(ctx _context.Context, imageDigest string, localVarOptionals *GetImageContentByTypeMalwareOpts) (ContentMalwareResponse, *_nethttp.Response, error)

GetImageContentByTypeMalware Get the content of an image by type malware

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageContentByTypeMalwareOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return ContentMalwareResponse

func (*QueriesApiService) GetImageMetadataByType

func (a *QueriesApiService) GetImageMetadataByType(ctx _context.Context, imageDigest string, mtype string, localVarOptionals *GetImageMetadataByTypeOpts) (MetadataResponse, *_nethttp.Response, error)

GetImageMetadataByType Get the metadata of an image by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param mtype
  • @param optional nil or *GetImageMetadataByTypeOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return MetadataResponse

func (*QueriesApiService) GetImageVulnerabilitiesByType

func (a *QueriesApiService) GetImageVulnerabilitiesByType(ctx _context.Context, imageDigest string, vtype string, localVarOptionals *GetImageVulnerabilitiesByTypeOpts) (VulnerabilityResponse, *_nethttp.Response, error)

GetImageVulnerabilitiesByType Get vulnerabilities by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param vtype
  • @param optional nil or *GetImageVulnerabilitiesByTypeOpts - Optional Parameters:
  • @param "ForceRefresh" (optional.Bool) -
  • @param "VendorOnly" (optional.Bool) -
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return VulnerabilityResponse

func (*QueriesApiService) GetImageVulnerabilitiesByTypeImageId

func (a *QueriesApiService) GetImageVulnerabilitiesByTypeImageId(ctx _context.Context, imageId string, vtype string, localVarOptionals *GetImageVulnerabilitiesByTypeImageIdOpts) (VulnerabilityResponse, *_nethttp.Response, error)

GetImageVulnerabilitiesByTypeImageId Get vulnerabilities by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param vtype
  • @param optional nil or *GetImageVulnerabilitiesByTypeImageIdOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return VulnerabilityResponse

func (*QueriesApiService) GetImageVulnerabilityTypes

func (a *QueriesApiService) GetImageVulnerabilityTypes(ctx _context.Context, imageDigest string, localVarOptionals *GetImageVulnerabilityTypesOpts) ([]string, *_nethttp.Response, error)

GetImageVulnerabilityTypes Get vulnerability types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageVulnerabilityTypesOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*QueriesApiService) GetImageVulnerabilityTypesByImageId

func (a *QueriesApiService) GetImageVulnerabilityTypesByImageId(ctx _context.Context, imageId string, localVarOptionals *GetImageVulnerabilityTypesByImageIdOpts) ([]string, *_nethttp.Response, error)

GetImageVulnerabilityTypesByImageId Get vulnerability types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *GetImageVulnerabilityTypesByImageIdOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*QueriesApiService) ListImageContent

func (a *QueriesApiService) ListImageContent(ctx _context.Context, imageDigest string, localVarOptionals *ListImageContentOpts) ([]string, *_nethttp.Response, error)

ListImageContent List image content types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *ListImageContentOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*QueriesApiService) ListImageContentByImageid

func (a *QueriesApiService) ListImageContentByImageid(ctx _context.Context, imageId string, localVarOptionals *ListImageContentByImageidOpts) ([]string, *_nethttp.Response, error)

ListImageContentByImageid List image content types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *ListImageContentByImageidOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*QueriesApiService) ListImageMetadata

func (a *QueriesApiService) ListImageMetadata(ctx _context.Context, imageDigest string, localVarOptionals *ListImageMetadataOpts) ([]string, *_nethttp.Response, error)

ListImageMetadata List image metadata types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *ListImageMetadataOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*QueriesApiService) QueryImagesByPackage

func (a *QueriesApiService) QueryImagesByPackage(ctx _context.Context, name string, localVarOptionals *QueryImagesByPackageOpts) (PaginatedImageList, *_nethttp.Response, error)

QueryImagesByPackage List of images containing given package Filterable query interface to search for images containing specified package

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name Name of package to search for (e.g. sed)
  • @param optional nil or *QueryImagesByPackageOpts - Optional Parameters:
  • @param "PackageType" (optional.String) - Type of package to filter on (e.g. dpkg)
  • @param "Version" (optional.String) - Version of named package to filter on (e.g. 4.4-1)
  • @param "Page" (optional.String) - The page of results to fetch. Pages start at 1
  • @param "Limit" (optional.Int32) - Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return PaginatedImageList

func (*QueriesApiService) QueryImagesByVulnerability

func (a *QueriesApiService) QueryImagesByVulnerability(ctx _context.Context, vulnerabilityId string, localVarOptionals *QueryImagesByVulnerabilityOpts) (PaginatedVulnerableImageList, *_nethttp.Response, error)

QueryImagesByVulnerability List images vulnerable to the specific vulnerability ID. Returns a listing of images and their respective packages vulnerable to the given vulnerability ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param vulnerabilityId The ID of the vulnerability to search for within all images stored in anchore-engine (e.g. CVE-1999-0001)
  • @param optional nil or *QueryImagesByVulnerabilityOpts - Optional Parameters:
  • @param "Namespace" (optional.String) - Filter results to images within the given vulnerability namespace (e.g. debian:8, ubuntu:14.04)
  • @param "AffectedPackage" (optional.String) - Filter results to images with vulnable packages with the given package name (e.g. libssl)
  • @param "Severity" (optional.String) - Filter results to vulnerable package/vulnerability with the given severity
  • @param "VendorOnly" (optional.Bool) - Filter results to include only vulnerabilities that are not marked as invalid by upstream OS vendor data
  • @param "Page" (optional.Int32) - The page of results to fetch. Pages start at 1
  • @param "Limit" (optional.Int32) - Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return PaginatedVulnerableImageList

func (*QueriesApiService) QueryVulnerabilities

func (a *QueriesApiService) QueryVulnerabilities(ctx _context.Context, id []string, localVarOptionals *QueryVulnerabilitiesOpts) (PaginatedVulnerabilityList, *_nethttp.Response, error)

QueryVulnerabilities Listing information about given vulnerability List (w/filters) vulnerability records known by the system, with affected packages information if present

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of the vulnerability (e.g. CVE-1999-0001)
  • @param optional nil or *QueryVulnerabilitiesOpts - Optional Parameters:
  • @param "AffectedPackage" (optional.String) - Filter results by specified package name (e.g. sed)
  • @param "AffectedPackageVersion" (optional.String) - Filter results by specified package version (e.g. 4.4-1)
  • @param "Page" (optional.String) - The page of results to fetch. Pages start at 1
  • @param "Limit" (optional.Int32) - Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page
  • @param "Namespace" (optional.Interface of []string) - Namespace(s) to filter vulnerability records by

@return PaginatedVulnerabilityList

type QueryImagesByPackageOpts

type QueryImagesByPackageOpts struct {
	PackageType     optional.String
	Version         optional.String
	Page            optional.String
	Limit           optional.Int32
	XAnchoreAccount optional.String
}

QueryImagesByPackageOpts Optional parameters for the method 'QueryImagesByPackage'

type QueryImagesByVulnerabilityOpts

type QueryImagesByVulnerabilityOpts struct {
	Namespace       optional.String
	AffectedPackage optional.String
	Severity        optional.String
	VendorOnly      optional.Bool
	Page            optional.Int32
	Limit           optional.Int32
	XAnchoreAccount optional.String
}

QueryImagesByVulnerabilityOpts Optional parameters for the method 'QueryImagesByVulnerability'

type QueryVulnerabilitiesOpts

type QueryVulnerabilitiesOpts struct {
	AffectedPackage        optional.String
	AffectedPackageVersion optional.String
	Page                   optional.String
	Limit                  optional.Int32
	Namespace              optional.Interface
}

QueryVulnerabilitiesOpts Optional parameters for the method 'QueryVulnerabilities'

type RegexContentMatch

type RegexContentMatch struct {
	// A list of line numbers in the file that matched the regex
	Lines []int32 `json:"lines,omitempty"`
	// The name associated with the regular expression
	Name string `json:"name,omitempty"`
	// The regular expression used for the match
	Regex string `json:"regex,omitempty"`
}

RegexContentMatch Match of a named regex on a file

type RegistriesApiService

type RegistriesApiService service

RegistriesApiService RegistriesApi service

func (*RegistriesApiService) CreateRegistry

CreateRegistry Add a new registry Adds a new registry to the system

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param registrydata
  • @param optional nil or *CreateRegistryOpts - Optional Parameters:
  • @param "Validate" (optional.Bool) - flag to determine whether or not to validate registry/credential at registry add time
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []RegistryConfiguration

func (*RegistriesApiService) DeleteRegistry

func (a *RegistriesApiService) DeleteRegistry(ctx _context.Context, registry string, localVarOptionals *DeleteRegistryOpts) (*_nethttp.Response, error)

DeleteRegistry Delete a registry configuration Delete a registry configuration record from the system. Does not remove any images.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param registry
  • @param optional nil or *DeleteRegistryOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

func (*RegistriesApiService) GetRegistry

func (a *RegistriesApiService) GetRegistry(ctx _context.Context, registry string, localVarOptionals *GetRegistryOpts) (RegistryConfiguration, *_nethttp.Response, error)

GetRegistry Get a specific registry configuration Get information on a specific registry

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param registry
  • @param optional nil or *GetRegistryOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return RegistryConfiguration

func (*RegistriesApiService) ListRegistries

func (a *RegistriesApiService) ListRegistries(ctx _context.Context, localVarOptionals *ListRegistriesOpts) ([]RegistryConfiguration, *_nethttp.Response, error)

ListRegistries List configured registries List all configured registries the system can/will watch

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ListRegistriesOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []RegistryConfiguration

func (*RegistriesApiService) UpdateRegistry

func (a *RegistriesApiService) UpdateRegistry(ctx _context.Context, registry string, registrydata RegistryConfigurationRequest, localVarOptionals *UpdateRegistryOpts) ([]RegistryConfiguration, *_nethttp.Response, error)

UpdateRegistry Update/replace a registry configuration Replaces an existing registry record with the given record

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param registry
  • @param registrydata
  • @param optional nil or *UpdateRegistryOpts - Optional Parameters:
  • @param "Validate" (optional.Bool) - flag to determine whether or not to validate registry/credential at registry update time
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []RegistryConfiguration

type RegistryConfiguration

type RegistryConfiguration struct {
	CreatedAt  time.Time `json:"created_at,omitempty"`
	LastUpated time.Time `json:"last_upated,omitempty"`
	// hostname:port string for accessing the registry, as would be used in a docker pull operation
	Registry string `json:"registry,omitempty"`
	// human readable name associated with registry record
	RegistryName string `json:"registry_name,omitempty"`
	// Type of registry
	RegistryType string `json:"registry_type,omitempty"`
	// Username portion of credential to use for this registry
	RegistryUser string `json:"registry_user,omitempty"`
	// Use TLS/SSL verification for the registry URL
	RegistryVerify bool `json:"registry_verify,omitempty"`
	// Engine user that owns this registry entry
	UserId string `json:"userId,omitempty"`
}

RegistryConfiguration A registry entry describing the endpoint and credentials for a registry to pull images from

type RegistryConfigurationRequest

type RegistryConfigurationRequest struct {
	// hostname:port string for accessing the registry, as would be used in a docker pull operation. May include some or all of a repository and wildcards (e.g. docker.io/library/_* or gcr.io/myproject/myrepository)
	Registry string `json:"registry,omitempty"`
	// human readable name associated with registry record
	RegistryName string `json:"registry_name,omitempty"`
	// Password portion of credential to use for this registry
	RegistryPass string `json:"registry_pass,omitempty"`
	// Type of registry
	RegistryType string `json:"registry_type,omitempty"`
	// Username portion of credential to use for this registry
	RegistryUser string `json:"registry_user,omitempty"`
	// Use TLS/SSL verification for the registry URL
	RegistryVerify bool `json:"registry_verify,omitempty"`
}

RegistryConfigurationRequest A registry record describing the endpoint and credentials for a registry

type RegistryDigestSource

type RegistryDigestSource struct {
	// Optional override of the image creation time to support proper tag history construction in cases of out-of-order analysis compared to registry history for the tag
	CreationTimestampOverride time.Time `json:"creation_timestamp_override,omitempty"`
	// Base64 encoded content of the dockerfile used to build the image, if available.
	Dockerfile string `json:"dockerfile,omitempty"`
	// A digest-based pullstring (e.g. docker.io/nginx@sha256:123abc)
	Pullstring string `json:"pullstring"`
	// A valid docker tag reference (e.g. docker.io/nginx:latest) that will be associated with the image but not used to pull the image.
	Tag string `json:"tag"`
}

RegistryDigestSource An image reference using a digest in a registry, includes some extra tag and timestamp info in addition to the pull string to allow proper tag history reconstruction.

type RegistryTagSource

type RegistryTagSource struct {
	// Base64 encoded content of the dockerfile used to build the image, if available.
	Dockerfile string `json:"dockerfile,omitempty"`
	// A docker pull string (e.g. docker.io/nginx:latest, or docker.io/nginx@sha256:abd) to retrieve the image
	Pullstring string `json:"pullstring"`
}

RegistryTagSource An image reference using a tag in a registry, this is the most common source type.

type RepositoryCredentialsApiService

type RepositoryCredentialsApiService service

RepositoryCredentialsApiService RepositoryCredentialsApi service

func (*RepositoryCredentialsApiService) AddRepository

func (a *RepositoryCredentialsApiService) AddRepository(ctx _context.Context, repository string, localVarOptionals *AddRepositoryOpts) ([]Subscription, *_nethttp.Response, error)

AddRepository Add repository to watch

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param repository full repository to add e.g. docker.io/library/alpine
  • @param optional nil or *AddRepositoryOpts - Optional Parameters:
  • @param "Autosubscribe" (optional.Bool) - flag to enable/disable auto tag_update activation when new images from a repo are added
  • @param "Lookuptag" (optional.String) - use specified existing tag to perform repo scan (default is 'latest')
  • @param "Dryrun" (optional.Bool) - flag to return tags in the repository without actually watching the repository, default is false
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []Subscription

type RetrievedFile

type RetrievedFile struct {
	B64Content string `json:"b64_content,omitempty"`
	Path       string `json:"path,omitempty"`
}

RetrievedFile The retrieved file entry including content (b64 encoded)

type SecretSearchResult

type SecretSearchResult struct {
	Matches []RegexContentMatch `json:"matches,omitempty"`
	Path    string              `json:"path,omitempty"`
}

SecretSearchResult The retrieved file entry including content (b64 encoded)

type ServerConfiguration

type ServerConfiguration struct {
	Url         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type Service

type Service struct {
	// The url to reach the service, including port as needed
	BaseUrl string `json:"base_url,omitempty"`
	// The unique id of the host on which the service is executing
	Hostid        string         `json:"hostid,omitempty"`
	ServiceDetail StatusResponse `json:"service_detail,omitempty"`
	// Registered service name
	Servicename string `json:"servicename,omitempty"`
	Status      bool   `json:"status,omitempty"`
	// A state indicating the condition of the service. Normal operation is 'registered'
	StatusMessage string `json:"status_message,omitempty"`
	// The version of the service as reported by the service implementation on registration
	Version string `json:"version,omitempty"`
}

Service A service status record

type ServiceVersion

type ServiceVersion struct {
	Api     ServiceVersionApi     `json:"api,omitempty"`
	Db      ServiceVersionDb      `json:"db,omitempty"`
	Service ServiceVersionService `json:"service,omitempty"`
}

ServiceVersion Version information for a service

type ServiceVersionApi

type ServiceVersionApi struct {
	// Semantic version of the api
	Version string `json:"version,omitempty"`
}

ServiceVersionApi Api Version string

type ServiceVersionDb

type ServiceVersionDb struct {
	// Semantic version of the db schema
	SchemaVersion string `json:"schema_version,omitempty"`
}

ServiceVersionDb struct for ServiceVersionDb

type ServiceVersionService

type ServiceVersionService struct {
	// Semantic Version string of the service implementation
	Version string `json:"version,omitempty"`
}

ServiceVersionService struct for ServiceVersionService

type ServicesApiService

type ServicesApiService service

ServicesApiService ServicesApi service

func (*ServicesApiService) DeleteService

func (a *ServicesApiService) DeleteService(ctx _context.Context, servicename string, hostid string) (*_nethttp.Response, error)

DeleteService Delete the service config

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param servicename
  • @param hostid

func (*ServicesApiService) GetServicesByName

func (a *ServicesApiService) GetServicesByName(ctx _context.Context, servicename string) ([]Service, *_nethttp.Response, error)

GetServicesByName Get a service configuration and state

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param servicename

@return []Service

func (*ServicesApiService) GetServicesByNameAndHost

func (a *ServicesApiService) GetServicesByNameAndHost(ctx _context.Context, servicename string, hostid string) ([]Service, *_nethttp.Response, error)

GetServicesByNameAndHost Get service config for a specific host

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param servicename
  • @param hostid

@return []Service

func (*ServicesApiService) ListServices

func (a *ServicesApiService) ListServices(ctx _context.Context) ([]Service, *_nethttp.Response, error)

ListServices List system services

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Service

type StandaloneVulnerability

type StandaloneVulnerability struct {
	// The array of packages (typically packages) that are vulnerable-to or provide fixes-for this vulnerability
	AffectedPackages []PackageReference `json:"affected_packages,omitempty"`
	// Description of the vulnerability if available
	Description string `json:"description,omitempty"`
	// Vulnerability identifier. May be CVE-X, RHSA-X, etc. Not necessarily unique across namespaces
	Id string `json:"id,omitempty"`
	// URL for the upstream CVE record in the reporting source (e.g. ubuntu security tracker)
	Link string `json:"link,omitempty"`
	// The namespace for the vulnerability record to avoid conflicts for the same id in different distros or sources (e.g. deb vs ubuntu for same CVE)
	Namespace string `json:"namespace,omitempty"`
	// List of Nvd Data objects
	NvdData []NvdDataObject `json:"nvd_data,omitempty"`
	// List of references including
	References []VulnerabilityReference `json:"references,omitempty"`
	// Severity label specific to the namepsace
	Severity string `json:"severity,omitempty"`
	// List of Vendor Data objects
	VendorData []VendorDataObject `json:"vendor_data,omitempty"`
}

StandaloneVulnerability A single vulnerability record in a single namespace, the unique key is the combination of the id and namespace

type StatusResponse

type StatusResponse struct {
	Available bool                   `json:"available,omitempty"`
	Busy      bool                   `json:"busy,omitempty"`
	DbVersion string                 `json:"db_version,omitempty"`
	Detail    map[string]interface{} `json:"detail,omitempty"`
	Message   string                 `json:"message,omitempty"`
	Up        bool                   `json:"up,omitempty"`
	Version   string                 `json:"version,omitempty"`
}

StatusResponse System status response

type Subscription

type Subscription struct {
	// Is the subscription currently active
	Active bool `json:"active,omitempty"`
	// the unique id for this subscription record
	SubscriptionId string `json:"subscription_id,omitempty"`
	// The key value that the subscription references. E.g. a tag value or a repo name.
	SubscriptionKey string `json:"subscription_key,omitempty"`
	// The type of the subscription
	SubscriptionType string `json:"subscription_type,omitempty"`
	// The value of the subscription target
	SubscriptionValue *string `json:"subscription_value,omitempty"`
	// The userId of the subscribed user
	UserId string `json:"userId,omitempty"`
}

Subscription Subscription entry

type SubscriptionRequest

type SubscriptionRequest struct {
	SubscriptionKey   string  `json:"subscription_key,omitempty"`
	SubscriptionType  string  `json:"subscription_type,omitempty"`
	SubscriptionValue *string `json:"subscription_value,omitempty"`
}

SubscriptionRequest A subscription entry to add to the system

type SubscriptionUpdate

type SubscriptionUpdate struct {
	// Toggle the subscription processing on or off
	Active bool `json:"active,omitempty"`
	// The new subscription value, e.g. the new tag to be subscribed to
	SubscriptionValue *string `json:"subscription_value,omitempty"`
}

SubscriptionUpdate A modification to a subscription entry to change its status or value

type SubscriptionsApiService

type SubscriptionsApiService service

SubscriptionsApiService SubscriptionsApi service

func (*SubscriptionsApiService) AddSubscription

func (a *SubscriptionsApiService) AddSubscription(ctx _context.Context, subscription SubscriptionRequest, localVarOptionals *AddSubscriptionOpts) ([]Subscription, *_nethttp.Response, error)

AddSubscription Add a subscription of a specific type Create a new subscription to watch a tag and get notifications of changes

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param subscription
  • @param optional nil or *AddSubscriptionOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []Subscription

func (*SubscriptionsApiService) DeleteSubscription

func (a *SubscriptionsApiService) DeleteSubscription(ctx _context.Context, subscriptionId string, localVarOptionals *DeleteSubscriptionOpts) (*_nethttp.Response, error)

DeleteSubscription Delete subscriptions of a specific type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param subscriptionId
  • @param optional nil or *DeleteSubscriptionOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

func (*SubscriptionsApiService) GetSubscription

func (a *SubscriptionsApiService) GetSubscription(ctx _context.Context, subscriptionId string, localVarOptionals *GetSubscriptionOpts) ([]Subscription, *_nethttp.Response, error)

GetSubscription Get a specific subscription set

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param subscriptionId
  • @param optional nil or *GetSubscriptionOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []Subscription

func (*SubscriptionsApiService) ListSubscriptions

func (a *SubscriptionsApiService) ListSubscriptions(ctx _context.Context, localVarOptionals *ListSubscriptionsOpts) ([]Subscription, *_nethttp.Response, error)

ListSubscriptions List all subscriptions

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ListSubscriptionsOpts - Optional Parameters:
  • @param "SubscriptionKey" (optional.String) - filter only subscriptions matching key
  • @param "SubscriptionType" (optional.String) - filter only subscriptions matching type
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []Subscription

func (*SubscriptionsApiService) UpdateSubscription

func (a *SubscriptionsApiService) UpdateSubscription(ctx _context.Context, subscriptionId string, subscription SubscriptionUpdate, localVarOptionals *UpdateSubscriptionOpts) ([]Subscription, *_nethttp.Response, error)

UpdateSubscription Update an existing and specific subscription

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param subscriptionId
  • @param subscription
  • @param optional nil or *UpdateSubscriptionOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []Subscription

type SummariesApiService

type SummariesApiService service

SummariesApiService SummariesApi service

func (*SummariesApiService) ListImagetags

func (a *SummariesApiService) ListImagetags(ctx _context.Context, localVarOptionals *ListImagetagsOpts) ([]AnchoreImageTagSummary, *_nethttp.Response, error)

ListImagetags List all visible image digests and tags List all image tags visible to the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ListImagetagsOpts - Optional Parameters:
  • @param "ImageStatus" (optional.Interface of []string) - Filter images in one or more states such as active, deleting. Defaults to active images only if unspecified
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []AnchoreImageTagSummary

type SystemApiService

type SystemApiService service

SystemApiService SystemApi service

func (*SystemApiService) DeleteFeed

func (a *SystemApiService) DeleteFeed(ctx _context.Context, feed string) (*_nethttp.Response, error)

DeleteFeed Method for DeleteFeed Delete the groups and data for the feed and disable the feed itself

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param feed

func (*SystemApiService) DeleteFeedGroup

func (a *SystemApiService) DeleteFeedGroup(ctx _context.Context, feed string, group string) (*_nethttp.Response, error)

DeleteFeedGroup Method for DeleteFeedGroup Delete the group data and disable the group itself

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param feed
  • @param group

func (*SystemApiService) DeleteService

func (a *SystemApiService) DeleteService(ctx _context.Context, servicename string, hostid string) (*_nethttp.Response, error)

DeleteService Delete the service config

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param servicename
  • @param hostid

func (*SystemApiService) DescribeErrorCodes

func (a *SystemApiService) DescribeErrorCodes(ctx _context.Context) ([]AnchoreErrorCode, *_nethttp.Response, error)

DescribeErrorCodes Describe anchore engine error codes. Describe anchore engine error codes.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []AnchoreErrorCode

func (*SystemApiService) DescribePolicy

func (a *SystemApiService) DescribePolicy(ctx _context.Context) ([]GateSpec, *_nethttp.Response, error)

DescribePolicy Describe the policy language spec implemented by this service. Get the policy language spec for this service

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []GateSpec

func (*SystemApiService) GetServiceDetail

GetServiceDetail System status Get the system status including queue lengths

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return SystemStatusResponse

func (*SystemApiService) GetServicesByName

func (a *SystemApiService) GetServicesByName(ctx _context.Context, servicename string) ([]Service, *_nethttp.Response, error)

GetServicesByName Get a service configuration and state

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param servicename

@return []Service

func (*SystemApiService) GetServicesByNameAndHost

func (a *SystemApiService) GetServicesByNameAndHost(ctx _context.Context, servicename string, hostid string) ([]Service, *_nethttp.Response, error)

GetServicesByNameAndHost Get service config for a specific host

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param servicename
  • @param hostid

@return []Service

func (*SystemApiService) GetStatus

GetStatus Service status Get the API service status

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return StatusResponse

func (*SystemApiService) GetSystemFeeds

func (a *SystemApiService) GetSystemFeeds(ctx _context.Context) ([]FeedMetadata, *_nethttp.Response, error)

GetSystemFeeds list feeds operations and information Return a list of feed and their groups along with update and record count information. This data reflects the state of the policy engine, not the upstream feed service itself.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []FeedMetadata

func (*SystemApiService) ListServices

func (a *SystemApiService) ListServices(ctx _context.Context) ([]Service, *_nethttp.Response, error)

ListServices List system services

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Service

func (*SystemApiService) PostSystemFeeds

func (a *SystemApiService) PostSystemFeeds(ctx _context.Context, localVarOptionals *PostSystemFeedsOpts) ([]FeedSyncResult, *_nethttp.Response, error)

PostSystemFeeds trigger feeds operations Execute a synchronous feed sync operation. The response will block until complete, then return the result summary.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *PostSystemFeedsOpts - Optional Parameters:
  • @param "Flush" (optional.Bool) - instruct system to flush existing data feeds records from anchore-engine
  • @param "Sync" (optional.Bool) - instruct system to re-sync data feeds

@return []FeedSyncResult

func (*SystemApiService) ToggleFeedEnabled

func (a *SystemApiService) ToggleFeedEnabled(ctx _context.Context, feed string, enabled bool) (FeedMetadata, *_nethttp.Response, error)

ToggleFeedEnabled Method for ToggleFeedEnabled Disable the feed so that it does not sync on subsequent sync operations

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param feed
  • @param enabled

@return FeedMetadata

func (*SystemApiService) ToggleGroupEnabled

func (a *SystemApiService) ToggleGroupEnabled(ctx _context.Context, feed string, group string, enabled bool) ([]FeedMetadata, *_nethttp.Response, error)

ToggleGroupEnabled Method for ToggleGroupEnabled Disable a specific group within a feed to not sync

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param feed
  • @param group
  • @param enabled

@return []FeedMetadata

type SystemStatusResponse

type SystemStatusResponse struct {
	// A list of service objects
	ServiceStates []Service `json:"service_states,omitempty"`
}

SystemStatusResponse System status response

type TagEntry

type TagEntry struct {
	// The timestamp at which the Anchore Engine detected this tag was mapped to the image digest. Does not necessarily indicate when the tag was actually pushed to the registry.
	DetectedAt time.Time `json:"detected_at,omitempty"`
	// The pullable string for the tag. E.g. \"docker.io/library/node:latest\"
	Pullstring string `json:"pullstring,omitempty"`
	// The registry hostname:port section of the pull string
	Registry string `json:"registry,omitempty"`
	// The repository section of the pull string
	Repository string `json:"repository,omitempty"`
	// The tag-only section of the pull string
	Tag string `json:"tag,omitempty"`
}

TagEntry A docker-pullable tag value as well as deconstructed components

type TokenResponse

type TokenResponse struct {
	// The token content
	Token string `json:"token"`
}

TokenResponse struct for TokenResponse

type TriggerParamSpec

type TriggerParamSpec struct {
	Description string `json:"description,omitempty"`
	// An example value for the parameter (encoded as a string if the parameter is an object or list type)
	Example *string `json:"example,omitempty"`
	// Parameter name as it appears in policy document
	Name string `json:"name,omitempty"`
	// Is this a required parameter or optional
	Required bool `json:"required,omitempty"`
	// State of the trigger parameter
	State string `json:"state,omitempty"`
	// The name of another trigger that supercedes this on functionally if this is deprecated
	SupercededBy *string `json:"superceded_by,omitempty"`
	// If present, a definition for validation of input. Typically a jsonschema object that can be used to validate an input against.
	Validator map[string]interface{} `json:"validator,omitempty"`
}

TriggerParamSpec struct for TriggerParamSpec

type TriggerSpec

type TriggerSpec struct {
	// Trigger description for what it tests and when it will fire during evaluation
	Description string `json:"description,omitempty"`
	// Name of the trigger as it would appear in a policy document
	Name string `json:"name,omitempty"`
	// The list of parameters that are valid for this trigger
	Parameters []TriggerParamSpec `json:"parameters,omitempty"`
	// State of the trigger
	State string `json:"state,omitempty"`
	// The name of another trigger that supercedes this on functionally if this is deprecated
	SupercededBy *string `json:"superceded_by,omitempty"`
}

TriggerSpec Definition of a trigger and its parameters

type UpdatePolicyOpts

type UpdatePolicyOpts struct {
	Active          optional.Bool
	XAnchoreAccount optional.String
}

UpdatePolicyOpts Optional parameters for the method 'UpdatePolicy'

type UpdateRegistryOpts

type UpdateRegistryOpts struct {
	Validate        optional.Bool
	XAnchoreAccount optional.String
}

UpdateRegistryOpts Optional parameters for the method 'UpdateRegistry'

type UpdateSubscriptionOpts

type UpdateSubscriptionOpts struct {
	XAnchoreAccount optional.String
}

UpdateSubscriptionOpts Optional parameters for the method 'UpdateSubscription'

type User

type User struct {
	// The timestampt the user record was created
	CreatedAt time.Time `json:"created_at,omitempty"`
	// The timestamp of the last update to this record
	LastUpdated time.Time `json:"last_updated,omitempty"`
	// If the user is external, this is the source that the user was initialized from. All other user types have this set to null
	Source string `json:"source,omitempty"`
	// The user's type
	Type string `json:"type,omitempty"`
	// The username to authenticate with
	Username string `json:"username"`
}

User A username for authenticating with one or more types of credentials. User type defines the expected credentials allowed for the user. Native users have passwords, External users have no credential internally. Internal users are service/system users for inter-service communication.

type UserCreationRequest

type UserCreationRequest struct {
	// The initial password for the user, must be at least 6 characters, up to 128
	Password string `json:"password"`
	// The username to create
	Username string `json:"username"`
}

UserCreationRequest A payload for creating a new user, includes the username and password in a single request

type UserManagementApiService

type UserManagementApiService service

UserManagementApiService UserManagementApi service

func (*UserManagementApiService) CreateAccount

CreateAccount Create a new user. Only avaialble to admin user.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param account

@return Account

func (*UserManagementApiService) CreateUser

func (a *UserManagementApiService) CreateUser(ctx _context.Context, accountname string, user UserCreationRequest) (User, *_nethttp.Response, error)

CreateUser Create a new user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountname
  • @param user

@return User

func (*UserManagementApiService) CreateUserCredential

func (a *UserManagementApiService) CreateUserCredential(ctx _context.Context, accountname string, username string, credential AccessCredential) (User, *_nethttp.Response, error)

CreateUserCredential add/replace credential

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountname
  • @param username
  • @param credential

@return User

func (*UserManagementApiService) DeleteAccount

func (a *UserManagementApiService) DeleteAccount(ctx _context.Context, accountname string) (*_nethttp.Response, error)

DeleteAccount Delete the specified account, only allowed if the account is in the disabled state. All users will be deleted along with the account and all resources will be garbage collected

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountname

func (*UserManagementApiService) DeleteUser

func (a *UserManagementApiService) DeleteUser(ctx _context.Context, accountname string, username string) (*_nethttp.Response, error)

DeleteUser Delete a specific user credential by username of the credential. Cannot be the credential used to authenticate the request.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountname
  • @param username

func (*UserManagementApiService) DeleteUserCredential

func (a *UserManagementApiService) DeleteUserCredential(ctx _context.Context, accountname string, username string, credentialType string) (*_nethttp.Response, error)

DeleteUserCredential Delete a credential by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountname
  • @param username
  • @param credentialType

func (*UserManagementApiService) GetAccount

func (a *UserManagementApiService) GetAccount(ctx _context.Context, accountname string) (Account, *_nethttp.Response, error)

GetAccount Get info about an user. Only available to admin user. Uses the main user Id, not a username.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountname

@return Account

func (*UserManagementApiService) GetAccountUser

func (a *UserManagementApiService) GetAccountUser(ctx _context.Context, accountname string, username string) (User, *_nethttp.Response, error)

GetAccountUser Get a specific user in the specified account

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountname
  • @param username

@return User

func (*UserManagementApiService) ListAccounts

func (a *UserManagementApiService) ListAccounts(ctx _context.Context, localVarOptionals *ListAccountsOpts) ([]Account, *_nethttp.Response, error)

ListAccounts List user summaries. Only available to the system admin user.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ListAccountsOpts - Optional Parameters:
  • @param "State" (optional.String) - Filter accounts by state

@return []Account

func (*UserManagementApiService) ListUserCredentials

func (a *UserManagementApiService) ListUserCredentials(ctx _context.Context, accountname string, username string) ([]AccessCredential, *_nethttp.Response, error)

ListUserCredentials Get current credential summary

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountname
  • @param username

@return []AccessCredential

func (*UserManagementApiService) ListUsers

func (a *UserManagementApiService) ListUsers(ctx _context.Context, accountname string) ([]User, *_nethttp.Response, error)

ListUsers List accounts for the user

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountname

@return []User

func (*UserManagementApiService) UpdateAccountState

func (a *UserManagementApiService) UpdateAccountState(ctx _context.Context, accountname string, desiredState AccountStatus) (AccountStatus, *_nethttp.Response, error)

UpdateAccountState Update the state of an account to either enabled or disabled. For deletion use the DELETE route

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountname
  • @param desiredState

@return AccountStatus

type VendorDataObject

type VendorDataObject struct {
	CvssV2 Cvssv2Scores `json:"cvss_v2,omitempty"`
	CvssV3 Cvssv3Scores `json:"cvss_v3,omitempty"`
	// Vendor Vulnerability ID
	Id string `json:"id,omitempty"`
}

VendorDataObject struct for VendorDataObject

type VulnerabilitiesApiService

type VulnerabilitiesApiService service

VulnerabilitiesApiService VulnerabilitiesApi service

func (*VulnerabilitiesApiService) GetImageVulnerabilitiesByType

func (a *VulnerabilitiesApiService) GetImageVulnerabilitiesByType(ctx _context.Context, imageDigest string, vtype string, localVarOptionals *GetImageVulnerabilitiesByTypeOpts) (VulnerabilityResponse, *_nethttp.Response, error)

GetImageVulnerabilitiesByType Get vulnerabilities by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param vtype
  • @param optional nil or *GetImageVulnerabilitiesByTypeOpts - Optional Parameters:
  • @param "ForceRefresh" (optional.Bool) -
  • @param "VendorOnly" (optional.Bool) -
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return VulnerabilityResponse

func (*VulnerabilitiesApiService) GetImageVulnerabilitiesByTypeImageId

func (a *VulnerabilitiesApiService) GetImageVulnerabilitiesByTypeImageId(ctx _context.Context, imageId string, vtype string, localVarOptionals *GetImageVulnerabilitiesByTypeImageIdOpts) (VulnerabilityResponse, *_nethttp.Response, error)

GetImageVulnerabilitiesByTypeImageId Get vulnerabilities by type

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param vtype
  • @param optional nil or *GetImageVulnerabilitiesByTypeImageIdOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return VulnerabilityResponse

func (*VulnerabilitiesApiService) GetImageVulnerabilityTypes

func (a *VulnerabilitiesApiService) GetImageVulnerabilityTypes(ctx _context.Context, imageDigest string, localVarOptionals *GetImageVulnerabilityTypesOpts) ([]string, *_nethttp.Response, error)

GetImageVulnerabilityTypes Get vulnerability types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageDigest
  • @param optional nil or *GetImageVulnerabilityTypesOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*VulnerabilitiesApiService) GetImageVulnerabilityTypesByImageId

func (a *VulnerabilitiesApiService) GetImageVulnerabilityTypesByImageId(ctx _context.Context, imageId string, localVarOptionals *GetImageVulnerabilityTypesByImageIdOpts) ([]string, *_nethttp.Response, error)

GetImageVulnerabilityTypesByImageId Get vulnerability types

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param imageId
  • @param optional nil or *GetImageVulnerabilityTypesByImageIdOpts - Optional Parameters:
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return []string

func (*VulnerabilitiesApiService) QueryImagesByVulnerability

func (a *VulnerabilitiesApiService) QueryImagesByVulnerability(ctx _context.Context, vulnerabilityId string, localVarOptionals *QueryImagesByVulnerabilityOpts) (PaginatedVulnerableImageList, *_nethttp.Response, error)

QueryImagesByVulnerability List images vulnerable to the specific vulnerability ID. Returns a listing of images and their respective packages vulnerable to the given vulnerability ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param vulnerabilityId The ID of the vulnerability to search for within all images stored in anchore-engine (e.g. CVE-1999-0001)
  • @param optional nil or *QueryImagesByVulnerabilityOpts - Optional Parameters:
  • @param "Namespace" (optional.String) - Filter results to images within the given vulnerability namespace (e.g. debian:8, ubuntu:14.04)
  • @param "AffectedPackage" (optional.String) - Filter results to images with vulnable packages with the given package name (e.g. libssl)
  • @param "Severity" (optional.String) - Filter results to vulnerable package/vulnerability with the given severity
  • @param "VendorOnly" (optional.Bool) - Filter results to include only vulnerabilities that are not marked as invalid by upstream OS vendor data
  • @param "Page" (optional.Int32) - The page of results to fetch. Pages start at 1
  • @param "Limit" (optional.Int32) - Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page
  • @param "XAnchoreAccount" (optional.String) - An account name to change the resource scope of the request to that account, if permissions allow (admin only)

@return PaginatedVulnerableImageList

func (*VulnerabilitiesApiService) QueryVulnerabilities

QueryVulnerabilities Listing information about given vulnerability List (w/filters) vulnerability records known by the system, with affected packages information if present

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of the vulnerability (e.g. CVE-1999-0001)
  • @param optional nil or *QueryVulnerabilitiesOpts - Optional Parameters:
  • @param "AffectedPackage" (optional.String) - Filter results by specified package name (e.g. sed)
  • @param "AffectedPackageVersion" (optional.String) - Filter results by specified package version (e.g. 4.4-1)
  • @param "Page" (optional.String) - The page of results to fetch. Pages start at 1
  • @param "Limit" (optional.Int32) - Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page
  • @param "Namespace" (optional.Interface of []string) - Namespace(s) to filter vulnerability records by

@return PaginatedVulnerabilityList

type Vulnerability

type Vulnerability struct {
	// The name of the feed where vulnerability match was made
	Feed string `json:"feed,omitempty"`
	// The name of the feed group where vulnerability match was made
	FeedGroup string `json:"feed_group,omitempty"`
	// The package containing a fix, if available
	Fix string `json:"fix,omitempty"`
	// List of Nvd Data objects
	NvdData []NvdDataObject `json:"nvd_data,omitempty"`
	// The package name and version that are vulnerable in the image
	Package string `json:"package,omitempty"`
	// The CPE string (if applicable) describing the package to vulnerability match
	PackageCpe string `json:"package_cpe,omitempty"`
	// The name of the vulnerable package artifact
	PackageName string `json:"package_name,omitempty"`
	// The location (if applicable) of the vulnerable package in the container filesystem
	PackagePath string `json:"package_path,omitempty"`
	// The type of vulnerable package
	PackageType string `json:"package_type,omitempty"`
	// The version of the vulnerable package artifact
	PackageVersion string `json:"package_version,omitempty"`
	// The severity of the vulnerability
	Severity string `json:"severity,omitempty"`
	// The url for more information about the vulnerability
	Url string `json:"url,omitempty"`
	// List of Vendor Data objects
	VendorData []VendorDataObject `json:"vendor_data,omitempty"`
	// The vulnerability identifier, such as CVE-2017-100, or RHSA-2017123
	Vuln string `json:"vuln,omitempty"`
}

Vulnerability struct for Vulnerability

type VulnerabilityReference

type VulnerabilityReference struct {
	// The reference source
	Source string   `json:"source,omitempty"`
	Tags   []string `json:"tags,omitempty"`
	// The reference url
	Url string `json:"url,omitempty"`
}

VulnerabilityReference An external link/reference

type VulnerabilityResponse

type VulnerabilityResponse struct {
	ImageDigest string `json:"imageDigest,omitempty"`
	// List of Vulnerability objects
	Vulnerabilities   []Vulnerability `json:"vulnerabilities,omitempty"`
	VulnerabilityType string          `json:"vulnerability_type,omitempty"`
}

VulnerabilityResponse envelope containing list of vulnerabilities

type VulnerableImage

type VulnerableImage struct {
	AffectedPackages []VulnerablePackageReference `json:"affected_packages,omitempty"`
	Image            ImageReference               `json:"image,omitempty"`
}

VulnerableImage A record of an image vulnerable to some known vulnerability. Includes vulnerable package information

type VulnerablePackageReference

type VulnerablePackageReference struct {
	// Package name
	Name string `json:"name,omitempty"`
	// Vulnerability namespace of affected package
	Namespace string `json:"namespace,omitempty"`
	// Severity of vulnerability affecting package
	Severity string `json:"severity,omitempty"`
	// Package type (e.g. package, rpm, deb, apk, jar, npm, gem, ...)
	Type string `json:"type,omitempty"`
	// A version for the package. If null, then references all versions
	Version *string `json:"version,omitempty"`
}

VulnerablePackageReference A record of a software item which is vulnerable or carries a fix for a vulnerability

type Whitelist

type Whitelist struct {
	Comment string          `json:"comment,omitempty"`
	Id      string          `json:"id"`
	Items   []WhitelistItem `json:"items,omitempty"`
	Name    string          `json:"name,omitempty"`
	Version string          `json:"version"`
}

Whitelist A collection of whitelist items to match a policy evaluation against.

type WhitelistItem

type WhitelistItem struct {
	Gate      string `json:"gate"`
	Id        string `json:"id,omitempty"`
	TriggerId string `json:"trigger_id"`
}

WhitelistItem Identifies a specific gate and trigger match from a policy against an image and indicates it should be ignored in final policy decisions

Source Files

Jump to

Keyboard shortcuts

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