thehive

package
v0.0.0-...-6aa5a74 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetHeaders

func SetHeaders(req *fasthttp.Request, method string, apiKey string)

Types

type Alert

type Alert struct {
	Id           string       `json:"_id,omitempty"`
	Type         string       `json:"type"`
	Source       string       `json:"source"`
	SourceRef    string       `json:"sourceRef"`
	Title        string       `json:"title"`
	Description  string       `json:"description"`
	ExternalLink string       `json:"externalLink"`
	Tags         []string     `json:"tags"`
	Observables  []Observable `json:"observables"`
}

func NewAlert

func NewAlert() Alert

func (*Alert) AddObservable

func (a *Alert) AddObservable(obsType string, obs string, tags []string)

type Observable

type Observable struct {
	DataType string   `json:"dataType"`
	Data     string   `json:"data"`
	Tags     []string `json:"tags"`
}

type TheHiveClient

type TheHiveClient struct {
	HTTP   *fiber.Agent
	Logger *zap.Logger
	// contains filtered or unexported fields
}

func GetHiveClient

func GetHiveClient(url string, key string, logger *zap.Logger) (*TheHiveClient, error)

func (*TheHiveClient) CreateAlert

func (s *TheHiveClient) CreateAlert(alert Alert) (id string, err error)

Jump to

Keyboard shortcuts

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