client

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a 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 {

	// API Services
	AnchoreEngineApi *AnchoreEngineApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Anchore Engine API Server API v0.1.9 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)

Change base path to allow switching to mocks

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 swagger 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:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type AccessCredential

type AccessCredential struct {

	// The type of credential
	Type_ string `json:"type"`

	// The credential value (e.g. the password)
	Value string `json:"value"`

	// The timestamp of creation of the credential
	CreatedAt string `json:"created_at,omitempty"`

	// The uuid of the user that created this credential
	CreatedBy string `json:"created_by,omitempty"`
}

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 account identifier, not updatable after creation
	Name string `json:"name"`

	// The user type (admin vs user). If not specified in a POST request, 'user' is default
	Type_ string `json:"type,omitempty"`

	// 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"`

	// Optional email address associated with the account
	Email string `json:"email,omitempty"`

	// The timestamp when the account was created
	CreatedAt time.Time `json:"created_at,omitempty"`

	// The timestamp of the last update to the account metadata itself (not users or creds)
	LastUpdated time.Time `json:"last_updated,omitempty"`

	// The uuid of the user that created this account
	CreatedBy string `json:"created_by,omitempty"`
}

Account information

type AccountCreationRequest

type AccountCreationRequest struct {

	// The account name to use. This will identify the account and must be globally unique in the system.
	Name string `json:"name"`

	// An optional email to associate with the account for contact purposes
	Email string `json:"email,omitempty"`
}

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

type AccountList

type AccountList []Account

type AccountStatus

