open_asset_model

package module
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 1 Imported by: 64

Documentation

Index

Constants

This section is empty.

Variables

Functions

func GetAssetOutgoingRelations added in v0.7.0

func GetAssetOutgoingRelations(subject AssetType) []string

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 Asset

type Asset interface {
	Key() string
	AssetType() AssetType
	JSON() ([]byte, error)
}

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"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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