Skip to content

Instantly share code, notes, and snippets.

View kevprice83's full-sized avatar

Kevin kevprice83

  • Red Hat
  • Barcelona
View GitHub Profile
2017/02/01 16:46:44 [error] 27414#0: *5 lua entry thread aborted: runtime error: /Users/kevinprice/apicast/apicast/src/management.lua:40: attempt to index upvalue 'provider' (a userdata value)
stack traceback:
coroutine 0:
/Users/kevinprice/apicast/apicast/src/management.lua: in function 'f'
/usr/local/share/lua/5.1/router.lua:107: in function 'execute'
/Users/kevinprice/apicast/apicast/src/management.lua:110: in function 'call'
content_by_lua(management.conf:2):1: in function <content_by_lua(management.conf:2):1>, client: 127.0.0.1, server: _, request: "GET /config HTTP/1.1", host: "localhost:8090"
2017/02/01 16:33:28 [info] 27029#0: [lua] resolver.lua:81: init_nameservers(): adding 8.8.8.8:53 as default nameserver
2017/02/01 16:33:28 [info] 27029#0: [lua] resolver.lua:81: init_nameservers(): adding 192.168.1.1:53 as default nameserver
2017/02/01 16:33:28 [notice] 27029#0: using the "kqueue" event method
2017/02/01 16:33:28 [notice] 27029#0: openresty/1.11.2.1 (no pool)
2017/02/01 16:33:28 [notice] 27029#0: built by clang 8.0.0 (clang-800.0.42.1)
2017/02/01 16:33:28 [notice] 27029#0: OS: Darwin 16.3.0
2017/02/01 16:33:28 [notice] 27029#0: hw.ncpu: 4
2017/02/01 16:33:28 [notice] 27029#0: net.inet.tcp.sendspace: 131072
2017/02/01 16:33:28 [notice] 27029#0: kern.ipc.somaxconn: 128
2017/02/01 16:33:28 [notice] 27029#0: getrlimit(RLIMIT_NOFILE): 4864:9223372036854775807
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Applink API",
"description": "Submit a sample application to the Applink API"
},
"host": "ec2-50-16-88-196.compute-1.amazonaws.com:8080",
"basePath": "/DataGatewayService.svc",
"schemes": [
"parameters": [
{
"name": "user_key",
"in": "query",
"description": "API key",
"type":"string"
}
],
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1440787840000",
"Effect": "Allow",
"Action": [
"lambda:InvokeFunction"
],
"Resource": [
"x-amazon-apigateway-auth": {
"type": "none"
},
"x-amazon-apigateway-integration": {
"type": "AWS",
"uri": "arn:aws:apigateway:REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:REGION:ACCT_ID:function:FUNCTION_NAME/invocations",
"credentials": "arn:aws:iam::ACCT_ID:role/lambda_gateway_execution",
"httpMethod": "POST",
"requestTemplates": {
"application/json": "{\"user_key\":\"$input.params('user_key')\",\"resourcePath\": \"$context.resourcePath\",\"httpMethod\": \"$context.httpMethod\",\"body\": $input.json('$')}"
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Hello World API",
"description": "A simple Hello World API ",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Nicolas Grenié; [email protected]"
},
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "apigateway.amazonaws.com"
},
"Action": "sts:AssumeRole"
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"parameters": [
{
"name": "user_key",
"description": "Your access API Key",
"type": "string",
"in": "query",
"x-data-threescale-name": "user_keys",
// or "x-data-threescale-name": "app_ids" for authentication model App Id or OAuth
// and "x-data-threescale-name": "app_keys" for authentication mode APP Id
"required": true