Documentation ¶
Index ¶
- Variables
- func Dashboard(ctx context.Context, e events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
- func Get(url string, headers http.Header) (*http.Response, error)
- func GetModelFromDb(ctx aws.Context, channel string) (*model.Model, error)
- func Interaction(ctx context.Context, event events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
- func JsonHeaders() map[string]string
- func NewAPIGateway() *apigateway.APIGateway
- func NewLambda() *lambda.Lambda
- func NewS3() *s3.S3
- func NewSNS() *sns.SNS
- func Post(url string, headers http.Header, body interface{}) (*http.Response, error)
- func SaveModel(ctx aws.Context, channel string, currentModel *model.Model) error
- func Slash(ctx context.Context, event events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
- type DynamoDBAPI
- type HTTPClient
- type HandlerAPIGateway
- type HandlerCloudWatch
- type KMSAPI
Constants ¶
This section is empty.
Variables ¶
View Source
var ( APIGateway = NewAPIGateway() DynamoDB = NewDynamoDB() KMS = NewKMS() Lambda = NewLambda() S3 = NewS3() SNS = NewSNS() )
AWS Clients that can be mocked for testing
Functions ¶
func Dashboard ¶
func Dashboard(ctx context.Context, e events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
Dashboard returns a dashboard HTML page
func Interaction ¶
func Interaction(ctx context.Context, event events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
func JsonHeaders ¶
func NewAPIGateway ¶
func NewAPIGateway() *apigateway.APIGateway
NewAPIGateway is an xray instrumented APIGateway client
func Slash ¶
func Slash(ctx context.Context, event events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
Types ¶
type DynamoDBAPI ¶
type DynamoDBAPI interface { DeleteItemWithContext(ctx aws.Context, input *dynamodb.DeleteItemInput, opts ...request.Option) (*dynamodb.DeleteItemOutput, error) GetItemWithContext(ctx aws.Context, input *dynamodb.GetItemInput, opts ...request.Option) (*dynamodb.GetItemOutput, error) PutItemWithContext(ctx aws.Context, input *dynamodb.PutItemInput, opts ...request.Option) (*dynamodb.PutItemOutput, error) }
DynamoDBAPI is a subset of dynamodbiface.DynamoDBAPI
func NewDynamoDB ¶
func NewDynamoDB() DynamoDBAPI
NewDynamoDB is an xray instrumented DynamoDB client
type HandlerAPIGateway ¶
type HandlerAPIGateway func(context.Context, events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
HandlerAPIGateway is an API Gateway Proxy Request handler function
func NotifyAPIGateway ¶
func NotifyAPIGateway(h HandlerAPIGateway) HandlerAPIGateway
NotifyAPIGateway wraps a handler func and sends an SNS notification on error
func VerifyRequestInterceptor ¶
func VerifyRequestInterceptor(h HandlerAPIGateway) HandlerAPIGateway
type HandlerCloudWatch ¶
type HandlerCloudWatch func(context.Context, events.CloudWatchEvent) error
HandlerCloudWatch is a CloudWatchEvent handler function
type KMSAPI ¶
type KMSAPI interface { DecryptWithContext(ctx aws.Context, input *kms.DecryptInput, opts ...request.Option) (*kms.DecryptOutput, error) EncryptWithContext(ctx aws.Context, input *kms.EncryptInput, opts ...request.Option) (*kms.EncryptOutput, error) }
KMSAPI is a subset of kmsiface.KMSAPI
Source Files ¶
Click to show internal directories.
Click to hide internal directories.