type AccountStatus struct {

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

A summary of account status

type AnchoreEngineApiService

type AnchoreEngineApiService service

func (*AnchoreEngineApiService) AddCredential

func (a *AnchoreEngineApiService) AddCredential(ctx context.Context, credential AccessCredential) (User, *http.Response, error)

AnchoreEngineApiService add/replace credential * @param ctx context.Context for authentication, logging, tracing, etc. @param credential @return User

func (*AnchoreEngineApiService) AddImage

func (a *AnchoreEngineApiService) AddImage(ctx context.Context, image ImageAnalysisRequest, localVarOptionals map[string]interface{}) (AnchoreImageList, *http.Response, error)

AnchoreEngineApiService 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, tracing, etc. @param image @param optional (nil or map[string]interface{}) with one or more of:

@param "force" (bool) Override any existing entry in the system
@param "autosubscribe" (bool) Instruct engine to automatically begin watching the added tag for updates from registry

@return AnchoreImageList

func (*AnchoreEngineApiService) AddPolicy

AnchoreEngineApiService Add a new policy Adds a new policy bundle to the system * @param ctx context.Context for authentication, logging, tracing, etc. @param bundle @return PolicyBundleRecord

func (*AnchoreEngineApiService) AddRepository

func (a *AnchoreEngineApiService) AddRepository(ctx context.Context, repository string, localVarOptionals map[string]interface{}) (SubscriptionList, *http.Response, error)

AnchoreEngineApiService Add repository to watch

* @param ctx context.Context for authentication, logging, tracing, etc. @param repository full repository to add e.g. docker.io/library/alpine @param optional (nil or map[string]interface{}) with one or more of:

@param "autosubscribe" (bool) flag to enable/disable auto tag_update activation when new images from a repo are added
@param "lookuptag" (string) use specified existing tag to perform repo scan (default is 'latest')

@return SubscriptionList

func (*AnchoreEngineApiService) AddSubscription

AnchoreEngineApiService 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, tracing, etc. @param subscription @return SubscriptionList

func (*AnchoreEngineApiService) CreateRegistry

func (a *AnchoreEngineApiService) CreateRegistry(ctx context.Context, registrydata RegistryConfigurationRequest, localVarOptionals map[string]interface{}) (RegistryConfigurationList, *http.Response, error)

AnchoreEngineApiService Add a new registry Adds a new registry to the system * @param ctx context.Context for authentication, logging, tracing, etc. @param registrydata @param optional (nil or map[string]interface{}) with one or more of:

@param "validate" (bool) flag to determine whether or not to validate registry/credential at registry add time

@return RegistryConfigurationList

func (*AnchoreEngineApiService) DeleteEvent

func (a *AnchoreEngineApiService) DeleteEvent(ctx context.Context, eventId string) (*http.Response, error)

AnchoreEngineApiService Delete Event Delete an event by its event ID * @param ctx context.Context for authentication, logging, tracing, etc. @param eventId Event ID of the event to be deleted @return

func (*AnchoreEngineApiService) DeleteEvents

func (a *AnchoreEngineApiService) DeleteEvents(ctx context.Context, localVarOptionals map[string]interface{}) ([]string, *http.Response, error)

AnchoreEngineApiService Delete Events Delete all or a subset of events filtered using the optional query parameters * @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:

@param "before" (string) Delete events that occurred before the timestamp
@param "since" (string) Delete events that occurred after the timestamp
@param "level" (string) Delete events that match the level - INFO or ERROR

@return []string

func (*AnchoreEngineApiService) DeleteImage

func (a *AnchoreEngineApiService) DeleteImage(ctx context.Context, imageDigest string, localVarOptionals map[string]interface{}) (*http.Response, error)

AnchoreEngineApiService Delete an image analysis * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @param optional (nil or map[string]interface{}) with one or more of:

@param "force" (bool)

@return

func (*AnchoreEngineApiService) DeleteImageByImageId

func (a *AnchoreEngineApiService) DeleteImageByImageId(ctx context.Context, imageId string, localVarOptionals map[string]interface{}) (*http.Response, error)

AnchoreEngineApiService Delete image by docker imageId * @param ctx context.Context for authentication, logging, tracing, etc. @param imageId @param optional (nil or map[string]interface{}) with one or more of:

@param "force" (bool)

@return

func (*AnchoreEngineApiService) DeletePolicy

func (a *AnchoreEngineApiService) DeletePolicy(ctx context.Context, policyId string) (*http.Response, error)

AnchoreEngineApiService Delete policy Delete the specified policy * @param ctx context.Context for authentication, logging, tracing, etc. @param policyId @return

func (*AnchoreEngineApiService) DeleteRegistry

func (a *AnchoreEngineApiService) DeleteRegistry(ctx context.Context, registry string) (*http.Response, error)

AnchoreEngineApiService Delete a registry configuration Delete a registry configuration record from the system. Does not remove any images. * @param ctx context.Context for authentication, logging, tracing, etc. @param registry @return

func (*AnchoreEngineApiService) DeleteService

func (a *AnchoreEngineApiService) DeleteService(ctx context.Context, servicename string, hostid string) (*http.Response, error)

AnchoreEngineApiService Delete the service config * @param ctx context.Context for authentication, logging, tracing, etc. @param servicename @param hostid @return

func (*AnchoreEngineApiService) DeleteSubscription

func (a *AnchoreEngineApiService) DeleteSubscription(ctx context.Context, subscriptionId string) (*http.Response, error)

AnchoreEngineApiService Delete subscriptions of a specific type * @param ctx context.Context for authentication, logging, tracing, etc. @param subscriptionId @return

func (*AnchoreEngineApiService) DescribePolicy

func (a *AnchoreEngineApiService) DescribePolicy(ctx context.Context) ([]GateSpec, *http.Response, error)

PolicyApiService Describe the policy language spec implemented by this service. Get the policy language spec for this service * @param ctx context.Context for authentication, logging, tracing, etc. @return []GateSpec

func (*AnchoreEngineApiService) GetCredentials

AnchoreEngineApiService Get current credential summary * @param ctx context.Context for authentication, logging, tracing, etc. @return CredentialList

func (*AnchoreEngineApiService) GetEvent

AnchoreEngineApiService Get Event Lookup an event by its event ID * @param ctx context.Context for authentication, logging, tracing, etc. @param eventId Event ID of the event for lookup @return EventResponse

func (*AnchoreEngineApiService) GetImage

func (a *AnchoreEngineApiService) GetImage(ctx context.Context, imageDigest string) (AnchoreImageList, *http.Response, error)

AnchoreEngineApiService Get image metadata * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @return AnchoreImageList

func (*AnchoreEngineApiService) GetImageByImageId

func (a *AnchoreEngineApiService) GetImageByImageId(ctx context.Context, imageId string) (AnchoreImageList, *http.Response, error)

AnchoreEngineApiService Lookup image by docker imageId * @param ctx context.Context for authentication, logging, tracing, etc. @param imageId @return AnchoreImageList

func (*AnchoreEngineApiService) GetImageContentByType

func (a *AnchoreEngineApiService) GetImageContentByType(ctx context.Context, imageDigest string, ctype string) (ContentPackageResponse, *http.Response, error)

AnchoreEngineApiService Get the content of an image by type * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @param ctype @return ContentPackageResponse

func (*AnchoreEngineApiService) GetImageContentByTypeFiles

func (a *AnchoreEngineApiService) GetImageContentByTypeFiles(ctx context.Context, imageDigest string) (ContentFilesResponse, *http.Response, error)

AnchoreEngineApiService Get the content of an image by type files * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @return ContentFilesResponse

func (*AnchoreEngineApiService) GetImageContentByTypeImageId

func (a *AnchoreEngineApiService) GetImageContentByTypeImageId(ctx context.Context, imageId string, ctype string) (ContentPackageResponse, *http.Response, error)

AnchoreEngineApiService Get the content of an image by type * @param ctx context.Context for authentication, logging, tracing, etc. @param imageId @param ctype @return ContentPackageResponse

func (*AnchoreEngineApiService) GetImageContentByTypeImageIdFiles

func (a *AnchoreEngineApiService) GetImageContentByTypeImageIdFiles(ctx context.Context, imageId string) (ContentFilesResponse, *http.Response, error)

AnchoreEngineApiService Get the content of an image by type files * @param ctx context.Context for authentication, logging, tracing, etc. @param imageId @return ContentFilesResponse

func (*AnchoreEngineApiService) GetImageContentByTypeImageIdJavapackage

func (a *AnchoreEngineApiService) GetImageContentByTypeImageIdJavapackage(ctx context.Context, imageId string) (ContentJavaPackageResponse, *http.Response, error)

AnchoreEngineApiService Get the content of an image by type java * @param ctx context.Context for authentication, logging, tracing, etc. @param imageId @return ContentJavaPackageResponse

func (*AnchoreEngineApiService) GetImageContentByTypeJavapackage

func (a *AnchoreEngineApiService) GetImageContentByTypeJavapackage(ctx context.Context, imageDigest string) (ContentJavaPackageResponse, *http.Response, error)

AnchoreEngineApiService Get the content of an image by type java * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @return ContentJavaPackageResponse

func (*AnchoreEngineApiService) GetImageMetadataByType

func (a *AnchoreEngineApiService) GetImageMetadataByType(ctx context.Context, imageDigest string, mtype string) (MetadataResponse, *http.Response, error)

AnchoreEngineApiService Get the metadata of an image by type * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @param mtype @return MetadataResponse

func (*AnchoreEngineApiService) GetImagePolicyCheck

func (a *AnchoreEngineApiService) GetImagePolicyCheck(ctx context.Context, imageDigest string, tag string, localVarOptionals map[string]interface{}) (PolicyEvaluationList, *http.Response, error)

AnchoreEngineApiService Check policy evaluation status for image Get the policy evaluation for the given image * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @param tag @param optional (nil or map[string]interface{}) with one or more of:

@param "policyId" (string)
@param "detail" (bool)
@param "history" (bool)
@param "interactive" (bool)

@return PolicyEvaluationList

func (*AnchoreEngineApiService) GetImagePolicyCheckByImageId

func (a *AnchoreEngineApiService) GetImagePolicyCheckByImageId(ctx context.Context, imageId string, tag string, localVarOptionals map[string]interface{}) (PolicyEvaluationList, *http.Response, error)

AnchoreEngineApiService Check policy evaluation status for image Get the policy evaluation for the given image * @param ctx context.Context for authentication, logging, tracing, etc. @param imageId @param tag @param optional (nil or map[string]interface{}) with one or more of:

@param "policyId" (string)
@param "detail" (bool)
@param "history" (bool)

@return PolicyEvaluationList

func (*AnchoreEngineApiService) GetImageVulnerabilitiesByType

func (a *AnchoreEngineApiService) GetImageVulnerabilitiesByType(ctx context.Context, imageDigest string, vtype string, localVarOptionals map[string]interface{}) (VulnerabilityResponse, *http.Response, error)

AnchoreEngineApiService Get vulnerabilities by type * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @param vtype @param optional (nil or map[string]interface{}) with one or more of:

@param "forceRefresh" (bool)
@param "vendorOnly" (bool)

@return VulnerabilityResponse

func (*AnchoreEngineApiService) GetImageVulnerabilitiesByTypeImageId

func (a *AnchoreEngineApiService) GetImageVulnerabilitiesByTypeImageId(ctx context.Context, imageId string, vtype string) (VulnerabilityResponse, *http.Response, error)

AnchoreEngineApiService Get vulnerabilities by type * @param ctx context.Context for authentication, logging, tracing, etc. @param imageId @param vtype @return VulnerabilityResponse

func (*AnchoreEngineApiService) GetImageVulnerabilityTypes

func (a *AnchoreEngineApiService) GetImageVulnerabilityTypes(ctx context.Context, imageDigest string) ([]string, *http.Response, error)

AnchoreEngineApiService Get vulnerability types * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @return []string

func (*AnchoreEngineApiService) GetImageVulnerabilityTypesByImageId

func (a *AnchoreEngineApiService) GetImageVulnerabilityTypesByImageId(ctx context.Context, imageId string) ([]string, *http.Response, error)

AnchoreEngineApiService Get vulnerability types * @param ctx context.Context for authentication, logging, tracing, etc. @param imageId @return []string

func (*AnchoreEngineApiService) GetPolicy

func (a *AnchoreEngineApiService) GetPolicy(ctx context.Context, policyId string, localVarOptionals map[string]interface{}) (PolicyBundleList, *http.Response, error)

AnchoreEngineApiService Get specific policy Get the policy bundle content * @param ctx context.Context for authentication, logging, tracing, etc. @param policyId @param optional (nil or map[string]interface{}) with one or more of:

@param "detail" (bool) Include policy bundle detail in the form of the full bundle content for each entry

@return PolicyBundleList

func (*AnchoreEngineApiService) GetRegistry

AnchoreEngineApiService Get a specific registry configuration Get information on a specific registry * @param ctx context.Context for authentication, logging, tracing, etc. @param registry @return RegistryConfiguration

func (*AnchoreEngineApiService) GetServicesByName

func (a *AnchoreEngineApiService) GetServicesByName(ctx context.Context, servicename string) (ServiceList, *http.Response, error)

AnchoreEngineApiService Get a service configuration and state * @param ctx context.Context for authentication, logging, tracing, etc. @param servicename @return ServiceList

func (*AnchoreEngineApiService) GetServicesByNameAndHost

func (a *AnchoreEngineApiService) GetServicesByNameAndHost(ctx context.Context, servicename string, hostid string) (ServiceList, *http.Response, error)

AnchoreEngineApiService Get service config for a specific host * @param ctx context.Context for authentication, logging, tracing, etc. @param servicename @param hostid @return ServiceList

func (*AnchoreEngineApiService) GetSubscription

func (a *AnchoreEngineApiService) GetSubscription(ctx context.Context, subscriptionId string) (SubscriptionList, *http.Response, error)

AnchoreEngineApiService Get a specific subscription set * @param ctx context.Context for authentication, logging, tracing, etc. @param subscriptionId @return SubscriptionList

func (*AnchoreEngineApiService) GetUser

AnchoreEngineApiService List authenticated user info * @param ctx context.Context for authentication, logging, tracing, etc. @return User

func (*AnchoreEngineApiService) GetUsersAccount

func (a *AnchoreEngineApiService) GetUsersAccount(ctx context.Context) (Account, *http.Response, error)

AnchoreEngineApiService List the account for the authenticated user * @param ctx context.Context for authentication, logging, tracing, etc. @return Account

func (*AnchoreEngineApiService) ImportImage

AnchoreEngineApiService Import and image analysis directly * @param ctx context.Context for authentication, logging, tracing, etc. @param analysisReport @return AnchoreImageList

func (*AnchoreEngineApiService) ListEvents

func (a *AnchoreEngineApiService) ListEvents(ctx context.Context, localVarOptionals map[string]interface{}) (EventsList, *http.Response, error)

AnchoreEngineApiService 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, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:

@param "sourceServicename" (string) Filter events by the originating service
@param "sourceHostid" (string) Filter events by the originating host ID
@param "resourceType" (string) Filter events by the type of resource - tag, imageDigest, repository etc
@param "resourceId" (string) Filter events by the id of the resource
@param "level" (string) Filter events by the level - INFO or ERROR
@param "since" (string) Return events that occurred after the timestamp
@param "before" (string) Return events that occurred before the timestamp
@param "page" (int32) Pagination controls - return the nth page of results. Defaults to first page if left empty
@param "limit" (int32) Number of events in the result set. Defaults to 100 if left empty

@return EventsList

func (*AnchoreEngineApiService) ListImageContent

func (a *AnchoreEngineApiService) ListImageContent(ctx context.Context, imageDigest string) ([]string, *http.Response, error)

AnchoreEngineApiService List image content types * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @return []string

func (*AnchoreEngineApiService) ListImageContentByImageid

func (a *AnchoreEngineApiService) ListImageContentByImageid(ctx context.Context, imageId string) ([]string, *http.Response, error)

AnchoreEngineApiService List image content types * @param ctx context.Context for authentication, logging, tracing, etc. @param imageId @return []string

func (*AnchoreEngineApiService) ListImageMetadata

func (a *AnchoreEngineApiService) ListImageMetadata(ctx context.Context, imageDigest string) ([]string, *http.Response, error)

AnchoreEngineApiService List image metadata types * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @return []string

func (*AnchoreEngineApiService) ListImages

func (a *AnchoreEngineApiService) ListImages(ctx context.Context, localVarOptionals map[string]interface{}) (AnchoreImageList, *http.Response, error)

AnchoreEngineApiService List all visible images List all images visible to the user * @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:

@param "history" (bool) Include image history in the response
@param "imageToGet" (ImageFilter)
@param "fulltag" (string) Full docker-pull string to filter results by (e.g. docker.io/library/nginx:latest, or myhost.com:5000/testimages:v1.1.1)

@return AnchoreImageList

func (*AnchoreEngineApiService) ListImagetags

AnchoreEngineApiService List all visible image digests and tags List all image tags visible to the user * @param ctx context.Context for authentication, logging, tracing, etc. @return AnchoreImageTagSummaryList

func (*AnchoreEngineApiService) ListPolicies

func (a *AnchoreEngineApiService) ListPolicies(ctx context.Context, localVarOptionals map[string]interface{}) (PolicyBundleList, *http.Response, error)

AnchoreEngineApiService List policies List all saved policy bundles * @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:

@param "detail" (bool) Include policy bundle detail in the form of the full bundle content for each entry

@return PolicyBundleList

func (*AnchoreEngineApiService) ListRegistries

AnchoreEngineApiService List configured registries List all configured registries the system can/will watch * @param ctx context.Context for authentication, logging, tracing, etc. @return RegistryConfigurationList

func (*AnchoreEngineApiService) ListServices

AnchoreEngineApiService List system services * @param ctx context.Context for authentication, logging, tracing, etc. @return ServiceList

func (*AnchoreEngineApiService) ListSubscriptions

func (a *AnchoreEngineApiService) ListSubscriptions(ctx context.Context, localVarOptionals map[string]interface{}) (SubscriptionList, *http.Response, error)

AnchoreEngineApiService List all subscriptions * @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:

@param "subscriptionKey" (string) filter only subscriptions matching key
@param "subscriptionType" (string) filter only subscriptions matching type

@return SubscriptionList

func (*AnchoreEngineApiService) Ping

DefaultApiService Simple status check * @param ctx context.Context for authentication, logging, tracing, etc. @return string

func (*AnchoreEngineApiService) QueryImagesByPackage

func (a *AnchoreEngineApiService) QueryImagesByPackage(ctx context.Context, name string, localVarOptionals map[string]interface{}) (PaginatedImageList, *http.Response, error)

AnchoreEngineApiService List of images containing given package Filterable query interface to search for images containing specified package * @param ctx context.Context for authentication, logging, tracing, etc. @param name Name of package to search for (e.g. sed) @param optional (nil or map[string]interface{}) with one or more of:

@param "packageType" (string) Type of package to filter on (e.g. dpkg)
@param "version" (string) Version of named package to filter on (e.g. 4.4-1)
@param "page" (string) The page of results to fetch. Pages start at 1
@param "limit" (int32) Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page

@return PaginatedImageList

func (*AnchoreEngineApiService) QueryImagesByVulnerability

func (a *AnchoreEngineApiService) QueryImagesByVulnerability(ctx context.Context, vulnerabilityId string, localVarOptionals map[string]interface{}) (PaginatedVulnerableImageList, *http.Response, error)

AnchoreEngineApiService 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, tracing, etc. @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 map[string]interface{}) with one or more of:

