Documentation ¶
Overview ¶
Package properties contains all of the common properties used on STIX objects.
Index ¶
- type AliasesProperty
- type AuthorsProperty
- type BelongsToRefsProperty
- type ConfidenceProperty
- type CreatedByRefProperty
- type CreatedProperty
- func (o *CreatedProperty) Compare(obj2 *CreatedProperty) (bool, int, []string)
- func (o *CreatedProperty) GetCreated() string
- func (o *CreatedProperty) SetCreated(t interface{}) error
- func (o *CreatedProperty) SetCreatedToCurrentTime() error
- func (o *CreatedProperty) VerifyExists() (bool, int, []string)
- type CustomProperties
- type DatastoreIDProperty
- type DescriptionProperty
- type ExternalReference
- func (o *ExternalReference) AddHash(k, v string) error
- func (o *ExternalReference) GetDescription() string
- func (o *ExternalReference) GetExternalID() string
- func (o *ExternalReference) GetSourceName() string
- func (o *ExternalReference) GetURL() string
- func (o *ExternalReference) SetDescription(s string) error
- func (o *ExternalReference) SetExternalID(s string) error
- func (o *ExternalReference) SetSourceName(s string) error
- func (o *ExternalReference) SetURL(s string) error
- type ExternalReferencesProperty
- type GoalsProperty
- type GranularMarking
- type IDProperty
- func (o *IDProperty) Compare(obj2 *IDProperty) (bool, int, []string)
- func (o *IDProperty) CreateSTIXUUID(s string) (string, error)
- func (o *IDProperty) CreateTAXIIUUID() (string, error)
- func (o *IDProperty) GetID() string
- func (o *IDProperty) SetID(s string) error
- func (o *IDProperty) SetNewSTIXID(s string) error
- func (o *IDProperty) SetNewTAXIIID() error
- func (o *IDProperty) VerifyExists() (bool, int, []string)
- type KillChainPhase
- type KillChainPhasesProperty
- type LabelsProperty
- type LangProperty
- type MarkingProperties
- type ModifiedProperty
- func (o *ModifiedProperty) Compare(obj2 *ModifiedProperty) (bool, int, []string)
- func (o *ModifiedProperty) GetModified() string
- func (o *ModifiedProperty) SetModified(t interface{}) error
- func (o *ModifiedProperty) SetModifiedToCurrentTime() error
- func (o *ModifiedProperty) VerifyExists() (bool, int, []string)
- type MotivationProperties
- type NameProperty
- type ObjectRefsProperty
- type RawProperty
- type ResolvesToRefsProperty
- type ResourceLevelProperty
- type RevokedProperty
- type RolesProperty
- type SeenProperties
- type SpecVersionProperty
- func (o *SpecVersionProperty) Compare(obj2 *SpecVersionProperty) (bool, int, []string)
- func (o *SpecVersionProperty) GetSpecVersion() string
- func (o *SpecVersionProperty) SetSpecVersion(s string) error
- func (o *SpecVersionProperty) SetSpecVersion20() error
- func (o *SpecVersionProperty) SetSpecVersion21() error
- func (o *SpecVersionProperty) VerifyExists() (bool, int, []string)
- type TitleProperty
- type TypeProperty
- type ValueProperty
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliasesProperty ¶
type AliasesProperty struct {
Aliases []string `json:"aliases,omitempty" bson:"aliases,omitempty"`
}
AliasesProperty - A property used by one or more STIX objects.
func (*AliasesProperty) AddAliases ¶ added in v0.6.1
func (o *AliasesProperty) AddAliases(values interface{}) error
AddAliases - This method takes in a string value, a comma separated list of string values, or a slice of string values that represents an alias and adds it to the aliases property.
func (*AliasesProperty) Compare ¶ added in v0.6.1
func (o *AliasesProperty) Compare(obj2 *AliasesProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
type AuthorsProperty ¶ added in v0.6.1
type AuthorsProperty struct {
Authors []string `json:"authors,omitempty" bson:"authors,omitempty"`
}
AuthorsProperty - A property used by one or more STIX objects.
func (*AuthorsProperty) AddAuthors ¶ added in v0.6.1
func (o *AuthorsProperty) AddAuthors(values interface{}) error
AddAuthors - This method takes in a string value, a comma separated list of string values, or a slice of string values that represents a alias and adds it to the authors property.
func (*AuthorsProperty) Compare ¶ added in v0.6.1
func (o *AuthorsProperty) Compare(obj2 *AuthorsProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*AuthorsProperty) VerifyExists ¶ added in v0.6.1
func (o *AuthorsProperty) VerifyExists() (bool, int, []string)
VerifyExists - This method will verify that the authors property on an object is present. It will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
type BelongsToRefsProperty ¶ added in v0.6.1
type BelongsToRefsProperty struct {
BelongsToRefs []string `json:"belongs_to_refs,omitempty" bson:"belongs_to_refs,omitempty"`
}
BelongsToRefsProperty -
func (*BelongsToRefsProperty) AddBelongsToRefs ¶ added in v0.6.1
func (o *BelongsToRefsProperty) AddBelongsToRefs(values interface{}) error
AddBelongsToRefs - This method takes in a string value, a comma separated list of string values, or a slice of string values that represents an id that this object belongs to and adds it to the belongs to refs property.
type ConfidenceProperty ¶ added in v0.6.1
type ConfidenceProperty struct {
Confidence int `json:"confidence,omitempty" bson:"confidence,omitempty"`
}
ConfidenceProperty - A property used by one or more STIX objects that captures the STIX confidence score, which is a value from 0-100.
func (*ConfidenceProperty) Compare ¶ added in v0.6.1
func (o *ConfidenceProperty) Compare(obj2 *ConfidenceProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*ConfidenceProperty) GetConfidence ¶ added in v0.6.1
func (o *ConfidenceProperty) GetConfidence() int
GetConfidence - This method returns the confidence value as an integer.
func (*ConfidenceProperty) SetConfidence ¶ added in v0.6.1
func (o *ConfidenceProperty) SetConfidence(i int) error
SetConfidence - This method takes in an integer representing a STIX confidence level 0-100 and updates the Confidence property.
type CreatedByRefProperty ¶ added in v0.6.1
type CreatedByRefProperty struct {
CreatedByRef string `json:"created_by_ref,omitempty" bson:"created_by_ref,omitempty"`
}
CreatedByRefProperty - A property used by all STIX objects that captures the STIX identifier of the identity that created this object.
func (*CreatedByRefProperty) Compare ¶ added in v0.6.1
func (o *CreatedByRefProperty) Compare(obj2 *CreatedByRefProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*CreatedByRefProperty) GetCreatedByRef ¶ added in v0.6.1
func (o *CreatedByRefProperty) GetCreatedByRef() string
GetCreatedByRef - This method returns the STIX identifier for the identity that created this object.
func (*CreatedByRefProperty) SetCreatedByRef ¶ added in v0.6.1
func (o *CreatedByRefProperty) SetCreatedByRef(s string) error
SetCreatedByRef - This method takes in a string value representing a STIX identifier and updates the Created By Ref property.
type CreatedProperty ¶ added in v0.6.1
type CreatedProperty struct {
Created string `json:"created,omitempty" bson:"created,omitempty"`
}
CreatedProperty - A property used by all STIX objects that captures the date and time that the object was created.
func (*CreatedProperty) Compare ¶ added in v0.6.1
func (o *CreatedProperty) Compare(obj2 *CreatedProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*CreatedProperty) GetCreated ¶ added in v0.6.1
func (o *CreatedProperty) GetCreated() string
GetCreated - This method will return the created timestamp as a string.
func (*CreatedProperty) SetCreated ¶ added in v0.6.1
func (o *CreatedProperty) SetCreated(t interface{}) error
SetCreated - This method takes in a timestamp in either time.Time or string format and updates the created property with it. The value is stored as a string, so if the value is in time.Time format, it will be converted to the correct STIX timestamp format.
func (*CreatedProperty) SetCreatedToCurrentTime ¶ added in v0.6.1
func (o *CreatedProperty) SetCreatedToCurrentTime() error
SetCreatedToCurrentTime - This methods sets the object created time to the current time
func (*CreatedProperty) VerifyExists ¶ added in v0.6.1
func (o *CreatedProperty) VerifyExists() (bool, int, []string)
VerifyExists - This method will verify that the created property on an object is present if required. It will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
type CustomProperties ¶ added in v0.6.1
type CustomProperties struct {
Custom map[string][]byte `json:"custom,omitempty" bson:"custom,omitempty"`
}
CustomProperties - A property used by all STIX objects that captures any custom properties. These are all stored in a map.
type DatastoreIDProperty ¶ added in v0.6.1
type DatastoreIDProperty struct {
DatastoreID int `json:"-" bson:"-"`
}
DatastoreIDProperty - A property used by all STIX objects that captures the unique database ID for this object. This is not included in the JSON serialization, but is used with some datastores.
func (*DatastoreIDProperty) GetDatastoreID ¶ added in v0.6.1
func (o *DatastoreIDProperty) GetDatastoreID() int
GetDatastoreID - This method returns the database ID value.
func (*DatastoreIDProperty) SetDatastoreID ¶ added in v0.6.1
func (o *DatastoreIDProperty) SetDatastoreID(i int) error
SetDatastoreID - This method takes in a int representing the database ID and updates the DatastoreID property.
type DescriptionProperty ¶
type DescriptionProperty struct {
Description string `json:"description,omitempty" bson:"description,omitempty"`
}
DescriptionProperty - A property used by one or more STIX objects that captures the description for the object as a string.
func (*DescriptionProperty) Compare ¶ added in v0.6.1
func (o *DescriptionProperty) Compare(obj2 *DescriptionProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*DescriptionProperty) GetDescription ¶
func (o *DescriptionProperty) GetDescription() string
GetDescription - This method returns the description for an object as a string.
func (*DescriptionProperty) SetDescription ¶
func (o *DescriptionProperty) SetDescription(s string) error
SetDescription - This method takes in a string value representing a text description and updates the description property.
type ExternalReference ¶ added in v0.6.1
type ExternalReference struct { SourceName string `json:"source_name,omitempty" bson:"source_name,omitempty"` Description string `json:"description,omitempty" bson:"description,omitempty"` URL string `json:"url,omitempty" bson:"url,omitempty"` Hashes map[string]string `json:"hashes,omitempty" bson:"hashes,omitempty"` ExternalID string `json:"external_id,omitempty" bson:"external_id,omitempty"` }
ExternalReference - This type defines all of the properties associated with the STIX External Reference type. All of the methods not defined local to this type are inherited from the individual properties.
func (*ExternalReference) AddHash ¶ added in v0.6.1
func (o *ExternalReference) AddHash(k, v string) error
AddHash - This method takes in two parameters and adds the hash to the map. The first is a string value representing a hash type from the STIX hashes vocabulary. The second is a string value representing the actual hash of the content from the remote external reference.
func (*ExternalReference) GetDescription ¶ added in v0.6.1
func (o *ExternalReference) GetDescription() string
GetDescription - This method returns the description for an object as a string.
func (*ExternalReference) GetExternalID ¶ added in v0.6.1
func (o *ExternalReference) GetExternalID() string
GetExternalID - This method returns the external id for this reference.
func (*ExternalReference) GetSourceName ¶ added in v0.6.1
func (o *ExternalReference) GetSourceName() string
GetSourceName - This method will return the source name.
func (*ExternalReference) GetURL ¶ added in v0.6.1
func (o *ExternalReference) GetURL() string
GetURL - This method returns the URL for this external reference.
func (*ExternalReference) SetDescription ¶ added in v0.6.1
func (o *ExternalReference) SetDescription(s string) error
SetDescription - This method takes in a string value representing a text description and updates the description property.
func (*ExternalReference) SetExternalID ¶ added in v0.6.1
func (o *ExternalReference) SetExternalID(s string) error
SetExternalID - This method takes in a string value representing an general purpose id in a remote system for the source of this external reference and updates the external id property.
func (*ExternalReference) SetSourceName ¶ added in v0.6.1
func (o *ExternalReference) SetSourceName(s string) error
SetSourceName - This method takes in a string value representing the name of a source for an external reference and updates the source name property.
func (*ExternalReference) SetURL ¶ added in v0.6.1
func (o *ExternalReference) SetURL(s string) error
SetURL - This method takes in a string value representing a URL location of a source for an external reference and updates the URL property.
type ExternalReferencesProperty ¶ added in v0.6.1
type ExternalReferencesProperty struct {
ExternalReferences []ExternalReference `json:"external_references,omitempty" bson:"external_references,omitempty"`
}
ExternalReferencesProperty - A property used by one or more STIX objects that captures a list of external references as defined by STIX.
func (*ExternalReferencesProperty) Compare ¶ added in v0.6.1
func (o *ExternalReferencesProperty) Compare(obj2 *ExternalReferencesProperty) (bool, int, []string)
Compare - This function will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*ExternalReferencesProperty) NewExternalReference ¶ added in v0.6.1
func (o *ExternalReferencesProperty) NewExternalReference() (*ExternalReference, error)
NewExternalReference - This method creates a new external reference and returns a reference to a slice location. This will enable the code to update an object located at that slice location.
type GoalsProperty ¶
type GoalsProperty struct {
Goals []string `json:"goals,omitempty" bson:"goals,omitempty"`
}
GoalsProperty - A property used by one or more STIX objects that captures a list of goals that are part of the STIX object.
func (*GoalsProperty) AddGoals ¶ added in v0.6.1
func (o *GoalsProperty) AddGoals(values interface{}) error
AddGoals - This method takes in a string value, a comma separated list of string values, or a slice of string values that represents a goal and adds it to the goals property.
type GranularMarking ¶ added in v0.6.1
type GranularMarking struct { LangProperty MarkingRef string `json:"marking_ref,omitempty" bson:"marking_ref,omitempty"` Selectors []string `json:"selectors,omitempty" bson:"selectors,omitempty"` }
GranularMarking - This type defines all of the properties associated with the STIX Granular Marking type. All of the methods not defined local to this type are inherited from the individual properties.
func (*GranularMarking) AddSelector ¶ added in v0.6.1
func (o *GranularMarking) AddSelector(s string) error
AddSelector - This method takes in a string value representing a STIX granular marking selector and adds it to the list of selectors.
func (*GranularMarking) GetMarkingRef ¶ added in v0.6.1
func (o *GranularMarking) GetMarkingRef() string
GetMarkingRef - This method returns the STIX identifier of the marking definition object that was recorded in this granular marking type.
func (*GranularMarking) SetMarkingRef ¶ added in v0.6.1
func (o *GranularMarking) SetMarkingRef(s string) error
SetMarkingRef - This method takes in a string value representing a STIX identifier of a marking definition object and sets the marking ref property to that value.
type IDProperty ¶ added in v0.6.1
type IDProperty struct {
ID string `json:"id,omitempty" bson:"id,omitempty"`
}
IDProperty - A property used by one or more STIX objects that captures the STIX That identifier in string format.
func (*IDProperty) Compare ¶ added in v0.6.1
func (o *IDProperty) Compare(obj2 *IDProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*IDProperty) CreateSTIXUUID ¶ added in v0.6.1
func (o *IDProperty) CreateSTIXUUID(s string) (string, error)
CreateSTIXUUID - This method takes in a string value representing a STIX object type and creates and returns a new ID based on the approved STIX UUIDv4 format.
func (*IDProperty) CreateTAXIIUUID ¶ added in v0.6.1
func (o *IDProperty) CreateTAXIIUUID() (string, error)
CreateTAXIIUUID - This method does not take in any parameters. It is used to create a new ID based on the approved TAXII UUIDv4 format.
func (*IDProperty) GetID ¶ added in v0.6.1
func (o *IDProperty) GetID() string
GetID - This method will return the id for a given STIX object.
func (*IDProperty) SetID ¶ added in v0.6.1
func (o *IDProperty) SetID(s string) error
SetID - This method takes in a string value representing an existing STIX id and updates the id property for the object.
func (*IDProperty) SetNewSTIXID ¶ added in v0.6.1
func (o *IDProperty) SetNewSTIXID(s string) error
SetNewSTIXID - This method takes in a string value representing a STIX object type and creates a new ID based on the approved STIX UUIDv4 format and update the id property for the object.
func (*IDProperty) SetNewTAXIIID ¶ added in v0.6.1
func (o *IDProperty) SetNewTAXIIID() error
SetNewTAXIIID - This method does not take in any parameters. It is used to create a new ID based on the approved TAXII UUIDv4 format and assigns it to the ID property.
func (*IDProperty) VerifyExists ¶ added in v0.6.1
func (o *IDProperty) VerifyExists() (bool, int, []string)
VerifyExists - This method will verify that the id property on an object is present if required. It will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
type KillChainPhase ¶
type KillChainPhase struct { KillChainName string `json:"kill_chain_name,omitempty" bson:"kill_chain_name,omitempty"` PhaseName string `json:"phase_name,omitempty" bson:"phase_name,omitempty"` }
KillChainPhase - This type defines all of the properties associated with the STIX Kill Chain Phase type.
func (*KillChainPhase) SetName ¶
func (o *KillChainPhase) SetName(s string) error
SetName - This method takes in a string value representing the name of a kill chain and updates the kill chain name property.
func (*KillChainPhase) SetPhase ¶
func (o *KillChainPhase) SetPhase(s string) error
SetPhase - This method takes in a string value representing the phase of a kill chain and updates the phase name property.
type KillChainPhasesProperty ¶
type KillChainPhasesProperty struct {
KillChainPhases []KillChainPhase `json:"kill_chain_phases,omitempty" bson:"kill_chain_phases,omitempty"`
}
KillChainPhasesProperty - A property used by one or more STIX objects that captures a list of kll chain phases as defined by STIX.
func (*KillChainPhasesProperty) Compare ¶ added in v0.6.1
func (o *KillChainPhasesProperty) Compare(obj2 *KillChainPhasesProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*KillChainPhasesProperty) CreateKillChainPhase ¶
func (o *KillChainPhasesProperty) CreateKillChainPhase(name, phase string) error
CreateKillChainPhase - This method takes in two parameters and creates and adds a new kill chain phase to the list. The first value is a string value representing the name of the kill chain being used. The second value is a string value representing the phase name from that kill chain.
type LabelsProperty ¶ added in v0.6.1
type LabelsProperty struct {
Labels []string `json:"labels,omitempty" bson:"labels,omitempty"`
}
LabelsProperty - This method takes in a string value, a comma separated list of string values, or a slice of string values that represents a label and adds it to the labels property.
func (*LabelsProperty) AddLabels ¶ added in v0.6.1
func (o *LabelsProperty) AddLabels(values interface{}) error
AddLabels - This method takes in a string value, a comma separated list of string values, or a slice of string values that all representing a label and adds it to the labels property.
func (*LabelsProperty) Compare ¶ added in v0.6.1
func (o *LabelsProperty) Compare(obj2 *LabelsProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
type LangProperty ¶ added in v0.6.1
type LangProperty struct {
Lang string `json:"lang,omitempty" bson:"lang,omitempty"`
}
LangProperty - A property used by one or more STIX objects that captures the lang string as defined in RFC 5646. This is used to record the language that a given object is using.
func (*LangProperty) Compare ¶ added in v0.6.1
func (o *LangProperty) Compare(obj2 *LangProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*LangProperty) GetLang ¶ added in v0.6.1
func (o *LangProperty) GetLang() string
GetLang - This method returns the current language code for a given object.
type MarkingProperties ¶ added in v0.6.1
type MarkingProperties struct { ObjectMarkingRefs []string `json:"object_marking_refs,omitempty" bson:"object_marking_refs,omitempty"` GranularMarkings []GranularMarking `json:"granular_markings,omitempty" bson:"granular_markings,omitempty"` }
MarkingProperties - Properties used by one or more STIX objects that captures the data markings for an object. These can be in the form of object markings or granular markings. The object markings is a list of STIX identifier that represent marking definition objects. The granular markings is a list of granular markings.
func (*MarkingProperties) AddObjectMarkingRef ¶ added in v0.6.1
func (o *MarkingProperties) AddObjectMarkingRef(s string) error
AddObjectMarkingRef - This method takes in a string value that represents a STIX identifier for a marking definition object and adds it to the list of object marking refs.
func (*MarkingProperties) Compare ¶ added in v0.6.1
func (o *MarkingProperties) Compare(obj2 *MarkingProperties) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
type ModifiedProperty ¶ added in v0.6.1
type ModifiedProperty struct {
Modified string `json:"modified,omitempty" bson:"modified,omitempty"`
}
ModifiedProperty - A property used by all STIX objects that captures the date and time that the object was modified or changed. This property effectively tracks the version of the object.
func (*ModifiedProperty) Compare ¶ added in v0.6.1
func (o *ModifiedProperty) Compare(obj2 *ModifiedProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*ModifiedProperty) GetModified ¶ added in v0.6.1
func (o *ModifiedProperty) GetModified() string
GetModified - This method will return the modified timestamp as a string. If the value is the same as the created timestamp, then this object is the first version of the object.
func (*ModifiedProperty) SetModified ¶ added in v0.6.1
func (o *ModifiedProperty) SetModified(t interface{}) error
SetModified - This method takes in a timestamp in either time.Time or string format and updates the modified property with it. The value is stored as a string, so if the value is in time.Time format, it will be converted to the correct STIX timestamp format.
func (*ModifiedProperty) SetModifiedToCurrentTime ¶ added in v0.6.1
func (o *ModifiedProperty) SetModifiedToCurrentTime() error
SetModifiedToCurrentTime - This methods sets the object created time to the current time
func (*ModifiedProperty) VerifyExists ¶ added in v0.6.1
func (o *ModifiedProperty) VerifyExists() (bool, int, []string)
VerifyExists - This method will verify that the modified property on an object is present if required. It will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
type MotivationProperties ¶
type MotivationProperties struct { PrimaryMotivation string `json:"primary_motivation,omitempty" bson:"primary_motivation,omitempty"` SecondaryMotivations []string `json:"secondary_motivations,omitempty" bson:"secondary_motivations,omitempty"` }
MotivationProperties - Properties used by one or more STIX objects that capture the primary and secondary motivations.
func (*MotivationProperties) AddSecondaryMotivations ¶ added in v0.6.1
func (o *MotivationProperties) AddSecondaryMotivations(values interface{}) error
AddSecondaryMotivations - This method takes in a string value, a comma separated list of string values, or a slice of string values that represents a secondary motivation and adds it to the secondary motivations property.
func (*MotivationProperties) GetPrimaryMotivation ¶
func (o *MotivationProperties) GetPrimaryMotivation() string
GetPrimaryMotivation - This method returns the primary motivation.
func (*MotivationProperties) SetPrimaryMotivation ¶
func (o *MotivationProperties) SetPrimaryMotivation(s string) error
SetPrimaryMotivation - This methods takes in a string value representing a motivation from the attack-motivation-ov vocab and updates the primary motivation property.
type NameProperty ¶
type NameProperty struct {
Name string `json:"name,omitempty" bson:"name,omitempty"`
}
NameProperty - A property used by one or more STIX objects that captures a vanity name for the STIX object in string format.
func (*NameProperty) Compare ¶ added in v0.6.1
func (o *NameProperty) Compare(obj2 *NameProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*NameProperty) GetName ¶
func (o *NameProperty) GetName() string
GetName - This method returns the current name of the object.
func (*NameProperty) SetName ¶
func (o *NameProperty) SetName(s string) error
SetName - This method takes in a string value representing a name of the object and updates the name property.
func (*NameProperty) VerifyExists ¶ added in v0.6.1
func (o *NameProperty) VerifyExists() (bool, int, []string)
VerifyExists - This method will verify that the name property on an object is present. It will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
type ObjectRefsProperty ¶ added in v0.6.1
type ObjectRefsProperty struct {
ObjectRefs []string `json:"aliases,omitempty" bson:"aliases,omitempty"`
}
ObjectRefsProperty - A property used by one or more STIX objects.
func (*ObjectRefsProperty) AddObjectRefs ¶ added in v0.6.1
func (o *ObjectRefsProperty) AddObjectRefs(values interface{}) error
AddObjectRefs - This method takes in a string value, a comma separated list of string values, or a slice of string values that represents a alias and adds it to the object refs property.
func (*ObjectRefsProperty) Compare ¶ added in v0.6.1
func (o *ObjectRefsProperty) Compare(obj2 *ObjectRefsProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*ObjectRefsProperty) VerifyExists ¶ added in v0.6.1
func (o *ObjectRefsProperty) VerifyExists() (bool, int, []string)
VerifyExists - This method will verify that the object refs property on an object is present. It will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
type RawProperty ¶ added in v0.6.1
type RawProperty struct {
Raw []byte `json:"-" bson:"-"`
}
RawProperty - A property used to store the raw bytes of the JSON object.
func (*RawProperty) GetRawData ¶ added in v0.6.1
func (o *RawProperty) GetRawData() []byte
GetRawData - This method will return the raw bytes for a given STIX object.
func (*RawProperty) SetRawData ¶ added in v0.6.1
func (o *RawProperty) SetRawData(data []byte) error
SetRawData - This method takes in a slice of bytes representing a full JSON object and updates the raw property for the object.
type ResolvesToRefsProperty ¶ added in v0.6.1
type ResolvesToRefsProperty struct {
ResolvesToRefs []string `json:"resolves_to_refs,omitempty" bson:"resolves_to_refs,omitempty"`
}
ResolvesToRefsProperty -
func (*ResolvesToRefsProperty) AddResolvesToRefs ¶ added in v0.6.1
func (o *ResolvesToRefsProperty) AddResolvesToRefs(values interface{}) error
AddResolvesToRefs - This method takes in a string value, a comma separated list of string values, or a slice of string values that represents an id of an object that this resolves to and adds it to the resolves to refs property.
type ResourceLevelProperty ¶
type ResourceLevelProperty struct {
ResourceLevel string `json:"resource_level,omitempty" bson:"resource_level,omitempty"`
}
ResourceLevelProperty - A property used by one or more STIX objects that captures the resource level.
func (*ResourceLevelProperty) GetResourceLevel ¶
func (o *ResourceLevelProperty) GetResourceLevel() string
GetResourceLevel - This method returns the resource level.
func (*ResourceLevelProperty) SetResourceLevel ¶
func (o *ResourceLevelProperty) SetResourceLevel(s string) error
SetResourceLevel - This method takes in a string value representing a resource level from the attack-resrouce-level-ov vocab and updates the resource level property.
type RevokedProperty ¶ added in v0.6.1
type RevokedProperty struct {
Revoked bool `json:"revoked,omitempty" bson:"revoked,omitempty"`
}
RevokedProperty - A property used by one or more STIX objects that captures whether or not this STIX object has been revoked by the object creator.
func (*RevokedProperty) Compare ¶ added in v0.6.1
func (o *RevokedProperty) Compare(obj2 *RevokedProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*RevokedProperty) GetRevoked ¶ added in v0.6.1
func (o *RevokedProperty) GetRevoked() bool
GetRevoked - This method returns the current value of the revoked property.
func (*RevokedProperty) SetRevoked ¶ added in v0.6.1
func (o *RevokedProperty) SetRevoked() error
SetRevoked - This method sets the revoked boolean to true
type RolesProperty ¶ added in v0.6.1
type RolesProperty struct {
Roles []string `json:"roles,omitempty" bson:"roles,omitempty"`
}
RolesProperty - A property used by one or more STIX objects that captures a list of roles that are part of the STIX object.
func (*RolesProperty) AddRoles ¶ added in v0.6.1
func (o *RolesProperty) AddRoles(values interface{}) error
AddRoles - This method takes in a string value, a comma separated list of string values, or a slice of string values that represents a role and adds it to the roles property.
type SeenProperties ¶ added in v0.6.1
type SeenProperties struct { FirstSeen string `json:"first_seen,omitempty" bson:"first_seen,omitempty"` LastSeen string `json:"last_seen,omitempty" bson:"last_seen,omitempty"` }
SeenProperties - Properties used by one or more STIX objects that captures the time that this object was first and last seen in STIX timestamp format.
func (*SeenProperties) SetFirstSeen ¶ added in v0.6.1
func (o *SeenProperties) SetFirstSeen(t interface{}) error
SetFirstSeen - This method takes in a timestamp in either time.Time or string format and updates the first seen property with it. The value is stored as a string, so if the value is in time.Time format, it will be converted to the correct STIX timestamp format.
func (*SeenProperties) SetFirstSeenToCurrentTime ¶ added in v0.6.1
func (o *SeenProperties) SetFirstSeenToCurrentTime() error
SetFirstSeenToCurrentTime - This methods sets the first seen time to the current time
func (*SeenProperties) SetLastSeen ¶ added in v0.6.1
func (o *SeenProperties) SetLastSeen(t interface{}) error
SetLastSeen - This method takes in a time stamp in either time.Time or string format and updates the last seen property with it. The value is stored as a string, so if the value is in time.Time format, it will be converted to the correct STIX time stamp format.
func (*SeenProperties) SetLastSeenToCurrentTime ¶ added in v0.6.1
func (o *SeenProperties) SetLastSeenToCurrentTime() error
SetLastSeenToCurrentTime - This methods sets the first seen time to the current time
type SpecVersionProperty ¶ added in v0.6.1
type SpecVersionProperty struct {
SpecVersion string `json:"spec_version,omitempty" bson:"spec_version,omitempty"`
}
SpecVersionProperty - A property used by all STIX objects that captures the STIX specification version.
func (*SpecVersionProperty) Compare ¶ added in v0.6.1
func (o *SpecVersionProperty) Compare(obj2 *SpecVersionProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*SpecVersionProperty) GetSpecVersion ¶ added in v0.6.1
func (o *SpecVersionProperty) GetSpecVersion() string
GetSpecVersion - This method returns the version value as a string.
func (*SpecVersionProperty) SetSpecVersion ¶ added in v0.6.1
func (o *SpecVersionProperty) SetSpecVersion(s string) error
SetSpecVersion - This method takes in a string representing a STIX specification version and updates the Version property.
func (*SpecVersionProperty) SetSpecVersion20 ¶ added in v0.6.1
func (o *SpecVersionProperty) SetSpecVersion20() error
SetSpecVersion20 - This method will set the specification version to 2.0.
func (*SpecVersionProperty) SetSpecVersion21 ¶ added in v0.6.1
func (o *SpecVersionProperty) SetSpecVersion21() error
SetSpecVersion21 - This method will set the specification version to 2.1.
func (*SpecVersionProperty) VerifyExists ¶ added in v0.6.1
func (o *SpecVersionProperty) VerifyExists() (bool, int, []string)
VerifyExists - This method will verify that the spec version property on an object is present if required. It will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
type TitleProperty ¶ added in v0.6.1
type TitleProperty struct {
Title string `json:"title" bson:"title"`
}
TitleProperty - A property used by one or more TAXII resources.
func (*TitleProperty) GetTitle ¶ added in v0.6.1
func (o *TitleProperty) GetTitle() string
GetTitle - This method returns the title.
func (*TitleProperty) SetTitle ¶ added in v0.6.1
func (o *TitleProperty) SetTitle(s string) error
SetTitle - This method takes in a string value representing a title or name and updates the title property.
type TypeProperty ¶ added in v0.6.1
type TypeProperty struct {
ObjectType string `json:"type,omitempty" bson:"type,omitempty"`
}
TypeProperty - A property used by one or more STIX objects that captures the STIX object type in string format.
func (*TypeProperty) Compare ¶ added in v0.6.1
func (o *TypeProperty) Compare(obj2 *TypeProperty) (bool, int, []string)
Compare - This method will compare two properties to make sure they are the same and will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
func (*TypeProperty) GetObjectType ¶ added in v0.6.1
func (o *TypeProperty) GetObjectType() string
GetObjectType - This method returns the object type.
func (*TypeProperty) SetObjectType ¶ added in v0.6.1
func (o *TypeProperty) SetObjectType(s string) error
SetObjectType - This method takes in a string value representing a STIX object type and updates the type property.
func (*TypeProperty) VerifyExists ¶ added in v0.6.1
func (o *TypeProperty) VerifyExists() (bool, int, []string)
VerifyExists - This method will verify that the type property on an object is present if required. It will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
type ValueProperty ¶ added in v0.6.1
type ValueProperty struct {
Value string `json:"value,omitempty" bson:"value,omitempty"`
}
ValueProperty -
func (*ValueProperty) SetValue ¶ added in v0.6.1
func (o *ValueProperty) SetValue(val string) error
SetValue -
func (*ValueProperty) VerifyExists ¶ added in v0.6.1
func (o *ValueProperty) VerifyExists() (bool, int, []string)
VerifyExists - This method will verify that the value property on an object is present. It will return a boolean, an integer that tracks the number of problems found, and a slice of strings that contain the detailed results, whether good or bad.
Source Files ¶
- aliases.go
- authors.go
- belongstorefs.go
- confidence.go
- created.go
- createdbyref.go
- custom.go
- datastoreid.go
- description.go
- doc.go
- externalreferences.go
- goals.go
- id.go
- killChainPhases.go
- labels.go
- lang.go
- markings.go
- modified.go
- motivations.go
- name.go
- objectrefs.go
- raw.go
- resolvestorefs.go
- resourceLevel.go
- revoked.go
- roles.go
- seen.go
- specversion.go
- title.go
- type.go
- value.go