bundle

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(reader io.Reader) (*Bundle, *Stats, error)

Decode an object bundle

func RegisterType

func RegisterType(name string, builder func() interface{}) error

RegisterType register a new type association and a builder for deserialization

func ReplaceType

func ReplaceType(name string, builder func() interface{}) error

ReplaceType is used to replace a type with new builder. For Example for attribute extensions (Mitre Att&ck)

Types

type Bundle

type Bundle struct {
	Type        string        `json:"type"`
	ID          string        `json:"id"`
	SpecVersion string        `json:"spec_version"`
	Objects     []interface{} `json:"objects"`
}

Bundle represents STIX object bundle (i.e. ATT&CK)

type Stats

type Stats struct {
	Count        int64
	CountPerType map[string]int64
}

Stats represents bundle loading stats

Jump to

Keyboard shortcuts

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