entry

package
v0.0.0-...-8c740d9 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NoGeo lets the user decide if they want to use the geographic database.
	NoGeo = flag.Bool("nogeo", false, "Do not use geographic database")

	// Hostname is used in the JSON document.
	Hostname = flag.String("hostname", "localhost", "Given hostname")
)

Functions

This section is empty.

Types

type GeoIPEntry

type GeoIPEntry struct {
	IsoCode   string  `json:"iso_code,omitempty"`
	Latitude  float64 `json:"latitude,omitempty"`
	Longitude float64 `json:"longitude,omitempty"`
}

GeoIPEntry identifiers geographic location

func (*GeoIPEntry) MarshalJSON

func (mj *GeoIPEntry) MarshalJSON() ([]byte, error)

func (*GeoIPEntry) MarshalJSONBuf

func (mj *GeoIPEntry) MarshalJSONBuf(buf fflib.EncodingBuffer) error

func (*GeoIPEntry) UnmarshalJSON

func (uj *GeoIPEntry) UnmarshalJSON(input []byte) error

func (*GeoIPEntry) UnmarshalJSONFFLexer

func (uj *GeoIPEntry) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

type NfdumpEntry

type NfdumpEntry struct {
	Host          string      `json:"host"`
	InBytes       string      `json:"in_bytes"`
	InPkts        string      `json:"in_pkts"`
	Ipv4SrcAddr   string      `json:"ipv4_src_addr"`
	Ipv4DstAddr   string      `json:"ipv4_dst_addr"`
	Protocol      string      `json:"protocol"`
	L4SrcPort     string      `json:"l4_src_port"`
	L4DstPort     string      `json:"l4_dst_port"`
	FirstSwitched string      `json:"first_switched"`
	LastSwitched  string      `json:"last_switched"`
	GeoIPSrc      *GeoIPEntry `json:"geoip_src,omitempty"`
	GeoIPDst      *GeoIPEntry `json:"geoip_dst,omitempty"`
}

NfdumpEntry represents a nfdump entry

func NewNfdumpEntry

func NewNfdumpEntry(s string) (*NfdumpEntry, error)

NewNfdumpEntry creates a new NfdumpEntry

func (*NfdumpEntry) MarshalJSON

func (mj *NfdumpEntry) MarshalJSON() ([]byte, error)

func (*NfdumpEntry) MarshalJSONBuf

func (mj *NfdumpEntry) MarshalJSONBuf(buf fflib.EncodingBuffer) error

func (*NfdumpEntry) UnmarshalJSON

func (uj *NfdumpEntry) UnmarshalJSON(input []byte) error

func (*NfdumpEntry) UnmarshalJSONFFLexer

func (uj *NfdumpEntry) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

Jump to

Keyboard shortcuts

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