*: Execution of ./scripts/genproto.sh after versions change
parent
da5ca2c0d5
commit
cc7b4fab9f
|
@ -36,7 +36,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -300,7 +300,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -333,7 +333,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -366,7 +366,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -399,7 +399,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -432,7 +432,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -465,7 +465,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -498,7 +498,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -531,7 +531,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -564,7 +564,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -597,7 +597,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -630,7 +630,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -663,7 +663,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -696,7 +696,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -729,7 +729,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -762,7 +762,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -795,7 +795,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -828,7 +828,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -861,7 +861,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -894,7 +894,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -927,7 +927,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -960,7 +960,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -993,7 +993,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1026,7 +1026,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1069,7 +1069,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1102,7 +1102,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1135,7 +1135,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1168,7 +1168,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1201,7 +1201,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1234,7 +1234,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1267,7 +1267,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1300,7 +1300,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1342,7 +1342,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1375,7 +1375,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1408,7 +1408,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1451,7 +1451,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -1567,7 +1567,8 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"no_password": {
|
"no_password": {
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1778,7 +1779,8 @@
|
||||||
"title": "authRevision is the current revision of auth store"
|
"title": "authRevision is the current revision of auth store"
|
||||||
},
|
},
|
||||||
"enabled": {
|
"enabled": {
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
"$ref": "#/definitions/etcdserverpbResponseHeader"
|
"$ref": "#/definitions/etcdserverpbResponseHeader"
|
||||||
|
@ -1960,7 +1962,8 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"physical": {
|
"physical": {
|
||||||
"description": "physical is set so the RPC will wait until the compaction is physically\napplied to the local database such that compacted entries are totally\nremoved from the backend database.",
|
"description": "physical is set so the RPC will wait until the compaction is physically\napplied to the local database such that compacted entries are totally\nremoved from the backend database.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"revision": {
|
"revision": {
|
||||||
"description": "revision is the key-value store revision for the compaction operation.",
|
"description": "revision is the key-value store revision for the compaction operation.",
|
||||||
|
@ -2046,7 +2049,8 @@
|
||||||
},
|
},
|
||||||
"prev_kv": {
|
"prev_kv": {
|
||||||
"description": "If prev_kv is set, etcd gets the previous key-value pairs before deleting it.\nThe previous key-value pairs will be returned in the delete response.",
|
"description": "If prev_kv is set, etcd gets the previous key-value pairs before deleting it.\nThe previous key-value pairs will be returned in the delete response.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"range_end": {
|
"range_end": {
|
||||||
"description": "range_end is the key following the last key to delete for the range [key, range_end).\nIf range_end is not given, the range is defined to contain only the key argument.\nIf range_end is one bit larger than the given key, then the range is all the keys\nwith the prefix (the given key).\nIf range_end is '\\0', the range is all keys greater than or equal to the key argument.",
|
"description": "range_end is the key following the last key to delete for the range [key, range_end).\nIf range_end is not given, the range is defined to contain only the key argument.\nIf range_end is one bit larger than the given key, then the range is all the keys\nwith the prefix (the given key).\nIf range_end is '\\0', the range is all keys greater than or equal to the key argument.",
|
||||||
|
@ -2262,7 +2266,8 @@
|
||||||
},
|
},
|
||||||
"keys": {
|
"keys": {
|
||||||
"description": "keys is true to query all the keys attached to this lease.",
|
"description": "keys is true to query all the keys attached to this lease.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2314,7 +2319,8 @@
|
||||||
},
|
},
|
||||||
"isLearner": {
|
"isLearner": {
|
||||||
"description": "isLearner indicates if the member is raft learner.",
|
"description": "isLearner indicates if the member is raft learner.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "name is the human-readable name of the member. If the member is not started, the name will be an empty string.",
|
"description": "name is the human-readable name of the member. If the member is not started, the name will be an empty string.",
|
||||||
|
@ -2334,7 +2340,8 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"isLearner": {
|
"isLearner": {
|
||||||
"description": "isLearner indicates if the added member is raft learner.",
|
"description": "isLearner indicates if the added member is raft learner.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"peerURLs": {
|
"peerURLs": {
|
||||||
"description": "peerURLs is the list of URLs the added member will use to communicate with the cluster.",
|
"description": "peerURLs is the list of URLs the added member will use to communicate with the cluster.",
|
||||||
|
@ -2368,7 +2375,8 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"linearizable": {
|
"linearizable": {
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2492,11 +2500,13 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"ignore_lease": {
|
"ignore_lease": {
|
||||||
"description": "If ignore_lease is set, etcd updates the key using its current lease.\nReturns an error if the key does not exist.",
|
"description": "If ignore_lease is set, etcd updates the key using its current lease.\nReturns an error if the key does not exist.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"ignore_value": {
|
"ignore_value": {
|
||||||
"description": "If ignore_value is set, etcd updates the key using its current value.\nReturns an error if the key does not exist.",
|
"description": "If ignore_value is set, etcd updates the key using its current value.\nReturns an error if the key does not exist.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"key": {
|
"key": {
|
||||||
"description": "key is the key, in bytes, to put into the key-value store.",
|
"description": "key is the key, in bytes, to put into the key-value store.",
|
||||||
|
@ -2510,7 +2520,8 @@
|
||||||
},
|
},
|
||||||
"prev_kv": {
|
"prev_kv": {
|
||||||
"description": "If prev_kv is set, etcd gets the previous key-value pair before changing it.\nThe previous key-value pair will be returned in the put response.",
|
"description": "If prev_kv is set, etcd gets the previous key-value pair before changing it.\nThe previous key-value pair will be returned in the put response.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"value": {
|
"value": {
|
||||||
"description": "value is the value, in bytes, to associate with the key in the key-value store.",
|
"description": "value is the value, in bytes, to associate with the key in the key-value store.",
|
||||||
|
@ -2536,7 +2547,8 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"count_only": {
|
"count_only": {
|
||||||
"description": "count_only when set returns only the count of the keys in the range.",
|
"description": "count_only when set returns only the count of the keys in the range.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"key": {
|
"key": {
|
||||||
"description": "key is the first key for the range. If range_end is not given, the request only looks up key.",
|
"description": "key is the first key for the range. If range_end is not given, the request only looks up key.",
|
||||||
|
@ -2545,7 +2557,8 @@
|
||||||
},
|
},
|
||||||
"keys_only": {
|
"keys_only": {
|
||||||
"description": "keys_only when set returns only the keys and not the values.",
|
"description": "keys_only when set returns only the keys and not the values.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"limit": {
|
"limit": {
|
||||||
"description": "limit is a limit on the number of keys returned for the request. When limit is set to 0,\nit is treated as no limit.",
|
"description": "limit is a limit on the number of keys returned for the request. When limit is set to 0,\nit is treated as no limit.",
|
||||||
|
@ -2584,7 +2597,8 @@
|
||||||
},
|
},
|
||||||
"serializable": {
|
"serializable": {
|
||||||
"description": "serializable sets the range request to use serializable member-local reads.\nRange requests are linearizable by default; linearizable requests have higher\nlatency and lower throughput than serializable requests but reflect the current\nconsensus of the cluster. For better performance, in exchange for possible stale reads,\na serializable range request is served locally without needing to reach consensus\nwith other nodes in the cluster.",
|
"description": "serializable sets the range request to use serializable member-local reads.\nRange requests are linearizable by default; linearizable requests have higher\nlatency and lower throughput than serializable requests but reflect the current\nconsensus of the cluster. For better performance, in exchange for possible stale reads,\na serializable range request is served locally without needing to reach consensus\nwith other nodes in the cluster.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"sort_order": {
|
"sort_order": {
|
||||||
"description": "sort_order is the order for returned sorted results.",
|
"description": "sort_order is the order for returned sorted results.",
|
||||||
|
@ -2616,7 +2630,8 @@
|
||||||
},
|
},
|
||||||
"more": {
|
"more": {
|
||||||
"description": "more indicates if there are more keys to return in the requested range.",
|
"description": "more indicates if there are more keys to return in the requested range.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2729,7 +2744,8 @@
|
||||||
},
|
},
|
||||||
"isLearner": {
|
"isLearner": {
|
||||||
"description": "isLearner indicates if the member is raft learner.",
|
"description": "isLearner indicates if the member is raft learner.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"leader": {
|
"leader": {
|
||||||
"description": "leader is the member ID which the responding member believes is the current leader.",
|
"description": "leader is the member ID which the responding member believes is the current leader.",
|
||||||
|
@ -2799,7 +2815,8 @@
|
||||||
},
|
},
|
||||||
"succeeded": {
|
"succeeded": {
|
||||||
"description": "succeeded is set to true if the compare evaluated to true or false otherwise.",
|
"description": "succeeded is set to true if the compare evaluated to true or false otherwise.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2825,7 +2842,8 @@
|
||||||
},
|
},
|
||||||
"fragment": {
|
"fragment": {
|
||||||
"description": "fragment enables splitting large revisions into multiple watch responses.",
|
"description": "fragment enables splitting large revisions into multiple watch responses.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"key": {
|
"key": {
|
||||||
"description": "key is the key to register for watching.",
|
"description": "key is the key to register for watching.",
|
||||||
|
@ -2834,11 +2852,13 @@
|
||||||
},
|
},
|
||||||
"prev_kv": {
|
"prev_kv": {
|
||||||
"description": "If prev_kv is set, created watcher gets the previous KV before the event happens.\nIf the previous KV is already compacted, nothing will be returned.",
|
"description": "If prev_kv is set, created watcher gets the previous KV before the event happens.\nIf the previous KV is already compacted, nothing will be returned.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"progress_notify": {
|
"progress_notify": {
|
||||||
"description": "progress_notify is set so that the etcd server will periodically send a WatchResponse with\nno events to the new watcher if there are no recent events. It is useful when clients\nwish to recover a disconnected watcher starting from a recent known revision.\nThe etcd server may decide how often it will send notifications based on current load.",
|
"description": "progress_notify is set so that the etcd server will periodically send a WatchResponse with\nno events to the new watcher if there are no recent events. It is useful when clients\nwish to recover a disconnected watcher starting from a recent known revision.\nThe etcd server may decide how often it will send notifications based on current load.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"range_end": {
|
"range_end": {
|
||||||
"description": "range_end is the end of the range [key, range_end) to watch. If range_end is not given,\nonly the key argument is watched. If range_end is equal to '\\0', all keys greater than\nor equal to the key argument are watched.\nIf the range_end is one bit larger than the given key,\nthen all keys with the prefix (the given key) will be watched.",
|
"description": "range_end is the end of the range [key, range_end) to watch. If range_end is not given,\nonly the key argument is watched. If range_end is equal to '\\0', all keys greater than\nor equal to the key argument are watched.\nIf the range_end is one bit larger than the given key,\nthen all keys with the prefix (the given key) will be watched.",
|
||||||
|
@ -2884,7 +2904,8 @@
|
||||||
},
|
},
|
||||||
"canceled": {
|
"canceled": {
|
||||||
"description": "canceled is set to true if the response is for a cancel watch request.\nNo further events will be sent to the canceled watcher.",
|
"description": "canceled is set to true if the response is for a cancel watch request.\nNo further events will be sent to the canceled watcher.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"compact_revision": {
|
"compact_revision": {
|
||||||
"description": "compact_revision is set to the minimum index if a watcher tries to watch\nat a compacted index.\n\nThis happens when creating a watcher at a compacted revision or the watcher cannot\ncatch up with the progress of the key-value store.\n\nThe client should treat the watcher as canceled and should not try to create any\nwatcher with the same start_revision again.",
|
"description": "compact_revision is set to the minimum index if a watcher tries to watch\nat a compacted index.\n\nThis happens when creating a watcher at a compacted revision or the watcher cannot\ncatch up with the progress of the key-value store.\n\nThe client should treat the watcher as canceled and should not try to create any\nwatcher with the same start_revision again.",
|
||||||
|
@ -2893,7 +2914,8 @@
|
||||||
},
|
},
|
||||||
"created": {
|
"created": {
|
||||||
"description": "created is set to true if the response is for a create watch request.\nThe client should record the watch_id and expect to receive events for\nthe created watcher from the same stream.\nAll events sent to the created watcher will attach with the same watch_id.",
|
"description": "created is set to true if the response is for a create watch request.\nThe client should record the watch_id and expect to receive events for\nthe created watcher from the same stream.\nAll events sent to the created watcher will attach with the same watch_id.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"events": {
|
"events": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -2903,7 +2925,8 @@
|
||||||
},
|
},
|
||||||
"fragment": {
|
"fragment": {
|
||||||
"description": "framgment is true if large watch response was split over multiple responses.",
|
"description": "framgment is true if large watch response was split over multiple responses.",
|
||||||
"type": "boolean"
|
"type": "boolean",
|
||||||
|
"format": "boolean"
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
"$ref": "#/definitions/etcdserverpbResponseHeader"
|
"$ref": "#/definitions/etcdserverpbResponseHeader"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"description": "An unexpected error response.",
|
"description": "An unexpected error response",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/runtimeError"
|
"$ref": "#/definitions/runtimeError"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,16 @@
|
||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
// source: auth.proto
|
// source: auth.proto
|
||||||
|
|
||||||
/*
|
|
||||||
Package authpb is a generated protocol buffer package.
|
|
||||||
|
|
||||||
It is generated from these files:
|
|
||||||
auth.proto
|
|
||||||
|
|
||||||
It has these top-level messages:
|
|
||||||
UserAddOptions
|
|
||||||
User
|
|
||||||
Permission
|
|
||||||
Role
|
|
||||||
*/
|
|
||||||
package authpb
|
package authpb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
fmt "fmt"
|
||||||
|
io "io"
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
|
|
||||||
math "math"
|
math "math"
|
||||||
|
math_bits "math/bits"
|
||||||
|
|
||||||
_ "github.com/gogo/protobuf/gogoproto"
|
_ "github.com/gogo/protobuf/gogoproto"
|
||||||
|
proto "github.com/golang/protobuf/proto"
|
||||||
io "io"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -36,7 +22,7 @@ var _ = math.Inf
|
||||||
// is compatible with the proto package it is being compiled against.
|
// is compatible with the proto package it is being compiled against.
|
||||||
// A compilation error at this line likely means your copy of the
|
// A compilation error at this line likely means your copy of the
|
||||||
// proto package needs to be updated.
|
// proto package needs to be updated.
|
||||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||||
|
|
||||||
type Permission_Type int32
|
type Permission_Type int32
|
||||||
|
|
||||||
|
@ -51,6 +37,7 @@ var Permission_Type_name = map[int32]string{
|
||||||
1: "WRITE",
|
1: "WRITE",
|
||||||
2: "READWRITE",
|
2: "READWRITE",
|
||||||
}
|
}
|
||||||
|
|
||||||
var Permission_Type_value = map[string]int32{
|
var Permission_Type_value = map[string]int32{
|
||||||
"READ": 0,
|
"READ": 0,
|
||||||
"WRITE": 1,
|
"WRITE": 1,
|
||||||
|
@ -60,64 +47,220 @@ var Permission_Type_value = map[string]int32{
|
||||||
func (x Permission_Type) String() string {
|
func (x Permission_Type) String() string {
|
||||||
return proto.EnumName(Permission_Type_name, int32(x))
|
return proto.EnumName(Permission_Type_name, int32(x))
|
||||||
}
|
}
|
||||||
func (Permission_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorAuth, []int{2, 0} }
|
|
||||||
|
func (Permission_Type) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_8bbd6f3875b0e874, []int{2, 0}
|
||||||
|
}
|
||||||
|
|
||||||
type UserAddOptions struct {
|
type UserAddOptions struct {
|
||||||
NoPassword bool `protobuf:"varint,1,opt,name=no_password,json=noPassword,proto3" json:"no_password,omitempty"`
|
NoPassword bool `protobuf:"varint,1,opt,name=no_password,json=noPassword,proto3" json:"no_password,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UserAddOptions) Reset() { *m = UserAddOptions{} }
|
func (m *UserAddOptions) Reset() { *m = UserAddOptions{} }
|
||||||
func (m *UserAddOptions) String() string { return proto.CompactTextString(m) }
|
func (m *UserAddOptions) String() string { return proto.CompactTextString(m) }
|
||||||
func (*UserAddOptions) ProtoMessage() {}
|
func (*UserAddOptions) ProtoMessage() {}
|
||||||
func (*UserAddOptions) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{0} }
|
func (*UserAddOptions) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_8bbd6f3875b0e874, []int{0}
|
||||||
|
}
|
||||||
|
func (m *UserAddOptions) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *UserAddOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_UserAddOptions.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *UserAddOptions) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_UserAddOptions.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *UserAddOptions) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *UserAddOptions) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_UserAddOptions.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_UserAddOptions proto.InternalMessageInfo
|
||||||
|
|
||||||
// User is a single entry in the bucket authUsers
|
// User is a single entry in the bucket authUsers
|
||||||
type User struct {
|
type User struct {
|
||||||
Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
Password []byte `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
Password []byte `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
||||||
Roles []string `protobuf:"bytes,3,rep,name=roles" json:"roles,omitempty"`
|
Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"`
|
||||||
Options *UserAddOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"`
|
Options *UserAddOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *User) Reset() { *m = User{} }
|
func (m *User) Reset() { *m = User{} }
|
||||||
func (m *User) String() string { return proto.CompactTextString(m) }
|
func (m *User) String() string { return proto.CompactTextString(m) }
|
||||||
func (*User) ProtoMessage() {}
|
func (*User) ProtoMessage() {}
|
||||||
func (*User) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{1} }
|
func (*User) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_8bbd6f3875b0e874, []int{1}
|
||||||
|
}
|
||||||
|
func (m *User) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_User.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *User) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_User.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *User) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *User) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_User.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_User proto.InternalMessageInfo
|
||||||
|
|
||||||
// Permission is a single entity
|
// Permission is a single entity
|
||||||
type Permission struct {
|
type Permission struct {
|
||||||
PermType Permission_Type `protobuf:"varint,1,opt,name=permType,proto3,enum=authpb.Permission_Type" json:"permType,omitempty"`
|
PermType Permission_Type `protobuf:"varint,1,opt,name=permType,proto3,enum=authpb.Permission_Type" json:"permType,omitempty"`
|
||||||
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||||
RangeEnd []byte `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
|
RangeEnd []byte `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Permission) Reset() { *m = Permission{} }
|
func (m *Permission) Reset() { *m = Permission{} }
|
||||||
func (m *Permission) String() string { return proto.CompactTextString(m) }
|
func (m *Permission) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Permission) ProtoMessage() {}
|
func (*Permission) ProtoMessage() {}
|
||||||
func (*Permission) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{2} }
|
func (*Permission) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_8bbd6f3875b0e874, []int{2}
|
||||||
|
}
|
||||||
|
func (m *Permission) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *Permission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_Permission.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *Permission) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_Permission.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *Permission) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *Permission) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_Permission.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_Permission proto.InternalMessageInfo
|
||||||
|
|
||||||
// Role is a single entry in the bucket authRoles
|
// Role is a single entry in the bucket authRoles
|
||||||
type Role struct {
|
type Role struct {
|
||||||
Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
KeyPermission []*Permission `protobuf:"bytes,2,rep,name=keyPermission" json:"keyPermission,omitempty"`
|
KeyPermission []*Permission `protobuf:"bytes,2,rep,name=keyPermission,proto3" json:"keyPermission,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Role) Reset() { *m = Role{} }
|
func (m *Role) Reset() { *m = Role{} }
|
||||||
func (m *Role) String() string { return proto.CompactTextString(m) }
|
func (m *Role) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Role) ProtoMessage() {}
|
func (*Role) ProtoMessage() {}
|
||||||
func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{3} }
|
func (*Role) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_8bbd6f3875b0e874, []int{3}
|
||||||
|
}
|
||||||
|
func (m *Role) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_Role.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *Role) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_Role.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *Role) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *Role) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_Role.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_Role proto.InternalMessageInfo
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
proto.RegisterEnum("authpb.Permission_Type", Permission_Type_name, Permission_Type_value)
|
||||||
proto.RegisterType((*UserAddOptions)(nil), "authpb.UserAddOptions")
|
proto.RegisterType((*UserAddOptions)(nil), "authpb.UserAddOptions")
|
||||||
proto.RegisterType((*User)(nil), "authpb.User")
|
proto.RegisterType((*User)(nil), "authpb.User")
|
||||||
proto.RegisterType((*Permission)(nil), "authpb.Permission")
|
proto.RegisterType((*Permission)(nil), "authpb.Permission")
|
||||||
proto.RegisterType((*Role)(nil), "authpb.Role")
|
proto.RegisterType((*Role)(nil), "authpb.Role")
|
||||||
proto.RegisterEnum("authpb.Permission_Type", Permission_Type_name, Permission_Type_value)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("auth.proto", fileDescriptor_8bbd6f3875b0e874) }
|
||||||
|
|
||||||
|
var fileDescriptor_8bbd6f3875b0e874 = []byte{
|
||||||
|
// 338 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xcf, 0x4e, 0xea, 0x40,
|
||||||
|
0x14, 0xc6, 0x3b, 0xb4, 0x70, 0xdb, 0xc3, 0x85, 0x90, 0x13, 0x72, 0x6f, 0x83, 0x49, 0x6d, 0xba,
|
||||||
|
0x6a, 0x5c, 0x54, 0x85, 0x8d, 0x5b, 0x8c, 0x2c, 0x5c, 0x49, 0x26, 0x18, 0x97, 0xa4, 0xa4, 0x13,
|
||||||
|
0x24, 0xc0, 0x4c, 0x33, 0x83, 0x31, 0x6c, 0x7c, 0x0e, 0x17, 0x3e, 0x10, 0x4b, 0x1e, 0x41, 0xf0,
|
||||||
|
0x45, 0x4c, 0x67, 0xf8, 0x13, 0xa2, 0xbb, 0xef, 0x7c, 0xe7, 0xfb, 0x66, 0x7e, 0x99, 0x01, 0x48,
|
||||||
|
0x5f, 0x16, 0xcf, 0x49, 0x2e, 0xc5, 0x42, 0x60, 0xa5, 0xd0, 0xf9, 0xa8, 0xd5, 0x1c, 0x8b, 0xb1,
|
||||||
|
0xd0, 0xd6, 0x65, 0xa1, 0xcc, 0x36, 0xba, 0x86, 0xfa, 0xa3, 0x62, 0xb2, 0x9b, 0x65, 0x0f, 0xf9,
|
||||||
|
0x62, 0x22, 0xb8, 0xc2, 0x73, 0xa8, 0x72, 0x31, 0xcc, 0x53, 0xa5, 0x5e, 0x85, 0xcc, 0x7c, 0x12,
|
||||||
|
0x92, 0xd8, 0xa5, 0xc0, 0x45, 0x7f, 0xe7, 0x44, 0x6f, 0xe0, 0x14, 0x15, 0x44, 0x70, 0x78, 0x3a,
|
||||||
|
0x67, 0x3a, 0xf1, 0x97, 0x6a, 0x8d, 0x2d, 0x70, 0x0f, 0xcd, 0x92, 0xf6, 0x0f, 0x33, 0x36, 0xa1,
|
||||||
|
0x2c, 0xc5, 0x8c, 0x29, 0xdf, 0x0e, 0xed, 0xd8, 0xa3, 0x66, 0xc0, 0x2b, 0xf8, 0x23, 0xcc, 0xcd,
|
||||||
|
0xbe, 0x13, 0x92, 0xb8, 0xda, 0xfe, 0x97, 0x18, 0xe0, 0xe4, 0x94, 0x8b, 0xee, 0x63, 0xd1, 0x07,
|
||||||
|
0x01, 0xe8, 0x33, 0x39, 0x9f, 0x28, 0x35, 0x11, 0x1c, 0x3b, 0xe0, 0xe6, 0x4c, 0xce, 0x07, 0xcb,
|
||||||
|
0xdc, 0xa0, 0xd4, 0xdb, 0xff, 0xf7, 0x27, 0x1c, 0x53, 0x49, 0xb1, 0xa6, 0x87, 0x20, 0x36, 0xc0,
|
||||||
|
0x9e, 0xb2, 0xe5, 0x0e, 0xb1, 0x90, 0x78, 0x06, 0x9e, 0x4c, 0xf9, 0x98, 0x0d, 0x19, 0xcf, 0x7c,
|
||||||
|
0xdb, 0xa0, 0x6b, 0xa3, 0xc7, 0xb3, 0xe8, 0x02, 0x1c, 0x5d, 0x73, 0xc1, 0xa1, 0xbd, 0xee, 0x5d,
|
||||||
|
0xc3, 0x42, 0x0f, 0xca, 0x4f, 0xf4, 0x7e, 0xd0, 0x6b, 0x10, 0xac, 0x81, 0x57, 0x98, 0x66, 0x2c,
|
||||||
|
0x45, 0x03, 0x70, 0xa8, 0x98, 0xb1, 0x5f, 0x9f, 0xe7, 0x06, 0x6a, 0x53, 0xb6, 0x3c, 0x62, 0xf9,
|
||||||
|
0xa5, 0xd0, 0x8e, 0xab, 0x6d, 0xfc, 0x09, 0x4c, 0x4f, 0x83, 0xb7, 0xfe, 0x6a, 0x13, 0x58, 0xeb,
|
||||||
|
0x4d, 0x60, 0xad, 0xb6, 0x01, 0x59, 0x6f, 0x03, 0xf2, 0xb9, 0x0d, 0xc8, 0xfb, 0x57, 0x60, 0x8d,
|
||||||
|
0x2a, 0xfa, 0x23, 0x3b, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x61, 0x66, 0xc6, 0x9d, 0xf4, 0x01,
|
||||||
|
0x00, 0x00,
|
||||||
|
}
|
||||||
|
|
||||||
func (m *UserAddOptions) Marshal() (dAtA []byte, err error) {
|
func (m *UserAddOptions) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -125,27 +268,36 @@ func (m *UserAddOptions) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UserAddOptions) MarshalTo(dAtA []byte) (int, error) {
|
func (m *UserAddOptions) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *UserAddOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
i -= len(m.XXX_unrecognized)
|
||||||
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
|
}
|
||||||
if m.NoPassword {
|
if m.NoPassword {
|
||||||
dAtA[i] = 0x8
|
i--
|
||||||
i++
|
|
||||||
if m.NoPassword {
|
if m.NoPassword {
|
||||||
dAtA[i] = 1
|
dAtA[i] = 1
|
||||||
} else {
|
} else {
|
||||||
dAtA[i] = 0
|
dAtA[i] = 0
|
||||||
}
|
}
|
||||||
i++
|
i--
|
||||||
|
dAtA[i] = 0x8
|
||||||
}
|
}
|
||||||
return i, nil
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *User) Marshal() (dAtA []byte, err error) {
|
func (m *User) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -153,54 +305,61 @@ func (m *User) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *User) MarshalTo(dAtA []byte) (int, error) {
|
func (m *User) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if len(m.Name) > 0 {
|
if m.XXX_unrecognized != nil {
|
||||||
dAtA[i] = 0xa
|
i -= len(m.XXX_unrecognized)
|
||||||
i++
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
i = encodeVarintAuth(dAtA, i, uint64(len(m.Name)))
|
|
||||||
i += copy(dAtA[i:], m.Name)
|
|
||||||
}
|
|
||||||
if len(m.Password) > 0 {
|
|
||||||
dAtA[i] = 0x12
|
|
||||||
i++
|
|
||||||
i = encodeVarintAuth(dAtA, i, uint64(len(m.Password)))
|
|
||||||
i += copy(dAtA[i:], m.Password)
|
|
||||||
}
|
|
||||||
if len(m.Roles) > 0 {
|
|
||||||
for _, s := range m.Roles {
|
|
||||||
dAtA[i] = 0x1a
|
|
||||||
i++
|
|
||||||
l = len(s)
|
|
||||||
for l >= 1<<7 {
|
|
||||||
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
||||||
l >>= 7
|
|
||||||
i++
|
|
||||||
}
|
|
||||||
dAtA[i] = uint8(l)
|
|
||||||
i++
|
|
||||||
i += copy(dAtA[i:], s)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if m.Options != nil {
|
if m.Options != nil {
|
||||||
dAtA[i] = 0x22
|
{
|
||||||
i++
|
size, err := m.Options.MarshalToSizedBuffer(dAtA[:i])
|
||||||
i = encodeVarintAuth(dAtA, i, uint64(m.Options.Size()))
|
|
||||||
n1, err := m.Options.MarshalTo(dAtA[i:])
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
i += n1
|
i -= size
|
||||||
|
i = encodeVarintAuth(dAtA, i, uint64(size))
|
||||||
}
|
}
|
||||||
return i, nil
|
i--
|
||||||
|
dAtA[i] = 0x22
|
||||||
|
}
|
||||||
|
if len(m.Roles) > 0 {
|
||||||
|
for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
|
i -= len(m.Roles[iNdEx])
|
||||||
|
copy(dAtA[i:], m.Roles[iNdEx])
|
||||||
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Roles[iNdEx])))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(m.Password) > 0 {
|
||||||
|
i -= len(m.Password)
|
||||||
|
copy(dAtA[i:], m.Password)
|
||||||
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Password)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
if len(m.Name) > 0 {
|
||||||
|
i -= len(m.Name)
|
||||||
|
copy(dAtA[i:], m.Name)
|
||||||
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Name)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Permission) Marshal() (dAtA []byte, err error) {
|
func (m *Permission) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -208,34 +367,45 @@ func (m *Permission) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Permission) MarshalTo(dAtA []byte) (int, error) {
|
func (m *Permission) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Permission) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.PermType != 0 {
|
if m.XXX_unrecognized != nil {
|
||||||
dAtA[i] = 0x8
|
i -= len(m.XXX_unrecognized)
|
||||||
i++
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
i = encodeVarintAuth(dAtA, i, uint64(m.PermType))
|
|
||||||
}
|
|
||||||
if len(m.Key) > 0 {
|
|
||||||
dAtA[i] = 0x12
|
|
||||||
i++
|
|
||||||
i = encodeVarintAuth(dAtA, i, uint64(len(m.Key)))
|
|
||||||
i += copy(dAtA[i:], m.Key)
|
|
||||||
}
|
}
|
||||||
if len(m.RangeEnd) > 0 {
|
if len(m.RangeEnd) > 0 {
|
||||||
dAtA[i] = 0x1a
|
i -= len(m.RangeEnd)
|
||||||
i++
|
copy(dAtA[i:], m.RangeEnd)
|
||||||
i = encodeVarintAuth(dAtA, i, uint64(len(m.RangeEnd)))
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.RangeEnd)))
|
||||||
i += copy(dAtA[i:], m.RangeEnd)
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
}
|
}
|
||||||
return i, nil
|
if len(m.Key) > 0 {
|
||||||
|
i -= len(m.Key)
|
||||||
|
copy(dAtA[i:], m.Key)
|
||||||
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Key)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
if m.PermType != 0 {
|
||||||
|
i = encodeVarintAuth(dAtA, i, uint64(m.PermType))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Role) Marshal() (dAtA []byte, err error) {
|
func (m *Role) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -243,50 +413,73 @@ func (m *Role) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Role) MarshalTo(dAtA []byte) (int, error) {
|
func (m *Role) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Role) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if len(m.Name) > 0 {
|
if m.XXX_unrecognized != nil {
|
||||||
dAtA[i] = 0xa
|
i -= len(m.XXX_unrecognized)
|
||||||
i++
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
i = encodeVarintAuth(dAtA, i, uint64(len(m.Name)))
|
|
||||||
i += copy(dAtA[i:], m.Name)
|
|
||||||
}
|
}
|
||||||
if len(m.KeyPermission) > 0 {
|
if len(m.KeyPermission) > 0 {
|
||||||
for _, msg := range m.KeyPermission {
|
for iNdEx := len(m.KeyPermission) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
dAtA[i] = 0x12
|
{
|
||||||
i++
|
size, err := m.KeyPermission[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||||
i = encodeVarintAuth(dAtA, i, uint64(msg.Size()))
|
|
||||||
n, err := msg.MarshalTo(dAtA[i:])
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
i += n
|
i -= size
|
||||||
|
i = encodeVarintAuth(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return i, nil
|
if len(m.Name) > 0 {
|
||||||
|
i -= len(m.Name)
|
||||||
|
copy(dAtA[i:], m.Name)
|
||||||
|
i = encodeVarintAuth(dAtA, i, uint64(len(m.Name)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeVarintAuth(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintAuth(dAtA []byte, offset int, v uint64) int {
|
||||||
|
offset -= sovAuth(v)
|
||||||
|
base := offset
|
||||||
for v >= 1<<7 {
|
for v >= 1<<7 {
|
||||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
v >>= 7
|
v >>= 7
|
||||||
offset++
|
offset++
|
||||||
}
|
}
|
||||||
dAtA[offset] = uint8(v)
|
dAtA[offset] = uint8(v)
|
||||||
return offset + 1
|
return base
|
||||||
}
|
}
|
||||||
func (m *UserAddOptions) Size() (n int) {
|
func (m *UserAddOptions) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.NoPassword {
|
if m.NoPassword {
|
||||||
n += 2
|
n += 2
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *User) Size() (n int) {
|
func (m *User) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
l = len(m.Name)
|
l = len(m.Name)
|
||||||
|
@ -307,10 +500,16 @@ func (m *User) Size() (n int) {
|
||||||
l = m.Options.Size()
|
l = m.Options.Size()
|
||||||
n += 1 + l + sovAuth(uint64(l))
|
n += 1 + l + sovAuth(uint64(l))
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Permission) Size() (n int) {
|
func (m *Permission) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.PermType != 0 {
|
if m.PermType != 0 {
|
||||||
|
@ -324,10 +523,16 @@ func (m *Permission) Size() (n int) {
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovAuth(uint64(l))
|
n += 1 + l + sovAuth(uint64(l))
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Role) Size() (n int) {
|
func (m *Role) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
l = len(m.Name)
|
l = len(m.Name)
|
||||||
|
@ -340,18 +545,14 @@ func (m *Role) Size() (n int) {
|
||||||
n += 1 + l + sovAuth(uint64(l))
|
n += 1 + l + sovAuth(uint64(l))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func sovAuth(x uint64) (n int) {
|
func sovAuth(x uint64) (n int) {
|
||||||
for {
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
n++
|
|
||||||
x >>= 7
|
|
||||||
if x == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
}
|
}
|
||||||
func sozAuth(x uint64) (n int) {
|
func sozAuth(x uint64) (n int) {
|
||||||
return sovAuth(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
return sovAuth(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||||
|
@ -371,7 +572,7 @@ func (m *UserAddOptions) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -399,7 +600,7 @@ func (m *UserAddOptions) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
v |= (int(b) & 0x7F) << shift
|
v |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -414,9 +615,13 @@ func (m *UserAddOptions) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -441,7 +646,7 @@ func (m *User) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -469,7 +674,7 @@ func (m *User) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -478,6 +683,9 @@ func (m *User) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -500,7 +708,7 @@ func (m *User) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -509,6 +717,9 @@ func (m *User) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -531,7 +742,7 @@ func (m *User) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
stringLen |= (uint64(b) & 0x7F) << shift
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -541,6 +752,9 @@ func (m *User) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -560,7 +774,7 @@ func (m *User) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
msglen |= (int(b) & 0x7F) << shift
|
msglen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -569,6 +783,9 @@ func (m *User) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + msglen
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -588,9 +805,13 @@ func (m *User) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -615,7 +836,7 @@ func (m *Permission) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -643,7 +864,7 @@ func (m *Permission) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.PermType |= (Permission_Type(b) & 0x7F) << shift
|
m.PermType |= Permission_Type(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -662,7 +883,7 @@ func (m *Permission) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -671,6 +892,9 @@ func (m *Permission) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -693,7 +917,7 @@ func (m *Permission) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -702,6 +926,9 @@ func (m *Permission) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -719,9 +946,13 @@ func (m *Permission) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -746,7 +977,7 @@ func (m *Role) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -774,7 +1005,7 @@ func (m *Role) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -783,6 +1014,9 @@ func (m *Role) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -805,7 +1039,7 @@ func (m *Role) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
msglen |= (int(b) & 0x7F) << shift
|
msglen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -814,6 +1048,9 @@ func (m *Role) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + msglen
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -831,9 +1068,13 @@ func (m *Role) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthAuth
|
return ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthAuth
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -846,6 +1087,7 @@ func (m *Role) Unmarshal(dAtA []byte) error {
|
||||||
func skipAuth(dAtA []byte) (n int, err error) {
|
func skipAuth(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
depth := 0
|
||||||
for iNdEx < l {
|
for iNdEx < l {
|
||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -877,10 +1119,8 @@ func skipAuth(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
|
||||||
case 1:
|
case 1:
|
||||||
iNdEx += 8
|
iNdEx += 8
|
||||||
return iNdEx, nil
|
|
||||||
case 2:
|
case 2:
|
||||||
var length int
|
var length int
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -897,81 +1137,34 @@ func skipAuth(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iNdEx += length
|
|
||||||
if length < 0 {
|
if length < 0 {
|
||||||
return 0, ErrInvalidLengthAuth
|
return 0, ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
iNdEx += length
|
||||||
case 3:
|
case 3:
|
||||||
for {
|
depth++
|
||||||
var innerWire uint64
|
|
||||||
var start int = iNdEx
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return 0, ErrIntOverflowAuth
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return 0, io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
innerWire |= (uint64(b) & 0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
innerWireType := int(innerWire & 0x7)
|
|
||||||
if innerWireType == 4 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
next, err := skipAuth(dAtA[start:])
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
iNdEx = start + next
|
|
||||||
}
|
|
||||||
return iNdEx, nil
|
|
||||||
case 4:
|
case 4:
|
||||||
return iNdEx, nil
|
if depth == 0 {
|
||||||
|
return 0, ErrUnexpectedEndOfGroupAuth
|
||||||
|
}
|
||||||
|
depth--
|
||||||
case 5:
|
case 5:
|
||||||
iNdEx += 4
|
iNdEx += 4
|
||||||
return iNdEx, nil
|
|
||||||
default:
|
default:
|
||||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||||
}
|
}
|
||||||
|
if iNdEx < 0 {
|
||||||
|
return 0, ErrInvalidLengthAuth
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
if depth == 0 {
|
||||||
|
return iNdEx, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0, io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrInvalidLengthAuth = fmt.Errorf("proto: negative length found during unmarshaling")
|
ErrInvalidLengthAuth = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||||
ErrIntOverflowAuth = fmt.Errorf("proto: integer overflow")
|
ErrIntOverflowAuth = fmt.Errorf("proto: integer overflow")
|
||||||
|
ErrUnexpectedEndOfGroupAuth = fmt.Errorf("proto: unexpected end of group")
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() { proto.RegisterFile("auth.proto", fileDescriptorAuth) }
|
|
||||||
|
|
||||||
var fileDescriptorAuth = []byte{
|
|
||||||
// 338 bytes of a gzipped FileDescriptorProto
|
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xcf, 0x4e, 0xea, 0x40,
|
|
||||||
0x14, 0xc6, 0x3b, 0xb4, 0x70, 0xdb, 0xc3, 0x85, 0x90, 0x13, 0x72, 0x6f, 0x83, 0x49, 0x6d, 0xba,
|
|
||||||
0x6a, 0x5c, 0x54, 0x85, 0x8d, 0x5b, 0x8c, 0x2c, 0x5c, 0x49, 0x26, 0x18, 0x97, 0xa4, 0xa4, 0x13,
|
|
||||||
0x24, 0xc0, 0x4c, 0x33, 0x83, 0x31, 0x6c, 0x7c, 0x0e, 0x17, 0x3e, 0x10, 0x4b, 0x1e, 0x41, 0xf0,
|
|
||||||
0x45, 0x4c, 0x67, 0xf8, 0x13, 0xa2, 0xbb, 0xef, 0x7c, 0xe7, 0xfb, 0x66, 0x7e, 0x99, 0x01, 0x48,
|
|
||||||
0x5f, 0x16, 0xcf, 0x49, 0x2e, 0xc5, 0x42, 0x60, 0xa5, 0xd0, 0xf9, 0xa8, 0xd5, 0x1c, 0x8b, 0xb1,
|
|
||||||
0xd0, 0xd6, 0x65, 0xa1, 0xcc, 0x36, 0xba, 0x86, 0xfa, 0xa3, 0x62, 0xb2, 0x9b, 0x65, 0x0f, 0xf9,
|
|
||||||
0x62, 0x22, 0xb8, 0xc2, 0x73, 0xa8, 0x72, 0x31, 0xcc, 0x53, 0xa5, 0x5e, 0x85, 0xcc, 0x7c, 0x12,
|
|
||||||
0x92, 0xd8, 0xa5, 0xc0, 0x45, 0x7f, 0xe7, 0x44, 0x6f, 0xe0, 0x14, 0x15, 0x44, 0x70, 0x78, 0x3a,
|
|
||||||
0x67, 0x3a, 0xf1, 0x97, 0x6a, 0x8d, 0x2d, 0x70, 0x0f, 0xcd, 0x92, 0xf6, 0x0f, 0x33, 0x36, 0xa1,
|
|
||||||
0x2c, 0xc5, 0x8c, 0x29, 0xdf, 0x0e, 0xed, 0xd8, 0xa3, 0x66, 0xc0, 0x2b, 0xf8, 0x23, 0xcc, 0xcd,
|
|
||||||
0xbe, 0x13, 0x92, 0xb8, 0xda, 0xfe, 0x97, 0x18, 0xe0, 0xe4, 0x94, 0x8b, 0xee, 0x63, 0xd1, 0x07,
|
|
||||||
0x01, 0xe8, 0x33, 0x39, 0x9f, 0x28, 0x35, 0x11, 0x1c, 0x3b, 0xe0, 0xe6, 0x4c, 0xce, 0x07, 0xcb,
|
|
||||||
0xdc, 0xa0, 0xd4, 0xdb, 0xff, 0xf7, 0x27, 0x1c, 0x53, 0x49, 0xb1, 0xa6, 0x87, 0x20, 0x36, 0xc0,
|
|
||||||
0x9e, 0xb2, 0xe5, 0x0e, 0xb1, 0x90, 0x78, 0x06, 0x9e, 0x4c, 0xf9, 0x98, 0x0d, 0x19, 0xcf, 0x7c,
|
|
||||||
0xdb, 0xa0, 0x6b, 0xa3, 0xc7, 0xb3, 0xe8, 0x02, 0x1c, 0x5d, 0x73, 0xc1, 0xa1, 0xbd, 0xee, 0x5d,
|
|
||||||
0xc3, 0x42, 0x0f, 0xca, 0x4f, 0xf4, 0x7e, 0xd0, 0x6b, 0x10, 0xac, 0x81, 0x57, 0x98, 0x66, 0x2c,
|
|
||||||
0x45, 0x03, 0x70, 0xa8, 0x98, 0xb1, 0x5f, 0x9f, 0xe7, 0x06, 0x6a, 0x53, 0xb6, 0x3c, 0x62, 0xf9,
|
|
||||||
0xa5, 0xd0, 0x8e, 0xab, 0x6d, 0xfc, 0x09, 0x4c, 0x4f, 0x83, 0xb7, 0xfe, 0x6a, 0x13, 0x58, 0xeb,
|
|
||||||
0x4d, 0x60, 0xad, 0xb6, 0x01, 0x59, 0x6f, 0x03, 0xf2, 0xb9, 0x0d, 0xc8, 0xfb, 0x57, 0x60, 0x8d,
|
|
||||||
0x2a, 0xfa, 0x23, 0x3b, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x61, 0x66, 0xc6, 0x9d, 0xf4, 0x01,
|
|
||||||
0x00, 0x00,
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,129 +1,16 @@
|
||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
// source: etcdserver.proto
|
// source: etcdserver.proto
|
||||||
|
|
||||||
/*
|
|
||||||
Package etcdserverpb is a generated protocol buffer package.
|
|
||||||
|
|
||||||
It is generated from these files:
|
|
||||||
etcdserver.proto
|
|
||||||
raft_internal.proto
|
|
||||||
rpc.proto
|
|
||||||
|
|
||||||
It has these top-level messages:
|
|
||||||
Request
|
|
||||||
Metadata
|
|
||||||
RequestHeader
|
|
||||||
InternalRaftRequest
|
|
||||||
EmptyResponse
|
|
||||||
InternalAuthenticateRequest
|
|
||||||
ResponseHeader
|
|
||||||
RangeRequest
|
|
||||||
RangeResponse
|
|
||||||
PutRequest
|
|
||||||
PutResponse
|
|
||||||
DeleteRangeRequest
|
|
||||||
DeleteRangeResponse
|
|
||||||
RequestOp
|
|
||||||
ResponseOp
|
|
||||||
Compare
|
|
||||||
TxnRequest
|
|
||||||
TxnResponse
|
|
||||||
CompactionRequest
|
|
||||||
CompactionResponse
|
|
||||||
HashRequest
|
|
||||||
HashKVRequest
|
|
||||||
HashKVResponse
|
|
||||||
HashResponse
|
|
||||||
SnapshotRequest
|
|
||||||
SnapshotResponse
|
|
||||||
WatchRequest
|
|
||||||
WatchCreateRequest
|
|
||||||
WatchCancelRequest
|
|
||||||
WatchProgressRequest
|
|
||||||
WatchResponse
|
|
||||||
LeaseGrantRequest
|
|
||||||
LeaseGrantResponse
|
|
||||||
LeaseRevokeRequest
|
|
||||||
LeaseRevokeResponse
|
|
||||||
LeaseCheckpoint
|
|
||||||
LeaseCheckpointRequest
|
|
||||||
LeaseCheckpointResponse
|
|
||||||
LeaseKeepAliveRequest
|
|
||||||
LeaseKeepAliveResponse
|
|
||||||
LeaseTimeToLiveRequest
|
|
||||||
LeaseTimeToLiveResponse
|
|
||||||
LeaseLeasesRequest
|
|
||||||
LeaseStatus
|
|
||||||
LeaseLeasesResponse
|
|
||||||
Member
|
|
||||||
MemberAddRequest
|
|
||||||
MemberAddResponse
|
|
||||||
MemberRemoveRequest
|
|
||||||
MemberRemoveResponse
|
|
||||||
MemberUpdateRequest
|
|
||||||
MemberUpdateResponse
|
|
||||||
MemberListRequest
|
|
||||||
MemberListResponse
|
|
||||||
MemberPromoteRequest
|
|
||||||
MemberPromoteResponse
|
|
||||||
DefragmentRequest
|
|
||||||
DefragmentResponse
|
|
||||||
MoveLeaderRequest
|
|
||||||
MoveLeaderResponse
|
|
||||||
AlarmRequest
|
|
||||||
AlarmMember
|
|
||||||
AlarmResponse
|
|
||||||
DowngradeRequest
|
|
||||||
DowngradeResponse
|
|
||||||
StatusRequest
|
|
||||||
StatusResponse
|
|
||||||
AuthEnableRequest
|
|
||||||
AuthDisableRequest
|
|
||||||
AuthStatusRequest
|
|
||||||
AuthenticateRequest
|
|
||||||
AuthUserAddRequest
|
|
||||||
AuthUserGetRequest
|
|
||||||
AuthUserDeleteRequest
|
|
||||||
AuthUserChangePasswordRequest
|
|
||||||
AuthUserGrantRoleRequest
|
|
||||||
AuthUserRevokeRoleRequest
|
|
||||||
AuthRoleAddRequest
|
|
||||||
AuthRoleGetRequest
|
|
||||||
AuthUserListRequest
|
|
||||||
AuthRoleListRequest
|
|
||||||
AuthRoleDeleteRequest
|
|
||||||
AuthRoleGrantPermissionRequest
|
|
||||||
AuthRoleRevokePermissionRequest
|
|
||||||
AuthEnableResponse
|
|
||||||
AuthDisableResponse
|
|
||||||
AuthStatusResponse
|
|
||||||
AuthenticateResponse
|
|
||||||
AuthUserAddResponse
|
|
||||||
AuthUserGetResponse
|
|
||||||
AuthUserDeleteResponse
|
|
||||||
AuthUserChangePasswordResponse
|
|
||||||
AuthUserGrantRoleResponse
|
|
||||||
AuthUserRevokeRoleResponse
|
|
||||||
AuthRoleAddResponse
|
|
||||||
AuthRoleGetResponse
|
|
||||||
AuthRoleListResponse
|
|
||||||
AuthUserListResponse
|
|
||||||
AuthRoleDeleteResponse
|
|
||||||
AuthRoleGrantPermissionResponse
|
|
||||||
AuthRoleRevokePermissionResponse
|
|
||||||
*/
|
|
||||||
package etcdserverpb
|
package etcdserverpb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
fmt "fmt"
|
||||||
|
io "io"
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
|
|
||||||
math "math"
|
math "math"
|
||||||
|
math_bits "math/bits"
|
||||||
|
|
||||||
_ "github.com/gogo/protobuf/gogoproto"
|
_ "github.com/gogo/protobuf/gogoproto"
|
||||||
|
proto "github.com/golang/protobuf/proto"
|
||||||
io "io"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -135,7 +22,7 @@ var _ = math.Inf
|
||||||
// is compatible with the proto package it is being compiled against.
|
// is compatible with the proto package it is being compiled against.
|
||||||
// A compilation error at this line likely means your copy of the
|
// A compilation error at this line likely means your copy of the
|
||||||
// proto package needs to be updated.
|
// proto package needs to be updated.
|
||||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||||
|
|
||||||
type Request struct {
|
type Request struct {
|
||||||
ID uint64 `protobuf:"varint,1,opt,name=ID" json:"ID"`
|
ID uint64 `protobuf:"varint,1,opt,name=ID" json:"ID"`
|
||||||
|
@ -155,33 +42,124 @@ type Request struct {
|
||||||
Time int64 `protobuf:"varint,15,opt,name=Time" json:"Time"`
|
Time int64 `protobuf:"varint,15,opt,name=Time" json:"Time"`
|
||||||
Stream bool `protobuf:"varint,16,opt,name=Stream" json:"Stream"`
|
Stream bool `protobuf:"varint,16,opt,name=Stream" json:"Stream"`
|
||||||
Refresh *bool `protobuf:"varint,17,opt,name=Refresh" json:"Refresh,omitempty"`
|
Refresh *bool `protobuf:"varint,17,opt,name=Refresh" json:"Refresh,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Request) Reset() { *m = Request{} }
|
func (m *Request) Reset() { *m = Request{} }
|
||||||
func (m *Request) String() string { return proto.CompactTextString(m) }
|
func (m *Request) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Request) ProtoMessage() {}
|
func (*Request) ProtoMessage() {}
|
||||||
func (*Request) Descriptor() ([]byte, []int) { return fileDescriptorEtcdserver, []int{0} }
|
func (*Request) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_09ffbeb3bebbce7e, []int{0}
|
||||||
|
}
|
||||||
|
func (m *Request) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_Request.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *Request) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_Request.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *Request) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *Request) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_Request.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_Request proto.InternalMessageInfo
|
||||||
|
|
||||||
type Metadata struct {
|
type Metadata struct {
|
||||||
NodeID uint64 `protobuf:"varint,1,opt,name=NodeID" json:"NodeID"`
|
NodeID uint64 `protobuf:"varint,1,opt,name=NodeID" json:"NodeID"`
|
||||||
ClusterID uint64 `protobuf:"varint,2,opt,name=ClusterID" json:"ClusterID"`
|
ClusterID uint64 `protobuf:"varint,2,opt,name=ClusterID" json:"ClusterID"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Metadata) Reset() { *m = Metadata{} }
|
func (m *Metadata) Reset() { *m = Metadata{} }
|
||||||
func (m *Metadata) String() string { return proto.CompactTextString(m) }
|
func (m *Metadata) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Metadata) ProtoMessage() {}
|
func (*Metadata) ProtoMessage() {}
|
||||||
func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptorEtcdserver, []int{1} }
|
func (*Metadata) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_09ffbeb3bebbce7e, []int{1}
|
||||||
|
}
|
||||||
|
func (m *Metadata) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_Metadata.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *Metadata) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_Metadata.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *Metadata) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *Metadata) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_Metadata.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_Metadata proto.InternalMessageInfo
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*Request)(nil), "etcdserverpb.Request")
|
proto.RegisterType((*Request)(nil), "etcdserverpb.Request")
|
||||||
proto.RegisterType((*Metadata)(nil), "etcdserverpb.Metadata")
|
proto.RegisterType((*Metadata)(nil), "etcdserverpb.Metadata")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("etcdserver.proto", fileDescriptor_09ffbeb3bebbce7e) }
|
||||||
|
|
||||||
|
var fileDescriptor_09ffbeb3bebbce7e = []byte{
|
||||||
|
// 380 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0xd2, 0xdd, 0x6e, 0xda, 0x30,
|
||||||
|
0x14, 0x07, 0x70, 0x0c, 0xe1, 0xcb, 0x63, 0x1b, 0xb3, 0xd0, 0x74, 0x84, 0xa6, 0x2c, 0x42, 0xbb,
|
||||||
|
0xc8, 0xd5, 0xf6, 0x0e, 0x2c, 0x5c, 0x44, 0x2a, 0x15, 0x0d, 0x15, 0xbd, 0x76, 0xc9, 0x29, 0x58,
|
||||||
|
0x02, 0x4c, 0x1d, 0x07, 0xf1, 0x06, 0x7d, 0x85, 0x3e, 0x12, 0x97, 0x7d, 0x82, 0xaa, 0xa5, 0x2f,
|
||||||
|
0x52, 0x39, 0x24, 0xc4, 0xed, 0x5d, 0xf4, 0xfb, 0x9f, 0x1c, 0x1f, 0x7f, 0xd0, 0x2e, 0xea, 0x79,
|
||||||
|
0x9c, 0xa0, 0xda, 0xa1, 0xfa, 0xbb, 0x55, 0x52, 0x4b, 0xd6, 0x29, 0x65, 0x7b, 0xdb, 0xef, 0x2d,
|
||||||
|
0xe4, 0x42, 0x66, 0xc1, 0x3f, 0xf3, 0x75, 0xaa, 0x19, 0x3c, 0x38, 0xb4, 0x19, 0xe1, 0x7d, 0x8a,
|
||||||
|
0x89, 0x66, 0x3d, 0x5a, 0x0d, 0x03, 0x20, 0x1e, 0xf1, 0x9d, 0xa1, 0x73, 0x78, 0xfe, 0x5d, 0x89,
|
||||||
|
0xaa, 0x61, 0xc0, 0x7e, 0xd1, 0xc6, 0x18, 0xf5, 0x52, 0xc6, 0x50, 0xf5, 0x88, 0xdf, 0xce, 0x93,
|
||||||
|
0xdc, 0x18, 0x50, 0x67, 0xc2, 0xf5, 0x12, 0x6a, 0x56, 0x96, 0x09, 0xfb, 0x49, 0x6b, 0x33, 0xbe,
|
||||||
|
0x02, 0xc7, 0x0a, 0x0c, 0x18, 0x0f, 0x84, 0x82, 0xba, 0x47, 0xfc, 0x56, 0xe1, 0x81, 0x50, 0x6c,
|
||||||
|
0x40, 0xdb, 0x13, 0x85, 0xbb, 0x19, 0x5f, 0xa5, 0x08, 0x0d, 0xeb, 0xaf, 0x92, 0x8b, 0x9a, 0x70,
|
||||||
|
0x13, 0xe3, 0x1e, 0x9a, 0xd6, 0xa0, 0x25, 0x17, 0x35, 0xa3, 0xbd, 0x48, 0x34, 0xb4, 0xce, 0xab,
|
||||||
|
0x90, 0xa8, 0x64, 0xf6, 0x87, 0xd2, 0xd1, 0x7e, 0x2b, 0x14, 0xd7, 0x42, 0x6e, 0xa0, 0xed, 0x11,
|
||||||
|
0xbf, 0x96, 0x37, 0xb2, 0xdc, 0xec, 0xed, 0x86, 0x0b, 0x0d, 0xd4, 0x1a, 0x35, 0x13, 0xd6, 0xa7,
|
||||||
|
0xf5, 0xa9, 0xd8, 0xcc, 0x11, 0xbe, 0x58, 0x33, 0x9c, 0xc8, 0xac, 0x1f, 0xe1, 0x3c, 0x55, 0x89,
|
||||||
|
0xd8, 0x21, 0x74, 0xac, 0x5f, 0x4b, 0x36, 0x67, 0x3a, 0x95, 0x4a, 0x63, 0x0c, 0x5f, 0xad, 0x82,
|
||||||
|
0xdc, 0x4c, 0x7a, 0x95, 0x4a, 0x95, 0xae, 0xe1, 0x9b, 0x9d, 0x9e, 0xcc, 0x4c, 0x75, 0x2d, 0xd6,
|
||||||
|
0x08, 0xdf, 0xad, 0xa9, 0x33, 0xc9, 0xba, 0x6a, 0x85, 0x7c, 0x0d, 0xdd, 0x0f, 0x5d, 0x33, 0x63,
|
||||||
|
0xae, 0xb9, 0xe8, 0x3b, 0x85, 0xc9, 0x12, 0x7e, 0x58, 0xa7, 0x52, 0xe0, 0xe0, 0x82, 0xb6, 0xc6,
|
||||||
|
0xa8, 0x79, 0xcc, 0x35, 0x37, 0x9d, 0x2e, 0x65, 0x8c, 0x9f, 0x5e, 0x43, 0x6e, 0x66, 0x87, 0xff,
|
||||||
|
0x57, 0x69, 0xa2, 0x51, 0x85, 0x41, 0xf6, 0x28, 0xce, 0xb7, 0x70, 0xe6, 0x61, 0xef, 0xf0, 0xea,
|
||||||
|
0x56, 0x0e, 0x47, 0x97, 0x3c, 0x1d, 0x5d, 0xf2, 0x72, 0x74, 0xc9, 0xe3, 0x9b, 0x5b, 0x79, 0x0f,
|
||||||
|
0x00, 0x00, 0xff, 0xff, 0xee, 0x40, 0xba, 0xd6, 0xa4, 0x02, 0x00, 0x00,
|
||||||
|
}
|
||||||
|
|
||||||
func (m *Request) Marshal() (dAtA []byte, err error) {
|
func (m *Request) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -189,123 +167,133 @@ func (m *Request) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Request) MarshalTo(dAtA []byte) (int, error) {
|
func (m *Request) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
dAtA[i] = 0x8
|
if m.XXX_unrecognized != nil {
|
||||||
i++
|
i -= len(m.XXX_unrecognized)
|
||||||
i = encodeVarintEtcdserver(dAtA, i, uint64(m.ID))
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
dAtA[i] = 0x12
|
|
||||||
i++
|
|
||||||
i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Method)))
|
|
||||||
i += copy(dAtA[i:], m.Method)
|
|
||||||
dAtA[i] = 0x1a
|
|
||||||
i++
|
|
||||||
i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Path)))
|
|
||||||
i += copy(dAtA[i:], m.Path)
|
|
||||||
dAtA[i] = 0x22
|
|
||||||
i++
|
|
||||||
i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Val)))
|
|
||||||
i += copy(dAtA[i:], m.Val)
|
|
||||||
dAtA[i] = 0x28
|
|
||||||
i++
|
|
||||||
if m.Dir {
|
|
||||||
dAtA[i] = 1
|
|
||||||
} else {
|
|
||||||
dAtA[i] = 0
|
|
||||||
}
|
}
|
||||||
i++
|
|
||||||
dAtA[i] = 0x32
|
|
||||||
i++
|
|
||||||
i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.PrevValue)))
|
|
||||||
i += copy(dAtA[i:], m.PrevValue)
|
|
||||||
dAtA[i] = 0x38
|
|
||||||
i++
|
|
||||||
i = encodeVarintEtcdserver(dAtA, i, uint64(m.PrevIndex))
|
|
||||||
if m.PrevExist != nil {
|
|
||||||
dAtA[i] = 0x40
|
|
||||||
i++
|
|
||||||
if *m.PrevExist {
|
|
||||||
dAtA[i] = 1
|
|
||||||
} else {
|
|
||||||
dAtA[i] = 0
|
|
||||||
}
|
|
||||||
i++
|
|
||||||
}
|
|
||||||
dAtA[i] = 0x48
|
|
||||||
i++
|
|
||||||
i = encodeVarintEtcdserver(dAtA, i, uint64(m.Expiration))
|
|
||||||
dAtA[i] = 0x50
|
|
||||||
i++
|
|
||||||
if m.Wait {
|
|
||||||
dAtA[i] = 1
|
|
||||||
} else {
|
|
||||||
dAtA[i] = 0
|
|
||||||
}
|
|
||||||
i++
|
|
||||||
dAtA[i] = 0x58
|
|
||||||
i++
|
|
||||||
i = encodeVarintEtcdserver(dAtA, i, uint64(m.Since))
|
|
||||||
dAtA[i] = 0x60
|
|
||||||
i++
|
|
||||||
if m.Recursive {
|
|
||||||
dAtA[i] = 1
|
|
||||||
} else {
|
|
||||||
dAtA[i] = 0
|
|
||||||
}
|
|
||||||
i++
|
|
||||||
dAtA[i] = 0x68
|
|
||||||
i++
|
|
||||||
if m.Sorted {
|
|
||||||
dAtA[i] = 1
|
|
||||||
} else {
|
|
||||||
dAtA[i] = 0
|
|
||||||
}
|
|
||||||
i++
|
|
||||||
dAtA[i] = 0x70
|
|
||||||
i++
|
|
||||||
if m.Quorum {
|
|
||||||
dAtA[i] = 1
|
|
||||||
} else {
|
|
||||||
dAtA[i] = 0
|
|
||||||
}
|
|
||||||
i++
|
|
||||||
dAtA[i] = 0x78
|
|
||||||
i++
|
|
||||||
i = encodeVarintEtcdserver(dAtA, i, uint64(m.Time))
|
|
||||||
dAtA[i] = 0x80
|
|
||||||
i++
|
|
||||||
dAtA[i] = 0x1
|
|
||||||
i++
|
|
||||||
if m.Stream {
|
|
||||||
dAtA[i] = 1
|
|
||||||
} else {
|
|
||||||
dAtA[i] = 0
|
|
||||||
}
|
|
||||||
i++
|
|
||||||
if m.Refresh != nil {
|
if m.Refresh != nil {
|
||||||
dAtA[i] = 0x88
|
i--
|
||||||
i++
|
|
||||||
dAtA[i] = 0x1
|
|
||||||
i++
|
|
||||||
if *m.Refresh {
|
if *m.Refresh {
|
||||||
dAtA[i] = 1
|
dAtA[i] = 1
|
||||||
} else {
|
} else {
|
||||||
dAtA[i] = 0
|
dAtA[i] = 0
|
||||||
}
|
}
|
||||||
i++
|
i--
|
||||||
|
dAtA[i] = 0x1
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x88
|
||||||
}
|
}
|
||||||
if m.XXX_unrecognized != nil {
|
i--
|
||||||
i += copy(dAtA[i:], m.XXX_unrecognized)
|
if m.Stream {
|
||||||
|
dAtA[i] = 1
|
||||||
|
} else {
|
||||||
|
dAtA[i] = 0
|
||||||
}
|
}
|
||||||
return i, nil
|
i--
|
||||||
|
dAtA[i] = 0x1
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x80
|
||||||
|
i = encodeVarintEtcdserver(dAtA, i, uint64(m.Time))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x78
|
||||||
|
i--
|
||||||
|
if m.Quorum {
|
||||||
|
dAtA[i] = 1
|
||||||
|
} else {
|
||||||
|
dAtA[i] = 0
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x70
|
||||||
|
i--
|
||||||
|
if m.Sorted {
|
||||||
|
dAtA[i] = 1
|
||||||
|
} else {
|
||||||
|
dAtA[i] = 0
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x68
|
||||||
|
i--
|
||||||
|
if m.Recursive {
|
||||||
|
dAtA[i] = 1
|
||||||
|
} else {
|
||||||
|
dAtA[i] = 0
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x60
|
||||||
|
i = encodeVarintEtcdserver(dAtA, i, uint64(m.Since))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x58
|
||||||
|
i--
|
||||||
|
if m.Wait {
|
||||||
|
dAtA[i] = 1
|
||||||
|
} else {
|
||||||
|
dAtA[i] = 0
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x50
|
||||||
|
i = encodeVarintEtcdserver(dAtA, i, uint64(m.Expiration))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x48
|
||||||
|
if m.PrevExist != nil {
|
||||||
|
i--
|
||||||
|
if *m.PrevExist {
|
||||||
|
dAtA[i] = 1
|
||||||
|
} else {
|
||||||
|
dAtA[i] = 0
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x40
|
||||||
|
}
|
||||||
|
i = encodeVarintEtcdserver(dAtA, i, uint64(m.PrevIndex))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x38
|
||||||
|
i -= len(m.PrevValue)
|
||||||
|
copy(dAtA[i:], m.PrevValue)
|
||||||
|
i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.PrevValue)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x32
|
||||||
|
i--
|
||||||
|
if m.Dir {
|
||||||
|
dAtA[i] = 1
|
||||||
|
} else {
|
||||||
|
dAtA[i] = 0
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x28
|
||||||
|
i -= len(m.Val)
|
||||||
|
copy(dAtA[i:], m.Val)
|
||||||
|
i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Val)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x22
|
||||||
|
i -= len(m.Path)
|
||||||
|
copy(dAtA[i:], m.Path)
|
||||||
|
i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Path)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
i -= len(m.Method)
|
||||||
|
copy(dAtA[i:], m.Method)
|
||||||
|
i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Method)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
i = encodeVarintEtcdserver(dAtA, i, uint64(m.ID))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Metadata) Marshal() (dAtA []byte, err error) {
|
func (m *Metadata) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -313,32 +301,43 @@ func (m *Metadata) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Metadata) MarshalTo(dAtA []byte) (int, error) {
|
func (m *Metadata) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
dAtA[i] = 0x8
|
|
||||||
i++
|
|
||||||
i = encodeVarintEtcdserver(dAtA, i, uint64(m.NodeID))
|
|
||||||
dAtA[i] = 0x10
|
|
||||||
i++
|
|
||||||
i = encodeVarintEtcdserver(dAtA, i, uint64(m.ClusterID))
|
|
||||||
if m.XXX_unrecognized != nil {
|
if m.XXX_unrecognized != nil {
|
||||||
i += copy(dAtA[i:], m.XXX_unrecognized)
|
i -= len(m.XXX_unrecognized)
|
||||||
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
}
|
}
|
||||||
return i, nil
|
i = encodeVarintEtcdserver(dAtA, i, uint64(m.ClusterID))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x10
|
||||||
|
i = encodeVarintEtcdserver(dAtA, i, uint64(m.NodeID))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeVarintEtcdserver(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintEtcdserver(dAtA []byte, offset int, v uint64) int {
|
||||||
|
offset -= sovEtcdserver(v)
|
||||||
|
base := offset
|
||||||
for v >= 1<<7 {
|
for v >= 1<<7 {
|
||||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
v >>= 7
|
v >>= 7
|
||||||
offset++
|
offset++
|
||||||
}
|
}
|
||||||
dAtA[offset] = uint8(v)
|
dAtA[offset] = uint8(v)
|
||||||
return offset + 1
|
return base
|
||||||
}
|
}
|
||||||
func (m *Request) Size() (n int) {
|
func (m *Request) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
n += 1 + sovEtcdserver(uint64(m.ID))
|
n += 1 + sovEtcdserver(uint64(m.ID))
|
||||||
|
@ -373,6 +372,9 @@ func (m *Request) Size() (n int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Metadata) Size() (n int) {
|
func (m *Metadata) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
n += 1 + sovEtcdserver(uint64(m.NodeID))
|
n += 1 + sovEtcdserver(uint64(m.NodeID))
|
||||||
|
@ -384,14 +386,7 @@ func (m *Metadata) Size() (n int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func sovEtcdserver(x uint64) (n int) {
|
func sovEtcdserver(x uint64) (n int) {
|
||||||
for {
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
n++
|
|
||||||
x >>= 7
|
|
||||||
if x == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
}
|
}
|
||||||
func sozEtcdserver(x uint64) (n int) {
|
func sozEtcdserver(x uint64) (n int) {
|
||||||
return sovEtcdserver(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
return sovEtcdserver(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||||
|
@ -411,7 +406,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -439,7 +434,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.ID |= (uint64(b) & 0x7F) << shift
|
m.ID |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -458,7 +453,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
stringLen |= (uint64(b) & 0x7F) << shift
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -468,6 +463,9 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthEtcdserver
|
return ErrInvalidLengthEtcdserver
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthEtcdserver
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -487,7 +485,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
stringLen |= (uint64(b) & 0x7F) << shift
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -497,6 +495,9 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthEtcdserver
|
return ErrInvalidLengthEtcdserver
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthEtcdserver
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -516,7 +517,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
stringLen |= (uint64(b) & 0x7F) << shift
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -526,6 +527,9 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthEtcdserver
|
return ErrInvalidLengthEtcdserver
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthEtcdserver
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -545,7 +549,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
v |= (int(b) & 0x7F) << shift
|
v |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -565,7 +569,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
stringLen |= (uint64(b) & 0x7F) << shift
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -575,6 +579,9 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthEtcdserver
|
return ErrInvalidLengthEtcdserver
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + intStringLen
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthEtcdserver
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -594,7 +601,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.PrevIndex |= (uint64(b) & 0x7F) << shift
|
m.PrevIndex |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -613,7 +620,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
v |= (int(b) & 0x7F) << shift
|
v |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -634,7 +641,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Expiration |= (int64(b) & 0x7F) << shift
|
m.Expiration |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -653,7 +660,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
v |= (int(b) & 0x7F) << shift
|
v |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -673,7 +680,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Since |= (uint64(b) & 0x7F) << shift
|
m.Since |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -692,7 +699,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
v |= (int(b) & 0x7F) << shift
|
v |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -712,7 +719,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
v |= (int(b) & 0x7F) << shift
|
v |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -732,7 +739,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
v |= (int(b) & 0x7F) << shift
|
v |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -752,7 +759,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Time |= (int64(b) & 0x7F) << shift
|
m.Time |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -771,7 +778,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
v |= (int(b) & 0x7F) << shift
|
v |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -791,7 +798,7 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
v |= (int(b) & 0x7F) << shift
|
v |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -807,6 +814,9 @@ func (m *Request) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthEtcdserver
|
return ErrInvalidLengthEtcdserver
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthEtcdserver
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -835,7 +845,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -863,7 +873,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.NodeID |= (uint64(b) & 0x7F) << shift
|
m.NodeID |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -882,7 +892,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.ClusterID |= (uint64(b) & 0x7F) << shift
|
m.ClusterID |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -896,6 +906,9 @@ func (m *Metadata) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthEtcdserver
|
return ErrInvalidLengthEtcdserver
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthEtcdserver
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -912,6 +925,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error {
|
||||||
func skipEtcdserver(dAtA []byte) (n int, err error) {
|
func skipEtcdserver(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
depth := 0
|
||||||
for iNdEx < l {
|
for iNdEx < l {
|
||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -943,10 +957,8 @@ func skipEtcdserver(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
|
||||||
case 1:
|
case 1:
|
||||||
iNdEx += 8
|
iNdEx += 8
|
||||||
return iNdEx, nil
|
|
||||||
case 2:
|
case 2:
|
||||||
var length int
|
var length int
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -963,83 +975,34 @@ func skipEtcdserver(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iNdEx += length
|
|
||||||
if length < 0 {
|
if length < 0 {
|
||||||
return 0, ErrInvalidLengthEtcdserver
|
return 0, ErrInvalidLengthEtcdserver
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
iNdEx += length
|
||||||
case 3:
|
case 3:
|
||||||
for {
|
depth++
|
||||||
var innerWire uint64
|
|
||||||
var start int = iNdEx
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return 0, ErrIntOverflowEtcdserver
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return 0, io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
innerWire |= (uint64(b) & 0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
innerWireType := int(innerWire & 0x7)
|
|
||||||
if innerWireType == 4 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
next, err := skipEtcdserver(dAtA[start:])
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
iNdEx = start + next
|
|
||||||
}
|
|
||||||
return iNdEx, nil
|
|
||||||
case 4:
|
case 4:
|
||||||
return iNdEx, nil
|
if depth == 0 {
|
||||||
|
return 0, ErrUnexpectedEndOfGroupEtcdserver
|
||||||
|
}
|
||||||
|
depth--
|
||||||
case 5:
|
case 5:
|
||||||
iNdEx += 4
|
iNdEx += 4
|
||||||
return iNdEx, nil
|
|
||||||
default:
|
default:
|
||||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||||
}
|
}
|
||||||
|
if iNdEx < 0 {
|
||||||
|
return 0, ErrInvalidLengthEtcdserver
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
if depth == 0 {
|
||||||
|
return iNdEx, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0, io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrInvalidLengthEtcdserver = fmt.Errorf("proto: negative length found during unmarshaling")
|
ErrInvalidLengthEtcdserver = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||||
ErrIntOverflowEtcdserver = fmt.Errorf("proto: integer overflow")
|
ErrIntOverflowEtcdserver = fmt.Errorf("proto: integer overflow")
|
||||||
|
ErrUnexpectedEndOfGroupEtcdserver = fmt.Errorf("proto: unexpected end of group")
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() { proto.RegisterFile("etcdserver.proto", fileDescriptorEtcdserver) }
|
|
||||||
|
|
||||||
var fileDescriptorEtcdserver = []byte{
|
|
||||||
// 380 bytes of a gzipped FileDescriptorProto
|
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0xd2, 0xdd, 0x6e, 0xda, 0x30,
|
|
||||||
0x14, 0x07, 0x70, 0x0c, 0xe1, 0xcb, 0x63, 0x1b, 0xb3, 0xd0, 0x74, 0x84, 0xa6, 0x2c, 0x42, 0xbb,
|
|
||||||
0xc8, 0xd5, 0xf6, 0x0e, 0x2c, 0x5c, 0x44, 0x2a, 0x15, 0x0d, 0x15, 0xbd, 0x76, 0xc9, 0x29, 0x58,
|
|
||||||
0x02, 0x4c, 0x1d, 0x07, 0xf1, 0x06, 0x7d, 0x85, 0x3e, 0x12, 0x97, 0x7d, 0x82, 0xaa, 0xa5, 0x2f,
|
|
||||||
0x52, 0x39, 0x24, 0xc4, 0xed, 0x5d, 0xf4, 0xfb, 0x9f, 0x1c, 0x1f, 0x7f, 0xd0, 0x2e, 0xea, 0x79,
|
|
||||||
0x9c, 0xa0, 0xda, 0xa1, 0xfa, 0xbb, 0x55, 0x52, 0x4b, 0xd6, 0x29, 0x65, 0x7b, 0xdb, 0xef, 0x2d,
|
|
||||||
0xe4, 0x42, 0x66, 0xc1, 0x3f, 0xf3, 0x75, 0xaa, 0x19, 0x3c, 0x38, 0xb4, 0x19, 0xe1, 0x7d, 0x8a,
|
|
||||||
0x89, 0x66, 0x3d, 0x5a, 0x0d, 0x03, 0x20, 0x1e, 0xf1, 0x9d, 0xa1, 0x73, 0x78, 0xfe, 0x5d, 0x89,
|
|
||||||
0xaa, 0x61, 0xc0, 0x7e, 0xd1, 0xc6, 0x18, 0xf5, 0x52, 0xc6, 0x50, 0xf5, 0x88, 0xdf, 0xce, 0x93,
|
|
||||||
0xdc, 0x18, 0x50, 0x67, 0xc2, 0xf5, 0x12, 0x6a, 0x56, 0x96, 0x09, 0xfb, 0x49, 0x6b, 0x33, 0xbe,
|
|
||||||
0x02, 0xc7, 0x0a, 0x0c, 0x18, 0x0f, 0x84, 0x82, 0xba, 0x47, 0xfc, 0x56, 0xe1, 0x81, 0x50, 0x6c,
|
|
||||||
0x40, 0xdb, 0x13, 0x85, 0xbb, 0x19, 0x5f, 0xa5, 0x08, 0x0d, 0xeb, 0xaf, 0x92, 0x8b, 0x9a, 0x70,
|
|
||||||
0x13, 0xe3, 0x1e, 0x9a, 0xd6, 0xa0, 0x25, 0x17, 0x35, 0xa3, 0xbd, 0x48, 0x34, 0xb4, 0xce, 0xab,
|
|
||||||
0x90, 0xa8, 0x64, 0xf6, 0x87, 0xd2, 0xd1, 0x7e, 0x2b, 0x14, 0xd7, 0x42, 0x6e, 0xa0, 0xed, 0x11,
|
|
||||||
0xbf, 0x96, 0x37, 0xb2, 0xdc, 0xec, 0xed, 0x86, 0x0b, 0x0d, 0xd4, 0x1a, 0x35, 0x13, 0xd6, 0xa7,
|
|
||||||
0xf5, 0xa9, 0xd8, 0xcc, 0x11, 0xbe, 0x58, 0x33, 0x9c, 0xc8, 0xac, 0x1f, 0xe1, 0x3c, 0x55, 0x89,
|
|
||||||
0xd8, 0x21, 0x74, 0xac, 0x5f, 0x4b, 0x36, 0x67, 0x3a, 0x95, 0x4a, 0x63, 0x0c, 0x5f, 0xad, 0x82,
|
|
||||||
0xdc, 0x4c, 0x7a, 0x95, 0x4a, 0x95, 0xae, 0xe1, 0x9b, 0x9d, 0x9e, 0xcc, 0x4c, 0x75, 0x2d, 0xd6,
|
|
||||||
0x08, 0xdf, 0xad, 0xa9, 0x33, 0xc9, 0xba, 0x6a, 0x85, 0x7c, 0x0d, 0xdd, 0x0f, 0x5d, 0x33, 0x63,
|
|
||||||
0xae, 0xb9, 0xe8, 0x3b, 0x85, 0xc9, 0x12, 0x7e, 0x58, 0xa7, 0x52, 0xe0, 0xe0, 0x82, 0xb6, 0xc6,
|
|
||||||
0xa8, 0x79, 0xcc, 0x35, 0x37, 0x9d, 0x2e, 0x65, 0x8c, 0x9f, 0x5e, 0x43, 0x6e, 0x66, 0x87, 0xff,
|
|
||||||
0x57, 0x69, 0xa2, 0x51, 0x85, 0x41, 0xf6, 0x28, 0xce, 0xb7, 0x70, 0xe6, 0x61, 0xef, 0xf0, 0xea,
|
|
||||||
0x56, 0x0e, 0x47, 0x97, 0x3c, 0x1d, 0x5d, 0xf2, 0x72, 0x74, 0xc9, 0xe3, 0x9b, 0x5b, 0x79, 0x0f,
|
|
||||||
0x00, 0x00, 0xff, 0xff, 0xee, 0x40, 0xba, 0xd6, 0xa4, 0x02, 0x00, 0x00,
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,28 +1,16 @@
|
||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
// source: kv.proto
|
// source: kv.proto
|
||||||
|
|
||||||
/*
|
|
||||||
Package mvccpb is a generated protocol buffer package.
|
|
||||||
|
|
||||||
It is generated from these files:
|
|
||||||
kv.proto
|
|
||||||
|
|
||||||
It has these top-level messages:
|
|
||||||
KeyValue
|
|
||||||
Event
|
|
||||||
*/
|
|
||||||
package mvccpb
|
package mvccpb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
fmt "fmt"
|
||||||
|
io "io"
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
|
|
||||||
math "math"
|
math "math"
|
||||||
|
math_bits "math/bits"
|
||||||
|
|
||||||
_ "github.com/gogo/protobuf/gogoproto"
|
_ "github.com/gogo/protobuf/gogoproto"
|
||||||
|
proto "github.com/golang/protobuf/proto"
|
||||||
io "io"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -34,7 +22,7 @@ var _ = math.Inf
|
||||||
// is compatible with the proto package it is being compiled against.
|
// is compatible with the proto package it is being compiled against.
|
||||||
// A compilation error at this line likely means your copy of the
|
// A compilation error at this line likely means your copy of the
|
||||||
// proto package needs to be updated.
|
// proto package needs to be updated.
|
||||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||||
|
|
||||||
type Event_EventType int32
|
type Event_EventType int32
|
||||||
|
|
||||||
|
@ -47,6 +35,7 @@ var Event_EventType_name = map[int32]string{
|
||||||
0: "PUT",
|
0: "PUT",
|
||||||
1: "DELETE",
|
1: "DELETE",
|
||||||
}
|
}
|
||||||
|
|
||||||
var Event_EventType_value = map[string]int32{
|
var Event_EventType_value = map[string]int32{
|
||||||
"PUT": 0,
|
"PUT": 0,
|
||||||
"DELETE": 1,
|
"DELETE": 1,
|
||||||
|
@ -55,7 +44,10 @@ var Event_EventType_value = map[string]int32{
|
||||||
func (x Event_EventType) String() string {
|
func (x Event_EventType) String() string {
|
||||||
return proto.EnumName(Event_EventType_name, int32(x))
|
return proto.EnumName(Event_EventType_name, int32(x))
|
||||||
}
|
}
|
||||||
func (Event_EventType) EnumDescriptor() ([]byte, []int) { return fileDescriptorKv, []int{1, 0} }
|
|
||||||
|
func (Event_EventType) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_2216fe83c9c12408, []int{1, 0}
|
||||||
|
}
|
||||||
|
|
||||||
type KeyValue struct {
|
type KeyValue struct {
|
||||||
// key is the key in bytes. An empty key is not allowed.
|
// key is the key in bytes. An empty key is not allowed.
|
||||||
|
@ -74,12 +66,43 @@ type KeyValue struct {
|
||||||
// When the attached lease expires, the key will be deleted.
|
// When the attached lease expires, the key will be deleted.
|
||||||
// If lease is 0, then no lease is attached to the key.
|
// If lease is 0, then no lease is attached to the key.
|
||||||
Lease int64 `protobuf:"varint,6,opt,name=lease,proto3" json:"lease,omitempty"`
|
Lease int64 `protobuf:"varint,6,opt,name=lease,proto3" json:"lease,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *KeyValue) Reset() { *m = KeyValue{} }
|
func (m *KeyValue) Reset() { *m = KeyValue{} }
|
||||||
func (m *KeyValue) String() string { return proto.CompactTextString(m) }
|
func (m *KeyValue) String() string { return proto.CompactTextString(m) }
|
||||||
func (*KeyValue) ProtoMessage() {}
|
func (*KeyValue) ProtoMessage() {}
|
||||||
func (*KeyValue) Descriptor() ([]byte, []int) { return fileDescriptorKv, []int{0} }
|
func (*KeyValue) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_2216fe83c9c12408, []int{0}
|
||||||
|
}
|
||||||
|
func (m *KeyValue) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *KeyValue) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_KeyValue.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *KeyValue) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *KeyValue) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_KeyValue.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_KeyValue proto.InternalMessageInfo
|
||||||
|
|
||||||
type Event struct {
|
type Event struct {
|
||||||
// type is the kind of event. If type is a PUT, it indicates
|
// type is the kind of event. If type is a PUT, it indicates
|
||||||
|
@ -91,25 +114,82 @@ type Event struct {
|
||||||
// A PUT event with kv.Version=1 indicates the creation of a key.
|
// A PUT event with kv.Version=1 indicates the creation of a key.
|
||||||
// A DELETE/EXPIRE event contains the deleted key with
|
// A DELETE/EXPIRE event contains the deleted key with
|
||||||
// its modification revision set to the revision of deletion.
|
// its modification revision set to the revision of deletion.
|
||||||
Kv *KeyValue `protobuf:"bytes,2,opt,name=kv" json:"kv,omitempty"`
|
Kv *KeyValue `protobuf:"bytes,2,opt,name=kv,proto3" json:"kv,omitempty"`
|
||||||
// prev_kv holds the key-value pair before the event happens.
|
// prev_kv holds the key-value pair before the event happens.
|
||||||
PrevKv *KeyValue `protobuf:"bytes,3,opt,name=prev_kv,json=prevKv" json:"prev_kv,omitempty"`
|
PrevKv *KeyValue `protobuf:"bytes,3,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Event) Reset() { *m = Event{} }
|
func (m *Event) Reset() { *m = Event{} }
|
||||||
func (m *Event) String() string { return proto.CompactTextString(m) }
|
func (m *Event) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Event) ProtoMessage() {}
|
func (*Event) ProtoMessage() {}
|
||||||
func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorKv, []int{1} }
|
func (*Event) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_2216fe83c9c12408, []int{1}
|
||||||
|
}
|
||||||
|
func (m *Event) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_Event.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *Event) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_Event.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *Event) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *Event) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_Event.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_Event proto.InternalMessageInfo
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
proto.RegisterEnum("mvccpb.Event_EventType", Event_EventType_name, Event_EventType_value)
|
||||||
proto.RegisterType((*KeyValue)(nil), "mvccpb.KeyValue")
|
proto.RegisterType((*KeyValue)(nil), "mvccpb.KeyValue")
|
||||||
proto.RegisterType((*Event)(nil), "mvccpb.Event")
|
proto.RegisterType((*Event)(nil), "mvccpb.Event")
|
||||||
proto.RegisterEnum("mvccpb.Event_EventType", Event_EventType_name, Event_EventType_value)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("kv.proto", fileDescriptor_2216fe83c9c12408) }
|
||||||
|
|
||||||
|
var fileDescriptor_2216fe83c9c12408 = []byte{
|
||||||
|
// 303 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x41, 0x4e, 0xc2, 0x40,
|
||||||
|
0x14, 0x86, 0x3b, 0x14, 0x0a, 0x3e, 0x08, 0x36, 0x13, 0x12, 0x27, 0x2e, 0x26, 0x95, 0x8d, 0x18,
|
||||||
|
0x13, 0x4c, 0xf0, 0x06, 0xc6, 0xae, 0x70, 0x61, 0x1a, 0x74, 0x4b, 0x4a, 0x79, 0x21, 0xa4, 0x94,
|
||||||
|
0x69, 0x4a, 0x9d, 0xa4, 0x37, 0x71, 0xef, 0xde, 0x73, 0xb0, 0xe4, 0x08, 0x52, 0x2f, 0x62, 0xfa,
|
||||||
|
0xc6, 0xe2, 0xc6, 0xcd, 0xe4, 0xfd, 0xff, 0xff, 0x65, 0xe6, 0x7f, 0x03, 0x9d, 0x58, 0x8f, 0xd3,
|
||||||
|
0x4c, 0xe5, 0x8a, 0x3b, 0x89, 0x8e, 0xa2, 0x74, 0x71, 0x39, 0x58, 0xa9, 0x95, 0x22, 0xeb, 0xae,
|
||||||
|
0x9a, 0x4c, 0x3a, 0xfc, 0x64, 0xd0, 0x99, 0x62, 0xf1, 0x1a, 0x6e, 0xde, 0x90, 0xbb, 0x60, 0xc7,
|
||||||
|
0x58, 0x08, 0xe6, 0xb1, 0x51, 0x2f, 0xa8, 0x46, 0x7e, 0x0d, 0xe7, 0x51, 0x86, 0x61, 0x8e, 0xf3,
|
||||||
|
0x0c, 0xf5, 0x7a, 0xb7, 0x56, 0x5b, 0xd1, 0xf0, 0xd8, 0xc8, 0x0e, 0xfa, 0xc6, 0x0e, 0x7e, 0x5d,
|
||||||
|
0x7e, 0x05, 0xbd, 0x44, 0x2d, 0xff, 0x28, 0x9b, 0xa8, 0x6e, 0xa2, 0x96, 0x27, 0x44, 0x40, 0x5b,
|
||||||
|
0x63, 0x46, 0x69, 0x93, 0xd2, 0x5a, 0xf2, 0x01, 0xb4, 0x74, 0x55, 0x40, 0xb4, 0xe8, 0x65, 0x23,
|
||||||
|
0x2a, 0x77, 0x83, 0xe1, 0x0e, 0x85, 0x43, 0xb4, 0x11, 0xc3, 0x0f, 0x06, 0x2d, 0x5f, 0xe3, 0x36,
|
||||||
|
0xe7, 0xb7, 0xd0, 0xcc, 0x8b, 0x14, 0xa9, 0x6e, 0x7f, 0x72, 0x31, 0x36, 0x7b, 0x8e, 0x29, 0x34,
|
||||||
|
0xe7, 0xac, 0x48, 0x31, 0x20, 0x88, 0x7b, 0xd0, 0x88, 0x35, 0x75, 0xef, 0x4e, 0xdc, 0x1a, 0xad,
|
||||||
|
0x17, 0x0f, 0x1a, 0xb1, 0xe6, 0x37, 0xd0, 0x4e, 0x33, 0xd4, 0xf3, 0x58, 0x53, 0xf9, 0xff, 0x30,
|
||||||
|
0xa7, 0x02, 0xa6, 0x7a, 0xe8, 0xc1, 0xd9, 0xe9, 0x7e, 0xde, 0x06, 0xfb, 0xf9, 0x65, 0xe6, 0x5a,
|
||||||
|
0x1c, 0xc0, 0x79, 0xf4, 0x9f, 0xfc, 0x99, 0xef, 0xb2, 0x07, 0xb1, 0x3f, 0x4a, 0xeb, 0x70, 0x94,
|
||||||
|
0xd6, 0xbe, 0x94, 0xec, 0x50, 0x4a, 0xf6, 0x55, 0x4a, 0xf6, 0xfe, 0x2d, 0xad, 0x85, 0x43, 0xff,
|
||||||
|
0x7e, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x45, 0x92, 0x5d, 0xa1, 0x01, 0x00, 0x00,
|
||||||
|
}
|
||||||
|
|
||||||
func (m *KeyValue) Marshal() (dAtA []byte, err error) {
|
func (m *KeyValue) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -117,49 +197,60 @@ func (m *KeyValue) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) {
|
func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if len(m.Key) > 0 {
|
if m.XXX_unrecognized != nil {
|
||||||
dAtA[i] = 0xa
|
i -= len(m.XXX_unrecognized)
|
||||||
i++
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
i = encodeVarintKv(dAtA, i, uint64(len(m.Key)))
|
|
||||||
i += copy(dAtA[i:], m.Key)
|
|
||||||
}
|
|
||||||
if m.CreateRevision != 0 {
|
|
||||||
dAtA[i] = 0x10
|
|
||||||
i++
|
|
||||||
i = encodeVarintKv(dAtA, i, uint64(m.CreateRevision))
|
|
||||||
}
|
|
||||||
if m.ModRevision != 0 {
|
|
||||||
dAtA[i] = 0x18
|
|
||||||
i++
|
|
||||||
i = encodeVarintKv(dAtA, i, uint64(m.ModRevision))
|
|
||||||
}
|
|
||||||
if m.Version != 0 {
|
|
||||||
dAtA[i] = 0x20
|
|
||||||
i++
|
|
||||||
i = encodeVarintKv(dAtA, i, uint64(m.Version))
|
|
||||||
}
|
|
||||||
if len(m.Value) > 0 {
|
|
||||||
dAtA[i] = 0x2a
|
|
||||||
i++
|
|
||||||
i = encodeVarintKv(dAtA, i, uint64(len(m.Value)))
|
|
||||||
i += copy(dAtA[i:], m.Value)
|
|
||||||
}
|
}
|
||||||
if m.Lease != 0 {
|
if m.Lease != 0 {
|
||||||
dAtA[i] = 0x30
|
|
||||||
i++
|
|
||||||
i = encodeVarintKv(dAtA, i, uint64(m.Lease))
|
i = encodeVarintKv(dAtA, i, uint64(m.Lease))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x30
|
||||||
}
|
}
|
||||||
return i, nil
|
if len(m.Value) > 0 {
|
||||||
|
i -= len(m.Value)
|
||||||
|
copy(dAtA[i:], m.Value)
|
||||||
|
i = encodeVarintKv(dAtA, i, uint64(len(m.Value)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x2a
|
||||||
|
}
|
||||||
|
if m.Version != 0 {
|
||||||
|
i = encodeVarintKv(dAtA, i, uint64(m.Version))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x20
|
||||||
|
}
|
||||||
|
if m.ModRevision != 0 {
|
||||||
|
i = encodeVarintKv(dAtA, i, uint64(m.ModRevision))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x18
|
||||||
|
}
|
||||||
|
if m.CreateRevision != 0 {
|
||||||
|
i = encodeVarintKv(dAtA, i, uint64(m.CreateRevision))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x10
|
||||||
|
}
|
||||||
|
if len(m.Key) > 0 {
|
||||||
|
i -= len(m.Key)
|
||||||
|
copy(dAtA[i:], m.Key)
|
||||||
|
i = encodeVarintKv(dAtA, i, uint64(len(m.Key)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Event) Marshal() (dAtA []byte, err error) {
|
func (m *Event) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -167,48 +258,66 @@ func (m *Event) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Event) MarshalTo(dAtA []byte) (int, error) {
|
func (m *Event) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.Type != 0 {
|
if m.XXX_unrecognized != nil {
|
||||||
dAtA[i] = 0x8
|
i -= len(m.XXX_unrecognized)
|
||||||
i++
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
i = encodeVarintKv(dAtA, i, uint64(m.Type))
|
|
||||||
}
|
|
||||||
if m.Kv != nil {
|
|
||||||
dAtA[i] = 0x12
|
|
||||||
i++
|
|
||||||
i = encodeVarintKv(dAtA, i, uint64(m.Kv.Size()))
|
|
||||||
n1, err := m.Kv.MarshalTo(dAtA[i:])
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
i += n1
|
|
||||||
}
|
}
|
||||||
if m.PrevKv != nil {
|
if m.PrevKv != nil {
|
||||||
dAtA[i] = 0x1a
|
{
|
||||||
i++
|
size, err := m.PrevKv.MarshalToSizedBuffer(dAtA[:i])
|
||||||
i = encodeVarintKv(dAtA, i, uint64(m.PrevKv.Size()))
|
|
||||||
n2, err := m.PrevKv.MarshalTo(dAtA[i:])
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
i += n2
|
i -= size
|
||||||
|
i = encodeVarintKv(dAtA, i, uint64(size))
|
||||||
}
|
}
|
||||||
return i, nil
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
|
if m.Kv != nil {
|
||||||
|
{
|
||||||
|
size, err := m.Kv.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintKv(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
if m.Type != 0 {
|
||||||
|
i = encodeVarintKv(dAtA, i, uint64(m.Type))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeVarintKv(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintKv(dAtA []byte, offset int, v uint64) int {
|
||||||
|
offset -= sovKv(v)
|
||||||
|
base := offset
|
||||||
for v >= 1<<7 {
|
for v >= 1<<7 {
|
||||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
v >>= 7
|
v >>= 7
|
||||||
offset++
|
offset++
|
||||||
}
|
}
|
||||||
dAtA[offset] = uint8(v)
|
dAtA[offset] = uint8(v)
|
||||||
return offset + 1
|
return base
|
||||||
}
|
}
|
||||||
func (m *KeyValue) Size() (n int) {
|
func (m *KeyValue) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
l = len(m.Key)
|
l = len(m.Key)
|
||||||
|
@ -231,10 +340,16 @@ func (m *KeyValue) Size() (n int) {
|
||||||
if m.Lease != 0 {
|
if m.Lease != 0 {
|
||||||
n += 1 + sovKv(uint64(m.Lease))
|
n += 1 + sovKv(uint64(m.Lease))
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Event) Size() (n int) {
|
func (m *Event) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.Type != 0 {
|
if m.Type != 0 {
|
||||||
|
@ -248,18 +363,14 @@ func (m *Event) Size() (n int) {
|
||||||
l = m.PrevKv.Size()
|
l = m.PrevKv.Size()
|
||||||
n += 1 + l + sovKv(uint64(l))
|
n += 1 + l + sovKv(uint64(l))
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func sovKv(x uint64) (n int) {
|
func sovKv(x uint64) (n int) {
|
||||||
for {
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
n++
|
|
||||||
x >>= 7
|
|
||||||
if x == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
}
|
}
|
||||||
func sozKv(x uint64) (n int) {
|
func sozKv(x uint64) (n int) {
|
||||||
return sovKv(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
return sovKv(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||||
|
@ -279,7 +390,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -307,7 +418,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -316,6 +427,9 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthKv
|
return ErrInvalidLengthKv
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthKv
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -338,7 +452,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.CreateRevision |= (int64(b) & 0x7F) << shift
|
m.CreateRevision |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -357,7 +471,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.ModRevision |= (int64(b) & 0x7F) << shift
|
m.ModRevision |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -376,7 +490,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Version |= (int64(b) & 0x7F) << shift
|
m.Version |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -395,7 +509,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -404,6 +518,9 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthKv
|
return ErrInvalidLengthKv
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthKv
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -426,7 +543,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Lease |= (int64(b) & 0x7F) << shift
|
m.Lease |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -440,9 +557,13 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthKv
|
return ErrInvalidLengthKv
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthKv
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -467,7 +588,7 @@ func (m *Event) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -495,7 +616,7 @@ func (m *Event) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Type |= (Event_EventType(b) & 0x7F) << shift
|
m.Type |= Event_EventType(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -514,7 +635,7 @@ func (m *Event) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
msglen |= (int(b) & 0x7F) << shift
|
msglen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -523,6 +644,9 @@ func (m *Event) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthKv
|
return ErrInvalidLengthKv
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + msglen
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthKv
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -547,7 +671,7 @@ func (m *Event) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
msglen |= (int(b) & 0x7F) << shift
|
msglen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -556,6 +680,9 @@ func (m *Event) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthKv
|
return ErrInvalidLengthKv
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + msglen
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthKv
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -575,9 +702,13 @@ func (m *Event) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthKv
|
return ErrInvalidLengthKv
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthKv
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -590,6 +721,7 @@ func (m *Event) Unmarshal(dAtA []byte) error {
|
||||||
func skipKv(dAtA []byte) (n int, err error) {
|
func skipKv(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
depth := 0
|
||||||
for iNdEx < l {
|
for iNdEx < l {
|
||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -621,10 +753,8 @@ func skipKv(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
|
||||||
case 1:
|
case 1:
|
||||||
iNdEx += 8
|
iNdEx += 8
|
||||||
return iNdEx, nil
|
|
||||||
case 2:
|
case 2:
|
||||||
var length int
|
var length int
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -641,78 +771,34 @@ func skipKv(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iNdEx += length
|
|
||||||
if length < 0 {
|
if length < 0 {
|
||||||
return 0, ErrInvalidLengthKv
|
return 0, ErrInvalidLengthKv
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
iNdEx += length
|
||||||
case 3:
|
case 3:
|
||||||
for {
|
depth++
|
||||||
var innerWire uint64
|
|
||||||
var start int = iNdEx
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return 0, ErrIntOverflowKv
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return 0, io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
innerWire |= (uint64(b) & 0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
innerWireType := int(innerWire & 0x7)
|
|
||||||
if innerWireType == 4 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
next, err := skipKv(dAtA[start:])
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
iNdEx = start + next
|
|
||||||
}
|
|
||||||
return iNdEx, nil
|
|
||||||
case 4:
|
case 4:
|
||||||
return iNdEx, nil
|
if depth == 0 {
|
||||||
|
return 0, ErrUnexpectedEndOfGroupKv
|
||||||
|
}
|
||||||
|
depth--
|
||||||
case 5:
|
case 5:
|
||||||
iNdEx += 4
|
iNdEx += 4
|
||||||
return iNdEx, nil
|
|
||||||
default:
|
default:
|
||||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||||
}
|
}
|
||||||
|
if iNdEx < 0 {
|
||||||
|
return 0, ErrInvalidLengthKv
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
if depth == 0 {
|
||||||
|
return iNdEx, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0, io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrInvalidLengthKv = fmt.Errorf("proto: negative length found during unmarshaling")
|
ErrInvalidLengthKv = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||||
ErrIntOverflowKv = fmt.Errorf("proto: integer overflow")
|
ErrIntOverflowKv = fmt.Errorf("proto: integer overflow")
|
||||||
|
ErrUnexpectedEndOfGroupKv = fmt.Errorf("proto: unexpected end of group")
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() { proto.RegisterFile("kv.proto", fileDescriptorKv) }
|
|
||||||
|
|
||||||
var fileDescriptorKv = []byte{
|
|
||||||
// 303 bytes of a gzipped FileDescriptorProto
|
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x41, 0x4e, 0xc2, 0x40,
|
|
||||||
0x14, 0x86, 0x3b, 0x14, 0x0a, 0x3e, 0x08, 0x36, 0x13, 0x12, 0x27, 0x2e, 0x26, 0x95, 0x8d, 0x18,
|
|
||||||
0x13, 0x4c, 0xf0, 0x06, 0xc6, 0xae, 0x70, 0x61, 0x1a, 0x74, 0x4b, 0x4a, 0x79, 0x21, 0xa4, 0x94,
|
|
||||||
0x69, 0x4a, 0x9d, 0xa4, 0x37, 0x71, 0xef, 0xde, 0x73, 0xb0, 0xe4, 0x08, 0x52, 0x2f, 0x62, 0xfa,
|
|
||||||
0xc6, 0xe2, 0xc6, 0xcd, 0xe4, 0xfd, 0xff, 0xff, 0x65, 0xe6, 0x7f, 0x03, 0x9d, 0x58, 0x8f, 0xd3,
|
|
||||||
0x4c, 0xe5, 0x8a, 0x3b, 0x89, 0x8e, 0xa2, 0x74, 0x71, 0x39, 0x58, 0xa9, 0x95, 0x22, 0xeb, 0xae,
|
|
||||||
0x9a, 0x4c, 0x3a, 0xfc, 0x64, 0xd0, 0x99, 0x62, 0xf1, 0x1a, 0x6e, 0xde, 0x90, 0xbb, 0x60, 0xc7,
|
|
||||||
0x58, 0x08, 0xe6, 0xb1, 0x51, 0x2f, 0xa8, 0x46, 0x7e, 0x0d, 0xe7, 0x51, 0x86, 0x61, 0x8e, 0xf3,
|
|
||||||
0x0c, 0xf5, 0x7a, 0xb7, 0x56, 0x5b, 0xd1, 0xf0, 0xd8, 0xc8, 0x0e, 0xfa, 0xc6, 0x0e, 0x7e, 0x5d,
|
|
||||||
0x7e, 0x05, 0xbd, 0x44, 0x2d, 0xff, 0x28, 0x9b, 0xa8, 0x6e, 0xa2, 0x96, 0x27, 0x44, 0x40, 0x5b,
|
|
||||||
0x63, 0x46, 0x69, 0x93, 0xd2, 0x5a, 0xf2, 0x01, 0xb4, 0x74, 0x55, 0x40, 0xb4, 0xe8, 0x65, 0x23,
|
|
||||||
0x2a, 0x77, 0x83, 0xe1, 0x0e, 0x85, 0x43, 0xb4, 0x11, 0xc3, 0x0f, 0x06, 0x2d, 0x5f, 0xe3, 0x36,
|
|
||||||
0xe7, 0xb7, 0xd0, 0xcc, 0x8b, 0x14, 0xa9, 0x6e, 0x7f, 0x72, 0x31, 0x36, 0x7b, 0x8e, 0x29, 0x34,
|
|
||||||
0xe7, 0xac, 0x48, 0x31, 0x20, 0x88, 0x7b, 0xd0, 0x88, 0x35, 0x75, 0xef, 0x4e, 0xdc, 0x1a, 0xad,
|
|
||||||
0x17, 0x0f, 0x1a, 0xb1, 0xe6, 0x37, 0xd0, 0x4e, 0x33, 0xd4, 0xf3, 0x58, 0x53, 0xf9, 0xff, 0x30,
|
|
||||||
0xa7, 0x02, 0xa6, 0x7a, 0xe8, 0xc1, 0xd9, 0xe9, 0x7e, 0xde, 0x06, 0xfb, 0xf9, 0x65, 0xe6, 0x5a,
|
|
||||||
0x1c, 0xc0, 0x79, 0xf4, 0x9f, 0xfc, 0x99, 0xef, 0xb2, 0x07, 0xb1, 0x3f, 0x4a, 0xeb, 0x70, 0x94,
|
|
||||||
0xd6, 0xbe, 0x94, 0xec, 0x50, 0x4a, 0xf6, 0x55, 0x4a, 0xf6, 0xfe, 0x2d, 0xad, 0x85, 0x43, 0xff,
|
|
||||||
0x7e, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x45, 0x92, 0x5d, 0xa1, 0x01, 0x00, 0x00,
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,27 +1,16 @@
|
||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
// source: snap.proto
|
// source: snap.proto
|
||||||
|
|
||||||
/*
|
|
||||||
Package snappb is a generated protocol buffer package.
|
|
||||||
|
|
||||||
It is generated from these files:
|
|
||||||
snap.proto
|
|
||||||
|
|
||||||
It has these top-level messages:
|
|
||||||
Snapshot
|
|
||||||
*/
|
|
||||||
package snappb
|
package snappb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
fmt "fmt"
|
||||||
|
io "io"
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
|
|
||||||
math "math"
|
math "math"
|
||||||
|
math_bits "math/bits"
|
||||||
|
|
||||||
_ "github.com/gogo/protobuf/gogoproto"
|
_ "github.com/gogo/protobuf/gogoproto"
|
||||||
|
proto "github.com/golang/protobuf/proto"
|
||||||
io "io"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -33,26 +22,71 @@ var _ = math.Inf
|
||||||
// is compatible with the proto package it is being compiled against.
|
// is compatible with the proto package it is being compiled against.
|
||||||
// A compilation error at this line likely means your copy of the
|
// A compilation error at this line likely means your copy of the
|
||||||
// proto package needs to be updated.
|
// proto package needs to be updated.
|
||||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||||
|
|
||||||
type Snapshot struct {
|
type Snapshot struct {
|
||||||
Crc uint32 `protobuf:"varint,1,opt,name=crc" json:"crc"`
|
Crc uint32 `protobuf:"varint,1,opt,name=crc" json:"crc"`
|
||||||
Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
|
Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Snapshot) Reset() { *m = Snapshot{} }
|
func (m *Snapshot) Reset() { *m = Snapshot{} }
|
||||||
func (m *Snapshot) String() string { return proto.CompactTextString(m) }
|
func (m *Snapshot) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Snapshot) ProtoMessage() {}
|
func (*Snapshot) ProtoMessage() {}
|
||||||
func (*Snapshot) Descriptor() ([]byte, []int) { return fileDescriptorSnap, []int{0} }
|
func (*Snapshot) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_f2e3c045ebf84d00, []int{0}
|
||||||
|
}
|
||||||
|
func (m *Snapshot) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *Snapshot) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_Snapshot.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *Snapshot) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *Snapshot) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_Snapshot.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_Snapshot proto.InternalMessageInfo
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*Snapshot)(nil), "snappb.snapshot")
|
proto.RegisterType((*Snapshot)(nil), "snappb.snapshot")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("snap.proto", fileDescriptor_f2e3c045ebf84d00) }
|
||||||
|
|
||||||
|
var fileDescriptor_f2e3c045ebf84d00 = []byte{
|
||||||
|
// 126 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0xce, 0x4b, 0x2c,
|
||||||
|
0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0xb1, 0x0b, 0x92, 0xa4, 0x44, 0xd2, 0xf3,
|
||||||
|
0xd3, 0xf3, 0xc1, 0x42, 0xfa, 0x20, 0x16, 0x44, 0x56, 0xc9, 0x8c, 0x8b, 0x03, 0x24, 0x5f, 0x9c,
|
||||||
|
0x91, 0x5f, 0x22, 0x24, 0xc6, 0xc5, 0x9c, 0x5c, 0x94, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xeb,
|
||||||
|
0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x48, 0x40, 0x48, 0x88, 0x8b, 0x25, 0x25, 0xb1, 0x24,
|
||||||
|
0x51, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xcc, 0x76, 0x12, 0x39, 0xf1, 0x50, 0x8e, 0xe1,
|
||||||
|
0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf1, 0x58, 0x8e,
|
||||||
|
0x01, 0x10, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x0f, 0x32, 0xb2, 0x78, 0x00, 0x00, 0x00,
|
||||||
|
}
|
||||||
|
|
||||||
func (m *Snapshot) Marshal() (dAtA []byte, err error) {
|
func (m *Snapshot) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -60,35 +94,47 @@ func (m *Snapshot) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
|
func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
dAtA[i] = 0x8
|
|
||||||
i++
|
|
||||||
i = encodeVarintSnap(dAtA, i, uint64(m.Crc))
|
|
||||||
if m.Data != nil {
|
|
||||||
dAtA[i] = 0x12
|
|
||||||
i++
|
|
||||||
i = encodeVarintSnap(dAtA, i, uint64(len(m.Data)))
|
|
||||||
i += copy(dAtA[i:], m.Data)
|
|
||||||
}
|
|
||||||
if m.XXX_unrecognized != nil {
|
if m.XXX_unrecognized != nil {
|
||||||
i += copy(dAtA[i:], m.XXX_unrecognized)
|
i -= len(m.XXX_unrecognized)
|
||||||
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
}
|
}
|
||||||
return i, nil
|
if m.Data != nil {
|
||||||
|
i -= len(m.Data)
|
||||||
|
copy(dAtA[i:], m.Data)
|
||||||
|
i = encodeVarintSnap(dAtA, i, uint64(len(m.Data)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
i = encodeVarintSnap(dAtA, i, uint64(m.Crc))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeVarintSnap(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintSnap(dAtA []byte, offset int, v uint64) int {
|
||||||
|
offset -= sovSnap(v)
|
||||||
|
base := offset
|
||||||
for v >= 1<<7 {
|
for v >= 1<<7 {
|
||||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
v >>= 7
|
v >>= 7
|
||||||
offset++
|
offset++
|
||||||
}
|
}
|
||||||
dAtA[offset] = uint8(v)
|
dAtA[offset] = uint8(v)
|
||||||
return offset + 1
|
return base
|
||||||
}
|
}
|
||||||
func (m *Snapshot) Size() (n int) {
|
func (m *Snapshot) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
n += 1 + sovSnap(uint64(m.Crc))
|
n += 1 + sovSnap(uint64(m.Crc))
|
||||||
|
@ -103,14 +149,7 @@ func (m *Snapshot) Size() (n int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func sovSnap(x uint64) (n int) {
|
func sovSnap(x uint64) (n int) {
|
||||||
for {
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
n++
|
|
||||||
x >>= 7
|
|
||||||
if x == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
}
|
}
|
||||||
func sozSnap(x uint64) (n int) {
|
func sozSnap(x uint64) (n int) {
|
||||||
return sovSnap(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
return sovSnap(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||||
|
@ -130,7 +169,7 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -158,7 +197,7 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Crc |= (uint32(b) & 0x7F) << shift
|
m.Crc |= uint32(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -177,7 +216,7 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -186,6 +225,9 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthSnap
|
return ErrInvalidLengthSnap
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthSnap
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -203,6 +245,9 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthSnap
|
return ErrInvalidLengthSnap
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthSnap
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -219,6 +264,7 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
||||||
func skipSnap(dAtA []byte) (n int, err error) {
|
func skipSnap(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
depth := 0
|
||||||
for iNdEx < l {
|
for iNdEx < l {
|
||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -250,10 +296,8 @@ func skipSnap(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
|
||||||
case 1:
|
case 1:
|
||||||
iNdEx += 8
|
iNdEx += 8
|
||||||
return iNdEx, nil
|
|
||||||
case 2:
|
case 2:
|
||||||
var length int
|
var length int
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -270,67 +314,34 @@ func skipSnap(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iNdEx += length
|
|
||||||
if length < 0 {
|
if length < 0 {
|
||||||
return 0, ErrInvalidLengthSnap
|
return 0, ErrInvalidLengthSnap
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
iNdEx += length
|
||||||
case 3:
|
case 3:
|
||||||
for {
|
depth++
|
||||||
var innerWire uint64
|
|
||||||
var start int = iNdEx
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return 0, ErrIntOverflowSnap
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return 0, io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
innerWire |= (uint64(b) & 0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
innerWireType := int(innerWire & 0x7)
|
|
||||||
if innerWireType == 4 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
next, err := skipSnap(dAtA[start:])
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
iNdEx = start + next
|
|
||||||
}
|
|
||||||
return iNdEx, nil
|
|
||||||
case 4:
|
case 4:
|
||||||
return iNdEx, nil
|
if depth == 0 {
|
||||||
|
return 0, ErrUnexpectedEndOfGroupSnap
|
||||||
|
}
|
||||||
|
depth--
|
||||||
case 5:
|
case 5:
|
||||||
iNdEx += 4
|
iNdEx += 4
|
||||||
return iNdEx, nil
|
|
||||||
default:
|
default:
|
||||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||||
}
|
}
|
||||||
|
if iNdEx < 0 {
|
||||||
|
return 0, ErrInvalidLengthSnap
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
if depth == 0 {
|
||||||
|
return iNdEx, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0, io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrInvalidLengthSnap = fmt.Errorf("proto: negative length found during unmarshaling")
|
ErrInvalidLengthSnap = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||||
ErrIntOverflowSnap = fmt.Errorf("proto: integer overflow")
|
ErrIntOverflowSnap = fmt.Errorf("proto: integer overflow")
|
||||||
|
ErrUnexpectedEndOfGroupSnap = fmt.Errorf("proto: unexpected end of group")
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() { proto.RegisterFile("snap.proto", fileDescriptorSnap) }
|
|
||||||
|
|
||||||
var fileDescriptorSnap = []byte{
|
|
||||||
// 126 bytes of a gzipped FileDescriptorProto
|
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0xce, 0x4b, 0x2c,
|
|
||||||
0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0xb1, 0x0b, 0x92, 0xa4, 0x44, 0xd2, 0xf3,
|
|
||||||
0xd3, 0xf3, 0xc1, 0x42, 0xfa, 0x20, 0x16, 0x44, 0x56, 0xc9, 0x8c, 0x8b, 0x03, 0x24, 0x5f, 0x9c,
|
|
||||||
0x91, 0x5f, 0x22, 0x24, 0xc6, 0xc5, 0x9c, 0x5c, 0x94, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xeb,
|
|
||||||
0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x48, 0x40, 0x48, 0x88, 0x8b, 0x25, 0x25, 0xb1, 0x24,
|
|
||||||
0x51, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xcc, 0x76, 0x12, 0x39, 0xf1, 0x50, 0x8e, 0xe1,
|
|
||||||
0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf1, 0x58, 0x8e,
|
|
||||||
0x01, 0x10, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x0f, 0x32, 0xb2, 0x78, 0x00, 0x00, 0x00,
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,31 +9,38 @@ It translates gRPC into RESTful JSON APIs.
|
||||||
package gw
|
package gw
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"go.etcd.io/etcd/v3/etcdserver/api/v3election/v3electionpb"
|
"go.etcd.io/etcd/v3/etcdserver/api/v3election/v3electionpb"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/golang/protobuf/descriptor"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||||
"github.com/grpc-ecosystem/grpc-gateway/utilities"
|
"github.com/grpc-ecosystem/grpc-gateway/utilities"
|
||||||
"golang.org/x/net/context"
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/grpclog"
|
"google.golang.org/grpc/grpclog"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Suppress "imported and not used" errors
|
||||||
var _ codes.Code
|
var _ codes.Code
|
||||||
var _ io.Reader
|
var _ io.Reader
|
||||||
var _ status.Status
|
var _ status.Status
|
||||||
var _ = runtime.String
|
var _ = runtime.String
|
||||||
var _ = utilities.NewDoubleArray
|
var _ = utilities.NewDoubleArray
|
||||||
|
var _ = descriptor.ForMessage
|
||||||
|
|
||||||
func request_Election_Campaign_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
func request_Election_Campaign_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
var protoReq v3electionpb.CampaignRequest
|
var protoReq v3electionpb.CampaignRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,11 +49,32 @@ func request_Election_Campaign_0(ctx context.Context, marshaler runtime.Marshale
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func local_request_Election_Campaign_0(ctx context.Context, marshaler runtime.Marshaler, server v3electionpb.ElectionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq v3electionpb.CampaignRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Campaign(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func request_Election_Proclaim_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
func request_Election_Proclaim_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
var protoReq v3electionpb.ProclaimRequest
|
var protoReq v3electionpb.ProclaimRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,11 +83,32 @@ func request_Election_Proclaim_0(ctx context.Context, marshaler runtime.Marshale
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func local_request_Election_Proclaim_0(ctx context.Context, marshaler runtime.Marshaler, server v3electionpb.ElectionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq v3electionpb.ProclaimRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Proclaim(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func request_Election_Leader_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
func request_Election_Leader_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
var protoReq v3electionpb.LeaderRequest
|
var protoReq v3electionpb.LeaderRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,11 +117,32 @@ func request_Election_Leader_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func local_request_Election_Leader_0(ctx context.Context, marshaler runtime.Marshaler, server v3electionpb.ElectionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq v3electionpb.LeaderRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Leader(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func request_Election_Observe_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (v3electionpb.Election_ObserveClient, runtime.ServerMetadata, error) {
|
func request_Election_Observe_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (v3electionpb.Election_ObserveClient, runtime.ServerMetadata, error) {
|
||||||
var protoReq v3electionpb.LeaderRequest
|
var protoReq v3electionpb.LeaderRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +163,11 @@ func request_Election_Resign_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||||
var protoReq v3electionpb.ResignRequest
|
var protoReq v3electionpb.ResignRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,6 +176,118 @@ func request_Election_Resign_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func local_request_Election_Resign_0(ctx context.Context, marshaler runtime.Marshaler, server v3electionpb.ElectionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq v3electionpb.ResignRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Resign(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// v3electionpb.RegisterElectionHandlerServer registers the http handlers for service Election to "mux".
|
||||||
|
// UnaryRPC :call v3electionpb.ElectionServer directly.
|
||||||
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||||
|
func RegisterElectionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server v3electionpb.ElectionServer) error {
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Election_Campaign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Election_Campaign_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Election_Campaign_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Election_Proclaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Election_Proclaim_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Election_Proclaim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Election_Leader_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Election_Leader_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Election_Leader_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Election_Observe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
||||||
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Election_Resign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Election_Resign_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Election_Resign_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// RegisterElectionHandlerFromEndpoint is same as RegisterElectionHandler but
|
// RegisterElectionHandlerFromEndpoint is same as RegisterElectionHandler but
|
||||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||||
func RegisterElectionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
func RegisterElectionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||||
|
@ -112,14 +298,14 @@ func RegisterElectionHandlerFromEndpoint(ctx context.Context, mux *runtime.Serve
|
||||||
defer func() {
|
defer func() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if cerr := conn.Close(); cerr != nil {
|
if cerr := conn.Close(); cerr != nil {
|
||||||
grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr)
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
<-ctx.Done()
|
<-ctx.Done()
|
||||||
if cerr := conn.Close(); cerr != nil {
|
if cerr := conn.Close(); cerr != nil {
|
||||||
grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr)
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}()
|
}()
|
||||||
|
@ -133,8 +319,8 @@ func RegisterElectionHandler(ctx context.Context, mux *runtime.ServeMux, conn *g
|
||||||
return RegisterElectionHandlerClient(ctx, mux, v3electionpb.NewElectionClient(conn))
|
return RegisterElectionHandlerClient(ctx, mux, v3electionpb.NewElectionClient(conn))
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterElectionHandler registers the http handlers for service Election to "mux".
|
// v3electionpb.RegisterElectionHandlerClient registers the http handlers for service Election
|
||||||
// The handlers forward requests to the grpc endpoint over the given implementation of "ElectionClient".
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ElectionClient".
|
||||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ElectionClient"
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ElectionClient"
|
||||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||||
// "ElectionClient" to call the correct interceptors.
|
// "ElectionClient" to call the correct interceptors.
|
||||||
|
@ -143,15 +329,6 @@ func RegisterElectionHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
|
||||||
mux.Handle("POST", pattern_Election_Campaign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("POST", pattern_Election_Campaign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
if cn, ok := w.(http.CloseNotifier); ok {
|
|
||||||
go func(done <-chan struct{}, closed <-chan bool) {
|
|
||||||
select {
|
|
||||||
case <-done:
|
|
||||||
case <-closed:
|
|
||||||
cancel()
|
|
||||||
}
|
|
||||||
}(ctx.Done(), cn.CloseNotify())
|
|
||||||
}
|
|
||||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -172,15 +349,6 @@ func RegisterElectionHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
|
||||||
mux.Handle("POST", pattern_Election_Proclaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("POST", pattern_Election_Proclaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
if cn, ok := w.(http.CloseNotifier); ok {
|
|
||||||
go func(done <-chan struct{}, closed <-chan bool) {
|
|
||||||
select {
|
|
||||||
case <-done:
|
|
||||||
case <-closed:
|
|
||||||
cancel()
|
|
||||||
}
|
|
||||||
}(ctx.Done(), cn.CloseNotify())
|
|
||||||
}
|
|
||||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -201,15 +369,6 @@ func RegisterElectionHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
|
||||||
mux.Handle("POST", pattern_Election_Leader_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("POST", pattern_Election_Leader_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
if cn, ok := w.(http.CloseNotifier); ok {
|
|
||||||
go func(done <-chan struct{}, closed <-chan bool) {
|
|
||||||
select {
|
|
||||||
case <-done:
|
|
||||||
case <-closed:
|
|
||||||
cancel()
|
|
||||||
}
|
|
||||||
}(ctx.Done(), cn.CloseNotify())
|
|
||||||
}
|
|
||||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -230,15 +389,6 @@ func RegisterElectionHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
|
||||||
mux.Handle("POST", pattern_Election_Observe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("POST", pattern_Election_Observe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
if cn, ok := w.(http.CloseNotifier); ok {
|
|
||||||
go func(done <-chan struct{}, closed <-chan bool) {
|
|
||||||
select {
|
|
||||||
case <-done:
|
|
||||||
case <-closed:
|
|
||||||
cancel()
|
|
||||||
}
|
|
||||||
}(ctx.Done(), cn.CloseNotify())
|
|
||||||
}
|
|
||||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -259,15 +409,6 @@ func RegisterElectionHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
|
||||||
mux.Handle("POST", pattern_Election_Resign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("POST", pattern_Election_Resign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
if cn, ok := w.(http.CloseNotifier); ok {
|
|
||||||
go func(done <-chan struct{}, closed <-chan bool) {
|
|
||||||
select {
|
|
||||||
case <-done:
|
|
||||||
case <-closed:
|
|
||||||
cancel()
|
|
||||||
}
|
|
||||||
}(ctx.Done(), cn.CloseNotify())
|
|
||||||
}
|
|
||||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -289,15 +430,15 @@ func RegisterElectionHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
pattern_Election_Campaign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "election", "campaign"}, ""))
|
pattern_Election_Campaign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "election", "campaign"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
|
|
||||||
pattern_Election_Proclaim_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "election", "proclaim"}, ""))
|
pattern_Election_Proclaim_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "election", "proclaim"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
|
|
||||||
pattern_Election_Leader_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "election", "leader"}, ""))
|
pattern_Election_Leader_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "election", "leader"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
|
|
||||||
pattern_Election_Observe_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "election", "observe"}, ""))
|
pattern_Election_Observe_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "election", "observe"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
|
|
||||||
pattern_Election_Resign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "election", "resign"}, ""))
|
pattern_Election_Resign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "election", "resign"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -9,31 +9,38 @@ It translates gRPC into RESTful JSON APIs.
|
||||||
package gw
|
package gw
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb"
|
"go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/golang/protobuf/descriptor"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||||
"github.com/grpc-ecosystem/grpc-gateway/utilities"
|
"github.com/grpc-ecosystem/grpc-gateway/utilities"
|
||||||
"golang.org/x/net/context"
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/grpclog"
|
"google.golang.org/grpc/grpclog"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Suppress "imported and not used" errors
|
||||||
var _ codes.Code
|
var _ codes.Code
|
||||||
var _ io.Reader
|
var _ io.Reader
|
||||||
var _ status.Status
|
var _ status.Status
|
||||||
var _ = runtime.String
|
var _ = runtime.String
|
||||||
var _ = utilities.NewDoubleArray
|
var _ = utilities.NewDoubleArray
|
||||||
|
var _ = descriptor.ForMessage
|
||||||
|
|
||||||
func request_Lock_Lock_0(ctx context.Context, marshaler runtime.Marshaler, client v3lockpb.LockClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
func request_Lock_Lock_0(ctx context.Context, marshaler runtime.Marshaler, client v3lockpb.LockClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
var protoReq v3lockpb.LockRequest
|
var protoReq v3lockpb.LockRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,11 +49,32 @@ func request_Lock_Lock_0(ctx context.Context, marshaler runtime.Marshaler, clien
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func local_request_Lock_Lock_0(ctx context.Context, marshaler runtime.Marshaler, server v3lockpb.LockServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq v3lockpb.LockRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Lock(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func request_Lock_Unlock_0(ctx context.Context, marshaler runtime.Marshaler, client v3lockpb.LockClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
func request_Lock_Unlock_0(ctx context.Context, marshaler runtime.Marshaler, client v3lockpb.LockClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
var protoReq v3lockpb.UnlockRequest
|
var protoReq v3lockpb.UnlockRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +83,71 @@ func request_Lock_Unlock_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func local_request_Lock_Unlock_0(ctx context.Context, marshaler runtime.Marshaler, server v3lockpb.LockServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq v3lockpb.UnlockRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Unlock(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// v3lockpb.RegisterLockHandlerServer registers the http handlers for service Lock to "mux".
|
||||||
|
// UnaryRPC :call v3lockpb.LockServer directly.
|
||||||
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||||
|
func RegisterLockHandlerServer(ctx context.Context, mux *runtime.ServeMux, server v3lockpb.LockServer) error {
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Lock_Lock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Lock_Lock_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Lock_Lock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Lock_Unlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Lock_Unlock_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Lock_Unlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// RegisterLockHandlerFromEndpoint is same as RegisterLockHandler but
|
// RegisterLockHandlerFromEndpoint is same as RegisterLockHandler but
|
||||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||||
func RegisterLockHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
func RegisterLockHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||||
|
@ -65,14 +158,14 @@ func RegisterLockHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux,
|
||||||
defer func() {
|
defer func() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if cerr := conn.Close(); cerr != nil {
|
if cerr := conn.Close(); cerr != nil {
|
||||||
grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr)
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
<-ctx.Done()
|
<-ctx.Done()
|
||||||
if cerr := conn.Close(); cerr != nil {
|
if cerr := conn.Close(); cerr != nil {
|
||||||
grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr)
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}()
|
}()
|
||||||
|
@ -86,8 +179,8 @@ func RegisterLockHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.
|
||||||
return RegisterLockHandlerClient(ctx, mux, v3lockpb.NewLockClient(conn))
|
return RegisterLockHandlerClient(ctx, mux, v3lockpb.NewLockClient(conn))
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterLockHandler registers the http handlers for service Lock to "mux".
|
// v3lockpb.RegisterLockHandlerClient registers the http handlers for service Lock
|
||||||
// The handlers forward requests to the grpc endpoint over the given implementation of "LockClient".
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LockClient".
|
||||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LockClient"
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LockClient"
|
||||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||||
// "LockClient" to call the correct interceptors.
|
// "LockClient" to call the correct interceptors.
|
||||||
|
@ -96,15 +189,6 @@ func RegisterLockHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien
|
||||||
mux.Handle("POST", pattern_Lock_Lock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("POST", pattern_Lock_Lock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
if cn, ok := w.(http.CloseNotifier); ok {
|
|
||||||
go func(done <-chan struct{}, closed <-chan bool) {
|
|
||||||
select {
|
|
||||||
case <-done:
|
|
||||||
case <-closed:
|
|
||||||
cancel()
|
|
||||||
}
|
|
||||||
}(ctx.Done(), cn.CloseNotify())
|
|
||||||
}
|
|
||||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -125,15 +209,6 @@ func RegisterLockHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien
|
||||||
mux.Handle("POST", pattern_Lock_Unlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("POST", pattern_Lock_Unlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
if cn, ok := w.(http.CloseNotifier); ok {
|
|
||||||
go func(done <-chan struct{}, closed <-chan bool) {
|
|
||||||
select {
|
|
||||||
case <-done:
|
|
||||||
case <-closed:
|
|
||||||
cancel()
|
|
||||||
}
|
|
||||||
}(ctx.Done(), cn.CloseNotify())
|
|
||||||
}
|
|
||||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -155,9 +230,9 @@ func RegisterLockHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
pattern_Lock_Lock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 1}, []string{"v3", "lock"}, ""))
|
pattern_Lock_Lock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 1}, []string{"v3", "lock"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
|
|
||||||
pattern_Lock_Unlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "lock", "unlock"}, ""))
|
pattern_Lock_Unlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3", "lock", "unlock"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -1,36 +1,22 @@
|
||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
// source: v3lock.proto
|
// source: v3lock.proto
|
||||||
|
|
||||||
/*
|
|
||||||
Package v3lockpb is a generated protocol buffer package.
|
|
||||||
|
|
||||||
It is generated from these files:
|
|
||||||
v3lock.proto
|
|
||||||
|
|
||||||
It has these top-level messages:
|
|
||||||
LockRequest
|
|
||||||
LockResponse
|
|
||||||
UnlockRequest
|
|
||||||
UnlockResponse
|
|
||||||
*/
|
|
||||||
package v3lockpb
|
package v3lockpb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
context "context"
|
||||||
|
fmt "fmt"
|
||||||
proto "github.com/golang/protobuf/proto"
|
io "io"
|
||||||
|
|
||||||
math "math"
|
math "math"
|
||||||
|
math_bits "math/bits"
|
||||||
|
|
||||||
_ "github.com/gogo/protobuf/gogoproto"
|
_ "github.com/gogo/protobuf/gogoproto"
|
||||||
|
proto "github.com/golang/protobuf/proto"
|
||||||
etcdserverpb "go.etcd.io/etcd/api/v3/etcdserverpb"
|
etcdserverpb "go.etcd.io/etcd/api/v3/etcdserverpb"
|
||||||
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||||
context "golang.org/x/net/context"
|
|
||||||
|
|
||||||
grpc "google.golang.org/grpc"
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
io "io"
|
status "google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -42,7 +28,7 @@ var _ = math.Inf
|
||||||
// is compatible with the proto package it is being compiled against.
|
// is compatible with the proto package it is being compiled against.
|
||||||
// A compilation error at this line likely means your copy of the
|
// A compilation error at this line likely means your copy of the
|
||||||
// proto package needs to be updated.
|
// proto package needs to be updated.
|
||||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||||
|
|
||||||
type LockRequest struct {
|
type LockRequest struct {
|
||||||
// name is the identifier for the distributed shared lock to be acquired.
|
// name is the identifier for the distributed shared lock to be acquired.
|
||||||
|
@ -53,12 +39,43 @@ type LockRequest struct {
|
||||||
// be treated as a single acquisition; locking twice with the same lease is a
|
// be treated as a single acquisition; locking twice with the same lease is a
|
||||||
// no-op.
|
// no-op.
|
||||||
Lease int64 `protobuf:"varint,2,opt,name=lease,proto3" json:"lease,omitempty"`
|
Lease int64 `protobuf:"varint,2,opt,name=lease,proto3" json:"lease,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LockRequest) Reset() { *m = LockRequest{} }
|
func (m *LockRequest) Reset() { *m = LockRequest{} }
|
||||||
func (m *LockRequest) String() string { return proto.CompactTextString(m) }
|
func (m *LockRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*LockRequest) ProtoMessage() {}
|
func (*LockRequest) ProtoMessage() {}
|
||||||
func (*LockRequest) Descriptor() ([]byte, []int) { return fileDescriptorV3Lock, []int{0} }
|
func (*LockRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_52389b3e2f253201, []int{0}
|
||||||
|
}
|
||||||
|
func (m *LockRequest) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *LockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_LockRequest.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *LockRequest) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_LockRequest.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *LockRequest) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *LockRequest) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_LockRequest.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_LockRequest proto.InternalMessageInfo
|
||||||
|
|
||||||
func (m *LockRequest) GetName() []byte {
|
func (m *LockRequest) GetName() []byte {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
|
@ -75,17 +92,48 @@ func (m *LockRequest) GetLease() int64 {
|
||||||
}
|
}
|
||||||
|
|
||||||
type LockResponse struct {
|
type LockResponse struct {
|
||||||
Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
|
Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||||
// key is a key that will exist on etcd for the duration that the Lock caller
|
// key is a key that will exist on etcd for the duration that the Lock caller
|
||||||
// owns the lock. Users should not modify this key or the lock may exhibit
|
// owns the lock. Users should not modify this key or the lock may exhibit
|
||||||
// undefined behavior.
|
// undefined behavior.
|
||||||
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LockResponse) Reset() { *m = LockResponse{} }
|
func (m *LockResponse) Reset() { *m = LockResponse{} }
|
||||||
func (m *LockResponse) String() string { return proto.CompactTextString(m) }
|
func (m *LockResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*LockResponse) ProtoMessage() {}
|
func (*LockResponse) ProtoMessage() {}
|
||||||
func (*LockResponse) Descriptor() ([]byte, []int) { return fileDescriptorV3Lock, []int{1} }
|
func (*LockResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_52389b3e2f253201, []int{1}
|
||||||
|
}
|
||||||
|
func (m *LockResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *LockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_LockResponse.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *LockResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_LockResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *LockResponse) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *LockResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_LockResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_LockResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
func (m *LockResponse) GetHeader() *etcdserverpb.ResponseHeader {
|
func (m *LockResponse) GetHeader() *etcdserverpb.ResponseHeader {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
|
@ -104,12 +152,43 @@ func (m *LockResponse) GetKey() []byte {
|
||||||
type UnlockRequest struct {
|
type UnlockRequest struct {
|
||||||
// key is the lock ownership key granted by Lock.
|
// key is the lock ownership key granted by Lock.
|
||||||
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UnlockRequest) Reset() { *m = UnlockRequest{} }
|
func (m *UnlockRequest) Reset() { *m = UnlockRequest{} }
|
||||||
func (m *UnlockRequest) String() string { return proto.CompactTextString(m) }
|
func (m *UnlockRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*UnlockRequest) ProtoMessage() {}
|
func (*UnlockRequest) ProtoMessage() {}
|
||||||
func (*UnlockRequest) Descriptor() ([]byte, []int) { return fileDescriptorV3Lock, []int{2} }
|
func (*UnlockRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_52389b3e2f253201, []int{2}
|
||||||
|
}
|
||||||
|
func (m *UnlockRequest) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *UnlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_UnlockRequest.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *UnlockRequest) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_UnlockRequest.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *UnlockRequest) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *UnlockRequest) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_UnlockRequest.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_UnlockRequest proto.InternalMessageInfo
|
||||||
|
|
||||||
func (m *UnlockRequest) GetKey() []byte {
|
func (m *UnlockRequest) GetKey() []byte {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
|
@ -119,13 +198,44 @@ func (m *UnlockRequest) GetKey() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
type UnlockResponse struct {
|
type UnlockResponse struct {
|
||||||
Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
|
Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UnlockResponse) Reset() { *m = UnlockResponse{} }
|
func (m *UnlockResponse) Reset() { *m = UnlockResponse{} }
|
||||||
func (m *UnlockResponse) String() string { return proto.CompactTextString(m) }
|
func (m *UnlockResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*UnlockResponse) ProtoMessage() {}
|
func (*UnlockResponse) ProtoMessage() {}
|
||||||
func (*UnlockResponse) Descriptor() ([]byte, []int) { return fileDescriptorV3Lock, []int{3} }
|
func (*UnlockResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_52389b3e2f253201, []int{3}
|
||||||
|
}
|
||||||
|
func (m *UnlockResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *UnlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_UnlockResponse.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *UnlockResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_UnlockResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *UnlockResponse) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *UnlockResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_UnlockResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_UnlockResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
func (m *UnlockResponse) GetHeader() *etcdserverpb.ResponseHeader {
|
func (m *UnlockResponse) GetHeader() *etcdserverpb.ResponseHeader {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
|
@ -141,6 +251,33 @@ func init() {
|
||||||
proto.RegisterType((*UnlockResponse)(nil), "v3lockpb.UnlockResponse")
|
proto.RegisterType((*UnlockResponse)(nil), "v3lockpb.UnlockResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("v3lock.proto", fileDescriptor_52389b3e2f253201) }
|
||||||
|
|
||||||
|
var fileDescriptor_52389b3e2f253201 = []byte{
|
||||||
|
// 330 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x33, 0xce, 0xc9,
|
||||||
|
0x4f, 0xce, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf0, 0x0a, 0x92, 0xa4, 0x44,
|
||||||
|
0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x82, 0xfa, 0x20, 0x16, 0x44, 0x5e, 0x4a, 0x3e, 0xb5, 0x24, 0x39,
|
||||||
|
0x45, 0x3f, 0xb1, 0x20, 0x53, 0x1f, 0xc4, 0x28, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0x2a, 0x48, 0xd2,
|
||||||
|
0x2f, 0x2a, 0x48, 0x86, 0x2a, 0x90, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0x05, 0x2b, 0x49, 0xcc,
|
||||||
|
0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, 0xc8, 0x2a, 0x99, 0x73, 0x71, 0xfb,
|
||||||
|
0xe4, 0x27, 0x67, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x09, 0x71, 0xb1, 0xe4, 0x25,
|
||||||
|
0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0x81, 0xd9, 0x42, 0x22, 0x5c, 0xac, 0x39,
|
||||||
|
0xa9, 0x89, 0xc5, 0xa9, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x10, 0x8e, 0x52, 0x18, 0x17,
|
||||||
|
0x0f, 0x44, 0x63, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x90, 0x09, 0x17, 0x5b, 0x46, 0x6a, 0x62,
|
||||||
|
0x4a, 0x6a, 0x11, 0x58, 0x2f, 0xb7, 0x91, 0x8c, 0x1e, 0xb2, 0x7b, 0xf4, 0x60, 0xea, 0x3c, 0xc0,
|
||||||
|
0x6a, 0x82, 0xa0, 0x6a, 0x85, 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0xc1, 0x26, 0xf3, 0x04, 0x81,
|
||||||
|
0x98, 0x4a, 0x8a, 0x5c, 0xbc, 0xa1, 0x79, 0x39, 0x48, 0x4e, 0x82, 0x2a, 0x61, 0x44, 0x28, 0x71,
|
||||||
|
0xe3, 0xe2, 0x83, 0x29, 0xa1, 0xc4, 0x72, 0xa3, 0x0d, 0x8c, 0x5c, 0x2c, 0x20, 0x3f, 0x08, 0xf9,
|
||||||
|
0x43, 0x69, 0x51, 0x3d, 0x58, 0x60, 0xeb, 0x21, 0x05, 0x8a, 0x94, 0x18, 0xba, 0x30, 0xc4, 0x34,
|
||||||
|
0x25, 0x89, 0xa6, 0xcb, 0x4f, 0x26, 0x33, 0x09, 0x29, 0xf1, 0xea, 0x97, 0x19, 0xeb, 0x83, 0x14,
|
||||||
|
0x80, 0x09, 0x2b, 0x46, 0x2d, 0xa1, 0x70, 0x2e, 0x36, 0x88, 0x0b, 0x85, 0xc4, 0x11, 0x7a, 0x51,
|
||||||
|
0xbc, 0x25, 0x25, 0x81, 0x29, 0x01, 0x35, 0x56, 0x0a, 0x6c, 0xac, 0x88, 0x12, 0x3f, 0xdc, 0xd8,
|
||||||
|
0xd2, 0x3c, 0xa8, 0xc1, 0x4e, 0x02, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0,
|
||||||
|
0x91, 0x1c, 0xe3, 0x8c, 0xc7, 0x72, 0x0c, 0x49, 0x6c, 0xe0, 0x78, 0x34, 0x06, 0x04, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0x4a, 0x4d, 0xca, 0xbb, 0x36, 0x02, 0x00, 0x00,
|
||||||
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var _ context.Context
|
var _ context.Context
|
||||||
var _ grpc.ClientConn
|
var _ grpc.ClientConn
|
||||||
|
@ -149,8 +286,9 @@ var _ grpc.ClientConn
|
||||||
// is compatible with the grpc package it is being compiled against.
|
// is compatible with the grpc package it is being compiled against.
|
||||||
const _ = grpc.SupportPackageIsVersion4
|
const _ = grpc.SupportPackageIsVersion4
|
||||||
|
|
||||||
// Client API for Lock service
|
// LockClient is the client API for Lock service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||||
type LockClient interface {
|
type LockClient interface {
|
||||||
// Lock acquires a distributed shared lock on a given named lock.
|
// Lock acquires a distributed shared lock on a given named lock.
|
||||||
// On success, it will return a unique key that exists so long as the
|
// On success, it will return a unique key that exists so long as the
|
||||||
|
@ -175,7 +313,7 @@ func NewLockClient(cc *grpc.ClientConn) LockClient {
|
||||||
|
|
||||||
func (c *lockClient) Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error) {
|
func (c *lockClient) Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error) {
|
||||||
out := new(LockResponse)
|
out := new(LockResponse)
|
||||||
err := grpc.Invoke(ctx, "/v3lockpb.Lock/Lock", in, out, c.cc, opts...)
|
err := c.cc.Invoke(ctx, "/v3lockpb.Lock/Lock", in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -184,15 +322,14 @@ func (c *lockClient) Lock(ctx context.Context, in *LockRequest, opts ...grpc.Cal
|
||||||
|
|
||||||
func (c *lockClient) Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) {
|
func (c *lockClient) Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) {
|
||||||
out := new(UnlockResponse)
|
out := new(UnlockResponse)
|
||||||
err := grpc.Invoke(ctx, "/v3lockpb.Lock/Unlock", in, out, c.cc, opts...)
|
err := c.cc.Invoke(ctx, "/v3lockpb.Lock/Unlock", in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Server API for Lock service
|
// LockServer is the server API for Lock service.
|
||||||
|
|
||||||
type LockServer interface {
|
type LockServer interface {
|
||||||
// Lock acquires a distributed shared lock on a given named lock.
|
// Lock acquires a distributed shared lock on a given named lock.
|
||||||
// On success, it will return a unique key that exists so long as the
|
// On success, it will return a unique key that exists so long as the
|
||||||
|
@ -207,6 +344,17 @@ type LockServer interface {
|
||||||
Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error)
|
Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnimplementedLockServer can be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedLockServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UnimplementedLockServer) Lock(ctx context.Context, req *LockRequest) (*LockResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Lock not implemented")
|
||||||
|
}
|
||||||
|
func (*UnimplementedLockServer) Unlock(ctx context.Context, req *UnlockRequest) (*UnlockResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Unlock not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
func RegisterLockServer(s *grpc.Server, srv LockServer) {
|
func RegisterLockServer(s *grpc.Server, srv LockServer) {
|
||||||
s.RegisterService(&_Lock_serviceDesc, srv)
|
s.RegisterService(&_Lock_serviceDesc, srv)
|
||||||
}
|
}
|
||||||
|
@ -267,7 +415,7 @@ var _Lock_serviceDesc = grpc.ServiceDesc{
|
||||||
func (m *LockRequest) Marshal() (dAtA []byte, err error) {
|
func (m *LockRequest) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -275,28 +423,38 @@ func (m *LockRequest) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LockRequest) MarshalTo(dAtA []byte) (int, error) {
|
func (m *LockRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *LockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if len(m.Name) > 0 {
|
if m.XXX_unrecognized != nil {
|
||||||
dAtA[i] = 0xa
|
i -= len(m.XXX_unrecognized)
|
||||||
i++
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Name)))
|
|
||||||
i += copy(dAtA[i:], m.Name)
|
|
||||||
}
|
}
|
||||||
if m.Lease != 0 {
|
if m.Lease != 0 {
|
||||||
dAtA[i] = 0x10
|
|
||||||
i++
|
|
||||||
i = encodeVarintV3Lock(dAtA, i, uint64(m.Lease))
|
i = encodeVarintV3Lock(dAtA, i, uint64(m.Lease))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x10
|
||||||
}
|
}
|
||||||
return i, nil
|
if len(m.Name) > 0 {
|
||||||
|
i -= len(m.Name)
|
||||||
|
copy(dAtA[i:], m.Name)
|
||||||
|
i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Name)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LockResponse) Marshal() (dAtA []byte, err error) {
|
func (m *LockResponse) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -304,33 +462,45 @@ func (m *LockResponse) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LockResponse) MarshalTo(dAtA []byte) (int, error) {
|
func (m *LockResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *LockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
i -= len(m.XXX_unrecognized)
|
||||||
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
|
}
|
||||||
|
if len(m.Key) > 0 {
|
||||||
|
i -= len(m.Key)
|
||||||
|
copy(dAtA[i:], m.Key)
|
||||||
|
i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Key)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
if m.Header != nil {
|
if m.Header != nil {
|
||||||
dAtA[i] = 0xa
|
{
|
||||||
i++
|
size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
|
||||||
i = encodeVarintV3Lock(dAtA, i, uint64(m.Header.Size()))
|
|
||||||
n1, err := m.Header.MarshalTo(dAtA[i:])
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
i += n1
|
i -= size
|
||||||
|
i = encodeVarintV3Lock(dAtA, i, uint64(size))
|
||||||
}
|
}
|
||||||
if len(m.Key) > 0 {
|
i--
|
||||||
dAtA[i] = 0x12
|
dAtA[i] = 0xa
|
||||||
i++
|
|
||||||
i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Key)))
|
|
||||||
i += copy(dAtA[i:], m.Key)
|
|
||||||
}
|
}
|
||||||
return i, nil
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UnlockRequest) Marshal() (dAtA []byte, err error) {
|
func (m *UnlockRequest) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -338,23 +508,33 @@ func (m *UnlockRequest) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UnlockRequest) MarshalTo(dAtA []byte) (int, error) {
|
func (m *UnlockRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *UnlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if len(m.Key) > 0 {
|
if m.XXX_unrecognized != nil {
|
||||||
dAtA[i] = 0xa
|
i -= len(m.XXX_unrecognized)
|
||||||
i++
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Key)))
|
|
||||||
i += copy(dAtA[i:], m.Key)
|
|
||||||
}
|
}
|
||||||
return i, nil
|
if len(m.Key) > 0 {
|
||||||
|
i -= len(m.Key)
|
||||||
|
copy(dAtA[i:], m.Key)
|
||||||
|
i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Key)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UnlockResponse) Marshal() (dAtA []byte, err error) {
|
func (m *UnlockResponse) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -362,33 +542,49 @@ func (m *UnlockResponse) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UnlockResponse) MarshalTo(dAtA []byte) (int, error) {
|
func (m *UnlockResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *UnlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
i -= len(m.XXX_unrecognized)
|
||||||
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
|
}
|
||||||
if m.Header != nil {
|
if m.Header != nil {
|
||||||
dAtA[i] = 0xa
|
{
|
||||||
i++
|
size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
|
||||||
i = encodeVarintV3Lock(dAtA, i, uint64(m.Header.Size()))
|
|
||||||
n2, err := m.Header.MarshalTo(dAtA[i:])
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
i += n2
|
i -= size
|
||||||
|
i = encodeVarintV3Lock(dAtA, i, uint64(size))
|
||||||
}
|
}
|
||||||
return i, nil
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeVarintV3Lock(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintV3Lock(dAtA []byte, offset int, v uint64) int {
|
||||||
|
offset -= sovV3Lock(v)
|
||||||
|
base := offset
|
||||||
for v >= 1<<7 {
|
for v >= 1<<7 {
|
||||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
v >>= 7
|
v >>= 7
|
||||||
offset++
|
offset++
|
||||||
}
|
}
|
||||||
dAtA[offset] = uint8(v)
|
dAtA[offset] = uint8(v)
|
||||||
return offset + 1
|
return base
|
||||||
}
|
}
|
||||||
func (m *LockRequest) Size() (n int) {
|
func (m *LockRequest) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
l = len(m.Name)
|
l = len(m.Name)
|
||||||
|
@ -398,10 +594,16 @@ func (m *LockRequest) Size() (n int) {
|
||||||
if m.Lease != 0 {
|
if m.Lease != 0 {
|
||||||
n += 1 + sovV3Lock(uint64(m.Lease))
|
n += 1 + sovV3Lock(uint64(m.Lease))
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LockResponse) Size() (n int) {
|
func (m *LockResponse) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.Header != nil {
|
if m.Header != nil {
|
||||||
|
@ -412,38 +614,46 @@ func (m *LockResponse) Size() (n int) {
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovV3Lock(uint64(l))
|
n += 1 + l + sovV3Lock(uint64(l))
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UnlockRequest) Size() (n int) {
|
func (m *UnlockRequest) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
l = len(m.Key)
|
l = len(m.Key)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovV3Lock(uint64(l))
|
n += 1 + l + sovV3Lock(uint64(l))
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UnlockResponse) Size() (n int) {
|
func (m *UnlockResponse) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.Header != nil {
|
if m.Header != nil {
|
||||||
l = m.Header.Size()
|
l = m.Header.Size()
|
||||||
n += 1 + l + sovV3Lock(uint64(l))
|
n += 1 + l + sovV3Lock(uint64(l))
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func sovV3Lock(x uint64) (n int) {
|
func sovV3Lock(x uint64) (n int) {
|
||||||
for {
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
n++
|
|
||||||
x >>= 7
|
|
||||||
if x == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
}
|
}
|
||||||
func sozV3Lock(x uint64) (n int) {
|
func sozV3Lock(x uint64) (n int) {
|
||||||
return sovV3Lock(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
return sovV3Lock(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||||
|
@ -463,7 +673,7 @@ func (m *LockRequest) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -491,7 +701,7 @@ func (m *LockRequest) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -500,6 +710,9 @@ func (m *LockRequest) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthV3Lock
|
return ErrInvalidLengthV3Lock
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthV3Lock
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -522,7 +735,7 @@ func (m *LockRequest) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Lease |= (int64(b) & 0x7F) << shift
|
m.Lease |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -536,9 +749,13 @@ func (m *LockRequest) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthV3Lock
|
return ErrInvalidLengthV3Lock
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthV3Lock
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -563,7 +780,7 @@ func (m *LockResponse) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -591,7 +808,7 @@ func (m *LockResponse) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
msglen |= (int(b) & 0x7F) << shift
|
msglen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -600,6 +817,9 @@ func (m *LockResponse) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthV3Lock
|
return ErrInvalidLengthV3Lock
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + msglen
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthV3Lock
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -624,7 +844,7 @@ func (m *LockResponse) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -633,6 +853,9 @@ func (m *LockResponse) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthV3Lock
|
return ErrInvalidLengthV3Lock
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthV3Lock
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -650,9 +873,13 @@ func (m *LockResponse) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthV3Lock
|
return ErrInvalidLengthV3Lock
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthV3Lock
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -677,7 +904,7 @@ func (m *UnlockRequest) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -705,7 +932,7 @@ func (m *UnlockRequest) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -714,6 +941,9 @@ func (m *UnlockRequest) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthV3Lock
|
return ErrInvalidLengthV3Lock
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthV3Lock
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -731,9 +961,13 @@ func (m *UnlockRequest) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthV3Lock
|
return ErrInvalidLengthV3Lock
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthV3Lock
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -758,7 +992,7 @@ func (m *UnlockResponse) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -786,7 +1020,7 @@ func (m *UnlockResponse) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
msglen |= (int(b) & 0x7F) << shift
|
msglen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -795,6 +1029,9 @@ func (m *UnlockResponse) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthV3Lock
|
return ErrInvalidLengthV3Lock
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + msglen
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthV3Lock
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -814,9 +1051,13 @@ func (m *UnlockResponse) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthV3Lock
|
return ErrInvalidLengthV3Lock
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthV3Lock
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -829,6 +1070,7 @@ func (m *UnlockResponse) Unmarshal(dAtA []byte) error {
|
||||||
func skipV3Lock(dAtA []byte) (n int, err error) {
|
func skipV3Lock(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
depth := 0
|
||||||
for iNdEx < l {
|
for iNdEx < l {
|
||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -860,10 +1102,8 @@ func skipV3Lock(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
|
||||||
case 1:
|
case 1:
|
||||||
iNdEx += 8
|
iNdEx += 8
|
||||||
return iNdEx, nil
|
|
||||||
case 2:
|
case 2:
|
||||||
var length int
|
var length int
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -880,80 +1120,34 @@ func skipV3Lock(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iNdEx += length
|
|
||||||
if length < 0 {
|
if length < 0 {
|
||||||
return 0, ErrInvalidLengthV3Lock
|
return 0, ErrInvalidLengthV3Lock
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
iNdEx += length
|
||||||
case 3:
|
case 3:
|
||||||
for {
|
depth++
|
||||||
var innerWire uint64
|
|
||||||
var start int = iNdEx
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return 0, ErrIntOverflowV3Lock
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return 0, io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
innerWire |= (uint64(b) & 0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
innerWireType := int(innerWire & 0x7)
|
|
||||||
if innerWireType == 4 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
next, err := skipV3Lock(dAtA[start:])
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
iNdEx = start + next
|
|
||||||
}
|
|
||||||
return iNdEx, nil
|
|
||||||
case 4:
|
case 4:
|
||||||
return iNdEx, nil
|
if depth == 0 {
|
||||||
|
return 0, ErrUnexpectedEndOfGroupV3Lock
|
||||||
|
}
|
||||||
|
depth--
|
||||||
case 5:
|
case 5:
|
||||||
iNdEx += 4
|
iNdEx += 4
|
||||||
return iNdEx, nil
|
|
||||||
default:
|
default:
|
||||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||||
}
|
}
|
||||||
|
if iNdEx < 0 {
|
||||||
|
return 0, ErrInvalidLengthV3Lock
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
if depth == 0 {
|
||||||
|
return iNdEx, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0, io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrInvalidLengthV3Lock = fmt.Errorf("proto: negative length found during unmarshaling")
|
ErrInvalidLengthV3Lock = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||||
ErrIntOverflowV3Lock = fmt.Errorf("proto: integer overflow")
|
ErrIntOverflowV3Lock = fmt.Errorf("proto: integer overflow")
|
||||||
|
ErrUnexpectedEndOfGroupV3Lock = fmt.Errorf("proto: unexpected end of group")
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() { proto.RegisterFile("v3lock.proto", fileDescriptorV3Lock) }
|
|
||||||
|
|
||||||
var fileDescriptorV3Lock = []byte{
|
|
||||||
// 330 bytes of a gzipped FileDescriptorProto
|
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x33, 0xce, 0xc9,
|
|
||||||
0x4f, 0xce, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf0, 0x0a, 0x92, 0xa4, 0x44,
|
|
||||||
0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x82, 0xfa, 0x20, 0x16, 0x44, 0x5e, 0x4a, 0x3e, 0xb5, 0x24, 0x39,
|
|
||||||
0x45, 0x3f, 0xb1, 0x20, 0x53, 0x1f, 0xc4, 0x28, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0x2a, 0x48, 0xd2,
|
|
||||||
0x2f, 0x2a, 0x48, 0x86, 0x2a, 0x90, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0x05, 0x2b, 0x49, 0xcc,
|
|
||||||
0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, 0xc8, 0x2a, 0x99, 0x73, 0x71, 0xfb,
|
|
||||||
0xe4, 0x27, 0x67, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x09, 0x71, 0xb1, 0xe4, 0x25,
|
|
||||||
0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0x81, 0xd9, 0x42, 0x22, 0x5c, 0xac, 0x39,
|
|
||||||
0xa9, 0x89, 0xc5, 0xa9, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x10, 0x8e, 0x52, 0x18, 0x17,
|
|
||||||
0x0f, 0x44, 0x63, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x90, 0x09, 0x17, 0x5b, 0x46, 0x6a, 0x62,
|
|
||||||
0x4a, 0x6a, 0x11, 0x58, 0x2f, 0xb7, 0x91, 0x8c, 0x1e, 0xb2, 0x7b, 0xf4, 0x60, 0xea, 0x3c, 0xc0,
|
|
||||||
0x6a, 0x82, 0xa0, 0x6a, 0x85, 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0xc1, 0x26, 0xf3, 0x04, 0x81,
|
|
||||||
0x98, 0x4a, 0x8a, 0x5c, 0xbc, 0xa1, 0x79, 0x39, 0x48, 0x4e, 0x82, 0x2a, 0x61, 0x44, 0x28, 0x71,
|
|
||||||
0xe3, 0xe2, 0x83, 0x29, 0xa1, 0xc4, 0x72, 0xa3, 0x0d, 0x8c, 0x5c, 0x2c, 0x20, 0x3f, 0x08, 0xf9,
|
|
||||||
0x43, 0x69, 0x51, 0x3d, 0x58, 0x60, 0xeb, 0x21, 0x05, 0x8a, 0x94, 0x18, 0xba, 0x30, 0xc4, 0x34,
|
|
||||||
0x25, 0x89, 0xa6, 0xcb, 0x4f, 0x26, 0x33, 0x09, 0x29, 0xf1, 0xea, 0x97, 0x19, 0xeb, 0x83, 0x14,
|
|
||||||
0x80, 0x09, 0x2b, 0x46, 0x2d, 0xa1, 0x70, 0x2e, 0x36, 0x88, 0x0b, 0x85, 0xc4, 0x11, 0x7a, 0x51,
|
|
||||||
0xbc, 0x25, 0x25, 0x81, 0x29, 0x01, 0x35, 0x56, 0x0a, 0x6c, 0xac, 0x88, 0x12, 0x3f, 0xdc, 0xd8,
|
|
||||||
0xd2, 0x3c, 0xa8, 0xc1, 0x4e, 0x02, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0,
|
|
||||||
0x91, 0x1c, 0xe3, 0x8c, 0xc7, 0x72, 0x0c, 0x49, 0x6c, 0xe0, 0x78, 0x34, 0x06, 0x04, 0x00, 0x00,
|
|
||||||
0xff, 0xff, 0x4a, 0x4d, 0xca, 0xbb, 0x36, 0x02, 0x00, 0x00,
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,31 +1,17 @@
|
||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
// source: lease.proto
|
// source: lease.proto
|
||||||
|
|
||||||
/*
|
|
||||||
Package leasepb is a generated protocol buffer package.
|
|
||||||
|
|
||||||
It is generated from these files:
|
|
||||||
lease.proto
|
|
||||||
|
|
||||||
It has these top-level messages:
|
|
||||||
Lease
|
|
||||||
LeaseInternalRequest
|
|
||||||
LeaseInternalResponse
|
|
||||||
*/
|
|
||||||
package leasepb
|
package leasepb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
fmt "fmt"
|
||||||
|
io "io"
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
|
|
||||||
math "math"
|
math "math"
|
||||||
|
math_bits "math/bits"
|
||||||
|
|
||||||
_ "github.com/gogo/protobuf/gogoproto"
|
_ "github.com/gogo/protobuf/gogoproto"
|
||||||
|
proto "github.com/golang/protobuf/proto"
|
||||||
etcdserverpb "go.etcd.io/etcd/api/v3/etcdserverpb"
|
etcdserverpb "go.etcd.io/etcd/api/v3/etcdserverpb"
|
||||||
|
|
||||||
io "io"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -37,46 +23,162 @@ var _ = math.Inf
|
||||||
// is compatible with the proto package it is being compiled against.
|
// is compatible with the proto package it is being compiled against.
|
||||||
// A compilation error at this line likely means your copy of the
|
// A compilation error at this line likely means your copy of the
|
||||||
// proto package needs to be updated.
|
// proto package needs to be updated.
|
||||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||||
|
|
||||||
type Lease struct {
|
type Lease struct {
|
||||||
ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
|
||||||
TTL int64 `protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"`
|
TTL int64 `protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"`
|
||||||
RemainingTTL int64 `protobuf:"varint,3,opt,name=RemainingTTL,proto3" json:"RemainingTTL,omitempty"`
|
RemainingTTL int64 `protobuf:"varint,3,opt,name=RemainingTTL,proto3" json:"RemainingTTL,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Lease) Reset() { *m = Lease{} }
|
func (m *Lease) Reset() { *m = Lease{} }
|
||||||
func (m *Lease) String() string { return proto.CompactTextString(m) }
|
func (m *Lease) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Lease) ProtoMessage() {}
|
func (*Lease) ProtoMessage() {}
|
||||||
func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptorLease, []int{0} }
|
func (*Lease) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_3dd57e402472b33a, []int{0}
|
||||||
|
}
|
||||||
|
func (m *Lease) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_Lease.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *Lease) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_Lease.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *Lease) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *Lease) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_Lease.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_Lease proto.InternalMessageInfo
|
||||||
|
|
||||||
type LeaseInternalRequest struct {
|
type LeaseInternalRequest struct {
|
||||||
LeaseTimeToLiveRequest *etcdserverpb.LeaseTimeToLiveRequest `protobuf:"bytes,1,opt,name=LeaseTimeToLiveRequest" json:"LeaseTimeToLiveRequest,omitempty"`
|
LeaseTimeToLiveRequest *etcdserverpb.LeaseTimeToLiveRequest `protobuf:"bytes,1,opt,name=LeaseTimeToLiveRequest,proto3" json:"LeaseTimeToLiveRequest,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LeaseInternalRequest) Reset() { *m = LeaseInternalRequest{} }
|
func (m *LeaseInternalRequest) Reset() { *m = LeaseInternalRequest{} }
|
||||||
func (m *LeaseInternalRequest) String() string { return proto.CompactTextString(m) }
|
func (m *LeaseInternalRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*LeaseInternalRequest) ProtoMessage() {}
|
func (*LeaseInternalRequest) ProtoMessage() {}
|
||||||
func (*LeaseInternalRequest) Descriptor() ([]byte, []int) { return fileDescriptorLease, []int{1} }
|
func (*LeaseInternalRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_3dd57e402472b33a, []int{1}
|
||||||
|
}
|
||||||
|
func (m *LeaseInternalRequest) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *LeaseInternalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_LeaseInternalRequest.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *LeaseInternalRequest) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_LeaseInternalRequest.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *LeaseInternalRequest) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *LeaseInternalRequest) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_LeaseInternalRequest.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_LeaseInternalRequest proto.InternalMessageInfo
|
||||||
|
|
||||||
type LeaseInternalResponse struct {
|
type LeaseInternalResponse struct {
|
||||||
LeaseTimeToLiveResponse *etcdserverpb.LeaseTimeToLiveResponse `protobuf:"bytes,1,opt,name=LeaseTimeToLiveResponse" json:"LeaseTimeToLiveResponse,omitempty"`
|
LeaseTimeToLiveResponse *etcdserverpb.LeaseTimeToLiveResponse `protobuf:"bytes,1,opt,name=LeaseTimeToLiveResponse,proto3" json:"LeaseTimeToLiveResponse,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LeaseInternalResponse) Reset() { *m = LeaseInternalResponse{} }
|
func (m *LeaseInternalResponse) Reset() { *m = LeaseInternalResponse{} }
|
||||||
func (m *LeaseInternalResponse) String() string { return proto.CompactTextString(m) }
|
func (m *LeaseInternalResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*LeaseInternalResponse) ProtoMessage() {}
|
func (*LeaseInternalResponse) ProtoMessage() {}
|
||||||
func (*LeaseInternalResponse) Descriptor() ([]byte, []int) { return fileDescriptorLease, []int{2} }
|
func (*LeaseInternalResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_3dd57e402472b33a, []int{2}
|
||||||
|
}
|
||||||
|
func (m *LeaseInternalResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *LeaseInternalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_LeaseInternalResponse.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *LeaseInternalResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_LeaseInternalResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *LeaseInternalResponse) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *LeaseInternalResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_LeaseInternalResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_LeaseInternalResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*Lease)(nil), "leasepb.Lease")
|
proto.RegisterType((*Lease)(nil), "leasepb.Lease")
|
||||||
proto.RegisterType((*LeaseInternalRequest)(nil), "leasepb.LeaseInternalRequest")
|
proto.RegisterType((*LeaseInternalRequest)(nil), "leasepb.LeaseInternalRequest")
|
||||||
proto.RegisterType((*LeaseInternalResponse)(nil), "leasepb.LeaseInternalResponse")
|
proto.RegisterType((*LeaseInternalResponse)(nil), "leasepb.LeaseInternalResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("lease.proto", fileDescriptor_3dd57e402472b33a) }
|
||||||
|
|
||||||
|
var fileDescriptor_3dd57e402472b33a = []byte{
|
||||||
|
// 256 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0x49, 0x4d, 0x2c,
|
||||||
|
0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x07, 0x73, 0x0a, 0x92, 0xa4, 0x44, 0xd2,
|
||||||
|
0xf3, 0xd3, 0xf3, 0xc1, 0x62, 0xfa, 0x20, 0x16, 0x44, 0x5a, 0x4a, 0x3e, 0xb5, 0x24, 0x39, 0x45,
|
||||||
|
0x3f, 0xb1, 0x20, 0x53, 0x1f, 0xc4, 0x28, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0x2a, 0x48, 0xd2, 0x2f,
|
||||||
|
0x2a, 0x48, 0x86, 0x28, 0x50, 0xf2, 0xe5, 0x62, 0xf5, 0x01, 0x99, 0x20, 0xc4, 0xc7, 0xc5, 0xe4,
|
||||||
|
0xe9, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x1c, 0xc4, 0xe4, 0xe9, 0x22, 0x24, 0xc0, 0xc5, 0x1c,
|
||||||
|
0x12, 0xe2, 0x23, 0xc1, 0x04, 0x16, 0x00, 0x31, 0x85, 0x94, 0xb8, 0x78, 0x82, 0x52, 0x73, 0x13,
|
||||||
|
0x33, 0xf3, 0x32, 0xf3, 0xd2, 0x41, 0x52, 0xcc, 0x60, 0x29, 0x14, 0x31, 0xa5, 0x12, 0x2e, 0x11,
|
||||||
|
0xb0, 0x71, 0x9e, 0x79, 0x25, 0xa9, 0x45, 0x79, 0x89, 0x39, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5,
|
||||||
|
0x25, 0x42, 0x31, 0x5c, 0x62, 0x60, 0xf1, 0x90, 0xcc, 0xdc, 0xd4, 0x90, 0x7c, 0x9f, 0xcc, 0xb2,
|
||||||
|
0x54, 0xa8, 0x0c, 0xd8, 0x46, 0x6e, 0x23, 0x15, 0x3d, 0x64, 0xf7, 0xe9, 0x61, 0x57, 0x1b, 0x84,
|
||||||
|
0xc3, 0x0c, 0xa5, 0x0a, 0x2e, 0x51, 0x34, 0x5b, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0xe2,
|
||||||
|
0xb9, 0xc4, 0x31, 0xb4, 0x40, 0xa4, 0xa0, 0xf6, 0xaa, 0x12, 0xb0, 0x17, 0xa2, 0x38, 0x08, 0x97,
|
||||||
|
0x29, 0x4e, 0x12, 0x27, 0x1e, 0xca, 0x31, 0x5c, 0x78, 0x28, 0xc7, 0x70, 0xe2, 0x91, 0x1c, 0xe3,
|
||||||
|
0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xce, 0x78, 0x2c, 0xc7, 0x90, 0xc4, 0x06, 0x0e,
|
||||||
|
0x5f, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x8a, 0x94, 0xb9, 0xae, 0x01, 0x00, 0x00,
|
||||||
|
}
|
||||||
|
|
||||||
func (m *Lease) Marshal() (dAtA []byte, err error) {
|
func (m *Lease) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -84,32 +186,41 @@ func (m *Lease) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Lease) MarshalTo(dAtA []byte) (int, error) {
|
func (m *Lease) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Lease) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.ID != 0 {
|
if m.XXX_unrecognized != nil {
|
||||||
dAtA[i] = 0x8
|
i -= len(m.XXX_unrecognized)
|
||||||
i++
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
i = encodeVarintLease(dAtA, i, uint64(m.ID))
|
|
||||||
}
|
|
||||||
if m.TTL != 0 {
|
|
||||||
dAtA[i] = 0x10
|
|
||||||
i++
|
|
||||||
i = encodeVarintLease(dAtA, i, uint64(m.TTL))
|
|
||||||
}
|
}
|
||||||
if m.RemainingTTL != 0 {
|
if m.RemainingTTL != 0 {
|
||||||
dAtA[i] = 0x18
|
|
||||||
i++
|
|
||||||
i = encodeVarintLease(dAtA, i, uint64(m.RemainingTTL))
|
i = encodeVarintLease(dAtA, i, uint64(m.RemainingTTL))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x18
|
||||||
}
|
}
|
||||||
return i, nil
|
if m.TTL != 0 {
|
||||||
|
i = encodeVarintLease(dAtA, i, uint64(m.TTL))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x10
|
||||||
|
}
|
||||||
|
if m.ID != 0 {
|
||||||
|
i = encodeVarintLease(dAtA, i, uint64(m.ID))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LeaseInternalRequest) Marshal() (dAtA []byte, err error) {
|
func (m *LeaseInternalRequest) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -117,27 +228,38 @@ func (m *LeaseInternalRequest) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LeaseInternalRequest) MarshalTo(dAtA []byte) (int, error) {
|
func (m *LeaseInternalRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *LeaseInternalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
i -= len(m.XXX_unrecognized)
|
||||||
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
|
}
|
||||||
if m.LeaseTimeToLiveRequest != nil {
|
if m.LeaseTimeToLiveRequest != nil {
|
||||||
dAtA[i] = 0xa
|
{
|
||||||
i++
|
size, err := m.LeaseTimeToLiveRequest.MarshalToSizedBuffer(dAtA[:i])
|
||||||
i = encodeVarintLease(dAtA, i, uint64(m.LeaseTimeToLiveRequest.Size()))
|
|
||||||
n1, err := m.LeaseTimeToLiveRequest.MarshalTo(dAtA[i:])
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
i += n1
|
i -= size
|
||||||
|
i = encodeVarintLease(dAtA, i, uint64(size))
|
||||||
}
|
}
|
||||||
return i, nil
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LeaseInternalResponse) Marshal() (dAtA []byte, err error) {
|
func (m *LeaseInternalResponse) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -145,33 +267,49 @@ func (m *LeaseInternalResponse) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LeaseInternalResponse) MarshalTo(dAtA []byte) (int, error) {
|
func (m *LeaseInternalResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *LeaseInternalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
i -= len(m.XXX_unrecognized)
|
||||||
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
|
}
|
||||||
if m.LeaseTimeToLiveResponse != nil {
|
if m.LeaseTimeToLiveResponse != nil {
|
||||||
dAtA[i] = 0xa
|
{
|
||||||
i++
|
size, err := m.LeaseTimeToLiveResponse.MarshalToSizedBuffer(dAtA[:i])
|
||||||
i = encodeVarintLease(dAtA, i, uint64(m.LeaseTimeToLiveResponse.Size()))
|
|
||||||
n2, err := m.LeaseTimeToLiveResponse.MarshalTo(dAtA[i:])
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
i += n2
|
i -= size
|
||||||
|
i = encodeVarintLease(dAtA, i, uint64(size))
|
||||||
}
|
}
|
||||||
return i, nil
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeVarintLease(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintLease(dAtA []byte, offset int, v uint64) int {
|
||||||
|
offset -= sovLease(v)
|
||||||
|
base := offset
|
||||||
for v >= 1<<7 {
|
for v >= 1<<7 {
|
||||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
v >>= 7
|
v >>= 7
|
||||||
offset++
|
offset++
|
||||||
}
|
}
|
||||||
dAtA[offset] = uint8(v)
|
dAtA[offset] = uint8(v)
|
||||||
return offset + 1
|
return base
|
||||||
}
|
}
|
||||||
func (m *Lease) Size() (n int) {
|
func (m *Lease) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.ID != 0 {
|
if m.ID != 0 {
|
||||||
|
@ -183,38 +321,46 @@ func (m *Lease) Size() (n int) {
|
||||||
if m.RemainingTTL != 0 {
|
if m.RemainingTTL != 0 {
|
||||||
n += 1 + sovLease(uint64(m.RemainingTTL))
|
n += 1 + sovLease(uint64(m.RemainingTTL))
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LeaseInternalRequest) Size() (n int) {
|
func (m *LeaseInternalRequest) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.LeaseTimeToLiveRequest != nil {
|
if m.LeaseTimeToLiveRequest != nil {
|
||||||
l = m.LeaseTimeToLiveRequest.Size()
|
l = m.LeaseTimeToLiveRequest.Size()
|
||||||
n += 1 + l + sovLease(uint64(l))
|
n += 1 + l + sovLease(uint64(l))
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *LeaseInternalResponse) Size() (n int) {
|
func (m *LeaseInternalResponse) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.LeaseTimeToLiveResponse != nil {
|
if m.LeaseTimeToLiveResponse != nil {
|
||||||
l = m.LeaseTimeToLiveResponse.Size()
|
l = m.LeaseTimeToLiveResponse.Size()
|
||||||
n += 1 + l + sovLease(uint64(l))
|
n += 1 + l + sovLease(uint64(l))
|
||||||
}
|
}
|
||||||
|
if m.XXX_unrecognized != nil {
|
||||||
|
n += len(m.XXX_unrecognized)
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
func sovLease(x uint64) (n int) {
|
func sovLease(x uint64) (n int) {
|
||||||
for {
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
n++
|
|
||||||
x >>= 7
|
|
||||||
if x == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
}
|
}
|
||||||
func sozLease(x uint64) (n int) {
|
func sozLease(x uint64) (n int) {
|
||||||
return sovLease(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
return sovLease(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||||
|
@ -234,7 +380,7 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -262,7 +408,7 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.ID |= (int64(b) & 0x7F) << shift
|
m.ID |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -281,7 +427,7 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.TTL |= (int64(b) & 0x7F) << shift
|
m.TTL |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -300,7 +446,7 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.RemainingTTL |= (int64(b) & 0x7F) << shift
|
m.RemainingTTL |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -314,9 +460,13 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthLease
|
return ErrInvalidLengthLease
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthLease
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -341,7 +491,7 @@ func (m *LeaseInternalRequest) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -369,7 +519,7 @@ func (m *LeaseInternalRequest) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
msglen |= (int(b) & 0x7F) << shift
|
msglen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -378,6 +528,9 @@ func (m *LeaseInternalRequest) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthLease
|
return ErrInvalidLengthLease
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + msglen
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthLease
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -397,9 +550,13 @@ func (m *LeaseInternalRequest) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthLease
|
return ErrInvalidLengthLease
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthLease
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -424,7 +581,7 @@ func (m *LeaseInternalResponse) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -452,7 +609,7 @@ func (m *LeaseInternalResponse) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
msglen |= (int(b) & 0x7F) << shift
|
msglen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -461,6 +618,9 @@ func (m *LeaseInternalResponse) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthLease
|
return ErrInvalidLengthLease
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + msglen
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthLease
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -480,9 +640,13 @@ func (m *LeaseInternalResponse) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthLease
|
return ErrInvalidLengthLease
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthLease
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
iNdEx += skippy
|
iNdEx += skippy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -495,6 +659,7 @@ func (m *LeaseInternalResponse) Unmarshal(dAtA []byte) error {
|
||||||
func skipLease(dAtA []byte) (n int, err error) {
|
func skipLease(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
depth := 0
|
||||||
for iNdEx < l {
|
for iNdEx < l {
|
||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -526,10 +691,8 @@ func skipLease(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
|
||||||
case 1:
|
case 1:
|
||||||
iNdEx += 8
|
iNdEx += 8
|
||||||
return iNdEx, nil
|
|
||||||
case 2:
|
case 2:
|
||||||
var length int
|
var length int
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -546,75 +709,34 @@ func skipLease(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iNdEx += length
|
|
||||||
if length < 0 {
|
if length < 0 {
|
||||||
return 0, ErrInvalidLengthLease
|
return 0, ErrInvalidLengthLease
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
iNdEx += length
|
||||||
case 3:
|
case 3:
|
||||||
for {
|
depth++
|
||||||
var innerWire uint64
|
|
||||||
var start int = iNdEx
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return 0, ErrIntOverflowLease
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return 0, io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
innerWire |= (uint64(b) & 0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
innerWireType := int(innerWire & 0x7)
|
|
||||||
if innerWireType == 4 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
next, err := skipLease(dAtA[start:])
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
iNdEx = start + next
|
|
||||||
}
|
|
||||||
return iNdEx, nil
|
|
||||||
case 4:
|
case 4:
|
||||||
return iNdEx, nil
|
if depth == 0 {
|
||||||
|
return 0, ErrUnexpectedEndOfGroupLease
|
||||||
|
}
|
||||||
|
depth--
|
||||||
case 5:
|
case 5:
|
||||||
iNdEx += 4
|
iNdEx += 4
|
||||||
return iNdEx, nil
|
|
||||||
default:
|
default:
|
||||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||||
}
|
}
|
||||||
|
if iNdEx < 0 {
|
||||||
|
return 0, ErrInvalidLengthLease
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
if depth == 0 {
|
||||||
|
return iNdEx, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0, io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrInvalidLengthLease = fmt.Errorf("proto: negative length found during unmarshaling")
|
ErrInvalidLengthLease = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||||
ErrIntOverflowLease = fmt.Errorf("proto: integer overflow")
|
ErrIntOverflowLease = fmt.Errorf("proto: integer overflow")
|
||||||
|
ErrUnexpectedEndOfGroupLease = fmt.Errorf("proto: unexpected end of group")
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() { proto.RegisterFile("lease.proto", fileDescriptorLease) }
|
|
||||||
|
|
||||||
var fileDescriptorLease = []byte{
|
|
||||||
// 256 bytes of a gzipped FileDescriptorProto
|
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0x49, 0x4d, 0x2c,
|
|
||||||
0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x07, 0x73, 0x0a, 0x92, 0xa4, 0x44, 0xd2,
|
|
||||||
0xf3, 0xd3, 0xf3, 0xc1, 0x62, 0xfa, 0x20, 0x16, 0x44, 0x5a, 0x4a, 0x3e, 0xb5, 0x24, 0x39, 0x45,
|
|
||||||
0x3f, 0xb1, 0x20, 0x53, 0x1f, 0xc4, 0x28, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0x2a, 0x48, 0xd2, 0x2f,
|
|
||||||
0x2a, 0x48, 0x86, 0x28, 0x50, 0xf2, 0xe5, 0x62, 0xf5, 0x01, 0x99, 0x20, 0xc4, 0xc7, 0xc5, 0xe4,
|
|
||||||
0xe9, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x1c, 0xc4, 0xe4, 0xe9, 0x22, 0x24, 0xc0, 0xc5, 0x1c,
|
|
||||||
0x12, 0xe2, 0x23, 0xc1, 0x04, 0x16, 0x00, 0x31, 0x85, 0x94, 0xb8, 0x78, 0x82, 0x52, 0x73, 0x13,
|
|
||||||
0x33, 0xf3, 0x32, 0xf3, 0xd2, 0x41, 0x52, 0xcc, 0x60, 0x29, 0x14, 0x31, 0xa5, 0x12, 0x2e, 0x11,
|
|
||||||
0xb0, 0x71, 0x9e, 0x79, 0x25, 0xa9, 0x45, 0x79, 0x89, 0x39, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5,
|
|
||||||
0x25, 0x42, 0x31, 0x5c, 0x62, 0x60, 0xf1, 0x90, 0xcc, 0xdc, 0xd4, 0x90, 0x7c, 0x9f, 0xcc, 0xb2,
|
|
||||||
0x54, 0xa8, 0x0c, 0xd8, 0x46, 0x6e, 0x23, 0x15, 0x3d, 0x64, 0xf7, 0xe9, 0x61, 0x57, 0x1b, 0x84,
|
|
||||||
0xc3, 0x0c, 0xa5, 0x0a, 0x2e, 0x51, 0x34, 0x5b, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0xe2,
|
|
||||||
0xb9, 0xc4, 0x31, 0xb4, 0x40, 0xa4, 0xa0, 0xf6, 0xaa, 0x12, 0xb0, 0x17, 0xa2, 0x38, 0x08, 0x97,
|
|
||||||
0x29, 0x4e, 0x12, 0x27, 0x1e, 0xca, 0x31, 0x5c, 0x78, 0x28, 0xc7, 0x70, 0xe2, 0x91, 0x1c, 0xe3,
|
|
||||||
0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xce, 0x78, 0x2c, 0xc7, 0x90, 0xc4, 0x06, 0x0e,
|
|
||||||
0x5f, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x8a, 0x94, 0xb9, 0xae, 0x01, 0x00, 0x00,
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,28 +1,16 @@
|
||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
// source: record.proto
|
// source: record.proto
|
||||||
|
|
||||||
/*
|
|
||||||
Package walpb is a generated protocol buffer package.
|
|
||||||
|
|
||||||
It is generated from these files:
|
|
||||||
record.proto
|
|
||||||
|
|
||||||
It has these top-level messages:
|
|
||||||
Record
|
|
||||||
Snapshot
|
|
||||||
*/
|
|
||||||
package walpb
|
package walpb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
fmt "fmt"
|
||||||
|
io "io"
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
|
|
||||||
math "math"
|
math "math"
|
||||||
|
math_bits "math/bits"
|
||||||
|
|
||||||
_ "github.com/gogo/protobuf/gogoproto"
|
_ "github.com/gogo/protobuf/gogoproto"
|
||||||
|
proto "github.com/golang/protobuf/proto"
|
||||||
io "io"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -34,39 +22,118 @@ var _ = math.Inf
|
||||||
// is compatible with the proto package it is being compiled against.
|
// is compatible with the proto package it is being compiled against.
|
||||||
// A compilation error at this line likely means your copy of the
|
// A compilation error at this line likely means your copy of the
|
||||||
// proto package needs to be updated.
|
// proto package needs to be updated.
|
||||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||||
|
|
||||||
type Record struct {
|
type Record struct {
|
||||||
Type int64 `protobuf:"varint,1,opt,name=type" json:"type"`
|
Type int64 `protobuf:"varint,1,opt,name=type" json:"type"`
|
||||||
Crc uint32 `protobuf:"varint,2,opt,name=crc" json:"crc"`
|
Crc uint32 `protobuf:"varint,2,opt,name=crc" json:"crc"`
|
||||||
Data []byte `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
|
Data []byte `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Record) Reset() { *m = Record{} }
|
func (m *Record) Reset() { *m = Record{} }
|
||||||
func (m *Record) String() string { return proto.CompactTextString(m) }
|
func (m *Record) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Record) ProtoMessage() {}
|
func (*Record) ProtoMessage() {}
|
||||||
func (*Record) Descriptor() ([]byte, []int) { return fileDescriptorRecord, []int{0} }
|
func (*Record) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_bf94fd919e302a1d, []int{0}
|
||||||
|
}
|
||||||
|
func (m *Record) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_Record.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *Record) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_Record.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *Record) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *Record) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_Record.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_Record proto.InternalMessageInfo
|
||||||
|
|
||||||
type Snapshot struct {
|
type Snapshot struct {
|
||||||
Index uint64 `protobuf:"varint,1,opt,name=index" json:"index"`
|
Index uint64 `protobuf:"varint,1,opt,name=index" json:"index"`
|
||||||
Term uint64 `protobuf:"varint,2,opt,name=term" json:"term"`
|
Term uint64 `protobuf:"varint,2,opt,name=term" json:"term"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Snapshot) Reset() { *m = Snapshot{} }
|
func (m *Snapshot) Reset() { *m = Snapshot{} }
|
||||||
func (m *Snapshot) String() string { return proto.CompactTextString(m) }
|
func (m *Snapshot) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Snapshot) ProtoMessage() {}
|
func (*Snapshot) ProtoMessage() {}
|
||||||
func (*Snapshot) Descriptor() ([]byte, []int) { return fileDescriptorRecord, []int{1} }
|
func (*Snapshot) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_bf94fd919e302a1d, []int{1}
|
||||||
|
}
|
||||||
|
func (m *Snapshot) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
|
||||||
|
} else {
|
||||||
|
b = b[:cap(b)]
|
||||||
|
n, err := m.MarshalToSizedBuffer(b)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return b[:n], nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (m *Snapshot) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_Snapshot.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *Snapshot) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *Snapshot) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_Snapshot.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_Snapshot proto.InternalMessageInfo
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*Record)(nil), "walpb.Record")
|
proto.RegisterType((*Record)(nil), "walpb.Record")
|
||||||
proto.RegisterType((*Snapshot)(nil), "walpb.Snapshot")
|
proto.RegisterType((*Snapshot)(nil), "walpb.Snapshot")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("record.proto", fileDescriptor_bf94fd919e302a1d) }
|
||||||
|
|
||||||
|
var fileDescriptor_bf94fd919e302a1d = []byte{
|
||||||
|
// 186 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4a, 0x4d, 0xce,
|
||||||
|
0x2f, 0x4a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2d, 0x4f, 0xcc, 0x29, 0x48, 0x92,
|
||||||
|
0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x8b, 0xe8, 0x83, 0x58, 0x10, 0x49, 0x25, 0x3f, 0x2e, 0xb6,
|
||||||
|
0x20, 0xb0, 0x62, 0x21, 0x09, 0x2e, 0x96, 0x92, 0xca, 0x82, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d,
|
||||||
|
0x66, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xc0, 0x22, 0x42, 0x62, 0x5c, 0xcc, 0xc9, 0x45,
|
||||||
|
0xc9, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xbc, 0x50, 0x09, 0x90, 0x80, 0x90, 0x10, 0x17, 0x4b, 0x4a,
|
||||||
|
0x62, 0x49, 0xa2, 0x04, 0xb3, 0x02, 0xa3, 0x06, 0x4f, 0x10, 0x98, 0xad, 0xe4, 0xc0, 0xc5, 0x11,
|
||||||
|
0x9c, 0x97, 0x58, 0x50, 0x9c, 0x91, 0x5f, 0x22, 0x24, 0xc5, 0xc5, 0x9a, 0x99, 0x97, 0x92, 0x5a,
|
||||||
|
0x01, 0x36, 0x92, 0x05, 0xaa, 0x13, 0x22, 0x04, 0xb6, 0x2d, 0xb5, 0x28, 0x17, 0x6c, 0x28, 0x0b,
|
||||||
|
0xdc, 0xb6, 0xd4, 0xa2, 0x5c, 0x27, 0x91, 0x13, 0x0f, 0xe5, 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc,
|
||||||
|
0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x19, 0x8f, 0xe5, 0x18, 0x00, 0x01, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0x7f, 0x5e, 0x5c, 0x46, 0xd3, 0x00, 0x00, 0x00,
|
||||||
|
}
|
||||||
|
|
||||||
func (m *Record) Marshal() (dAtA []byte, err error) {
|
func (m *Record) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -74,32 +141,39 @@ func (m *Record) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Record) MarshalTo(dAtA []byte) (int, error) {
|
func (m *Record) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
dAtA[i] = 0x8
|
|
||||||
i++
|
|
||||||
i = encodeVarintRecord(dAtA, i, uint64(m.Type))
|
|
||||||
dAtA[i] = 0x10
|
|
||||||
i++
|
|
||||||
i = encodeVarintRecord(dAtA, i, uint64(m.Crc))
|
|
||||||
if m.Data != nil {
|
|
||||||
dAtA[i] = 0x1a
|
|
||||||
i++
|
|
||||||
i = encodeVarintRecord(dAtA, i, uint64(len(m.Data)))
|
|
||||||
i += copy(dAtA[i:], m.Data)
|
|
||||||
}
|
|
||||||
if m.XXX_unrecognized != nil {
|
if m.XXX_unrecognized != nil {
|
||||||
i += copy(dAtA[i:], m.XXX_unrecognized)
|
i -= len(m.XXX_unrecognized)
|
||||||
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
}
|
}
|
||||||
return i, nil
|
if m.Data != nil {
|
||||||
|
i -= len(m.Data)
|
||||||
|
copy(dAtA[i:], m.Data)
|
||||||
|
i = encodeVarintRecord(dAtA, i, uint64(len(m.Data)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
|
i = encodeVarintRecord(dAtA, i, uint64(m.Crc))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x10
|
||||||
|
i = encodeVarintRecord(dAtA, i, uint64(m.Type))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Snapshot) Marshal() (dAtA []byte, err error) {
|
func (m *Snapshot) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
n, err := m.MarshalTo(dAtA)
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -107,32 +181,43 @@ func (m *Snapshot) Marshal() (dAtA []byte, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
|
func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
|
||||||
var i int
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
dAtA[i] = 0x8
|
|
||||||
i++
|
|
||||||
i = encodeVarintRecord(dAtA, i, uint64(m.Index))
|
|
||||||
dAtA[i] = 0x10
|
|
||||||
i++
|
|
||||||
i = encodeVarintRecord(dAtA, i, uint64(m.Term))
|
|
||||||
if m.XXX_unrecognized != nil {
|
if m.XXX_unrecognized != nil {
|
||||||
i += copy(dAtA[i:], m.XXX_unrecognized)
|
i -= len(m.XXX_unrecognized)
|
||||||
|
copy(dAtA[i:], m.XXX_unrecognized)
|
||||||
}
|
}
|
||||||
return i, nil
|
i = encodeVarintRecord(dAtA, i, uint64(m.Term))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x10
|
||||||
|
i = encodeVarintRecord(dAtA, i, uint64(m.Index))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x8
|
||||||
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeVarintRecord(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintRecord(dAtA []byte, offset int, v uint64) int {
|
||||||
|
offset -= sovRecord(v)
|
||||||
|
base := offset
|
||||||
for v >= 1<<7 {
|
for v >= 1<<7 {
|
||||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
v >>= 7
|
v >>= 7
|
||||||
offset++
|
offset++
|
||||||
}
|
}
|
||||||
dAtA[offset] = uint8(v)
|
dAtA[offset] = uint8(v)
|
||||||
return offset + 1
|
return base
|
||||||
}
|
}
|
||||||
func (m *Record) Size() (n int) {
|
func (m *Record) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
n += 1 + sovRecord(uint64(m.Type))
|
n += 1 + sovRecord(uint64(m.Type))
|
||||||
|
@ -148,6 +233,9 @@ func (m *Record) Size() (n int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Snapshot) Size() (n int) {
|
func (m *Snapshot) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
n += 1 + sovRecord(uint64(m.Index))
|
n += 1 + sovRecord(uint64(m.Index))
|
||||||
|
@ -159,14 +247,7 @@ func (m *Snapshot) Size() (n int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func sovRecord(x uint64) (n int) {
|
func sovRecord(x uint64) (n int) {
|
||||||
for {
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
n++
|
|
||||||
x >>= 7
|
|
||||||
if x == 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return n
|
|
||||||
}
|
}
|
||||||
func sozRecord(x uint64) (n int) {
|
func sozRecord(x uint64) (n int) {
|
||||||
return sovRecord(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
return sovRecord(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||||
|
@ -186,7 +267,7 @@ func (m *Record) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -214,7 +295,7 @@ func (m *Record) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Type |= (int64(b) & 0x7F) << shift
|
m.Type |= int64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -233,7 +314,7 @@ func (m *Record) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Crc |= (uint32(b) & 0x7F) << shift
|
m.Crc |= uint32(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -252,7 +333,7 @@ func (m *Record) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
byteLen |= (int(b) & 0x7F) << shift
|
byteLen |= int(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -261,6 +342,9 @@ func (m *Record) Unmarshal(dAtA []byte) error {
|
||||||
return ErrInvalidLengthRecord
|
return ErrInvalidLengthRecord
|
||||||
}
|
}
|
||||||
postIndex := iNdEx + byteLen
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthRecord
|
||||||
|
}
|
||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -278,6 +362,9 @@ func (m *Record) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthRecord
|
return ErrInvalidLengthRecord
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthRecord
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -306,7 +393,7 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
wire |= (uint64(b) & 0x7F) << shift
|
wire |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -334,7 +421,7 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Index |= (uint64(b) & 0x7F) << shift
|
m.Index |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -353,7 +440,7 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
b := dAtA[iNdEx]
|
b := dAtA[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.Term |= (uint64(b) & 0x7F) << shift
|
m.Term |= uint64(b&0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -367,6 +454,9 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
||||||
if skippy < 0 {
|
if skippy < 0 {
|
||||||
return ErrInvalidLengthRecord
|
return ErrInvalidLengthRecord
|
||||||
}
|
}
|
||||||
|
if (iNdEx + skippy) < 0 {
|
||||||
|
return ErrInvalidLengthRecord
|
||||||
|
}
|
||||||
if (iNdEx + skippy) > l {
|
if (iNdEx + skippy) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
@ -383,6 +473,7 @@ func (m *Snapshot) Unmarshal(dAtA []byte) error {
|
||||||
func skipRecord(dAtA []byte) (n int, err error) {
|
func skipRecord(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
depth := 0
|
||||||
for iNdEx < l {
|
for iNdEx < l {
|
||||||
var wire uint64
|
var wire uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -414,10 +505,8 @@ func skipRecord(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
|
||||||
case 1:
|
case 1:
|
||||||
iNdEx += 8
|
iNdEx += 8
|
||||||
return iNdEx, nil
|
|
||||||
case 2:
|
case 2:
|
||||||
var length int
|
var length int
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
@ -434,71 +523,34 @@ func skipRecord(dAtA []byte) (n int, err error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iNdEx += length
|
|
||||||
if length < 0 {
|
if length < 0 {
|
||||||
return 0, ErrInvalidLengthRecord
|
return 0, ErrInvalidLengthRecord
|
||||||
}
|
}
|
||||||
return iNdEx, nil
|
iNdEx += length
|
||||||
case 3:
|
case 3:
|
||||||
for {
|
depth++
|
||||||
var innerWire uint64
|
|
||||||
var start int = iNdEx
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return 0, ErrIntOverflowRecord
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return 0, io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
innerWire |= (uint64(b) & 0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
innerWireType := int(innerWire & 0x7)
|
|
||||||
if innerWireType == 4 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
next, err := skipRecord(dAtA[start:])
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
iNdEx = start + next
|
|
||||||
}
|
|
||||||
return iNdEx, nil
|
|
||||||
case 4:
|
case 4:
|
||||||
return iNdEx, nil
|
if depth == 0 {
|
||||||
|
return 0, ErrUnexpectedEndOfGroupRecord
|
||||||
|
}
|
||||||
|
depth--
|
||||||
case 5:
|
case 5:
|
||||||
iNdEx += 4
|
iNdEx += 4
|
||||||
return iNdEx, nil
|
|
||||||
default:
|
default:
|
||||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||||
}
|
}
|
||||||
|
if iNdEx < 0 {
|
||||||
|
return 0, ErrInvalidLengthRecord
|
||||||
}
|
}
|
||||||
panic("unreachable")
|
if depth == 0 {
|
||||||
|
return iNdEx, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0, io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrInvalidLengthRecord = fmt.Errorf("proto: negative length found during unmarshaling")
|
ErrInvalidLengthRecord = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||||
ErrIntOverflowRecord = fmt.Errorf("proto: integer overflow")
|
ErrIntOverflowRecord = fmt.Errorf("proto: integer overflow")
|
||||||
|
ErrUnexpectedEndOfGroupRecord = fmt.Errorf("proto: unexpected end of group")
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() { proto.RegisterFile("record.proto", fileDescriptorRecord) }
|
|
||||||
|
|
||||||
var fileDescriptorRecord = []byte{
|
|
||||||
// 186 bytes of a gzipped FileDescriptorProto
|
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4a, 0x4d, 0xce,
|
|
||||||
0x2f, 0x4a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2d, 0x4f, 0xcc, 0x29, 0x48, 0x92,
|
|
||||||
0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x8b, 0xe8, 0x83, 0x58, 0x10, 0x49, 0x25, 0x3f, 0x2e, 0xb6,
|
|
||||||
0x20, 0xb0, 0x62, 0x21, 0x09, 0x2e, 0x96, 0x92, 0xca, 0x82, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d,
|
|
||||||
0x66, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xc0, 0x22, 0x42, 0x62, 0x5c, 0xcc, 0xc9, 0x45,
|
|
||||||
0xc9, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xbc, 0x50, 0x09, 0x90, 0x80, 0x90, 0x10, 0x17, 0x4b, 0x4a,
|
|
||||||
0x62, 0x49, 0xa2, 0x04, 0xb3, 0x02, 0xa3, 0x06, 0x4f, 0x10, 0x98, 0xad, 0xe4, 0xc0, 0xc5, 0x11,
|
|
||||||
0x9c, 0x97, 0x58, 0x50, 0x9c, 0x91, 0x5f, 0x22, 0x24, 0xc5, 0xc5, 0x9a, 0x99, 0x97, 0x92, 0x5a,
|
|
||||||
0x01, 0x36, 0x92, 0x05, 0xaa, 0x13, 0x22, 0x04, 0xb6, 0x2d, 0xb5, 0x28, 0x17, 0x6c, 0x28, 0x0b,
|
|
||||||
0xdc, 0xb6, 0xd4, 0xa2, 0x5c, 0x27, 0x91, 0x13, 0x0f, 0xe5, 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc,
|
|
||||||
0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x19, 0x8f, 0xe5, 0x18, 0x00, 0x01, 0x00, 0x00,
|
|
||||||
0xff, 0xff, 0x7f, 0x5e, 0x5c, 0x46, 0xd3, 0x00, 0x00, 0x00,
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue