properties

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 1 Imported by: 29

Documentation

Index

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"`
}

AliasesProperty - A property used by one or more STIX objects.

func (*AliasesProperty) AddAlias

func (o *AliasesProperty) AddAlias(s string) error

AddAlias - This method takes in a takes in a string value that represents an alias for something in STIX and adds it to the property.

type DescriptionProperty

type DescriptionProperty struct {
	Description string `json:"description,omitempty"`
}

DescriptionProperty - A property used by one or more STIX objects that captures the description for the object as a string.

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 GoalsProperty

type GoalsProperty struct {
	Goals []string `json:"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) AddGoal

func (o *GoalsProperty) AddGoal(s string) error

AddGoal - This method takes in a string value that represents a goal and adds it to the list of goals in the goals property.

type KillChainPhase

type KillChainPhase struct {
	KillChainName string `json:"kill_chain_name,omitempty"`
	PhaseName     string `json:"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"`
}

KillChainPhasesProperty - A property used by one or more STIX objects that captures a list of kll chain phases as defined by STIX.

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.

func (*KillChainPhasesProperty) NewKillChainPhase

func (o *KillChainPhasesProperty) NewKillChainPhase() (*KillChainPhase, error)

NewKillChainPhase - This method returns a reference to a slice location. This will enable the code to update an object located at that slice location.

type MotivationProperties

type MotivationProperties struct {
	PrimaryMotivation    string   `json:"primary_motivation,omitempty"`
	SecondaryMotivations []string `json:"secondary_motivations,omitempty"`
}

MotivationProperties - Properties used by one or more STIX objects that capture the primary and secondary motivations.

func (*MotivationProperties) AddSecondaryMotivation

func (o *MotivationProperties) AddSecondaryMotivation(s string) error

AddSecondaryMotivation - This method takes in a string value that represents a motivation from the attack-motivation-ov vocab and adds it to the list of motivations in 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"`
}

NameProperty - A property used by one or more STIX objects that captures a vanity name for the STIX object in string format.

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.

type ResourceLevelProperty

type ResourceLevelProperty struct {
	ResourceLevel string `json:"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 SeenTimestampProperties

type SeenTimestampProperties struct {
	FirstSeen string `json:"first_seen,omitempty"`
	LastSeen  string `json:"last_seen,omitempty"`
}

SeenTimestampProperties - 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 (*SeenTimestampProperties) SetFirstSeen

func (o *SeenTimestampProperties) 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 (*SeenTimestampProperties) SetFirstSeenToCurrentTime

func (o *SeenTimestampProperties) SetFirstSeenToCurrentTime() error

SetFirstSeenToCurrentTime - This methods sets the first seen time to the current time

func (*SeenTimestampProperties) SetLastSeen

func (o *SeenTimestampProperties) 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 (*SeenTimestampProperties) SetLastSeenToCurrentTime

func (o *SeenTimestampProperties) SetLastSeenToCurrentTime() error

SetLastSeenToCurrentTime - This methods sets the first seen time to the current time

Jump to

Keyboard shortcuts

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