Versions in this module Expand all Collapse all v1 v1.0.5 Jul 15, 2019 Changes in this version type Settings + AWSDebugRequestLogEnabled bool v1.0.4 Jan 24, 2019 Changes in this version + const FormatCurrentVersion + const FormatVersionV1 + var ErrRetry = errors.New("Retry error") + func NewLambdaHandler(consumer ILambdaConsumer) lambda.Handler + type AWSSessionsCache struct + func NewAWSSessionsCache() *AWSSessionsCache + func (c *AWSSessionsCache) GetSession(settings *Settings) *session.Session + type CallbackFunction func(context.Context, *Message) error + type CallbackKey struct + MessageMajorVersion int + MessageType string + type CallbackRegistry struct + func NewCallbackRegistry() *CallbackRegistry + func (cr *CallbackRegistry) RegisterCallback(cbk CallbackKey, cbf CallbackFunction, newData NewData) + type GetLoggerFunc func(ctx context.Context) Logger + func LogrusGetLoggerFunc(fn func(ctx context.Context) *logrus.Entry) GetLoggerFunc + type ILambdaConsumer interface + HandleLambdaEvent func(ctx context.Context, snsEvent events.SNSEvent) error + func NewLambdaConsumer(sessionCache *AWSSessionsCache, settings *Settings) ILambdaConsumer + type IMessageValidator interface + SchemaRoot func() string + Validate func(message *Message) error + func NewMessageValidator(schemaFilePath string) (IMessageValidator, error) + func NewMessageValidatorFromBytes(schemaFile []byte) (IMessageValidator, error) + type IPublisher interface + Publish func(ctx context.Context, message *Message) error + func NewPublisher(sessionCache *AWSSessionsCache, settings *Settings) IPublisher + type IQueueConsumer interface + ListenForMessages func(ctx context.Context, request *ListenRequest) error + func NewQueueConsumer(sessionCache *AWSSessionsCache, settings *Settings) IQueueConsumer + type JSONTime time.Time + func (t *JSONTime) UnmarshalJSON(b []byte) error + func (t JSONTime) MarshalJSON() ([]byte, error) + type LambdaHandler struct + func (handler *LambdaHandler) Invoke(ctx context.Context, payload []byte) ([]byte, error) + type LambdaRequest struct + Context context.Context + EventRecord *events.SNSEventRecord + type ListenRequest struct + LoopCount uint32 + NumMessages uint32 + VisibilityTimeoutS uint32 + type Logger interface + Debug func(message string, fields LoggingFields) + Error func(err error, message string, fields LoggingFields) + Info func(message string, fields LoggingFields) + Warn func(err error, message string, fields LoggingFields) + type LoggingFields map[string]interface + type Message struct + Data interface{} + DataSchemaVersion *semver.Version + FormatVersion string + ID string + Metadata *metadata + Schema string + func NewMessage(settings *Settings, dataType string, dataSchemaVersion string, ...) (*Message, error) + func (m *Message) DataJSONString() (string, error) + func (m *Message) JSONString() (string, error) + func (m *Message) UnmarshalJSON(b []byte) error + type MessageDefaultHeadersHook func(ctx context.Context, message *Message) map[string]string + type MessageRouteKey struct + MessageMajorVersion int + MessageType string + type NewData func() interface + type PreDeserializeHook func(ctx *context.Context, messageData *string) error + type PreProcessHookLambda func(r *LambdaRequest) error + type PreProcessHookSQS func(r *SQSRequest) error + type PreSerializeHook func(ctx *context.Context, messageData *string) error + type Publisher struct + func (p *Publisher) Publish(ctx context.Context, message *Message) error + type SQSRequest struct + Context context.Context + QueueMessage *sqs.Message + type Settings struct + AWSAccessKey string + AWSAccountID string + AWSReadTimeoutS time.Duration + AWSRegion string + AWSSecretKey string + AWSSessionToken string + CallbackRegistry *CallbackRegistry + GetLogger GetLoggerFunc + MessageDefaultHeadersHook MessageDefaultHeadersHook + MessageRouting map[MessageRouteKey]string + PreDeserializeHook PreDeserializeHook + PreProcessHookLambda PreProcessHookLambda + PreProcessHookSQS PreProcessHookSQS + PreSerializeHook PreSerializeHook + Publisher string + QueueName string + ShutdownTimeout time.Duration + Validator IMessageValidator