config

package
v0.0.5-0...-3bd4ab3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: CC0-1.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config contains the necessary properties for testing a *lambda.FunctionConfiguration

func New

func New(client client.ConfigProvider, functionName string) *Config

New returns a new *Config

func (*Config) Assert

func (c *Config) Assert(t *testing.T, cfg *lambda.FunctionConfiguration) *Config

Assert executes all Validators provided against the *lambda.FunctionConfiguration if cfg is nil, the *lambda.FunctionConfiguration with be queried from AWS

func (*Config) Env

func (c *Config) Env(key, value string) *Config

Env validates that the config contains an environment variable matching the provided key and value

func (*Config) Get

Get returns the *lambda.FunctionConfiguration for the lambda

func (*Config) Handler

func (c *Config) Handler(handler string) *Config

Handler validates that the config's Handler property matches the provided handler value

func (*Config) KeyArn

func (c *Config) KeyArn(arn string) *Config

KeyArn validates that the config's KMSKeyArn property matches the provided arn value

func (*Config) Role

func (c *Config) Role(role string) *Config

Role validates that the config's Role property matches the provided role value

func (*Config) Runtime

func (c *Config) Runtime(runtime string) *Config

Runtime validates that the config's Runtime property matches the provided runtime value

func (*Config) Timeout

func (c *Config) Timeout(timeout int) *Config

Timeout validates that the config's Timeout property matches the provided timeout value

func (*Config) Validator

func (c *Config) Validator(validator Validator) *Config

Validator adds the custom Validator provided to the validation method chain

type Validator

type Validator func(*lambda.FunctionConfiguration) error

Validator is an interface for validating properties on a single *lambda.FunctionConfiguration

Jump to

Keyboard shortcuts

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