Version: v0.6.4 Latest Latest

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 5 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type MarkingDefinition

type MarkingDefinition struct {
	DefinitionType string `json:"definition_type"`

MarkingDefinition - This type implements the STIX 2 MarkingDefinition 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

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

func New

func New() *MarkingDefinition

New - This function will create a new STIX MarkingDefinition object and return it as a pointer. It will also initialize the object by setting all of the basic properties.

func (*MarkingDefinition) Encode

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

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

func (*MarkingDefinition) EncodeToString

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

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

func (*MarkingDefinition) GetDefinitionType

func (o *MarkingDefinition) GetDefinitionType() (s string)

GetDefinitionType - This method get the definition type.

func (*MarkingDefinition) GetPropertyList

func (o *MarkingDefinition) 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 (*MarkingDefinition) SetDefinitionType

func (o *MarkingDefinition) SetDefinitionType(s string) (err error)

SetDefinitionType - This method sets the definition type property to s.

func (*MarkingDefinition) UnmarshalJSON

func (o *MarkingDefinition) 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 (*MarkingDefinition) Valid

func (o *MarkingDefinition) Valid() (bool, int, []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
t or T : Toggle theme light dark auto
y or Y : Canonical URL