├── .github └── workflows │ └── release.yml ├── .gitignore ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ └── maven-wrapper.properties ├── LICENSE ├── Makefile ├── README.md ├── ext-plugin.fbs ├── go.mod ├── go └── A6 │ ├── DataEntry.go │ ├── Err │ ├── Code.go │ └── Resp.go │ ├── ExtraInfo │ ├── Info.go │ ├── Req.go │ ├── ReqBody.go │ ├── Resp.go │ ├── RespBody.go │ └── Var.go │ ├── HTTPReqCall │ ├── Action.go │ ├── Req.go │ ├── Resp.go │ ├── Rewrite.go │ └── Stop.go │ ├── HTTPRespCall │ ├── Req.go │ └── Resp.go │ ├── Method.go │ ├── PrepareConf │ ├── Req.go │ └── Resp.go │ └── TextEntry.go ├── java └── io │ └── github │ └── api7 │ └── A6 │ ├── DataEntry.java │ ├── Err │ ├── Code.java │ └── Resp.java │ ├── ExtraInfo │ ├── Info.java │ ├── Req.java │ ├── ReqBody.java │ ├── Resp.java │ ├── RespBody.java │ └── Var.java │ ├── HTTPReqCall │ ├── Action.java │ ├── Req.java │ ├── Resp.java │ ├── Rewrite.java │ └── Stop.java │ ├── HTTPRespCall │ ├── Req.java │ └── Resp.java │ ├── Method.java │ ├── PrepareConf │ ├── Req.java │ └── Resp.java │ └── TextEntry.java ├── lua ├── A6 │ ├── DataEntry.lua │ ├── Err │ │ ├── Code.lua │ │ └── Resp.lua │ ├── ExtraInfo │ │ ├── Info.lua │ │ ├── Req.lua │ │ ├── ReqBody.lua │ │ ├── Resp.lua │ │ ├── RespBody.lua │ │ └── Var.lua │ ├── HTTPReqCall │ │ ├── Action.lua │ │ ├── Req.lua │ │ ├── Resp.lua │ │ ├── Rewrite.lua │ │ └── Stop.lua │ ├── HTTPRespCall │ │ ├── Req.lua │ │ └── Resp.lua │ ├── Method.lua │ ├── PrepareConf │ │ ├── Req.lua │ │ └── Resp.lua │ └── TextEntry.lua ├── flatbuffers.lua └── flatbuffers │ ├── binaryarray.lua │ ├── builder.lua │ ├── compat.lua │ ├── compat_5_1.lua │ ├── compat_5_3.lua │ ├── compat_luajit.lua │ ├── numTypes.lua │ └── view.lua ├── mvnw ├── mvnw.cmd ├── pom.xml ├── python ├── A6 │ ├── DataEntry.py │ ├── Err │ │ ├── Code.py │ │ ├── Resp.py │ │ └── __init__.py │ ├── ExtraInfo │ │ ├── Info.py │ │ ├── Req.py │ │ ├── ReqBody.py │ │ ├── Resp.py │ │ ├── RespBody.py │ │ ├── Var.py │ │ └── __init__.py │ ├── HTTPReqCall │ │ ├── Action.py │ │ ├── Req.py │ │ ├── Resp.py │ │ ├── Rewrite.py │ │ ├── Stop.py │ │ └── __init__.py │ ├── HTTPRespCall │ │ ├── Req.py │ │ ├── Resp.py │ │ └── __init__.py │ ├── Method.py │ ├── PrepareConf │ │ ├── Req.py │ │ ├── Resp.py │ │ └── __init__.py │ ├── TextEntry.py │ └── __init__.py └── setup.py ├── rockspec ├── ext-plugin-proto-0.1.0-0.rockspec ├── ext-plugin-proto-0.1.1-0.rockspec ├── ext-plugin-proto-0.2.0-0.rockspec ├── ext-plugin-proto-0.2.1-0.rockspec ├── ext-plugin-proto-0.3.0-0.rockspec ├── ext-plugin-proto-0.4.0-0.rockspec ├── ext-plugin-proto-0.5.0-0.rockspec ├── ext-plugin-proto-0.6.0-0.rockspec ├── ext-plugin-proto-0.6.1-0.rockspec └── ext-plugin-proto-main-0.0-0.rockspec └── typescript ├── a6 ├── data-entry.ts ├── err │ ├── code.ts │ └── resp.ts ├── extra-info │ ├── info.ts │ ├── req-body.ts │ ├── req.ts │ ├── resp-body.ts │ ├── resp.ts │ └── var.ts ├── h-t-t-p-req-call │ ├── action.ts │ ├── req.ts │ ├── resp.ts │ ├── rewrite.ts │ └── stop.ts ├── h-t-t-p-resp-call │ ├── req.ts │ └── resp.ts ├── method.ts ├── prepare-conf │ ├── req.ts │ └── resp.ts └── text-entry.ts └── ext-plugin.ts /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - "main" 7 | paths: 8 | - 'rockspec/**' 9 | 10 | jobs: 11 | release: 12 | name: Release 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout code 16 | uses: actions/checkout@v2 17 | 18 | - name: Install Lua 19 | uses: leafo/gh-actions-lua@v8 20 | 21 | - name: Install Luarocks 22 | uses: leafo/gh-actions-luarocks@v4 23 | 24 | - name: Extract release name 25 | id: release_env 26 | shell: bash 27 | run: | 28 | title="${{ github.event.head_commit.message }}" 29 | re="^feat: release v*(\S+)" 30 | if [[ $title =~ $re ]]; then 31 | v=v${BASH_REMATCH[1]} 32 | echo "##[set-output name=version;]${v}" 33 | echo "##[set-output name=version_withou_v;]${BASH_REMATCH[1]}" 34 | else 35 | echo "commit format is not correct" 36 | exit 1 37 | fi 38 | 39 | - name: Create Release 40 | uses: actions/create-release@v1 41 | env: 42 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 43 | with: 44 | tag_name: ${{ steps.release_env.outputs.version }} 45 | release_name: ${{ steps.release_env.outputs.version }} 46 | draft: false 47 | prerelease: false 48 | 49 | - name: Upload to luarocks 50 | env: 51 | LUAROCKS_TOKEN: ${{ secrets.LUAROCKS_TOKEN }} 52 | run: | 53 | luarocks install dkjson 54 | luarocks upload rockspec/ext-plugin-proto-${{ steps.release_env.outputs.version_withou_v }}-0.rockspec --api-key=${LUAROCKS_TOKEN} 55 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: lua 2 | lua: 3 | flatc --lua ext-plugin.fbs 4 | rm -rf lua/A6 5 | mv A6/ lua/ 6 | 7 | .PHONY: java 8 | java: 9 | flatc --java ext-plugin.fbs 10 | rm -rf java/io.github.api7.A6 11 | mv A6/ java/io.github.api7.A6/ 12 | find . -name "*.java" | xargs sed -i 's/A6/io.github.api7.A6/g' 13 | 14 | .PHONY: go 15 | go: 16 | flatc --go ext-plugin.fbs 17 | rm -rf go/A6 18 | mv A6/ go/ 19 | find . -name "*.go" | xargs sed -i 's|"A6"|"github.com/api7/ext-plugin-proto/go/A6"|g' 20 | 21 | .PHONY: python 22 | python: 23 | flatc --python ext-plugin.fbs 24 | rm -rf python/A6 25 | mv A6/ python/ 26 | 27 | .PHONY: python-release 28 | python-release: 29 | cd python && \ 30 | python setup.py sdist && \ 31 | python setup.py sdist upload && \ 32 | rm -rf a6pluginprotos* dist 33 | 34 | .PHONY: typescript 35 | typescript: 36 | flatc --ts ext-plugin.fbs 37 | rm -rf typescript/a6/ 38 | mv a6/ typescript/ 39 | 40 | .PHONY: compiled 41 | compiled: lua java go python typescript 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Commands 2 | 3 | ``` 4 | make compiled 5 | ``` 6 | 7 | Compile to generated files. 8 | 9 | ## Requirement 10 | 11 | The repository code is auto generated using the `FlatBuffers` compiler, require to use `flatc 2.0.0` to generate the code. 12 | 13 | For more information, please refer to: https://github.com/google/flatbuffers 14 | -------------------------------------------------------------------------------- /ext-plugin.fbs: -------------------------------------------------------------------------------- 1 | // 2 | // Licensed to the Apache Software Foundation (ASF) under one or more 3 | // contributor license agreements. See the NOTICE file distributed with 4 | // this work for additional information regarding copyright ownership. 5 | // The ASF licenses this file to You under the Apache License, Version 2.0 6 | // (the "License"); you may not use this file except in compliance with 7 | // the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | namespace A6; 18 | 19 | table TextEntry { 20 | name:string; 21 | value:string; 22 | } 23 | 24 | table DataEntry { 25 | name:string; 26 | value:[ubyte]; 27 | } 28 | 29 | enum Method:ubyte { 30 | GET, 31 | HEAD, 32 | POST, 33 | PUT, 34 | DELETE, 35 | MKCOL, 36 | COPY, 37 | MOVE, 38 | OPTIONS, 39 | PROPFIND, 40 | PROPPATCH, 41 | LOCK, 42 | UNLOCK, 43 | PATCH, 44 | TRACE, 45 | } 46 | 47 | namespace A6.Err; 48 | 49 | enum Code:ubyte { 50 | BAD_REQUEST, 51 | SERVICE_UNAVAILABLE, 52 | CONF_TOKEN_NOT_FOUND, 53 | } 54 | 55 | table Resp { 56 | code:Code; 57 | } 58 | 59 | namespace A6.PrepareConf; 60 | 61 | table Req { 62 | // The configuration for each plugins run in the runner 63 | // The name is the plugin name while the value is the JSON encoded plugin configuration, 64 | // like: 65 | // {name: "echo", value: '{"body":"blah","headers":[]}'} 66 | // The order of plugin execution is the same as the order of plugin name in this array. 67 | conf:[TextEntry]; 68 | // the idempotent key 69 | key:string; 70 | } 71 | 72 | table Resp { 73 | conf_token:uint32; 74 | } 75 | 76 | namespace A6.HTTPReqCall; 77 | 78 | table Req { 79 | // The id is for debug. It will be recycled when the number is exhausted 80 | id:uint32; 81 | 82 | src_ip:[ubyte]; 83 | 84 | method:Method; 85 | 86 | path:string; 87 | args:[TextEntry]; 88 | headers:[TextEntry]; 89 | 90 | conf_token:uint32; 91 | } 92 | 93 | table Stop { 94 | status:uint16; 95 | headers:[TextEntry]; 96 | body:[ubyte]; 97 | } 98 | table Rewrite { 99 | path:string; 100 | // To delete a request header, use a TextEntry without Value 101 | // To change the upstream host, use a TextEntry with Name equals to `host` 102 | headers:[TextEntry]; 103 | // To delete an argument, use a TextEntry without Value 104 | args:[TextEntry]; 105 | // To change the upstream response header 106 | resp_headers:[TextEntry]; 107 | // To change the request body 108 | body:[ubyte]; 109 | } 110 | 111 | union Action { 112 | Stop, 113 | Rewrite, 114 | } 115 | 116 | table Resp { 117 | id:uint32; 118 | action:Action; 119 | } 120 | 121 | namespace A6.ExtraInfo; 122 | 123 | table Var { 124 | name:string; 125 | } 126 | 127 | table ReqBody { 128 | } 129 | 130 | table RespBody { 131 | } 132 | 133 | union Info { 134 | // Get the `ngx.var.name` 135 | Var, 136 | // Get the request body 137 | ReqBody, 138 | // Get the response body 139 | RespBody, 140 | } 141 | 142 | table Req { 143 | info:Info; 144 | } 145 | 146 | table Resp { 147 | result:[ubyte]; 148 | } 149 | 150 | namespace A6.HTTPRespCall; 151 | 152 | table Req { 153 | id:uint32; 154 | status:uint16; 155 | headers:[TextEntry]; 156 | conf_token:uint32; 157 | } 158 | 159 | table Resp { 160 | id:uint32; 161 | status:uint16; 162 | headers:[TextEntry]; 163 | body:[ubyte]; 164 | } -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/api7/ext-plugin-proto 2 | 3 | go 1.15 4 | -------------------------------------------------------------------------------- /go/A6/DataEntry.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package A6 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type DataEntry struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsDataEntry(buf []byte, offset flatbuffers.UOffsetT) *DataEntry { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &DataEntry{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func GetSizePrefixedRootAsDataEntry(buf []byte, offset flatbuffers.UOffsetT) *DataEntry { 21 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 22 | x := &DataEntry{} 23 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 24 | return x 25 | } 26 | 27 | func (rcv *DataEntry) Init(buf []byte, i flatbuffers.UOffsetT) { 28 | rcv._tab.Bytes = buf 29 | rcv._tab.Pos = i 30 | } 31 | 32 | func (rcv *DataEntry) Table() flatbuffers.Table { 33 | return rcv._tab 34 | } 35 | 36 | func (rcv *DataEntry) Name() []byte { 37 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 38 | if o != 0 { 39 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 40 | } 41 | return nil 42 | } 43 | 44 | func (rcv *DataEntry) Value(j int) byte { 45 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 46 | if o != 0 { 47 | a := rcv._tab.Vector(o) 48 | return rcv._tab.GetByte(a + flatbuffers.UOffsetT(j*1)) 49 | } 50 | return 0 51 | } 52 | 53 | func (rcv *DataEntry) ValueLength() int { 54 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 55 | if o != 0 { 56 | return rcv._tab.VectorLen(o) 57 | } 58 | return 0 59 | } 60 | 61 | func (rcv *DataEntry) ValueBytes() []byte { 62 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 63 | if o != 0 { 64 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 65 | } 66 | return nil 67 | } 68 | 69 | func (rcv *DataEntry) MutateValue(j int, n byte) bool { 70 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 71 | if o != 0 { 72 | a := rcv._tab.Vector(o) 73 | return rcv._tab.MutateByte(a+flatbuffers.UOffsetT(j*1), n) 74 | } 75 | return false 76 | } 77 | 78 | func DataEntryStart(builder *flatbuffers.Builder) { 79 | builder.StartObject(2) 80 | } 81 | func DataEntryAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) { 82 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0) 83 | } 84 | func DataEntryAddValue(builder *flatbuffers.Builder, value flatbuffers.UOffsetT) { 85 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(value), 0) 86 | } 87 | func DataEntryStartValueVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 88 | return builder.StartVector(1, numElems, 1) 89 | } 90 | func DataEntryEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 91 | return builder.EndObject() 92 | } 93 | -------------------------------------------------------------------------------- /go/A6/Err/Code.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package Err 4 | 5 | import "strconv" 6 | 7 | type Code byte 8 | 9 | const ( 10 | CodeBAD_REQUEST Code = 0 11 | CodeSERVICE_UNAVAILABLE Code = 1 12 | CodeCONF_TOKEN_NOT_FOUND Code = 2 13 | ) 14 | 15 | var EnumNamesCode = map[Code]string{ 16 | CodeBAD_REQUEST: "BAD_REQUEST", 17 | CodeSERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE", 18 | CodeCONF_TOKEN_NOT_FOUND: "CONF_TOKEN_NOT_FOUND", 19 | } 20 | 21 | var EnumValuesCode = map[string]Code{ 22 | "BAD_REQUEST": CodeBAD_REQUEST, 23 | "SERVICE_UNAVAILABLE": CodeSERVICE_UNAVAILABLE, 24 | "CONF_TOKEN_NOT_FOUND": CodeCONF_TOKEN_NOT_FOUND, 25 | } 26 | 27 | func (v Code) String() string { 28 | if s, ok := EnumNamesCode[v]; ok { 29 | return s 30 | } 31 | return "Code(" + strconv.FormatInt(int64(v), 10) + ")" 32 | } 33 | -------------------------------------------------------------------------------- /go/A6/Err/Resp.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package Err 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Resp struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsResp(buf []byte, offset flatbuffers.UOffsetT) *Resp { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &Resp{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func GetSizePrefixedRootAsResp(buf []byte, offset flatbuffers.UOffsetT) *Resp { 21 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 22 | x := &Resp{} 23 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 24 | return x 25 | } 26 | 27 | func (rcv *Resp) Init(buf []byte, i flatbuffers.UOffsetT) { 28 | rcv._tab.Bytes = buf 29 | rcv._tab.Pos = i 30 | } 31 | 32 | func (rcv *Resp) Table() flatbuffers.Table { 33 | return rcv._tab 34 | } 35 | 36 | func (rcv *Resp) Code() Code { 37 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 38 | if o != 0 { 39 | return Code(rcv._tab.GetByte(o + rcv._tab.Pos)) 40 | } 41 | return 0 42 | } 43 | 44 | func (rcv *Resp) MutateCode(n Code) bool { 45 | return rcv._tab.MutateByteSlot(4, byte(n)) 46 | } 47 | 48 | func RespStart(builder *flatbuffers.Builder) { 49 | builder.StartObject(1) 50 | } 51 | func RespAddCode(builder *flatbuffers.Builder, code Code) { 52 | builder.PrependByteSlot(0, byte(code), 0) 53 | } 54 | func RespEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 55 | return builder.EndObject() 56 | } 57 | -------------------------------------------------------------------------------- /go/A6/ExtraInfo/Info.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package ExtraInfo 4 | 5 | import "strconv" 6 | 7 | type Info byte 8 | 9 | const ( 10 | InfoNONE Info = 0 11 | InfoVar Info = 1 12 | InfoReqBody Info = 2 13 | InfoRespBody Info = 3 14 | ) 15 | 16 | var EnumNamesInfo = map[Info]string{ 17 | InfoNONE: "NONE", 18 | InfoVar: "Var", 19 | InfoReqBody: "ReqBody", 20 | InfoRespBody: "RespBody", 21 | } 22 | 23 | var EnumValuesInfo = map[string]Info{ 24 | "NONE": InfoNONE, 25 | "Var": InfoVar, 26 | "ReqBody": InfoReqBody, 27 | "RespBody": InfoRespBody, 28 | } 29 | 30 | func (v Info) String() string { 31 | if s, ok := EnumNamesInfo[v]; ok { 32 | return s 33 | } 34 | return "Info(" + strconv.FormatInt(int64(v), 10) + ")" 35 | } 36 | -------------------------------------------------------------------------------- /go/A6/ExtraInfo/Req.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package ExtraInfo 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Req struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsReq(buf []byte, offset flatbuffers.UOffsetT) *Req { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &Req{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func GetSizePrefixedRootAsReq(buf []byte, offset flatbuffers.UOffsetT) *Req { 21 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 22 | x := &Req{} 23 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 24 | return x 25 | } 26 | 27 | func (rcv *Req) Init(buf []byte, i flatbuffers.UOffsetT) { 28 | rcv._tab.Bytes = buf 29 | rcv._tab.Pos = i 30 | } 31 | 32 | func (rcv *Req) Table() flatbuffers.Table { 33 | return rcv._tab 34 | } 35 | 36 | func (rcv *Req) InfoType() Info { 37 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 38 | if o != 0 { 39 | return Info(rcv._tab.GetByte(o + rcv._tab.Pos)) 40 | } 41 | return 0 42 | } 43 | 44 | func (rcv *Req) MutateInfoType(n Info) bool { 45 | return rcv._tab.MutateByteSlot(4, byte(n)) 46 | } 47 | 48 | func (rcv *Req) Info(obj *flatbuffers.Table) bool { 49 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 50 | if o != 0 { 51 | rcv._tab.Union(obj, o) 52 | return true 53 | } 54 | return false 55 | } 56 | 57 | func ReqStart(builder *flatbuffers.Builder) { 58 | builder.StartObject(2) 59 | } 60 | func ReqAddInfoType(builder *flatbuffers.Builder, infoType Info) { 61 | builder.PrependByteSlot(0, byte(infoType), 0) 62 | } 63 | func ReqAddInfo(builder *flatbuffers.Builder, info flatbuffers.UOffsetT) { 64 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(info), 0) 65 | } 66 | func ReqEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 67 | return builder.EndObject() 68 | } 69 | -------------------------------------------------------------------------------- /go/A6/ExtraInfo/ReqBody.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package ExtraInfo 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type ReqBody struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsReqBody(buf []byte, offset flatbuffers.UOffsetT) *ReqBody { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &ReqBody{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func GetSizePrefixedRootAsReqBody(buf []byte, offset flatbuffers.UOffsetT) *ReqBody { 21 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 22 | x := &ReqBody{} 23 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 24 | return x 25 | } 26 | 27 | func (rcv *ReqBody) Init(buf []byte, i flatbuffers.UOffsetT) { 28 | rcv._tab.Bytes = buf 29 | rcv._tab.Pos = i 30 | } 31 | 32 | func (rcv *ReqBody) Table() flatbuffers.Table { 33 | return rcv._tab 34 | } 35 | 36 | func ReqBodyStart(builder *flatbuffers.Builder) { 37 | builder.StartObject(0) 38 | } 39 | func ReqBodyEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 40 | return builder.EndObject() 41 | } 42 | -------------------------------------------------------------------------------- /go/A6/ExtraInfo/Resp.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package ExtraInfo 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Resp struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsResp(buf []byte, offset flatbuffers.UOffsetT) *Resp { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &Resp{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func GetSizePrefixedRootAsResp(buf []byte, offset flatbuffers.UOffsetT) *Resp { 21 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 22 | x := &Resp{} 23 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 24 | return x 25 | } 26 | 27 | func (rcv *Resp) Init(buf []byte, i flatbuffers.UOffsetT) { 28 | rcv._tab.Bytes = buf 29 | rcv._tab.Pos = i 30 | } 31 | 32 | func (rcv *Resp) Table() flatbuffers.Table { 33 | return rcv._tab 34 | } 35 | 36 | func (rcv *Resp) Result(j int) byte { 37 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 38 | if o != 0 { 39 | a := rcv._tab.Vector(o) 40 | return rcv._tab.GetByte(a + flatbuffers.UOffsetT(j*1)) 41 | } 42 | return 0 43 | } 44 | 45 | func (rcv *Resp) ResultLength() int { 46 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 47 | if o != 0 { 48 | return rcv._tab.VectorLen(o) 49 | } 50 | return 0 51 | } 52 | 53 | func (rcv *Resp) ResultBytes() []byte { 54 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 55 | if o != 0 { 56 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 57 | } 58 | return nil 59 | } 60 | 61 | func (rcv *Resp) MutateResult(j int, n byte) bool { 62 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 63 | if o != 0 { 64 | a := rcv._tab.Vector(o) 65 | return rcv._tab.MutateByte(a+flatbuffers.UOffsetT(j*1), n) 66 | } 67 | return false 68 | } 69 | 70 | func RespStart(builder *flatbuffers.Builder) { 71 | builder.StartObject(1) 72 | } 73 | func RespAddResult(builder *flatbuffers.Builder, result flatbuffers.UOffsetT) { 74 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(result), 0) 75 | } 76 | func RespStartResultVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 77 | return builder.StartVector(1, numElems, 1) 78 | } 79 | func RespEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 80 | return builder.EndObject() 81 | } 82 | -------------------------------------------------------------------------------- /go/A6/ExtraInfo/RespBody.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package ExtraInfo 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type RespBody struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsRespBody(buf []byte, offset flatbuffers.UOffsetT) *RespBody { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &RespBody{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func GetSizePrefixedRootAsRespBody(buf []byte, offset flatbuffers.UOffsetT) *RespBody { 21 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 22 | x := &RespBody{} 23 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 24 | return x 25 | } 26 | 27 | func (rcv *RespBody) Init(buf []byte, i flatbuffers.UOffsetT) { 28 | rcv._tab.Bytes = buf 29 | rcv._tab.Pos = i 30 | } 31 | 32 | func (rcv *RespBody) Table() flatbuffers.Table { 33 | return rcv._tab 34 | } 35 | 36 | func RespBodyStart(builder *flatbuffers.Builder) { 37 | builder.StartObject(0) 38 | } 39 | func RespBodyEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 40 | return builder.EndObject() 41 | } 42 | -------------------------------------------------------------------------------- /go/A6/ExtraInfo/Var.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package ExtraInfo 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Var struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsVar(buf []byte, offset flatbuffers.UOffsetT) *Var { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &Var{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func GetSizePrefixedRootAsVar(buf []byte, offset flatbuffers.UOffsetT) *Var { 21 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 22 | x := &Var{} 23 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 24 | return x 25 | } 26 | 27 | func (rcv *Var) Init(buf []byte, i flatbuffers.UOffsetT) { 28 | rcv._tab.Bytes = buf 29 | rcv._tab.Pos = i 30 | } 31 | 32 | func (rcv *Var) Table() flatbuffers.Table { 33 | return rcv._tab 34 | } 35 | 36 | func (rcv *Var) Name() []byte { 37 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 38 | if o != 0 { 39 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 40 | } 41 | return nil 42 | } 43 | 44 | func VarStart(builder *flatbuffers.Builder) { 45 | builder.StartObject(1) 46 | } 47 | func VarAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) { 48 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0) 49 | } 50 | func VarEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 51 | return builder.EndObject() 52 | } 53 | -------------------------------------------------------------------------------- /go/A6/HTTPReqCall/Action.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package HTTPReqCall 4 | 5 | import "strconv" 6 | 7 | type Action byte 8 | 9 | const ( 10 | ActionNONE Action = 0 11 | ActionStop Action = 1 12 | ActionRewrite Action = 2 13 | ) 14 | 15 | var EnumNamesAction = map[Action]string{ 16 | ActionNONE: "NONE", 17 | ActionStop: "Stop", 18 | ActionRewrite: "Rewrite", 19 | } 20 | 21 | var EnumValuesAction = map[string]Action{ 22 | "NONE": ActionNONE, 23 | "Stop": ActionStop, 24 | "Rewrite": ActionRewrite, 25 | } 26 | 27 | func (v Action) String() string { 28 | if s, ok := EnumNamesAction[v]; ok { 29 | return s 30 | } 31 | return "Action(" + strconv.FormatInt(int64(v), 10) + ")" 32 | } 33 | -------------------------------------------------------------------------------- /go/A6/HTTPReqCall/Resp.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package HTTPReqCall 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Resp struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsResp(buf []byte, offset flatbuffers.UOffsetT) *Resp { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &Resp{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func GetSizePrefixedRootAsResp(buf []byte, offset flatbuffers.UOffsetT) *Resp { 21 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 22 | x := &Resp{} 23 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 24 | return x 25 | } 26 | 27 | func (rcv *Resp) Init(buf []byte, i flatbuffers.UOffsetT) { 28 | rcv._tab.Bytes = buf 29 | rcv._tab.Pos = i 30 | } 31 | 32 | func (rcv *Resp) Table() flatbuffers.Table { 33 | return rcv._tab 34 | } 35 | 36 | func (rcv *Resp) Id() uint32 { 37 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 38 | if o != 0 { 39 | return rcv._tab.GetUint32(o + rcv._tab.Pos) 40 | } 41 | return 0 42 | } 43 | 44 | func (rcv *Resp) MutateId(n uint32) bool { 45 | return rcv._tab.MutateUint32Slot(4, n) 46 | } 47 | 48 | func (rcv *Resp) ActionType() Action { 49 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 50 | if o != 0 { 51 | return Action(rcv._tab.GetByte(o + rcv._tab.Pos)) 52 | } 53 | return 0 54 | } 55 | 56 | func (rcv *Resp) MutateActionType(n Action) bool { 57 | return rcv._tab.MutateByteSlot(6, byte(n)) 58 | } 59 | 60 | func (rcv *Resp) Action(obj *flatbuffers.Table) bool { 61 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 62 | if o != 0 { 63 | rcv._tab.Union(obj, o) 64 | return true 65 | } 66 | return false 67 | } 68 | 69 | func RespStart(builder *flatbuffers.Builder) { 70 | builder.StartObject(3) 71 | } 72 | func RespAddId(builder *flatbuffers.Builder, id uint32) { 73 | builder.PrependUint32Slot(0, id, 0) 74 | } 75 | func RespAddActionType(builder *flatbuffers.Builder, actionType Action) { 76 | builder.PrependByteSlot(1, byte(actionType), 0) 77 | } 78 | func RespAddAction(builder *flatbuffers.Builder, action flatbuffers.UOffsetT) { 79 | builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(action), 0) 80 | } 81 | func RespEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 82 | return builder.EndObject() 83 | } 84 | -------------------------------------------------------------------------------- /go/A6/HTTPReqCall/Stop.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package HTTPReqCall 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | 8 | A6 "github.com/api7/ext-plugin-proto/go/A6" 9 | ) 10 | 11 | type Stop struct { 12 | _tab flatbuffers.Table 13 | } 14 | 15 | func GetRootAsStop(buf []byte, offset flatbuffers.UOffsetT) *Stop { 16 | n := flatbuffers.GetUOffsetT(buf[offset:]) 17 | x := &Stop{} 18 | x.Init(buf, n+offset) 19 | return x 20 | } 21 | 22 | func GetSizePrefixedRootAsStop(buf []byte, offset flatbuffers.UOffsetT) *Stop { 23 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 24 | x := &Stop{} 25 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 26 | return x 27 | } 28 | 29 | func (rcv *Stop) Init(buf []byte, i flatbuffers.UOffsetT) { 30 | rcv._tab.Bytes = buf 31 | rcv._tab.Pos = i 32 | } 33 | 34 | func (rcv *Stop) Table() flatbuffers.Table { 35 | return rcv._tab 36 | } 37 | 38 | func (rcv *Stop) Status() uint16 { 39 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 40 | if o != 0 { 41 | return rcv._tab.GetUint16(o + rcv._tab.Pos) 42 | } 43 | return 0 44 | } 45 | 46 | func (rcv *Stop) MutateStatus(n uint16) bool { 47 | return rcv._tab.MutateUint16Slot(4, n) 48 | } 49 | 50 | func (rcv *Stop) Headers(obj *A6.TextEntry, j int) bool { 51 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 52 | if o != 0 { 53 | x := rcv._tab.Vector(o) 54 | x += flatbuffers.UOffsetT(j) * 4 55 | x = rcv._tab.Indirect(x) 56 | obj.Init(rcv._tab.Bytes, x) 57 | return true 58 | } 59 | return false 60 | } 61 | 62 | func (rcv *Stop) HeadersLength() int { 63 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 64 | if o != 0 { 65 | return rcv._tab.VectorLen(o) 66 | } 67 | return 0 68 | } 69 | 70 | func (rcv *Stop) Body(j int) byte { 71 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 72 | if o != 0 { 73 | a := rcv._tab.Vector(o) 74 | return rcv._tab.GetByte(a + flatbuffers.UOffsetT(j*1)) 75 | } 76 | return 0 77 | } 78 | 79 | func (rcv *Stop) BodyLength() int { 80 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 81 | if o != 0 { 82 | return rcv._tab.VectorLen(o) 83 | } 84 | return 0 85 | } 86 | 87 | func (rcv *Stop) BodyBytes() []byte { 88 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 89 | if o != 0 { 90 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 91 | } 92 | return nil 93 | } 94 | 95 | func (rcv *Stop) MutateBody(j int, n byte) bool { 96 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 97 | if o != 0 { 98 | a := rcv._tab.Vector(o) 99 | return rcv._tab.MutateByte(a+flatbuffers.UOffsetT(j*1), n) 100 | } 101 | return false 102 | } 103 | 104 | func StopStart(builder *flatbuffers.Builder) { 105 | builder.StartObject(3) 106 | } 107 | func StopAddStatus(builder *flatbuffers.Builder, status uint16) { 108 | builder.PrependUint16Slot(0, status, 0) 109 | } 110 | func StopAddHeaders(builder *flatbuffers.Builder, headers flatbuffers.UOffsetT) { 111 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(headers), 0) 112 | } 113 | func StopStartHeadersVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 114 | return builder.StartVector(4, numElems, 4) 115 | } 116 | func StopAddBody(builder *flatbuffers.Builder, body flatbuffers.UOffsetT) { 117 | builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(body), 0) 118 | } 119 | func StopStartBodyVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 120 | return builder.StartVector(1, numElems, 1) 121 | } 122 | func StopEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 123 | return builder.EndObject() 124 | } 125 | -------------------------------------------------------------------------------- /go/A6/HTTPRespCall/Req.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package HTTPRespCall 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | 8 | A6 "github.com/api7/ext-plugin-proto/go/A6" 9 | ) 10 | 11 | type Req struct { 12 | _tab flatbuffers.Table 13 | } 14 | 15 | func GetRootAsReq(buf []byte, offset flatbuffers.UOffsetT) *Req { 16 | n := flatbuffers.GetUOffsetT(buf[offset:]) 17 | x := &Req{} 18 | x.Init(buf, n+offset) 19 | return x 20 | } 21 | 22 | func GetSizePrefixedRootAsReq(buf []byte, offset flatbuffers.UOffsetT) *Req { 23 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 24 | x := &Req{} 25 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 26 | return x 27 | } 28 | 29 | func (rcv *Req) Init(buf []byte, i flatbuffers.UOffsetT) { 30 | rcv._tab.Bytes = buf 31 | rcv._tab.Pos = i 32 | } 33 | 34 | func (rcv *Req) Table() flatbuffers.Table { 35 | return rcv._tab 36 | } 37 | 38 | func (rcv *Req) Id() uint32 { 39 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 40 | if o != 0 { 41 | return rcv._tab.GetUint32(o + rcv._tab.Pos) 42 | } 43 | return 0 44 | } 45 | 46 | func (rcv *Req) MutateId(n uint32) bool { 47 | return rcv._tab.MutateUint32Slot(4, n) 48 | } 49 | 50 | func (rcv *Req) Status() uint16 { 51 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 52 | if o != 0 { 53 | return rcv._tab.GetUint16(o + rcv._tab.Pos) 54 | } 55 | return 0 56 | } 57 | 58 | func (rcv *Req) MutateStatus(n uint16) bool { 59 | return rcv._tab.MutateUint16Slot(6, n) 60 | } 61 | 62 | func (rcv *Req) Headers(obj *A6.TextEntry, j int) bool { 63 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 64 | if o != 0 { 65 | x := rcv._tab.Vector(o) 66 | x += flatbuffers.UOffsetT(j) * 4 67 | x = rcv._tab.Indirect(x) 68 | obj.Init(rcv._tab.Bytes, x) 69 | return true 70 | } 71 | return false 72 | } 73 | 74 | func (rcv *Req) HeadersLength() int { 75 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 76 | if o != 0 { 77 | return rcv._tab.VectorLen(o) 78 | } 79 | return 0 80 | } 81 | 82 | func (rcv *Req) ConfToken() uint32 { 83 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 84 | if o != 0 { 85 | return rcv._tab.GetUint32(o + rcv._tab.Pos) 86 | } 87 | return 0 88 | } 89 | 90 | func (rcv *Req) MutateConfToken(n uint32) bool { 91 | return rcv._tab.MutateUint32Slot(10, n) 92 | } 93 | 94 | func ReqStart(builder *flatbuffers.Builder) { 95 | builder.StartObject(4) 96 | } 97 | func ReqAddId(builder *flatbuffers.Builder, id uint32) { 98 | builder.PrependUint32Slot(0, id, 0) 99 | } 100 | func ReqAddStatus(builder *flatbuffers.Builder, status uint16) { 101 | builder.PrependUint16Slot(1, status, 0) 102 | } 103 | func ReqAddHeaders(builder *flatbuffers.Builder, headers flatbuffers.UOffsetT) { 104 | builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(headers), 0) 105 | } 106 | func ReqStartHeadersVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 107 | return builder.StartVector(4, numElems, 4) 108 | } 109 | func ReqAddConfToken(builder *flatbuffers.Builder, confToken uint32) { 110 | builder.PrependUint32Slot(3, confToken, 0) 111 | } 112 | func ReqEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 113 | return builder.EndObject() 114 | } 115 | -------------------------------------------------------------------------------- /go/A6/HTTPRespCall/Resp.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package HTTPRespCall 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | 8 | A6 "github.com/api7/ext-plugin-proto/go/A6" 9 | ) 10 | 11 | type Resp struct { 12 | _tab flatbuffers.Table 13 | } 14 | 15 | func GetRootAsResp(buf []byte, offset flatbuffers.UOffsetT) *Resp { 16 | n := flatbuffers.GetUOffsetT(buf[offset:]) 17 | x := &Resp{} 18 | x.Init(buf, n+offset) 19 | return x 20 | } 21 | 22 | func GetSizePrefixedRootAsResp(buf []byte, offset flatbuffers.UOffsetT) *Resp { 23 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 24 | x := &Resp{} 25 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 26 | return x 27 | } 28 | 29 | func (rcv *Resp) Init(buf []byte, i flatbuffers.UOffsetT) { 30 | rcv._tab.Bytes = buf 31 | rcv._tab.Pos = i 32 | } 33 | 34 | func (rcv *Resp) Table() flatbuffers.Table { 35 | return rcv._tab 36 | } 37 | 38 | func (rcv *Resp) Id() uint32 { 39 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 40 | if o != 0 { 41 | return rcv._tab.GetUint32(o + rcv._tab.Pos) 42 | } 43 | return 0 44 | } 45 | 46 | func (rcv *Resp) MutateId(n uint32) bool { 47 | return rcv._tab.MutateUint32Slot(4, n) 48 | } 49 | 50 | func (rcv *Resp) Status() uint16 { 51 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 52 | if o != 0 { 53 | return rcv._tab.GetUint16(o + rcv._tab.Pos) 54 | } 55 | return 0 56 | } 57 | 58 | func (rcv *Resp) MutateStatus(n uint16) bool { 59 | return rcv._tab.MutateUint16Slot(6, n) 60 | } 61 | 62 | func (rcv *Resp) Headers(obj *A6.TextEntry, j int) bool { 63 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 64 | if o != 0 { 65 | x := rcv._tab.Vector(o) 66 | x += flatbuffers.UOffsetT(j) * 4 67 | x = rcv._tab.Indirect(x) 68 | obj.Init(rcv._tab.Bytes, x) 69 | return true 70 | } 71 | return false 72 | } 73 | 74 | func (rcv *Resp) HeadersLength() int { 75 | o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 76 | if o != 0 { 77 | return rcv._tab.VectorLen(o) 78 | } 79 | return 0 80 | } 81 | 82 | func (rcv *Resp) Body(j int) byte { 83 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 84 | if o != 0 { 85 | a := rcv._tab.Vector(o) 86 | return rcv._tab.GetByte(a + flatbuffers.UOffsetT(j*1)) 87 | } 88 | return 0 89 | } 90 | 91 | func (rcv *Resp) BodyLength() int { 92 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 93 | if o != 0 { 94 | return rcv._tab.VectorLen(o) 95 | } 96 | return 0 97 | } 98 | 99 | func (rcv *Resp) BodyBytes() []byte { 100 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 101 | if o != 0 { 102 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 103 | } 104 | return nil 105 | } 106 | 107 | func (rcv *Resp) MutateBody(j int, n byte) bool { 108 | o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 109 | if o != 0 { 110 | a := rcv._tab.Vector(o) 111 | return rcv._tab.MutateByte(a+flatbuffers.UOffsetT(j*1), n) 112 | } 113 | return false 114 | } 115 | 116 | func RespStart(builder *flatbuffers.Builder) { 117 | builder.StartObject(4) 118 | } 119 | func RespAddId(builder *flatbuffers.Builder, id uint32) { 120 | builder.PrependUint32Slot(0, id, 0) 121 | } 122 | func RespAddStatus(builder *flatbuffers.Builder, status uint16) { 123 | builder.PrependUint16Slot(1, status, 0) 124 | } 125 | func RespAddHeaders(builder *flatbuffers.Builder, headers flatbuffers.UOffsetT) { 126 | builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(headers), 0) 127 | } 128 | func RespStartHeadersVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 129 | return builder.StartVector(4, numElems, 4) 130 | } 131 | func RespAddBody(builder *flatbuffers.Builder, body flatbuffers.UOffsetT) { 132 | builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(body), 0) 133 | } 134 | func RespStartBodyVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 135 | return builder.StartVector(1, numElems, 1) 136 | } 137 | func RespEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 138 | return builder.EndObject() 139 | } 140 | -------------------------------------------------------------------------------- /go/A6/Method.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package A6 4 | 5 | import "strconv" 6 | 7 | type Method byte 8 | 9 | const ( 10 | MethodGET Method = 0 11 | MethodHEAD Method = 1 12 | MethodPOST Method = 2 13 | MethodPUT Method = 3 14 | MethodDELETE Method = 4 15 | MethodMKCOL Method = 5 16 | MethodCOPY Method = 6 17 | MethodMOVE Method = 7 18 | MethodOPTIONS Method = 8 19 | MethodPROPFIND Method = 9 20 | MethodPROPPATCH Method = 10 21 | MethodLOCK Method = 11 22 | MethodUNLOCK Method = 12 23 | MethodPATCH Method = 13 24 | MethodTRACE Method = 14 25 | ) 26 | 27 | var EnumNamesMethod = map[Method]string{ 28 | MethodGET: "GET", 29 | MethodHEAD: "HEAD", 30 | MethodPOST: "POST", 31 | MethodPUT: "PUT", 32 | MethodDELETE: "DELETE", 33 | MethodMKCOL: "MKCOL", 34 | MethodCOPY: "COPY", 35 | MethodMOVE: "MOVE", 36 | MethodOPTIONS: "OPTIONS", 37 | MethodPROPFIND: "PROPFIND", 38 | MethodPROPPATCH: "PROPPATCH", 39 | MethodLOCK: "LOCK", 40 | MethodUNLOCK: "UNLOCK", 41 | MethodPATCH: "PATCH", 42 | MethodTRACE: "TRACE", 43 | } 44 | 45 | var EnumValuesMethod = map[string]Method{ 46 | "GET": MethodGET, 47 | "HEAD": MethodHEAD, 48 | "POST": MethodPOST, 49 | "PUT": MethodPUT, 50 | "DELETE": MethodDELETE, 51 | "MKCOL": MethodMKCOL, 52 | "COPY": MethodCOPY, 53 | "MOVE": MethodMOVE, 54 | "OPTIONS": MethodOPTIONS, 55 | "PROPFIND": MethodPROPFIND, 56 | "PROPPATCH": MethodPROPPATCH, 57 | "LOCK": MethodLOCK, 58 | "UNLOCK": MethodUNLOCK, 59 | "PATCH": MethodPATCH, 60 | "TRACE": MethodTRACE, 61 | } 62 | 63 | func (v Method) String() string { 64 | if s, ok := EnumNamesMethod[v]; ok { 65 | return s 66 | } 67 | return "Method(" + strconv.FormatInt(int64(v), 10) + ")" 68 | } 69 | -------------------------------------------------------------------------------- /go/A6/PrepareConf/Req.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package PrepareConf 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | 8 | A6 "github.com/api7/ext-plugin-proto/go/A6" 9 | ) 10 | 11 | type Req struct { 12 | _tab flatbuffers.Table 13 | } 14 | 15 | func GetRootAsReq(buf []byte, offset flatbuffers.UOffsetT) *Req { 16 | n := flatbuffers.GetUOffsetT(buf[offset:]) 17 | x := &Req{} 18 | x.Init(buf, n+offset) 19 | return x 20 | } 21 | 22 | func GetSizePrefixedRootAsReq(buf []byte, offset flatbuffers.UOffsetT) *Req { 23 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 24 | x := &Req{} 25 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 26 | return x 27 | } 28 | 29 | func (rcv *Req) Init(buf []byte, i flatbuffers.UOffsetT) { 30 | rcv._tab.Bytes = buf 31 | rcv._tab.Pos = i 32 | } 33 | 34 | func (rcv *Req) Table() flatbuffers.Table { 35 | return rcv._tab 36 | } 37 | 38 | func (rcv *Req) Conf(obj *A6.TextEntry, j int) bool { 39 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 40 | if o != 0 { 41 | x := rcv._tab.Vector(o) 42 | x += flatbuffers.UOffsetT(j) * 4 43 | x = rcv._tab.Indirect(x) 44 | obj.Init(rcv._tab.Bytes, x) 45 | return true 46 | } 47 | return false 48 | } 49 | 50 | func (rcv *Req) ConfLength() int { 51 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 52 | if o != 0 { 53 | return rcv._tab.VectorLen(o) 54 | } 55 | return 0 56 | } 57 | 58 | func (rcv *Req) Key() []byte { 59 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 60 | if o != 0 { 61 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 62 | } 63 | return nil 64 | } 65 | 66 | func ReqStart(builder *flatbuffers.Builder) { 67 | builder.StartObject(2) 68 | } 69 | func ReqAddConf(builder *flatbuffers.Builder, conf flatbuffers.UOffsetT) { 70 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(conf), 0) 71 | } 72 | func ReqStartConfVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 73 | return builder.StartVector(4, numElems, 4) 74 | } 75 | func ReqAddKey(builder *flatbuffers.Builder, key flatbuffers.UOffsetT) { 76 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(key), 0) 77 | } 78 | func ReqEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 79 | return builder.EndObject() 80 | } 81 | -------------------------------------------------------------------------------- /go/A6/PrepareConf/Resp.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package PrepareConf 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type Resp struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsResp(buf []byte, offset flatbuffers.UOffsetT) *Resp { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &Resp{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func GetSizePrefixedRootAsResp(buf []byte, offset flatbuffers.UOffsetT) *Resp { 21 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 22 | x := &Resp{} 23 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 24 | return x 25 | } 26 | 27 | func (rcv *Resp) Init(buf []byte, i flatbuffers.UOffsetT) { 28 | rcv._tab.Bytes = buf 29 | rcv._tab.Pos = i 30 | } 31 | 32 | func (rcv *Resp) Table() flatbuffers.Table { 33 | return rcv._tab 34 | } 35 | 36 | func (rcv *Resp) ConfToken() uint32 { 37 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 38 | if o != 0 { 39 | return rcv._tab.GetUint32(o + rcv._tab.Pos) 40 | } 41 | return 0 42 | } 43 | 44 | func (rcv *Resp) MutateConfToken(n uint32) bool { 45 | return rcv._tab.MutateUint32Slot(4, n) 46 | } 47 | 48 | func RespStart(builder *flatbuffers.Builder) { 49 | builder.StartObject(1) 50 | } 51 | func RespAddConfToken(builder *flatbuffers.Builder, confToken uint32) { 52 | builder.PrependUint32Slot(0, confToken, 0) 53 | } 54 | func RespEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 55 | return builder.EndObject() 56 | } 57 | -------------------------------------------------------------------------------- /go/A6/TextEntry.go: -------------------------------------------------------------------------------- 1 | // Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 | 3 | package A6 4 | 5 | import ( 6 | flatbuffers "github.com/google/flatbuffers/go" 7 | ) 8 | 9 | type TextEntry struct { 10 | _tab flatbuffers.Table 11 | } 12 | 13 | func GetRootAsTextEntry(buf []byte, offset flatbuffers.UOffsetT) *TextEntry { 14 | n := flatbuffers.GetUOffsetT(buf[offset:]) 15 | x := &TextEntry{} 16 | x.Init(buf, n+offset) 17 | return x 18 | } 19 | 20 | func GetSizePrefixedRootAsTextEntry(buf []byte, offset flatbuffers.UOffsetT) *TextEntry { 21 | n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 22 | x := &TextEntry{} 23 | x.Init(buf, n+offset+flatbuffers.SizeUint32) 24 | return x 25 | } 26 | 27 | func (rcv *TextEntry) Init(buf []byte, i flatbuffers.UOffsetT) { 28 | rcv._tab.Bytes = buf 29 | rcv._tab.Pos = i 30 | } 31 | 32 | func (rcv *TextEntry) Table() flatbuffers.Table { 33 | return rcv._tab 34 | } 35 | 36 | func (rcv *TextEntry) Name() []byte { 37 | o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 38 | if o != 0 { 39 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 40 | } 41 | return nil 42 | } 43 | 44 | func (rcv *TextEntry) Value() []byte { 45 | o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 46 | if o != 0 { 47 | return rcv._tab.ByteVector(o + rcv._tab.Pos) 48 | } 49 | return nil 50 | } 51 | 52 | func TextEntryStart(builder *flatbuffers.Builder) { 53 | builder.StartObject(2) 54 | } 55 | func TextEntryAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) { 56 | builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0) 57 | } 58 | func TextEntryAddValue(builder *flatbuffers.Builder, value flatbuffers.UOffsetT) { 59 | builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(value), 0) 60 | } 61 | func TextEntryEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 62 | return builder.EndObject() 63 | } 64 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/DataEntry.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class DataEntry extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static DataEntry getRootAsDataEntry(ByteBuffer _bb) { return getRootAsDataEntry(_bb, new DataEntry()); } 14 | public static DataEntry getRootAsDataEntry(ByteBuffer _bb, DataEntry obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public DataEntry __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } 19 | public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } 20 | public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } 21 | public int value(int j) { int o = __offset(6); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } 22 | public int valueLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } 23 | public ByteVector valueVector() { return valueVector(new ByteVector()); } 24 | public ByteVector valueVector(ByteVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; } 25 | public ByteBuffer valueAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } 26 | public ByteBuffer valueInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } 27 | 28 | public static int createDataEntry(FlatBufferBuilder builder, 29 | int nameOffset, 30 | int valueOffset) { 31 | builder.startTable(2); 32 | DataEntry.addValue(builder, valueOffset); 33 | DataEntry.addName(builder, nameOffset); 34 | return DataEntry.endDataEntry(builder); 35 | } 36 | 37 | public static void startDataEntry(FlatBufferBuilder builder) { builder.startTable(2); } 38 | public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } 39 | public static void addValue(FlatBufferBuilder builder, int valueOffset) { builder.addOffset(1, valueOffset, 0); } 40 | public static int createValueVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } 41 | public static int createValueVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } 42 | public static void startValueVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } 43 | public static int endDataEntry(FlatBufferBuilder builder) { 44 | int o = builder.endTable(); 45 | return o; 46 | } 47 | 48 | public static final class Vector extends BaseVector { 49 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 50 | 51 | public DataEntry get(int j) { return get(new DataEntry(), j); } 52 | public DataEntry get(DataEntry obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/Err/Code.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.Err; 4 | 5 | public final class Code { 6 | private Code() { } 7 | public static final int BAD_REQUEST = 0; 8 | public static final int SERVICE_UNAVAILABLE = 1; 9 | public static final int CONF_TOKEN_NOT_FOUND = 2; 10 | 11 | public static final String[] names = { "BAD_REQUEST", "SERVICE_UNAVAILABLE", "CONF_TOKEN_NOT_FOUND", }; 12 | 13 | public static String name(int e) { return names[e]; } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/Err/Resp.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.Err; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class Resp extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static Resp getRootAsResp(ByteBuffer _bb) { return getRootAsResp(_bb, new Resp()); } 14 | public static Resp getRootAsResp(ByteBuffer _bb, Resp obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public Resp __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public int code() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } 19 | 20 | public static int createResp(FlatBufferBuilder builder, 21 | int code) { 22 | builder.startTable(1); 23 | Resp.addCode(builder, code); 24 | return Resp.endResp(builder); 25 | } 26 | 27 | public static void startResp(FlatBufferBuilder builder) { builder.startTable(1); } 28 | public static void addCode(FlatBufferBuilder builder, int code) { builder.addByte(0, (byte)code, (byte)0); } 29 | public static int endResp(FlatBufferBuilder builder) { 30 | int o = builder.endTable(); 31 | return o; 32 | } 33 | 34 | public static final class Vector extends BaseVector { 35 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 36 | 37 | public Resp get(int j) { return get(new Resp(), j); } 38 | public Resp get(Resp obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/ExtraInfo/Info.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.ExtraInfo; 4 | 5 | public final class Info { 6 | private Info() { } 7 | public static final byte NONE = 0; 8 | public static final byte Var = 1; 9 | public static final byte ReqBody = 2; 10 | public static final byte RespBody = 3; 11 | 12 | public static final String[] names = { "NONE", "Var", "ReqBody", "RespBody", }; 13 | 14 | public static String name(int e) { return names[e]; } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/ExtraInfo/Req.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.ExtraInfo; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class Req extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static Req getRootAsReq(ByteBuffer _bb) { return getRootAsReq(_bb, new Req()); } 14 | public static Req getRootAsReq(ByteBuffer _bb, Req obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public Req __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public byte infoType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } 19 | public Table info(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o + bb_pos) : null; } 20 | 21 | public static int createReq(FlatBufferBuilder builder, 22 | byte info_type, 23 | int infoOffset) { 24 | builder.startTable(2); 25 | Req.addInfo(builder, infoOffset); 26 | Req.addInfoType(builder, info_type); 27 | return Req.endReq(builder); 28 | } 29 | 30 | public static void startReq(FlatBufferBuilder builder) { builder.startTable(2); } 31 | public static void addInfoType(FlatBufferBuilder builder, byte infoType) { builder.addByte(0, infoType, 0); } 32 | public static void addInfo(FlatBufferBuilder builder, int infoOffset) { builder.addOffset(1, infoOffset, 0); } 33 | public static int endReq(FlatBufferBuilder builder) { 34 | int o = builder.endTable(); 35 | return o; 36 | } 37 | 38 | public static final class Vector extends BaseVector { 39 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 40 | 41 | public Req get(int j) { return get(new Req(), j); } 42 | public Req get(Req obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/ExtraInfo/ReqBody.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.ExtraInfo; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class ReqBody extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static ReqBody getRootAsReqBody(ByteBuffer _bb) { return getRootAsReqBody(_bb, new ReqBody()); } 14 | public static ReqBody getRootAsReqBody(ByteBuffer _bb, ReqBody obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public ReqBody __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | 19 | public static void startReqBody(FlatBufferBuilder builder) { builder.startTable(0); } 20 | public static int endReqBody(FlatBufferBuilder builder) { 21 | int o = builder.endTable(); 22 | return o; 23 | } 24 | 25 | public static final class Vector extends BaseVector { 26 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 27 | 28 | public ReqBody get(int j) { return get(new ReqBody(), j); } 29 | public ReqBody get(ReqBody obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/ExtraInfo/Resp.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.ExtraInfo; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class Resp extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static Resp getRootAsResp(ByteBuffer _bb) { return getRootAsResp(_bb, new Resp()); } 14 | public static Resp getRootAsResp(ByteBuffer _bb, Resp obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public Resp __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public int result(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } 19 | public int resultLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } 20 | public ByteVector resultVector() { return resultVector(new ByteVector()); } 21 | public ByteVector resultVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } 22 | public ByteBuffer resultAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } 23 | public ByteBuffer resultInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } 24 | 25 | public static int createResp(FlatBufferBuilder builder, 26 | int resultOffset) { 27 | builder.startTable(1); 28 | Resp.addResult(builder, resultOffset); 29 | return Resp.endResp(builder); 30 | } 31 | 32 | public static void startResp(FlatBufferBuilder builder) { builder.startTable(1); } 33 | public static void addResult(FlatBufferBuilder builder, int resultOffset) { builder.addOffset(0, resultOffset, 0); } 34 | public static int createResultVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } 35 | public static int createResultVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } 36 | public static void startResultVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } 37 | public static int endResp(FlatBufferBuilder builder) { 38 | int o = builder.endTable(); 39 | return o; 40 | } 41 | 42 | public static final class Vector extends BaseVector { 43 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 44 | 45 | public Resp get(int j) { return get(new Resp(), j); } 46 | public Resp get(Resp obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/ExtraInfo/RespBody.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.ExtraInfo; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class RespBody extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static RespBody getRootAsRespBody(ByteBuffer _bb) { return getRootAsRespBody(_bb, new RespBody()); } 14 | public static RespBody getRootAsRespBody(ByteBuffer _bb, RespBody obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public RespBody __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | 19 | public static void startRespBody(FlatBufferBuilder builder) { builder.startTable(0); } 20 | public static int endRespBody(FlatBufferBuilder builder) { 21 | int o = builder.endTable(); 22 | return o; 23 | } 24 | 25 | public static final class Vector extends BaseVector { 26 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 27 | 28 | public RespBody get(int j) { return get(new RespBody(), j); } 29 | public RespBody get(RespBody obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/ExtraInfo/Var.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.ExtraInfo; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class Var extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static Var getRootAsVar(ByteBuffer _bb) { return getRootAsVar(_bb, new Var()); } 14 | public static Var getRootAsVar(ByteBuffer _bb, Var obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public Var __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } 19 | public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } 20 | public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } 21 | 22 | public static int createVar(FlatBufferBuilder builder, 23 | int nameOffset) { 24 | builder.startTable(1); 25 | Var.addName(builder, nameOffset); 26 | return Var.endVar(builder); 27 | } 28 | 29 | public static void startVar(FlatBufferBuilder builder) { builder.startTable(1); } 30 | public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } 31 | public static int endVar(FlatBufferBuilder builder) { 32 | int o = builder.endTable(); 33 | return o; 34 | } 35 | 36 | public static final class Vector extends BaseVector { 37 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 38 | 39 | public Var get(int j) { return get(new Var(), j); } 40 | public Var get(Var obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/HTTPReqCall/Action.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.HTTPReqCall; 4 | 5 | public final class Action { 6 | private Action() { } 7 | public static final byte NONE = 0; 8 | public static final byte Stop = 1; 9 | public static final byte Rewrite = 2; 10 | 11 | public static final String[] names = { "NONE", "Stop", "Rewrite", }; 12 | 13 | public static String name(int e) { return names[e]; } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/HTTPReqCall/Resp.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.HTTPReqCall; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class Resp extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static Resp getRootAsResp(ByteBuffer _bb) { return getRootAsResp(_bb, new Resp()); } 14 | public static Resp getRootAsResp(ByteBuffer _bb, Resp obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public Resp __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public long id() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } 19 | public byte actionType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } 20 | public Table action(Table obj) { int o = __offset(8); return o != 0 ? __union(obj, o + bb_pos) : null; } 21 | 22 | public static int createResp(FlatBufferBuilder builder, 23 | long id, 24 | byte action_type, 25 | int actionOffset) { 26 | builder.startTable(3); 27 | Resp.addAction(builder, actionOffset); 28 | Resp.addId(builder, id); 29 | Resp.addActionType(builder, action_type); 30 | return Resp.endResp(builder); 31 | } 32 | 33 | public static void startResp(FlatBufferBuilder builder) { builder.startTable(3); } 34 | public static void addId(FlatBufferBuilder builder, long id) { builder.addInt(0, (int)id, (int)0L); } 35 | public static void addActionType(FlatBufferBuilder builder, byte actionType) { builder.addByte(1, actionType, 0); } 36 | public static void addAction(FlatBufferBuilder builder, int actionOffset) { builder.addOffset(2, actionOffset, 0); } 37 | public static int endResp(FlatBufferBuilder builder) { 38 | int o = builder.endTable(); 39 | return o; 40 | } 41 | 42 | public static final class Vector extends BaseVector { 43 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 44 | 45 | public Resp get(int j) { return get(new Resp(), j); } 46 | public Resp get(Resp obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/HTTPReqCall/Stop.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.HTTPReqCall; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class Stop extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static Stop getRootAsStop(ByteBuffer _bb) { return getRootAsStop(_bb, new Stop()); } 14 | public static Stop getRootAsStop(ByteBuffer _bb, Stop obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public Stop __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public int status() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } 19 | public io.github.api7.A6.TextEntry headers(int j) { return headers(new io.github.api7.A6.TextEntry(), j); } 20 | public io.github.api7.A6.TextEntry headers(io.github.api7.A6.TextEntry obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } 21 | public int headersLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } 22 | public io.github.api7.A6.TextEntry.Vector headersVector() { return headersVector(new io.github.api7.A6.TextEntry.Vector()); } 23 | public io.github.api7.A6.TextEntry.Vector headersVector(io.github.api7.A6.TextEntry.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } 24 | public int body(int j) { int o = __offset(8); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } 25 | public int bodyLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } 26 | public ByteVector bodyVector() { return bodyVector(new ByteVector()); } 27 | public ByteVector bodyVector(ByteVector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), bb) : null; } 28 | public ByteBuffer bodyAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } 29 | public ByteBuffer bodyInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } 30 | 31 | public static int createStop(FlatBufferBuilder builder, 32 | int status, 33 | int headersOffset, 34 | int bodyOffset) { 35 | builder.startTable(3); 36 | Stop.addBody(builder, bodyOffset); 37 | Stop.addHeaders(builder, headersOffset); 38 | Stop.addStatus(builder, status); 39 | return Stop.endStop(builder); 40 | } 41 | 42 | public static void startStop(FlatBufferBuilder builder) { builder.startTable(3); } 43 | public static void addStatus(FlatBufferBuilder builder, int status) { builder.addShort(0, (short)status, (short)0); } 44 | public static void addHeaders(FlatBufferBuilder builder, int headersOffset) { builder.addOffset(1, headersOffset, 0); } 45 | public static int createHeadersVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } 46 | public static void startHeadersVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } 47 | public static void addBody(FlatBufferBuilder builder, int bodyOffset) { builder.addOffset(2, bodyOffset, 0); } 48 | public static int createBodyVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } 49 | public static int createBodyVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } 50 | public static void startBodyVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } 51 | public static int endStop(FlatBufferBuilder builder) { 52 | int o = builder.endTable(); 53 | return o; 54 | } 55 | 56 | public static final class Vector extends BaseVector { 57 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 58 | 59 | public Stop get(int j) { return get(new Stop(), j); } 60 | public Stop get(Stop obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/HTTPRespCall/Req.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.HTTPRespCall; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class Req extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static Req getRootAsReq(ByteBuffer _bb) { return getRootAsReq(_bb, new Req()); } 14 | public static Req getRootAsReq(ByteBuffer _bb, Req obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public Req __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public long id() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } 19 | public int status() { int o = __offset(6); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } 20 | public io.github.api7.A6.TextEntry headers(int j) { return headers(new io.github.api7.A6.TextEntry(), j); } 21 | public io.github.api7.A6.TextEntry headers(io.github.api7.A6.TextEntry obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } 22 | public int headersLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } 23 | public io.github.api7.A6.TextEntry.Vector headersVector() { return headersVector(new io.github.api7.A6.TextEntry.Vector()); } 24 | public io.github.api7.A6.TextEntry.Vector headersVector(io.github.api7.A6.TextEntry.Vector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } 25 | public long confToken() { int o = __offset(10); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } 26 | 27 | public static int createReq(FlatBufferBuilder builder, 28 | long id, 29 | int status, 30 | int headersOffset, 31 | long conf_token) { 32 | builder.startTable(4); 33 | Req.addConfToken(builder, conf_token); 34 | Req.addHeaders(builder, headersOffset); 35 | Req.addId(builder, id); 36 | Req.addStatus(builder, status); 37 | return Req.endReq(builder); 38 | } 39 | 40 | public static void startReq(FlatBufferBuilder builder) { builder.startTable(4); } 41 | public static void addId(FlatBufferBuilder builder, long id) { builder.addInt(0, (int)id, (int)0L); } 42 | public static void addStatus(FlatBufferBuilder builder, int status) { builder.addShort(1, (short)status, (short)0); } 43 | public static void addHeaders(FlatBufferBuilder builder, int headersOffset) { builder.addOffset(2, headersOffset, 0); } 44 | public static int createHeadersVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } 45 | public static void startHeadersVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } 46 | public static void addConfToken(FlatBufferBuilder builder, long confToken) { builder.addInt(3, (int)confToken, (int)0L); } 47 | public static int endReq(FlatBufferBuilder builder) { 48 | int o = builder.endTable(); 49 | return o; 50 | } 51 | 52 | public static final class Vector extends BaseVector { 53 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 54 | 55 | public Req get(int j) { return get(new Req(), j); } 56 | public Req get(Req obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/HTTPRespCall/Resp.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.HTTPRespCall; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class Resp extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static Resp getRootAsResp(ByteBuffer _bb) { return getRootAsResp(_bb, new Resp()); } 14 | public static Resp getRootAsResp(ByteBuffer _bb, Resp obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public Resp __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public long id() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } 19 | public int status() { int o = __offset(6); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } 20 | public io.github.api7.A6.TextEntry headers(int j) { return headers(new io.github.api7.A6.TextEntry(), j); } 21 | public io.github.api7.A6.TextEntry headers(io.github.api7.A6.TextEntry obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } 22 | public int headersLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } 23 | public io.github.api7.A6.TextEntry.Vector headersVector() { return headersVector(new io.github.api7.A6.TextEntry.Vector()); } 24 | public io.github.api7.A6.TextEntry.Vector headersVector(io.github.api7.A6.TextEntry.Vector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } 25 | public int body(int j) { int o = __offset(10); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } 26 | public int bodyLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } 27 | public ByteVector bodyVector() { return bodyVector(new ByteVector()); } 28 | public ByteVector bodyVector(ByteVector obj) { int o = __offset(10); return o != 0 ? obj.__assign(__vector(o), bb) : null; } 29 | public ByteBuffer bodyAsByteBuffer() { return __vector_as_bytebuffer(10, 1); } 30 | public ByteBuffer bodyInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 1); } 31 | 32 | public static int createResp(FlatBufferBuilder builder, 33 | long id, 34 | int status, 35 | int headersOffset, 36 | int bodyOffset) { 37 | builder.startTable(4); 38 | Resp.addBody(builder, bodyOffset); 39 | Resp.addHeaders(builder, headersOffset); 40 | Resp.addId(builder, id); 41 | Resp.addStatus(builder, status); 42 | return Resp.endResp(builder); 43 | } 44 | 45 | public static void startResp(FlatBufferBuilder builder) { builder.startTable(4); } 46 | public static void addId(FlatBufferBuilder builder, long id) { builder.addInt(0, (int)id, (int)0L); } 47 | public static void addStatus(FlatBufferBuilder builder, int status) { builder.addShort(1, (short)status, (short)0); } 48 | public static void addHeaders(FlatBufferBuilder builder, int headersOffset) { builder.addOffset(2, headersOffset, 0); } 49 | public static int createHeadersVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } 50 | public static void startHeadersVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } 51 | public static void addBody(FlatBufferBuilder builder, int bodyOffset) { builder.addOffset(3, bodyOffset, 0); } 52 | public static int createBodyVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } 53 | public static int createBodyVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } 54 | public static void startBodyVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } 55 | public static int endResp(FlatBufferBuilder builder) { 56 | int o = builder.endTable(); 57 | return o; 58 | } 59 | 60 | public static final class Vector extends BaseVector { 61 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 62 | 63 | public Resp get(int j) { return get(new Resp(), j); } 64 | public Resp get(Resp obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 65 | } 66 | } 67 | 68 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/Method.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6; 4 | 5 | public final class Method { 6 | private Method() { } 7 | public static final int GET = 0; 8 | public static final int HEAD = 1; 9 | public static final int POST = 2; 10 | public static final int PUT = 3; 11 | public static final int DELETE = 4; 12 | public static final int MKCOL = 5; 13 | public static final int COPY = 6; 14 | public static final int MOVE = 7; 15 | public static final int OPTIONS = 8; 16 | public static final int PROPFIND = 9; 17 | public static final int PROPPATCH = 10; 18 | public static final int LOCK = 11; 19 | public static final int UNLOCK = 12; 20 | public static final int PATCH = 13; 21 | public static final int TRACE = 14; 22 | 23 | public static final String[] names = { "GET", "HEAD", "POST", "PUT", "DELETE", "MKCOL", "COPY", "MOVE", "OPTIONS", "PROPFIND", "PROPPATCH", "LOCK", "UNLOCK", "PATCH", "TRACE", }; 24 | 25 | public static String name(int e) { return names[e]; } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/PrepareConf/Req.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.PrepareConf; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class Req extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static Req getRootAsReq(ByteBuffer _bb) { return getRootAsReq(_bb, new Req()); } 14 | public static Req getRootAsReq(ByteBuffer _bb, Req obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public Req __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public io.github.api7.A6.TextEntry conf(int j) { return conf(new io.github.api7.A6.TextEntry(), j); } 19 | public io.github.api7.A6.TextEntry conf(io.github.api7.A6.TextEntry obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } 20 | public int confLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } 21 | public io.github.api7.A6.TextEntry.Vector confVector() { return confVector(new io.github.api7.A6.TextEntry.Vector()); } 22 | public io.github.api7.A6.TextEntry.Vector confVector(io.github.api7.A6.TextEntry.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } 23 | public String key() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } 24 | public ByteBuffer keyAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } 25 | public ByteBuffer keyInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } 26 | 27 | public static int createReq(FlatBufferBuilder builder, 28 | int confOffset, 29 | int keyOffset) { 30 | builder.startTable(2); 31 | Req.addKey(builder, keyOffset); 32 | Req.addConf(builder, confOffset); 33 | return Req.endReq(builder); 34 | } 35 | 36 | public static void startReq(FlatBufferBuilder builder) { builder.startTable(2); } 37 | public static void addConf(FlatBufferBuilder builder, int confOffset) { builder.addOffset(0, confOffset, 0); } 38 | public static int createConfVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } 39 | public static void startConfVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } 40 | public static void addKey(FlatBufferBuilder builder, int keyOffset) { builder.addOffset(1, keyOffset, 0); } 41 | public static int endReq(FlatBufferBuilder builder) { 42 | int o = builder.endTable(); 43 | return o; 44 | } 45 | 46 | public static final class Vector extends BaseVector { 47 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 48 | 49 | public Req get(int j) { return get(new Req(), j); } 50 | public Req get(Req obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/PrepareConf/Resp.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6.PrepareConf; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class Resp extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static Resp getRootAsResp(ByteBuffer _bb) { return getRootAsResp(_bb, new Resp()); } 14 | public static Resp getRootAsResp(ByteBuffer _bb, Resp obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public Resp __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public long confToken() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } 19 | 20 | public static int createResp(FlatBufferBuilder builder, 21 | long conf_token) { 22 | builder.startTable(1); 23 | Resp.addConfToken(builder, conf_token); 24 | return Resp.endResp(builder); 25 | } 26 | 27 | public static void startResp(FlatBufferBuilder builder) { builder.startTable(1); } 28 | public static void addConfToken(FlatBufferBuilder builder, long confToken) { builder.addInt(0, (int)confToken, (int)0L); } 29 | public static int endResp(FlatBufferBuilder builder) { 30 | int o = builder.endTable(); 31 | return o; 32 | } 33 | 34 | public static final class Vector extends BaseVector { 35 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 36 | 37 | public Resp get(int j) { return get(new Resp(), j); } 38 | public Resp get(Resp obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /java/io/github/api7/A6/TextEntry.java: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | package io.github.api7.A6; 4 | 5 | import java.nio.*; 6 | import java.lang.*; 7 | import java.util.*; 8 | import com.google.flatbuffers.*; 9 | 10 | @SuppressWarnings("unused") 11 | public final class TextEntry extends Table { 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } 13 | public static TextEntry getRootAsTextEntry(ByteBuffer _bb) { return getRootAsTextEntry(_bb, new TextEntry()); } 14 | public static TextEntry getRootAsTextEntry(ByteBuffer _bb, TextEntry obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } 16 | public TextEntry __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 | 18 | public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } 19 | public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } 20 | public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } 21 | public String value() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } 22 | public ByteBuffer valueAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } 23 | public ByteBuffer valueInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } 24 | 25 | public static int createTextEntry(FlatBufferBuilder builder, 26 | int nameOffset, 27 | int valueOffset) { 28 | builder.startTable(2); 29 | TextEntry.addValue(builder, valueOffset); 30 | TextEntry.addName(builder, nameOffset); 31 | return TextEntry.endTextEntry(builder); 32 | } 33 | 34 | public static void startTextEntry(FlatBufferBuilder builder) { builder.startTable(2); } 35 | public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } 36 | public static void addValue(FlatBufferBuilder builder, int valueOffset) { builder.addOffset(1, valueOffset, 0); } 37 | public static int endTextEntry(FlatBufferBuilder builder) { 38 | int o = builder.endTable(); 39 | return o; 40 | } 41 | 42 | public static final class Vector extends BaseVector { 43 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 44 | 45 | public TextEntry get(int j) { return get(new TextEntry(), j); } 46 | public TextEntry get(TextEntry obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /lua/A6/DataEntry.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: A6 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local DataEntry = {} -- the module 8 | local DataEntry_mt = {} -- the class metatable 9 | 10 | function DataEntry.New() 11 | local o = {} 12 | setmetatable(o, {__index = DataEntry_mt}) 13 | return o 14 | end 15 | function DataEntry.GetRootAsDataEntry(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = DataEntry.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function DataEntry_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function DataEntry_mt:Name() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:String(o + self.view.pos) 31 | end 32 | end 33 | function DataEntry_mt:Value(j) 34 | local o = self.view:Offset(6) 35 | if o ~= 0 then 36 | local a = self.view:Vector(o) 37 | return self.view:Get(flatbuffers.N.Uint8, a + ((j-1) * 1)) 38 | end 39 | return 0 40 | end 41 | function DataEntry_mt:ValueAsString(start, stop) 42 | return self.view:VectorAsString(6, start, stop) 43 | end 44 | function DataEntry_mt:ValueLength() 45 | local o = self.view:Offset(6) 46 | if o ~= 0 then 47 | return self.view:VectorLen(o) 48 | end 49 | return 0 50 | end 51 | function DataEntry.Start(builder) builder:StartObject(2) end 52 | function DataEntry.AddName(builder, name) builder:PrependUOffsetTRelativeSlot(0, name, 0) end 53 | function DataEntry.AddValue(builder, value) builder:PrependUOffsetTRelativeSlot(1, value, 0) end 54 | function DataEntry.StartValueVector(builder, numElems) return builder:StartVector(1, numElems, 1) end 55 | function DataEntry.End(builder) return builder:EndObject() end 56 | 57 | return DataEntry -- return the module -------------------------------------------------------------------------------- /lua/A6/Err/Code.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: Err 4 | 5 | local Code = { 6 | BAD_REQUEST = 0, 7 | SERVICE_UNAVAILABLE = 1, 8 | CONF_TOKEN_NOT_FOUND = 2, 9 | } 10 | 11 | return Code -- return the module -------------------------------------------------------------------------------- /lua/A6/Err/Resp.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: Err 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Resp = {} -- the module 8 | local Resp_mt = {} -- the class metatable 9 | 10 | function Resp.New() 11 | local o = {} 12 | setmetatable(o, {__index = Resp_mt}) 13 | return o 14 | end 15 | function Resp.GetRootAsResp(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Resp.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Resp_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Resp_mt:Code() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:Get(flatbuffers.N.Uint8, o + self.view.pos) 31 | end 32 | return 0 33 | end 34 | function Resp.Start(builder) builder:StartObject(1) end 35 | function Resp.AddCode(builder, code) builder:PrependUint8Slot(0, code, 0) end 36 | function Resp.End(builder) return builder:EndObject() end 37 | 38 | return Resp -- return the module -------------------------------------------------------------------------------- /lua/A6/ExtraInfo/Info.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: ExtraInfo 4 | 5 | local Info = { 6 | NONE = 0, 7 | Var = 1, 8 | ReqBody = 2, 9 | RespBody = 3, 10 | } 11 | 12 | return Info -- return the module -------------------------------------------------------------------------------- /lua/A6/ExtraInfo/Req.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: ExtraInfo 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Req = {} -- the module 8 | local Req_mt = {} -- the class metatable 9 | 10 | function Req.New() 11 | local o = {} 12 | setmetatable(o, {__index = Req_mt}) 13 | return o 14 | end 15 | function Req.GetRootAsReq(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Req.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Req_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Req_mt:InfoType() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:Get(flatbuffers.N.Uint8, o + self.view.pos) 31 | end 32 | return 0 33 | end 34 | function Req_mt:Info() 35 | local o = self.view:Offset(6) 36 | if o ~= 0 then 37 | local obj = flatbuffers.view.New(require('flatbuffers.binaryarray').New(0), 0) 38 | self.view:Union(obj, o) 39 | return obj 40 | end 41 | end 42 | function Req.Start(builder) builder:StartObject(2) end 43 | function Req.AddInfoType(builder, infoType) builder:PrependUint8Slot(0, infoType, 0) end 44 | function Req.AddInfo(builder, info) builder:PrependUOffsetTRelativeSlot(1, info, 0) end 45 | function Req.End(builder) return builder:EndObject() end 46 | 47 | return Req -- return the module -------------------------------------------------------------------------------- /lua/A6/ExtraInfo/ReqBody.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: ExtraInfo 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local ReqBody = {} -- the module 8 | local ReqBody_mt = {} -- the class metatable 9 | 10 | function ReqBody.New() 11 | local o = {} 12 | setmetatable(o, {__index = ReqBody_mt}) 13 | return o 14 | end 15 | function ReqBody.GetRootAsReqBody(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = ReqBody.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function ReqBody_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function ReqBody.Start(builder) builder:StartObject(0) end 28 | function ReqBody.End(builder) return builder:EndObject() end 29 | 30 | return ReqBody -- return the module -------------------------------------------------------------------------------- /lua/A6/ExtraInfo/Resp.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: ExtraInfo 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Resp = {} -- the module 8 | local Resp_mt = {} -- the class metatable 9 | 10 | function Resp.New() 11 | local o = {} 12 | setmetatable(o, {__index = Resp_mt}) 13 | return o 14 | end 15 | function Resp.GetRootAsResp(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Resp.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Resp_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Resp_mt:Result(j) 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | local a = self.view:Vector(o) 31 | return self.view:Get(flatbuffers.N.Uint8, a + ((j-1) * 1)) 32 | end 33 | return 0 34 | end 35 | function Resp_mt:ResultAsString(start, stop) 36 | return self.view:VectorAsString(4, start, stop) 37 | end 38 | function Resp_mt:ResultLength() 39 | local o = self.view:Offset(4) 40 | if o ~= 0 then 41 | return self.view:VectorLen(o) 42 | end 43 | return 0 44 | end 45 | function Resp.Start(builder) builder:StartObject(1) end 46 | function Resp.AddResult(builder, result) builder:PrependUOffsetTRelativeSlot(0, result, 0) end 47 | function Resp.StartResultVector(builder, numElems) return builder:StartVector(1, numElems, 1) end 48 | function Resp.End(builder) return builder:EndObject() end 49 | 50 | return Resp -- return the module -------------------------------------------------------------------------------- /lua/A6/ExtraInfo/RespBody.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: ExtraInfo 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local RespBody = {} -- the module 8 | local RespBody_mt = {} -- the class metatable 9 | 10 | function RespBody.New() 11 | local o = {} 12 | setmetatable(o, {__index = RespBody_mt}) 13 | return o 14 | end 15 | function RespBody.GetRootAsRespBody(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = RespBody.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function RespBody_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function RespBody.Start(builder) builder:StartObject(0) end 28 | function RespBody.End(builder) return builder:EndObject() end 29 | 30 | return RespBody -- return the module -------------------------------------------------------------------------------- /lua/A6/ExtraInfo/Var.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: ExtraInfo 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Var = {} -- the module 8 | local Var_mt = {} -- the class metatable 9 | 10 | function Var.New() 11 | local o = {} 12 | setmetatable(o, {__index = Var_mt}) 13 | return o 14 | end 15 | function Var.GetRootAsVar(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Var.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Var_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Var_mt:Name() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:String(o + self.view.pos) 31 | end 32 | end 33 | function Var.Start(builder) builder:StartObject(1) end 34 | function Var.AddName(builder, name) builder:PrependUOffsetTRelativeSlot(0, name, 0) end 35 | function Var.End(builder) return builder:EndObject() end 36 | 37 | return Var -- return the module -------------------------------------------------------------------------------- /lua/A6/HTTPReqCall/Action.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: HTTPReqCall 4 | 5 | local Action = { 6 | NONE = 0, 7 | Stop = 1, 8 | Rewrite = 2, 9 | } 10 | 11 | return Action -- return the module -------------------------------------------------------------------------------- /lua/A6/HTTPReqCall/Req.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: HTTPReqCall 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Req = {} -- the module 8 | local Req_mt = {} -- the class metatable 9 | 10 | function Req.New() 11 | local o = {} 12 | setmetatable(o, {__index = Req_mt}) 13 | return o 14 | end 15 | function Req.GetRootAsReq(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Req.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Req_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Req_mt:Id() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:Get(flatbuffers.N.Uint32, o + self.view.pos) 31 | end 32 | return 0 33 | end 34 | function Req_mt:SrcIp(j) 35 | local o = self.view:Offset(6) 36 | if o ~= 0 then 37 | local a = self.view:Vector(o) 38 | return self.view:Get(flatbuffers.N.Uint8, a + ((j-1) * 1)) 39 | end 40 | return 0 41 | end 42 | function Req_mt:SrcIpAsString(start, stop) 43 | return self.view:VectorAsString(6, start, stop) 44 | end 45 | function Req_mt:SrcIpLength() 46 | local o = self.view:Offset(6) 47 | if o ~= 0 then 48 | return self.view:VectorLen(o) 49 | end 50 | return 0 51 | end 52 | function Req_mt:Method() 53 | local o = self.view:Offset(8) 54 | if o ~= 0 then 55 | return self.view:Get(flatbuffers.N.Uint8, o + self.view.pos) 56 | end 57 | return 0 58 | end 59 | function Req_mt:Path() 60 | local o = self.view:Offset(10) 61 | if o ~= 0 then 62 | return self.view:String(o + self.view.pos) 63 | end 64 | end 65 | function Req_mt:Args(j) 66 | local o = self.view:Offset(12) 67 | if o ~= 0 then 68 | local x = self.view:Vector(o) 69 | x = x + ((j-1) * 4) 70 | x = self.view:Indirect(x) 71 | local obj = require('A6.TextEntry').New() 72 | obj:Init(self.view.bytes, x) 73 | return obj 74 | end 75 | end 76 | function Req_mt:ArgsLength() 77 | local o = self.view:Offset(12) 78 | if o ~= 0 then 79 | return self.view:VectorLen(o) 80 | end 81 | return 0 82 | end 83 | function Req_mt:Headers(j) 84 | local o = self.view:Offset(14) 85 | if o ~= 0 then 86 | local x = self.view:Vector(o) 87 | x = x + ((j-1) * 4) 88 | x = self.view:Indirect(x) 89 | local obj = require('A6.TextEntry').New() 90 | obj:Init(self.view.bytes, x) 91 | return obj 92 | end 93 | end 94 | function Req_mt:HeadersLength() 95 | local o = self.view:Offset(14) 96 | if o ~= 0 then 97 | return self.view:VectorLen(o) 98 | end 99 | return 0 100 | end 101 | function Req_mt:ConfToken() 102 | local o = self.view:Offset(16) 103 | if o ~= 0 then 104 | return self.view:Get(flatbuffers.N.Uint32, o + self.view.pos) 105 | end 106 | return 0 107 | end 108 | function Req.Start(builder) builder:StartObject(7) end 109 | function Req.AddId(builder, id) builder:PrependUint32Slot(0, id, 0) end 110 | function Req.AddSrcIp(builder, srcIp) builder:PrependUOffsetTRelativeSlot(1, srcIp, 0) end 111 | function Req.StartSrcIpVector(builder, numElems) return builder:StartVector(1, numElems, 1) end 112 | function Req.AddMethod(builder, method) builder:PrependUint8Slot(2, method, 0) end 113 | function Req.AddPath(builder, path) builder:PrependUOffsetTRelativeSlot(3, path, 0) end 114 | function Req.AddArgs(builder, args) builder:PrependUOffsetTRelativeSlot(4, args, 0) end 115 | function Req.StartArgsVector(builder, numElems) return builder:StartVector(4, numElems, 4) end 116 | function Req.AddHeaders(builder, headers) builder:PrependUOffsetTRelativeSlot(5, headers, 0) end 117 | function Req.StartHeadersVector(builder, numElems) return builder:StartVector(4, numElems, 4) end 118 | function Req.AddConfToken(builder, confToken) builder:PrependUint32Slot(6, confToken, 0) end 119 | function Req.End(builder) return builder:EndObject() end 120 | 121 | return Req -- return the module -------------------------------------------------------------------------------- /lua/A6/HTTPReqCall/Resp.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: HTTPReqCall 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Resp = {} -- the module 8 | local Resp_mt = {} -- the class metatable 9 | 10 | function Resp.New() 11 | local o = {} 12 | setmetatable(o, {__index = Resp_mt}) 13 | return o 14 | end 15 | function Resp.GetRootAsResp(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Resp.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Resp_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Resp_mt:Id() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:Get(flatbuffers.N.Uint32, o + self.view.pos) 31 | end 32 | return 0 33 | end 34 | function Resp_mt:ActionType() 35 | local o = self.view:Offset(6) 36 | if o ~= 0 then 37 | return self.view:Get(flatbuffers.N.Uint8, o + self.view.pos) 38 | end 39 | return 0 40 | end 41 | function Resp_mt:Action() 42 | local o = self.view:Offset(8) 43 | if o ~= 0 then 44 | local obj = flatbuffers.view.New(require('flatbuffers.binaryarray').New(0), 0) 45 | self.view:Union(obj, o) 46 | return obj 47 | end 48 | end 49 | function Resp.Start(builder) builder:StartObject(3) end 50 | function Resp.AddId(builder, id) builder:PrependUint32Slot(0, id, 0) end 51 | function Resp.AddActionType(builder, actionType) builder:PrependUint8Slot(1, actionType, 0) end 52 | function Resp.AddAction(builder, action) builder:PrependUOffsetTRelativeSlot(2, action, 0) end 53 | function Resp.End(builder) return builder:EndObject() end 54 | 55 | return Resp -- return the module -------------------------------------------------------------------------------- /lua/A6/HTTPReqCall/Rewrite.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: HTTPReqCall 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Rewrite = {} -- the module 8 | local Rewrite_mt = {} -- the class metatable 9 | 10 | function Rewrite.New() 11 | local o = {} 12 | setmetatable(o, {__index = Rewrite_mt}) 13 | return o 14 | end 15 | function Rewrite.GetRootAsRewrite(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Rewrite.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Rewrite_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Rewrite_mt:Path() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:String(o + self.view.pos) 31 | end 32 | end 33 | function Rewrite_mt:Headers(j) 34 | local o = self.view:Offset(6) 35 | if o ~= 0 then 36 | local x = self.view:Vector(o) 37 | x = x + ((j-1) * 4) 38 | x = self.view:Indirect(x) 39 | local obj = require('A6.TextEntry').New() 40 | obj:Init(self.view.bytes, x) 41 | return obj 42 | end 43 | end 44 | function Rewrite_mt:HeadersLength() 45 | local o = self.view:Offset(6) 46 | if o ~= 0 then 47 | return self.view:VectorLen(o) 48 | end 49 | return 0 50 | end 51 | function Rewrite_mt:Args(j) 52 | local o = self.view:Offset(8) 53 | if o ~= 0 then 54 | local x = self.view:Vector(o) 55 | x = x + ((j-1) * 4) 56 | x = self.view:Indirect(x) 57 | local obj = require('A6.TextEntry').New() 58 | obj:Init(self.view.bytes, x) 59 | return obj 60 | end 61 | end 62 | function Rewrite_mt:ArgsLength() 63 | local o = self.view:Offset(8) 64 | if o ~= 0 then 65 | return self.view:VectorLen(o) 66 | end 67 | return 0 68 | end 69 | function Rewrite_mt:RespHeaders(j) 70 | local o = self.view:Offset(10) 71 | if o ~= 0 then 72 | local x = self.view:Vector(o) 73 | x = x + ((j-1) * 4) 74 | x = self.view:Indirect(x) 75 | local obj = require('A6.TextEntry').New() 76 | obj:Init(self.view.bytes, x) 77 | return obj 78 | end 79 | end 80 | function Rewrite_mt:RespHeadersLength() 81 | local o = self.view:Offset(10) 82 | if o ~= 0 then 83 | return self.view:VectorLen(o) 84 | end 85 | return 0 86 | end 87 | function Rewrite_mt:Body(j) 88 | local o = self.view:Offset(12) 89 | if o ~= 0 then 90 | local a = self.view:Vector(o) 91 | return self.view:Get(flatbuffers.N.Uint8, a + ((j-1) * 1)) 92 | end 93 | return 0 94 | end 95 | function Rewrite_mt:BodyAsString(start, stop) 96 | return self.view:VectorAsString(12, start, stop) 97 | end 98 | function Rewrite_mt:BodyLength() 99 | local o = self.view:Offset(12) 100 | if o ~= 0 then 101 | return self.view:VectorLen(o) 102 | end 103 | return 0 104 | end 105 | function Rewrite.Start(builder) builder:StartObject(5) end 106 | function Rewrite.AddPath(builder, path) builder:PrependUOffsetTRelativeSlot(0, path, 0) end 107 | function Rewrite.AddHeaders(builder, headers) builder:PrependUOffsetTRelativeSlot(1, headers, 0) end 108 | function Rewrite.StartHeadersVector(builder, numElems) return builder:StartVector(4, numElems, 4) end 109 | function Rewrite.AddArgs(builder, args) builder:PrependUOffsetTRelativeSlot(2, args, 0) end 110 | function Rewrite.StartArgsVector(builder, numElems) return builder:StartVector(4, numElems, 4) end 111 | function Rewrite.AddRespHeaders(builder, respHeaders) builder:PrependUOffsetTRelativeSlot(3, respHeaders, 0) end 112 | function Rewrite.StartRespHeadersVector(builder, numElems) return builder:StartVector(4, numElems, 4) end 113 | function Rewrite.AddBody(builder, body) builder:PrependUOffsetTRelativeSlot(4, body, 0) end 114 | function Rewrite.StartBodyVector(builder, numElems) return builder:StartVector(1, numElems, 1) end 115 | function Rewrite.End(builder) return builder:EndObject() end 116 | 117 | return Rewrite -- return the module -------------------------------------------------------------------------------- /lua/A6/HTTPReqCall/Stop.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: HTTPReqCall 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Stop = {} -- the module 8 | local Stop_mt = {} -- the class metatable 9 | 10 | function Stop.New() 11 | local o = {} 12 | setmetatable(o, {__index = Stop_mt}) 13 | return o 14 | end 15 | function Stop.GetRootAsStop(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Stop.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Stop_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Stop_mt:Status() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:Get(flatbuffers.N.Uint16, o + self.view.pos) 31 | end 32 | return 0 33 | end 34 | function Stop_mt:Headers(j) 35 | local o = self.view:Offset(6) 36 | if o ~= 0 then 37 | local x = self.view:Vector(o) 38 | x = x + ((j-1) * 4) 39 | x = self.view:Indirect(x) 40 | local obj = require('A6.TextEntry').New() 41 | obj:Init(self.view.bytes, x) 42 | return obj 43 | end 44 | end 45 | function Stop_mt:HeadersLength() 46 | local o = self.view:Offset(6) 47 | if o ~= 0 then 48 | return self.view:VectorLen(o) 49 | end 50 | return 0 51 | end 52 | function Stop_mt:Body(j) 53 | local o = self.view:Offset(8) 54 | if o ~= 0 then 55 | local a = self.view:Vector(o) 56 | return self.view:Get(flatbuffers.N.Uint8, a + ((j-1) * 1)) 57 | end 58 | return 0 59 | end 60 | function Stop_mt:BodyAsString(start, stop) 61 | return self.view:VectorAsString(8, start, stop) 62 | end 63 | function Stop_mt:BodyLength() 64 | local o = self.view:Offset(8) 65 | if o ~= 0 then 66 | return self.view:VectorLen(o) 67 | end 68 | return 0 69 | end 70 | function Stop.Start(builder) builder:StartObject(3) end 71 | function Stop.AddStatus(builder, status) builder:PrependUint16Slot(0, status, 0) end 72 | function Stop.AddHeaders(builder, headers) builder:PrependUOffsetTRelativeSlot(1, headers, 0) end 73 | function Stop.StartHeadersVector(builder, numElems) return builder:StartVector(4, numElems, 4) end 74 | function Stop.AddBody(builder, body) builder:PrependUOffsetTRelativeSlot(2, body, 0) end 75 | function Stop.StartBodyVector(builder, numElems) return builder:StartVector(1, numElems, 1) end 76 | function Stop.End(builder) return builder:EndObject() end 77 | 78 | return Stop -- return the module -------------------------------------------------------------------------------- /lua/A6/HTTPRespCall/Req.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: HTTPRespCall 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Req = {} -- the module 8 | local Req_mt = {} -- the class metatable 9 | 10 | function Req.New() 11 | local o = {} 12 | setmetatable(o, {__index = Req_mt}) 13 | return o 14 | end 15 | function Req.GetRootAsReq(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Req.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Req_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Req_mt:Id() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:Get(flatbuffers.N.Uint32, o + self.view.pos) 31 | end 32 | return 0 33 | end 34 | function Req_mt:Status() 35 | local o = self.view:Offset(6) 36 | if o ~= 0 then 37 | return self.view:Get(flatbuffers.N.Uint16, o + self.view.pos) 38 | end 39 | return 0 40 | end 41 | function Req_mt:Headers(j) 42 | local o = self.view:Offset(8) 43 | if o ~= 0 then 44 | local x = self.view:Vector(o) 45 | x = x + ((j-1) * 4) 46 | x = self.view:Indirect(x) 47 | local obj = require('A6.TextEntry').New() 48 | obj:Init(self.view.bytes, x) 49 | return obj 50 | end 51 | end 52 | function Req_mt:HeadersLength() 53 | local o = self.view:Offset(8) 54 | if o ~= 0 then 55 | return self.view:VectorLen(o) 56 | end 57 | return 0 58 | end 59 | function Req_mt:ConfToken() 60 | local o = self.view:Offset(10) 61 | if o ~= 0 then 62 | return self.view:Get(flatbuffers.N.Uint32, o + self.view.pos) 63 | end 64 | return 0 65 | end 66 | function Req.Start(builder) builder:StartObject(4) end 67 | function Req.AddId(builder, id) builder:PrependUint32Slot(0, id, 0) end 68 | function Req.AddStatus(builder, status) builder:PrependUint16Slot(1, status, 0) end 69 | function Req.AddHeaders(builder, headers) builder:PrependUOffsetTRelativeSlot(2, headers, 0) end 70 | function Req.StartHeadersVector(builder, numElems) return builder:StartVector(4, numElems, 4) end 71 | function Req.AddConfToken(builder, confToken) builder:PrependUint32Slot(3, confToken, 0) end 72 | function Req.End(builder) return builder:EndObject() end 73 | 74 | return Req -- return the module -------------------------------------------------------------------------------- /lua/A6/HTTPRespCall/Resp.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: HTTPRespCall 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Resp = {} -- the module 8 | local Resp_mt = {} -- the class metatable 9 | 10 | function Resp.New() 11 | local o = {} 12 | setmetatable(o, {__index = Resp_mt}) 13 | return o 14 | end 15 | function Resp.GetRootAsResp(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Resp.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Resp_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Resp_mt:Id() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:Get(flatbuffers.N.Uint32, o + self.view.pos) 31 | end 32 | return 0 33 | end 34 | function Resp_mt:Status() 35 | local o = self.view:Offset(6) 36 | if o ~= 0 then 37 | return self.view:Get(flatbuffers.N.Uint16, o + self.view.pos) 38 | end 39 | return 0 40 | end 41 | function Resp_mt:Headers(j) 42 | local o = self.view:Offset(8) 43 | if o ~= 0 then 44 | local x = self.view:Vector(o) 45 | x = x + ((j-1) * 4) 46 | x = self.view:Indirect(x) 47 | local obj = require('A6.TextEntry').New() 48 | obj:Init(self.view.bytes, x) 49 | return obj 50 | end 51 | end 52 | function Resp_mt:HeadersLength() 53 | local o = self.view:Offset(8) 54 | if o ~= 0 then 55 | return self.view:VectorLen(o) 56 | end 57 | return 0 58 | end 59 | function Resp_mt:Body(j) 60 | local o = self.view:Offset(10) 61 | if o ~= 0 then 62 | local a = self.view:Vector(o) 63 | return self.view:Get(flatbuffers.N.Uint8, a + ((j-1) * 1)) 64 | end 65 | return 0 66 | end 67 | function Resp_mt:BodyAsString(start, stop) 68 | return self.view:VectorAsString(10, start, stop) 69 | end 70 | function Resp_mt:BodyLength() 71 | local o = self.view:Offset(10) 72 | if o ~= 0 then 73 | return self.view:VectorLen(o) 74 | end 75 | return 0 76 | end 77 | function Resp.Start(builder) builder:StartObject(4) end 78 | function Resp.AddId(builder, id) builder:PrependUint32Slot(0, id, 0) end 79 | function Resp.AddStatus(builder, status) builder:PrependUint16Slot(1, status, 0) end 80 | function Resp.AddHeaders(builder, headers) builder:PrependUOffsetTRelativeSlot(2, headers, 0) end 81 | function Resp.StartHeadersVector(builder, numElems) return builder:StartVector(4, numElems, 4) end 82 | function Resp.AddBody(builder, body) builder:PrependUOffsetTRelativeSlot(3, body, 0) end 83 | function Resp.StartBodyVector(builder, numElems) return builder:StartVector(1, numElems, 1) end 84 | function Resp.End(builder) return builder:EndObject() end 85 | 86 | return Resp -- return the module -------------------------------------------------------------------------------- /lua/A6/Method.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: A6 4 | 5 | local Method = { 6 | GET = 0, 7 | HEAD = 1, 8 | POST = 2, 9 | PUT = 3, 10 | DELETE = 4, 11 | MKCOL = 5, 12 | COPY = 6, 13 | MOVE = 7, 14 | OPTIONS = 8, 15 | PROPFIND = 9, 16 | PROPPATCH = 10, 17 | LOCK = 11, 18 | UNLOCK = 12, 19 | PATCH = 13, 20 | TRACE = 14, 21 | } 22 | 23 | return Method -- return the module -------------------------------------------------------------------------------- /lua/A6/PrepareConf/Req.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: PrepareConf 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Req = {} -- the module 8 | local Req_mt = {} -- the class metatable 9 | 10 | function Req.New() 11 | local o = {} 12 | setmetatable(o, {__index = Req_mt}) 13 | return o 14 | end 15 | function Req.GetRootAsReq(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Req.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Req_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Req_mt:Conf(j) 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | local x = self.view:Vector(o) 31 | x = x + ((j-1) * 4) 32 | x = self.view:Indirect(x) 33 | local obj = require('A6.TextEntry').New() 34 | obj:Init(self.view.bytes, x) 35 | return obj 36 | end 37 | end 38 | function Req_mt:ConfLength() 39 | local o = self.view:Offset(4) 40 | if o ~= 0 then 41 | return self.view:VectorLen(o) 42 | end 43 | return 0 44 | end 45 | function Req_mt:Key() 46 | local o = self.view:Offset(6) 47 | if o ~= 0 then 48 | return self.view:String(o + self.view.pos) 49 | end 50 | end 51 | function Req.Start(builder) builder:StartObject(2) end 52 | function Req.AddConf(builder, conf) builder:PrependUOffsetTRelativeSlot(0, conf, 0) end 53 | function Req.StartConfVector(builder, numElems) return builder:StartVector(4, numElems, 4) end 54 | function Req.AddKey(builder, key) builder:PrependUOffsetTRelativeSlot(1, key, 0) end 55 | function Req.End(builder) return builder:EndObject() end 56 | 57 | return Req -- return the module -------------------------------------------------------------------------------- /lua/A6/PrepareConf/Resp.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: PrepareConf 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local Resp = {} -- the module 8 | local Resp_mt = {} -- the class metatable 9 | 10 | function Resp.New() 11 | local o = {} 12 | setmetatable(o, {__index = Resp_mt}) 13 | return o 14 | end 15 | function Resp.GetRootAsResp(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = Resp.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function Resp_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function Resp_mt:ConfToken() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:Get(flatbuffers.N.Uint32, o + self.view.pos) 31 | end 32 | return 0 33 | end 34 | function Resp.Start(builder) builder:StartObject(1) end 35 | function Resp.AddConfToken(builder, confToken) builder:PrependUint32Slot(0, confToken, 0) end 36 | function Resp.End(builder) return builder:EndObject() end 37 | 38 | return Resp -- return the module -------------------------------------------------------------------------------- /lua/A6/TextEntry.lua: -------------------------------------------------------------------------------- 1 | -- automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | -- namespace: A6 4 | 5 | local flatbuffers = require('flatbuffers') 6 | 7 | local TextEntry = {} -- the module 8 | local TextEntry_mt = {} -- the class metatable 9 | 10 | function TextEntry.New() 11 | local o = {} 12 | setmetatable(o, {__index = TextEntry_mt}) 13 | return o 14 | end 15 | function TextEntry.GetRootAsTextEntry(buf, offset) 16 | if type(buf) == "string" then 17 | buf = flatbuffers.binaryArray.New(buf) 18 | end 19 | local n = flatbuffers.N.UOffsetT:Unpack(buf, offset) 20 | local o = TextEntry.New() 21 | o:Init(buf, n + offset) 22 | return o 23 | end 24 | function TextEntry_mt:Init(buf, pos) 25 | self.view = flatbuffers.view.New(buf, pos) 26 | end 27 | function TextEntry_mt:Name() 28 | local o = self.view:Offset(4) 29 | if o ~= 0 then 30 | return self.view:String(o + self.view.pos) 31 | end 32 | end 33 | function TextEntry_mt:Value() 34 | local o = self.view:Offset(6) 35 | if o ~= 0 then 36 | return self.view:String(o + self.view.pos) 37 | end 38 | end 39 | function TextEntry.Start(builder) builder:StartObject(2) end 40 | function TextEntry.AddName(builder, name) builder:PrependUOffsetTRelativeSlot(0, name, 0) end 41 | function TextEntry.AddValue(builder, value) builder:PrependUOffsetTRelativeSlot(1, value, 0) end 42 | function TextEntry.End(builder) return builder:EndObject() end 43 | 44 | return TextEntry -- return the module -------------------------------------------------------------------------------- /lua/flatbuffers.lua: -------------------------------------------------------------------------------- 1 | local m = {} 2 | 3 | m.Builder = require("flatbuffers.builder").New 4 | m.N = require("flatbuffers.numTypes") 5 | m.view = require("flatbuffers.view") 6 | m.binaryArray = require("flatbuffers.binaryarray") 7 | 8 | return m -------------------------------------------------------------------------------- /lua/flatbuffers/binaryarray.lua: -------------------------------------------------------------------------------- 1 | local compat = require("flatbuffers.compat") 2 | -- locals for slightly faster access 3 | local string_pack = compat.string_pack 4 | local string_unpack = compat.string_unpack 5 | 6 | 7 | local m = {} -- the module table 8 | 9 | local mt = {} -- the module metatable 10 | 11 | -- given a binary array, set a metamethod to return its length 12 | -- (e.g., #binaryArray, calls this) 13 | function mt:__len() 14 | return self.size 15 | end 16 | 17 | -- Create a new binary array of an initial size 18 | function m.New(sizeOrString) 19 | -- the array storage itself 20 | local o = {} 21 | 22 | if type(sizeOrString) == "string" then 23 | o.str = sizeOrString 24 | o.size = #sizeOrString 25 | elseif type(sizeOrString) == "number" then 26 | o.data = {} 27 | o.size = sizeOrString 28 | else 29 | error("Expect a integer size value or string to construct a binary array") 30 | end 31 | -- set the inheritance 32 | setmetatable(o, {__index = mt, __len = mt.__len}) 33 | return o 34 | end 35 | 36 | -- Get a slice of the binary array from start to end position 37 | function mt:Slice(startPos, endPos) 38 | startPos = startPos or 0 39 | endPos = endPos or self.size 40 | local d = self.data 41 | if d then 42 | -- if the self.data is defined, we are building the buffer 43 | -- in a Lua table 44 | 45 | -- new table to store the slice components 46 | local b = {} 47 | 48 | -- starting with the startPos, put all 49 | -- values into the new table to be concat later 50 | -- updated the startPos based on the size of the 51 | -- value 52 | while startPos < endPos do 53 | local v = d[startPos] 54 | if not v or v == "" then 55 | v = '/0' 56 | end 57 | table.insert(b, v) 58 | startPos = startPos + #v 59 | end 60 | 61 | -- combine the table of strings into one string 62 | -- this is faster than doing a bunch of concats by themselves 63 | return table.concat(b) 64 | else 65 | -- n.b start/endPos are 0-based incoming, so need to convert 66 | -- correctly. in python a slice includes start -> end - 1 67 | return self.str:sub(startPos+1, endPos) 68 | end 69 | end 70 | 71 | -- Grow the binary array to a new size, placing the exisiting data 72 | -- at then end of the new array 73 | function mt:Grow(newsize) 74 | -- the new table to store the data 75 | local newT = {} 76 | 77 | -- the offset to be applied to existing entries 78 | local offset = newsize - self.size 79 | 80 | -- loop over all the current entries and 81 | -- add them to the new table at the correct 82 | -- offset location 83 | local d = self.data 84 | for i,data in pairs(d) do 85 | newT[i + offset] = data 86 | end 87 | 88 | -- update this storage with the new table and size 89 | self.data = newT 90 | self.size = newsize 91 | end 92 | 93 | -- memorization for padding strings 94 | local pads = {} 95 | 96 | -- pad the binary with n \0 bytes at the starting position 97 | function mt:Pad(n, startPos) 98 | -- use memorization to avoid creating a bunch of strings 99 | -- all the time 100 | local s = pads[n] 101 | if not s then 102 | s = string.rep('\0', n) 103 | pads[n] = s 104 | end 105 | 106 | -- store the padding string at the start position in the 107 | -- Lua table 108 | self.data[startPos] = s 109 | end 110 | 111 | -- Sets the binary array value at the specified position 112 | function mt:Set(value, position) 113 | self.data[position] = value 114 | end 115 | 116 | -- Pack the data into a binary representation 117 | function m.Pack(fmt, ...) 118 | return string_pack(fmt, ...) 119 | end 120 | 121 | -- Unpack the data from a binary representation in 122 | -- a Lua value 123 | function m.Unpack(fmt, s, pos) 124 | return string_unpack(fmt, s.str, pos + 1) 125 | end 126 | 127 | -- Return the binary array module 128 | return m -------------------------------------------------------------------------------- /lua/flatbuffers/compat.lua: -------------------------------------------------------------------------------- 1 | local compats = { 2 | ["Lua 5.1"] = function() 3 | -- Check if Lua JIT is installed first 4 | local ok = pcall(require, "jit") 5 | if not ok then 6 | return require("flatbuffers.compat_5_1") 7 | else 8 | return require("flatbuffers.compat_luajit") 9 | end 10 | end, 11 | ["Lua 5.2"] = function() return require("flatbuffers.compat_5_1") end, 12 | ["Lua 5.3"] = function() return require("flatbuffers.compat_5_3") end, 13 | ["Lua 5.4"] = function() return require("flatbuffers.compat_5_3") end, 14 | } 15 | return assert(compats[_VERSION], "Unsupported Lua Version: ".._VERSION)() -------------------------------------------------------------------------------- /lua/flatbuffers/compat_5_1.lua: -------------------------------------------------------------------------------- 1 | local m = {} 2 | local ok, bit = pcall(require, "bit32") 3 | assert(ok, "The Bit32 library must be installed") 4 | assert(pcall(require, "compat53"), "The Compat 5.3 library must be installed") 5 | 6 | m.GetAlignSize = function(k, size) 7 | return bit.band(bit.bnot(k) + 1,(size - 1)) 8 | end 9 | 10 | if not table.unpack then 11 | table.unpack = unpack 12 | end 13 | 14 | if not table.pack then 15 | table.pack = pack 16 | end 17 | 18 | m.string_pack = string.pack 19 | m.string_unpack = string.unpack 20 | 21 | return m 22 | -------------------------------------------------------------------------------- /lua/flatbuffers/compat_5_3.lua: -------------------------------------------------------------------------------- 1 | -- We need to put it into a separate file to avoid syntax error like `unexpected symbol near '~'` 2 | local m = {} 3 | 4 | 5 | m.GetAlignSize = function(k, size) 6 | return ((~k) + 1) & (size - 1) 7 | end 8 | 9 | 10 | m.string_pack = string.pack 11 | m.string_unpack = string.unpack 12 | 13 | 14 | return m 15 | -------------------------------------------------------------------------------- /lua/flatbuffers/view.lua: -------------------------------------------------------------------------------- 1 | local compat = require("flatbuffers.compat") 2 | local string_unpack = compat.string_unpack 3 | 4 | 5 | local m = {} 6 | local mt = {} 7 | 8 | local mt_name = "flatbuffers.view.mt" 9 | 10 | local N = require("flatbuffers.numTypes") 11 | local binaryarray = require("flatbuffers.binaryarray") 12 | 13 | local function enforceOffset(off) 14 | if off < 0 or off > 42949672951 then 15 | error("Offset is not valid") 16 | end 17 | end 18 | 19 | local function unPackUoffset(bytes, off) 20 | return string_unpack("= 0; i--) { 60 | builder.addInt8(data[i]!); 61 | } 62 | return builder.endVector(); 63 | } 64 | 65 | static startValueVector(builder:flatbuffers.Builder, numElems:number) { 66 | builder.startVector(1, numElems, 1); 67 | } 68 | 69 | static endDataEntry(builder:flatbuffers.Builder):flatbuffers.Offset { 70 | const offset = builder.endObject(); 71 | return offset; 72 | } 73 | 74 | static createDataEntry(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, valueOffset:flatbuffers.Offset):flatbuffers.Offset { 75 | DataEntry.startDataEntry(builder); 76 | DataEntry.addName(builder, nameOffset); 77 | DataEntry.addValue(builder, valueOffset); 78 | return DataEntry.endDataEntry(builder); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /typescript/a6/err/code.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | export enum Code{ 4 | BAD_REQUEST = 0, 5 | SERVICE_UNAVAILABLE = 1, 6 | CONF_TOKEN_NOT_FOUND = 2 7 | } 8 | 9 | -------------------------------------------------------------------------------- /typescript/a6/err/resp.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | import { Code } from '../../a6/err/code'; 6 | 7 | 8 | export class Resp { 9 | bb: flatbuffers.ByteBuffer|null = null; 10 | bb_pos = 0; 11 | __init(i:number, bb:flatbuffers.ByteBuffer):Resp { 12 | this.bb_pos = i; 13 | this.bb = bb; 14 | return this; 15 | } 16 | 17 | static getRootAsResp(bb:flatbuffers.ByteBuffer, obj?:Resp):Resp { 18 | return (obj || new Resp()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 19 | } 20 | 21 | static getSizePrefixedRootAsResp(bb:flatbuffers.ByteBuffer, obj?:Resp):Resp { 22 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 23 | return (obj || new Resp()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 24 | } 25 | 26 | code():Code { 27 | const offset = this.bb!.__offset(this.bb_pos, 4); 28 | return offset ? this.bb!.readUint8(this.bb_pos + offset) : Code.BAD_REQUEST; 29 | } 30 | 31 | static startResp(builder:flatbuffers.Builder) { 32 | builder.startObject(1); 33 | } 34 | 35 | static addCode(builder:flatbuffers.Builder, code:Code) { 36 | builder.addFieldInt8(0, code, Code.BAD_REQUEST); 37 | } 38 | 39 | static endResp(builder:flatbuffers.Builder):flatbuffers.Offset { 40 | const offset = builder.endObject(); 41 | return offset; 42 | } 43 | 44 | static createResp(builder:flatbuffers.Builder, code:Code):flatbuffers.Offset { 45 | Resp.startResp(builder); 46 | Resp.addCode(builder, code); 47 | return Resp.endResp(builder); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /typescript/a6/extra-info/info.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import { ReqBody } from '../../a6/extra-info/req-body'; 4 | import { RespBody } from '../../a6/extra-info/resp-body'; 5 | import { Var } from '../../a6/extra-info/var'; 6 | 7 | 8 | export enum Info{ 9 | NONE = 0, 10 | Var = 1, 11 | ReqBody = 2, 12 | RespBody = 3 13 | } 14 | 15 | export function unionToInfo( 16 | type: Info, 17 | accessor: (obj:ReqBody|RespBody|Var) => ReqBody|RespBody|Var|null 18 | ): ReqBody|RespBody|Var|null { 19 | switch(Info[type]) { 20 | case 'NONE': return null; 21 | case 'Var': return accessor(new Var())! as Var; 22 | case 'ReqBody': return accessor(new ReqBody())! as ReqBody; 23 | case 'RespBody': return accessor(new RespBody())! as RespBody; 24 | default: return null; 25 | } 26 | } 27 | 28 | export function unionListToInfo( 29 | type: Info, 30 | accessor: (index: number, obj:ReqBody|RespBody|Var) => ReqBody|RespBody|Var|null, 31 | index: number 32 | ): ReqBody|RespBody|Var|null { 33 | switch(Info[type]) { 34 | case 'NONE': return null; 35 | case 'Var': return accessor(index, new Var())! as Var; 36 | case 'ReqBody': return accessor(index, new ReqBody())! as ReqBody; 37 | case 'RespBody': return accessor(index, new RespBody())! as RespBody; 38 | default: return null; 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /typescript/a6/extra-info/req-body.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | export class ReqBody { 6 | bb: flatbuffers.ByteBuffer|null = null; 7 | bb_pos = 0; 8 | __init(i:number, bb:flatbuffers.ByteBuffer):ReqBody { 9 | this.bb_pos = i; 10 | this.bb = bb; 11 | return this; 12 | } 13 | 14 | static getRootAsReqBody(bb:flatbuffers.ByteBuffer, obj?:ReqBody):ReqBody { 15 | return (obj || new ReqBody()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 16 | } 17 | 18 | static getSizePrefixedRootAsReqBody(bb:flatbuffers.ByteBuffer, obj?:ReqBody):ReqBody { 19 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 20 | return (obj || new ReqBody()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 21 | } 22 | 23 | static startReqBody(builder:flatbuffers.Builder) { 24 | builder.startObject(0); 25 | } 26 | 27 | static endReqBody(builder:flatbuffers.Builder):flatbuffers.Offset { 28 | const offset = builder.endObject(); 29 | return offset; 30 | } 31 | 32 | static createReqBody(builder:flatbuffers.Builder):flatbuffers.Offset { 33 | ReqBody.startReqBody(builder); 34 | return ReqBody.endReqBody(builder); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /typescript/a6/extra-info/req.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | import { Info, unionToInfo, unionListToInfo } from '../../a6/extra-info/info'; 6 | 7 | 8 | export class Req { 9 | bb: flatbuffers.ByteBuffer|null = null; 10 | bb_pos = 0; 11 | __init(i:number, bb:flatbuffers.ByteBuffer):Req { 12 | this.bb_pos = i; 13 | this.bb = bb; 14 | return this; 15 | } 16 | 17 | static getRootAsReq(bb:flatbuffers.ByteBuffer, obj?:Req):Req { 18 | return (obj || new Req()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 19 | } 20 | 21 | static getSizePrefixedRootAsReq(bb:flatbuffers.ByteBuffer, obj?:Req):Req { 22 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 23 | return (obj || new Req()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 24 | } 25 | 26 | infoType():Info { 27 | const offset = this.bb!.__offset(this.bb_pos, 4); 28 | return offset ? this.bb!.readUint8(this.bb_pos + offset) : Info.NONE; 29 | } 30 | 31 | info(obj:any):any|null { 32 | const offset = this.bb!.__offset(this.bb_pos, 6); 33 | return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null; 34 | } 35 | 36 | static startReq(builder:flatbuffers.Builder) { 37 | builder.startObject(2); 38 | } 39 | 40 | static addInfoType(builder:flatbuffers.Builder, infoType:Info) { 41 | builder.addFieldInt8(0, infoType, Info.NONE); 42 | } 43 | 44 | static addInfo(builder:flatbuffers.Builder, infoOffset:flatbuffers.Offset) { 45 | builder.addFieldOffset(1, infoOffset, 0); 46 | } 47 | 48 | static endReq(builder:flatbuffers.Builder):flatbuffers.Offset { 49 | const offset = builder.endObject(); 50 | return offset; 51 | } 52 | 53 | static createReq(builder:flatbuffers.Builder, infoType:Info, infoOffset:flatbuffers.Offset):flatbuffers.Offset { 54 | Req.startReq(builder); 55 | Req.addInfoType(builder, infoType); 56 | Req.addInfo(builder, infoOffset); 57 | return Req.endReq(builder); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /typescript/a6/extra-info/resp-body.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | export class RespBody { 6 | bb: flatbuffers.ByteBuffer|null = null; 7 | bb_pos = 0; 8 | __init(i:number, bb:flatbuffers.ByteBuffer):RespBody { 9 | this.bb_pos = i; 10 | this.bb = bb; 11 | return this; 12 | } 13 | 14 | static getRootAsRespBody(bb:flatbuffers.ByteBuffer, obj?:RespBody):RespBody { 15 | return (obj || new RespBody()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 16 | } 17 | 18 | static getSizePrefixedRootAsRespBody(bb:flatbuffers.ByteBuffer, obj?:RespBody):RespBody { 19 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 20 | return (obj || new RespBody()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 21 | } 22 | 23 | static startRespBody(builder:flatbuffers.Builder) { 24 | builder.startObject(0); 25 | } 26 | 27 | static endRespBody(builder:flatbuffers.Builder):flatbuffers.Offset { 28 | const offset = builder.endObject(); 29 | return offset; 30 | } 31 | 32 | static createRespBody(builder:flatbuffers.Builder):flatbuffers.Offset { 33 | RespBody.startRespBody(builder); 34 | return RespBody.endRespBody(builder); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /typescript/a6/extra-info/resp.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | export class Resp { 6 | bb: flatbuffers.ByteBuffer|null = null; 7 | bb_pos = 0; 8 | __init(i:number, bb:flatbuffers.ByteBuffer):Resp { 9 | this.bb_pos = i; 10 | this.bb = bb; 11 | return this; 12 | } 13 | 14 | static getRootAsResp(bb:flatbuffers.ByteBuffer, obj?:Resp):Resp { 15 | return (obj || new Resp()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 16 | } 17 | 18 | static getSizePrefixedRootAsResp(bb:flatbuffers.ByteBuffer, obj?:Resp):Resp { 19 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 20 | return (obj || new Resp()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 21 | } 22 | 23 | result(index: number):number|null { 24 | const offset = this.bb!.__offset(this.bb_pos, 4); 25 | return offset ? this.bb!.readUint8(this.bb!.__vector(this.bb_pos + offset) + index) : 0; 26 | } 27 | 28 | resultLength():number { 29 | const offset = this.bb!.__offset(this.bb_pos, 4); 30 | return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; 31 | } 32 | 33 | resultArray():Uint8Array|null { 34 | const offset = this.bb!.__offset(this.bb_pos, 4); 35 | return offset ? new Uint8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null; 36 | } 37 | 38 | static startResp(builder:flatbuffers.Builder) { 39 | builder.startObject(1); 40 | } 41 | 42 | static addResult(builder:flatbuffers.Builder, resultOffset:flatbuffers.Offset) { 43 | builder.addFieldOffset(0, resultOffset, 0); 44 | } 45 | 46 | static createResultVector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset { 47 | builder.startVector(1, data.length, 1); 48 | for (let i = data.length - 1; i >= 0; i--) { 49 | builder.addInt8(data[i]!); 50 | } 51 | return builder.endVector(); 52 | } 53 | 54 | static startResultVector(builder:flatbuffers.Builder, numElems:number) { 55 | builder.startVector(1, numElems, 1); 56 | } 57 | 58 | static endResp(builder:flatbuffers.Builder):flatbuffers.Offset { 59 | const offset = builder.endObject(); 60 | return offset; 61 | } 62 | 63 | static createResp(builder:flatbuffers.Builder, resultOffset:flatbuffers.Offset):flatbuffers.Offset { 64 | Resp.startResp(builder); 65 | Resp.addResult(builder, resultOffset); 66 | return Resp.endResp(builder); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /typescript/a6/extra-info/var.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | export class Var { 6 | bb: flatbuffers.ByteBuffer|null = null; 7 | bb_pos = 0; 8 | __init(i:number, bb:flatbuffers.ByteBuffer):Var { 9 | this.bb_pos = i; 10 | this.bb = bb; 11 | return this; 12 | } 13 | 14 | static getRootAsVar(bb:flatbuffers.ByteBuffer, obj?:Var):Var { 15 | return (obj || new Var()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 16 | } 17 | 18 | static getSizePrefixedRootAsVar(bb:flatbuffers.ByteBuffer, obj?:Var):Var { 19 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 20 | return (obj || new Var()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 21 | } 22 | 23 | name():string|null 24 | name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null 25 | name(optionalEncoding?:any):string|Uint8Array|null { 26 | const offset = this.bb!.__offset(this.bb_pos, 4); 27 | return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; 28 | } 29 | 30 | static startVar(builder:flatbuffers.Builder) { 31 | builder.startObject(1); 32 | } 33 | 34 | static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) { 35 | builder.addFieldOffset(0, nameOffset, 0); 36 | } 37 | 38 | static endVar(builder:flatbuffers.Builder):flatbuffers.Offset { 39 | const offset = builder.endObject(); 40 | return offset; 41 | } 42 | 43 | static createVar(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset):flatbuffers.Offset { 44 | Var.startVar(builder); 45 | Var.addName(builder, nameOffset); 46 | return Var.endVar(builder); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /typescript/a6/h-t-t-p-req-call/action.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import { Rewrite } from '../../a6/h-t-t-p-req-call/rewrite'; 4 | import { Stop } from '../../a6/h-t-t-p-req-call/stop'; 5 | 6 | 7 | export enum Action{ 8 | NONE = 0, 9 | Stop = 1, 10 | Rewrite = 2 11 | } 12 | 13 | export function unionToAction( 14 | type: Action, 15 | accessor: (obj:Rewrite|Stop) => Rewrite|Stop|null 16 | ): Rewrite|Stop|null { 17 | switch(Action[type]) { 18 | case 'NONE': return null; 19 | case 'Stop': return accessor(new Stop())! as Stop; 20 | case 'Rewrite': return accessor(new Rewrite())! as Rewrite; 21 | default: return null; 22 | } 23 | } 24 | 25 | export function unionListToAction( 26 | type: Action, 27 | accessor: (index: number, obj:Rewrite|Stop) => Rewrite|Stop|null, 28 | index: number 29 | ): Rewrite|Stop|null { 30 | switch(Action[type]) { 31 | case 'NONE': return null; 32 | case 'Stop': return accessor(index, new Stop())! as Stop; 33 | case 'Rewrite': return accessor(index, new Rewrite())! as Rewrite; 34 | default: return null; 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /typescript/a6/h-t-t-p-req-call/resp.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | import { Action, unionToAction, unionListToAction } from '../../a6/h-t-t-p-req-call/action'; 6 | 7 | 8 | export class Resp { 9 | bb: flatbuffers.ByteBuffer|null = null; 10 | bb_pos = 0; 11 | __init(i:number, bb:flatbuffers.ByteBuffer):Resp { 12 | this.bb_pos = i; 13 | this.bb = bb; 14 | return this; 15 | } 16 | 17 | static getRootAsResp(bb:flatbuffers.ByteBuffer, obj?:Resp):Resp { 18 | return (obj || new Resp()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 19 | } 20 | 21 | static getSizePrefixedRootAsResp(bb:flatbuffers.ByteBuffer, obj?:Resp):Resp { 22 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 23 | return (obj || new Resp()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 24 | } 25 | 26 | id():number { 27 | const offset = this.bb!.__offset(this.bb_pos, 4); 28 | return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; 29 | } 30 | 31 | actionType():Action { 32 | const offset = this.bb!.__offset(this.bb_pos, 6); 33 | return offset ? this.bb!.readUint8(this.bb_pos + offset) : Action.NONE; 34 | } 35 | 36 | action(obj:any):any|null { 37 | const offset = this.bb!.__offset(this.bb_pos, 8); 38 | return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null; 39 | } 40 | 41 | static startResp(builder:flatbuffers.Builder) { 42 | builder.startObject(3); 43 | } 44 | 45 | static addId(builder:flatbuffers.Builder, id:number) { 46 | builder.addFieldInt32(0, id, 0); 47 | } 48 | 49 | static addActionType(builder:flatbuffers.Builder, actionType:Action) { 50 | builder.addFieldInt8(1, actionType, Action.NONE); 51 | } 52 | 53 | static addAction(builder:flatbuffers.Builder, actionOffset:flatbuffers.Offset) { 54 | builder.addFieldOffset(2, actionOffset, 0); 55 | } 56 | 57 | static endResp(builder:flatbuffers.Builder):flatbuffers.Offset { 58 | const offset = builder.endObject(); 59 | return offset; 60 | } 61 | 62 | static createResp(builder:flatbuffers.Builder, id:number, actionType:Action, actionOffset:flatbuffers.Offset):flatbuffers.Offset { 63 | Resp.startResp(builder); 64 | Resp.addId(builder, id); 65 | Resp.addActionType(builder, actionType); 66 | Resp.addAction(builder, actionOffset); 67 | return Resp.endResp(builder); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /typescript/a6/h-t-t-p-req-call/stop.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | import { TextEntry } from '../../a6/text-entry'; 6 | 7 | 8 | export class Stop { 9 | bb: flatbuffers.ByteBuffer|null = null; 10 | bb_pos = 0; 11 | __init(i:number, bb:flatbuffers.ByteBuffer):Stop { 12 | this.bb_pos = i; 13 | this.bb = bb; 14 | return this; 15 | } 16 | 17 | static getRootAsStop(bb:flatbuffers.ByteBuffer, obj?:Stop):Stop { 18 | return (obj || new Stop()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 19 | } 20 | 21 | static getSizePrefixedRootAsStop(bb:flatbuffers.ByteBuffer, obj?:Stop):Stop { 22 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 23 | return (obj || new Stop()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 24 | } 25 | 26 | status():number { 27 | const offset = this.bb!.__offset(this.bb_pos, 4); 28 | return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; 29 | } 30 | 31 | headers(index: number, obj?:TextEntry):TextEntry|null { 32 | const offset = this.bb!.__offset(this.bb_pos, 6); 33 | return offset ? (obj || new TextEntry()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; 34 | } 35 | 36 | headersLength():number { 37 | const offset = this.bb!.__offset(this.bb_pos, 6); 38 | return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; 39 | } 40 | 41 | body(index: number):number|null { 42 | const offset = this.bb!.__offset(this.bb_pos, 8); 43 | return offset ? this.bb!.readUint8(this.bb!.__vector(this.bb_pos + offset) + index) : 0; 44 | } 45 | 46 | bodyLength():number { 47 | const offset = this.bb!.__offset(this.bb_pos, 8); 48 | return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; 49 | } 50 | 51 | bodyArray():Uint8Array|null { 52 | const offset = this.bb!.__offset(this.bb_pos, 8); 53 | return offset ? new Uint8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null; 54 | } 55 | 56 | static startStop(builder:flatbuffers.Builder) { 57 | builder.startObject(3); 58 | } 59 | 60 | static addStatus(builder:flatbuffers.Builder, status:number) { 61 | builder.addFieldInt16(0, status, 0); 62 | } 63 | 64 | static addHeaders(builder:flatbuffers.Builder, headersOffset:flatbuffers.Offset) { 65 | builder.addFieldOffset(1, headersOffset, 0); 66 | } 67 | 68 | static createHeadersVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { 69 | builder.startVector(4, data.length, 4); 70 | for (let i = data.length - 1; i >= 0; i--) { 71 | builder.addOffset(data[i]!); 72 | } 73 | return builder.endVector(); 74 | } 75 | 76 | static startHeadersVector(builder:flatbuffers.Builder, numElems:number) { 77 | builder.startVector(4, numElems, 4); 78 | } 79 | 80 | static addBody(builder:flatbuffers.Builder, bodyOffset:flatbuffers.Offset) { 81 | builder.addFieldOffset(2, bodyOffset, 0); 82 | } 83 | 84 | static createBodyVector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset { 85 | builder.startVector(1, data.length, 1); 86 | for (let i = data.length - 1; i >= 0; i--) { 87 | builder.addInt8(data[i]!); 88 | } 89 | return builder.endVector(); 90 | } 91 | 92 | static startBodyVector(builder:flatbuffers.Builder, numElems:number) { 93 | builder.startVector(1, numElems, 1); 94 | } 95 | 96 | static endStop(builder:flatbuffers.Builder):flatbuffers.Offset { 97 | const offset = builder.endObject(); 98 | return offset; 99 | } 100 | 101 | static createStop(builder:flatbuffers.Builder, status:number, headersOffset:flatbuffers.Offset, bodyOffset:flatbuffers.Offset):flatbuffers.Offset { 102 | Stop.startStop(builder); 103 | Stop.addStatus(builder, status); 104 | Stop.addHeaders(builder, headersOffset); 105 | Stop.addBody(builder, bodyOffset); 106 | return Stop.endStop(builder); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /typescript/a6/h-t-t-p-resp-call/req.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | import { TextEntry } from '../../a6/text-entry'; 6 | 7 | 8 | export class Req { 9 | bb: flatbuffers.ByteBuffer|null = null; 10 | bb_pos = 0; 11 | __init(i:number, bb:flatbuffers.ByteBuffer):Req { 12 | this.bb_pos = i; 13 | this.bb = bb; 14 | return this; 15 | } 16 | 17 | static getRootAsReq(bb:flatbuffers.ByteBuffer, obj?:Req):Req { 18 | return (obj || new Req()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 19 | } 20 | 21 | static getSizePrefixedRootAsReq(bb:flatbuffers.ByteBuffer, obj?:Req):Req { 22 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 23 | return (obj || new Req()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 24 | } 25 | 26 | id():number { 27 | const offset = this.bb!.__offset(this.bb_pos, 4); 28 | return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; 29 | } 30 | 31 | status():number { 32 | const offset = this.bb!.__offset(this.bb_pos, 6); 33 | return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; 34 | } 35 | 36 | headers(index: number, obj?:TextEntry):TextEntry|null { 37 | const offset = this.bb!.__offset(this.bb_pos, 8); 38 | return offset ? (obj || new TextEntry()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; 39 | } 40 | 41 | headersLength():number { 42 | const offset = this.bb!.__offset(this.bb_pos, 8); 43 | return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; 44 | } 45 | 46 | confToken():number { 47 | const offset = this.bb!.__offset(this.bb_pos, 10); 48 | return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; 49 | } 50 | 51 | static startReq(builder:flatbuffers.Builder) { 52 | builder.startObject(4); 53 | } 54 | 55 | static addId(builder:flatbuffers.Builder, id:number) { 56 | builder.addFieldInt32(0, id, 0); 57 | } 58 | 59 | static addStatus(builder:flatbuffers.Builder, status:number) { 60 | builder.addFieldInt16(1, status, 0); 61 | } 62 | 63 | static addHeaders(builder:flatbuffers.Builder, headersOffset:flatbuffers.Offset) { 64 | builder.addFieldOffset(2, headersOffset, 0); 65 | } 66 | 67 | static createHeadersVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { 68 | builder.startVector(4, data.length, 4); 69 | for (let i = data.length - 1; i >= 0; i--) { 70 | builder.addOffset(data[i]!); 71 | } 72 | return builder.endVector(); 73 | } 74 | 75 | static startHeadersVector(builder:flatbuffers.Builder, numElems:number) { 76 | builder.startVector(4, numElems, 4); 77 | } 78 | 79 | static addConfToken(builder:flatbuffers.Builder, confToken:number) { 80 | builder.addFieldInt32(3, confToken, 0); 81 | } 82 | 83 | static endReq(builder:flatbuffers.Builder):flatbuffers.Offset { 84 | const offset = builder.endObject(); 85 | return offset; 86 | } 87 | 88 | static createReq(builder:flatbuffers.Builder, id:number, status:number, headersOffset:flatbuffers.Offset, confToken:number):flatbuffers.Offset { 89 | Req.startReq(builder); 90 | Req.addId(builder, id); 91 | Req.addStatus(builder, status); 92 | Req.addHeaders(builder, headersOffset); 93 | Req.addConfToken(builder, confToken); 94 | return Req.endReq(builder); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /typescript/a6/h-t-t-p-resp-call/resp.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | import { TextEntry } from '../../a6/text-entry'; 6 | 7 | 8 | export class Resp { 9 | bb: flatbuffers.ByteBuffer|null = null; 10 | bb_pos = 0; 11 | __init(i:number, bb:flatbuffers.ByteBuffer):Resp { 12 | this.bb_pos = i; 13 | this.bb = bb; 14 | return this; 15 | } 16 | 17 | static getRootAsResp(bb:flatbuffers.ByteBuffer, obj?:Resp):Resp { 18 | return (obj || new Resp()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 19 | } 20 | 21 | static getSizePrefixedRootAsResp(bb:flatbuffers.ByteBuffer, obj?:Resp):Resp { 22 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 23 | return (obj || new Resp()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 24 | } 25 | 26 | id():number { 27 | const offset = this.bb!.__offset(this.bb_pos, 4); 28 | return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; 29 | } 30 | 31 | status():number { 32 | const offset = this.bb!.__offset(this.bb_pos, 6); 33 | return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; 34 | } 35 | 36 | headers(index: number, obj?:TextEntry):TextEntry|null { 37 | const offset = this.bb!.__offset(this.bb_pos, 8); 38 | return offset ? (obj || new TextEntry()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; 39 | } 40 | 41 | headersLength():number { 42 | const offset = this.bb!.__offset(this.bb_pos, 8); 43 | return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; 44 | } 45 | 46 | body(index: number):number|null { 47 | const offset = this.bb!.__offset(this.bb_pos, 10); 48 | return offset ? this.bb!.readUint8(this.bb!.__vector(this.bb_pos + offset) + index) : 0; 49 | } 50 | 51 | bodyLength():number { 52 | const offset = this.bb!.__offset(this.bb_pos, 10); 53 | return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; 54 | } 55 | 56 | bodyArray():Uint8Array|null { 57 | const offset = this.bb!.__offset(this.bb_pos, 10); 58 | return offset ? new Uint8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null; 59 | } 60 | 61 | static startResp(builder:flatbuffers.Builder) { 62 | builder.startObject(4); 63 | } 64 | 65 | static addId(builder:flatbuffers.Builder, id:number) { 66 | builder.addFieldInt32(0, id, 0); 67 | } 68 | 69 | static addStatus(builder:flatbuffers.Builder, status:number) { 70 | builder.addFieldInt16(1, status, 0); 71 | } 72 | 73 | static addHeaders(builder:flatbuffers.Builder, headersOffset:flatbuffers.Offset) { 74 | builder.addFieldOffset(2, headersOffset, 0); 75 | } 76 | 77 | static createHeadersVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { 78 | builder.startVector(4, data.length, 4); 79 | for (let i = data.length - 1; i >= 0; i--) { 80 | builder.addOffset(data[i]!); 81 | } 82 | return builder.endVector(); 83 | } 84 | 85 | static startHeadersVector(builder:flatbuffers.Builder, numElems:number) { 86 | builder.startVector(4, numElems, 4); 87 | } 88 | 89 | static addBody(builder:flatbuffers.Builder, bodyOffset:flatbuffers.Offset) { 90 | builder.addFieldOffset(3, bodyOffset, 0); 91 | } 92 | 93 | static createBodyVector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset { 94 | builder.startVector(1, data.length, 1); 95 | for (let i = data.length - 1; i >= 0; i--) { 96 | builder.addInt8(data[i]!); 97 | } 98 | return builder.endVector(); 99 | } 100 | 101 | static startBodyVector(builder:flatbuffers.Builder, numElems:number) { 102 | builder.startVector(1, numElems, 1); 103 | } 104 | 105 | static endResp(builder:flatbuffers.Builder):flatbuffers.Offset { 106 | const offset = builder.endObject(); 107 | return offset; 108 | } 109 | 110 | static createResp(builder:flatbuffers.Builder, id:number, status:number, headersOffset:flatbuffers.Offset, bodyOffset:flatbuffers.Offset):flatbuffers.Offset { 111 | Resp.startResp(builder); 112 | Resp.addId(builder, id); 113 | Resp.addStatus(builder, status); 114 | Resp.addHeaders(builder, headersOffset); 115 | Resp.addBody(builder, bodyOffset); 116 | return Resp.endResp(builder); 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /typescript/a6/method.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | export enum Method{ 4 | GET = 0, 5 | HEAD = 1, 6 | POST = 2, 7 | PUT = 3, 8 | DELETE = 4, 9 | MKCOL = 5, 10 | COPY = 6, 11 | MOVE = 7, 12 | OPTIONS = 8, 13 | PROPFIND = 9, 14 | PROPPATCH = 10, 15 | LOCK = 11, 16 | UNLOCK = 12, 17 | PATCH = 13, 18 | TRACE = 14 19 | } 20 | 21 | -------------------------------------------------------------------------------- /typescript/a6/prepare-conf/req.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | import { TextEntry } from '../../a6/text-entry'; 6 | 7 | 8 | export class Req { 9 | bb: flatbuffers.ByteBuffer|null = null; 10 | bb_pos = 0; 11 | __init(i:number, bb:flatbuffers.ByteBuffer):Req { 12 | this.bb_pos = i; 13 | this.bb = bb; 14 | return this; 15 | } 16 | 17 | static getRootAsReq(bb:flatbuffers.ByteBuffer, obj?:Req):Req { 18 | return (obj || new Req()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 19 | } 20 | 21 | static getSizePrefixedRootAsReq(bb:flatbuffers.ByteBuffer, obj?:Req):Req { 22 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 23 | return (obj || new Req()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 24 | } 25 | 26 | conf(index: number, obj?:TextEntry):TextEntry|null { 27 | const offset = this.bb!.__offset(this.bb_pos, 4); 28 | return offset ? (obj || new TextEntry()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; 29 | } 30 | 31 | confLength():number { 32 | const offset = this.bb!.__offset(this.bb_pos, 4); 33 | return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; 34 | } 35 | 36 | key():string|null 37 | key(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null 38 | key(optionalEncoding?:any):string|Uint8Array|null { 39 | const offset = this.bb!.__offset(this.bb_pos, 6); 40 | return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; 41 | } 42 | 43 | static startReq(builder:flatbuffers.Builder) { 44 | builder.startObject(2); 45 | } 46 | 47 | static addConf(builder:flatbuffers.Builder, confOffset:flatbuffers.Offset) { 48 | builder.addFieldOffset(0, confOffset, 0); 49 | } 50 | 51 | static createConfVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { 52 | builder.startVector(4, data.length, 4); 53 | for (let i = data.length - 1; i >= 0; i--) { 54 | builder.addOffset(data[i]!); 55 | } 56 | return builder.endVector(); 57 | } 58 | 59 | static startConfVector(builder:flatbuffers.Builder, numElems:number) { 60 | builder.startVector(4, numElems, 4); 61 | } 62 | 63 | static addKey(builder:flatbuffers.Builder, keyOffset:flatbuffers.Offset) { 64 | builder.addFieldOffset(1, keyOffset, 0); 65 | } 66 | 67 | static endReq(builder:flatbuffers.Builder):flatbuffers.Offset { 68 | const offset = builder.endObject(); 69 | return offset; 70 | } 71 | 72 | static createReq(builder:flatbuffers.Builder, confOffset:flatbuffers.Offset, keyOffset:flatbuffers.Offset):flatbuffers.Offset { 73 | Req.startReq(builder); 74 | Req.addConf(builder, confOffset); 75 | Req.addKey(builder, keyOffset); 76 | return Req.endReq(builder); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /typescript/a6/prepare-conf/resp.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | export class Resp { 6 | bb: flatbuffers.ByteBuffer|null = null; 7 | bb_pos = 0; 8 | __init(i:number, bb:flatbuffers.ByteBuffer):Resp { 9 | this.bb_pos = i; 10 | this.bb = bb; 11 | return this; 12 | } 13 | 14 | static getRootAsResp(bb:flatbuffers.ByteBuffer, obj?:Resp):Resp { 15 | return (obj || new Resp()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 16 | } 17 | 18 | static getSizePrefixedRootAsResp(bb:flatbuffers.ByteBuffer, obj?:Resp):Resp { 19 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 20 | return (obj || new Resp()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 21 | } 22 | 23 | confToken():number { 24 | const offset = this.bb!.__offset(this.bb_pos, 4); 25 | return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; 26 | } 27 | 28 | static startResp(builder:flatbuffers.Builder) { 29 | builder.startObject(1); 30 | } 31 | 32 | static addConfToken(builder:flatbuffers.Builder, confToken:number) { 33 | builder.addFieldInt32(0, confToken, 0); 34 | } 35 | 36 | static endResp(builder:flatbuffers.Builder):flatbuffers.Offset { 37 | const offset = builder.endObject(); 38 | return offset; 39 | } 40 | 41 | static createResp(builder:flatbuffers.Builder, confToken:number):flatbuffers.Offset { 42 | Resp.startResp(builder); 43 | Resp.addConfToken(builder, confToken); 44 | return Resp.endResp(builder); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /typescript/a6/text-entry.ts: -------------------------------------------------------------------------------- 1 | // automatically generated by the FlatBuffers compiler, do not modify 2 | 3 | import * as flatbuffers from 'flatbuffers'; 4 | 5 | export class TextEntry { 6 | bb: flatbuffers.ByteBuffer|null = null; 7 | bb_pos = 0; 8 | __init(i:number, bb:flatbuffers.ByteBuffer):TextEntry { 9 | this.bb_pos = i; 10 | this.bb = bb; 11 | return this; 12 | } 13 | 14 | static getRootAsTextEntry(bb:flatbuffers.ByteBuffer, obj?:TextEntry):TextEntry { 15 | return (obj || new TextEntry()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 16 | } 17 | 18 | static getSizePrefixedRootAsTextEntry(bb:flatbuffers.ByteBuffer, obj?:TextEntry):TextEntry { 19 | bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 20 | return (obj || new TextEntry()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 21 | } 22 | 23 | name():string|null 24 | name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null 25 | name(optionalEncoding?:any):string|Uint8Array|null { 26 | const offset = this.bb!.__offset(this.bb_pos, 4); 27 | return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; 28 | } 29 | 30 | value():string|null 31 | value(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null 32 | value(optionalEncoding?:any):string|Uint8Array|null { 33 | const offset = this.bb!.__offset(this.bb_pos, 6); 34 | return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; 35 | } 36 | 37 | static startTextEntry(builder:flatbuffers.Builder) { 38 | builder.startObject(2); 39 | } 40 | 41 | static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) { 42 | builder.addFieldOffset(0, nameOffset, 0); 43 | } 44 | 45 | static addValue(builder:flatbuffers.Builder, valueOffset:flatbuffers.Offset) { 46 | builder.addFieldOffset(1, valueOffset, 0); 47 | } 48 | 49 | static endTextEntry(builder:flatbuffers.Builder):flatbuffers.Offset { 50 | const offset = builder.endObject(); 51 | return offset; 52 | } 53 | 54 | static createTextEntry(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, valueOffset:flatbuffers.Offset):flatbuffers.Offset { 55 | TextEntry.startTextEntry(builder); 56 | TextEntry.addName(builder, nameOffset); 57 | TextEntry.addValue(builder, valueOffset); 58 | return TextEntry.endTextEntry(builder); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /typescript/ext-plugin.ts: -------------------------------------------------------------------------------- 1 | export { Code } from './a6/err/code'; 2 | export { Info, unionToInfo, unionListToInfo } from './a6/extra-info/info'; 3 | export { ReqBody } from './a6/extra-info/req-body'; 4 | export { Var } from './a6/extra-info/var'; 5 | export { Action, unionToAction, unionListToAction } from './a6/h-t-t-p-req-call/action'; 6 | export { Rewrite } from './a6/h-t-t-p-req-call/rewrite'; 7 | export { Stop } from './a6/h-t-t-p-req-call/stop'; 8 | export { Method } from './a6/method'; 9 | export { TextEntry } from './a6/text-entry'; 10 | --------------------------------------------------------------------------------