Documentation
¶
Index ¶
- func AddValuesToList(list *[]string, values interface{}) error
- func CreateID(s string) (string, error)
- func GetCurrentSpecVersion() string
- func GetCurrentTime(precision string) string
- func GetIndustrySectorsVocab() []string
- func GetVariableTypesVocab() []string
- func IsTimestampValid(t string) bool
- func IsUUIDValid(uuid string) bool
- func IsVocabValueValid(t string, vocab []string) bool
- func TimeToString(t interface{}, precision string) (string, error)
- type ExternalReference
- type Variables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddValuesToList ¶
AddValuesToList - This function will add a single value, a comma separated list of values, or a slice of values to a slice.
func CreateID ¶
CreateID - This method takes in a string value representing an object type and creates and returns a new UUIDv4 ID based on the specification format.
func GetCurrentSpecVersion ¶
func GetCurrentSpecVersion() string
GetCurrentSpecVersion - This function returns the current specification version that this library is using.
func GetCurrentTime ¶
GetCurrentTime - This function takes in a value of either milli or micro and returns the current time in RFC 3339 format
func GetIndustrySectorsVocab ¶
func GetIndustrySectorsVocab() []string
GetIndustrySectorsVocab - This will return a slice of officially supported industry sectors
func GetVariableTypesVocab ¶
func GetVariableTypesVocab() []string
GetVariableTypesVocab - This will return a slice of officially supported variable types.
func IsTimestampValid ¶
IsTimestampValid - This function will take in a timestamp and check to see if it is valid per the specification.
func IsUUIDValid ¶
IsUUIDValid - This function will take in a string and return true if the string represents an actual UUID v4 or v5 value.
func IsVocabValueValid ¶
IsVocabValueValid - This function will take in a string representing an vocab entry and a vocab of valid options and return true or false if it is an officially supported object and thus found in the vocabulary.
func TimeToString ¶
TimeToString - This function takes in a timestamp in either time.Time or string format and returns a string version of the timestamp.
Types ¶
type ExternalReference ¶
type ExternalReference struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Source string `json:"source,omitempty"` URL string `json:"url,omitempty"` ExternalID string `json:"external_id,omitempty"` ReferenceID string `json:"reference_id,omitempty"` }
ExternalReference - This type defines all of the properties associated with the External Reference type. The external-reference data type captures the location of information represented outside of a CACAO playbook and uses the JSON object type [RFC8259] for serialization. For example, a playbook could reference external documentation about a specific piece of malware that the playbook is trying to address. In addition to the name properties at least one of the following properties MUST be present: description, source, url, or external_id.
type Variables ¶
type Variables struct { ObjectType string `json:"type,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Value string `json:"value,omitempty"` Constant bool `json:"constant,omitempty"` External bool `json:"external,omitempty"` }
Variables - This type defines all of the properties associated with the Variables data type. The variable data type captures variable information and uses the JSON object type [RFC8259] for serialization. Variables can be defined and used as the playbook is executed and are stored in a dictionary where the key is the name of the variable and the value is a variable data type. Variables can represent stateful elements that may need to be captured to allow for the successful execution of the playbook. All playbook variables are mutable unless identified as a constant.
Directories
¶
Path | Synopsis |
---|---|
Package markings implements the CACAO 2.0 data marking definition objects.
|
Package markings implements the CACAO 2.0 data marking definition objects. |
Package playbook implements the CACAO 2.0 playbook object.
|
Package playbook implements the CACAO 2.0 playbook object. |
Package signature implements the CACAO 2.0 signature object.
|
Package signature implements the CACAO 2.0 signature object. |
Package workflow implements the CACAO 2.0 workflow step objects.
|
Package workflow implements the CACAO 2.0 workflow step objects. |