Documentation ¶
Overview ¶
Package note implements the STIX 2.1 Attack Pattern object.
The following information comes directly from the STIX 2.1 specification.
A Note is intended to convey informative text to provide further context and/or to provide additional analysis not contained in the STIX Objects, Marking Definition objects, or Language Content objects which the Note relates to. Notes can be created by anyone (not just the original object creator).
For example, an analyst may add a Note to a Campaign object created by another organization indicating that they've seen posts related to that Campaign on a hacker forum.
Because Notes are typically (though not always) created by human analysts and are comprised of human-oriented text, they contain an additional property to capture the analyst(s) that created the Note. This is distinct from the created_by_ref property, which is meant to capture the organization that created the object.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Note ¶
type Note struct { objects.CommonObjectProperties `bson:",inline"` Abstract string `json:"abstract,omitempty" bson:"abstract,omitempty"` Content string `json:"content,omitempty" bson:"content,omitempty"` properties.AuthorsProperty `bson:",inline"` properties.ObjectRefsProperty `bson:",inline"` }
Note - This type implements the STIX 2 Note SDO and defines all of the properties and methods needed to create and work with this object. All of the methods not defined local to this type are inherited from the individual properties.
func Decode ¶
Decode - This function is a simple wrapper for decoding JSON data. It will decode a slice of bytes into an actual struct and return a pointer to that object along with any errors.
func New ¶
func New() *Note
New - This function will create a new STIX Note object and return it as a pointer. It will also initialize the object by setting all of the basic properties.
func (*Note) EncodeToString ¶
EncodeToString - This method is a simple wrapper for encoding an object into JSON
func (*Note) GetPropertyList ¶
GetPropertyList - This method will return a list of all of the properties that are unique to this object. This is used by the custom UnmarshalJSON for this object. It is defined here in this file to make it easy to keep in sync.
func (*Note) UnmarshalJSON ¶
UnmarshalJSON - This method will over write the default UnmarshalJSON method to enable custom properties that this library does not know about. It will store them as map where the value of each key is a byte arrays. This way a tool that does know how to deal with them can then further process them after this is done. This will also allow the storage of the raw JSON data.
func (*Note) Valid ¶
Valid - This method will verify and test all of the properties on an object to make sure they are valid per the specification. 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.