event

package
v0.0.0-...-d841f61 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFieldNotExists = errors.New("field doesn't exist")
View Source
var ErrFieldWrongType = errors.New("field has a wrong type")

Functions

This section is empty.

Types

type API

type API interface {
	Send(c *gin.Context)
}

func NewApi

func NewApi(
	publisher amqp.Publisher,
	client mongo.DbClient,
	isAllowChangeSeverityToInfo bool,
	logger zerolog.Logger,
) API

type Event

type Event struct {
	Connector     string `json:"connector" example:"test_connector"`
	ConnectorName string `json:"connector_name" example:"test_connectorname"`
	SourceType    string `json:"source_type" example:"resource"`
	EventType     string `json:"event_type" example:"check"`
	Component     string `json:"component,omitempty" example:"test_component"`
	State         string `json:"state,omitempty" example:"1"`
	Resource      string `json:"resource" example:"test_resource"`
}

Event structure used with swagger

type Response

type Response struct {
	SentEvents []Event `json:"sent_events"`
	// FailedEvents is an empty array left for compatibility with old handler
	FailedEvents []interface{} `json:"failed_events"`
	// RetryEvents is an empty array left for compatibility with old handler
	RetryEvents []interface{} `json:"retry_events"`
}

Response structure used with swagger

Jump to

Keyboard shortcuts

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