Documentation ¶
Index ¶
- Constants
- Variables
- func CheckDisjoint(src, trg *Item) bool
- func CheckEqual(src, trg *Item) bool
- func CheckSubset(src, trg *Item) bool
- func CheckSuperset(src, trg *Item) bool
- type Attribute
- type Item
- func (i *Item) Edition() StringAttr
- func (m *Item) Formatted() string
- func (i *Item) Language() StringAttr
- func (i *Item) Other() StringAttr
- func (i *Item) Part() PartAttr
- func (i *Item) Product() StringAttr
- func (i *Item) SetEdition(s StringAttr) error
- func (i *Item) SetLanguage(s StringAttr) error
- func (i *Item) SetOther(s StringAttr) error
- func (i *Item) SetPart(p PartAttr) error
- func (i *Item) SetProduct(s StringAttr) error
- func (i *Item) SetSwEdition(s StringAttr) error
- func (i *Item) SetTargetHw(s StringAttr) error
- func (i *Item) SetTargetSw(s StringAttr) error
- func (i *Item) SetUpdate(s StringAttr) error
- func (i *Item) SetVendor(s StringAttr) error
- func (i *Item) SetVersion(s StringAttr) error
- func (i *Item) SwEdition() StringAttr
- func (i *Item) TargetHw() StringAttr
- func (i *Item) TargetSw() StringAttr
- func (i *Item) Update() StringAttr
- func (m *Item) Uri() string
- func (i *Item) Vendor() StringAttr
- func (i *Item) Version() StringAttr
- func (m *Item) Wfn() string
- type PartAttr
- type Relation
- type StringAttr
Constants ¶
const ( Disjoint = Relation(iota) Equal Subset Superset Undefined )
Variables ¶
var ( Application = PartAttr('a') OperationgSystem = PartAttr('o') Hardware = PartAttr('h') PartNotSet = PartAttr(0x00) Any = StringAttr{} Na = StringAttr{/* contains filtered or unexported fields */} )
Functions ¶
func CheckDisjoint ¶
CheckDisjoint implements CPE_DISJOINT. Returns true if the set-theoretic reration between the names is DISJOINT.
func CheckEqual ¶
CheckEqual implements CPE_EQUAL. Returns true if the set-theoretic relation between src and trg is EQUAL.
func CheckSubset ¶
CheckSubset implements CPE_SUBSET. Returns true if the set-theoretic relation between src and trg is SUBSET.
func CheckSuperset ¶
CheckSuperset implements CPE_SUPERSET. Returns true if the set-theoretic relation between src and trg is SUPERSET.
Types ¶
type Attribute ¶
type Attribute interface { String() string IsEmpty() bool IsValid() bool Comparison(Attribute) Relation // contains filtered or unexported methods }
Attribute groups PartAttr and StringAttr.
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
Item reprecents a CPE item.
func NewItemFromUri ¶
func NewItemFromWfn ¶
func (*Item) SetEdition ¶
func (i *Item) SetEdition(s StringAttr) error
SetEdition sets edition of item. returns error if s is invalid.
func (*Item) SetLanguage ¶
func (i *Item) SetLanguage(s StringAttr) error
SetLanguage sets language of item. returns error if s is invalid.
func (*Item) SetOther ¶
func (i *Item) SetOther(s StringAttr) error
SetOther sets other of item. returns error if s is invalid.
func (*Item) SetProduct ¶
func (i *Item) SetProduct(s StringAttr) error
SetProduct sets vendor of item. returns error if s is invalid.
func (*Item) SetSwEdition ¶
func (i *Item) SetSwEdition(s StringAttr) error
SetSwEdition sets sw_edition of item. returns error if s is invalid.
func (*Item) SetTargetHw ¶
func (i *Item) SetTargetHw(s StringAttr) error
SetTargetHw sets target_hw of item. returns error if s is invalid.
func (*Item) SetTargetSw ¶
func (i *Item) SetTargetSw(s StringAttr) error
SetTargetSw sets target_sw of item. returns error if s is invalid.
func (*Item) SetUpdate ¶
func (i *Item) SetUpdate(s StringAttr) error
SetUpdate sets update of item. returns error if s is invalid.
func (*Item) SetVendor ¶
func (i *Item) SetVendor(s StringAttr) error
SetVendor sets vendor of item. returns error if s is invalid.
func (*Item) SetVersion ¶
func (i *Item) SetVersion(s StringAttr) error
SetVersion sets version of item. returns error if s is invalid.
func (*Item) SwEdition ¶
func (i *Item) SwEdition() StringAttr
SwEdition returns sw_edition of item.
type PartAttr ¶
type PartAttr rune
PartAttr reprecents part attribute of cpe item.
func (PartAttr) Comparison ¶
type StringAttr ¶
type StringAttr struct {
// contains filtered or unexported fields
}
StringAttr reprecents other than part attribute of cpe item.
func NewStringAttr ¶
func NewStringAttr(str string) StringAttr
NewStringAttr returns attribute of item with str.
func (StringAttr) Comparison ¶
func (src StringAttr) Comparison(trg Attribute) Relation
func (StringAttr) IsValid ¶
func (s StringAttr) IsValid() bool
func (StringAttr) String ¶
func (s StringAttr) String() string