@param "namespace" (string) Filter results to images within the given vulnerability namespace (e.g. debian:8, ubuntu:14.04)
@param "affectedPackage" (string) Filter results to images with vulnable packages with the given package name (e.g. libssl)
@param "severity" (string) Filter results to vulnerable package/vulnerability with the given severity
@param "vendorOnly" (bool) Filter results to include only vulnerabilities that are not marked as invalid by upstream OS vendor data
@param "page" (int32) The page of results to fetch. Pages start at 1
@param "limit" (int32) Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page

@return PaginatedVulnerableImageList

func (*AnchoreEngineApiService) QueryVulnerabilities

func (a *AnchoreEngineApiService) QueryVulnerabilities(ctx context.Context, id string, localVarOptionals map[string]interface{}) (PaginatedVulnerabilityList, *http.Response, error)

AnchoreEngineApiService 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, tracing, etc. @param id The ID of the vulnerability (e.g. CVE-1999-0001) @param optional (nil or map[string]interface{}) with one or more of:

@param "affectedPackage" (string) Filter results by specified package name (e.g. sed)
@param "affectedPackageVersion" (string) Filter results by specified package version (e.g. 4.4-1)
@param "page" (string) The page of results to fetch. Pages start at 1
@param "limit" (int32) Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page

@return PaginatedVulnerabilityList

