-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aff24eb
commit df70338
Showing
10 changed files
with
71 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
return { | ||
{ | ||
name = "2016-04-15_galileo-import-mashape-analytics", | ||
up = function(_, _, dao) | ||
local rows, err = dao.plugins:find_all {name = "mashape-analytics"} | ||
if err then return err end | ||
|
||
for i = 1, #rows do | ||
local analytics = rows[i] | ||
local _, err = dao.plugins:insert { | ||
name = "galileo", | ||
api_id = analytics.api_id, | ||
enabled = analytics.enabled, | ||
config = { | ||
service_token = analytics.config.service_token, | ||
environment = analytics.config.environment, | ||
host = analytics.config.host, | ||
port = analytics.config.port, | ||
log_bodies = analytics.config.log_body, | ||
queue_size = analytics.config.batch_size, | ||
flush_timeout = analytics.config.delay | ||
} | ||
} | ||
if err then return err end | ||
|
||
_, err = dao.plugins:delete(analytics) | ||
if err then return err end | ||
end | ||
end | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
return { | ||
{ | ||
name = "2016-04-15_galileo-import-mashape-analytics", | ||
up = function(_, _, dao) | ||
local rows, err = dao.plugins:find_all {name = "mashape-analytics"} | ||
if err then return err end | ||
|
||
for i = 1, #rows do | ||
local analytics = rows[i] | ||
local _, err = dao.plugins:insert { | ||
name = "galileo", | ||
api_id = analytics.api_id, | ||
enabled = analytics.enabled, | ||
config = { | ||
service_token = analytics.config.service_token, | ||
environment = analytics.config.environment, | ||
host = analytics.config.host, | ||
port = analytics.config.port, | ||
log_bodies = analytics.config.log_body, | ||
queue_size = analytics.config.batch_size, | ||
flush_timeout = analytics.config.delay | ||
} | ||
} | ||
if err then return err end | ||
|
||
_, err = dao.plugins:delete(analytics) | ||
if err then return err end | ||
end | ||
end | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
kong/plugins/mashape-analytics/schema.lua → kong/plugins/galileo/schema.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.