1 package awslambda 2 3 import ( 4 "context" 5 ) 6 7 // DecodeRequestFunc extracts a user-domain request object from an 8 // AWS Lambda payload. 9 type DecodeRequestFunc func(context.Context, []byte) (interface{}, error) 10 11 // EncodeResponseFunc encodes the passed response object into []byte, 12 // ready to be sent as AWS Lambda response. 13 type EncodeResponseFunc func(context.Context, interface{}) ([]byte, error) 14 15 // ErrorEncoder is responsible for encoding an error. 16 type ErrorEncoder func(ctx context.Context, err error) ([]byte, error) 17