func (*AnchoreEngineApiService) UpdatePolicy

func (a *AnchoreEngineApiService) UpdatePolicy(ctx context.Context, bundle PolicyBundleRecord, policyId string, localVarOptionals map[string]interface{}) (PolicyBundleList, *http.Response, error)

AnchoreEngineApiService Update policy Update/replace and existing policy * @param ctx context.Context for authentication, logging, tracing, etc. @param bundle @param policyId @param optional (nil or map[string]interface{}) with one or more of:

@param "active" (bool) Mark policy as active

@return PolicyBundleList

func (*AnchoreEngineApiService) UpdateRegistry

func (a *AnchoreEngineApiService) UpdateRegistry(ctx context.Context, registry string, registrydata RegistryConfigurationRequest, localVarOptionals map[string]interface{}) (RegistryConfigurationList, *http.Response, error)

AnchoreEngineApiService Update/replace a registry configuration Replaces an existing registry record with the given record * @param ctx context.Context for authentication, logging, tracing, etc. @param registry @param registrydata @param optional (nil or map[string]interface{}) with one or more of:

@param "validate" (bool) flag to determine whether or not to validate registry/credential at registry update time

@return RegistryConfigurationList

func (*AnchoreEngineApiService) UpdateSubscription

func (a *AnchoreEngineApiService) UpdateSubscription(ctx context.Context, subscriptionId string, subscription SubscriptionUpdate) (SubscriptionList, *http.Response, error)

AnchoreEngineApiService Update an existing and specific subscription * @param ctx context.Context for authentication, logging, tracing, etc. @param subscriptionId @param subscription @return SubscriptionList

type AnchoreImage

type AnchoreImage struct {
	ImageContent *ImageContent `json:"image_content,omitempty"`

	// Details specific to an image reference and type such as tag and image source
	ImageDetail []ImageDetail `json:"image_detail,omitempty"`

	LastUpdated time.Time `json:"last_updated,omitempty"`

	CreatedAt time.Time `json:"created_at,omitempty"`

	ImageDigest string `json:"imageDigest,omitempty"`

	UserId string `json:"userId,omitempty"`

	// State of the image
	ImageStatus string `json:"image_status,omitempty"`

	// A state value for the current status of the analysis progress of the image
	AnalysisStatus string `json:"analysis_status,omitempty"`
}

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

type AnchoreImageList

type AnchoreImageList []AnchoreImage

A list of Anchore Images

type AnchoreImageTagSummary

type AnchoreImageTagSummary struct {
	ImageDigest string `json:"imageDigest,omitempty"`

	ImageId string `json:"imageId,omitempty"`

	AnalysisStatus string `json:"analysis_status,omitempty"`

	Fulltag string `json:"fulltag,omitempty"`

	CreatedAt int32 `json:"created_at,omitempty"`

	AnalyzedAt int32 `json:"analyzed_at,omitempty"`

	TagDetectedAt int32 `json:"tag_detected_at,omitempty"`
}

A unique image in the engine.

type AnchoreImageTagSummaryList

type AnchoreImageTagSummaryList []AnchoreImageTagSummary

a list of AnchoreImageTagSummary objects

type ApiErrorResponse

type ApiErrorResponse struct {
	Code int32 `json:"code,omitempty"`

	ErrorType string `json:"error_type,omitempty"`

	Message string `json:"message,omitempty"`

	// Details structure for additional information about the error if available. Content and structure will be error specific.
	Detail *interface{} `json:"detail,omitempty"`
}

Generic HTTP API error response

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"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

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

type ContentFilesResponse

type ContentFilesResponse struct {
	ImageDigest string `json:"imageDigest,omitempty"`

	ContentType string `json:"content_type,omitempty"`

	Content []ContentFilesResponseContent `json:"content,omitempty"`
}

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"`
}

type ContentJavaPackageResponse

type ContentJavaPackageResponse struct {
	ImageDigest string `json:"imageDigest,omitempty"`

	ContentType string `json:"content_type,omitempty"`

	Content []ContentJavaPackageResponseContent `json:"content,omitempty"`
}

Java package content listings from images

type ContentJavaPackageResponseContent

type ContentJavaPackageResponseContent struct {
	Package_ string `json:"package,omitempty"`

	ImplementationVersion string `json:"implementation-version,omitempty"`

	SpecificationVersion string `json:"specification-version,omitempty"`

	MavenVersion string `json:"maven-version,omitempty"`

	Location string `json:"location,omitempty"`

	Type_ string `json:"type,omitempty"`

	Origin string `json:"origin,omitempty"`
}

type ContentPackageResponse

