destinationmockserver

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(entityStore EntityStore) http.Handler

Types

type DestinationMockServer

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

func (*DestinationMockServer) Run

type DestinationMockServerConfig

type DestinationMockServerConfig struct {
	Port int
}

type EntityStore

type EntityStore interface {
	ListDestination(ctx context.Context) ([]models.Destination, error)
	RetrieveDestination(ctx context.Context, id string) (*models.Destination, error)
	UpsertDestination(ctx context.Context, destination models.Destination) error
	DeleteDestination(ctx context.Context, id string) error

	ReceiveEvent(ctx context.Context, destinationID string, payload map[string]interface{}, metadata map[string]string) (*Event, error)
	ListEvent(ctx context.Context, destinationID string) ([]Event, error)
	ClearEvents(ctx context.Context, destinationID string) error
}

func NewEntityStore

func NewEntityStore() EntityStore

type Event

type Event struct {
	Success  bool                   `json:"success"`
	Verified bool                   `json:"verified"`
	Payload  map[string]interface{} `json:"payload"`
}

type Handlers

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

func (*Handlers) ClearEvents

func (h *Handlers) ClearEvents(c *gin.Context)

func (*Handlers) DeleteDestination

func (h *Handlers) DeleteDestination(c *gin.Context)

func (*Handlers) ListDestination

func (h *Handlers) ListDestination(c *gin.Context)

func (*Handlers) ListEvent

func (h *Handlers) ListEvent(c *gin.Context)

func (*Handlers) ReceiveWebhookEvent

func (h *Handlers) ReceiveWebhookEvent(c *gin.Context)

func (*Handlers) UpsertDestination

func (h *Handlers) UpsertDestination(c *gin.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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