Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoInput = fmt.Errorf("no input") ErrNoFunctionName = fmt.Errorf("no function name") )
View Source
var (
StatusCode202 int64 = 202
)
Functions ¶
This section is empty.
Types ¶
type Fake ¶
type Fake struct {
// contains filtered or unexported fields
}
Fake presents a fake lambda that keep mapping between function name and handler
func NewFakeLambda ¶
NewFakeLambda creates a new fake lambda
func (*Fake) Invoke ¶
func (f *Fake) Invoke(in *real.InvokeInput) (out *real.InvokeOutput, err error)
Invoke invokes the lambda function-same signature as real lambda
func (*Fake) InvokeWithContext ¶
func (f *Fake) InvokeWithContext(ctx context.Context, in *real.InvokeInput, opts ...request.Option) (*real.InvokeOutput, error)
InvokeWithContext invokes the lambda function-same signature as real lambda
type FuncHandler ¶
FuncHandler is a longest function as the input for lambda. present for func (context.Context, TIn) (TOut, error) If you do not need to use input or output, just ignore it
type Option ¶
type Option func(f *Fake)
Option add option for Fake
func WithFunction ¶
func WithFunction(name string, handler FuncHandler) Option
WithFunction register a function with Fake
Click to show internal directories.
Click to hide internal directories.