Skip to content

Commit

Permalink
style(aws-lambda) clean up schema
Browse files Browse the repository at this point in the history
This schema file has been changing often enough that cleaning it up
to reduce future diff load is worth the two minutes of mashing
tab-enter.
  • Loading branch information
p0pr0ck5 committed Aug 4, 2017
1 parent 9c76c45 commit 07bc71d
Showing 1 changed file with 73 additions and 18 deletions.
91 changes: 73 additions & 18 deletions kong/plugins/aws-lambda/schema.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,77 @@ end

return {
fields = {
timeout = {type = "number", default = 60000, required = true },
keepalive = {type = "number", default = 60000, required = true },
aws_key = {type = "string", required = true},
aws_secret = {type = "string", required = true},
aws_region = {type = "string", required = true, enum = {
"us-east-1", "us-east-2", "us-west-1", "us-west-2",
"ap-northeast-1", "ap-northeast-2", "ap-southeast-1",
"ap-southeast-2", "ap-south-1", "ca-central-1", "eu-central-1",
"eu-west-1", "eu-west-2", "sa-east-1"}},
function_name = {type="string", required = true},
qualifier = {type = "string"},
invocation_type = {type = "string", required = true, default = "RequestResponse",
enum = {"RequestResponse", "Event", "DryRun"}},
log_type = {type = "string", required = true, default = "Tail",
enum = {"Tail", "None"}},
port = { type = "number", default = 443 },
unhandled_status = { type = "number", func = check_status },
}
timeout = {
type = "number",
default = 60000,
required = true,
},
keepalive = {
type = "number",
default = 60000,
required = true,
},
aws_key = {
type = "string",
required = true,
},
aws_secret = {
type = "string",
required = true,
},
aws_region = {
type = "string",
required = true,
enum = {
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
"ap-northeast-1",
"ap-northeast-2",
"ap-southeast-1",
"ap-southeast-2",
"ap-south-1",
"ca-central-1",
"eu-central-1",
"eu-west-1",
"eu-west-2",
"sa-east-1",
},
},
function_name = {
type= "string",
required = true,
},
qualifier = {
type = "string",
},
invocation_type = {
type = "string",
required = true,
default = "RequestResponse",
enum = {
"RequestResponse",
"Event",
"DryRun",
}
},
log_type = {
type = "string",
required = true,
default = "Tail",
enum = {
"Tail",
"None",
}
},
port = {
type = "number",
default = 443,
},
unhandled_status = {
type = "number",
func = check_status,
},
},
}

0 comments on commit 07bc71d

Please sign in to comment.