Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AssetList = []AssetType{ Account, AutnumRecord, AutonomousSystem, ContactRecord, DomainRecord, File, FQDN, FundsTransfer, Identifier, IPAddress, IPNetRecord, Location, Netblock, Organization, Person, Phone, Product, ProductRelease, Service, TLSCertificate, URL, }
View Source
var PropertyList = []PropertyType{ DNSRecordProperty, SimpleProperty, SourceProperty, VulnProperty, }
View Source
var RelationList = []RelationType{ BasicDNSRelation, PortRelation, PrefDNSRelation, SimpleRelation, SRVDNSRelation, }
Functions ¶
func GetAssetOutgoingRelations ¶ added in v0.7.0
GetAssetOutgoingRelations returns the relation types allowed to be used when the subject is the asset type provided in the parameter. Providing an invalid subject causes a return value of nil.
func ValidRelationship ¶
func ValidRelationship(src AssetType, label string, rtype RelationType, destination AssetType) bool
ValidRelationship returns true if the relation is valid in the taxonomy when outgoing from the source asset type to the destination asset type.
Types ¶
type AssetType ¶
type AssetType string
const ( Account AssetType = "Account" AutnumRecord AssetType = "AutnumRecord" AutonomousSystem AssetType = "AutonomousSystem" ContactRecord AssetType = "ContactRecord" DomainRecord AssetType = "DomainRecord" File AssetType = "File" FQDN AssetType = "FQDN" FundsTransfer AssetType = "FundsTransfer" Identifier AssetType = "Identifier" IPAddress AssetType = "IPAddress" IPNetRecord AssetType = "IPNetRecord" Location AssetType = "Location" Netblock AssetType = "Netblock" Organization AssetType = "Organization" Person AssetType = "Person" Phone AssetType = "Phone" Product AssetType = "Product" ProductRelease AssetType = "ProductRelease" Service AssetType = "Service" TLSCertificate AssetType = "TLSCertificate" URL AssetType = "URL" )
func GetTransformAssetTypes ¶ added in v0.7.0
func GetTransformAssetTypes(subject AssetType, label string, rtype RelationType) []AssetType
GetTransformAssetTypes returns the asset types allowed to be assigned when the subject is the asset type provided in the parameter, along with the provided label and RelationType. Providing an invalid subject causes a return value of nil.
type Property ¶ added in v0.12.0
type Property interface { Name() string Value() string PropertyType() PropertyType JSON() ([]byte, error) }
type PropertyType ¶ added in v0.12.0
type PropertyType string
const ( DNSRecordProperty PropertyType = "DNSRecordProperty" SimpleProperty PropertyType = "SimpleProperty" SourceProperty PropertyType = "SourceProperty" VulnProperty PropertyType = "VulnProperty" )
type Relation ¶ added in v0.12.0
type Relation interface { Label() string RelationType() RelationType JSON() ([]byte, error) }
type RelationType ¶ added in v0.12.0
type RelationType string
const ( BasicDNSRelation RelationType = "BasicDNSRelation" PortRelation RelationType = "PortRelation" PrefDNSRelation RelationType = "PrefDNSRelation" SimpleRelation RelationType = "SimpleRelation" SRVDNSRelation RelationType = "SRVDNSRelation" )
Click to show internal directories.
Click to hide internal directories.