generator

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertV1

type AlertV1 struct {
	Action              string                 `json:"action"`
	Name                string                 `json:"name"`
	DevicePhysical      string                 `json:"devicephysical"`
	DeviceVirtual       string                 `json:"devicevirtual"`
	Dst                 string                 `json:"dst"`
	DestIp              string                 `json:"dest_ip,omitempty"`
	DstPort             string                 `json:"dstport,omitempty"`
	Dvc                 string                 `json:"dvc,omitempty"`
	Platform            string                 `json:"platform"`
	Protocol            string                 `json:"protocol"`
	SrcIp               string                 `json:"src_ip"`
	Src                 string                 `json:"src"`
	Sha                 string                 `json:"sha"`
	ShortDesc           string                 `json:"shortdesc"`
	SrcPort             string                 `json:"srcport,omitempty"`
	Type                string                 `json:"type"`
	Vendor              string                 `json:"vendor"`
	Blobs               *[]DataV1              `json:"blobs,omitempty"`
	Context             map[string]interface{} `json:"context,omitempty"`
	Date                string                 `json:"date"`
	Timestamp           float64                `json:"timestamp"`
	LongdescMD          string                 `json:"longdesc_md,omitempty"`
	SafeHtmlClickDesc   bool                   `json:"safe_html_click_desc"`
	SafeHtmlClickEvid   bool                   `json:"safe_html_click_evid"`
	SafeHtmlRenderDesc  bool                   `json:"safe_html_render_desc"`
	SafeHtmlRrenderEvid bool                   `json:"safe_html_render_evid"`
}

func GetBaseAlertV1

func GetBaseAlertV1() AlertV1

Generate basic alert with necessary fields set

func (*AlertV1) AddJSONData

func (a *AlertV1) AddJSONData(json_dumped_to_bytes []byte, name string, render bool)

func (*AlertV1) AddTimeStampFields

func (a *AlertV1) AddTimeStampFields(alert_time time.Time)

func (*AlertV1) SetBlobsProperties

func (a *AlertV1) SetBlobsProperties(site string, src string)

func (*AlertV1) SetSha

func (a *AlertV1) SetSha()

func (*AlertV1) ValidateAlert

func (a *AlertV1) ValidateAlert() error

type AlertsV1

type AlertsV1 struct {
	Alert []AlertV1
}

type DataV1

type DataV1 struct {
	Data     string      `json:"data"`
	Ext      string      `json:"ext"`
	Name     string      `json:"name"`
	Mime     string      `json:"mime"`
	MetaData *MetaDataV1 `json:"metadata,omitempty"`
}

type MetaDataV1

type MetaDataV1 struct {
	Render bool `json:"render"`
}

Jump to

Keyboard shortcuts

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