Documentation ¶
Index ¶
- type Config
- func (c *Config) Assert(t *testing.T, cfg *lambda.FunctionConfiguration) *Config
- func (c *Config) Env(key, value string) *Config
- func (c *Config) Get(t *testing.T) *lambda.FunctionConfiguration
- func (c *Config) Handler(handler string) *Config
- func (c *Config) KeyArn(arn string) *Config
- func (c *Config) Role(role string) *Config
- func (c *Config) Runtime(runtime string) *Config
- func (c *Config) Timeout(timeout int) *Config
- func (c *Config) Validator(validator Validator) *Config
- type Validator
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 ¶
Assert executes all Validators provided against the *lambda.FunctionConfiguration if cfg is nil, the *lambda.FunctionConfiguration with be queried from AWS
func (*Config) Env ¶
Env validates that the config contains an environment variable matching the provided key and value
func (*Config) Get ¶
func (c *Config) Get(t *testing.T) *lambda.FunctionConfiguration
Get returns the *lambda.FunctionConfiguration for the lambda
func (*Config) Handler ¶
Handler validates that the config's Handler property matches the provided handler value
func (*Config) KeyArn ¶
KeyArn validates that the config's KMSKeyArn property matches the provided arn value
func (*Config) Role ¶
Role validates that the config's Role property matches the provided role value
func (*Config) Runtime ¶
Runtime validates that the config's Runtime property matches the provided runtime value
type Validator ¶
type Validator func(*lambda.FunctionConfiguration) error
Validator is an interface for validating properties on a single *lambda.FunctionConfiguration