This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 724a910 refactor: move proto file to separate repo (#4134)
724a910 is described below
commit 724a9100a9a43ac50f4c89dffd6d4a6e5edcff2b
Author: 罗泽轩 <[email protected]>
AuthorDate: Thu Apr 29 21:48:41 2021 +0800
refactor: move proto file to separate repo (#4134)
---
.luacheckrc | 1 -
Makefile | 11 --
apisix/plugins/ext-plugin/A6/DataEntry.lua | 67 ---------
apisix/plugins/ext-plugin/A6/Err/Code.lua | 27 ----
apisix/plugins/ext-plugin/A6/Err/Resp.lua | 51 -------
.../plugins/ext-plugin/A6/HTTPReqCall/Action.lua | 27 ----
apisix/plugins/ext-plugin/A6/HTTPReqCall/Req.lua | 151 ---------------------
apisix/plugins/ext-plugin/A6/HTTPReqCall/Resp.lua | 68 ----------
.../plugins/ext-plugin/A6/HTTPReqCall/Rewrite.lua | 90 ------------
apisix/plugins/ext-plugin/A6/HTTPReqCall/Stop.lua | 88 ------------
apisix/plugins/ext-plugin/A6/Method.lua | 39 ------
apisix/plugins/ext-plugin/A6/PrepareConf/Req.lua | 63 ---------
apisix/plugins/ext-plugin/A6/PrepareConf/Resp.lua | 51 -------
apisix/plugins/ext-plugin/A6/TextEntry.lua | 57 --------
apisix/plugins/ext-plugin/ext-plugin.fbs | 109 ---------------
rockspec/apisix-master-0.rockspec | 1 +
utils/check-lua-code-style.sh | 5 +-
17 files changed, 2 insertions(+), 904 deletions(-)
diff --git a/.luacheckrc b/.luacheckrc
index 05a4e22..f3dc124 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -4,5 +4,4 @@ redefined = false
max_line_length = 100
exclude_files = {
"apisix/cli/ngx_tpl.lua",
- "apisix/plugins/ext-plugin/A6",
}
diff --git a/Makefile b/Makefile
index bf02a01..02a7d37 100644
--- a/Makefile
+++ b/Makefile
@@ -200,17 +200,6 @@ install: default
$(INSTALL) -d $(INST_LUADIR)/apisix/plugins/ext-plugin
$(INSTALL) apisix/plugins/ext-plugin/*.lua
$(INST_LUADIR)/apisix/plugins/ext-plugin/
- $(INSTALL) -d $(INST_LUADIR)/apisix/plugins/ext-plugin/A6
- $(INSTALL) apisix/plugins/ext-plugin/A6/*.lua
$(INST_LUADIR)/apisix/plugins/ext-plugin/A6/
- $(INSTALL) -d $(INST_LUADIR)/apisix/plugins/ext-plugin/A6/Err
- $(INSTALL) apisix/plugins/ext-plugin/A6/Err/*.lua \
- $(INST_LUADIR)/apisix/plugins/ext-plugin/A6/Err/
- $(INSTALL) -d $(INST_LUADIR)/apisix/plugins/ext-plugin/A6/HTTPReqCall
- $(INSTALL) apisix/plugins/ext-plugin/A6/HTTPReqCall/*.lua \
- $(INST_LUADIR)/apisix/plugins/ext-plugin/A6/HTTPReqCall/
- $(INSTALL) -d $(INST_LUADIR)/apisix/plugins/ext-plugin/A6/PrepareConf
- $(INSTALL) apisix/plugins/ext-plugin/A6/PrepareConf/*.lua \
- $(INST_LUADIR)/apisix/plugins/ext-plugin/A6/PrepareConf/
$(INSTALL) -d $(INST_LUADIR)/apisix/plugins/grpc-transcode
$(INSTALL) apisix/plugins/grpc-transcode/*.lua
$(INST_LUADIR)/apisix/plugins/grpc-transcode/
diff --git a/apisix/plugins/ext-plugin/A6/DataEntry.lua
b/apisix/plugins/ext-plugin/A6/DataEntry.lua
deleted file mode 100644
index b07f88f..0000000
--- a/apisix/plugins/ext-plugin/A6/DataEntry.lua
+++ /dev/null
@@ -1,67 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: A6
-
-local flatbuffers = require('flatbuffers')
-
-local DataEntry = {} -- the module
-local DataEntry_mt = {} -- the class metatable
-
-function DataEntry.New()
- local o = {}
- setmetatable(o, {__index = DataEntry_mt})
- return o
-end
-function DataEntry.GetRootAsDataEntry(buf, offset)
- local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
- local o = DataEntry.New()
- o:Init(buf, n + offset)
- return o
-end
-function DataEntry_mt:Init(buf, pos)
- self.view = flatbuffers.view.New(buf, pos)
-end
-function DataEntry_mt:Name()
- local o = self.view:Offset(4)
- if o ~= 0 then
- return self.view:String(o + self.view.pos)
- end
-end
-function DataEntry_mt:Value(j)
- local o = self.view:Offset(6)
- if o ~= 0 then
- local a = self.view:Vector(o)
- return self.view:Get(flatbuffers.N.Uint8, a + ((j-1) * 1))
- end
- return 0
-end
-function DataEntry_mt:ValueLength()
- local o = self.view:Offset(6)
- if o ~= 0 then
- return self.view:VectorLen(o)
- end
- return 0
-end
-function DataEntry.Start(builder) builder:StartObject(2) end
-function DataEntry.AddName(builder, name)
builder:PrependUOffsetTRelativeSlot(0, name, 0) end
-function DataEntry.AddValue(builder, value)
builder:PrependUOffsetTRelativeSlot(1, value, 0) end
-function DataEntry.StartValueVector(builder, numElems) return
builder:StartVector(1, numElems, 1) end
-function DataEntry.End(builder) return builder:EndObject() end
-
-return DataEntry -- return the module
diff --git a/apisix/plugins/ext-plugin/A6/Err/Code.lua
b/apisix/plugins/ext-plugin/A6/Err/Code.lua
deleted file mode 100644
index 3b3b0b4..0000000
--- a/apisix/plugins/ext-plugin/A6/Err/Code.lua
+++ /dev/null
@@ -1,27 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: Err
-
-local Code = {
- BAD_REQUEST = 0,
- SERVICE_UNAVAILABLE = 1,
- CONF_TOKEN_NOT_FOUND = 2,
-}
-
-return Code -- return the module
diff --git a/apisix/plugins/ext-plugin/A6/Err/Resp.lua
b/apisix/plugins/ext-plugin/A6/Err/Resp.lua
deleted file mode 100644
index f433e25..0000000
--- a/apisix/plugins/ext-plugin/A6/Err/Resp.lua
+++ /dev/null
@@ -1,51 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: Err
-
-local flatbuffers = require('flatbuffers')
-
-local Resp = {} -- the module
-local Resp_mt = {} -- the class metatable
-
-function Resp.New()
- local o = {}
- setmetatable(o, {__index = Resp_mt})
- return o
-end
-function Resp.GetRootAsResp(buf, offset)
- local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
- local o = Resp.New()
- o:Init(buf, n + offset)
- return o
-end
-function Resp_mt:Init(buf, pos)
- self.view = flatbuffers.view.New(buf, pos)
-end
-function Resp_mt:Code()
- local o = self.view:Offset(4)
- if o ~= 0 then
- return self.view:Get(flatbuffers.N.Uint8, o + self.view.pos)
- end
- return 0
-end
-function Resp.Start(builder) builder:StartObject(1) end
-function Resp.AddCode(builder, code) builder:PrependUint8Slot(0, code, 0) end
-function Resp.End(builder) return builder:EndObject() end
-
-return Resp -- return the module
diff --git a/apisix/plugins/ext-plugin/A6/HTTPReqCall/Action.lua
b/apisix/plugins/ext-plugin/A6/HTTPReqCall/Action.lua
deleted file mode 100644
index 9166a05..0000000
--- a/apisix/plugins/ext-plugin/A6/HTTPReqCall/Action.lua
+++ /dev/null
@@ -1,27 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: HTTPReqCall
-
-local Action = {
- NONE = 0,
- Stop = 1,
- Rewrite = 2,
-}
-
-return Action -- return the module
diff --git a/apisix/plugins/ext-plugin/A6/HTTPReqCall/Req.lua
b/apisix/plugins/ext-plugin/A6/HTTPReqCall/Req.lua
deleted file mode 100644
index cf6fd15..0000000
--- a/apisix/plugins/ext-plugin/A6/HTTPReqCall/Req.lua
+++ /dev/null
@@ -1,151 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: HTTPReqCall
-
-local flatbuffers = require('flatbuffers')
-
-local Req = {} -- the module
-local Req_mt = {} -- the class metatable
-
-function Req.New()
- local o = {}
- setmetatable(o, {__index = Req_mt})
- return o
-end
-function Req.GetRootAsReq(buf, offset)
- local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
- local o = Req.New()
- o:Init(buf, n + offset)
- return o
-end
-function Req_mt:Init(buf, pos)
- self.view = flatbuffers.view.New(buf, pos)
-end
-function Req_mt:Id()
- local o = self.view:Offset(4)
- if o ~= 0 then
- return self.view:Get(flatbuffers.N.Uint32, o + self.view.pos)
- end
- return 0
-end
-function Req_mt:SrcIp(j)
- local o = self.view:Offset(6)
- if o ~= 0 then
- local a = self.view:Vector(o)
- return self.view:Get(flatbuffers.N.Uint8, a + ((j-1) * 1))
- end
- return 0
-end
-function Req_mt:SrcIpLength()
- local o = self.view:Offset(6)
- if o ~= 0 then
- return self.view:VectorLen(o)
- end
- return 0
-end
-function Req_mt:Method()
- local o = self.view:Offset(8)
- if o ~= 0 then
- return self.view:Get(flatbuffers.N.Uint8, o + self.view.pos)
- end
- return 0
-end
-function Req_mt:Path()
- local o = self.view:Offset(10)
- if o ~= 0 then
- return self.view:String(o + self.view.pos)
- end
-end
-function Req_mt:Args(j)
- local o = self.view:Offset(12)
- if o ~= 0 then
- local x = self.view:Vector(o)
- x = x + ((j-1) * 4)
- x = self.view:Indirect(x)
- local obj = require('A6.TextEntry').New()
- obj:Init(self.view.bytes, x)
- return obj
- end
-end
-function Req_mt:ArgsLength()
- local o = self.view:Offset(12)
- if o ~= 0 then
- return self.view:VectorLen(o)
- end
- return 0
-end
-function Req_mt:Headers(j)
- local o = self.view:Offset(14)
- if o ~= 0 then
- local x = self.view:Vector(o)
- x = x + ((j-1) * 4)
- x = self.view:Indirect(x)
- local obj = require('A6.TextEntry').New()
- obj:Init(self.view.bytes, x)
- return obj
- end
-end
-function Req_mt:HeadersLength()
- local o = self.view:Offset(14)
- if o ~= 0 then
- return self.view:VectorLen(o)
- end
- return 0
-end
-function Req_mt:ConfToken()
- local o = self.view:Offset(16)
- if o ~= 0 then
- return self.view:Get(flatbuffers.N.Uint32, o + self.view.pos)
- end
- return 0
-end
-function Req_mt:ExtraInfo(j)
- local o = self.view:Offset(18)
- if o ~= 0 then
- local x = self.view:Vector(o)
- x = x + ((j-1) * 4)
- x = self.view:Indirect(x)
- local obj = require('A6.DataEntry').New()
- obj:Init(self.view.bytes, x)
- return obj
- end
-end
-function Req_mt:ExtraInfoLength()
- local o = self.view:Offset(18)
- if o ~= 0 then
- return self.view:VectorLen(o)
- end
- return 0
-end
-function Req.Start(builder) builder:StartObject(8) end
-function Req.AddId(builder, id) builder:PrependUint32Slot(0, id, 0) end
-function Req.AddSrcIp(builder, srcIp) builder:PrependUOffsetTRelativeSlot(1,
srcIp, 0) end
-function Req.StartSrcIpVector(builder, numElems) return builder:StartVector(1,
numElems, 1) end
-function Req.AddMethod(builder, method) builder:PrependUint8Slot(2, method, 0)
end
-function Req.AddPath(builder, path) builder:PrependUOffsetTRelativeSlot(3,
path, 0) end
-function Req.AddArgs(builder, args) builder:PrependUOffsetTRelativeSlot(4,
args, 0) end
-function Req.StartArgsVector(builder, numElems) return builder:StartVector(4,
numElems, 4) end
-function Req.AddHeaders(builder, headers)
builder:PrependUOffsetTRelativeSlot(5, headers, 0) end
-function Req.StartHeadersVector(builder, numElems) return
builder:StartVector(4, numElems, 4) end
-function Req.AddConfToken(builder, confToken) builder:PrependUint32Slot(6,
confToken, 0) end
-function Req.AddExtraInfo(builder, extraInfo)
builder:PrependUOffsetTRelativeSlot(7, extraInfo, 0) end
-function Req.StartExtraInfoVector(builder, numElems) return
builder:StartVector(4, numElems, 4) end
-function Req.End(builder) return builder:EndObject() end
-
-return Req -- return the module
diff --git a/apisix/plugins/ext-plugin/A6/HTTPReqCall/Resp.lua
b/apisix/plugins/ext-plugin/A6/HTTPReqCall/Resp.lua
deleted file mode 100644
index df4f52e..0000000
--- a/apisix/plugins/ext-plugin/A6/HTTPReqCall/Resp.lua
+++ /dev/null
@@ -1,68 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: HTTPReqCall
-
-local flatbuffers = require('flatbuffers')
-
-local Resp = {} -- the module
-local Resp_mt = {} -- the class metatable
-
-function Resp.New()
- local o = {}
- setmetatable(o, {__index = Resp_mt})
- return o
-end
-function Resp.GetRootAsResp(buf, offset)
- local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
- local o = Resp.New()
- o:Init(buf, n + offset)
- return o
-end
-function Resp_mt:Init(buf, pos)
- self.view = flatbuffers.view.New(buf, pos)
-end
-function Resp_mt:Id()
- local o = self.view:Offset(4)
- if o ~= 0 then
- return self.view:Get(flatbuffers.N.Uint32, o + self.view.pos)
- end
- return 0
-end
-function Resp_mt:ActionType()
- local o = self.view:Offset(6)
- if o ~= 0 then
- return self.view:Get(flatbuffers.N.Uint8, o + self.view.pos)
- end
- return 0
-end
-function Resp_mt:Action()
- local o = self.view:Offset(8)
- if o ~= 0 then
- local obj =
flatbuffers.view.New(require('flatbuffers.binaryarray').New(0), 0)
- self.view:Union(obj, o)
- return obj
- end
-end
-function Resp.Start(builder) builder:StartObject(3) end
-function Resp.AddId(builder, id) builder:PrependUint32Slot(0, id, 0) end
-function Resp.AddActionType(builder, actionType) builder:PrependUint8Slot(1,
actionType, 0) end
-function Resp.AddAction(builder, action)
builder:PrependUOffsetTRelativeSlot(2, action, 0) end
-function Resp.End(builder) return builder:EndObject() end
-
-return Resp -- return the module
diff --git a/apisix/plugins/ext-plugin/A6/HTTPReqCall/Rewrite.lua
b/apisix/plugins/ext-plugin/A6/HTTPReqCall/Rewrite.lua
deleted file mode 100644
index ca8058b..0000000
--- a/apisix/plugins/ext-plugin/A6/HTTPReqCall/Rewrite.lua
+++ /dev/null
@@ -1,90 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: HTTPReqCall
-
-local flatbuffers = require('flatbuffers')
-
-local Rewrite = {} -- the module
-local Rewrite_mt = {} -- the class metatable
-
-function Rewrite.New()
- local o = {}
- setmetatable(o, {__index = Rewrite_mt})
- return o
-end
-function Rewrite.GetRootAsRewrite(buf, offset)
- local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
- local o = Rewrite.New()
- o:Init(buf, n + offset)
- return o
-end
-function Rewrite_mt:Init(buf, pos)
- self.view = flatbuffers.view.New(buf, pos)
-end
-function Rewrite_mt:Path()
- local o = self.view:Offset(4)
- if o ~= 0 then
- return self.view:String(o + self.view.pos)
- end
-end
-function Rewrite_mt:Headers(j)
- local o = self.view:Offset(6)
- if o ~= 0 then
- local x = self.view:Vector(o)
- x = x + ((j-1) * 4)
- x = self.view:Indirect(x)
- local obj = require('A6.TextEntry').New()
- obj:Init(self.view.bytes, x)
- return obj
- end
-end
-function Rewrite_mt:HeadersLength()
- local o = self.view:Offset(6)
- if o ~= 0 then
- return self.view:VectorLen(o)
- end
- return 0
-end
-function Rewrite_mt:Args(j)
- local o = self.view:Offset(8)
- if o ~= 0 then
- local x = self.view:Vector(o)
- x = x + ((j-1) * 4)
- x = self.view:Indirect(x)
- local obj = require('A6.TextEntry').New()
- obj:Init(self.view.bytes, x)
- return obj
- end
-end
-function Rewrite_mt:ArgsLength()
- local o = self.view:Offset(8)
- if o ~= 0 then
- return self.view:VectorLen(o)
- end
- return 0
-end
-function Rewrite.Start(builder) builder:StartObject(3) end
-function Rewrite.AddPath(builder, path) builder:PrependUOffsetTRelativeSlot(0,
path, 0) end
-function Rewrite.AddHeaders(builder, headers)
builder:PrependUOffsetTRelativeSlot(1, headers, 0) end
-function Rewrite.StartHeadersVector(builder, numElems) return
builder:StartVector(4, numElems, 4) end
-function Rewrite.AddArgs(builder, args) builder:PrependUOffsetTRelativeSlot(2,
args, 0) end
-function Rewrite.StartArgsVector(builder, numElems) return
builder:StartVector(4, numElems, 4) end
-function Rewrite.End(builder) return builder:EndObject() end
-
-return Rewrite -- return the module
diff --git a/apisix/plugins/ext-plugin/A6/HTTPReqCall/Stop.lua
b/apisix/plugins/ext-plugin/A6/HTTPReqCall/Stop.lua
deleted file mode 100644
index 0d41471..0000000
--- a/apisix/plugins/ext-plugin/A6/HTTPReqCall/Stop.lua
+++ /dev/null
@@ -1,88 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: HTTPReqCall
-
-local flatbuffers = require('flatbuffers')
-
-local Stop = {} -- the module
-local Stop_mt = {} -- the class metatable
-
-function Stop.New()
- local o = {}
- setmetatable(o, {__index = Stop_mt})
- return o
-end
-function Stop.GetRootAsStop(buf, offset)
- local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
- local o = Stop.New()
- o:Init(buf, n + offset)
- return o
-end
-function Stop_mt:Init(buf, pos)
- self.view = flatbuffers.view.New(buf, pos)
-end
-function Stop_mt:Status()
- local o = self.view:Offset(4)
- if o ~= 0 then
- return self.view:Get(flatbuffers.N.Uint16, o + self.view.pos)
- end
- return 0
-end
-function Stop_mt:Headers(j)
- local o = self.view:Offset(6)
- if o ~= 0 then
- local x = self.view:Vector(o)
- x = x + ((j-1) * 4)
- x = self.view:Indirect(x)
- local obj = require('A6.TextEntry').New()
- obj:Init(self.view.bytes, x)
- return obj
- end
-end
-function Stop_mt:HeadersLength()
- local o = self.view:Offset(6)
- if o ~= 0 then
- return self.view:VectorLen(o)
- end
- return 0
-end
-function Stop_mt:Body(j)
- local o = self.view:Offset(8)
- if o ~= 0 then
- local a = self.view:Vector(o)
- return self.view:Get(flatbuffers.N.Uint8, a + ((j-1) * 1))
- end
- return 0
-end
-function Stop_mt:BodyLength()
- local o = self.view:Offset(8)
- if o ~= 0 then
- return self.view:VectorLen(o)
- end
- return 0
-end
-function Stop.Start(builder) builder:StartObject(3) end
-function Stop.AddStatus(builder, status) builder:PrependUint16Slot(0, status,
0) end
-function Stop.AddHeaders(builder, headers)
builder:PrependUOffsetTRelativeSlot(1, headers, 0) end
-function Stop.StartHeadersVector(builder, numElems) return
builder:StartVector(4, numElems, 4) end
-function Stop.AddBody(builder, body) builder:PrependUOffsetTRelativeSlot(2,
body, 0) end
-function Stop.StartBodyVector(builder, numElems) return builder:StartVector(1,
numElems, 1) end
-function Stop.End(builder) return builder:EndObject() end
-
-return Stop -- return the module
diff --git a/apisix/plugins/ext-plugin/A6/Method.lua
b/apisix/plugins/ext-plugin/A6/Method.lua
deleted file mode 100644
index 016d128..0000000
--- a/apisix/plugins/ext-plugin/A6/Method.lua
+++ /dev/null
@@ -1,39 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: A6
-
-local Method = {
- GET = 0,
- HEAD = 1,
- POST = 2,
- PUT = 3,
- DELETE = 4,
- MKCOL = 5,
- COPY = 6,
- MOVE = 7,
- OPTIONS = 8,
- PROPFIND = 9,
- PROPPATCH = 10,
- LOCK = 11,
- UNLOCK = 12,
- PATCH = 13,
- TRACE = 14,
-}
-
-return Method -- return the module
diff --git a/apisix/plugins/ext-plugin/A6/PrepareConf/Req.lua
b/apisix/plugins/ext-plugin/A6/PrepareConf/Req.lua
deleted file mode 100644
index 2006249..0000000
--- a/apisix/plugins/ext-plugin/A6/PrepareConf/Req.lua
+++ /dev/null
@@ -1,63 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: PrepareConf
-
-local flatbuffers = require('flatbuffers')
-
-local Req = {} -- the module
-local Req_mt = {} -- the class metatable
-
-function Req.New()
- local o = {}
- setmetatable(o, {__index = Req_mt})
- return o
-end
-function Req.GetRootAsReq(buf, offset)
- local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
- local o = Req.New()
- o:Init(buf, n + offset)
- return o
-end
-function Req_mt:Init(buf, pos)
- self.view = flatbuffers.view.New(buf, pos)
-end
-function Req_mt:Conf(j)
- local o = self.view:Offset(4)
- if o ~= 0 then
- local x = self.view:Vector(o)
- x = x + ((j-1) * 4)
- x = self.view:Indirect(x)
- local obj = require('A6.TextEntry').New()
- obj:Init(self.view.bytes, x)
- return obj
- end
-end
-function Req_mt:ConfLength()
- local o = self.view:Offset(4)
- if o ~= 0 then
- return self.view:VectorLen(o)
- end
- return 0
-end
-function Req.Start(builder) builder:StartObject(1) end
-function Req.AddConf(builder, conf) builder:PrependUOffsetTRelativeSlot(0,
conf, 0) end
-function Req.StartConfVector(builder, numElems) return builder:StartVector(4,
numElems, 4) end
-function Req.End(builder) return builder:EndObject() end
-
-return Req -- return the module
diff --git a/apisix/plugins/ext-plugin/A6/PrepareConf/Resp.lua
b/apisix/plugins/ext-plugin/A6/PrepareConf/Resp.lua
deleted file mode 100644
index 6fb9780..0000000
--- a/apisix/plugins/ext-plugin/A6/PrepareConf/Resp.lua
+++ /dev/null
@@ -1,51 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: PrepareConf
-
-local flatbuffers = require('flatbuffers')
-
-local Resp = {} -- the module
-local Resp_mt = {} -- the class metatable
-
-function Resp.New()
- local o = {}
- setmetatable(o, {__index = Resp_mt})
- return o
-end
-function Resp.GetRootAsResp(buf, offset)
- local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
- local o = Resp.New()
- o:Init(buf, n + offset)
- return o
-end
-function Resp_mt:Init(buf, pos)
- self.view = flatbuffers.view.New(buf, pos)
-end
-function Resp_mt:ConfToken()
- local o = self.view:Offset(4)
- if o ~= 0 then
- return self.view:Get(flatbuffers.N.Uint32, o + self.view.pos)
- end
- return 0
-end
-function Resp.Start(builder) builder:StartObject(1) end
-function Resp.AddConfToken(builder, confToken) builder:PrependUint32Slot(0,
confToken, 0) end
-function Resp.End(builder) return builder:EndObject() end
-
-return Resp -- return the module
diff --git a/apisix/plugins/ext-plugin/A6/TextEntry.lua
b/apisix/plugins/ext-plugin/A6/TextEntry.lua
deleted file mode 100644
index 0e20074..0000000
--- a/apisix/plugins/ext-plugin/A6/TextEntry.lua
+++ /dev/null
@@ -1,57 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements. See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- automatically generated by the FlatBuffers compiler, do not modify
-
--- namespace: A6
-
-local flatbuffers = require('flatbuffers')
-
-local TextEntry = {} -- the module
-local TextEntry_mt = {} -- the class metatable
-
-function TextEntry.New()
- local o = {}
- setmetatable(o, {__index = TextEntry_mt})
- return o
-end
-function TextEntry.GetRootAsTextEntry(buf, offset)
- local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
- local o = TextEntry.New()
- o:Init(buf, n + offset)
- return o
-end
-function TextEntry_mt:Init(buf, pos)
- self.view = flatbuffers.view.New(buf, pos)
-end
-function TextEntry_mt:Name()
- local o = self.view:Offset(4)
- if o ~= 0 then
- return self.view:String(o + self.view.pos)
- end
-end
-function TextEntry_mt:Value()
- local o = self.view:Offset(6)
- if o ~= 0 then
- return self.view:String(o + self.view.pos)
- end
-end
-function TextEntry.Start(builder) builder:StartObject(2) end
-function TextEntry.AddName(builder, name)
builder:PrependUOffsetTRelativeSlot(0, name, 0) end
-function TextEntry.AddValue(builder, value)
builder:PrependUOffsetTRelativeSlot(1, value, 0) end
-function TextEntry.End(builder) return builder:EndObject() end
-
-return TextEntry -- return the module
diff --git a/apisix/plugins/ext-plugin/ext-plugin.fbs
b/apisix/plugins/ext-plugin/ext-plugin.fbs
deleted file mode 100644
index 05db413..0000000
--- a/apisix/plugins/ext-plugin/ext-plugin.fbs
+++ /dev/null
@@ -1,109 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-namespace A6;
-
-table TextEntry {
- name:string;
- value:string;
-}
-
-table DataEntry {
- name:string;
- value:[ubyte];
-}
-
-enum Method:ubyte {
- GET,
- HEAD,
- POST,
- PUT,
- DELETE,
- MKCOL,
- COPY,
- MOVE,
- OPTIONS,
- PROPFIND,
- PROPPATCH,
- LOCK,
- UNLOCK,
- PATCH,
- TRACE,
-}
-
-namespace A6.Err;
-
-enum Code:ubyte {
- BAD_REQUEST,
- SERVICE_UNAVAILABLE,
- CONF_TOKEN_NOT_FOUND,
-}
-
-table Resp {
- code:Code;
-}
-
-namespace A6.PrepareConf;
-
-table Req {
- conf:[TextEntry];
-}
-
-table Resp {
- conf_token:uint32;
-}
-
-namespace A6.HTTPReqCall;
-
-table Req {
- id:uint32;
-
- src_ip:[ubyte];
-
- method:Method;
-
- path:string;
- args:[TextEntry];
- headers:[TextEntry];
-
- conf_token:uint32;
-
- extra_info:[DataEntry];
-}
-
-table Stop {
- status:uint16;
- headers:[TextEntry];
- body:[ubyte];
-}
-table Rewrite {
- path:string;
- headers:[TextEntry];
- // Note that args are modified in full.
- // Either empty, meaning no args need to be moved
- // or the entire modified args, not the incrementally changed parts
- args:[TextEntry];
-}
-
-union Action {
- Stop,
- Rewrite,
-}
-
-table Resp {
- id:uint32;
- action:Action;
-}
diff --git a/rockspec/apisix-master-0.rockspec
b/rockspec/apisix-master-0.rockspec
index b44169f..8c536e3 100644
--- a/rockspec/apisix-master-0.rockspec
+++ b/rockspec/apisix-master-0.rockspec
@@ -66,6 +66,7 @@ dependencies = {
"luasec = 0.9-1",
"lua-resty-consul = 0.3-2",
"penlight = 1.9.2-1",
+ "ext-plugin-proto = 0.1.0",
}
build = {
diff --git a/utils/check-lua-code-style.sh b/utils/check-lua-code-style.sh
index 00f5ddb..59fe473 100755
--- a/utils/check-lua-code-style.sh
+++ b/utils/check-lua-code-style.sh
@@ -21,10 +21,7 @@ set -ex
luacheck -q apisix t/lib
-find apisix -name '*.lua' \
- ! -wholename 'apisix/cli/ngx_tpl.lua' \
- ! -wholename 'apisix/plugins/ext-plugin/A6/*.lua' \
- -exec ./utils/lj-releng {} + > \
+find apisix -name '*.lua' ! -wholename 'apisix/cli/ngx_tpl.lua' -exec
./utils/lj-releng {} + > \
/tmp/check.log 2>&1 || (cat /tmp/check.log && exit 1)
grep -E "ERROR.*.lua:" /tmp/check.log > /tmp/error.log || true