type ContentPackageResponse struct {
	ImageDigest string `json:"imageDigest,omitempty"`

	ContentType string `json:"content_type,omitempty"`

	Content []ContentPackageResponseContent `json:"content,omitempty"`
}

Package content listings from images

type ContentPackageResponseContent

type ContentPackageResponseContent struct {
	Package_ string `json:"package,omitempty"`

	Version string `json:"version,omitempty"`

	Size string `json:"size,omitempty"`

	Type_ string `json:"type,omitempty"`

	Origin string `json:"origin,omitempty"`

	License string `json:"license,omitempty"`

	Location string `json:"location,omitempty"`
}

type ContentResponse

type ContentResponse struct {
	ImageDigest string `json:"imageDigest,omitempty"`

	ContentType string `json:"content_type,omitempty"`

	Content []interface{} `json:"content,omitempty"`
}

Generic wrapper for content listings from images

type CredentialList

type CredentialList []AccessCredential

type EventResponse

type EventResponse struct {
	GeneratedUuid string `json:"generated_uuid,omitempty"`

	CreatedAt time.Time `json:"created_at,omitempty"`

	Event *EventResponseEvent `json:"event,omitempty"`
}

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

type EventResponseEvent

type EventResponseEvent struct {
	Source *EventResponseEventSource `json:"source,omitempty"`

	Resource *EventResponseEventResource `json:"resource,omitempty"`

	Type_ string `json:"type,omitempty"`

	Level string `json:"level,omitempty"`

	Message string `json:"message,omitempty"`

	Details *interface{} `json:"details,omitempty"`

	Timestamp time.Time `json:"timestamp,omitempty"`
}

type EventResponseEventResource

type EventResponseEventResource struct {
	UserId string `json:"user_id,omitempty"`

	Id string `json:"id,omitempty"`

	Type_ string `json:"type,omitempty"`
}

type EventResponseEventSource

type EventResponseEventSource struct {
	Servicename string `json:"servicename,omitempty"`

	Hostid string `json:"hostid,omitempty"`

	BaseUrl string `json:"base_url,omitempty"`

	RequestId string `json:"request_id,omitempty"`
}

type EventsList

type EventsList struct {

	// List of events
	Results []EventResponse `json:"results,omitempty"`

	// Boolean flag, True indicates there are more events and False otherwise
	NextPage bool `json:"next_page,omitempty"`

	// Number of events in this page
	ItemCount int32 `json:"item_count,omitempty"`

	// Page number of this result set
	Page int32 `json:"page,omitempty"`
}

Response envelope for paginated listing of events

type FeedGroupMetadata

type FeedGroupMetadata struct {
	Name string `json:"name,omitempty"`

	CreatedAt time.Time `json:"created_at,omitempty"`

	LastSync time.Time `json:"last_sync,omitempty"`

	RecordCount int32 `json:"record_count,omitempty"`
}

type FeedMetadata

type FeedMetadata struct {

	// name of the feed
	Name string `json:"name,omitempty"`

	// Date the metadata record was created in engine (first seen on source)
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Date the metadata was last updated
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	Groups []FeedGroupMetadata `json:"groups,omitempty"`

	LastFullSync time.Time `json:"last_full_sync,omitempty"`
}

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

type GateSpec

type GateSpec struct {

	// Gate name, as it would appear in a policy document
	Name string `json:"name,omitempty"`

	// Description of the gate
	Description string `json:"description,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"`
}

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

type ImageAnalysisReport

type ImageAnalysisReport struct {
}

Analysis report json to be imported

type ImageAnalysisRequest

type ImageAnalysisRequest struct {

	// Content of the dockerfile for the image, if available
	Dockerfile string `json:"dockerfile,omitempty"`

	// A full pullable digest reference for an image. e.g. docker.io/nginx@sha256:abc123
	Digest string `json:"digest,omitempty"`

	// Full pullable tag reference for image. e.g. docker.io/nginx:latest
	Tag string `json:"tag"`

	// Optional override of the image creation time, only honored when both tag and digest are also supplied  e.g. 2018-10-17T18:14:00Z
	CreatedAt time.Time `json:"created_at,omitempty"`

	// The type of image this is adding, defaults to \"docker\"
	ImageType string `json:"image_type,omitempty"`

	// Annotations to be associated with the added image in key/value form
	Annotations *interface{} `json:"annotations,omitempty"`
}

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

type ImageContent

type ImageContent struct {
}

A metadata content record for a specific image, containing different content type entries

type ImageDetail

type ImageDetail struct {
	CreatedAt time.Time `json:"created_at,omitempty"`

	LastUpdated time.Time `json:"last_updated,omitempty"`

	// Full docker-pullalbe tag string referencing the image
	Fulltag string `json:"fulltag,omitempty"`

	// Full docker-pullable digest string including the registry url and repository necessary get the image
	Fulldigest string `json:"fulldigest,omitempty"`

	UserId string `json:"userId,omitempty"`

	ImageId string `json:"imageId,omitempty"`

	Registry string `json:"registry,omitempty"`

	Repo string `json:"repo,omitempty"`

	Dockerfile string `json:"dockerfile,omitempty"`

	// The parent Anchore Image record to which this detail maps
	ImageDigest string `json:"imageDigest,omitempty"`
}

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

type ImageFilter

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

	Digest string `json:"digest,omitempty"`
}

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"`
}

A reference to an image

type ImageReference

type ImageReference struct {

	// The image digest
	Digest string `json:"digest,omitempty"`

	// The image id if available
	Id string `json:"id,omitempty"`

	// Timestamp, in rfc3339 format, indicating when the image state became 'analyzed' in Anchore Engine.
	AnalyzedAt string `json:"analyzed_at,omitempty"`

	TagHistory []TagEntry `json:"tag_history,omitempty"`
}

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"`

	Name string `json:"name"`

	Registry string `json:"registry"`

	Repository string `json:"repository"`

	Image *ImageRef `json:"image"`
}

type ImageWithPackages

type ImageWithPackages struct {
	Image *ImageReference `json:"image,omitempty"`

	Packages []PackageReference `json:"packages,omitempty"`
}

An image record that contains packages

type MappingRule

type MappingRule struct {
	Id string `json:"id,omitempty"`

	Name string `json:"name"`

	WhitelistIds []string `json:"whitelist_ids,omitempty"`

	// 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"`

	Image *ImageRef `json:"image"`
}

type MetadataResponse

type MetadataResponse struct {
	ImageDigest string `json:"imageDigest,omitempty"`

	MetadataType string `json:"metadata_type,omitempty"`
}

Generic wrapper for metadata listings from images

type PackageReference

type PackageReference struct {

	// Package name
	Name string `json:"name,omitempty"`

	// A version for the package. If null, then references all versions
	Version string `json:"version,omitempty"`

	// Package type (e.g. package, rpm, deb, apk, jar, npm, gem, ...)
	Type_ string `json:"type,omitempty"`
}

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

