Documentation
¶
Index ¶
- Constants
- Variables
- type Options
- type VersionGroup
- type VersionGroups
- func (v VersionGroups) EncodingMap() map[string][]string
- func (v VersionGroups) Encodings(format string) []string
- func (v VersionGroups) Formats() []string
- func (v VersionGroups) URI(t string) string
- func (v VersionGroups) VersionMap() map[string][]string
- func (v VersionGroups) Versions(format string) []string
Constants ¶
View Source
const ( // SPDX Support SPDX_URI = "text/spdx" SPDX_VERSION_22 = "2.2" SPDX_VERSION_23 = "2.3" // CycloneDX Support CDX_URI = "application/vnd.cyclonedx" CDX_VERSION_13 = "1.3" CDX_VERSION_14 = "1.4" CDX_VERSION_15 = "1.5" JSON_ENCODING = "json" XML_ENCODING = "xml" TEXT_ENCODING = "text" )
Variables ¶
View Source
var ( AllEncoding = []string{JSON_ENCODING, XML_ENCODING, TEXT_ENCODING} Versions = VersionGroups{ formats.CDXFORMAT: { Versions: []string{CDX_VERSION_13, CDX_VERSION_14, CDX_VERSION_15}, Encodings: []string{JSON_ENCODING, XML_ENCODING}, URI: CDX_URI, }, formats.SPDXFORMAT: { Versions: []string{CDX_VERSION_13, CDX_VERSION_14, CDX_VERSION_15}, Encodings: []string{JSON_ENCODING, TEXT_ENCODING}, URI: SPDX_URI, }, } Default = Options{ Type: options.Default.Format.Type(), Version: options.Default.Format.Version(), Encoding: options.Default.Format.Encoding(), URI: options.Default.Format.URI(), Indent: options.Default.Indent, } )
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Type string `yaml:"format,omitempty" json:"format,omitempty"`
Version string `yaml:"version,omitempty" json:"version,omitempty"`
Encoding string `yaml:"encoding,omitempty" json:"encoding,omitempty"`
URI string `yaml:"uri,omitempty" json:"uri,omitempty"`
Indent int `yaml:"indent,omitempty" json:"indent,omitempty"`
}
type VersionGroup ¶
Helper Object
type VersionGroups ¶
type VersionGroups map[string]VersionGroup
func (VersionGroups) EncodingMap ¶
func (v VersionGroups) EncodingMap() map[string][]string
func (VersionGroups) Encodings ¶
func (v VersionGroups) Encodings(format string) []string
func (VersionGroups) Formats ¶
func (v VersionGroups) Formats() []string
func (VersionGroups) URI ¶
func (v VersionGroups) URI(t string) string
func (VersionGroups) VersionMap ¶
func (v VersionGroups) VersionMap() map[string][]string
func (VersionGroups) Versions ¶
func (v VersionGroups) Versions(format string) []string
Click to show internal directories.
Click to hide internal directories.