destinationmockserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

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