lambda

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: MIT Imports: 10 Imported by: ? 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

View Source
const (

	// LogLevelDebug defines the debug log level
	LogLevelDebug string = "DEBUG"

	// LogLevelInfo defines the info log level
	LogLevelInfo string = "INFO"

	// MessageAttribAppName - SQS message attribute that stores the application
	MessageAttribAppName string = "APPLICATION_NAME"

	// MessageAttribAppVers - SQS message attribute that stores the application version
	MessageAttribAppVers string = "APPLICATION_VERS"
)

Constants

Variables

This section is empty.

Functions

This section is empty.

Types

type DBHandler

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

DBHandler points back to the interface

func NewDB

func NewDB(c DynamoDBAPI) *DBHandler

NewDB returns a new DynamoDB handler

type DynamoDBAPI

type DynamoDBAPI interface {
	GetItem(*dynamodb.GetItemInput) (*dynamodb.GetItemOutput, error)
}

DynamoDBAPI - bits from the DynamoDB interface we need

type Handler

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

Handler handles incoming logger requests.

func NewHandler

func NewHandler(ddb DynamoDBAPI, sqs SQSAPI) *Handler

NewHandler initializes and returns a new Handler.

func (*Handler) Handle

func (h *Handler) Handle(ctx context.Context, sqsEvent events.SQSEvent) error

Handle handles the logger request.

type Item

type Item struct {
	Application string `json:"application"`
	Version     string `json:"version"`
	Loghandler  string `json:"loghandler"`
}

Item - represents the application table

type SQSAPI

type SQSAPI interface {
	DeleteMessage(*sqs.DeleteMessageInput) (*sqs.DeleteMessageOutput, error)
	GetQueueUrl(*sqs.GetQueueUrlInput) (*sqs.GetQueueUrlOutput, error)
	SendMessage(*sqs.SendMessageInput) (*sqs.SendMessageOutput, error)
}

SQSAPI - bits from the SQS interface we need

type SQSHandler

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

SQSHandler points back to the interface

func NewSQS

func NewSQS(c SQSAPI) *SQSHandler

NewSQS returns a new SQS handler

Jump to

Keyboard shortcuts

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