courseofaction

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package courseofaction implements the STIX 2.1 Course of Action object.

The following information comes directly from the STIX 2.1 specification.

A Course of Action (CoA) is a recommendation from a producer of intelligence to a consumer on the actions that they might take in response to that intelligence. The CoA may be preventative to deter exploitation or corrective to counter its potential impact. The CoA may describe automatable actions (applying patches, configuring firewalls, etc.), manual processes, or a combination of the two. For example, a CoA that describes how to remediate a vulnerability could describe how to apply the patch that removes that vulnerability.

The CoA includes the encoded content of an action or a reference to an externally defined action identified by the action_type property.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CourseOfAction

type CourseOfAction struct {
	objects.CommonObjectProperties `bson:",inline"`
	properties.NameProperty        `bson:",inline"`
	properties.DescriptionProperty `bson:",inline"`
}

CourseOfAction - This type implements the STIX 2 Course Of Action 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 added in v0.6.1

func Decode(data []byte) (*CourseOfAction, error)

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() *CourseOfAction

New - This function will create a new STIX Course of Action object and return it as a pointer.

func (*CourseOfAction) Encode added in v0.6.1

func (o *CourseOfAction) Encode() ([]byte, error)

Encode - This method is a simple wrapper for encoding an object into JSON

func (*CourseOfAction) EncodeToString added in v0.6.1

func (o *CourseOfAction) EncodeToString() (string, error)

EncodeToString - This method is a simple wrapper for encoding an object into JSON

func (*CourseOfAction) GetPropertyList added in v0.6.1

func (o *CourseOfAction) GetPropertyList() []string

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 (*CourseOfAction) UnmarshalJSON added in v0.6.1

func (o *CourseOfAction) UnmarshalJSON(b []byte) error

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 (*CourseOfAction) Valid added in v0.6.1

func (o *CourseOfAction) Valid() (bool, int, map[string]string)

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.

Jump to

Keyboard shortcuts

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