Documentation
¶
Index ¶
- type APIGWAuthorizerHandler
- type APIGWAuthorizerPrePostHandlerActionBuilder
- type APIGWAuthorizerWorkflowBuilder
- func (b *APIGWAuthorizerWorkflowBuilder) AddPostActions(actions ...Action) *APIGWAuthorizerWorkflowBuilder
- func (b *APIGWAuthorizerWorkflowBuilder) AddPreActions(actions ...Action) *APIGWAuthorizerWorkflowBuilder
- func (b *APIGWAuthorizerWorkflowBuilder) Build() *APIGatewayAuthorizerWorkflow
- func (b *APIGWAuthorizerWorkflowBuilder) SetBootstrap(bootstrap Bootstrap) *APIGWAuthorizerWorkflowBuilder
- func (b *APIGWAuthorizerWorkflowBuilder) SetHandler(handler interface{}) *APIGWAuthorizerPrePostHandlerActionBuilder
- type APIGWPrePostHandlerActionBuilder
- type APIGWProxyHandler
- type APIGWProxyWorkflowBuilder
- func (b *APIGWProxyWorkflowBuilder) AddDeleteHandler(path string, handler interface{}) *APIGWPrePostHandlerActionBuilder
- func (b *APIGWProxyWorkflowBuilder) AddGetHandler(path string, handler interface{}) *APIGWPrePostHandlerActionBuilder
- func (b *APIGWProxyWorkflowBuilder) AddMethodHandler(httpMethod, path string, handler interface{}) *APIGWPrePostHandlerActionBuilder
- func (b *APIGWProxyWorkflowBuilder) AddPostActions(actions ...Action) *APIGWProxyWorkflowBuilder
- func (b *APIGWProxyWorkflowBuilder) AddPostHandler(path string, handler interface{}) *APIGWPrePostHandlerActionBuilder
- func (b *APIGWProxyWorkflowBuilder) AddPreActions(actions ...Action) *APIGWProxyWorkflowBuilder
- func (b *APIGWProxyWorkflowBuilder) AddPutHandler(path string, handler interface{}) *APIGWPrePostHandlerActionBuilder
- func (b *APIGWProxyWorkflowBuilder) Build() *APIGatewayProxyWorkflow
- func (b *APIGWProxyWorkflowBuilder) SetBootstrap(bootstrap Bootstrap) *APIGWProxyWorkflowBuilder
- type APIGatewayAuthorizerWorkflow
- type APIGatewayProxyWorkflow
- type Action
- type BaseWorkflow
- type BaseWorkflowBuilder
- func (b *BaseWorkflowBuilder) AddPostActions(actions ...Action) *BaseWorkflowBuilder
- func (b *BaseWorkflowBuilder) AddPreActions(actions ...Action) *BaseWorkflowBuilder
- func (b *BaseWorkflowBuilder) Build() *BaseWorkflow
- func (b *BaseWorkflowBuilder) SetBootstrap(bootstrap Bootstrap) *BaseWorkflowBuilder
- type Bootstrap
- type Context
- type Error
- type Injector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIGWAuthorizerHandler ¶
type APIGWAuthorizerHandler func(ctx context.Context, evt events.APIGatewayCustomAuthorizerRequest) (*events.APIGatewayCustomAuthorizerResponse, error)
APIGWAuthorizerHandler is AWS API Gateway Authorizer handler function.
type APIGWAuthorizerPrePostHandlerActionBuilder ¶
type APIGWAuthorizerPrePostHandlerActionBuilder struct {
*APIGWAuthorizerWorkflowBuilder
}
APIGWAuthorizerPrePostHandlerActionBuilder is the builder which enables adding pre and post handler actions with fluent API.
func (*APIGWAuthorizerPrePostHandlerActionBuilder) WithPostActions ¶
func (b *APIGWAuthorizerPrePostHandlerActionBuilder) WithPostActions(actions ...Action) *APIGWAuthorizerPrePostHandlerActionBuilder
WithPostActions adds the post actions to the previously added handler.
func (*APIGWAuthorizerPrePostHandlerActionBuilder) WithPreActions ¶
func (b *APIGWAuthorizerPrePostHandlerActionBuilder) WithPreActions(actions ...Action) *APIGWAuthorizerPrePostHandlerActionBuilder
WithPreActions adds the pre actions to the previously added handler.
type APIGWAuthorizerWorkflowBuilder ¶
type APIGWAuthorizerWorkflowBuilder struct {
*BaseWorkflowBuilder
// contains filtered or unexported fields
}
APIGWAuthorizerWorkflowBuilder AWS Lambda handler workflow builder.
func NewAPIGWAuthorizerWorkflowBuilder ¶
func NewAPIGWAuthorizerWorkflowBuilder() *APIGWAuthorizerWorkflowBuilder
NewAPIGWAuthorizerWorkflowBuilder creates new AWS API Gateway Authorizer workflow builder.
func (*APIGWAuthorizerWorkflowBuilder) AddPostActions ¶
func (b *APIGWAuthorizerWorkflowBuilder) AddPostActions(actions ...Action) *APIGWAuthorizerWorkflowBuilder
AddPostActions adds Post Actions to the workflow.
func (*APIGWAuthorizerWorkflowBuilder) AddPreActions ¶
func (b *APIGWAuthorizerWorkflowBuilder) AddPreActions(actions ...Action) *APIGWAuthorizerWorkflowBuilder
AddPreActions adds Pre Actions to the workflow.
func (*APIGWAuthorizerWorkflowBuilder) Build ¶
func (b *APIGWAuthorizerWorkflowBuilder) Build() *APIGatewayAuthorizerWorkflow
Build creates the AWS Lambda workflow.
func (*APIGWAuthorizerWorkflowBuilder) SetBootstrap ¶
func (b *APIGWAuthorizerWorkflowBuilder) SetBootstrap(bootstrap Bootstrap) *APIGWAuthorizerWorkflowBuilder
SetBootstrap override just to return the correct builder.
func (*APIGWAuthorizerWorkflowBuilder) SetHandler ¶
func (b *APIGWAuthorizerWorkflowBuilder) SetHandler(handler interface{}) *APIGWAuthorizerPrePostHandlerActionBuilder
SetHandler sets the provided handler as the API GW Authorizer.
type APIGWPrePostHandlerActionBuilder ¶
type APIGWPrePostHandlerActionBuilder struct {
*APIGWProxyWorkflowBuilder
// contains filtered or unexported fields
}
APIGWPrePostHandlerActionBuilder is the builder which enables the adding pre and post handler actions with fluent API.
func (*APIGWPrePostHandlerActionBuilder) WithPostActions ¶
func (b *APIGWPrePostHandlerActionBuilder) WithPostActions(actions ...Action) *APIGWPrePostHandlerActionBuilder
WithPostActions adds the post actions to the previously added handler.
func (*APIGWPrePostHandlerActionBuilder) WithPreActions ¶
func (b *APIGWPrePostHandlerActionBuilder) WithPreActions(actions ...Action) *APIGWPrePostHandlerActionBuilder
WithPreActions adds the pre actions to the previously added handler.
type APIGWProxyHandler ¶
type APIGWProxyHandler func(ctx context.Context, evt events.APIGatewayProxyRequest) (*events.APIGatewayProxyResponse, error)
APIGWProxyHandler is AWS API Gateway handler function.
type APIGWProxyWorkflowBuilder ¶
type APIGWProxyWorkflowBuilder struct {
*BaseWorkflowBuilder
// contains filtered or unexported fields
}
APIGWProxyWorkflowBuilder AWS Lambda handler workflow builder.
func NewAPIGWProxyWorkflowBuilder ¶
func NewAPIGWProxyWorkflowBuilder() *APIGWProxyWorkflowBuilder
NewAPIGWProxyWorkflowBuilder creates new AWS API Gateway Proxy workflow builder.
func (*APIGWProxyWorkflowBuilder) AddDeleteHandler ¶
func (b *APIGWProxyWorkflowBuilder) AddDeleteHandler(path string, handler interface{}) *APIGWPrePostHandlerActionBuilder
AddDeleteHandler adds the provided handler to the specified path and DELETE HTTP method.
func (*APIGWProxyWorkflowBuilder) AddGetHandler ¶
func (b *APIGWProxyWorkflowBuilder) AddGetHandler(path string, handler interface{}) *APIGWPrePostHandlerActionBuilder
AddGetHandler adds the provided handler to the specified path and GET HTTP method.
func (*APIGWProxyWorkflowBuilder) AddMethodHandler ¶
func (b *APIGWProxyWorkflowBuilder) AddMethodHandler(httpMethod, path string, handler interface{}) *APIGWPrePostHandlerActionBuilder
AddMethodHandler adds the provided handler to the specified path with the provided HTTP method.
func (*APIGWProxyWorkflowBuilder) AddPostActions ¶
func (b *APIGWProxyWorkflowBuilder) AddPostActions(actions ...Action) *APIGWProxyWorkflowBuilder
AddPostActions adds Post Actions to the workflow.
func (*APIGWProxyWorkflowBuilder) AddPostHandler ¶
func (b *APIGWProxyWorkflowBuilder) AddPostHandler(path string, handler interface{}) *APIGWPrePostHandlerActionBuilder
AddPostHandler adds the provided handler to the specified path and POST HTTP method.
func (*APIGWProxyWorkflowBuilder) AddPreActions ¶
func (b *APIGWProxyWorkflowBuilder) AddPreActions(actions ...Action) *APIGWProxyWorkflowBuilder
AddPreActions adds Pre Actions to the workflow.
func (*APIGWProxyWorkflowBuilder) AddPutHandler ¶
func (b *APIGWProxyWorkflowBuilder) AddPutHandler(path string, handler interface{}) *APIGWPrePostHandlerActionBuilder
AddPutHandler adds the provided handler to the specified path and PUT HTTP method.
func (*APIGWProxyWorkflowBuilder) Build ¶
func (b *APIGWProxyWorkflowBuilder) Build() *APIGatewayProxyWorkflow
Build creates the AWS Lambda workflow.
func (*APIGWProxyWorkflowBuilder) SetBootstrap ¶
func (b *APIGWProxyWorkflowBuilder) SetBootstrap(bootstrap Bootstrap) *APIGWProxyWorkflowBuilder
SetBootstrap override just to return the correct builder.
type APIGatewayAuthorizerWorkflow ¶
type APIGatewayAuthorizerWorkflow struct {
*BaseWorkflow
// contains filtered or unexported fields
}
APIGatewayAuthorizerWorkflow AWS API Gateway Authorizer workflow.
func (*APIGatewayAuthorizerWorkflow) GetLambdaHandler ¶
func (w *APIGatewayAuthorizerWorkflow) GetLambdaHandler() APIGWAuthorizerHandler
GetLambdaHandler returns AWS API Gateway Authorizer Lambda handler.
type APIGatewayProxyWorkflow ¶
type APIGatewayProxyWorkflow struct {
*BaseWorkflow
// contains filtered or unexported fields
}
APIGatewayProxyWorkflow AWS API Gateway Lambda Proxy request/response workflow.
func (*APIGatewayProxyWorkflow) GetLambdaHandler ¶
func (w *APIGatewayProxyWorkflow) GetLambdaHandler() APIGWProxyHandler
GetLambdaHandler returns AWS API Gateway Proxy Lambda handler.
type Action ¶
Action describes function which will be executed before or after the handler is executed.
type BaseWorkflow ¶
type BaseWorkflow struct {
// contains filtered or unexported fields
}
BaseWorkflow is the base lambda workflow.
func (*BaseWorkflow) InvokeHandler ¶
func (w *BaseWorkflow) InvokeHandler(awsContext context.Context, evt interface{}, evtBytes []byte, hData *handlerData) (Context, Error)
InvokeHandler invokes the provided handler.
type BaseWorkflowBuilder ¶
type BaseWorkflowBuilder struct {
// contains filtered or unexported fields
}
BaseWorkflowBuilder is the base workflow builder.
func NewBaseWorkflowBuilder ¶
func NewBaseWorkflowBuilder() *BaseWorkflowBuilder
NewBaseWorkflowBuilder creates new Base workflow builder.
func (*BaseWorkflowBuilder) AddPostActions ¶
func (b *BaseWorkflowBuilder) AddPostActions(actions ...Action) *BaseWorkflowBuilder
AddPostActions adds Post Actions to the workflow.
func (*BaseWorkflowBuilder) AddPreActions ¶
func (b *BaseWorkflowBuilder) AddPreActions(actions ...Action) *BaseWorkflowBuilder
AddPreActions adds Pre Actions to the workflow.
func (*BaseWorkflowBuilder) Build ¶
func (b *BaseWorkflowBuilder) Build() *BaseWorkflow
Build creates the Base workflow.
func (*BaseWorkflowBuilder) SetBootstrap ¶
func (b *BaseWorkflowBuilder) SetBootstrap(bootstrap Bootstrap) *BaseWorkflowBuilder
SetBootstrap sets the bootstrap function to the workflow.
type Bootstrap ¶
type Bootstrap func() Injector
Bootstrap is function which registers all dependencies in the injector and returns it.
type Context ¶
type Context interface {
GetLambdaContext() context.Context
GetLambdaEvent(out interface{}) Error
GetInjector() Injector
GetRequestObject(out interface{}) Error
GetRawResponse(out interface{}) Error
GetHandlerError() error
GetRequest() interface{}
SetResponse(interface{}) Context
SetRawResponse(interface{}) Context
SetResponseStatusCode(int) Context
}
Context is the AWS Lambda Workflow context.