type PaginatedImageList

type PaginatedImageList struct {

	// The page number returned (should match the requested page query string param)
	Page string `json:"page,omitempty"`

	// True if additional pages exist (page + 1) or False if this is the last page
	NextPage string `json:"next_page,omitempty"`

	// The number of items sent in this response
	ReturnedCount int32 `json:"returned_count,omitempty"`

	Images []ImageWithPackages `json:"images,omitempty"`
}

Pagination wrapped list of images that match some filter

type PaginatedVulnerabilityList

type PaginatedVulnerabilityList struct {

	// The page number returned (should match the requested page query string param)
	Page string `json:"page,omitempty"`

	// True if additional pages exist (page + 1) or False if this is the last page
	NextPage string `json:"next_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"`
}

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

type PaginatedVulnerableImageList

type PaginatedVulnerableImageList struct {

	// The page number returned (should match the requested page query string param)
	Page string `json:"page,omitempty"`

	// True if additional pages exist (page + 1) or False if this is the last page
	NextPage string `json:"next_page,omitempty"`

	// The number of items sent in this response
	ReturnedCount int32 `json:"returned_count,omitempty"`

	Images []VulnerableImage `json:"images,omitempty"`
}

Pagination wrapped list of images with vulnerabilties that match some filter

type PaginationProperties

type PaginationProperties struct {

	// The page number returned (should match the requested page query string param)
	Page string `json:"page,omitempty"`

	// True if additional pages exist (page + 1) or False if this is the last page
	NextPage string `json:"next_page,omitempty"`

	// The number of items sent in this response
	ReturnedCount int32 `json:"returned_count,omitempty"`
}

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

type Policy

type Policy struct {
	Id string `json:"id"`

	Name string `json:"name,omitempty"`

	Comment string `json:"comment,omitempty"`

	Version string `json:"version"`

	Rules []PolicyRule `json:"rules,omitempty"`
}

type PolicyBundle

type PolicyBundle struct {

	// Id of the bundle
	Id string `json:"id"`

	// Human readable name for the bundle
	Name string `json:"name,omitempty"`

	// Description of the bundle, human readable
	Comment string `json:"comment,omitempty"`

	// Version id for this bundle format
	Version string `json:"version"`

	// Whitelists which define which policy matches to disregard explicitly in the final policy decision
	Whitelists []Whitelist `json:"whitelists,omitempty"`

	// Policies which define the go/stop/warn status of an image using rule matches on image properties
	Policies []Policy `json:"policies"`

	// 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"`

	// 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"`

	// 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"`
}

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

type PolicyBundleList

type PolicyBundleList []PolicyBundleRecord

List of PolicyBundleRecord objects

type PolicyBundleRecord

type PolicyBundleRecord struct {
	CreatedAt time.Time `json:"created_at,omitempty"`

	LastUpdated time.Time `json:"last_updated,omitempty"`

	// The bundle's identifier
	PolicyId string `json:"policyId,omitempty"`

	// True if the bundle is currently defined to be used automatically
	Active bool `json:"active,omitempty"`

	// UserId of the user that owns the bundle
	UserId string `json:"userId,omitempty"`

	// Source location of where the policy bundle originated
	PolicySource string `json:"policy_source,omitempty"`

	Policybundle *PolicyBundle `json:"policybundle,omitempty"`
}

A policy bundle plus some metadata

type PolicyEvaluation

type PolicyEvaluation map[string]map[string][]map[string]interface{}

Evaluation response object, loosely defined due to variable keys (the image id is a key in the json)

type PolicyEvaluationList

type PolicyEvaluationList []PolicyEvaluation

Evaluation response object

type PolicyRule

type PolicyRule struct {
	Id string `json:"id,omitempty"`

	Gate string `json:"gate"`

	Trigger string `json:"trigger"`

	Action string `json:"action"`

	Params []PolicyRuleParams `json:"params,omitempty"`
}

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"`
}

type RegistryConfiguration

type RegistryConfiguration struct {
	CreatedAt time.Time `json:"created_at,omitempty"`

	LastUpated time.Time `json:"last_upated,omitempty"`

	// Username portion of credential to use for this registry
	RegistryUser string `json:"registry_user,omitempty"`

	// Type of registry
	RegistryType string `json:"registry_type,omitempty"`

	// Engine user that owns this registry entry
	UserId string `json:"userId,omitempty"`

	// hostname:port string for accessing the registry, as would be used in a docker pull operation
	Registry string `json:"registry,omitempty"`

	// Use TLS/SSL verification for the registry URL
	RegistryVerify bool `json:"registry_verify,omitempty"`
}

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

type RegistryConfigurationList

type RegistryConfigurationList []RegistryConfiguration

List of registry configurations

type RegistryConfigurationRequest

type RegistryConfigurationRequest struct {

	// Username portion of credential to use for this registry
	RegistryUser string `json:"registry_user,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"`

	// hostname:port string for accessing the registry, as would be used in a docker pull operation
	Registry string `json:"registry,omitempty"`

	// Use TLS/SSL verification for the registry URL
	RegistryVerify bool `json:"registry_verify,omitempty"`
}

A registry record describing the endpoint and credentials for a registry

type Service

type Service struct {

	// The unique id of the host on which the service is executing
	Hostid string `json:"hostid,omitempty"`

	// Registered service name
	Servicename string `json:"servicename,omitempty"`

	// The url to reach the service, including port as needed
	BaseUrl string `json:"base_url,omitempty"`

	// A state indicating the condition of the service. Normal operation is 'registered'
	StatusMessage string `json:"status_message,omitempty"`

	ServiceDetail *StatusResponse `json:"service_detail,omitempty"`

	Status bool `json:"status,omitempty"`

	// The version of the service as reported by the service implementation on registration
	Version string `json:"version,omitempty"`
}

A service status record

type ServiceList

type ServiceList []Service

A list of service objects

type StandaloneVulnerability

type StandaloneVulnerability struct {

	// Vulnerability identifier. May be CVE-X, RHSA-X, etc. Not necessarily unique across namespaces
	Id string `json:"id,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"`

	// The array of packages (typically packages) that are vulnerable-to or provide fixes-for this vulnerability
	AffectedPackages []PackageReference `json:"affected_packages,omitempty"`

	// Severity label specific to the namepsace
	Severity string `json:"severity,omitempty"`

	// URL for the upstream CVE record in the reporting source (e.g. ubuntu security tracker)
	Link string `json:"link,omitempty"`
}

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

type StatusResponse

type StatusResponse struct {
	Available bool `json:"available,omitempty"`

	Busy bool `json:"busy,omitempty"`

	Up bool `json:"up,omitempty"`

	Message string `json:"message,omitempty"`

	Version string `json:"version,omitempty"`

	DbVersion string `json:"db_version,omitempty"`

	Detail *interface{} `json:"detail,omitempty"`
}

