httpendpoint

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

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

Go to latest
Published: Jun 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const BatchSize = 100

todo: add support for batch size

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL        string `json:"url" validate:"required,url" required:"true"`
	AuthHeader string `json:"auth_header"`
}

type HTTPEndpoint

type HTTPEndpoint struct {
	Config           Config                  `json:"config"`
	IntegrationType  string                  `json:"integration_type"`
	NotificationType string                  `json:"notification_type"`
	Filters          reporters.FieldsFilters `json:"filters"`
	Message          string                  `json:"message"`
}

func New

func New(ctx context.Context, b []byte) (*HTTPEndpoint, error)

func (HTTPEndpoint) IsValidCredential

func (h HTTPEndpoint) IsValidCredential(ctx context.Context) (bool, error)

func (HTTPEndpoint) SendNotification

func (h HTTPEndpoint) SendNotification(ctx context.Context, message string, extras map[string]interface{}) error

func (HTTPEndpoint) ValidateConfig

func (h HTTPEndpoint) ValidateConfig(validate *validator.Validate) error

Jump to

Keyboard shortcuts

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