objects

package
v0.0.0-...-eac9d76 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddValuesToList

func AddValuesToList(list *[]string, values interface{}) error

AddValuesToList - This function will add a single value, a comma separated list of values, or a slice of values to a slice.

func CreateID

func CreateID(s string) (string, error)

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

func GetCurrentTime(precision string) string

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

func IsTimestampValid(t string) bool

IsTimestampValid - This function will take in a timestamp and check to see if it is valid per the specification.

func IsUUIDValid

func IsUUIDValid(uuid string) bool

IsUUIDValid - This function will take in a string and return true if the string represents an actual UUID v4 or v5 value.

func IsVocabValueValid

func IsVocabValueValid(t string, vocab []string) bool

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

func TimeToString(t interface{}, precision string) (string, error)

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.

func NewVariable

func NewVariable() *Variables

NewVariable -

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.

Jump to

Keyboard shortcuts

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