System status response

type Subscription

type Subscription struct {

	// 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"`

	// Is the subscription currently active
	Active bool `json:"active,omitempty"`

	// the unique id for this subscription record
	SubscriptionId string `json:"subscription_id,omitempty"`
}

Subscription entry

type SubscriptionList

type SubscriptionList []Subscription

List of Subscriptions

type SubscriptionRequest

type SubscriptionRequest struct {
	SubscriptionKey string `json:"subscription_key,omitempty"`

	SubscriptionValue string `json:"subscription_value,omitempty"`

	SubscriptionType string `json:"subscription_type,omitempty"`
}

A subscription entry to add to the system

type SubscriptionUpdate

type SubscriptionUpdate struct {

	// The new subscription value, e.g. the new tag to be subscribed to
	SubscriptionValue string `json:"subscription_value,omitempty"`

	// Toggle the subscription processing on or off
	Active bool `json:"active,omitempty"`
}

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

type SystemApiService

type SystemApiService service

func (*SystemApiService) DeleteService

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

SystemApiService Delete the service config * @param ctx context.Context for authentication, logging, tracing, etc. @param servicename @param hostid @return

func (*SystemApiService) DescribePolicy

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

SystemApiService Describe the policy language spec implemented by this service. Get the policy language spec for this service * @param ctx context.Context for authentication, logging, tracing, etc. @return []GateSpec

func (*SystemApiService) GetServiceDetail

func (a *SystemApiService) GetServiceDetail(ctx context.Context) (SystemStatusResponse, *http.Response, error)

SystemApiService System status Get the system status including queue lengths * @param ctx context.Context for authentication, logging, tracing, etc. @return SystemStatusResponse

func (*SystemApiService) GetServicesByName

func (a *SystemApiService) GetServicesByName(ctx context.Context, servicename string) (ServiceList, *http.Response, error)

SystemApiService Get a service configuration and state * @param ctx context.Context for authentication, logging, tracing, etc. @param servicename @return ServiceList

func (*SystemApiService) GetServicesByNameAndHost

func (a *SystemApiService) GetServicesByNameAndHost(ctx context.Context, servicename string, hostid string) (ServiceList, *http.Response, error)

SystemApiService Get service config for a specific host * @param ctx context.Context for authentication, logging, tracing, etc. @param servicename @param hostid @return ServiceList

func (*SystemApiService) GetStatus

SystemApiService Service status Get the API service status * @param ctx context.Context for authentication, logging, tracing, etc. @return StatusResponse

func (*SystemApiService) GetSystemFeeds

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

SystemApiService list feeds operations and information

* @param ctx context.Context for authentication, logging, tracing, etc. @return []FeedMetadata

func (*SystemApiService) ListServices

func (a *SystemApiService) ListServices(ctx context.Context) (ServiceList, *http.Response, error)

SystemApiService List system services * @param ctx context.Context for authentication, logging, tracing, etc. @return ServiceList

func (*SystemApiService) PostSystemFeeds

func (a *SystemApiService) PostSystemFeeds(ctx context.Context, localVarOptionals map[string]interface{}) (*http.Response, error)

SystemApiService trigger feeds operations

* @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:

@param "flush" (bool) instruct system to flush existing data feeds records from anchore-engine
@param "sync" (bool) instruct system to re-sync data feeds

@return

type SystemStatusResponse

type SystemStatusResponse struct {
	ServiceStates *ServiceList `json:"service_states,omitempty"`
}

System status response

type TagEntry

type TagEntry struct {

	// 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"`

	// 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"`
}

A docker-pullable tag value as well as deconstructed components

type TriggerParamSpec

type TriggerParamSpec struct {

	// Parameter name as it appears in policy document
	Name string `json:"name,omitempty"`

	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"`

	// 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"`

	// Is this a required parameter or optional
	Required bool `json:"required,omitempty"`

	// If present, a definition for validation of input. Typically a jsonschema object that can be used to validate an input against.
	Validator *interface{} `json:"validator,omitempty"`
}

type TriggerSpec

type TriggerSpec struct {

	// Name of the trigger as it would appear in a policy document
	Name string `json:"name,omitempty"`

	// Trigger description for what it tests and when it will fire during evaluation
	Description string `json:"description,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"`

	// The list of parameters that are valid for this trigger
	Parameters []TriggerParamSpec `json:"parameters,omitempty"`
}

Definition of a trigger and its parameters

type User

type User struct {

	// The username to authenticate with
	Username string `json:"username"`

	// 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"`

	// The uuid of the user that created this user
	CreatedBy string `json:"created_by,omitempty"`
}

A username, password pair that can be used to authenticate with the service as a specific user

type UserCreationRequest

type UserCreationRequest struct {

	// The username to create
	Username string `json:"username"`

	// The initial password for the user, must be at least 6 characters, up to 128
	Password string `json:"password"`
}

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

type UserList

type UserList []User

type UserManagementApiService

type UserManagementApiService service

func (*UserManagementApiService) CreateAccount

UserManagementApiService Create a new user. Only avaialble to admin user. * @param ctx context.Context for authentication, logging, tracing, etc. @param account @return Account

func (*UserManagementApiService) CreateUser

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

UserManagementApiService Create a new user * @param ctx context.Context for authentication, logging, tracing, etc. @param accountname @param user @return User

func (*UserManagementApiService) CreateUserCredential

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

UserManagementApiService add/replace credential * @param ctx context.Context for authentication, logging, tracing, etc. @param accountname @param username @param credential @return User

func (*UserManagementApiService) DeleteAccount

func (a *UserManagementApiService) DeleteAccount(ctx context.Context, accountname string) (*http.Response, error)

UserManagementApiService 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, tracing, etc. @param accountname @return

func (*UserManagementApiService) DeleteUser

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

UserManagementApiService 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, tracing, etc. @param accountname @param username @return

func (*UserManagementApiService) DeleteUserCredential

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

UserManagementApiService Delete a credential by type * @param ctx context.Context for authentication, logging, tracing, etc. @param accountname @param username @param credentialType @return

func (*UserManagementApiService) GetAccount

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

UserManagementApiService 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, tracing, etc. @param accountname @return Account

func (*UserManagementApiService) GetAccountUser

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

UserManagementApiService Get a specific user in the specified account * @param ctx context.Context for authentication, logging, tracing, etc. @param accountname @param username @return User

func (*UserManagementApiService) ListAccounts

func (a *UserManagementApiService) ListAccounts(ctx context.Context, localVarOptionals map[string]interface{}) (AccountList, *http.Response, error)

UserManagementApiService List user summaries. Only available to the system admin user. * @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:

@param "state" (string) Filter accounts by state

@return AccountList

func (*UserManagementApiService) ListUserCredentials

