Documentation ¶
Index ¶
Constants ¶
const ( // AnnotationEmporousAttributes references the collection attributes in a // JSON format. AnnotationEmporousAttributes = "emporous.attributes" AnnotationLink = "emporous.link" )
const ( // MediaTypeSchemaDescriptor is a descriptor for a collection schema. MediaTypeSchemaDescriptor = "application/vnd.emporous.schema.descriptor.v1+json" // MediaTypeConfiguration for a collection manifest configuration resources. MediaTypeConfiguration = "application/vnd.emporous.config.v1+json" // MediaTypeDescriptor specifies the media type for a content descriptor. MediaTypeDescriptor = "application/vnd.emporous.collection.descriptor.v1+json" // MediaTypeCollectionManifest specifies the media type for an Emporous Collection manifest. MediaTypeCollectionManifest = "application/vnd.emporous.collection.manifest.v1+json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct { ID string `json:"id"` Name string `json:"name"` Version string `json:"version"` Type string `json:"type"` FoundBy string `json:"foundBy"` Locations []string `json:"locations"` Licenses []string `json:"licenses"` Language string `json:"language"` // Common Platform Enumeration CPEs []string `json:"cpes"` // Package URL PURL string `json:"purl"` AdditionalMetadata map[string]json.RawMessage `json:"additional,omitempty"` }
Component schema defines information to create a component list. Based on Anchore Syft Package spec.
type Descriptor ¶
type Descriptor struct { // MediaType is the media type of the object this schema refers to. MediaType string `json:"mediaType,omitempty"` // ArtifactType is the artifact type of the object this schema refers to. // // When the descriptor is used for blobs, this property must be empty. ArtifactType string `json:"artifactType,omitempty"` // Digest is the digest of the targeted content. Digest digest.Digest `json:"digest"` // Size specifies the size in bytes of the blob. Size int64 `json:"size"` // URLs specifies a list of URLs from which this object MAY be downloaded URLs []string `json:"urls,omitempty"` // Attributes contains typed attributes for this artifact. Attributes map[string]json.RawMessage `json:"attributes,omitempty"` // Annotations contains arbitrary metadata relating to the targeted content. Annotations map[string]string `json:"annotations,omitempty"` }
Descriptor describes the disposition of targeted content.
type DescriptorAttributes ¶
type DescriptorAttributes struct {
Component `json:",inline"`
}
DescriptorAttributes schema defines the required attributes for a collection descriptor.
type File ¶
type File struct { // Permission configures the file permissions Permissions uint32 `json:"permissions"` // User ID UID int `json:"uid"` // Group ID GID int `json:"gid"` }
File is a schema that sets file level information
func (*File) UnmarshalJSON ¶
UnmarshalJSON sets custom unmarshalling logic to File. In this case it sets the default UID and GID to invalid ID numbers to differentiate between values intentionally set at 0.
type LinkAttributes ¶
type LinkAttributes struct { // RegistryHint will allow registries to be // added to a user search domain in a discovered zone RegistryHint string `json:"registryHint"` // NamespaceHint will scope a search to a specific namespace. NamespaceHint string `json:"namespaceHint"` Transitive bool `json:"transitive"` }
LinkAttributes schema defines the required attributes for index manifest link references.
type Manifest ¶
type Manifest struct { // MediaType is the media type of the object this schema refers to. MediaType string `json:"mediaType"` // ArtifactType is the IANA media type of the artifact this schema refers to. ArtifactType string `json:"artifactType"` // Blobs is a collection of blobs referenced by this manifest. Blobs []Descriptor `json:"blobs,omitempty"` // Attributes contains typed attributes for this artifact. Attributes map[string]json.RawMessage `json:"attributes,omitempty"` // Links defines references to any manifest(s) for Collections that this Collection // is dependent on or relates to. // If the descriptor only contains attributes, the client should attempt to resolve // attributes to descriptor using the attributes API. Links []Descriptor `json:"links,omitempty"` // Annotations contains arbitrary metadata for the artifact manifest. Annotations map[string]string `json:"annotations,omitempty"` }
Manifest provides a schema for Emporous Collection.
type Platform ¶
type Platform struct { // Architecture field specifies the CPU architecture, for example // `amd64` or `ppc64`. Architecture string `json:"architecture"` // OS specifies the operating system, for example `linux` or `windows`. OS string `json:"os"` // OSVersion is an optional field specifying the operating system // version, for example on Windows `10.0.14393.1066`. OSVersion string `json:"os.version,omitempty"` // OSFeatures is an optional field specifying an array of strings, // each listing a required OS feature (for example on Windows `win32k`). OSFeatures []string `json:"os.features,omitempty"` // Variant is an optional field specifying a variant of the CPU, for // example `v7` to specify ARMv7 when architecture is `arm`. Variant string `json:"variant,omitempty"` }
Platform describes the platform which the artifact can be used on.
type SchemaAttributes ¶
type SchemaAttributes struct { ID string `json:"id"` Description string `json:"description,omitempty"` }
SchemaAttributes are the required attributes for a schema descriptor.