Documentation
¶
Overview ¶
Package aws contains the services for AWS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleBase64 ¶
HandleBase64 tries to decode the provided byte slice.
func HandleBase64String ¶
HandleBase64String tries to decode the provided string behind the ptr.
Types ¶
type Headers ¶ added in v1.0.1
func (*Headers) MarshalJSON ¶ added in v1.0.2
func (*Headers) UnmarshalJSON ¶ added in v1.0.1
type LambdaRequest ¶
type LambdaRequest struct {
// Host in the request.
Host string `json:"host,omitempty" yaml:"host,omitempty"`
// Headers of the request.
Headers Headers `json:"headers,omitempty" yaml:"header,omitempty"`
// Method from the request.
Method string `json:"method,omitempty" yaml:"method,omitempty"`
// URI from the request.
URI string `json:"uri" yaml:"uri"`
// Vars parsed from the path.
Vars map[string]string `json:"vars" yaml:"vars"`
// Body from the request
Body []byte `json:"body" yaml:"body"`
}
LambdaRequest to be sent to the lambda.
type LambdaResponse ¶
type LambdaResponse struct {
// StatusCode for the http response.
StatusCode int `json:"statusCode" yaml:"statusCode"`
// Headers to be appended.
Headers Headers `json:"headers" yaml:"headers"`
// Body to be written.
Body Body `json:"body" yaml:"body"`
}
LambdaResponse from the invocation.
type LambdaService ¶
type LambdaService interface {
// Invoke the lambda from the provided arn.ARN using the provided LambdaRequest.
Invoke(ctx context.Context, arn arn.ARN, request *LambdaRequest) (*LambdaResponse, error)
}
LambdaService for invocation.
func NewLambdaService ¶
func NewLambdaService(ctx context.Context) (LambdaService, error)
NewLambdaService from aws-sdk.
type SdkLambdaService ¶
type SdkLambdaService func(ctx context.Context, params *lambda.InvokeInput, optFns ...func(*lambda.Options)) ( *lambda.InvokeOutput, error, )
func (SdkLambdaService) Invoke ¶
func (s SdkLambdaService) Invoke(ctx context.Context, arn arn.ARN, request *LambdaRequest) (*LambdaResponse, error)
Click to show internal directories.
Click to hide internal directories.