domain

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package domain is a container of all of the domain types and interfaces that are used across multiple packages within the service.

This package is also the container for all domain errors leveraged by the service. Each error here should represent a specific condition that needs to be communicated across interface boundaries.

Generally speaking, this package contains no executable code. All elements are expected to be either pure data containers that have no associated methods or interface definitions that have no corresponding implementations in this package. The notable exception to this are the domain error types which are required to define a corresponding Error() method. Because these errors provide executable code they must also have corresponding tests. Only domain error types are allowed to deviate from the "no executable code" rule.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigFilterer

type ConfigFilterer interface {
	// FilterConfig returns true if the element should continue along the
	// pipeline. False indicates the element should be dropped.
	FilterConfig(ConfigurationItem) bool
}

ConfigFilterer is the expected form of filters applied to AWS Config events.

type ConfigurationItem

type ConfigurationItem struct {
	ResourceType string `json:"resourceType"`
}

ConfigurationItem contains the meaningful elements from the AWS Config Configuration Item (https://docs.aws.amazon.com/config/latest/developerguide/config-item-table.html) that are required for filtering.

type Decorator added in v0.3.0

type Decorator func(Lambda) Lambda

Decorator returns a new Lambda which decorates in the input function

type ErrInvalidInput

type ErrInvalidInput struct {
	Reason string
}

ErrInvalidInput indicates that the AWS Config event did not have the expected shape.

func (ErrInvalidInput) Error

func (e ErrInvalidInput) Error() string

type Lambda added in v0.3.0

type Lambda func(context.Context, SNSInput) error

Lambda is the function signature of the lambda handler in this project

type LogFn

type LogFn = runhttp.LogFn

LogFn is the recommended way to extract a logger from the context.

type Logger

type Logger = runhttp.Logger

Logger is the project logger interface.

type Producer added in v0.2.0

type Producer interface {
	Produce(ctx context.Context, event interface{}) (interface{}, error)
}

Producer sends events to a stream somewhere. All events must be valid for json.Marshal().

type SNSInput added in v0.3.0

type SNSInput map[string]interface{}

SNSInput represents the incoming SNS payload to our lambda handler

type Stat

type Stat = runhttp.Stat

Stat is the project metrics client interface.

type StatFn

type StatFn = runhttp.StatFn

StatFn is the recommended way to extract a metrics client from the context.

Jump to

Keyboard shortcuts

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