Documentation ¶
Overview ¶
Copyright 2022 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package alpha defines operations in the declarative SDK.
Copyright 2022 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package containeranalysis contains utilities for working with GCP's container analysis resources.
Copyright 2022 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2022 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) ApplyNote(ctx context.Context, rawDesired *Note, opts ...dcl.ApplyOption) (*Note, error)
- func (c *Client) DeleteAllNote(ctx context.Context, project string, filter func(*Note) bool) error
- func (c *Client) DeleteNote(ctx context.Context, r *Note) error
- func (c *Client) GetNote(ctx context.Context, r *Note) (*Note, error)
- func (c *Client) ListNote(ctx context.Context, project string) (*NoteList, error)
- func (c *Client) ListNoteWithMaxResults(ctx context.Context, project string, pageSize int32) (*NoteList, error)
- type Note
- type NoteAttestation
- type NoteAttestationHint
- type NoteDeployment
- type NoteDiscovery
- type NoteDiscoveryAnalysisKindEnum
- type NoteImage
- type NoteImageFingerprint
- type NoteList
- type NotePackage
- type NotePackageDistribution
- type NotePackageDistributionArchitectureEnum
- type NotePackageDistributionLatestVersion
- type NotePackageDistributionLatestVersionKindEnum
- type NoteRelatedUrl
Constants ¶
const NoteMaxPage = -1
Variables ¶
var YAML_note = []byte("info:\n title: ContainerAnalysis/Note\n description: The ContainerAnalysis Note resource\n x-dcl-struct-name: Note\n x-dcl-has-iam: false\npaths:\n get:\n description: The function used to get information about a Note\n parameters:\n - name: Note\n required: true\n description: A full instance of a Note\n apply:\n description: The function used to apply information about a Note\n parameters:\n - name: Note\n required: true\n description: A full instance of a Note\n delete:\n description: The function used to delete a Note\n parameters:\n - name: Note\n required: true\n description: A full instance of a Note\n deleteAll:\n description: The function used to delete all Note\n parameters:\n - name: project\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many Note\n parameters:\n - name: project\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n Note:\n title: Note\n x-dcl-id: projects/{{project}}/notes/{{name}}\n x-dcl-parent-container: project\n x-dcl-has-iam: false\n type: object\n required:\n - name\n - project\n properties:\n attestation:\n type: object\n x-dcl-go-name: Attestation\n x-dcl-go-type: NoteAttestation\n description: A note describing an attestation role.\n x-dcl-conflicts:\n - image\n - package\n - deployment\n - discovery\n properties:\n hint:\n type: object\n x-dcl-go-name: Hint\n x-dcl-go-type: NoteAttestationHint\n description: Hint hints at the purpose of the attestation authority.\n required:\n - humanReadableName\n properties:\n humanReadableName:\n type: string\n x-dcl-go-name: HumanReadableName\n description: Required. The human readable name of this attestation\n authority, for example \"qa\".\n createTime:\n type: string\n format: date-time\n x-dcl-go-name: CreateTime\n readOnly: true\n description: Output only. The time this note was created. This field can\n be used as a filter in list requests.\n x-kubernetes-immutable: true\n deployment:\n type: object\n x-dcl-go-name: Deployment\n x-dcl-go-type: NoteDeployment\n description: A note describing something that can be deployed.\n x-dcl-conflicts:\n - image\n - package\n - discovery\n - attestation\n required:\n - resourceUri\n properties:\n resourceUri:\n type: array\n x-dcl-go-name: ResourceUri\n description: Required. Resource URI for the artifact being deployed.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n discovery:\n type: object\n x-dcl-go-name: Discovery\n x-dcl-go-type: NoteDiscovery\n description: A note describing the initial analysis of a resource.\n x-dcl-conflicts:\n - image\n - package\n - deployment\n - attestation\n required:\n - analysisKind\n properties:\n analysisKind:\n type: string\n x-dcl-go-name: AnalysisKind\n x-dcl-go-type: NoteDiscoveryAnalysisKindEnum\n description: 'The kind of analysis that is handled by this discovery.\n Possible values: NOTE_KIND_UNSPECIFIED, VULNERABILITY, BUILD, IMAGE,\n PACKAGE, DEPLOYMENT, DISCOVERY, ATTESTATION, UPGRADE'\n enum:\n - NOTE_KIND_UNSPECIFIED\n - VULNERABILITY\n - BUILD\n - IMAGE\n - PACKAGE\n - DEPLOYMENT\n - DISCOVERY\n - ATTESTATION\n - UPGRADE\n expirationTime:\n type: string\n format: date-time\n x-dcl-go-name: ExpirationTime\n description: Time of expiration for this note. Empty if note does not expire.\n image:\n type: object\n x-dcl-go-name: Image\n x-dcl-go-type: NoteImage\n description: A note describing a base image.\n x-dcl-conflicts:\n - package\n - deployment\n - discovery\n - attestation\n required:\n - resourceUrl\n - fingerprint\n properties:\n fingerprint:\n type: object\n x-dcl-go-name: Fingerprint\n x-dcl-go-type: NoteImageFingerprint\n description: Required. Immutable. The fingerprint of the base image.\n required:\n - v1Name\n - v2Blob\n properties:\n v1Name:\n type: string\n x-dcl-go-name: V1Name\n description: Required. The layer ID of the final layer in the Docker\n image's v1 representation.\n v2Blob:\n type: array\n x-dcl-go-name: V2Blob\n description: Required. The ordered list of v2 blobs that represent\n a given image.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n v2Name:\n type: string\n x-dcl-go-name: V2Name\n readOnly: true\n description: 'Output only. The name of the image''s v2 blobs computed\n via: ) Only the name of the final blob is kept.'\n resourceUrl:\n type: string\n x-dcl-go-name: ResourceUrl\n description: Required. Immutable. The resource_url for the resource\n representing the basis of associated occurrence images.\n longDescription:\n type: string\n x-dcl-go-name: LongDescription\n description: A detailed description of this note.\n name:\n type: string\n x-dcl-go-name: Name\n description: Required. Immutable. The name of the package.\n x-kubernetes-immutable: true\n package:\n type: object\n x-dcl-go-name: Package\n x-dcl-go-type: NotePackage\n description: Required for non-Windows OS. The package this Upgrade is for.\n x-dcl-conflicts:\n - image\n - deployment\n - discovery\n - attestation\n required:\n - name\n properties:\n distribution:\n type: array\n x-dcl-go-name: Distribution\n description: The various channels by which a package is distributed.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: NotePackageDistribution\n required:\n - cpeUri\n properties:\n architecture:\n type: string\n x-dcl-go-name: Architecture\n x-dcl-go-type: NotePackageDistributionArchitectureEnum\n description: 'The CPU architecture for which packages in this\n distribution channel were built Possible values: ARCHITECTURE_UNSPECIFIED,\n X86, X64'\n enum:\n - ARCHITECTURE_UNSPECIFIED\n - X86\n - X64\n cpeUri:\n type: string\n x-dcl-go-name: CpeUri\n description: The cpe_uri in [cpe format](https://cpe.mitre.org/specification/)\n denoting the package manager version distributing a package.\n description:\n type: string\n x-dcl-go-name: Description\n description: The distribution channel-specific description of\n this package.\n latestVersion:\n type: object\n x-dcl-go-name: LatestVersion\n x-dcl-go-type: NotePackageDistributionLatestVersion\n description: The latest available version of this package in this\n distribution channel.\n required:\n - kind\n properties:\n epoch:\n type: integer\n format: int64\n x-dcl-go-name: Epoch\n description: Used to correct mistakes in the version numbering\n scheme.\n fullName:\n type: string\n x-dcl-go-name: FullName\n description: Human readable version string. This string is\n of the form :- and is only set when kind is NORMAL.\n kind:\n type: string\n x-dcl-go-name: Kind\n x-dcl-go-type: NotePackageDistributionLatestVersionKindEnum\n description: 'Distinguish between sentinel MIN/MAX versions\n and normal versions. If kind is not NORMAL, then the other\n fields are ignored. Possible values: NOTE_KIND_UNSPECIFIED,\n VULNERABILITY, BUILD, IMAGE, PACKAGE, DEPLOYMENT, DISCOVERY,\n ATTESTATION, UPGRADE'\n enum:\n - NOTE_KIND_UNSPECIFIED\n - VULNERABILITY\n - BUILD\n - IMAGE\n - PACKAGE\n - DEPLOYMENT\n - DISCOVERY\n - ATTESTATION\n - UPGRADE\n name:\n type: string\n x-dcl-go-name: Name\n description: The main part of the version name.\n revision:\n type: string\n x-dcl-go-name: Revision\n description: The iteration of the package build from the above\n version.\n maintainer:\n type: string\n x-dcl-go-name: Maintainer\n description: A freeform string denoting the maintainer of this\n package.\n url:\n type: string\n x-dcl-go-name: Url\n description: The distribution channel-specific homepage for this\n package.\n name:\n type: string\n x-dcl-go-name: Name\n description: The name of the package.\n project:\n type: string\n x-dcl-go-name: Project\n description: The project for the resource\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n relatedUrl:\n type: array\n x-dcl-go-name: RelatedUrl\n description: URLs associated with this note.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: NoteRelatedUrl\n properties:\n label:\n type: string\n x-dcl-go-name: Label\n description: Label to describe usage of the URL\n url:\n type: string\n x-dcl-go-name: Url\n description: Specific URL to associate with the note\n shortDescription:\n type: string\n x-dcl-go-name: ShortDescription\n description: A one sentence description of this note.\n updateTime:\n type: string\n format: date-time\n x-dcl-go-name: UpdateTime\n readOnly: true\n description: Output only. The time this note was last updated. This field\n can be used as a filter in list requests.\n x-kubernetes-immutable: true\n")
blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/containeranalysis/alpha/note.yaml
Functions ¶
This section is empty.
Types ¶
type Client ¶
The Client is the base struct of all operations. This will receive the Get, Delete, List, and Apply operations on all resources.
func (*Client) DeleteAllNote ¶
DeleteAllNote deletes all resources that the filter functions returns true on.
type Note ¶
type Note struct { Name *string `json:"name"` ShortDescription *string `json:"shortDescription"` LongDescription *string `json:"longDescription"` RelatedUrl []NoteRelatedUrl `json:"relatedUrl"` ExpirationTime *string `json:"expirationTime"` CreateTime *string `json:"createTime"` UpdateTime *string `json:"updateTime"` Image *NoteImage `json:"image"` Package *NotePackage `json:"package"` Discovery *NoteDiscovery `json:"discovery"` Deployment *NoteDeployment `json:"deployment"` Attestation *NoteAttestation `json:"attestation"` Project *string `json:"project"` }
func (*Note) Describe ¶
func (r *Note) Describe() dcl.ServiceTypeVersion
Describe returns a simple description of this resource to ensure that automated tools can identify it.
type NoteAttestation ¶
type NoteAttestation struct { Hint *NoteAttestationHint `json:"hint"` // contains filtered or unexported fields }
var EmptyNoteAttestation *NoteAttestation = &NoteAttestation{empty: true}
This object is used to assert a desired state where this NoteAttestation is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*NoteAttestation) Empty ¶
func (r *NoteAttestation) Empty() bool
func (*NoteAttestation) HashCode ¶
func (r *NoteAttestation) HashCode() string
func (*NoteAttestation) String ¶
func (r *NoteAttestation) String() string
func (*NoteAttestation) UnmarshalJSON ¶
func (r *NoteAttestation) UnmarshalJSON(data []byte) error
type NoteAttestationHint ¶
type NoteAttestationHint struct { HumanReadableName *string `json:"humanReadableName"` // contains filtered or unexported fields }
var EmptyNoteAttestationHint *NoteAttestationHint = &NoteAttestationHint{empty: true}
This object is used to assert a desired state where this NoteAttestationHint is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*NoteAttestationHint) Empty ¶
func (r *NoteAttestationHint) Empty() bool
func (*NoteAttestationHint) HashCode ¶
func (r *NoteAttestationHint) HashCode() string
func (*NoteAttestationHint) String ¶
func (r *NoteAttestationHint) String() string
func (*NoteAttestationHint) UnmarshalJSON ¶
func (r *NoteAttestationHint) UnmarshalJSON(data []byte) error
type NoteDeployment ¶
type NoteDeployment struct { ResourceUri []string `json:"resourceUri"` // contains filtered or unexported fields }
var EmptyNoteDeployment *NoteDeployment = &NoteDeployment{empty: true}
This object is used to assert a desired state where this NoteDeployment is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*NoteDeployment) Empty ¶
func (r *NoteDeployment) Empty() bool
func (*NoteDeployment) HashCode ¶
func (r *NoteDeployment) HashCode() string
func (*NoteDeployment) String ¶
func (r *NoteDeployment) String() string
func (*NoteDeployment) UnmarshalJSON ¶
func (r *NoteDeployment) UnmarshalJSON(data []byte) error
type NoteDiscovery ¶
type NoteDiscovery struct { AnalysisKind *NoteDiscoveryAnalysisKindEnum `json:"analysisKind"` // contains filtered or unexported fields }
var EmptyNoteDiscovery *NoteDiscovery = &NoteDiscovery{empty: true}
This object is used to assert a desired state where this NoteDiscovery is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*NoteDiscovery) Empty ¶
func (r *NoteDiscovery) Empty() bool
func (*NoteDiscovery) HashCode ¶
func (r *NoteDiscovery) HashCode() string
func (*NoteDiscovery) String ¶
func (r *NoteDiscovery) String() string
func (*NoteDiscovery) UnmarshalJSON ¶
func (r *NoteDiscovery) UnmarshalJSON(data []byte) error
type NoteDiscoveryAnalysisKindEnum ¶
type NoteDiscoveryAnalysisKindEnum string
The enum NoteDiscoveryAnalysisKindEnum.
func NoteDiscoveryAnalysisKindEnumRef ¶
func NoteDiscoveryAnalysisKindEnumRef(s string) *NoteDiscoveryAnalysisKindEnum
NoteDiscoveryAnalysisKindEnumRef returns a *NoteDiscoveryAnalysisKindEnum with the value of string s If the empty string is provided, nil is returned.
func (NoteDiscoveryAnalysisKindEnum) Validate ¶
func (v NoteDiscoveryAnalysisKindEnum) Validate() error
type NoteImage ¶
type NoteImage struct { ResourceUrl *string `json:"resourceUrl"` Fingerprint *NoteImageFingerprint `json:"fingerprint"` // contains filtered or unexported fields }
This object is used to assert a desired state where this NoteImage is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*NoteImage) UnmarshalJSON ¶
type NoteImageFingerprint ¶
type NoteImageFingerprint struct { V1Name *string `json:"v1Name"` V2Blob []string `json:"v2Blob"` V2Name *string `json:"v2Name"` // contains filtered or unexported fields }
var EmptyNoteImageFingerprint *NoteImageFingerprint = &NoteImageFingerprint{empty: true}
This object is used to assert a desired state where this NoteImageFingerprint is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*NoteImageFingerprint) Empty ¶
func (r *NoteImageFingerprint) Empty() bool
func (*NoteImageFingerprint) HashCode ¶
func (r *NoteImageFingerprint) HashCode() string
func (*NoteImageFingerprint) String ¶
func (r *NoteImageFingerprint) String() string
func (*NoteImageFingerprint) UnmarshalJSON ¶
func (r *NoteImageFingerprint) UnmarshalJSON(data []byte) error
type NotePackage ¶
type NotePackage struct { Name *string `json:"name"` Distribution []NotePackageDistribution `json:"distribution"` // contains filtered or unexported fields }
var EmptyNotePackage *NotePackage = &NotePackage{empty: true}
This object is used to assert a desired state where this NotePackage is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*NotePackage) Empty ¶
func (r *NotePackage) Empty() bool
func (*NotePackage) HashCode ¶
func (r *NotePackage) HashCode() string
func (*NotePackage) String ¶
func (r *NotePackage) String() string
func (*NotePackage) UnmarshalJSON ¶
func (r *NotePackage) UnmarshalJSON(data []byte) error
type NotePackageDistribution ¶
type NotePackageDistribution struct { CpeUri *string `json:"cpeUri"` Architecture *NotePackageDistributionArchitectureEnum `json:"architecture"` LatestVersion *NotePackageDistributionLatestVersion `json:"latestVersion"` Maintainer *string `json:"maintainer"` Url *string `json:"url"` Description *string `json:"description"` // contains filtered or unexported fields }
var EmptyNotePackageDistribution *NotePackageDistribution = &NotePackageDistribution{empty: true}
This object is used to assert a desired state where this NotePackageDistribution is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*NotePackageDistribution) Empty ¶
func (r *NotePackageDistribution) Empty() bool
func (*NotePackageDistribution) HashCode ¶
func (r *NotePackageDistribution) HashCode() string
func (*NotePackageDistribution) String ¶
func (r *NotePackageDistribution) String() string
func (*NotePackageDistribution) UnmarshalJSON ¶
func (r *NotePackageDistribution) UnmarshalJSON(data []byte) error
type NotePackageDistributionArchitectureEnum ¶
type NotePackageDistributionArchitectureEnum string
The enum NotePackageDistributionArchitectureEnum.
func NotePackageDistributionArchitectureEnumRef ¶
func NotePackageDistributionArchitectureEnumRef(s string) *NotePackageDistributionArchitectureEnum
NotePackageDistributionArchitectureEnumRef returns a *NotePackageDistributionArchitectureEnum with the value of string s If the empty string is provided, nil is returned.
func (NotePackageDistributionArchitectureEnum) Validate ¶
func (v NotePackageDistributionArchitectureEnum) Validate() error
type NotePackageDistributionLatestVersion ¶
type NotePackageDistributionLatestVersion struct { Epoch *int64 `json:"epoch"` Name *string `json:"name"` Revision *string `json:"revision"` Kind *NotePackageDistributionLatestVersionKindEnum `json:"kind"` FullName *string `json:"fullName"` // contains filtered or unexported fields }
var EmptyNotePackageDistributionLatestVersion *NotePackageDistributionLatestVersion = &NotePackageDistributionLatestVersion{empty: true}
This object is used to assert a desired state where this NotePackageDistributionLatestVersion is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*NotePackageDistributionLatestVersion) Empty ¶
func (r *NotePackageDistributionLatestVersion) Empty() bool
func (*NotePackageDistributionLatestVersion) HashCode ¶
func (r *NotePackageDistributionLatestVersion) HashCode() string
func (*NotePackageDistributionLatestVersion) String ¶
func (r *NotePackageDistributionLatestVersion) String() string
func (*NotePackageDistributionLatestVersion) UnmarshalJSON ¶
func (r *NotePackageDistributionLatestVersion) UnmarshalJSON(data []byte) error
type NotePackageDistributionLatestVersionKindEnum ¶
type NotePackageDistributionLatestVersionKindEnum string
The enum NotePackageDistributionLatestVersionKindEnum.
func NotePackageDistributionLatestVersionKindEnumRef ¶
func NotePackageDistributionLatestVersionKindEnumRef(s string) *NotePackageDistributionLatestVersionKindEnum
NotePackageDistributionLatestVersionKindEnumRef returns a *NotePackageDistributionLatestVersionKindEnum with the value of string s If the empty string is provided, nil is returned.
func (NotePackageDistributionLatestVersionKindEnum) Validate ¶
func (v NotePackageDistributionLatestVersionKindEnum) Validate() error
type NoteRelatedUrl ¶
type NoteRelatedUrl struct { Url *string `json:"url"` Label *string `json:"label"` // contains filtered or unexported fields }
var EmptyNoteRelatedUrl *NoteRelatedUrl = &NoteRelatedUrl{empty: true}
This object is used to assert a desired state where this NoteRelatedUrl is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*NoteRelatedUrl) Empty ¶
func (r *NoteRelatedUrl) Empty() bool
func (*NoteRelatedUrl) HashCode ¶
func (r *NoteRelatedUrl) HashCode() string
func (*NoteRelatedUrl) String ¶
func (r *NoteRelatedUrl) String() string
func (*NoteRelatedUrl) UnmarshalJSON ¶
func (r *NoteRelatedUrl) UnmarshalJSON(data []byte) error