app

package
v0.0.0-...-e454325 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNonLambdaContext = errors.New("error could not get lambda context")
)

Functions

This section is empty.

Types

type HMACValidator

type HMACValidator interface {
	IsInvalid(body []byte, signature string) bool
}

type Handler

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

func NewHandler

func NewHandler(snsClient SNSClient, hmacValidator HMACValidator, log *slog.Logger, cfg config.Config) *Handler

func (*Handler) Handle

type Response

type Response struct {
	Error   string `json:"error,omitempty"`
	Message string `json:"message,omitempty"`
}

func NewResponse

func NewResponse(error, message *string) *Response

func (*Response) ToJson

func (r *Response) ToJson() string

type SNSClient

type SNSClient interface {
	Publish(input *sns.PublishInput) (*sns.PublishOutput, error)
	CreateTopic(input *sns.CreateTopicInput) (*sns.CreateTopicOutput, error)
}

Jump to

Keyboard shortcuts

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