Documentation
¶
Overview ¶
Package config contains the configuration structs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Function ¶
type Function struct {
// ARN of the function to be invoked.
ARN LambdaARN `json:"arn" yaml:"arn" validate:"required"`
// Routes to be added for that function.
Routes []Route `json:"routes" yaml:"routes" validate:"min=1,dive"`
}
Function providing the lambda function and routes.
type Route ¶
type Route struct {
// Name for the route (optional).
Name string `json:"name,omitempty" yaml:"name,omitempty"`
// Host for the route (optional)
Host string `json:"host,omitempty" yaml:"host,omitempty"`
// Methods for the route (optional)
Methods []string `json:"methods,omitempty" yaml:"methods,omitempty"`
// Path for the route (either that or PathPrefix).
Path string `json:"path,omitempty" yaml:"path,omitempty" validate:"required_without=PathPrefix"`
// PathPrefix for the route (either that or Path).
PathPrefix string `json:"pathPrefix,omitempty" yaml:"pathPrefix,omitempty" validate:"required_without=Path"`
// Headers for the route (optional).
Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty" validate:"dive,keys,required,endkeys"`
// HeadersRegexp for the route (optional).
HeadersRegexp map[string]string `json:"headersRegexp" yaml:"headersRegexp" validate:"dive,keys,required,endkeys,required"` //nolint:lll // tags.
}
Route configuration.
type Server ¶
type Server struct {
// EnableTraceparent injects traceparent.
EnableTraceparent bool `json:"enableTraceparent,omitempty" yaml:"enableTraceparent,omitempty"`
// Functions providing the Function.
Functions []Function `json:"functions" yaml:"functions" validate:"required,dive"`
}
Server for the handler.
Click to show internal directories.
Click to hide internal directories.