workflow

package
v0.0.0-...-4dd0ec8 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIGWAuthorizerHandler

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

WithPostActions adds the post actions to the previously added handler.

func (*APIGWAuthorizerPrePostHandlerActionBuilder) WithPreActions

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

AddPostActions adds Post Actions to the workflow.

func (*APIGWAuthorizerWorkflowBuilder) AddPreActions

AddPreActions adds Pre Actions to the workflow.

func (*APIGWAuthorizerWorkflowBuilder) Build

Build creates the AWS Lambda workflow.

func (*APIGWAuthorizerWorkflowBuilder) SetBootstrap

SetBootstrap override just to return the correct builder.

func (*APIGWAuthorizerWorkflowBuilder) SetHandler

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

WithPostActions adds the post actions to the previously added handler.

func (*APIGWPrePostHandlerActionBuilder) WithPreActions

WithPreActions adds the pre actions to the previously added handler.

type APIGWProxyHandler

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

Build creates the AWS Lambda workflow.

func (*APIGWProxyWorkflowBuilder) SetBootstrap

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

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

type Action func(c Context) error

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.

type Error

type Error interface {
	Error() string
	Stack() string
	OriginalError() error
}

Error describes Workflow error.

type Injector

type Injector interface {
	Resolve(out interface{}) error
	ResolveByName(name string, out interface{}) error
}

Injector describes DI related operations.

Jump to

Keyboard shortcuts

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