client

package
v0.4.3-final-apache Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddEventReportRequest

type AddEventReportRequest struct {
	Uuid           string  `json:"uuid"`
	EventId        string  `json:"event_id"`
	Name           string  `json:"name"`
	Content        string  `json:"content"`
	Distribution   *string `json:"distribution"`
	SharingGroupId *string `json:"sharing_group_id"`
	Timestamp      *string `json:"timestamp"`
	Deleted        bool    `json:"deleted"`
}

type AddEventReportResponse

type AddEventReportResponse struct {
	EventReport EventReport `json:"EventReport"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseUrl, apiKey string, opts ...ClientOption) *Client

func (*Client) AddEventReport

func (client *Client) AddEventReport(ctx context.Context, req AddEventReportRequest) (events AddEventReportResponse, err error)

func (*Client) Do

func (client *Client) Do(ctx context.Context, method, path string, payload interface{}) (resp *http.Response, err error)

func (*Client) RestSearchEvents

func (client *Client) RestSearchEvents(ctx context.Context, req RestSearchEventsRequest) (events RestSearchEventsResponse, err error)

type ClientOption

type ClientOption func(*Client)

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) ClientOption

type Event

type Event struct {
	ID                 string `json:"id"`
	OrgId              string `json:"org_id"`
	Distribution       string `json:"distribution"`
	Info               string `json:"info"`
	OrgcId             string `json:"orgc_id"`
	Uuid               string `json:"uuid"`
	Date               string `json:"date"`
	Published          bool   `json:"published"`
	Analysis           string `json:"analysis"`
	AttributeCount     string `json:"attribute_count"`
	Timestamp          string `json:"timestamp"`
	SharingGroupId     string `json:"sharing_group_id"`
	ProposalEmailLock  bool   `json:"proposal_email_lock"`
	Locked             bool   `json:"locked"`
	ThreatLevelId      string `json:"threat_level_id"`
	PublishTimestamp   string `json:"publish_timestamp"`
	SightingTimestamp  string `json:"sighting_timestamp"`
	DisableCorrelation bool   `json:"disable_correlation"`
}

type EventReport

type EventReport struct {
	Id             string  `json:"id"`
	Uuid           string  `json:"uuid"`
	EventId        string  `json:"event_id"`
	Name           string  `json:"name"`
	Content        string  `json:"content"`
	Distribution   string  `json:"distribution"`
	SharingGroupId *string `json:"sharing_group_id"`
	Timestamp      *string `json:"timestamp"`
	Deleted        bool    `json:"deleted"`
}

type EventResponse

type EventResponse struct {
	Event Event `json:"Event"`
}

type RestSearchEventsRequest

type RestSearchEventsRequest struct {
	Page              *int64   `json:"page,omitempty"`
	Limit             *int64   `json:"limit,omitempty"`
	Value             string   `json:"value,omitempty"`
	Type              string   `json:"type,omitempty"`
	Category          string   `json:"category,omitempty"`
	Org               string   `json:"org,omitempty"`
	Tags              []string `json:"tags,omitempty"`
	EventTags         []string `json:"event_tags,omitempty"`
	SearchAll         string   `json:"searchall,omitempty"`
	From              *string  `json:"from,omitempty"`
	To                *string  `json:"to,omitempty"`
	Last              *string  `json:"last,omitempty"`
	EventID           string   `json:"eventid,omitempty"`
	WithAttachments   *bool    `json:"withAttachments,omitempty"`
	SharingGroups     []string `json:"sharinggroup,omitempty"`
	Metadata          *bool    `json:"metadata,omitempty"`
	UUID              string   `json:"uuid,omitempty"`
	IncludeSightingdb *bool    `json:"includeSightingdb,omitempty"`
	ThreatLevelID     string   `json:"threat_level_id,omitempty"`
}

type RestSearchEventsResponse

type RestSearchEventsResponse struct {
	Response []EventResponse `json:"response"`
}

Jump to

Keyboard shortcuts

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