unmarshal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(filename string) (*idmef.Message, error)

Types

type Address

type Address struct {
	Address  string `xml:"http://iana.org/idmef address"`
	Indent   string `xml:"ident,attr"`
	Category string `xml:"category,attr"`
}

func (*Address) Common

func (a *Address) Common() *idmef.Address

type Alert

type Alert struct {
	MessageId      string         `xml:"messageid,attr"`
	Analyzer       Analyzer       `xml:"http://iana.org/idmef Analyzer"`
	CreateTime     Time           `xml:"http://iana.org/idmef CreateTime"`
	DetectTime     *Time          `xml:"http://iana.org/idmef DetectTime"`
	AnalyzerTime   *Time          `xml:"http://iana.org/idmef AnalyzerTime"`
	Source         []Source       `xml:"http://iana.org/idmef Source"`
	Target         []Source       `xml:"http://iana.org/idmef Target"`
	Classification Classification `xml:"http://iana.org/idmef Classification"`
}

func (*Alert) Common

func (a *Alert) Common() *idmef.Alert

type Analyzer

type Analyzer struct {
	AnalyzerId string `xml:"analyzerid,attr"`
	Node       *Node  `xml:"http://iana.org/idmef Node"`
}

func (*Analyzer) Common

func (a *Analyzer) Common() idmef.Analyzer

type Classification

type Classification struct {
	Text      string     `xml:"text,attr"`
	Reference *Reference `xml:"http://iana.org/idmef Reference"`
}

func (*Classification) Common

func (cl *Classification) Common() idmef.Classification

type Message

type Message struct {
	XMLName    xml.Name `xml:"http://iana.org/idmef IDMEF-Message"`
	XMLNSIDMEF string   `xml:"xmlns:idmef,attr"`
	Version    string   `xml:"version,attr"`
	Alert      *Alert   `xml:"http://iana.org/idmef Alert"`
}

func (*Message) Bytes

func (m *Message) Bytes(prefix, indent string) ([]byte, error)

func (*Message) Common

func (m *Message) Common() *idmef.Message

type Node

type Node struct {
	Indent   string   `xml:"ident,attr,omitempty"`
	Category string   `xml:"category,attr,omitempty"`
	Address  *Address `xml:"http://iana.org/idmef Address,omitempty"`
	Location string   `xml:"http://iana.org/idmef location,omitempty"`
	Name     string   `xml:"http://iana.org/idmef name,omitempty"`
}

func (*Node) Common

func (n *Node) Common() *idmef.Node

type Reference

type Reference struct {
	Origin string `xml:"origin,attr"`
	Name   string `xml:"http://iana.org/idmef name"`
	URL    string `xml:"http://iana.org/idmef url"`
}

func (*Reference) Common

func (ref *Reference) Common() *idmef.Reference

type Source

type Source struct {
	Indent  string `xml:"ident,attr"`
	Spoofed string `xml:"spoofed,attr,omitempty"`
	Node    *Node  `xml:"http://iana.org/idmef Node"`
}

func (*Source) Common

func (s *Source) Common() idmef.Source

type Time

type Time struct {
	Time     time.Time `xml:",chardata"`
	NtpStamp string    `xml:"ntpstamp,attr"`
}

func (*Time) Common

func (t *Time) Common() idmef.Time

Jump to

Keyboard shortcuts

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