destinationmockserver

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 18 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(store MockStore) http.Handler

Types

type DestinationMockServer

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

func (*DestinationMockServer) Run

type DestinationMockServerConfig

type DestinationMockServerConfig struct {
	Port int
}

type Event

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

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)

type MockStore added in v0.13.0

type MockStore 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, rawBody []byte, metadata map[string]string) (*Event, error)
	ListEvent(ctx context.Context, destinationID string) ([]Event, error)
	ClearEvents(ctx context.Context, destinationID string) error
}

func NewMockStore added in v0.13.0

func NewMockStore() MockStore

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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