func (a *UserManagementApiService) ListUserCredentials(ctx context.Context, accountname string, username string) (CredentialList, *http.Response, error)

UserManagementApiService Get current credential summary * @param ctx context.Context for authentication, logging, tracing, etc. @param accountname @param username @return CredentialList

func (*UserManagementApiService) ListUsers

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

UserManagementApiService List accounts for the user * @param ctx context.Context for authentication, logging, tracing, etc. @param accountname @return []User

func (*UserManagementApiService) UpdateAccountState

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

UserManagementApiService Update the state of an account to either enabled or disabled. For deletion use the DELETE route * @param ctx context.Context for authentication, logging, tracing, etc. @param accountname @param desiredState @return AccountStatus

type VulnerabilitiesApiService

type VulnerabilitiesApiService service

func (*VulnerabilitiesApiService) GetImageVulnerabilitiesByType

func (a *VulnerabilitiesApiService) GetImageVulnerabilitiesByType(ctx context.Context, imageDigest string, vtype string, localVarOptionals map[string]interface{}) (VulnerabilityResponse, *http.Response, error)

VulnerabilitiesApiService Get vulnerabilities by type * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @param vtype @param optional (nil or map[string]interface{}) with one or more of:

@param "forceRefresh" (bool)
@param "vendorOnly" (bool)

@return VulnerabilityResponse

func (*VulnerabilitiesApiService) GetImageVulnerabilitiesByTypeImageId

func (a *VulnerabilitiesApiService) GetImageVulnerabilitiesByTypeImageId(ctx context.Context, imageId string, vtype string) (VulnerabilityResponse, *http.Response, error)

VulnerabilitiesApiService Get vulnerabilities by type * @param ctx context.Context for authentication, logging, tracing, etc. @param imageId @param vtype @return VulnerabilityResponse

func (*VulnerabilitiesApiService) GetImageVulnerabilityTypes

func (a *VulnerabilitiesApiService) GetImageVulnerabilityTypes(ctx context.Context, imageDigest string) ([]string, *http.Response, error)

VulnerabilitiesApiService Get vulnerability types * @param ctx context.Context for authentication, logging, tracing, etc. @param imageDigest @return []string

func (*VulnerabilitiesApiService) GetImageVulnerabilityTypesByImageId

func (a *VulnerabilitiesApiService) GetImageVulnerabilityTypesByImageId(ctx context.Context, imageId string) ([]string, *http.Response, error)

VulnerabilitiesApiService Get vulnerability types * @param ctx context.Context for authentication, logging, tracing, etc. @param imageId @return []string

func (*VulnerabilitiesApiService) QueryImagesByVulnerability

func (a *VulnerabilitiesApiService) QueryImagesByVulnerability(ctx context.Context, vulnerabilityId string, localVarOptionals map[string]interface{}) (PaginatedVulnerableImageList, *http.Response, error)

VulnerabilitiesApiService 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, tracing, etc. @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 map[string]interface{}) with one or more of:

@param "namespace" (string) Filter results to images within the given vulnerability namespace (e.g. debian:8, ubuntu:14.04)
@param "affectedPackage" (string) Filter results to images with vulnable packages with the given package name (e.g. libssl)
@param "severity" (string) Filter results to vulnerable package/vulnerability with the given severity
@param "vendorOnly" (bool) Filter results to include only vulnerabilities that are not marked as invalid by upstream OS vendor data
@param "page" (int32) The page of results to fetch. Pages start at 1
@param "limit" (int32) Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page

@return PaginatedVulnerableImageList

func (*VulnerabilitiesApiService) QueryVulnerabilities

func (a *VulnerabilitiesApiService) QueryVulnerabilities(ctx context.Context, id string, localVarOptionals map[string]interface{}) (PaginatedVulnerabilityList, *http.Response, error)

VulnerabilitiesApiService 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, tracing, etc. @param id The ID of the vulnerability (e.g. CVE-1999-0001) @param optional (nil or map[string]interface{}) with one or more of:

@param "affectedPackage" (string) Filter results by specified package name (e.g. sed)
@param "affectedPackageVersion" (string) Filter results by specified package version (e.g. 4.4-1)
@param "page" (string) The page of results to fetch. Pages start at 1
@param "limit" (int32) Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page

@return PaginatedVulnerabilityList

type Vulnerability

type Vulnerability struct {

	// The vulnerability identifier, such as CVE-2017-100, or RHSA-2017123
	Vuln string `json:"vuln,omitempty"`

	// The package containing a fix, if available
	Fix string `json:"fix,omitempty"`

	// The severity of the vulnerability
	Severity string `json:"severity,omitempty"`

	// The package name and version that are vulnerable in the image
	Package_ string `json:"package,omitempty"`

	// The url for more information about the vulnerability
	Url string `json:"url,omitempty"`

	// 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 name of the vulnerable package artifact
	PackageName string `json:"package_name,omitempty"`

	// The version of the vulnerable package artifact
	PackageVersion string `json:"package_version,omitempty"`

	// The type of vulnerable package
	PackageType string `json:"package_type,omitempty"`

	// The CPE string (if applicable) describing the package to vulnerability match
	PackageCpe string `json:"package_cpe,omitempty"`

	// The location (if applicable) of the vulnerable package in the container filesystem
	PackagePath string `json:"package_path,omitempty"`
}

type VulnerabilityList

type VulnerabilityList []Vulnerability

List of Vulnerability objects

type VulnerabilityResponse

type VulnerabilityResponse struct {
	ImageDigest string `json:"imageDigest,omitempty"`

	VulnerabilityType string `json:"vulnerability_type,omitempty"`

	Vulnerabilities *VulnerabilityList `json:"vulnerabilities,omitempty"`
}

envelope containing list of vulnerabilities

type VulnerableImage

type VulnerableImage struct {
	Image *ImageReference `json:"image,omitempty"`

	AffectedPackages []VulnerablePackageReference `json:"affected_packages,omitempty"`
}

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"`

	// A version for the package. If null, then references all versions
	Version string `json:"version,omitempty"`

	// Package type (e.g. package, rpm, deb, apk, jar, npm, gem, ...)
	Type_ string `json:"type,omitempty"`

	// Severity of vulnerability affecting package
	Severity string `json:"severity,omitempty"`

	// Vulnerability namespace of affected package
	Namespace string `json:"namespace,omitempty"`
}

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

type Whitelist

type Whitelist struct {
	Id string `json:"id"`

	Name string `json:"name,omitempty"`

	Version string `json:"version"`

	Comment string `json:"comment,omitempty"`

	Items []WhitelistItem `json:"items,omitempty"`
}

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

type WhitelistItem

type WhitelistItem struct {
	Id string `json:"id,omitempty"`

	Gate string `json:"gate"`

	TriggerId string `json:"trigger_id"`
}

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

Jump to

Keyboard shortcuts

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