cwe

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CondenseSpace

func CondenseSpace(s string) string

Types

type Weakness

type Weakness struct {
	ID                  uint   `xml:"ID,attr"`
	Name                string `xml:"Name,attr"`
	Abstraction         string `xml:"Abstraction,attr"`
	Structure           string `xml:"Structure,attr"`
	Status              string `xml:"Status,attr"`
	Description         string `xml:"Description"`
	ExtendedDescription string `xml:"Extended_Description"`
}

func (*Weakness) CondenseSpace

func (w *Weakness) CondenseSpace()

func (*Weakness) Inflate

func (w *Weakness) Inflate()

type WeaknessSet

type WeaknessSet struct {
	Data map[uint]Weakness `json:"data"`
}

func GetWeaknessSet

func GetWeaknessSet() *WeaknessSet

func NewWeaknessSet

func NewWeaknessSet() *WeaknessSet

func ReadWeaknessSet

func ReadWeaknessSet(filename string) (*WeaknessSet, error)

func (*WeaknessSet) Add

func (set *WeaknessSet) Add(w ...Weakness)

func (*WeaknessSet) GetByID

func (set *WeaknessSet) GetByID(id uint) *Weakness

func (*WeaknessSet) GetByName

func (set *WeaknessSet) GetByName(name string) []Weakness

func (*WeaknessSet) Len

func (set *WeaknessSet) Len() int

type WeaknessesXML

type WeaknessesXML struct {
	Weakness []Weakness `xml:"Weakness"`
}

func (WeaknessesXML) Set

func (w WeaknessesXML) Set() *WeaknessSet

type XML

type XML struct {
	XMLName           xml.Name      `xml:"Weakness_Catalog"`
	Date              string        `xml:"Date,attr" json:"date"`
	Name              string        `xml:"Name,attr" json:"name"`
	Version           string        `xml:"Version,attr" json:"version"`
	XMLNameSpace      string        `xml:"xmlns,attr"`
	XMLSchemaInstance string        `xml:"xmlns xsi,attr"`
	XMLSchemaLocation string        `xml:"xsi schemaLocation,attr"`
	XHTML             string        `xml:"xmlns xhtml,attr"`
	Weaknesses        WeaknessesXML `xml:"Weaknesses"`
}

func ReadFileXML

func ReadFileXML(name string) (XML, error)

Jump to

Keyboard shortcuts

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