From 0d673763d1954fa24c8ed73d7d942b7e33ef1b12 Mon Sep 17 00:00:00 2001 From: elebore Date: Fri, 13 Jul 2018 10:57:08 +0800 Subject: [PATCH 001/159] info may be nil info may be nil caused by network error or other errors --- walk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/walk.go b/walk.go index 5bcb1ea5..438a407a 100644 --- a/walk.go +++ b/walk.go @@ -24,7 +24,7 @@ func (c *Client) walk(path string, walkFn filepath.WalkFunc) error { err = walkFn(path, info, err) if err != nil { - if info.IsDir() && err == filepath.SkipDir { + if info != nil && info.IsDir() && err == filepath.SkipDir { return nil } From b465fdd53f688ae4ee7d80b0cb49f1c8556a8caa Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 18 Jul 2018 13:51:54 +0200 Subject: [PATCH 002/159] Reorder .travis.yml to make more sense --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index ed9d1293..b9e465c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,31 +1,28 @@ +sudo: false os: - linux - osx language: go go_import_path: github.com/colinmarc/hdfs go: 1.x +env: +- HADOOP_DISTRO=cdh +- HADOOP_DISTRO=hdp before_install: - git clone https://github.com/sstephenson/bats $HOME/bats - mkdir -p $HOME/bats/build - "$HOME/bats/install.sh $HOME/bats/build" - export PATH="$PATH:$HOME/bats/build/bin" -env: -- HADOOP_DISTRO=cdh -- HADOOP_DISTRO=hdp before_script: - export NN_PORT=9000 - export HADOOP_NAMENODE="localhost:$NN_PORT" - export HADOOP_HOME="$HOME/hadoop-$HADOOP_DISTRO" - "./setup_test_env.sh" -before_deploy: make release script: - find protocol -name *.pb.go | xargs touch # so make doesn't try to regen protobuf files - make test - cat minicluster.log -sudo: false -cache: -- "$HOME/hadoop-$HADOOP_DISTRO" -- "$HOME/bats" +before_deploy: make release deploy: skip_cleanup: true provider: releases @@ -41,3 +38,6 @@ deploy: matrix: allow_failures: - os: osx +cache: +- "$HOME/hadoop-$HADOOP_DISTRO" +- "$HOME/bats" From 442f8343b89b6aeedfb602f3748f294d3346d983 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 18 Jul 2018 13:57:40 +0200 Subject: [PATCH 003/159] Rename test -> testdata since that's a keyword in go --- {test => testdata}/conf/hdfs-site.xml | 0 {test => testdata}/conf2/core-site.xml | 0 {test => testdata}/conf3/core-site.xml | 0 {test => testdata}/foo.txt | 0 {test => testdata}/mobydick.txt | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename {test => testdata}/conf/hdfs-site.xml (100%) rename {test => testdata}/conf2/core-site.xml (100%) rename {test => testdata}/conf3/core-site.xml (100%) rename {test => testdata}/foo.txt (100%) rename {test => testdata}/mobydick.txt (100%) diff --git a/test/conf/hdfs-site.xml b/testdata/conf/hdfs-site.xml similarity index 100% rename from test/conf/hdfs-site.xml rename to testdata/conf/hdfs-site.xml diff --git a/test/conf2/core-site.xml b/testdata/conf2/core-site.xml similarity index 100% rename from test/conf2/core-site.xml rename to testdata/conf2/core-site.xml diff --git a/test/conf3/core-site.xml b/testdata/conf3/core-site.xml similarity index 100% rename from test/conf3/core-site.xml rename to testdata/conf3/core-site.xml diff --git a/test/foo.txt b/testdata/foo.txt similarity index 100% rename from test/foo.txt rename to testdata/foo.txt diff --git a/test/mobydick.txt b/testdata/mobydick.txt similarity index 100% rename from test/mobydick.txt rename to testdata/mobydick.txt From 80a5856c0fa32b82fdfc1ba2494a3979913cc300 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 18 Jul 2018 14:18:06 +0200 Subject: [PATCH 004/159] Repoint things looking for testdata --- client_test.go | 2 +- cmd/hdfs/test/cat.bats | 2 +- cmd/hdfs/test/head.bats | 4 ++-- cmd/hdfs/test/put.bats | 24 ++++++++++++------------ cmd/hdfs/test/tail.bats | 4 ++-- conf_test.go | 12 ++++++------ file_writer_test.go | 10 +++++----- setup_test_env.sh | 4 ++-- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/client_test.go b/client_test.go index f2802c1d..7ccb645d 100644 --- a/client_test.go +++ b/client_test.go @@ -118,7 +118,7 @@ func TestCopyToRemote(t *testing.T) { client := getClient(t) baleet(t, "/_test/copytoremote.txt") - err := client.CopyToRemote("test/foo.txt", "/_test/copytoremote.txt") + err := client.CopyToRemote("testdata/foo.txt", "/_test/copytoremote.txt") require.NoError(t, err) bytes, err := client.ReadFile("/_test/copytoremote.txt") diff --git a/cmd/hdfs/test/cat.bats b/cmd/hdfs/test/cat.bats index ff050165..d114964e 100644 --- a/cmd/hdfs/test/cat.bats +++ b/cmd/hdfs/test/cat.bats @@ -12,7 +12,7 @@ load helper run bash -c "$HDFS cat /_test/mobydick.txt > $BATS_TMPDIR/mobydick_test.txt" assert_success - SHA=`shasum < $ROOT_TEST_DIR/test/mobydick.txt | awk '{ print $1 }'` + SHA=`shasum < $ROOT_TEST_DIR/testdata/mobydick.txt | awk '{ print $1 }'` assert_equal $SHA `shasum < $BATS_TMPDIR/mobydick_test.txt | awk '{ print $1 }'` } diff --git a/cmd/hdfs/test/head.bats b/cmd/hdfs/test/head.bats index e5a5124e..e9b5de2a 100644 --- a/cmd/hdfs/test/head.bats +++ b/cmd/hdfs/test/head.bats @@ -11,13 +11,13 @@ load helper @test "head long" { run $HDFS head /_test/mobydick.txt assert_success - assert_output "$(head $ROOT_TEST_DIR/test/mobydick.txt)" + assert_output "$(head $ROOT_TEST_DIR/testdata/mobydick.txt)" } @test "head bytes" { run $HDFS head -c 10 /_test/mobydick.txt assert_success - assert_output "$(head -c 10 $ROOT_TEST_DIR/test/mobydick.txt)" + assert_output "$(head -c 10 $ROOT_TEST_DIR/testdata/mobydick.txt)" } @test "head nonexistent" { diff --git a/cmd/hdfs/test/put.bats b/cmd/hdfs/test/put.bats index 365a1db7..3d33280a 100644 --- a/cmd/hdfs/test/put.bats +++ b/cmd/hdfs/test/put.bats @@ -9,7 +9,7 @@ setup() { } @test "put" { - run $HDFS put $ROOT_TEST_DIR/test/foo.txt /_test_cmd/put/1 + run $HDFS put $ROOT_TEST_DIR/testdata/foo.txt /_test_cmd/put/1 assert_success run $HDFS cat /_test_cmd/put/1/foo.txt @@ -17,18 +17,18 @@ setup() { } @test "put long" { - run $HDFS put $ROOT_TEST_DIR/test/mobydick.txt /_test_cmd/put/1 + run $HDFS put $ROOT_TEST_DIR/testdata/mobydick.txt /_test_cmd/put/1 assert_success run bash -c "$HDFS cat /_test_cmd/put/1/mobydick.txt > $BATS_TMPDIR/mobydick_test.txt" assert_success - SHA=`shasum < $ROOT_TEST_DIR/test/mobydick.txt | awk '{ print $1 }'` + SHA=`shasum < $ROOT_TEST_DIR/testdata/mobydick.txt | awk '{ print $1 }'` assert_equal $SHA `shasum < $BATS_TMPDIR/mobydick_test.txt | awk '{ print $1 }'` } @test "put dir" { - run $HDFS put $ROOT_TEST_DIR/test /_test_cmd/put/test2 + run $HDFS put $ROOT_TEST_DIR/testdata /_test_cmd/put/test2 assert_success run $HDFS cat /_test_cmd/put/test2/foo.txt @@ -37,27 +37,27 @@ setup() { run bash -c "$HDFS cat /_test_cmd/put/test2/mobydick.txt > $BATS_TMPDIR/mobydick_test.txt" assert_success - SHA=`shasum < $ROOT_TEST_DIR/test/mobydick.txt | awk '{ print $1 }'` + SHA=`shasum < $ROOT_TEST_DIR/testdata/mobydick.txt | awk '{ print $1 }'` assert_equal $SHA `shasum < $BATS_TMPDIR/mobydick_test.txt | awk '{ print $1 }'` } @test "put dir into dir" { - run $HDFS put $ROOT_TEST_DIR/test /_test_cmd/put/test + run $HDFS put $ROOT_TEST_DIR/testdata /_test_cmd/put/test assert_success - run $HDFS cat /_test_cmd/put/test/test/foo.txt + run $HDFS cat /_test_cmd/put/test/testdata/foo.txt assert_output "bar" - run bash -c "$HDFS cat /_test_cmd/put/test/test/mobydick.txt > $BATS_TMPDIR/mobydick_test.txt" + run bash -c "$HDFS cat /_test_cmd/put/test/testdata/mobydick.txt > $BATS_TMPDIR/mobydick_test.txt" assert_success - SHA=`shasum < $ROOT_TEST_DIR/test/mobydick.txt | awk '{ print $1 }'` + SHA=`shasum < $ROOT_TEST_DIR/testdata/mobydick.txt | awk '{ print $1 }'` assert_equal $SHA `shasum < $BATS_TMPDIR/mobydick_test.txt | awk '{ print $1 }'` } @test "put dir into file" { - run $HDFS put $ROOT_TEST_DIR/test /_test_cmd/put/existing.txt + run $HDFS put $ROOT_TEST_DIR/testdata /_test_cmd/put/existing.txt assert_failure assert_output < $BATS_TMPDIR/mobydick_stdin_test.txt" assert_success - SHA=`shasum < $ROOT_TEST_DIR/test/mobydick.txt | awk '{ print $1 }'` + SHA=`shasum < $ROOT_TEST_DIR/testdata/mobydick.txt | awk '{ print $1 }'` assert_equal $SHA `shasum < $BATS_TMPDIR/mobydick_stdin_test.txt | awk '{ print $1 }'` } diff --git a/cmd/hdfs/test/tail.bats b/cmd/hdfs/test/tail.bats index 45615909..ef12bd3e 100644 --- a/cmd/hdfs/test/tail.bats +++ b/cmd/hdfs/test/tail.bats @@ -11,13 +11,13 @@ load helper @test "tail long" { run $HDFS tail /_test/mobydick.txt assert_success - assert_output "$(tail $ROOT_TEST_DIR/test/mobydick.txt)" + assert_output "$(tail $ROOT_TEST_DIR/testdata/mobydick.txt)" } @test "tail bytes" { run $HDFS tail -c 10 /_test/mobydick.txt assert_success - assert_output "$(tail -c 10 $ROOT_TEST_DIR/test/mobydick.txt)" + assert_output "$(tail -c 10 $ROOT_TEST_DIR/testdata/mobydick.txt)" } @test "tail nonexistent" { diff --git a/conf_test.go b/conf_test.go index 4f9a4ac8..5c7b82ec 100644 --- a/conf_test.go +++ b/conf_test.go @@ -8,29 +8,29 @@ import ( ) func TestConfFallback(t *testing.T) { - os.Setenv("HADOOP_HOME", "test") // This will resolve to test/conf. - os.Setenv("HADOOP_CONF_DIR", "test/conf2") + os.Setenv("HADOOP_HOME", "testdata") // This will resolve to testdata/conf. + os.Setenv("HADOOP_CONF_DIR", "testdata/conf2") confNamenodes := []string{"namenode1:8020", "namenode2:8020"} conf2Namenodes := []string{"namenode3:8020"} conf3Namenodes := []string{"namenode4:8020"} - conf := LoadHadoopConf("test/conf3") + conf := LoadHadoopConf("testdata/conf3") nns, err := conf.Namenodes() assert.Nil(t, err) - assert.EqualValues(t, conf3Namenodes, nns, "loading via specified path (test/conf3)") + assert.EqualValues(t, conf3Namenodes, nns, "loading via specified path (testdata/conf3)") conf = LoadHadoopConf("") nns, err = conf.Namenodes() assert.Nil(t, err) - assert.EqualValues(t, conf2Namenodes, nns, "loading via HADOOP_CONF_DIR (test/conf2)") + assert.EqualValues(t, conf2Namenodes, nns, "loading via HADOOP_CONF_DIR (testdata/conf2)") os.Unsetenv("HADOOP_CONF_DIR") conf = LoadHadoopConf("") nns, err = conf.Namenodes() assert.Nil(t, err) - assert.EqualValues(t, confNamenodes, nns, "loading via HADOOP_HOME (test/conf)") + assert.EqualValues(t, confNamenodes, nns, "loading via HADOOP_HOME (testdata/conf)") os.Unsetenv("HADOOP_HOME") } diff --git a/file_writer_test.go b/file_writer_test.go index a7747838..90751027 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -48,7 +48,7 @@ func TestFileBigWrite(t *testing.T) { writer, err := client.Create("/_test/create/2.txt") require.NoError(t, err) - mobydick, err := os.Open("test/mobydick.txt") + mobydick, err := os.Open("testdata/mobydick.txt") require.NoError(t, err) n, err := io.Copy(writer, mobydick) @@ -76,7 +76,7 @@ func TestFileBigWriteMultipleBlocks(t *testing.T) { writer, err := client.CreateFile("/_test/create/3.txt", 1, 1048576, 0755) require.NoError(t, err) - mobydick, err := os.Open("test/mobydick.txt") + mobydick, err := os.Open("testdata/mobydick.txt") require.NoError(t, err) n, err := io.Copy(writer, mobydick) @@ -104,7 +104,7 @@ func TestFileBigWriteWeirdBlockSize(t *testing.T) { writer, err := client.CreateFile("/_test/create/4.txt", 1, 1050000, 0755) require.NoError(t, err) - mobydick, err := os.Open("test/mobydick.txt") + mobydick, err := os.Open("testdata/mobydick.txt") require.NoError(t, err) n, err := io.Copy(writer, mobydick) @@ -132,7 +132,7 @@ func TestFileBigWriteReplication(t *testing.T) { writer, err := client.CreateFile("/_test/create/5.txt", 3, 1048576, 0755) require.NoError(t, err) - mobydick, err := os.Open("test/mobydick.txt") + mobydick, err := os.Open("testdata/mobydick.txt") require.NoError(t, err) n, err := io.Copy(writer, mobydick) @@ -309,7 +309,7 @@ func TestFileAppendEmptyFile(t *testing.T) { } func TestFileAppendLastBlockFull(t *testing.T) { - mobydick, err := os.Open("test/mobydick.txt") + mobydick, err := os.Open("testdata/mobydick.txt") require.NoError(t, err) client := getClient(t) diff --git a/setup_test_env.sh b/setup_test_env.sh index 208765c8..17c56c1b 100755 --- a/setup_test_env.sh +++ b/setup_test_env.sh @@ -41,8 +41,8 @@ HADOOP_FS="$HADOOP_HOME/bin/hadoop fs -Ddfs.block.size=1048576" $HADOOP_FS -mkdir -p "hdfs://$HADOOP_NAMENODE/_test" $HADOOP_FS -chmod 777 "hdfs://$HADOOP_NAMENODE/_test" -$HADOOP_FS -put ./test/foo.txt "hdfs://$HADOOP_NAMENODE/_test/foo.txt" -$HADOOP_FS -put ./test/mobydick.txt "hdfs://$HADOOP_NAMENODE/_test/mobydick.txt" +$HADOOP_FS -put ./testdata/foo.txt "hdfs://$HADOOP_NAMENODE/_test/foo.txt" +$HADOOP_FS -put ./testdata/mobydick.txt "hdfs://$HADOOP_NAMENODE/_test/mobydick.txt" echo "Please run the following command:" echo "export HADOOP_NAMENODE='$HADOOP_NAMENODE'" From 5508e09b69e2752cbbc4cf248e9d1c05b4233273 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 18 Jul 2018 15:30:44 +0200 Subject: [PATCH 005/159] Run a 'proper' hadoop cluster in travis, rather than a minicluster This paves the way for more complicated (eg kerberos) setups. minicluster.sh is left for people to test locally. --- .travis.yml | 22 ++++----------- cmd/hdfs/test/helper.bash | 4 +-- fixtures.sh | 8 ++++++ minicluster.sh | 33 ++++++++++++++++++++++ rpc/block_reader_test.go | 7 +++++ setup_test_env.sh | 48 -------------------------------- travis-setup-cdh5.sh | 58 +++++++++++++++++++++++++++++++++++++++ travis-setup-hdp2.sh | 51 ++++++++++++++++++++++++++++++++++ travis-setup.sh | 19 +++++++++++++ 9 files changed, 183 insertions(+), 67 deletions(-) create mode 100755 fixtures.sh create mode 100755 minicluster.sh delete mode 100755 setup_test_env.sh create mode 100755 travis-setup-cdh5.sh create mode 100755 travis-setup-hdp2.sh create mode 100755 travis-setup.sh diff --git a/.travis.yml b/.travis.yml index b9e465c0..cd7a0609 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,21 @@ -sudo: false -os: -- linux -- osx +sudo: required language: go go_import_path: github.com/colinmarc/hdfs go: 1.x env: -- HADOOP_DISTRO=cdh -- HADOOP_DISTRO=hdp +- PLATFORM=cdh5 +- PLATFORM=hdp2 before_install: - git clone https://github.com/sstephenson/bats $HOME/bats - mkdir -p $HOME/bats/build - "$HOME/bats/install.sh $HOME/bats/build" - export PATH="$PATH:$HOME/bats/build/bin" before_script: -- export NN_PORT=9000 -- export HADOOP_NAMENODE="localhost:$NN_PORT" -- export HADOOP_HOME="$HOME/hadoop-$HADOOP_DISTRO" -- "./setup_test_env.sh" +- export HADOOP_NAMENODE="localhost:9000" +- ./travis-setup.sh $PLATFORM script: - find protocol -name *.pb.go | xargs touch # so make doesn't try to regen protobuf files - make test -- cat minicluster.log before_deploy: make release deploy: skip_cleanup: true @@ -34,10 +28,6 @@ deploy: repo: colinmarc/hdfs tags: true all_branches: true - condition: $HADOOP_DISTRO = cdh -matrix: - allow_failures: - - os: osx + condition: $PLATFORM = cdh5 cache: -- "$HOME/hadoop-$HADOOP_DISTRO" - "$HOME/bats" diff --git a/cmd/hdfs/test/helper.bash b/cmd/hdfs/test/helper.bash index 755273ff..eaa85b82 100644 --- a/cmd/hdfs/test/helper.bash +++ b/cmd/hdfs/test/helper.bash @@ -1,8 +1,6 @@ #!/bin/bash -export HADOOP_DISTRO=${HADOOP_DISTRO-"cdh"} -export HADOOP_HOME=${HADOOP_HOME-"/tmp/hadoop-$HADOOP_DISTRO"} -export HADOOP_FS="$HADOOP_HOME/bin/hadoop fs -Ddfs.block.size=1048576" +export HADOOP_FS=${HADOOP_FS-"hadoop fs"} export ROOT_TEST_DIR="$BATS_TEST_DIRNAME/../../.." export HDFS="$ROOT_TEST_DIR/hdfs" diff --git a/fixtures.sh b/fixtures.sh new file mode 100755 index 00000000..d589dde8 --- /dev/null +++ b/fixtures.sh @@ -0,0 +1,8 @@ +set -e + +HADOOP_FS=${HADOOP_FS-"hadoop fs"} +$HADOOP_FS -mkdir -p "hdfs://$HADOOP_NAMENODE/_test" +$HADOOP_FS -chmod 777 "hdfs://$HADOOP_NAMENODE/_test" + +$HADOOP_FS -put ./testdata/foo.txt "hdfs://$HADOOP_NAMENODE/_test/foo.txt" +$HADOOP_FS -Ddfs.block.size=1048576 -put ./testdata/mobydick.txt "hdfs://$HADOOP_NAMENODE/_test/mobydick.txt" diff --git a/minicluster.sh b/minicluster.sh new file mode 100755 index 00000000..e344542f --- /dev/null +++ b/minicluster.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +HADOOP_HOME=${HADOOP_HOME-"/tmp/hadoop"} +NN_PORT=${NN_PORT-"9000"} +HADOOP_NAMENODE="localhost:$NN_PORT" + +if [ ! -d "$HADOOP_HOME" ]; then + mkdir -p $HADOOP_HOME + + echo "Downloading latest CDH to ${HADOOP_HOME}/hadoop.tar.gz" + curl -o ${HADOOP_HOME}/hadoop.tar.gz -L http://archive.cloudera.com/cdh5/cdh/5/hadoop-latest.tar.gz + + echo "Extracting ${HADOOP_HOME}/hadoop.tar.gz into $HADOOP_HOME" + tar zxf ${HADOOP_HOME}/hadoop.tar.gz --strip-components 1 -C $HADOOP_HOME +fi + +MINICLUSTER_JAR=$(find $HADOOP_HOME -name "hadoop-mapreduce-client-jobclient*.jar" | grep -v tests | grep -v sources | head -1) +if [ ! -f "$MINICLUSTER_JAR" ]; then + echo "Couldn't find minicluster jar!" + exit 1 +fi + +echo "Starting minicluster..." +$HADOOP_HOME/bin/hadoop jar $MINICLUSTER_JAR minicluster -nnport $NN_PORT -datanodes 3 -nomr -format "$@" > minicluster.log 2>&1 & +echo "Waiting for namenode to start up..." +$HADOOP_HOME/bin/hdfs dfsadmin "-Dfs.defaultFS=hdfs://$HADOOP_NAMENODE/" -safemode wait + +export HADOOP_FS="$HADOOP_HOME/bin/hadoop fs" +./fixtures.sh + +echo "Please run the following commands:" +echo "export HADOOP_NAMENODE='$HADOOP_NAMENODE'" +echo "export HADOOP_FS='$HADOOP_HOME/bin/hadoop fs'" diff --git a/rpc/block_reader_test.go b/rpc/block_reader_test.go index 7c385cf4..90cf6a77 100644 --- a/rpc/block_reader_test.go +++ b/rpc/block_reader_test.go @@ -87,6 +87,10 @@ func getBlockReader(t *testing.T, name string) (*BlockReader, string) { func TestReadFailsOver(t *testing.T) { br, dn := getBlockReader(t, "/_test/mobydick.txt") datanodes := br.datanodes.numRemaining() + if datanodes < 2 { + t.Skip("not enough datanodes to test failover") + } + br.stream.reader = iotest.TimeoutReader(br.stream.reader) hash := crc32.NewIEEE() @@ -103,6 +107,9 @@ func TestReadFailsOver(t *testing.T) { func TestReadFailsOverMidRead(t *testing.T) { br, dn := getBlockReader(t, "/_test/mobydick.txt") datanodes := br.datanodes.numRemaining() + if datanodes < 2 { + t.Skip("not enough datanodes to test failover") + } hash := crc32.NewIEEE() _, err := io.CopyN(hash, br, 10000) diff --git a/setup_test_env.sh b/setup_test_env.sh deleted file mode 100755 index 17c56c1b..00000000 --- a/setup_test_env.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -HADOOP_DISTRO=${HADOOP_DISTRO-"cdh"} -HADOOP_HOME=${HADOOP_HOME-"/tmp/hadoop-$HADOOP_DISTRO"} -NN_PORT=${NN_PORT-"9000"} -HADOOP_NAMENODE="localhost:$NN_PORT" - -if [ ! -d "$HADOOP_HOME" ]; then - mkdir -p $HADOOP_HOME - - if [ $HADOOP_DISTRO = "cdh" ]; then - HADOOP_URL="http://archive.cloudera.com/cdh5/cdh/5/hadoop-latest.tar.gz" - elif [ $HADOOP_DISTRO = "hdp" ]; then - HADOOP_URL="http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.4.0.0/tars/hadoop-2.7.1.2.4.0.0-169.tar.gz" - else - echo "No/bad HADOOP_DISTRO='${HADOOP_DISTRO}' specified" - exit 1 - fi - - echo "Downloading Hadoop from $HADOOP_URL to ${HADOOP_HOME}/hadoop.tar.gz" - curl -o ${HADOOP_HOME}/hadoop.tar.gz -L $HADOOP_URL - - echo "Extracting ${HADOOP_HOME}/hadoop.tar.gz into $HADOOP_HOME" - tar zxf ${HADOOP_HOME}/hadoop.tar.gz --strip-components 1 -C $HADOOP_HOME -fi - -MINICLUSTER_JAR=$(find $HADOOP_HOME -name "hadoop-mapreduce-client-jobclient*.jar" | grep -v tests | grep -v sources | head -1) -if [ ! -f "$MINICLUSTER_JAR" ]; then - echo "Couldn't find minicluster jar" - exit 1 -fi -echo "minicluster jar found at $MINICLUSTER_JAR" - - -# start the namenode in the background -echo "Starting hadoop namenode..." -$HADOOP_HOME/bin/hadoop jar $MINICLUSTER_JAR minicluster -nnport $NN_PORT -datanodes 3 -nomr -format "$@" > minicluster.log 2>&1 & -sleep 30 - -HADOOP_FS="$HADOOP_HOME/bin/hadoop fs -Ddfs.block.size=1048576" -$HADOOP_FS -mkdir -p "hdfs://$HADOOP_NAMENODE/_test" -$HADOOP_FS -chmod 777 "hdfs://$HADOOP_NAMENODE/_test" - -$HADOOP_FS -put ./testdata/foo.txt "hdfs://$HADOOP_NAMENODE/_test/foo.txt" -$HADOOP_FS -put ./testdata/mobydick.txt "hdfs://$HADOOP_NAMENODE/_test/mobydick.txt" - -echo "Please run the following command:" -echo "export HADOOP_NAMENODE='$HADOOP_NAMENODE'" diff --git a/travis-setup-cdh5.sh b/travis-setup-cdh5.sh new file mode 100755 index 00000000..0b76142a --- /dev/null +++ b/travis-setup-cdh5.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +set -e + +UBUNTU_CODENAME=$(lsb_release -c | awk '{print $2}') + +sudo tee /etc/apt/sources.list.d/cdh.list < + + fs.defaultFS + hdfs://localhost:9000 + + +EOF + +sudo tee /etc/hadoop/conf.gohdfs/hdfs-site.xml < + + dfs.namenode.name.dir + /opt/hdfs/name + + + dfs.datanode.data.dir + /opt/hdfs/data + + + dfs.permissions.superusergroup + hadoop + + +EOF + +sudo update-alternatives --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.gohdfs 99 +sudo apt-get install -y --allow-unauthenticated hadoop-hdfs-namenode hadoop-hdfs-datanode + +sudo mkdir -p /opt/hdfs/data /opt/hdfs/name +sudo chown -R hdfs:hdfs /opt/hdfs +sudo -u hdfs hdfs namenode -format -nonInteractive + +sudo adduser travis hadoop + +sudo service hadoop-hdfs-datanode restart +sudo service hadoop-hdfs-namenode restart + +hdfs dfsadmin -safemode wait diff --git a/travis-setup-hdp2.sh b/travis-setup-hdp2.sh new file mode 100755 index 00000000..9d8680f9 --- /dev/null +++ b/travis-setup-hdp2.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +set -e + +UBUNTU_VERSION=$(lsb_release -r | awk '{print substr($2,0,2)}') + +sudo tee /etc/apt/sources.list.d/hdp.list < + + fs.defaultFS + hdfs://localhost:9000 + + +EOF + +sudo tee /etc/hadoop/conf/hdfs-site.xml < + + dfs.namenode.name.dir + /opt/hdfs/name + + + dfs.datanode.data.dir + /opt/hdfs/data + + + dfs.permissions.superusergroup + hadoop + + +EOF + +sudo apt-get install -y --allow-unauthenticated hadoop hadoop-hdfs + +sudo mkdir -p /opt/hdfs/data /opt/hdfs/name +sudo chown -R hdfs:hdfs /opt/hdfs +sudo -u hdfs hdfs namenode -format -nonInteractive + +sudo adduser travis hadoop + +sudo /usr/hdp/current/hadoop-hdfs-datanode/../hadoop/sbin/hadoop-daemon.sh start datanode +sudo /usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh start namenode + +hdfs dfsadmin -safemode wait diff --git a/travis-setup.sh b/travis-setup.sh new file mode 100755 index 00000000..037e399f --- /dev/null +++ b/travis-setup.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e +cd $(dirname $0) + +case $1 in + cdh5) + ./travis-setup-cdh5.sh + ;; + hdp2) + ./travis-setup-hdp2.sh + ;; + *) + echo "Uknown platform: $PLATFORM" + exit 1 + ;; +esac + +./fixtures.sh From bffc42afab1adaca9270ac2b5b02654442cae560 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 18 Jul 2018 18:44:34 +0200 Subject: [PATCH 006/159] Only parse addresses/user out of the configuration for New, not NewClient NewClient shouldn't do anything surprising. `New` is the useful batteries-included method. --- client.go | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/client.go b/client.go index e7687338..4bc3e56c 100644 --- a/client.go +++ b/client.go @@ -18,9 +18,14 @@ type Client struct { // ClientOptions represents the configurable options for a client. type ClientOptions struct { + // Addresses specifies the namenode(s) to connect to. Addresses []string - Namenode *rpc.NamenodeConnection - User string + // User specifies which HDFS user the client will act as. + User string + // Namenode optionally specifies an existing NamenodeConnection to wrap. This + // is useful if you needed to create the namenode net.Conn manually for + // whatever reason. + Namenode *rpc.NamenodeConnection } // Username returns the value of HADOOP_USER_NAME in the environment, or @@ -42,20 +47,6 @@ func Username() (string, error) { func NewClient(options ClientOptions) (*Client, error) { var err error - if options.User == "" { - options.User, err = Username() - if err != nil { - return nil, err - } - } - - if options.Addresses == nil || len(options.Addresses) == 0 { - options.Addresses, err = getNameNodeFromConf() - if err != nil { - return nil, err - } - } - if options.Namenode == nil { options.Namenode, err = rpc.NewNamenodeConnectionWithOptions( rpc.NamenodeConnectionOptions{ @@ -78,10 +69,20 @@ func NewClient(options ClientOptions) (*Client, error) { func New(address string) (*Client, error) { options := ClientOptions{} - if address != "" { + if address == "" { + options.Addresses, err = getNameNodeFromConf() + if err != nil { + return nil, err + } + } else { options.Addresses = []string{address} } + options.User, err = Username() + if err != nil { + return nil, err + } + return NewClient(options) } From ca25fc21d50d3da0ac9b381256bdd1224d791667 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 18 Jul 2018 19:01:20 +0200 Subject: [PATCH 007/159] Add a way to conveniently construct a Client from the ambient config --- client.go | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/client.go b/client.go index 4bc3e56c..964e6fa8 100644 --- a/client.go +++ b/client.go @@ -5,6 +5,7 @@ import ( "io/ioutil" "os" "os/user" + "strings" hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/rpc" @@ -28,6 +29,15 @@ type ClientOptions struct { Namenode *rpc.NamenodeConnection } +// ClientOptionsFromConf attempts to load any relevant configuration options +// from the given Hadoop configuration and create a ClientOptions struct +// suitable for creating a Client. Currently this is restricted to the namenode +// address(es), but may be expanded in the future. +func ClientOptionsFromConf(conf HadoopConf) (ClientOptions, error) { + namenodes, err := conf.Namenodes() + return ClientOptions{Addresses: namenodes}, err +} + // Username returns the value of HADOOP_USER_NAME in the environment, or // the current system user if it is not set. func Username() (string, error) { @@ -35,10 +45,12 @@ func Username() (string, error) { if username != "" { return username, nil } + currentUser, err := user.Current() if err != nil { return "", err } + return currentUser.Username, nil } @@ -63,19 +75,19 @@ func NewClient(options ClientOptions) (*Client, error) { } // New returns a connected Client, or an error if it can't connect. The user -// will be the user the code is running under. If address is an empty string -// it will try and get the namenode address from the hadoop configuration -// files. +// will be the current system user, or HADOOP_USER_NAME if set. Any relevant +// options (including the address(es) of the namenode(s), if an empty string is +// passed) will be loaded from the Hadoop configuration present at +// HADOOP_CONF_DIR or the default location. func New(address string) (*Client, error) { - options := ClientOptions{} + conf := LoadHadoopConf("") + options, err := ClientOptionsFromConf(conf) + if err != nil { + options = ClientOptions{} + } - if address == "" { - options.Addresses, err = getNameNodeFromConf() - if err != nil { - return nil, err - } - } else { - options.Addresses = []string{address} + if address != "" { + options.Addresses = strings.Split(address, ",") } options.User, err = Username() @@ -86,17 +98,6 @@ func New(address string) (*Client, error) { return NewClient(options) } -// getNameNodeFromConf returns namenodes from the system Hadoop configuration. -func getNameNodeFromConf() ([]string, error) { - hadoopConf := LoadHadoopConf("") - - namenodes, nnErr := hadoopConf.Namenodes() - if nnErr != nil { - return nil, nnErr - } - return namenodes, nil -} - // NewForUser returns a connected Client with the user specified, or an error if // it can't connect. // From ba74ee14b2cd59da16dde04cad1e951dc5fed57a Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 21 Jul 2018 00:34:40 +0200 Subject: [PATCH 008/159] Use gohdfs1 and gohdfs2 for tests, rather than the superuser In the process, this fixes some of those tests that were dependent on using the superuser. --- client_test.go | 38 ++++++++++++++++++++++++++++++++++---- content_summary_test.go | 9 +++++---- file_reader_test.go | 11 +++++------ file_writer_test.go | 4 ++-- mkdir_test.go | 8 ++++---- perms_test.go | 33 ++++++++++++++++----------------- readdir_test.go | 6 +++--- remove_test.go | 4 ++-- rename_test.go | 14 +++++++------- stat_test.go | 10 +++++----- 10 files changed, 83 insertions(+), 54 deletions(-) diff --git a/client_test.go b/client_test.go index 7ccb645d..17f28ac4 100644 --- a/client_test.go +++ b/client_test.go @@ -3,6 +3,7 @@ package hdfs import ( "io/ioutil" "os" + "os/user" "path/filepath" "testing" @@ -13,12 +14,16 @@ import ( var cachedClients = make(map[string]*Client) func getClient(t *testing.T) *Client { - username, err := Username() + return getClientForUser(t, "gohdfs1") +} + +func getClientForSuperUser(t *testing.T) *Client { + u, err := user.Current() if err != nil { t.Fatal(err) } - return getClientForUser(t, username) + return getClientForUser(t, u.Username) } func getClientForUser(t *testing.T, user string) *Client { @@ -41,18 +46,43 @@ func getClientForUser(t *testing.T, user string) *Client { } func touch(t *testing.T, path string) { + touchMask(t, path, 0) +} + +func touchMask(t *testing.T, path string, mask os.FileMode) { c := getClient(t) - err := c.CreateEmptyFile(path) + err := c.Remove(path) + if err != nil && !os.IsNotExist(err) { + t.Fatal(err) + } + + err = c.CreateEmptyFile(path) if err != nil && !os.IsExist(err) { t.Fatal(err) } + + if mask != 0 { + err = c.Chmod(path, mask) + if err != nil { + t.Fatal(err) + } + } } func mkdirp(t *testing.T, path string) { + mkdirpMask(t, path, 0755) +} + +func mkdirpMask(t *testing.T, path string, mask os.FileMode) { c := getClient(t) - err := c.MkdirAll(path, 0644) + err := c.Remove(path) + if err != nil && !os.IsNotExist(err) { + t.Fatal(err) + } + + err = c.MkdirAll(path, mask) if err != nil && !os.IsExist(err) { t.Fatal(err) } diff --git a/content_summary_test.go b/content_summary_test.go index 8867d663..920c5108 100644 --- a/content_summary_test.go +++ b/content_summary_test.go @@ -11,6 +11,7 @@ import ( func TestContentSummaryDir(t *testing.T) { client := getClient(t) + baleet(t, "/_test/dirforcs") mkdirp(t, "/_test/dirforcs/1") mkdirp(t, "/_test/dirforcs/2") touch(t, "/_test/dirforcs/foo") @@ -44,11 +45,11 @@ func TestContentSummaryNonExistent(t *testing.T) { } func TestContentSummaryDirWithoutPermission(t *testing.T) { - otherClient := getClientForUser(t, "other") + client2 := getClientForUser(t, "gohdfs2") - mkdirp(t, "/_test/accessdenied") - touch(t, "/_test/accessdenied/foo") + mkdirpMask(t, "/_test/accessdenied", 0700) + touchMask(t, "/_test/accessdenied/foo", 0600) - _, err := otherClient.GetContentSummary("/_test/accessdenied/foo") + _, err := client2.GetContentSummary("/_test/accessdenied/foo") assertPathError(t, err, "content summary", "/_test/accessdenied/foo", os.ErrPermission) } diff --git a/file_reader_test.go b/file_reader_test.go index 2b778766..5a60f123 100644 --- a/file_reader_test.go +++ b/file_reader_test.go @@ -246,7 +246,6 @@ func TestFileReadDirMany(t *testing.T) { total := maxReadDir*5 + maxReadDir/2 + 35 firstBatch := maxReadDir + 71 - baleet(t, "/_test/fulldir5") mkdirp(t, "/_test/fulldir5") for i := 0; i < total; i++ { touch(t, fmt.Sprintf("/_test/fulldir5/%04d", i)) @@ -275,14 +274,14 @@ func TestFileReadDirMany(t *testing.T) { } func TestOpenFileWithoutPermission(t *testing.T) { - otherClient := getClientForUser(t, "other") + client2 := getClientForUser(t, "gohdfs2") - mkdirp(t, "/_test/accessdenied") - touch(t, "/_test/accessdenied/foo") + mkdirpMask(t, "/_test/accessdenied", 0700) + touchMask(t, "/_test/accessdenied/foo", 0700) - file, err := otherClient.Open("/_test/accessdenied/foo") - assert.Nil(t, file) + file, err := client2.Open("/_test/accessdenied/foo") assertPathError(t, err, "open", "/_test/accessdenied/foo", os.ErrPermission) + assert.Nil(t, file) } func TestFileChecksum(t *testing.T) { diff --git a/file_writer_test.go b/file_writer_test.go index 90751027..ea72f1fa 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -229,12 +229,12 @@ func TestCreateEmptyFileWithoutParent(t *testing.T) { func TestCreateEmptyFileWithoutPermission(t *testing.T) { client := getClient(t) - otherClient := getClientForUser(t, "other") + client2 := getClientForUser(t, "gohdfs2") mkdirp(t, "/_test/accessdenied") baleet(t, "/_test/accessdenied/emptyfile") - err := otherClient.CreateEmptyFile("/_test/accessdenied/emptyfile") + err := client2.CreateEmptyFile("/_test/accessdenied/emptyfile") assertPathError(t, err, "create", "/_test/accessdenied/emptyfile", os.ErrPermission) _, err = client.Stat("/_test/accessdenied/emptyfile") diff --git a/mkdir_test.go b/mkdir_test.go index c0681e94..00f5a796 100644 --- a/mkdir_test.go +++ b/mkdir_test.go @@ -79,11 +79,11 @@ func TestMkdirAllExists(t *testing.T) { func TestMkdirWIthoutPermission(t *testing.T) { client := getClient(t) - otherClient := getClientForUser(t, "other") + client2 := getClientForUser(t, "gohdfs2") mkdirp(t, "/_test/accessdenied") - err := otherClient.Mkdir("/_test/accessdenied/dir", mode) + err := client2.Mkdir("/_test/accessdenied/dir", mode) assertPathError(t, err, "mkdir", "/_test/accessdenied/dir", os.ErrPermission) _, err = client.Stat("/_test/accessdenied/dir") @@ -92,11 +92,11 @@ func TestMkdirWIthoutPermission(t *testing.T) { func TestMkdirAllWIthoutPermission(t *testing.T) { client := getClient(t) - otherClient := getClientForUser(t, "other") + client2 := getClientForUser(t, "gohdfs2") mkdirp(t, "/_test/accessdenied") - err := otherClient.Mkdir("/_test/accessdenied/dir2/foo", mode) + err := client2.Mkdir("/_test/accessdenied/dir2/foo", mode) assertPathError(t, err, "mkdir", "/_test/accessdenied/dir2/foo", os.ErrPermission) _, err = client.Stat("/_test/accessdenied/dir2/foo") diff --git a/perms_test.go b/perms_test.go index e2ca5b0c..5b4dccfa 100644 --- a/perms_test.go +++ b/perms_test.go @@ -45,64 +45,63 @@ func TestChmodNonexistent(t *testing.T) { } func TestChmodWithoutPermission(t *testing.T) { - otherClient := getClientForUser(t, "other") + client2 := getClientForUser(t, "gohdfs2") mkdirp(t, "/_test/accessdenied") - err := otherClient.Chmod("/_test/accessdenied", 0777) + err := client2.Chmod("/_test/accessdenied", 0777) assertPathError(t, err, "chmod", "/_test/accessdenied", os.ErrPermission) } func TestChown(t *testing.T) { - client := getClient(t) + superClient := getClientForSuperUser(t) - baleet(t, "/_test/tochown") touch(t, "/_test/tochown") - err := client.Chown("/_test/tochown", "other", "") + err := superClient.Chown("/_test/tochown", "foo", "bar") require.NoError(t, err) - fi, err := client.Stat("/_test/tochown") + fi, err := superClient.Stat("/_test/tochown") assert.NoError(t, err) - assert.EqualValues(t, fi.(*FileInfo).Owner(), "other") + assert.EqualValues(t, fi.(*FileInfo).Owner(), "foo") + assert.EqualValues(t, fi.(*FileInfo).OwnerGroup(), "bar") } func TestChownDir(t *testing.T) { - client := getClient(t) + superClient := getClientForSuperUser(t) - baleet(t, "/_test/tochowndir") mkdirp(t, "/_test/tochowndir") - err := client.Chown("/_test/tochowndir", "other", "") + err := superClient.Chown("/_test/tochowndir", "foo", "bar") require.NoError(t, err) - fi, err := client.Stat("/_test/tochowndir") + fi, err := superClient.Stat("/_test/tochowndir") assert.NoError(t, err) - assert.EqualValues(t, fi.(*FileInfo).Owner(), "other") + assert.EqualValues(t, fi.(*FileInfo).Owner(), "foo") + assert.EqualValues(t, fi.(*FileInfo).OwnerGroup(), "bar") } func TestChownNonexistent(t *testing.T) { - client := getClient(t) + superClient := getClientForSuperUser(t) baleet(t, "/_test/nonexistent") - err := client.Chown("/_test/nonexistent", "other", "") + err := superClient.Chown("/_test/nonexistent", "gohdfs2", "") assertPathError(t, err, "chown", "/_test/nonexistent", os.ErrNotExist) } func TestChownWithoutPermission(t *testing.T) { - otherClient := getClientForUser(t, "other") + client2 := getClientForUser(t, "gohdfs2") mkdirp(t, "/_test/accessdenied") - err := otherClient.Chown("/_test/accessdenied", "owner", "") + err := client2.Chown("/_test/accessdenied", "owner", "") assertPathError(t, err, "chown", "/_test/accessdenied", os.ErrPermission) } func TestChtimes(t *testing.T) { client := getClient(t) - baleet(t, "/_test/tochtime") touch(t, "/_test/tochtime") birthday := time.Date(1990, 1, 22, 14, 33, 35, 0, time.UTC) diff --git a/readdir_test.go b/readdir_test.go index d6b67d6e..ddcb9404 100644 --- a/readdir_test.go +++ b/readdir_test.go @@ -96,10 +96,10 @@ func TestReadDirNonexistent(t *testing.T) { } func TestReadDirWithoutPermission(t *testing.T) { - mkdirp(t, "/_test/accessdenied") - touch(t, "/_test/accessdenied/foo") + mkdirpMask(t, "/_test/accessdenied", 0700) + touchMask(t, "/_test/accessdenied/foo", 0600) - client := getClientForUser(t, "other") + client := getClientForUser(t, "gohdfs2") res, err := client.ReadDir("/_test/accessdenied") assertPathError(t, err, "readdir", "/_test/accessdenied", os.ErrPermission) diff --git a/remove_test.go b/remove_test.go index 442e6eae..55effa3a 100644 --- a/remove_test.go +++ b/remove_test.go @@ -32,11 +32,11 @@ func TestRemoveNotExistent(t *testing.T) { } func TestRemoveWithoutPermission(t *testing.T) { - otherClient := getClientForUser(t, "other") + client2 := getClientForUser(t, "gohdfs2") mkdirp(t, "/_test/accessdenied") touch(t, "/_test/accessdenied/foo") - err := otherClient.Remove("/_test/accessdenied/foo") + err := client2.Remove("/_test/accessdenied/foo") assertPathError(t, err, "remove", "/_test/accessdenied/foo", os.ErrPermission) } diff --git a/rename_test.go b/rename_test.go index f12746c5..0aa750f8 100644 --- a/rename_test.go +++ b/rename_test.go @@ -46,23 +46,23 @@ func TestRenameDestExists(t *testing.T) { } func TestRenameWithoutPermissionForSrc(t *testing.T) { - otherClient := getClientForUser(t, "other") + client2 := getClientForUser(t, "gohdfs2") - mkdirp(t, "/_test/accessdenied") - touch(t, "/_test/accessdenied/foo") + mkdirpMask(t, "/_test/accessdenied", 0700) + touchMask(t, "/_test/accessdenied/foo", 0600) - err := otherClient.Rename("/_test/accessdenied/foo", "/_test/tomovedest3") + err := client2.Rename("/_test/accessdenied/foo", "/_test/tomovedest3") assertPathError(t, err, "rename", "/_test/accessdenied/foo", os.ErrPermission) } func TestRenameWithoutPermissionForDest(t *testing.T) { - otherClient := getClientForUser(t, "other") + client2 := getClientForUser(t, "gohdfs2") baleet(t, "/_test/ownedbyother2") - err := otherClient.CreateEmptyFile("/_test/ownedbyother2") + err := client2.CreateEmptyFile("/_test/ownedbyother2") require.NoError(t, err) - err = otherClient.Rename("/_test/ownedbyother2", "/_test/accessdenied/tomovedest4") + err = client2.Rename("/_test/ownedbyother2", "/_test/accessdenied/tomovedest4") assertPathError(t, err, "rename", "/_test/accessdenied/tomovedest4", os.ErrPermission) } diff --git a/stat_test.go b/stat_test.go index 7933e52a..7a73f7f8 100644 --- a/stat_test.go +++ b/stat_test.go @@ -61,15 +61,15 @@ func TestStatDir(t *testing.T) { } func TestStatDirWithoutPermission(t *testing.T) { - otherClient := getClientForUser(t, "other") + client2 := getClientForUser(t, "gohdfs2") - mkdirp(t, "/_test/accessdenied") - touch(t, "/_test/accessdenied/foo") + mkdirpMask(t, "/_test/accessdenied", 0700) + touchMask(t, "/_test/accessdenied/foo", 0600) - resp, err := otherClient.Stat("/_test/accessdenied") + resp, err := client2.Stat("/_test/accessdenied") assert.NoError(t, err) assert.NotEqual(t, "", resp.(*FileInfo).Owner()) - _, err = otherClient.Stat("/_test/accessdenied/foo") + _, err = client2.Stat("/_test/accessdenied/foo") assertPathError(t, err, "stat", "/_test/accessdenied/foo", os.ErrPermission) } From 01fc33bd383d8edf3d5a2f51c5a2b1ec32746ca2 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 21 Jul 2018 01:01:00 +0200 Subject: [PATCH 009/159] Rely on ambient Hadoop conf, rather than HADOOP_NAMENODE, in tests We'll need to do this for Kerberos tests, anyway. Unfortunately, this breaks a bunch of the RPC tests, since they can't load configuration properly; but the tests deleted here were either being skipped now that we run with a single datanode or were entirely redundant. --- client_test.go | 16 ++-- conf_test.go | 5 +- fixtures.sh | 8 +- minicluster.sh | 15 +++- rpc/block_reader_test.go | 145 ------------------------------------ rpc/block_writer_test.go | 94 ----------------------- rpc/checksum_reader_test.go | 20 ----- rpc/namenode_test.go | 19 ----- 8 files changed, 30 insertions(+), 292 deletions(-) delete mode 100644 rpc/block_reader_test.go delete mode 100644 rpc/checksum_reader_test.go delete mode 100644 rpc/namenode_test.go diff --git a/client_test.go b/client_test.go index 17f28ac4..53eb5b92 100644 --- a/client_test.go +++ b/client_test.go @@ -26,22 +26,24 @@ func getClientForSuperUser(t *testing.T) *Client { return getClientForUser(t, u.Username) } -func getClientForUser(t *testing.T, user string) *Client { - if c, ok := cachedClients[user]; ok { +func getClientForUser(t *testing.T, username string) *Client { + if c, ok := cachedClients[username]; ok { return c } - nn := os.Getenv("HADOOP_NAMENODE") - if nn == "" { - t.Fatal("HADOOP_NAMENODE not set") + conf := LoadHadoopConf("") + options, _ := ClientOptionsFromConf(conf) + if options.Addresses == nil { + t.Fatal("No hadoop configuration found at HADOOP_CONF_DIR") } - client, err := NewForUser(nn, user) + options.User = username + client, err := NewClient(options) if err != nil { t.Fatal(err) } - cachedClients[user] = client + cachedClients[username] = client return client } diff --git a/conf_test.go b/conf_test.go index 5c7b82ec..f474f338 100644 --- a/conf_test.go +++ b/conf_test.go @@ -8,6 +8,8 @@ import ( ) func TestConfFallback(t *testing.T) { + oldHome := os.Getenv("HADOOP_HOME") + oldConfDir := os.Getenv("HADOOP_CONF_DIR") os.Setenv("HADOOP_HOME", "testdata") // This will resolve to testdata/conf. os.Setenv("HADOOP_CONF_DIR", "testdata/conf2") @@ -32,5 +34,6 @@ func TestConfFallback(t *testing.T) { assert.Nil(t, err) assert.EqualValues(t, confNamenodes, nns, "loading via HADOOP_HOME (testdata/conf)") - os.Unsetenv("HADOOP_HOME") + os.Setenv("HADOOP_HOME", oldHome) + os.Setenv("HADOOP_CONF_DIR", oldConfDir) } diff --git a/fixtures.sh b/fixtures.sh index d589dde8..6ff221bc 100755 --- a/fixtures.sh +++ b/fixtures.sh @@ -1,8 +1,8 @@ set -e HADOOP_FS=${HADOOP_FS-"hadoop fs"} -$HADOOP_FS -mkdir -p "hdfs://$HADOOP_NAMENODE/_test" -$HADOOP_FS -chmod 777 "hdfs://$HADOOP_NAMENODE/_test" +$HADOOP_FS -mkdir -p "/_test" +$HADOOP_FS -chmod 777 "/_test" -$HADOOP_FS -put ./testdata/foo.txt "hdfs://$HADOOP_NAMENODE/_test/foo.txt" -$HADOOP_FS -Ddfs.block.size=1048576 -put ./testdata/mobydick.txt "hdfs://$HADOOP_NAMENODE/_test/mobydick.txt" +$HADOOP_FS -put ./testdata/foo.txt "/_test/foo.txt" +$HADOOP_FS -Ddfs.block.size=1048576 -put ./testdata/mobydick.txt "/_test/mobydick.txt" diff --git a/minicluster.sh b/minicluster.sh index e344542f..324f16c9 100755 --- a/minicluster.sh +++ b/minicluster.sh @@ -22,12 +22,23 @@ fi echo "Starting minicluster..." $HADOOP_HOME/bin/hadoop jar $MINICLUSTER_JAR minicluster -nnport $NN_PORT -datanodes 3 -nomr -format "$@" > minicluster.log 2>&1 & + +export HADOOP_CONF_DIR=$(mktemp -d) +cat > $HADOOP_CONF_DIR/core-site.xml < + + fs.defaultFS + hdfs://$HADOOP_NAMENODE + + +EOF + echo "Waiting for namenode to start up..." -$HADOOP_HOME/bin/hdfs dfsadmin "-Dfs.defaultFS=hdfs://$HADOOP_NAMENODE/" -safemode wait +$HADOOP_HOME/bin/hdfs dfsadmin -safemode wait export HADOOP_FS="$HADOOP_HOME/bin/hadoop fs" ./fixtures.sh echo "Please run the following commands:" -echo "export HADOOP_NAMENODE='$HADOOP_NAMENODE'" +echo "export HADOOP_CONF_DIR='$HADOOP_CONF_DIR'" echo "export HADOOP_FS='$HADOOP_HOME/bin/hadoop fs'" diff --git a/rpc/block_reader_test.go b/rpc/block_reader_test.go deleted file mode 100644 index 90cf6a77..00000000 --- a/rpc/block_reader_test.go +++ /dev/null @@ -1,145 +0,0 @@ -package rpc - -import ( - "hash/crc32" - "io" - "io/ioutil" - "os" - "os/user" - "testing" - "testing/iotest" - "time" - - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -var cachedNamenode *NamenodeConnection - -func getUsername(*testing.T) (string, error) { - username := os.Getenv("HADOOP_USER_NAME") - if username != "" { - return username, nil - } - currentUser, err := user.Current() - if err != nil { - return "", err - } - return currentUser.Username, nil -} -func getNamenode(t *testing.T) *NamenodeConnection { - if cachedNamenode != nil { - return cachedNamenode - } - - nn := os.Getenv("HADOOP_NAMENODE") - if nn == "" { - t.Fatal("HADOOP_NAMENODE not set") - } - - username, err := getUsername(t) - if err != nil { - t.Fatal(err) - } - - conn, err := NewNamenodeConnection(nn, username) - if err != nil { - t.Fatal(err) - } - - return conn -} - -func getBlocks(t *testing.T, name string) []*hdfs.LocatedBlockProto { - namenode := getNamenode(t) - - req := &hdfs.GetBlockLocationsRequestProto{ - Src: proto.String(name), - Offset: proto.Uint64(0), - Length: proto.Uint64(1257276), - } - resp := &hdfs.GetBlockLocationsResponseProto{} - - err := namenode.Execute("getBlockLocations", req, resp) - if err != nil { - t.Fatal(err) - } - - // add a duplicate location to failover to - return resp.GetLocations().GetBlocks() -} - -func getBlockReader(t *testing.T, name string) (*BlockReader, string) { - // clear the failure cache - datanodeFailures = make(map[string]time.Time) - block := getBlocks(t, name)[0] - - br := NewBlockReader(block, 0, "test-"+string(newClientID())) - dn := br.datanodes.datanodes[0] - err := br.connectNext() - require.NoError(t, err) - - return br, dn -} - -func TestReadFailsOver(t *testing.T) { - br, dn := getBlockReader(t, "/_test/mobydick.txt") - datanodes := br.datanodes.numRemaining() - if datanodes < 2 { - t.Skip("not enough datanodes to test failover") - } - - br.stream.reader = iotest.TimeoutReader(br.stream.reader) - - hash := crc32.NewIEEE() - n, err := io.Copy(hash, br) - require.NoError(t, err) - assert.EqualValues(t, 1048576, n) - assert.EqualValues(t, 0xb35a6a0e, hash.Sum32()) - assert.EqualValues(t, datanodes-1, br.datanodes.numRemaining()) - - _, exist := datanodeFailures[dn] - assert.True(t, exist) -} - -func TestReadFailsOverMidRead(t *testing.T) { - br, dn := getBlockReader(t, "/_test/mobydick.txt") - datanodes := br.datanodes.numRemaining() - if datanodes < 2 { - t.Skip("not enough datanodes to test failover") - } - - hash := crc32.NewIEEE() - _, err := io.CopyN(hash, br, 10000) - require.NoError(t, err) - - br.stream.reader = iotest.TimeoutReader(br.stream.reader) - - n, err := io.Copy(hash, br) - require.NoError(t, err) - assert.EqualValues(t, 1048576-10000, n) - assert.EqualValues(t, 0xb35a6a0e, hash.Sum32()) - assert.EqualValues(t, datanodes-1, br.datanodes.numRemaining()) - - _, exist := datanodeFailures[dn] - assert.True(t, exist) -} - -func TestReadFailsOverAndThenDies(t *testing.T) { - br, _ := getBlockReader(t, "/_test/mobydick.txt") - datanodes := br.datanodes.numRemaining() - - for br.datanodes.numRemaining() > 0 { - br.stream.reader = iotest.TimeoutReader(br.stream.reader) - _, err := io.CopyN(ioutil.Discard, br, 1000) - require.NoError(t, err) - require.Equal(t, datanodes-1, br.datanodes.numRemaining()) - datanodes-- - } - - br.stream.reader = iotest.TimeoutReader(br.stream.reader) - _, err := io.Copy(ioutil.Discard, br) - assert.EqualValues(t, iotest.ErrTimeout, err) -} diff --git a/rpc/block_writer_test.go b/rpc/block_writer_test.go index 414d81e5..8b128915 100644 --- a/rpc/block_writer_test.go +++ b/rpc/block_writer_test.go @@ -1,105 +1,11 @@ package rpc import ( - "hash/crc32" - "io" - "os" "testing" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) -func createBlock(t *testing.T, name string) *BlockWriter { - namenode := getNamenode(t) - blockSize := int64(1048576) - - createReq := &hdfs.CreateRequestProto{ - Src: proto.String(name), - Masked: &hdfs.FsPermissionProto{Perm: proto.Uint32(uint32(0644))}, - ClientName: proto.String(namenode.ClientName()), - CreateFlag: proto.Uint32(1), - CreateParent: proto.Bool(false), - Replication: proto.Uint32(uint32(3)), - BlockSize: proto.Uint64(uint64(blockSize)), - } - createResp := &hdfs.CreateResponseProto{} - - err := namenode.Execute("create", createReq, createResp) - require.NoError(t, err) - - addBlockReq := &hdfs.AddBlockRequestProto{ - Src: proto.String(name), - ClientName: proto.String(namenode.ClientName()), - Previous: nil, - } - addBlockResp := &hdfs.AddBlockResponseProto{} - - err = namenode.Execute("addBlock", addBlockReq, addBlockResp) - require.NoError(t, err) - - block := addBlockResp.GetBlock() - return NewBlockWriter(block, namenode, blockSize) -} - -func finishBlock(t *testing.T, name string, bw *BlockWriter) { - namenode := getNamenode(t) - - err := bw.Close() - require.NoError(t, err) - - completeReq := &hdfs.CompleteRequestProto{ - Src: proto.String(name), - ClientName: proto.String(namenode.ClientName()), - Last: bw.block.GetB(), - } - completeResp := &hdfs.CompleteResponseProto{} - - err = namenode.Execute("complete", completeReq, completeResp) - require.NoError(t, err) -} - -func baleet(t *testing.T, name string) { - namenode := getNamenode(t) - - req := &hdfs.DeleteRequestProto{ - Src: proto.String(name), - Recursive: proto.Bool(true), - } - resp := &hdfs.DeleteResponseProto{} - - err := namenode.Execute("delete", req, resp) - require.NoError(t, err) - require.NotNil(t, resp.Result) -} - -func TestWriteFailsOver(t *testing.T) { - t.Skip("Write failover isn't implemented") - - name := "/_test/create/6.txt" - baleet(t, name) - - mobydick, err := os.Open("../test/mobydick.txt") - require.NoError(t, err) - - bw := createBlock(t, name) - bw.connectNext() - bw.stream.ackError = ackError{0, 0, hdfs.Status_ERROR} - - _, err = io.CopyN(bw, mobydick, 1048576) - require.NoError(t, err) - finishBlock(t, name, bw) - - br, _ := getBlockReader(t, name) - hash := crc32.NewIEEE() - n, err := io.Copy(hash, br) - require.NoError(t, err) - assert.EqualValues(t, 1048576, n) - assert.EqualValues(t, 0xb35a6a0e, hash.Sum32()) -} - func TestPacketSize(t *testing.T) { bws := &blockWriteStream{} bws.buf.Write(make([]byte, outboundPacketSize*3)) diff --git a/rpc/checksum_reader_test.go b/rpc/checksum_reader_test.go deleted file mode 100644 index f4c15b44..00000000 --- a/rpc/checksum_reader_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package rpc - -import ( - "encoding/hex" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -const testChecksum = "b8d258c1ae6b31ce38b833f7e3bb5cb0" - -func TestReadChecksum(t *testing.T) { - block := getBlocks(t, "/_test/mobydick.txt")[0] - cr := NewChecksumReader(block) - - checksum, err := cr.ReadChecksum() - require.NoError(t, err) - assert.EqualValues(t, testChecksum, hex.EncodeToString(checksum)) -} diff --git a/rpc/namenode_test.go b/rpc/namenode_test.go deleted file mode 100644 index e0222260..00000000 --- a/rpc/namenode_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package rpc - -import ( - "io" - "testing" - "time" - - "github.com/stretchr/testify/assert" -) - -func TestNamenodeConnection_resolveConnection(t *testing.T) { - conn := getNamenode(t) - conn.markFailure(io.EOF) - - assert.Error(t, conn.resolveConnection()) - conn.host.lastErrorAt = time.Now().Add(-backoffDuration) - assert.NoError(t, conn.resolveConnection()) - cachedNamenode = nil -} From 525ccd4a120f946297de77bfe334265129e911c0 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 21 Jul 2018 01:15:55 +0200 Subject: [PATCH 010/159] Set HADOOP_CONF_DIR for travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cd7a0609..2c2d24bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ before_install: - "$HOME/bats/install.sh $HOME/bats/build" - export PATH="$PATH:$HOME/bats/build/bin" before_script: -- export HADOOP_NAMENODE="localhost:9000" +- export HADOOP_CONF_DIR="/etc/hadoop/conf" - ./travis-setup.sh $PLATFORM script: - find protocol -name *.pb.go | xargs touch # so make doesn't try to regen protobuf files From 2a62ba0105052eee627c365b53c9313bb362c9c7 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 21 Jul 2018 01:23:15 +0200 Subject: [PATCH 011/159] Remove another use of HADOOP_NAMENODE And don't use port 80 in tests, that's dumb. --- client_test.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/client_test.go b/client_test.go index 53eb5b92..e2f17766 100644 --- a/client_test.go +++ b/client_test.go @@ -108,18 +108,19 @@ func assertPathError(t *testing.T, err error, op, path string, wrappedErr error) } func TestNewWithMultipleNodes(t *testing.T) { - nn := os.Getenv("HADOOP_NAMENODE") - if nn == "" { - t.Fatal("HADOOP_NAMENODE not set") + conf := LoadHadoopConf("") + nns, err := conf.Namenodes() + if err != nil { + t.Fatal("No hadoop configuration found at HADOOP_CONF_DIR") } - _, err := NewClient(ClientOptions{ - Addresses: []string{"localhost:80", nn}, - }) + + nns = append([]string{"localhost:100"}, nns...) + _, err = NewClient(ClientOptions{Addresses: nns}) assert.Nil(t, err) } func TestNewWithFailingNode(t *testing.T) { - _, err := New("localhost:80") + _, err := New("localhost:100") assert.NotNil(t, err) } From df3bf0c286cfe0c7d92ce7d89ed4f7e76029677f Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 21 Jul 2018 01:30:50 +0200 Subject: [PATCH 012/159] Move travis-setup.sh into the install step on travis --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2c2d24bf..0184f8e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,13 @@ go: 1.x env: - PLATFORM=cdh5 - PLATFORM=hdp2 -before_install: +install: - git clone https://github.com/sstephenson/bats $HOME/bats - mkdir -p $HOME/bats/build - "$HOME/bats/install.sh $HOME/bats/build" - export PATH="$PATH:$HOME/bats/build/bin" -before_script: -- export HADOOP_CONF_DIR="/etc/hadoop/conf" - ./travis-setup.sh $PLATFORM +before_script: export HADOOP_CONF_DIR="/etc/hadoop/conf" script: - find protocol -name *.pb.go | xargs touch # so make doesn't try to regen protobuf files - make test From 7d637e8799697c8285c252a427d65fe61b9809a6 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 21 Jul 2018 01:38:28 +0200 Subject: [PATCH 013/159] Move the pb.go munging into before_script in travis --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0184f8e7..15fecf1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,10 +11,10 @@ install: - "$HOME/bats/install.sh $HOME/bats/build" - export PATH="$PATH:$HOME/bats/build/bin" - ./travis-setup.sh $PLATFORM -before_script: export HADOOP_CONF_DIR="/etc/hadoop/conf" -script: +before_script: +- export HADOOP_CONF_DIR="/etc/hadoop/conf" - find protocol -name *.pb.go | xargs touch # so make doesn't try to regen protobuf files -- make test +script: make test before_deploy: make release deploy: skip_cleanup: true From 76585e31111885623ff02f09959be0b025721356 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 21 Jul 2018 02:14:02 +0200 Subject: [PATCH 014/159] Prevent warnings from breaking the checksum test --- cmd/hdfs/test/checksum.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/hdfs/test/checksum.bats b/cmd/hdfs/test/checksum.bats index 6da1a006..48b87c0e 100644 --- a/cmd/hdfs/test/checksum.bats +++ b/cmd/hdfs/test/checksum.bats @@ -7,7 +7,7 @@ setup() { } @test "checksum" { - FOO_CHECKSUM=$($HADOOP_FS -checksum hdfs://$HADOOP_NAMENODE/_test/foo.txt | awk '{ print substr($3, 25, 32) }') + FOO_CHECKSUM=$($HADOOP_FS -checksum hdfs://$HADOOP_NAMENODE/_test/foo.txt | tail -1 | awk '{ print substr($3, 25, 32) }') run $HDFS checksum /_test/foo.txt assert_success From 1e6e3103194afb3dcc0d03569b8f7c62f7cebde8 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 21 Jul 2018 18:30:54 +0200 Subject: [PATCH 015/159] Ignore AlreadyBeingCreated exceptions in Append tests --- file_writer_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/file_writer_test.go b/file_writer_test.go index ea72f1fa..17a4b7ef 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -9,10 +9,13 @@ import ( "strings" "testing" + "github.com/colinmarc/hdfs/rpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) +const abcException = "org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException" + func TestFileWrite(t *testing.T) { client := getClient(t) @@ -371,6 +374,13 @@ func TestFileAppendRepeatedly(t *testing.T) { expected := "foo" for i := 0; i < 100; i++ { writer, err = client.Append("/_test/append/4.txt") + + // This represents a bug in the HDFS append implementation, as far as I can tell, + // and is safe to skip. + if nnErr, ok := err.(*rpc.NamenodeError); ok && nnErr.Exception == abcException { + continue + } + require.NoError(t, err) s := strings.Repeat("b", rand.Intn(1024)) + "\n" From 40e5787d93164aa22903429aa563bc515f01803c Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 23 Jul 2018 12:19:45 +0200 Subject: [PATCH 016/159] Unwrap the PathError holding the NamenodeError holding the AlreadyBeingCreatedException --- file_writer_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/file_writer_test.go b/file_writer_test.go index 17a4b7ef..b17708c6 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -377,8 +377,11 @@ func TestFileAppendRepeatedly(t *testing.T) { // This represents a bug in the HDFS append implementation, as far as I can tell, // and is safe to skip. - if nnErr, ok := err.(*rpc.NamenodeError); ok && nnErr.Exception == abcException { - continue + if pathErr, ok := err.(*os.PathError); ok { + if nnErr, ok := pathErr.Err.(*rpc.NamenodeError); ok && nnErr.Exception == abcException { + t.Log("Ignoring AlreadyBeingCreatedException from append") + continue + } } require.NoError(t, err) From 2fcdbaad62a5fcd677db37655d5aa67f93c2fe9b Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 23 Jul 2018 13:20:59 +0200 Subject: [PATCH 017/159] Reorganize readdir code, fixing some performance problems This reorganizes FileReader.Readdir and Client.ReadDir, changing the latter to use the former and removing some redundant code. It also changes the way the former works to be more performant. Our strategy of batching (both in FileReader.Readdir and in the complete command in the commandline client) was nonsensical, because HDFS doesn't have any mechanism for requesting fewer entries at once. To fetch a smaller "batch", we have to pull HDFS will give us (1000 at a time), and then throw out the rest. Worse, because we were using 1024 as our batch size, we would fetch 2000 and throw out 974, effectively making twice as many calls to HDFS every time. Changing NeedLocation to false (which presumably means HDFS won't attach block location to the entries) to false should also make these calls faster. Finally, a redundant test was removed and TestFileReadDirMany scaled down so as to be a bit faster. --- cmd/hdfs/complete.go | 4 ++- file_reader.go | 65 +++++++++++++++++++++++++++++++++--------- file_reader_test.go | 3 +- readdir.go | 68 +++++--------------------------------------- readdir_test.go | 16 +---------- 5 files changed, 64 insertions(+), 92 deletions(-) diff --git a/cmd/hdfs/complete.go b/cmd/hdfs/complete.go index c50b2b40..a469b7b0 100644 --- a/cmd/hdfs/complete.go +++ b/cmd/hdfs/complete.go @@ -68,8 +68,10 @@ func completePath(fragment string) { return } + // 1000 entries should align with what HDFS returns. If not, well, it was + // going to be slow anyway. var partial []os.FileInfo - for ; err != io.EOF; partial, err = dirReader.Readdir(100) { + for ; err != io.EOF; partial, err = dirReader.Readdir(1000) { if err != nil { return } diff --git a/file_reader.go b/file_reader.go index a41dd098..0b8f8355 100644 --- a/file_reader.go +++ b/file_reader.go @@ -12,8 +12,6 @@ import ( "github.com/golang/protobuf/proto" ) -const maxReadDir = 1024 - // A FileReader represents an existing file or directory in HDFS. It implements // io.Reader, io.ReaderAt, io.Seeker, and io.Closer, and can only be used for // reads. For writes, see FileWriter and Client.Create. @@ -230,6 +228,15 @@ func (f *FileReader) ReadAt(b []byte, off int64) (int, error) { // the directory), it returns the slice and a nil error. If it encounters an // error before the end of the directory, Readdir returns the os.FileInfo read // until that point and a non-nil error. +// +// The os.FileInfo values returned will not have block location attached to +// the struct returned by Sys(). To fetch that information, make a separate +// call to Stat. +// +// Note that making multiple calls to Readdir with a smallish n (as you might do +// with the os version) is slower than just requesting everything at once. +// That's because HDFS has no mechanism for limiting the number of entries +// returned; whatever extra entries it returns are simply thrown away. func (f *FileReader) Readdir(n int) ([]os.FileInfo, error) { if f.closed { return nil, io.ErrClosedPipe @@ -249,14 +256,9 @@ func (f *FileReader) Readdir(n int) ([]os.FileInfo, error) { res := make([]os.FileInfo, 0) for { - k := n - len(res) - if n <= 0 || k > maxReadDir { - k = maxReadDir - } - - batch, err := f.client.getDirList(f.name, f.readdirLast, k) + batch, remaining, err := f.readdir() if err != nil { - return nil, err + return nil, &os.PathError{"readdir", f.name, err} } if len(batch) > 0 { @@ -264,17 +266,52 @@ func (f *FileReader) Readdir(n int) ([]os.FileInfo, error) { } res = append(res, batch...) - if len(batch) < k || (n > 0 && len(res) == n) { + if remaining == 0 || (n > 0 && len(res) >= n) { break } } - var err error - if len(res) == 0 { - err = io.EOF + if n > 0 { + if len(res) == 0 { + return nil, io.EOF + } + + if len(res) > n { + res = res[:n] + f.readdirLast = res[len(res)-1].Name() + } + } + + return res, nil +} + +func (f *FileReader) readdir() ([]os.FileInfo, int, error) { + req := &hdfs.GetListingRequestProto{ + Src: proto.String(f.name), + StartAfter: []byte(f.readdirLast), + NeedLocation: proto.Bool(false), + } + resp := &hdfs.GetListingResponseProto{} + + err := f.client.namenode.Execute("getListing", req, resp) + if err != nil { + if nnErr, ok := err.(*rpc.NamenodeError); ok { + err = interpretException(nnErr.Exception, err) + } + + return nil, 0, err + } else if resp.GetDirList() == nil { + return nil, 0, os.ErrNotExist + } + + list := resp.GetDirList().GetPartialListing() + res := make([]os.FileInfo, 0, len(list)) + for _, status := range list { + res = append(res, newFileInfo(status, "")) } - return res, err + remaining := int(resp.GetDirList().GetRemainingEntries()) + return res, remaining, nil } // Readdirnames reads and returns a slice of names from the directory f. diff --git a/file_reader_test.go b/file_reader_test.go index 5a60f123..85c109cc 100644 --- a/file_reader_test.go +++ b/file_reader_test.go @@ -243,7 +243,8 @@ func TestFileReadDirnames(t *testing.T) { func TestFileReadDirMany(t *testing.T) { client := getClient(t) - total := maxReadDir*5 + maxReadDir/2 + 35 + maxReadDir := 1000 // HDFS returns this many entries. + total := maxReadDir*2 + maxReadDir/2 + 35 firstBatch := maxReadDir + 71 mkdirp(t, "/_test/fulldir5") diff --git a/readdir.go b/readdir.go index 57cb50db..0f7c78e1 100644 --- a/readdir.go +++ b/readdir.go @@ -1,71 +1,17 @@ package hdfs -import ( - "os" - "path" - - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" - "github.com/golang/protobuf/proto" -) +import "os" // ReadDir reads the directory named by dirname and returns a list of sorted // directory entries. +// +// The os.FileInfo values returned will not have block location attached to +// the struct returned by Sys(). func (c *Client) ReadDir(dirname string) ([]os.FileInfo, error) { - return c.getDirList(dirname, "", 0) -} - -func (c *Client) getDirList(dirname string, after string, max int) ([]os.FileInfo, error) { - var res []os.FileInfo - last := after - for max <= 0 || len(res) < max { - partial, remaining, err := c.getPartialDirList(dirname, last) - if err != nil { - return nil, err - } - - res = append(res, partial...) - if remaining == 0 { - break - } else if len(partial) > 0 { - last = partial[len(partial)-1].Name() - } - } - - if max > 0 && len(res) > max { - res = res[:max] - } - - return res, nil -} - -func (c *Client) getPartialDirList(dirname string, after string) ([]os.FileInfo, int, error) { - dirname = path.Clean(dirname) - - req := &hdfs.GetListingRequestProto{ - Src: proto.String(dirname), - StartAfter: []byte(after), - NeedLocation: proto.Bool(true), - } - resp := &hdfs.GetListingResponseProto{} - - err := c.namenode.Execute("getListing", req, resp) + f, err := c.Open(dirname) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - - return nil, 0, &os.PathError{"readdir", dirname, err} - } else if resp.GetDirList() == nil { - return nil, 0, &os.PathError{"readdir", dirname, os.ErrNotExist} - } - - list := resp.GetDirList().GetPartialListing() - res := make([]os.FileInfo, 0, len(list)) - for _, status := range list { - res = append(res, newFileInfo(status, "")) + return nil, err } - remaining := int(resp.GetDirList().GetRemainingEntries()) - return res, remaining, nil + return f.Readdir(0) } diff --git a/readdir_test.go b/readdir_test.go index ddcb9404..2ab829fd 100644 --- a/readdir_test.go +++ b/readdir_test.go @@ -1,7 +1,6 @@ package hdfs import ( - "fmt" "os" "testing" @@ -35,19 +34,6 @@ func TestReadDir(t *testing.T) { assert.True(t, res[3].IsDir()) } -func TestReadDirMany(t *testing.T) { - client := getClient(t) - - mkdirp(t, "/_test/hugedir") - for i := 1; i <= 1000; i++ { - touch(t, fmt.Sprintf("/_test/hugedir/%d", i)) - } - - res, err := client.ReadDir("/_test/hugedir") - require.NoError(t, err) - require.Equal(t, len(res), 1000) -} - func TestReadDirTrailingSlash(t *testing.T) { client := getClient(t) @@ -91,7 +77,7 @@ func TestReadDirNonexistent(t *testing.T) { baleet(t, "/_test/nonexistent") res, err := client.ReadDir("/_test/nonexistent") - assertPathError(t, err, "readdir", "/_test/nonexistent", os.ErrNotExist) + assertPathError(t, err, "open", "/_test/nonexistent", os.ErrNotExist) assert.Nil(t, res) } From 69a345e27d020bf9c748b051483eec3bfd554a77 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 23 Jul 2018 13:34:38 +0200 Subject: [PATCH 018/159] Scale down TestAppendRepeatedly Twenty appends still catch the problem, and it was by far the slowest test. --- file_writer_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_writer_test.go b/file_writer_test.go index b17708c6..1365c7aa 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -372,7 +372,7 @@ func TestFileAppendRepeatedly(t *testing.T) { require.NoError(t, err) expected := "foo" - for i := 0; i < 100; i++ { + for i := 0; i < 20; i++ { writer, err = client.Append("/_test/append/4.txt") // This represents a bug in the HDFS append implementation, as far as I can tell, From 5aa22e7a96a71564ac0b5b5e288e81911cb50a2a Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 23 Jul 2018 13:58:16 +0200 Subject: [PATCH 019/159] Prevent a data race reading ack errors --- rpc/block_write_stream.go | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/rpc/block_write_stream.go b/rpc/block_write_stream.go index bcdc6c83..6dbe0365 100644 --- a/rpc/block_write_stream.go +++ b/rpc/block_write_stream.go @@ -94,8 +94,8 @@ func (s *blockWriteStream) Write(b []byte) (int, error) { return 0, io.ErrClosedPipe } - if s.ackError != nil { - return 0, s.ackError + if err := s.getAckError(); err != nil { + return 0, err } n, _ := s.buf.Write(b) @@ -111,8 +111,8 @@ func (s *blockWriteStream) finish() error { } s.closed = true - if s.ackError != nil { - return s.ackError + if err := s.getAckError(); err != nil { + return err } err := s.flush(true) @@ -135,10 +135,12 @@ func (s *blockWriteStream) finish() error { } close(s.packets) - // Check one more time for any ack errors. + // Wait for the ack loop to finish. <-s.acksDone - if s.ackError != nil { - return s.ackError + + // Check one more time for any ack errors. + if err := s.getAckError(); err != nil { + return err } return nil @@ -148,6 +150,10 @@ func (s *blockWriteStream) finish() error { // the datanode. We keep around a reference to the packet, in case the ack // fails, and we need to send it again later. func (s *blockWriteStream) flush(force bool) error { + if err := s.getAckError(); err != nil { + return err + } + for s.buf.Len() > 0 && (force || s.buf.Len() >= outboundPacketSize) { packet := s.makePacket() s.packets <- packet @@ -248,6 +254,18 @@ func (s *blockWriteStream) ackPackets() { } } +func (s *blockWriteStream) getAckError() error { + select { + case <-s.acksDone: + if s.ackError != nil { + return s.ackError + } + default: + } + + return nil +} + // A packet for the datanode: // +-----------------------------------------------------------+ // | uint32 length of the packet | From 0f6f79b3cbe5607c4cf27f5c6361ac82cca4c110 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 23 Jul 2018 14:46:07 +0200 Subject: [PATCH 020/159] Remove the check for HADOOP_USER_NAME in New, and deprecate Username Relying on env variables in a library is surprising and janky. The ability to specify HADOOP_USER_NAME was only added so that the cross-compiled commandline client could still work (see #18); that functionality is maintained here. Although this may break some existing implementations, the fix is quite simple. --- client.go | 39 ++++++++++++++++++--------------------- cmd/hdfs/main.go | 35 ++++++++++++++++++++++++++--------- 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/client.go b/client.go index 964e6fa8..9f812dd7 100644 --- a/client.go +++ b/client.go @@ -38,22 +38,6 @@ func ClientOptionsFromConf(conf HadoopConf) (ClientOptions, error) { return ClientOptions{Addresses: namenodes}, err } -// Username returns the value of HADOOP_USER_NAME in the environment, or -// the current system user if it is not set. -func Username() (string, error) { - username := os.Getenv("HADOOP_USER_NAME") - if username != "" { - return username, nil - } - - currentUser, err := user.Current() - if err != nil { - return "", err - } - - return currentUser.Username, nil -} - // NewClient returns a connected Client for the given options, or an error if // the client could not be created. func NewClient(options ClientOptions) (*Client, error) { @@ -75,10 +59,9 @@ func NewClient(options ClientOptions) (*Client, error) { } // New returns a connected Client, or an error if it can't connect. The user -// will be the current system user, or HADOOP_USER_NAME if set. Any relevant -// options (including the address(es) of the namenode(s), if an empty string is -// passed) will be loaded from the Hadoop configuration present at -// HADOOP_CONF_DIR or the default location. +// will be the current system user. Any relevantoptions (including the +// address(es) of the namenode(s), if an empty string is passed) will be loaded +// from the Hadoop configuration present at HADOOP_CONF_DIR. func New(address string) (*Client, error) { conf := LoadHadoopConf("") options, err := ClientOptionsFromConf(conf) @@ -90,11 +73,12 @@ func New(address string) (*Client, error) { options.Addresses = strings.Split(address, ",") } - options.User, err = Username() + u, err := user.Current() if err != nil { return nil, err } + options.User = u.Username return NewClient(options) } @@ -187,3 +171,16 @@ func (c *Client) fetchDefaults() (*hdfs.FsServerDefaultsProto, error) { func (c *Client) Close() error { return c.namenode.Close() } + +// Username returns the current system user if it is not set. +// +// Deprecated: just use user.Current. Previous versions of this function would +// check the env variable HADOOP_USER_NAME; this functionality was removed. +func Username() (string, error) { + currentUser, err := user.Current() + if err != nil { + return "", err + } + + return currentUser.Username, nil +} diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go index 3411af34..015cdc13 100755 --- a/cmd/hdfs/main.go +++ b/cmd/hdfs/main.go @@ -74,8 +74,8 @@ Valid commands: dfOpts = getopt.New() dfh = dfOpts.Bool('h') - cachedClient *hdfs.Client - status = 0 + cachedClients map[string]*hdfs.Client = make(map[string]*hdfs.Client) + status = 0 ) func init() { @@ -170,23 +170,40 @@ func fatalWithUsage(msg ...interface{}) { } func getClient(namenode string) (*hdfs.Client, error) { - if cachedClient != nil { - return cachedClient, nil + if cachedClients[namenode] != nil { + return cachedClients[namenode], nil } if namenode == "" { namenode = os.Getenv("HADOOP_NAMENODE") } - if namenode == "" && os.Getenv("HADOOP_CONF_DIR") == "" { + // Ignore errors here, since we don't care if the conf doesn't exist if the + // namenode was specified. + conf := hdfs.LoadHadoopConf("") + options, _ := hdfs.ClientOptionsFromConf(conf) + if namenode != "" { + options.Addresses = []string{namenode} + } + + if options.Addresses == nil { return nil, errors.New("Couldn't find a namenode to connect to. You should specify hdfs://: in your paths. Alternatively, set HADOOP_NAMENODE or HADOOP_CONF_DIR in your environment.") } - c, err := hdfs.New(namenode) + var err error + options.User = os.Getenv("HADOOP_USER_NAME") + if options.User == "" { + options.User, err = hdfs.Username() + if err != nil { + return nil, fmt.Errorf("Couldn't determine user: %s", err) + } + } + + c, err := hdfs.NewClient(options) if err != nil { - return nil, err + return nil, fmt.Errorf("Couldn't connect to namenode: %s", err) } - cachedClient = c - return cachedClient, nil + cachedClients[namenode] = c + return c, nil } From 07a931ea7bcf4e01be820a51faa33fa0b3b2b019 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 23 Jul 2018 17:36:42 +0200 Subject: [PATCH 021/159] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..e58da742 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at colinmarc@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ From 61c76045d673a9a367ac295ab7aea3cbdcbc0f4a Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sun, 29 Jul 2018 13:47:21 +0200 Subject: [PATCH 022/159] Revert "use HostName instead of IpAddr for multi-homed HDFS" This reverts commit a79e6ee0b3bbe52cc536cab9fbadf0dd83e76f43. --- rpc/checksum_reader.go | 2 +- rpc/rpc.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc/checksum_reader.go b/rpc/checksum_reader.go index 5672c4a2..b737373b 100644 --- a/rpc/checksum_reader.go +++ b/rpc/checksum_reader.go @@ -29,7 +29,7 @@ func NewChecksumReader(block *hdfs.LocatedBlockProto) *ChecksumReader { datanodes := make([]string, len(locs)) for i, loc := range locs { dn := loc.GetId() - datanodes[i] = fmt.Sprintf("%s:%d", dn.GetHostName(), dn.GetXferPort()) + datanodes[i] = fmt.Sprintf("%s:%d", dn.GetIpAddr(), dn.GetXferPort()) } return &ChecksumReader{ diff --git a/rpc/rpc.go b/rpc/rpc.go index eb79778d..65ae2a4e 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -156,5 +156,5 @@ func readBlockOpResponse(r io.Reader) (*hdfs.BlockOpResponseProto, error) { func getDatanodeAddress(datanode *hdfs.DatanodeInfoProto) string { id := datanode.GetId() - return fmt.Sprintf("%s:%d", id.GetHostName(), id.GetXferPort()) + return fmt.Sprintf("%s:%d", id.GetIpAddr(), id.GetXferPort()) } From e6b4e82cc8f84b7959c8182508f39d66816b37c2 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 30 Jul 2018 13:07:39 +0200 Subject: [PATCH 023/159] Add UseDatanodeHostname option, refactor BlockWriter and BlockReader This adds the ability to specify whether the datanodes should be connected to via hostname or IP address, rather than hardcoding IP address. To achieve this, the way BlockReaders and BlockWriters were created had to be refactored; the New* methods are now deprecated, and the structs are created manually. I think this is much cleaner, and will make future changes easier. One additional change was to move block finalization into FileWriter and out of BlockWriter (since it involves communication with the namenode, that was an odd place for it). --- client.go | 23 +++++++-- file_reader.go | 8 ++- file_writer.go | 70 ++++++++++++++++++++------ rpc/block_reader.go | 64 ++++++++++++++---------- rpc/block_writer.go | 109 ++++++++++++++++++----------------------- rpc/checksum_reader.go | 39 +++++++++------ rpc/rpc.go | 12 +++-- 7 files changed, 199 insertions(+), 126 deletions(-) diff --git a/client.go b/client.go index 9f812dd7..1a928716 100644 --- a/client.go +++ b/client.go @@ -15,6 +15,7 @@ import ( type Client struct { namenode *rpc.NamenodeConnection defaults *hdfs.FsServerDefaultsProto + options ClientOptions } // ClientOptions represents the configurable options for a client. @@ -27,15 +28,29 @@ type ClientOptions struct { // is useful if you needed to create the namenode net.Conn manually for // whatever reason. Namenode *rpc.NamenodeConnection + // UseDatanodeHostname specifies whether the client should connect to the + // datanodes via hostname (which is useful in multi-homed setups) or IP + // address, which may be required if DNS isn't available. + UseDatanodeHostname bool } // ClientOptionsFromConf attempts to load any relevant configuration options // from the given Hadoop configuration and create a ClientOptions struct -// suitable for creating a Client. Currently this is restricted to the namenode -// address(es), but may be expanded in the future. +// suitable for creating a Client. Currently this sets the following fields +// on the resulting ClientOptions: +// +// // Determined by fs.defaultFS (or the deprecated fs.default.name), or +// // fields beginning with dfs.namenode.rpc-address. +// Addresses []string +// +// // Determined by dfs.client.use.datanode.hostname. +// UseDatanodeHostname bool func ClientOptionsFromConf(conf HadoopConf) (ClientOptions, error) { namenodes, err := conf.Namenodes() - return ClientOptions{Addresses: namenodes}, err + options := ClientOptions{Addresses: namenodes} + + options.UseDatanodeHostname = (conf["dfs.client.use.datanode.hostname"] == "true") + return options, err } // NewClient returns a connected Client for the given options, or an error if @@ -55,7 +70,7 @@ func NewClient(options ClientOptions) (*Client, error) { } } - return &Client{namenode: options.Namenode}, nil + return &Client{namenode: options.Namenode, options: options}, nil } // New returns a connected Client, or an error if it can't connect. The user diff --git a/file_reader.go b/file_reader.go index 0b8f8355..df9ff828 100644 --- a/file_reader.go +++ b/file_reader.go @@ -378,9 +378,13 @@ func (f *FileReader) getNewBlockReader() error { end := start + block.GetB().GetNumBytes() if start <= off && off < end { - br := rpc.NewBlockReader(block, int64(off-start), f.client.namenode.ClientName()) + f.blockReader = &rpc.BlockReader{ + ClientName: f.client.namenode.ClientName(), + Block: block, + Offset: int64(off - start), + UseDatanodeHostname: f.client.options.UseDatanodeHostname, + } - f.blockReader = br return nil } } diff --git a/file_writer.go b/file_writer.go index 5087a8d0..ecc1f931 100644 --- a/file_writer.go +++ b/file_writer.go @@ -18,7 +18,6 @@ type FileWriter struct { replication int blockSize int64 - block *hdfs.LocatedBlockProto blockWriter *rpc.BlockWriter closed bool } @@ -123,11 +122,25 @@ func (c *Client) Append(name string) (*FileWriter, error) { replication: int(appendResp.Stat.GetBlockReplication()), blockSize: int64(appendResp.Stat.GetBlocksize()), } + if len(blocks) == 0 { return f, nil } - f.block = blocks[len(blocks)-1] - f.blockWriter = rpc.NewBlockWriter(f.block, c.namenode, f.blockSize) + + lastBlock := blocks[len(blocks)-1] + lastBlockSize := int64(lastBlock.GetB().GetNumBytes()) + if lastBlockSize == 0 || lastBlockSize == f.blockSize { + return f, nil + } + + f.blockWriter = &rpc.BlockWriter{ + ClientName: f.client.namenode.ClientName(), + Block: lastBlock, + BlockSize: f.blockSize, + Offset: int64(lastBlock.B.GetNumBytes()), + Append: true, + } + return f, nil } @@ -199,13 +212,13 @@ func (f *FileWriter) Close() error { var lastBlock *hdfs.ExtendedBlockProto if f.blockWriter != nil { + lastBlock = f.blockWriter.Block.GetB() + // Close the blockWriter, flushing any buffered packets. - err := f.blockWriter.Close() + err := f.finalizeBlock() if err != nil { return err } - - lastBlock = f.block.GetB() } completeReq := &hdfs.CompleteRequestProto{ @@ -224,18 +237,17 @@ func (f *FileWriter) Close() error { } func (f *FileWriter) startNewBlock() error { - // TODO: we don't need to wait for previous blocks to ack before continuing - + var previous *hdfs.ExtendedBlockProto if f.blockWriter != nil { - err := f.blockWriter.Close() + previous = f.blockWriter.Block.GetB() + + // TODO: We don't actually need to wait for previous blocks to ack before + // continuing. + err := f.finalizeBlock() if err != nil { return err } } - var previous *hdfs.ExtendedBlockProto - if f.block != nil { - previous = f.block.GetB() - } addBlockReq := &hdfs.AddBlockRequestProto{ Src: proto.String(f.name), @@ -253,7 +265,35 @@ func (f *FileWriter) startNewBlock() error { return &os.PathError{"create", f.name, err} } - f.block = addBlockResp.GetBlock() - f.blockWriter = rpc.NewBlockWriter(f.block, f.client.namenode, f.blockSize) + f.blockWriter = &rpc.BlockWriter{ + ClientName: f.client.namenode.ClientName(), + Block: addBlockResp.GetBlock(), + BlockSize: f.blockSize, + } + + return nil +} + +func (f *FileWriter) finalizeBlock() error { + err := f.blockWriter.Close() + if err != nil { + return err + } + + // Finalize the block on the namenode. + lastBlock := f.blockWriter.Block.GetB() + lastBlock.NumBytes = proto.Uint64(uint64(f.blockWriter.Offset)) + updateReq := &hdfs.UpdateBlockForPipelineRequestProto{ + Block: lastBlock, + ClientName: proto.String(f.client.namenode.ClientName()), + } + updateResp := &hdfs.UpdateBlockForPipelineResponseProto{} + + err = f.client.namenode.Execute("updateBlockForPipeline", updateReq, updateResp) + if err != nil { + return err + } + + f.blockWriter = nil return nil } diff --git a/rpc/block_reader.go b/rpc/block_reader.go index 37f7803c..b8bc5761 100644 --- a/rpc/block_reader.go +++ b/rpc/block_reader.go @@ -16,30 +16,34 @@ import ( // reading from multiple datanodes, in order to be robust to connection // failures, timeouts, and other shenanigans. type BlockReader struct { - clientName string - block *hdfs.LocatedBlockProto - datanodes *datanodeFailover - stream *blockReadStream - conn net.Conn - offset int64 - closed bool + // ClientName is the unique ID used by the NamenodeConnection to locate the + // block. + ClientName string + // Block is the block location provided by the namenode. + Block *hdfs.LocatedBlockProto + // Offset is the current read offset in the block. + Offset int64 + // UseDatanodeHostname specifies whether the datanodes should be connected to + // via their hostnames (if true) or IP addresses (if false). + UseDatanodeHostname bool + + datanodes *datanodeFailover + stream *blockReadStream + conn net.Conn + closed bool } // NewBlockReader returns a new BlockReader, given the block information and // security token from the namenode. It will connect (lazily) to one of the // provided datanode locations based on which datanodes have seen failures. +// +// Deprecated: this method does not do any required initialization, and does +// not allow you to set fields such as UseDatanodeHostname. func NewBlockReader(block *hdfs.LocatedBlockProto, offset int64, clientName string) *BlockReader { - locs := block.GetLocs() - datanodes := make([]string, len(locs)) - for i, loc := range locs { - datanodes[i] = getDatanodeAddress(loc) - } - return &BlockReader{ - clientName: clientName, - block: block, - datanodes: newDatanodeFailover(datanodes), - offset: offset, + ClientName: clientName, + Block: block, + Offset: offset, } } @@ -55,11 +59,21 @@ func NewBlockReader(block *hdfs.LocatedBlockProto, offset int64, clientName stri func (br *BlockReader) Read(b []byte) (int, error) { if br.closed { return 0, io.ErrClosedPipe - } else if uint64(br.offset) >= br.block.GetB().GetNumBytes() { + } else if uint64(br.Offset) >= br.Block.GetB().GetNumBytes() { br.Close() return 0, io.EOF } + if br.datanodes == nil { + locs := br.Block.GetLocs() + datanodes := make([]string, len(locs)) + for i, loc := range locs { + datanodes[i] = getDatanodeAddress(loc.GetId(), br.UseDatanodeHostname) + } + + br.datanodes = newDatanodeFailover(datanodes) + } + // This is the main retry loop. for br.stream != nil || br.datanodes.numRemaining() > 0 { // First, we try to connect. If this fails, we can just skip the datanode @@ -75,7 +89,7 @@ func (br *BlockReader) Read(b []byte) (int, error) { // Then, try to read. If we fail here after reading some bytes, we return // a partial read (n < len(b)). n, err := br.stream.Read(b) - br.offset += int64(n) + br.Offset += int64(n) if err != nil && err != io.EOF { br.stream = nil br.datanodes.recordFailure(err) @@ -148,7 +162,7 @@ func (br *BlockReader) connectNext() error { // The read will start aligned to a chunk boundary, so we need to seek forward // to the requested offset. - amountToDiscard := br.offset - int64(readInfo.GetChunkOffset()) + amountToDiscard := br.Offset - int64(readInfo.GetChunkOffset()) if amountToDiscard > 0 { _, err := io.CopyN(ioutil.Discard, stream, amountToDiscard) if err != nil { @@ -175,16 +189,16 @@ func (br *BlockReader) connectNext() error { // | varint length + OpReadBlockProto | // +-----------------------------------------------------------+ func (br *BlockReader) writeBlockReadRequest(w io.Writer) error { - needed := br.block.GetB().GetNumBytes() - uint64(br.offset) + needed := br.Block.GetB().GetNumBytes() - uint64(br.Offset) op := &hdfs.OpReadBlockProto{ Header: &hdfs.ClientOperationHeaderProto{ BaseHeader: &hdfs.BaseHeaderProto{ - Block: br.block.GetB(), - Token: br.block.GetBlockToken(), + Block: br.Block.GetB(), + Token: br.Block.GetBlockToken(), }, - ClientName: proto.String(br.clientName), + ClientName: proto.String(br.ClientName), }, - Offset: proto.Uint64(uint64(br.offset)), + Offset: proto.Uint64(uint64(br.Offset)), Len: proto.Uint64(needed), } diff --git a/rpc/block_writer.go b/rpc/block_writer.go index 40b97ab2..967b4dd6 100644 --- a/rpc/block_writer.go +++ b/rpc/block_writer.go @@ -10,42 +10,46 @@ import ( "github.com/golang/protobuf/proto" ) -var ErrEndOfBlock = errors.New("The amount of data to be written is more than is left in the block.") +var ErrEndOfBlock = errors.New("the amount of data to be written is more than is left in the block.") // BlockWriter implements io.WriteCloser for writing a block to a datanode. // Given a block location, it handles pipeline construction and failures, // including communicating with the namenode if need be. type BlockWriter struct { - clientName string - block *hdfs.LocatedBlockProto - blockSize int64 - - namenode *NamenodeConnection - conn net.Conn - stream *blockWriteStream - offset int64 - closed bool - append bool + // ClientName is the unique ID used by the NamenodeConnection to initialize + // the block. + ClientName string + // Block is the block location provided by the namenode. + Block *hdfs.LocatedBlockProto + // BlockSize is the target size of the new block (or the existing one, if + // appending). The represents the configured value, not the actual number + // of bytes currently in the block. + BlockSize int64 + // Offset is the current write offset in the block. + Offset int64 + // Append indicates whether this is an append operation on an existing block. + Append bool + // UseDatanodeHostname indicates whether the datanodes will be connected to + // via hostname (if true) or IP address (if false). + UseDatanodeHostname bool + + conn net.Conn + stream *blockWriteStream + closed bool } // NewBlockWriter returns a BlockWriter for the given block. It will lazily // set up a replication pipeline, and connect to the "best" datanode based on // any previously seen failures. +// +// Deprecated: this method does not do any required initialization, and does +// not allow you to set fields such as UseDatanodeHostname. func NewBlockWriter(block *hdfs.LocatedBlockProto, namenode *NamenodeConnection, blockSize int64) *BlockWriter { - bw := &BlockWriter{ - clientName: namenode.ClientName(), - block: block, - blockSize: blockSize, - namenode: namenode, - } - - if o := block.B.GetNumBytes(); o > 0 { - // The block already contains data; we are appending. - bw.offset = int64(o) - bw.append = true + return &BlockWriter{ + ClientName: namenode.ClientName(), + Block: block, + BlockSize: blockSize, } - - return bw } // Write implements io.Writer. @@ -57,11 +61,11 @@ func NewBlockWriter(block *hdfs.LocatedBlockProto, namenode *NamenodeConnection, // This will hopefully be fixed in a future release. func (bw *BlockWriter) Write(b []byte) (int, error) { var blockFull bool - if bw.offset >= bw.blockSize { + if bw.Offset >= bw.BlockSize { return 0, ErrEndOfBlock - } else if (bw.offset + int64(len(b))) > bw.blockSize { + } else if (bw.Offset + int64(len(b))) > bw.BlockSize { blockFull = true - b = b[:bw.blockSize-bw.offset] + b = b[:bw.BlockSize-bw.Offset] } if bw.stream == nil { @@ -74,7 +78,7 @@ func (bw *BlockWriter) Write(b []byte) (int, error) { // TODO: handle failures, set up recovery pipeline n, err := bw.stream.Write(b) - bw.offset += int64(n) + bw.Offset += int64(n) if err == nil && blockFull { err = ErrEndOfBlock } @@ -92,7 +96,8 @@ func (bw *BlockWriter) Flush() error { } // Close implements io.Closer. It flushes any unwritten packets out to the -// datanode, and sends a final packet indicating the end of the block. +// datanode, and sends a final packet indicating the end of the block. The +// block must still be finalized with the namenode. func (bw *BlockWriter) Close() error { bw.closed = true if bw.conn != nil { @@ -105,19 +110,13 @@ func (bw *BlockWriter) Close() error { if err != nil { return err } - - // We need to tell the namenode what the final block length is. - err = bw.finalizeBlock(bw.offset) - if err != nil { - return err - } } return nil } func (bw *BlockWriter) connectNext() error { - address := getDatanodeAddress(bw.currentPipeline()[0]) + address := getDatanodeAddress(bw.currentPipeline()[0].GetId(), bw.UseDatanodeHostname) conn, err := net.DialTimeout("tcp", address, connectTimeout) if err != nil { @@ -137,7 +136,7 @@ func (bw *BlockWriter) connectNext() error { } bw.conn = conn - bw.stream = newBlockWriteStream(conn, bw.offset) + bw.stream = newBlockWriteStream(conn, bw.Offset) return nil } @@ -156,39 +155,25 @@ func (bw *BlockWriter) currentPipeline() []*hdfs.DatanodeInfoProto { // // return targets - return bw.block.GetLocs() + return bw.Block.GetLocs() } func (bw *BlockWriter) currentStage() hdfs.OpWriteBlockProto_BlockConstructionStage { // TODO: this should be PIPELINE_SETUP_STREAMING_RECOVERY or // PIPELINE_SETUP_APPEND_RECOVERY for recovery. - if bw.append { + if bw.Append { return hdfs.OpWriteBlockProto_PIPELINE_SETUP_APPEND } + return hdfs.OpWriteBlockProto_PIPELINE_SETUP_CREATE } func (bw *BlockWriter) generationTimestamp() int64 { - if bw.append { - return int64(bw.block.B.GetGenerationStamp()) + if bw.Append { + return int64(bw.Block.B.GetGenerationStamp()) } - return 0 -} - -func (bw *BlockWriter) finalizeBlock(length int64) error { - bw.block.GetB().NumBytes = proto.Uint64(uint64(length)) - updateReq := &hdfs.UpdateBlockForPipelineRequestProto{ - Block: bw.block.GetB(), - ClientName: proto.String(bw.clientName), - } - updateResp := &hdfs.UpdateBlockForPipelineResponseProto{} - err := bw.namenode.Execute("updateBlockForPipeline", updateReq, updateResp) - if err != nil { - return err - } - - return nil + return 0 } // writeBlockWriteRequest creates an OpWriteBlock message and submits it to the @@ -208,16 +193,16 @@ func (bw *BlockWriter) writeBlockWriteRequest(w io.Writer) error { op := &hdfs.OpWriteBlockProto{ Header: &hdfs.ClientOperationHeaderProto{ BaseHeader: &hdfs.BaseHeaderProto{ - Block: bw.block.GetB(), - Token: bw.block.GetBlockToken(), + Block: bw.Block.GetB(), + Token: bw.Block.GetBlockToken(), }, - ClientName: proto.String(bw.clientName), + ClientName: proto.String(bw.ClientName), }, Targets: targets, Stage: bw.currentStage().Enum(), PipelineSize: proto.Uint32(uint32(len(targets))), - MinBytesRcvd: proto.Uint64(bw.block.GetB().GetNumBytes()), - MaxBytesRcvd: proto.Uint64(uint64(bw.offset)), + MinBytesRcvd: proto.Uint64(bw.Block.GetB().GetNumBytes()), + MaxBytesRcvd: proto.Uint64(uint64(bw.Offset)), LatestGenerationStamp: proto.Uint64(uint64(bw.generationTimestamp())), RequestedChecksum: &hdfs.ChecksumProto{ Type: hdfs.ChecksumTypeProto_CHECKSUM_CRC32.Enum(), diff --git a/rpc/checksum_reader.go b/rpc/checksum_reader.go index b737373b..bcc2ccd9 100644 --- a/rpc/checksum_reader.go +++ b/rpc/checksum_reader.go @@ -4,7 +4,6 @@ import ( "bufio" "encoding/binary" "errors" - "fmt" "io" "net" @@ -16,30 +15,40 @@ import ( // individual blocks. It abstracts over reading from multiple datanodes, in // order to be robust to failures. type ChecksumReader struct { - block *hdfs.LocatedBlockProto - datanodes *datanodeFailover + // Block is the block location provided by the namenode. + Block *hdfs.LocatedBlockProto + // UseDatanodeHostname specifies whether the datanodes should be connected to + // via their hostnames (if true) or IP addresses (if false). + UseDatanodeHostname bool - conn net.Conn - reader *bufio.Reader + datanodes *datanodeFailover + conn net.Conn + reader *bufio.Reader } // NewChecksumReader creates a new ChecksumReader for the given block. +// +// Deprecated: this method does not do any required initialization, and does +// not allow you to set fields such as UseDatanodeHostname. func NewChecksumReader(block *hdfs.LocatedBlockProto) *ChecksumReader { - locs := block.GetLocs() - datanodes := make([]string, len(locs)) - for i, loc := range locs { - dn := loc.GetId() - datanodes[i] = fmt.Sprintf("%s:%d", dn.GetIpAddr(), dn.GetXferPort()) - } - return &ChecksumReader{ - block: block, - datanodes: newDatanodeFailover(datanodes), + Block: block, } } // ReadChecksum returns the checksum of the block. func (cr *ChecksumReader) ReadChecksum() ([]byte, error) { + if cr.datanodes == nil { + locs := cr.Block.GetLocs() + datanodes := make([]string, len(locs)) + for i, loc := range locs { + dn := loc.GetId() + datanodes[i] = getDatanodeAddress(dn, cr.UseDatanodeHostname) + } + + cr.datanodes = newDatanodeFailover(datanodes) + } + for cr.datanodes.numRemaining() > 0 { address := cr.datanodes.next() checksum, err := cr.readChecksum(address) @@ -91,7 +100,7 @@ func (cr *ChecksumReader) readChecksum(address string) ([]byte, error) { func (cr *ChecksumReader) writeBlockChecksumRequest() error { header := []byte{0x00, dataTransferVersion, checksumBlockOp} - op := newChecksumBlockOp(cr.block) + op := newChecksumBlockOp(cr.Block) opBytes, err := makePrefixedMessage(op) if err != nil { return err diff --git a/rpc/rpc.go b/rpc/rpc.go index 65ae2a4e..8621449e 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -154,7 +154,13 @@ func readBlockOpResponse(r io.Reader) (*hdfs.BlockOpResponseProto, error) { return resp, err } -func getDatanodeAddress(datanode *hdfs.DatanodeInfoProto) string { - id := datanode.GetId() - return fmt.Sprintf("%s:%d", id.GetIpAddr(), id.GetXferPort()) +func getDatanodeAddress(datanode *hdfs.DatanodeIDProto, useHostname bool) string { + var host string + if useHostname { + host = datanode.GetHostName() + } else { + host = datanode.GetIpAddr() + } + + return fmt.Sprintf("%s:%d", host, datanode.GetXferPort()) } From 6a9f7d2420257181e468db6309bfb5b1403bf5b9 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 30 Jul 2018 16:44:17 +0200 Subject: [PATCH 024/159] Actually pass through UseDatanodeHostname everywhere --- file_reader.go | 5 ++++- file_writer.go | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/file_reader.go b/file_reader.go index df9ff828..3b9925ee 100644 --- a/file_reader.go +++ b/file_reader.go @@ -84,7 +84,10 @@ func (f *FileReader) Checksum() ([]byte, error) { totalLength := 0 checksum := md5.New() for _, block := range f.blocks { - cr := rpc.NewChecksumReader(block) + cr := &ChecksumReader{ + Block: block, + UseDatanodeHostname: f.client.options.UseDatanodeHostname, + } blockChecksum, err := cr.ReadChecksum() if err != nil { diff --git a/file_writer.go b/file_writer.go index ecc1f931..5add3b0a 100644 --- a/file_writer.go +++ b/file_writer.go @@ -134,11 +134,12 @@ func (c *Client) Append(name string) (*FileWriter, error) { } f.blockWriter = &rpc.BlockWriter{ - ClientName: f.client.namenode.ClientName(), - Block: lastBlock, - BlockSize: f.blockSize, - Offset: int64(lastBlock.B.GetNumBytes()), - Append: true, + ClientName: f.client.namenode.ClientName(), + Block: lastBlock, + BlockSize: f.blockSize, + Offset: int64(lastBlock.B.GetNumBytes()), + Append: true, + UseDatanodeHostname: f.client.options.UseDatanodeHostname, } return f, nil @@ -266,9 +267,10 @@ func (f *FileWriter) startNewBlock() error { } f.blockWriter = &rpc.BlockWriter{ - ClientName: f.client.namenode.ClientName(), - Block: addBlockResp.GetBlock(), - BlockSize: f.blockSize, + ClientName: f.client.namenode.ClientName(), + Block: addBlockResp.GetBlock(), + BlockSize: f.blockSize, + UseDatanodeHostname: f.client.options.UseDatanodeHostname, } return nil From 39205ed91794bb1f89bba6f8f20eb21895006ff5 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 30 Jul 2018 17:44:25 +0200 Subject: [PATCH 025/159] Fix typo --- file_reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_reader.go b/file_reader.go index 3b9925ee..8de6c0af 100644 --- a/file_reader.go +++ b/file_reader.go @@ -84,7 +84,7 @@ func (f *FileReader) Checksum() ([]byte, error) { totalLength := 0 checksum := md5.New() for _, block := range f.blocks { - cr := &ChecksumReader{ + cr := &rpc.ChecksumReader{ Block: block, UseDatanodeHostname: f.client.options.UseDatanodeHostname, } From f1b439fb4c45b7c21b396bd521ec69df5877eee2 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 30 Jul 2018 17:44:40 +0200 Subject: [PATCH 026/159] Improve a bunch of error messages --- file_reader.go | 6 +++--- remove.go | 2 +- rpc/block_read_stream.go | 2 +- rpc/block_reader.go | 6 +++--- rpc/block_write_stream.go | 2 +- rpc/block_writer.go | 4 ++-- rpc/namenode.go | 4 ++-- stat_fs.go | 22 +++++++++------------- 8 files changed, 22 insertions(+), 26 deletions(-) diff --git a/file_reader.go b/file_reader.go index 8de6c0af..4ebabf52 100644 --- a/file_reader.go +++ b/file_reader.go @@ -121,11 +121,11 @@ func (f *FileReader) Seek(offset int64, whence int) (int64, error) { } else if whence == 2 { off = f.info.Size() + offset } else { - return f.offset, fmt.Errorf("Invalid whence: %d", whence) + return f.offset, fmt.Errorf("invalid whence: %d", whence) } if off < 0 || off > f.info.Size() { - return f.offset, fmt.Errorf("Invalid resulting offset: %d", off) + return f.offset, fmt.Errorf("invalid resulting offset: %d", off) } if f.offset != off { @@ -392,5 +392,5 @@ func (f *FileReader) getNewBlockReader() error { } } - return fmt.Errorf("Couldn't find block for offset: %d", off) + return errors.New("invalid offset") } diff --git a/remove.go b/remove.go index 12c088dc..c6f87b3f 100644 --- a/remove.go +++ b/remove.go @@ -33,7 +33,7 @@ func (c *Client) Remove(name string) error { return &os.PathError{ "remove", name, - errors.New("Unexpected empty response to 'delete' rpc call"), + errors.New("unexpected empty response"), } } diff --git a/rpc/block_read_stream.go b/rpc/block_read_stream.go index 46be8d7c..26ccc4ee 100644 --- a/rpc/block_read_stream.go +++ b/rpc/block_read_stream.go @@ -12,7 +12,7 @@ import ( "github.com/golang/protobuf/proto" ) -var errInvalidChecksum = errors.New("Invalid checksum") +var errInvalidChecksum = errors.New("invalid checksum") // blockReadStream implements io.Reader for reading a packet stream for a single // block from a single datanode. diff --git a/rpc/block_reader.go b/rpc/block_reader.go index b8bc5761..47ac41a6 100644 --- a/rpc/block_reader.go +++ b/rpc/block_reader.go @@ -105,7 +105,7 @@ func (br *BlockReader) Read(b []byte) (int, error) { err := br.datanodes.lastError() if err == nil { - err = errors.New("No available datanodes for block.") + err = errors.New("no available datanodes") } return 0, err @@ -140,7 +140,7 @@ func (br *BlockReader) connectNext() error { if err != nil { return err } else if resp.GetStatus() != hdfs.Status_SUCCESS { - return fmt.Errorf("Error from datanode: %s (%s)", resp.GetStatus().String(), resp.GetMessage()) + return fmt.Errorf("read failed: %s (%s)", resp.GetStatus().String(), resp.GetMessage()) } readInfo := resp.GetReadOpChecksumInfo() @@ -154,7 +154,7 @@ func (br *BlockReader) connectNext() error { case hdfs.ChecksumTypeProto_CHECKSUM_CRC32C: checksumTab = crc32.MakeTable(crc32.Castagnoli) default: - return fmt.Errorf("Unsupported checksum type: %d", checksumType) + return fmt.Errorf("unsupported checksum type: %d", checksumType) } chunkSize := int(checksumInfo.GetBytesPerChecksum()) diff --git a/rpc/block_write_stream.go b/rpc/block_write_stream.go index 6dbe0365..20ae16c1 100644 --- a/rpc/block_write_stream.go +++ b/rpc/block_write_stream.go @@ -55,7 +55,7 @@ func (ae ackError) Error() string { return fmt.Sprintf("Ack error from datanode: %s", ae.status.String()) } -var ErrInvalidSeqno = errors.New("Invalid ack sequence number") +var ErrInvalidSeqno = errors.New("invalid ack sequence number") func newBlockWriteStream(conn io.ReadWriter, offset int64) *blockWriteStream { s := &blockWriteStream{ diff --git a/rpc/block_writer.go b/rpc/block_writer.go index 967b4dd6..ed6b7b2e 100644 --- a/rpc/block_writer.go +++ b/rpc/block_writer.go @@ -10,7 +10,7 @@ import ( "github.com/golang/protobuf/proto" ) -var ErrEndOfBlock = errors.New("the amount of data to be written is more than is left in the block.") +var ErrEndOfBlock = errors.New("end of block") // BlockWriter implements io.WriteCloser for writing a block to a datanode. // Given a block location, it handles pipeline construction and failures, @@ -132,7 +132,7 @@ func (bw *BlockWriter) connectNext() error { if err != nil { return err } else if resp.GetStatus() != hdfs.Status_SUCCESS { - return fmt.Errorf("Error from datanode: %s (%s)", resp.GetStatus().String(), resp.GetMessage()) + return fmt.Errorf("write failed: %s (%s)", resp.GetStatus().String(), resp.GetMessage()) } bw.conn = conn diff --git a/rpc/namenode.go b/rpc/namenode.go index e4f3de93..405f331f 100644 --- a/rpc/namenode.go +++ b/rpc/namenode.go @@ -133,7 +133,7 @@ func WrapNamenodeConnection(conn net.Conn, user string) (*NamenodeConnection, er err := c.writeNamenodeHandshake() if err != nil { conn.Close() - return nil, fmt.Errorf("Error performing handshake: %s", err) + return nil, fmt.Errorf("namenode handshake failed: %s", err) } return c, nil @@ -289,7 +289,7 @@ func (c *NamenodeConnection) readResponse(method string, resp proto.Message) err Exception: rrh.GetExceptionClassName(), } } else if int(rrh.GetCallId()) != c.currentRequestID { - return errors.New("Error reading response: unexpected sequence number") + return errors.New("unexpected sequence number") } return nil diff --git a/stat_fs.go b/stat_fs.go index 6734c3e3..4226ed30 100644 --- a/stat_fs.go +++ b/stat_fs.go @@ -1,14 +1,10 @@ package hdfs import ( - "errors" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/rpc" ) -var StatFsError = errors.New("Failed to get HDFS usage") - // FsInfo provides information about HDFS type FsInfo struct { Capacity uint64 @@ -23,7 +19,7 @@ type FsInfo struct { } func (c *Client) StatFs() (FsInfo, error) { - req := &hdfs.GetFsStatusRequestProto{} + req := &hdfs.GetFsStatusRequestProto{} resp := &hdfs.GetFsStatsResponseProto{} err := c.namenode.Execute("getFsStats", req, resp) @@ -35,14 +31,14 @@ func (c *Client) StatFs() (FsInfo, error) { } var fs FsInfo - fs.Capacity = resp.GetCapacity() - fs.Used = resp.GetUsed() - fs.Remaining = resp.GetRemaining() - fs.UnderReplicated = resp.GetUnderReplicated() - fs.CorruptBlocks = resp.GetCorruptBlocks() - fs.MissingBlocks = resp.GetMissingBlocks() - fs.MissingReplOneBlocks = resp.GetMissingReplOneBlocks() - fs.BlocksInFuture = resp.GetBlocksInFuture() + fs.Capacity = resp.GetCapacity() + fs.Used = resp.GetUsed() + fs.Remaining = resp.GetRemaining() + fs.UnderReplicated = resp.GetUnderReplicated() + fs.CorruptBlocks = resp.GetCorruptBlocks() + fs.MissingBlocks = resp.GetMissingBlocks() + fs.MissingReplOneBlocks = resp.GetMissingReplOneBlocks() + fs.BlocksInFuture = resp.GetBlocksInFuture() fs.PendingDeletionBlocks = resp.GetPendingDeletionBlocks() return fs, nil From c2175aab2814f2088c4ac1822c57716c4facde55 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 30 Jul 2018 16:42:22 +0200 Subject: [PATCH 027/159] Allow users to specify dialers to connect with This allows specifying connection timeouts, and also allows things like using SOCKS proxies. --- client.go | 33 +++++++++++++++++++++++++++++---- file_reader.go | 10 ++++++---- file_writer.go | 2 ++ rpc/block_reader.go | 10 +++++++++- rpc/block_writer.go | 10 +++++++++- rpc/checksum_reader.go | 10 +++++++++- rpc/namenode.go | 30 ++++++++++++++++++++++-------- rpc/rpc.go | 6 ------ 8 files changed, 86 insertions(+), 25 deletions(-) diff --git a/client.go b/client.go index 1a928716..219b1ffe 100644 --- a/client.go +++ b/client.go @@ -1,8 +1,10 @@ package hdfs import ( + "context" "io" "io/ioutil" + "net" "os" "os/user" "strings" @@ -19,19 +21,41 @@ type Client struct { } // ClientOptions represents the configurable options for a client. +// The NamenodeDialFunc and DatanodeDialFunc options can be used to set +// connection timeouts: +// +// dialFunc := (&net.Dialer{ +// Timeout: 30 * time.Second, +// KeepAlive: 30 * time.Second, +// DualStack: true, +// }).DialContext +// +// options := ClientOptions{ +// Addresses: []string{"nn1:9000"}, +// NamenodeDialFunc: dialFunc, +// DatanodeDialFunc: dialFunc, +// } type ClientOptions struct { // Addresses specifies the namenode(s) to connect to. Addresses []string // User specifies which HDFS user the client will act as. User string - // Namenode optionally specifies an existing NamenodeConnection to wrap. This - // is useful if you needed to create the namenode net.Conn manually for - // whatever reason. - Namenode *rpc.NamenodeConnection // UseDatanodeHostname specifies whether the client should connect to the // datanodes via hostname (which is useful in multi-homed setups) or IP // address, which may be required if DNS isn't available. UseDatanodeHostname bool + // NamenodeDialFunc is used to connect to the datanodes. If nil, then + // (&net.Dialer{}).DialContext is used. + NamenodeDialFunc func(ctx context.Context, network, addr string) (net.Conn, error) + // DatanodeDialFunc is used to connect to the datanodes. If nil, then + // (&net.Dialer{}).DialContext is used. + DatanodeDialFunc func(ctx context.Context, network, addr string) (net.Conn, error) + // Namenode optionally specifies an existing NamenodeConnection to wrap. This + // is useful if you needed to create the namenode net.Conn manually for + // whatever reason. + // + // Deprecated: use NamenodeDialFunc instead. + Namenode *rpc.NamenodeConnection } // ClientOptionsFromConf attempts to load any relevant configuration options @@ -63,6 +87,7 @@ func NewClient(options ClientOptions) (*Client, error) { rpc.NamenodeConnectionOptions{ Addresses: options.Addresses, User: options.User, + DialFunc: options.NamenodeDialFunc, }, ) if err != nil { diff --git a/file_reader.go b/file_reader.go index 4ebabf52..9b7d0185 100644 --- a/file_reader.go +++ b/file_reader.go @@ -75,10 +75,10 @@ func (f *FileReader) Checksum() ([]byte, error) { } } - // The way the hadoop code calculates this, it writes all the checksums out to - // a byte array, which is automatically padded with zeroes out to the next - // power of 2 (with a minimum of 32)... and then takes the MD5 of that array, - // including the zeroes. This is pretty shady business, but we want to track + // Hadoop calculates this by writing the checksums out to a byte array, which + // is automatically padded with zeroes out to the next power of 2 + // (with a minimum of 32)... and then takes the MD5 of that array, including + // the zeroes. This is pretty shady business, but we want to track // the 'hadoop fs -checksum' behavior if possible. paddedLength := 32 totalLength := 0 @@ -87,6 +87,7 @@ func (f *FileReader) Checksum() ([]byte, error) { cr := &rpc.ChecksumReader{ Block: block, UseDatanodeHostname: f.client.options.UseDatanodeHostname, + DialFunc: f.client.options.DatanodeDialFunc, } blockChecksum, err := cr.ReadChecksum() @@ -386,6 +387,7 @@ func (f *FileReader) getNewBlockReader() error { Block: block, Offset: int64(off - start), UseDatanodeHostname: f.client.options.UseDatanodeHostname, + DialFunc: f.client.options.DatanodeDialFunc, } return nil diff --git a/file_writer.go b/file_writer.go index 5add3b0a..784cb75b 100644 --- a/file_writer.go +++ b/file_writer.go @@ -140,6 +140,7 @@ func (c *Client) Append(name string) (*FileWriter, error) { Offset: int64(lastBlock.B.GetNumBytes()), Append: true, UseDatanodeHostname: f.client.options.UseDatanodeHostname, + DialFunc: f.client.options.DatanodeDialFunc, } return f, nil @@ -271,6 +272,7 @@ func (f *FileWriter) startNewBlock() error { Block: addBlockResp.GetBlock(), BlockSize: f.blockSize, UseDatanodeHostname: f.client.options.UseDatanodeHostname, + DialFunc: f.client.options.DatanodeDialFunc, } return nil diff --git a/rpc/block_reader.go b/rpc/block_reader.go index 47ac41a6..7d9c548d 100644 --- a/rpc/block_reader.go +++ b/rpc/block_reader.go @@ -1,6 +1,7 @@ package rpc import ( + "context" "errors" "fmt" "hash/crc32" @@ -26,6 +27,9 @@ type BlockReader struct { // UseDatanodeHostname specifies whether the datanodes should be connected to // via their hostnames (if true) or IP addresses (if false). UseDatanodeHostname bool + // DialFunc is used to connect to the datanodes. If nil, then + // (&net.Dialer{}).DialContext is used. + DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) datanodes *datanodeFailover stream *blockReadStream @@ -126,7 +130,11 @@ func (br *BlockReader) Close() error { func (br *BlockReader) connectNext() error { address := br.datanodes.next() - conn, err := net.DialTimeout("tcp", address, connectTimeout) + if br.DialFunc == nil { + br.DialFunc = (&net.Dialer{}).DialContext + } + + conn, err := br.DialFunc(context.Background(), "tcp", address) if err != nil { return err } diff --git a/rpc/block_writer.go b/rpc/block_writer.go index ed6b7b2e..3de7ea81 100644 --- a/rpc/block_writer.go +++ b/rpc/block_writer.go @@ -1,6 +1,7 @@ package rpc import ( + "context" "errors" "fmt" "io" @@ -32,6 +33,9 @@ type BlockWriter struct { // UseDatanodeHostname indicates whether the datanodes will be connected to // via hostname (if true) or IP address (if false). UseDatanodeHostname bool + // DialFunc is used to connect to the datanodes. If nil, then + // (&net.Dialer{}).DialContext is used. + DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) conn net.Conn stream *blockWriteStream @@ -118,7 +122,11 @@ func (bw *BlockWriter) Close() error { func (bw *BlockWriter) connectNext() error { address := getDatanodeAddress(bw.currentPipeline()[0].GetId(), bw.UseDatanodeHostname) - conn, err := net.DialTimeout("tcp", address, connectTimeout) + if bw.DialFunc == nil { + bw.DialFunc = (&net.Dialer{}).DialContext + } + + conn, err := bw.DialFunc(context.Background(), "tcp", address) if err != nil { return err } diff --git a/rpc/checksum_reader.go b/rpc/checksum_reader.go index bcc2ccd9..f58ac176 100644 --- a/rpc/checksum_reader.go +++ b/rpc/checksum_reader.go @@ -2,6 +2,7 @@ package rpc import ( "bufio" + "context" "encoding/binary" "errors" "io" @@ -20,6 +21,9 @@ type ChecksumReader struct { // UseDatanodeHostname specifies whether the datanodes should be connected to // via their hostnames (if true) or IP addresses (if false). UseDatanodeHostname bool + // DialFunc is used to connect to the datanodes. If nil, then + // (&net.Dialer{}).DialContext is used. + DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) datanodes *datanodeFailover conn net.Conn @@ -69,7 +73,11 @@ func (cr *ChecksumReader) ReadChecksum() ([]byte, error) { } func (cr *ChecksumReader) readChecksum(address string) ([]byte, error) { - conn, err := net.DialTimeout("tcp", address, connectTimeout) + if cr.DialFunc == nil { + cr.DialFunc = (&net.Dialer{}).DialContext + } + + conn, err := cr.DialFunc(context.Background(), "tcp", address) if err != nil { return nil, err } diff --git a/rpc/namenode.go b/rpc/namenode.go index 405f331f..b604583d 100644 --- a/rpc/namenode.go +++ b/rpc/namenode.go @@ -1,6 +1,7 @@ package rpc import ( + "context" "encoding/binary" "errors" "fmt" @@ -30,18 +31,26 @@ type NamenodeConnection struct { clientId []byte clientName string currentRequestID int - user string - conn net.Conn - host *namenodeHost - hostList []*namenodeHost - reqLock sync.Mutex + + user string + dialFunc func(ctx context.Context, network, addr string) (net.Conn, error) + conn net.Conn + host *namenodeHost + hostList []*namenodeHost + + reqLock sync.Mutex } // NamenodeConnectionOptions represents the configurable options available // for a NamenodeConnection. type NamenodeConnectionOptions struct { + // Addresses specifies the namenode(s) to connect to. Addresses []string - User string + // User specifies which HDFS user the client will act as. + User string + // DialFunc is used to connect to the datanodes. If nil, then + // (&net.Dialer{}).DialContext is used. + DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) } // NamenodeError represents an interepreted error from the Namenode, including @@ -116,7 +125,8 @@ func NewNamenodeConnectionWithOptions(options NamenodeConnectionOptions) (*Namen // WrapNamenodeConnection wraps an existing net.Conn to a Namenode, and preforms // an initial handshake. // -// Deprecated: use the higher-level hdfs.New or NewNamenodeConnection instead. +// Deprecated: use the DialFunc option in NamenodeConnectionOptions or the +// higher-level hdfs.NewClient. func WrapNamenodeConnection(conn net.Conn, user string) (*NamenodeConnection, error) { // The ClientID is reused here both in the RPC headers (which requires a // "globally unique" ID) and as the "client name" in various requests. @@ -155,8 +165,12 @@ func (c *NamenodeConnection) resolveConnection() error { continue } + if c.dialFunc == nil { + c.dialFunc = (&net.Dialer{}).DialContext + } + c.host = host - c.conn, err = net.DialTimeout("tcp", host.address, connectTimeout) + c.conn, err = c.dialFunc(context.Background(), "tcp", host.address) if err != nil { c.markFailure(err) continue diff --git a/rpc/rpc.go b/rpc/rpc.go index 8621449e..14b1fae2 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -21,12 +21,6 @@ const ( checksumBlockOp = 0x55 ) -var ( - connectTimeout = 1 * time.Second - namenodeTimeout = 3 * time.Second - datanodeTimeout = 3 * time.Second -) - // Used for client ID generation, below. const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" From 74f67a46b0f91ab35832712641e0b5ce9a9a333f Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 1 Aug 2018 01:17:17 +0200 Subject: [PATCH 028/159] Cleanup some duplicate code in ChecksumReader --- rpc/checksum_reader.go | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/rpc/checksum_reader.go b/rpc/checksum_reader.go index f58ac176..24b048d5 100644 --- a/rpc/checksum_reader.go +++ b/rpc/checksum_reader.go @@ -1,15 +1,12 @@ package rpc import ( - "bufio" "context" - "encoding/binary" "errors" "io" "net" hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" ) // ChecksumReader provides an interface for reading the "MD5CRC32" checksums of @@ -26,8 +23,6 @@ type ChecksumReader struct { DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) datanodes *datanodeFailover - conn net.Conn - reader *bufio.Reader } // NewChecksumReader creates a new ChecksumReader for the given block. @@ -82,14 +77,12 @@ func (cr *ChecksumReader) readChecksum(address string) ([]byte, error) { return nil, err } - cr.conn = conn - err = cr.writeBlockChecksumRequest() + err = cr.writeBlockChecksumRequest(conn) if err != nil { return nil, err } - cr.reader = bufio.NewReader(conn) - resp, err := cr.readBlockChecksumResponse() + resp, err := cr.readBlockChecksumResponse(conn) if err != nil { return nil, err } @@ -105,7 +98,7 @@ func (cr *ChecksumReader) readChecksum(address string) ([]byte, error) { // +-----------------------------------------------------------+ // | varint length + OpReadBlockProto | // +-----------------------------------------------------------+ -func (cr *ChecksumReader) writeBlockChecksumRequest() error { +func (cr *ChecksumReader) writeBlockChecksumRequest(w io.Writer) error { header := []byte{0x00, dataTransferVersion, checksumBlockOp} op := newChecksumBlockOp(cr.Block) @@ -115,7 +108,7 @@ func (cr *ChecksumReader) writeBlockChecksumRequest() error { } req := append(header, opBytes...) - _, err = cr.conn.Write(req) + _, err = w.Write(req) if err != nil { return err } @@ -127,29 +120,10 @@ func (cr *ChecksumReader) writeBlockChecksumRequest() error { // +-----------------------------------------------------------+ // | varint length + BlockOpResponseProto | // +-----------------------------------------------------------+ -func (cr *ChecksumReader) readBlockChecksumResponse() (*hdfs.BlockOpResponseProto, error) { - respLength, err := binary.ReadUvarint(cr.reader) - if err != nil { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - - return nil, err - } - - respBytes := make([]byte, respLength) - _, err = io.ReadFull(cr.reader, respBytes) - if err != nil { - return nil, err - } - +func (cr *ChecksumReader) readBlockChecksumResponse(r io.Reader) (*hdfs.BlockOpResponseProto, error) { resp := &hdfs.BlockOpResponseProto{} - err = proto.Unmarshal(respBytes, resp) - if err != nil { - return nil, err - } - - return resp, nil + err := readPrefixedMessage(r, resp) + return resp, err } func newChecksumBlockOp(block *hdfs.LocatedBlockProto) *hdfs.OpBlockChecksumProto { From 89f1d8842586cdbf84257e149d530eff1e9e11ce Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 1 Aug 2018 02:43:59 +0200 Subject: [PATCH 029/159] Introduce deadlines for streaming reads and writes This introduces a SetDeadline method to FileReader, FileWriter, BlockReader, BlockWriter, and ChecksumReader. In all those cases, an error is returned immediately only when the connection already exists; otherwise, SetDeadline is called after lazily establishing the connection. --- file_reader.go | 21 ++++++++- file_reader_test.go | 52 +++++++++++++++++++++ file_writer.go | 24 +++++++++- file_writer_test.go | 100 ++++++++++++++++++++++++++++++++++++----- rpc/block_reader.go | 19 ++++++++ rpc/block_writer.go | 25 +++++++++-- rpc/checksum_reader.go | 15 +++++++ 7 files changed, 240 insertions(+), 16 deletions(-) diff --git a/file_reader.go b/file_reader.go index 9b7d0185..592022d2 100644 --- a/file_reader.go +++ b/file_reader.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "os" + "time" hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/rpc" @@ -22,6 +23,7 @@ type FileReader struct { blocks []*hdfs.LocatedBlockProto blockReader *rpc.BlockReader + deadline time.Time offset int64 readdirLast string @@ -54,6 +56,18 @@ func (f *FileReader) Stat() os.FileInfo { return f.info } +// SetDeadline sets the deadline for future Read, ReadAt, and Checksum calls. A +// zero value for t means those calls will not time out. +func (f *FileReader) SetDeadline(t time.Time) error { + f.deadline = t + if f.blockReader != nil { + return f.blockReader.SetDeadline(t) + } + + // Return the error at connection time. + return nil +} + // Checksum returns HDFS's internal "MD5MD5CRC32C" checksum for a given file. // // Internally to HDFS, it works by calculating the MD5 of all the CRCs (which @@ -90,6 +104,11 @@ func (f *FileReader) Checksum() ([]byte, error) { DialFunc: f.client.options.DatanodeDialFunc, } + err := cr.SetDeadline(f.deadline) + if err != nil { + return nil, err + } + blockChecksum, err := cr.ReadChecksum() if err != nil { return nil, err @@ -390,7 +409,7 @@ func (f *FileReader) getNewBlockReader() error { DialFunc: f.client.options.DatanodeDialFunc, } - return nil + return f.SetDeadline(f.deadline) } } diff --git a/file_reader_test.go b/file_reader_test.go index 85c109cc..fa5646db 100644 --- a/file_reader_test.go +++ b/file_reader_test.go @@ -296,3 +296,55 @@ func TestFileChecksum(t *testing.T) { assert.EqualValues(t, testChecksum, hex.EncodeToString(checksum)) } + +func TestFileReadDeadline(t *testing.T) { + client := getClient(t) + + file, err := client.Open("/_test/foo.txt") + require.NoError(t, err) + + file.SetDeadline(time.Now().Add(100 * time.Millisecond)) + _, err = file.Read([]byte{0, 0}) + assert.NoError(t, err) + + time.Sleep(100 * time.Millisecond) + _, err = file.Read([]byte{0, 0}) + assert.NotNil(t, err) +} + +func TestFileReadDeadlineBefore(t *testing.T) { + client := getClient(t) + + file, err := client.Open("/_test/foo.txt") + require.NoError(t, err) + + file.SetDeadline(time.Now()) + _, err = file.Read([]byte{0, 0}) + assert.NotNil(t, err) +} + +func TestFileChecksumDeadline(t *testing.T) { + client := getClient(t) + + file, err := client.Open("/_test/foo.txt") + require.NoError(t, err) + + file.SetDeadline(time.Now().Add(100 * time.Millisecond)) + _, err = file.Checksum() + assert.NoError(t, err) + + time.Sleep(100 * time.Millisecond) + _, err = file.Checksum() + assert.NotNil(t, err) +} + +func TestFileChecksumDeadlineBefore(t *testing.T) { + client := getClient(t) + + file, err := client.Open("/_test/foo.txt") + require.NoError(t, err) + + file.SetDeadline(time.Now()) + _, err = file.Checksum() + assert.NotNil(t, err) +} diff --git a/file_writer.go b/file_writer.go index 784cb75b..328e1ee3 100644 --- a/file_writer.go +++ b/file_writer.go @@ -3,6 +3,7 @@ package hdfs import ( "io" "os" + "time" hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/rpc" @@ -19,6 +20,7 @@ type FileWriter struct { blockSize int64 blockWriter *rpc.BlockWriter + deadline time.Time closed bool } @@ -143,6 +145,11 @@ func (c *Client) Append(name string) (*FileWriter, error) { DialFunc: f.client.options.DatanodeDialFunc, } + err = f.blockWriter.SetDeadline(f.deadline) + if err != nil { + return nil, err + } + return f, nil } @@ -157,6 +164,21 @@ func (c *Client) CreateEmptyFile(name string) error { return f.Close() } +// SetDeadline sets the deadline for future Write, Flush, and Close calls. A +// zero value for t means those calls will not time out. +// +// Note that because of buffering, Write calls that do not result in a blocking +// network call may still succeed after the deadline. +func (f *FileWriter) SetDeadline(t time.Time) error { + f.deadline = t + if f.blockWriter != nil { + return f.blockWriter.SetDeadline(t) + } + + // Return the error at connection time. + return nil +} + // Write implements io.Writer for writing to a file in HDFS. Internally, it // writes data to an internal buffer first, and then later out to HDFS. Because // of this, it is important that Close is called after all data has been @@ -275,7 +297,7 @@ func (f *FileWriter) startNewBlock() error { DialFunc: f.client.options.DatanodeDialFunc, } - return nil + return f.blockWriter.SetDeadline(f.deadline) } func (f *FileWriter) finalizeBlock() error { diff --git a/file_writer_test.go b/file_writer_test.go index 1365c7aa..8282e43c 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -8,6 +8,7 @@ import ( "os" "strings" "testing" + "time" "github.com/colinmarc/hdfs/rpc" "github.com/stretchr/testify/assert" @@ -19,7 +20,6 @@ const abcException = "org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedExcepti func TestFileWrite(t *testing.T) { client := getClient(t) - baleet(t, "/_test/create/1.txt") mkdirp(t, "/_test/create") writer, err := client.Create("/_test/create/1.txt") require.NoError(t, err) @@ -46,7 +46,6 @@ func TestFileWrite(t *testing.T) { func TestFileBigWrite(t *testing.T) { client := getClient(t) - baleet(t, "/_test/create/2.txt") mkdirp(t, "/_test/create") writer, err := client.Create("/_test/create/2.txt") require.NoError(t, err) @@ -74,7 +73,6 @@ func TestFileBigWrite(t *testing.T) { func TestFileBigWriteMultipleBlocks(t *testing.T) { client := getClient(t) - baleet(t, "/_test/create/3.txt") mkdirp(t, "/_test/create") writer, err := client.CreateFile("/_test/create/3.txt", 1, 1048576, 0755) require.NoError(t, err) @@ -102,7 +100,6 @@ func TestFileBigWriteMultipleBlocks(t *testing.T) { func TestFileBigWriteWeirdBlockSize(t *testing.T) { client := getClient(t) - baleet(t, "/_test/create/4.txt") mkdirp(t, "/_test/create") writer, err := client.CreateFile("/_test/create/4.txt", 1, 1050000, 0755) require.NoError(t, err) @@ -130,7 +127,6 @@ func TestFileBigWriteWeirdBlockSize(t *testing.T) { func TestFileBigWriteReplication(t *testing.T) { client := getClient(t) - baleet(t, "/_test/create/5.txt") mkdirp(t, "/_test/create") writer, err := client.CreateFile("/_test/create/5.txt", 3, 1048576, 0755) require.NoError(t, err) @@ -158,7 +154,6 @@ func TestFileBigWriteReplication(t *testing.T) { func TestFileWriteSmallFlushes(t *testing.T) { client := getClient(t) - baleet(t, "/_test/create/6.txt") mkdirp(t, "/_test/create") writer, err := client.Create("/_test/create/6.txt") require.NoError(t, err) @@ -235,7 +230,6 @@ func TestCreateEmptyFileWithoutPermission(t *testing.T) { client2 := getClientForUser(t, "gohdfs2") mkdirp(t, "/_test/accessdenied") - baleet(t, "/_test/accessdenied/emptyfile") err := client2.CreateEmptyFile("/_test/accessdenied/emptyfile") assertPathError(t, err, "create", "/_test/accessdenied/emptyfile", os.ErrPermission) @@ -247,7 +241,6 @@ func TestCreateEmptyFileWithoutPermission(t *testing.T) { func TestFileAppend(t *testing.T) { client := getClient(t) - baleet(t, "/_test/append/1.txt") mkdirp(t, "/_test/append") writer, err := client.Create("/_test/append/1.txt") require.NoError(t, err) @@ -284,7 +277,6 @@ func TestFileAppend(t *testing.T) { func TestFileAppendEmptyFile(t *testing.T) { client := getClient(t) - baleet(t, "/_test/append/2.txt") mkdirp(t, "/_test/append") err := client.CreateEmptyFile("/_test/append/2.txt") require.NoError(t, err) @@ -317,7 +309,6 @@ func TestFileAppendLastBlockFull(t *testing.T) { client := getClient(t) - baleet(t, "/_test/append/3.txt") mkdirp(t, "/_test/append") writer, err := client.CreateFile("/_test/append/3.txt", 3, 1048576, 0644) @@ -359,7 +350,6 @@ func TestFileAppendLastBlockFull(t *testing.T) { func TestFileAppendRepeatedly(t *testing.T) { client := getClient(t) - baleet(t, "/_test/append/4.txt") mkdirp(t, "/_test/append") writer, err := client.Create("/_test/append/4.txt") require.NoError(t, err) @@ -405,3 +395,91 @@ func TestFileAppendRepeatedly(t *testing.T) { assert.Equal(t, len(expected), len(bytes)) assert.Equal(t, expected, string(bytes)) } + +func TestFileWriteDeadline(t *testing.T) { + client := getClient(t) + + mkdirp(t, "/_test/create") + writer, err := client.Create("/_test/create/7.txt") + require.NoError(t, err) + + writer.SetDeadline(time.Now().Add(100 * time.Millisecond)) + _, err = writer.Write([]byte("foo")) + assert.NoError(t, err) + + err = writer.Flush() + assert.NoError(t, err) + + time.Sleep(100 * time.Millisecond) + _, err = writer.Write([]byte("bar")) + assert.NoError(t, err) + + err = writer.Flush() + assert.Error(t, err) +} + +func TestFileWriteDeadlineBefore(t *testing.T) { + client := getClient(t) + + mkdirp(t, "/_test/create") + writer, err := client.Create("/_test/create/8.txt") + require.NoError(t, err) + + writer.SetDeadline(time.Now()) + _, err = writer.Write([]byte("foo")) + assert.Error(t, err) +} + +func TestFileAppendDeadline(t *testing.T) { + client := getClient(t) + + mkdirp(t, "/_test/append") + writer, err := client.Create("/_test/append/5.txt") + require.NoError(t, err) + + n, err := writer.Write([]byte("foobar\n")) + require.NoError(t, err) + assert.Equal(t, 7, n) + + err = writer.Close() + require.NoError(t, err) + + writer, err = client.Append("/_test/append/5.txt") + require.NoError(t, err) + + writer.SetDeadline(time.Now().Add(100 * time.Millisecond)) + _, err = writer.Write([]byte("foo")) + assert.NoError(t, err) + + err = writer.Flush() + assert.NoError(t, err) + + time.Sleep(100 * time.Millisecond) + _, err = writer.Write([]byte("bar")) + assert.NoError(t, err) + + err = writer.Flush() + assert.Error(t, err) +} + +func TestFileAppendDeadlineBefore(t *testing.T) { + client := getClient(t) + + mkdirp(t, "/_test/append") + writer, err := client.Create("/_test/append/5.txt") + require.NoError(t, err) + + n, err := writer.Write([]byte("foobar\n")) + require.NoError(t, err) + assert.Equal(t, 7, n) + + err = writer.Close() + require.NoError(t, err) + + writer, err = client.Append("/_test/append/5.txt") + require.NoError(t, err) + + writer.SetDeadline(time.Now()) + _, err = writer.Write([]byte("foo\n")) + assert.Error(t, err) +} diff --git a/rpc/block_reader.go b/rpc/block_reader.go index 7d9c548d..70f66579 100644 --- a/rpc/block_reader.go +++ b/rpc/block_reader.go @@ -8,6 +8,7 @@ import ( "io" "io/ioutil" "net" + "time" hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" @@ -34,6 +35,7 @@ type BlockReader struct { datanodes *datanodeFailover stream *blockReadStream conn net.Conn + deadline time.Time closed bool } @@ -51,6 +53,18 @@ func NewBlockReader(block *hdfs.LocatedBlockProto, offset int64, clientName stri } } +// SetDeadline sets the deadline for future Read calls. A zero value for t +// means Read will not time out. +func (br *BlockReader) SetDeadline(t time.Time) error { + br.deadline = t + if br.conn != nil { + return br.conn.SetDeadline(t) + } + + // Return the error at connection time. + return nil +} + // Read implements io.Reader. // // In the case that a failure (such as a disconnect) occurs while reading, the @@ -185,6 +199,11 @@ func (br *BlockReader) connectNext() error { br.stream = stream br.conn = conn + err = br.conn.SetDeadline(br.deadline) + if err != nil { + return err + } + return nil } diff --git a/rpc/block_writer.go b/rpc/block_writer.go index 3de7ea81..18fbb1a3 100644 --- a/rpc/block_writer.go +++ b/rpc/block_writer.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "net" + "time" hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" @@ -37,9 +38,10 @@ type BlockWriter struct { // (&net.Dialer{}).DialContext is used. DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) - conn net.Conn - stream *blockWriteStream - closed bool + conn net.Conn + deadline time.Time + stream *blockWriteStream + closed bool } // NewBlockWriter returns a BlockWriter for the given block. It will lazily @@ -56,6 +58,18 @@ func NewBlockWriter(block *hdfs.LocatedBlockProto, namenode *NamenodeConnection, } } +// SetDeadline sets the deadline for future Write, Flush, and Close calls. A +// zero value for t means those calls will not time out. +func (bw *BlockWriter) SetDeadline(t time.Time) error { + bw.deadline = t + if bw.conn != nil { + return bw.conn.SetDeadline(t) + } + + // Return the error at connection time. + return nil +} + // Write implements io.Writer. // // Unlike BlockReader, BlockWriter currently has no ability to recover from @@ -131,6 +145,11 @@ func (bw *BlockWriter) connectNext() error { return err } + err = conn.SetDeadline(bw.deadline) + if err != nil { + return err + } + err = bw.writeBlockWriteRequest(conn) if err != nil { return err diff --git a/rpc/checksum_reader.go b/rpc/checksum_reader.go index 24b048d5..ac7d1a57 100644 --- a/rpc/checksum_reader.go +++ b/rpc/checksum_reader.go @@ -5,6 +5,7 @@ import ( "errors" "io" "net" + "time" hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" ) @@ -22,6 +23,7 @@ type ChecksumReader struct { // (&net.Dialer{}).DialContext is used. DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) + deadline time.Time datanodes *datanodeFailover } @@ -35,6 +37,14 @@ func NewChecksumReader(block *hdfs.LocatedBlockProto) *ChecksumReader { } } +// SetDeadline sets the deadline for future ReadChecksum calls. A zero value +// for t means Read will not time out. +func (cr *ChecksumReader) SetDeadline(t time.Time) error { + cr.deadline = t + // Return the error at connection time. + return nil +} + // ReadChecksum returns the checksum of the block. func (cr *ChecksumReader) ReadChecksum() ([]byte, error) { if cr.datanodes == nil { @@ -77,6 +87,11 @@ func (cr *ChecksumReader) readChecksum(address string) ([]byte, error) { return nil, err } + err = conn.SetDeadline(cr.deadline) + if err != nil { + return nil, err + } + err = cr.writeBlockChecksumRequest(conn) if err != nil { return nil, err From fa544782dbafcb351bb41d61aba6e5ac45e34b72 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 1 Aug 2018 02:44:41 +0200 Subject: [PATCH 030/159] Set basic timeout defaults in cmd/hdfs --- cmd/hdfs/main.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go index 015cdc13..78673643 100755 --- a/cmd/hdfs/main.go +++ b/cmd/hdfs/main.go @@ -3,7 +3,9 @@ package main import ( "errors" "fmt" + "net" "os" + "time" "github.com/colinmarc/hdfs" "github.com/pborman/getopt" @@ -199,6 +201,16 @@ func getClient(namenode string) (*hdfs.Client, error) { } } + // Set some basic defaults. + dialFunc := (&net.Dialer{ + Timeout: 5 * time.Second, + KeepAlive: 5 * time.Second, + DualStack: true, + }).DialContext + + options.NamenodeDialFunc = dialFunc + options.DatanodeDialFunc = dialFunc + c, err := hdfs.NewClient(options) if err != nil { return nil, fmt.Errorf("Couldn't connect to namenode: %s", err) From 916ad0c46d7a40c3935d1af3f61fb6bde1a8be90 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 1 Aug 2018 14:25:01 +0200 Subject: [PATCH 031/159] Actually pass dialFunc through to NamenodeConnection --- rpc/namenode.go | 1 + 1 file changed, 1 insertion(+) diff --git a/rpc/namenode.go b/rpc/namenode.go index b604583d..5aae39b7 100644 --- a/rpc/namenode.go +++ b/rpc/namenode.go @@ -112,6 +112,7 @@ func NewNamenodeConnectionWithOptions(options NamenodeConnectionOptions) (*Namen clientName: "go-hdfs-" + string(clientId), user: options.User, hostList: hostList, + dialFunc: options.DialFunc, } err := c.resolveConnection() From 0d25db0cfcdeb14600a094a81a94f1b3eac4e0bb Mon Sep 17 00:00:00 2001 From: Shastick Date: Mon, 23 Jul 2018 14:58:23 +0200 Subject: [PATCH 032/159] Add basic Kerberos support to the library This adds mutual Kerberos authentication to connections with the namenode. A kerberos client must be constructed manually and passed to hdfs.NewClient to enable support. --- Gopkg.lock | 77 +- Gopkg.toml | 4 + client.go | 79 +- client_test.go | 2 +- conf.go | 9 +- rpc/kerberos.go | 150 +++ rpc/kerberos_test.go | 32 + rpc/namenode.go | 108 +- rpc/rpc.go | 45 +- .../github.com/hashicorp/go-uuid/.travis.yml | 12 + vendor/github.com/hashicorp/go-uuid/LICENSE | 363 ++++++ vendor/github.com/hashicorp/go-uuid/README.md | 8 + vendor/github.com/hashicorp/go-uuid/uuid.go | 65 ++ vendor/github.com/jcmturner/gofork/LICENSE | 27 + .../jcmturner/gofork/encoding/asn1/README.md | 5 + .../jcmturner/gofork/encoding/asn1/asn1.go | 1003 +++++++++++++++++ .../jcmturner/gofork/encoding/asn1/common.go | 173 +++ .../jcmturner/gofork/encoding/asn1/marshal.go | 659 +++++++++++ .../gofork/x/crypto/pbkdf2/pbkdf2.go | 98 ++ vendor/golang.org/x/crypto/AUTHORS | 3 + vendor/golang.org/x/crypto/CONTRIBUTORS | 3 + vendor/golang.org/x/crypto/LICENSE | 27 + vendor/golang.org/x/crypto/PATENTS | 22 + vendor/golang.org/x/crypto/md4/md4.go | 118 ++ vendor/golang.org/x/crypto/md4/md4block.go | 89 ++ vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go | 77 ++ .../gopkg.in/jcmturner/aescts.v1/.gitignore | 14 + vendor/gopkg.in/jcmturner/aescts.v1/LICENSE | 201 ++++ vendor/gopkg.in/jcmturner/aescts.v1/README.md | 16 + vendor/gopkg.in/jcmturner/aescts.v1/aescts.go | 186 +++ .../gopkg.in/jcmturner/dnsutils.v1/.gitignore | 14 + .../jcmturner/dnsutils.v1/.travis.yml | 24 + vendor/gopkg.in/jcmturner/dnsutils.v1/LICENSE | 201 ++++ vendor/gopkg.in/jcmturner/dnsutils.v1/srv.go | 95 ++ vendor/gopkg.in/jcmturner/gokrb5.v5/LICENSE | 201 ++++ .../jcmturner/gokrb5.v5/asn1tools/tools.go | 86 ++ .../jcmturner/gokrb5.v5/client/ASExchange.go | 154 +++ .../jcmturner/gokrb5.v5/client/TGSExchange.go | 101 ++ .../jcmturner/gokrb5.v5/client/cache.go | 102 ++ .../jcmturner/gokrb5.v5/client/client.go | 215 ++++ .../jcmturner/gokrb5.v5/client/http.go | 46 + .../jcmturner/gokrb5.v5/client/network.go | 213 ++++ .../jcmturner/gokrb5.v5/client/passwd.go | 94 ++ .../jcmturner/gokrb5.v5/client/session.go | 172 +++ .../jcmturner/gokrb5.v5/config/hosts.go | 134 +++ .../jcmturner/gokrb5.v5/config/krb5conf.go | 665 +++++++++++ .../jcmturner/gokrb5.v5/credentials/ccache.go | 351 ++++++ .../gokrb5.v5/credentials/credentials.go | 257 +++++ .../crypto/aes128-cts-hmac-sha1-96.go | 173 +++ .../crypto/aes128-cts-hmac-sha256-128.go | 135 +++ .../crypto/aes256-cts-hmac-sha1-96.go | 173 +++ .../crypto/aes256-cts-hmac-sha384-192.go | 135 +++ .../gokrb5.v5/crypto/common/common.go | 143 +++ .../jcmturner/gokrb5.v5/crypto/crypto.go | 175 +++ .../gokrb5.v5/crypto/des3-cbc-sha1-kd.go | 174 +++ .../jcmturner/gokrb5.v5/crypto/etype/etype.go | 29 + .../jcmturner/gokrb5.v5/crypto/rc4-hmac.go | 137 +++ .../gokrb5.v5/crypto/rfc3961/encryption.go | 125 ++ .../gokrb5.v5/crypto/rfc3961/keyDerivation.go | 134 +++ .../gokrb5.v5/crypto/rfc3961/nfold.go | 128 +++ .../gokrb5.v5/crypto/rfc3962/encryption.go | 89 ++ .../gokrb5.v5/crypto/rfc3962/keyDerivation.go | 58 + .../gokrb5.v5/crypto/rfc4757/checksum.go | 40 + .../gokrb5.v5/crypto/rfc4757/encryption.go | 83 ++ .../gokrb5.v5/crypto/rfc4757/keyDerivation.go | 55 + .../gokrb5.v5/crypto/rfc4757/msgtype.go | 20 + .../gokrb5.v5/crypto/rfc8009/encryption.go | 128 +++ .../gokrb5.v5/crypto/rfc8009/keyDerivation.go | 144 +++ .../gokrb5.v5/gssapi/ContextFlags.go | 36 + .../jcmturner/gokrb5.v5/gssapi/MechType.go | 9 + .../gokrb5.v5/gssapi/NegotiationToken.go | 149 +++ .../jcmturner/gokrb5.v5/gssapi/WrapToken.go | 234 ++++ .../jcmturner/gokrb5.v5/gssapi/gssapi.go | 102 ++ .../jcmturner/gokrb5.v5/gssapi/krb5Token.go | 202 ++++ .../gokrb5.v5/iana/addrtype/constants.go | 15 + .../gokrb5.v5/iana/adtype/constants.go | 23 + .../gokrb5.v5/iana/asnAppTag/constants.go | 24 + .../gokrb5.v5/iana/chksumtype/constants.go | 32 + .../jcmturner/gokrb5.v5/iana/constants.go | 5 + .../gokrb5.v5/iana/errorcode/constants.go | 155 +++ .../gokrb5.v5/iana/etypeID/constants.go | 101 ++ .../gokrb5.v5/iana/flags/constants.go | 30 + .../gokrb5.v5/iana/keyusage/constants.go | 42 + .../gokrb5.v5/iana/msgtype/constants.go | 18 + .../gokrb5.v5/iana/nametype/constants.go | 15 + .../gokrb5.v5/iana/patype/constants.go | 77 ++ .../gokrb5.v5/kadmin/changepasswddata.go | 23 + .../jcmturner/gokrb5.v5/kadmin/message.go | 114 ++ .../jcmturner/gokrb5.v5/kadmin/passwd.go | 68 ++ .../jcmturner/gokrb5.v5/keytab/keytab.go | 369 ++++++ .../jcmturner/gokrb5.v5/krberror/error.go | 73 ++ .../jcmturner/gokrb5.v5/messages/APRep.go | 64 ++ .../jcmturner/gokrb5.v5/messages/APReq.go | 157 +++ .../jcmturner/gokrb5.v5/messages/KDCRep.go | 312 +++++ .../jcmturner/gokrb5.v5/messages/KDCReq.go | 402 +++++++ .../jcmturner/gokrb5.v5/messages/KRBCred.go | 102 ++ .../jcmturner/gokrb5.v5/messages/KRBError.go | 83 ++ .../jcmturner/gokrb5.v5/messages/KRBPriv.go | 108 ++ .../jcmturner/gokrb5.v5/messages/KRBSafe.go | 61 + .../jcmturner/gokrb5.v5/messages/Ticket.go | 251 +++++ .../gokrb5.v5/mstypes/claims_set_metadata.go | 39 + .../jcmturner/gokrb5.v5/mstypes/filetime.go | 65 ++ .../gokrb5.v5/mstypes/group_membership.go | 53 + .../mstypes/kerb_sid_and_attributes.go | 42 + .../gokrb5.v5/mstypes/rpc_unicode_string.go | 36 + .../jcmturner/gokrb5.v5/mstypes/sid.go | 70 ++ .../gokrb5.v5/mstypes/user_session_key.go | 30 + .../gopkg.in/jcmturner/gokrb5.v5/ndr/error.go | 13 + .../gopkg.in/jcmturner/gokrb5.v5/ndr/ndr.go | 246 ++++ .../jcmturner/gokrb5.v5/pac/client_claims.go | 38 + .../jcmturner/gokrb5.v5/pac/client_info.go | 45 + .../gokrb5.v5/pac/credentials_info.go | 132 +++ .../jcmturner/gokrb5.v5/pac/device_claims.go | 38 + .../jcmturner/gokrb5.v5/pac/device_info.go | 93 ++ .../gokrb5.v5/pac/kerb_validation_info.go | 286 +++++ .../gokrb5.v5/pac/pac_info_buffer.go | 39 + .../jcmturner/gokrb5.v5/pac/pac_type.go | 205 ++++ .../gokrb5.v5/pac/s4u_delegation_info.go | 55 + .../jcmturner/gokrb5.v5/pac/signature_data.go | 74 ++ .../jcmturner/gokrb5.v5/pac/upn_dns_info.go | 66 ++ .../gokrb5.v5/types/Authenticator.go | 100 ++ .../gokrb5.v5/types/AuthorizationData.go | 123 ++ .../jcmturner/gokrb5.v5/types/Cryptosystem.go | 55 + .../jcmturner/gokrb5.v5/types/HostAddress.go | 206 ++++ .../gokrb5.v5/types/KerberosFlags.go | 124 ++ .../jcmturner/gokrb5.v5/types/PAData.go | 155 +++ .../gokrb5.v5/types/PrincipalName.go | 66 ++ .../jcmturner/gokrb5.v5/types/TypedData.go | 18 + 128 files changed, 14983 insertions(+), 63 deletions(-) create mode 100644 rpc/kerberos.go create mode 100644 rpc/kerberos_test.go create mode 100644 vendor/github.com/hashicorp/go-uuid/.travis.yml create mode 100644 vendor/github.com/hashicorp/go-uuid/LICENSE create mode 100644 vendor/github.com/hashicorp/go-uuid/README.md create mode 100644 vendor/github.com/hashicorp/go-uuid/uuid.go create mode 100644 vendor/github.com/jcmturner/gofork/LICENSE create mode 100644 vendor/github.com/jcmturner/gofork/encoding/asn1/README.md create mode 100644 vendor/github.com/jcmturner/gofork/encoding/asn1/asn1.go create mode 100644 vendor/github.com/jcmturner/gofork/encoding/asn1/common.go create mode 100644 vendor/github.com/jcmturner/gofork/encoding/asn1/marshal.go create mode 100644 vendor/github.com/jcmturner/gofork/x/crypto/pbkdf2/pbkdf2.go create mode 100644 vendor/golang.org/x/crypto/AUTHORS create mode 100644 vendor/golang.org/x/crypto/CONTRIBUTORS create mode 100644 vendor/golang.org/x/crypto/LICENSE create mode 100644 vendor/golang.org/x/crypto/PATENTS create mode 100644 vendor/golang.org/x/crypto/md4/md4.go create mode 100644 vendor/golang.org/x/crypto/md4/md4block.go create mode 100644 vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go create mode 100644 vendor/gopkg.in/jcmturner/aescts.v1/.gitignore create mode 100644 vendor/gopkg.in/jcmturner/aescts.v1/LICENSE create mode 100644 vendor/gopkg.in/jcmturner/aescts.v1/README.md create mode 100644 vendor/gopkg.in/jcmturner/aescts.v1/aescts.go create mode 100644 vendor/gopkg.in/jcmturner/dnsutils.v1/.gitignore create mode 100644 vendor/gopkg.in/jcmturner/dnsutils.v1/.travis.yml create mode 100644 vendor/gopkg.in/jcmturner/dnsutils.v1/LICENSE create mode 100644 vendor/gopkg.in/jcmturner/dnsutils.v1/srv.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/LICENSE create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/asn1tools/tools.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/ASExchange.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/TGSExchange.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/cache.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/client.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/http.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/network.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/passwd.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/session.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/config/hosts.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/config/krb5conf.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/ccache.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/credentials.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha1-96.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha256-128.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha1-96.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha384-192.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/common/common.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/crypto.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/des3-cbc-sha1-kd.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/etype/etype.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rc4-hmac.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/encryption.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/keyDerivation.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/nfold.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/encryption.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/keyDerivation.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/checksum.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/encryption.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/keyDerivation.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/msgtype.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/encryption.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/keyDerivation.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/ContextFlags.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/MechType.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/NegotiationToken.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/WrapToken.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/gssapi.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/krb5Token.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/addrtype/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/adtype/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/errorcode/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/etypeID/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/flags/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/keyusage/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/msgtype/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/nametype/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/patype/constants.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/changepasswddata.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/message.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/passwd.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/keytab/keytab.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/krberror/error.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APRep.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APReq.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCRep.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCReq.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBCred.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBError.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBPriv.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBSafe.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/Ticket.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/claims_set_metadata.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/filetime.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/group_membership.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/kerb_sid_and_attributes.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/rpc_unicode_string.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/sid.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/user_session_key.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/error.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/ndr.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_claims.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_info.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/credentials_info.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_claims.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_info.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/kerb_validation_info.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_info_buffer.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_type.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/s4u_delegation_info.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/signature_data.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/upn_dns_info.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/Authenticator.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/AuthorizationData.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/Cryptosystem.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/HostAddress.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/KerberosFlags.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/PAData.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/PrincipalName.go create mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/TypedData.go diff --git a/Gopkg.lock b/Gopkg.lock index 629df2f9..fa1edf6f 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -13,6 +13,21 @@ packages = ["proto"] revision = "925541529c1fa6821df4e44ce2723319eb2be768" +[[projects]] + branch = "master" + name = "github.com/hashicorp/go-uuid" + packages = ["."] + revision = "27454136f0364f2d44b1276c552d69105cf8c498" + +[[projects]] + branch = "master" + name = "github.com/jcmturner/gofork" + packages = [ + "encoding/asn1", + "x/crypto/pbkdf2" + ] + revision = "2aebee971930cd0dd525873330952ab7df5ac95c" + [[projects]] branch = "master" name = "github.com/pborman/getopt" @@ -34,9 +49,69 @@ revision = "b91bfb9ebec76498946beb6af7c0230c7cc7ba6c" version = "v1.2.0" +[[projects]] + branch = "master" + name = "golang.org/x/crypto" + packages = [ + "md4", + "pbkdf2" + ] + revision = "a2144134853fc9a27a7b1e3eb4f19f1a76df13c9" + +[[projects]] + name = "gopkg.in/jcmturner/aescts.v1" + packages = ["."] + revision = "f6abebb3171c4c1b1fea279cb7c7325020a26290" + version = "v1.0.1" + +[[projects]] + name = "gopkg.in/jcmturner/dnsutils.v1" + packages = ["."] + revision = "13eeb8d49ffb74d7a75784c35e4d900607a3943c" + version = "v1.0.1" + +[[projects]] + name = "gopkg.in/jcmturner/gokrb5.v5" + packages = [ + "asn1tools", + "client", + "config", + "credentials", + "crypto", + "crypto/common", + "crypto/etype", + "crypto/rfc3961", + "crypto/rfc3962", + "crypto/rfc4757", + "crypto/rfc8009", + "gssapi", + "iana", + "iana/addrtype", + "iana/adtype", + "iana/asnAppTag", + "iana/chksumtype", + "iana/errorcode", + "iana/etypeID", + "iana/flags", + "iana/keyusage", + "iana/msgtype", + "iana/nametype", + "iana/patype", + "kadmin", + "keytab", + "krberror", + "messages", + "mstypes", + "ndr", + "pac", + "types" + ] + revision = "5502bb09507bcc91e28c9b6feba046beb2e007d1" + version = "v5.2.0" + [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "6a827061ac3d7c045d36ae7765d9c25d37753981315d02cdb6484bebb48375e7" + inputs-digest = "1d8135f1a2177170f1fe8a07cf27bdf40ebf2786c22069ec383bf78b48bff646" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index fdbb4d77..fb9023b3 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -32,3 +32,7 @@ [prune] go-tests = true unused-packages = true + +[[constraint]] + name = "gopkg.in/jcmturner/gokrb5.v5" + version = "5.2.0" diff --git a/client.go b/client.go index 219b1ffe..690648b3 100644 --- a/client.go +++ b/client.go @@ -2,6 +2,7 @@ package hdfs import ( "context" + "errors" "io" "io/ioutil" "net" @@ -11,6 +12,7 @@ import ( hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/rpc" + krb "gopkg.in/jcmturner/gokrb5.v5/client" ) // A Client represents a connection to an HDFS cluster @@ -38,7 +40,9 @@ type Client struct { type ClientOptions struct { // Addresses specifies the namenode(s) to connect to. Addresses []string - // User specifies which HDFS user the client will act as. + // User specifies which HDFS user the client will act as. It is required + // unless kerberos authentication is enabled, in which case it will be + // determined from the provided credentials if empty. User string // UseDatanodeHostname specifies whether the client should connect to the // datanodes via hostname (which is useful in multi-homed setups) or IP @@ -50,6 +54,17 @@ type ClientOptions struct { // DatanodeDialFunc is used to connect to the datanodes. If nil, then // (&net.Dialer{}).DialContext is used. DatanodeDialFunc func(ctx context.Context, network, addr string) (net.Conn, error) + // KerberosClient is used to connect to kerberized HDFS clusters. If provided, + // the client will always mutually athenticate when connecting to the + // namenode(s). + KerberosClient *krb.Client + // KerberosServicePrincipleName specifies the Service Principle Name + // (/) for the namenode(s). Like in the + // dfs.namenode.kerberos.principal property of core-site.xml, the special + // string '_HOST' can be substituted for the address of the namenode in a + // multi-namenode setup (for example: 'nn/_HOST'). It is required if + // KerberosClient is provided. + KerberosServicePrincipleName string // Namenode optionally specifies an existing NamenodeConnection to wrap. This // is useful if you needed to create the namenode net.Conn manually for // whatever reason. @@ -69,11 +84,42 @@ type ClientOptions struct { // // // Determined by dfs.client.use.datanode.hostname. // UseDatanodeHostname bool +// +// // Set to a non-nil but empty client (without credentials) if the value of +// // hadoop.security.authentication is 'kerberos'. It must then be replaced +// // with a credentialed Kerberos client. +// KerberosClient *krb.Client +// +// // Determined by dfs.namenode.kerberos.principal, with the realm +// // (everything after the first '@') chopped off. +// KerberosServicePrincipleName string +// +// Because of the way Kerberos can be forced by the Hadoop configuration but not +// actually configured, you should check for whether KerberosClient is set in +// the resulting ClientOptions before proceeding: +// +// options, _ := ClientOptionsFromConf(conf) +// if options.KerberosClient != nil { +// // Replace with a valid credentialed client. +// options.KerberosClient = getKerberosClient() +// } func ClientOptionsFromConf(conf HadoopConf) (ClientOptions, error) { namenodes, err := conf.Namenodes() options := ClientOptions{Addresses: namenodes} options.UseDatanodeHostname = (conf["dfs.client.use.datanode.hostname"] == "true") + + if strings.ToLower(conf["hadoop.security.authentication"]) == "kerberos" { + // Set an empty KerberosClient here so that the user is forced to either + // unset it (disabling kerberos altogether) or replace it with a valid + // client. If the user does neither, NewClient will return an error. + options.KerberosClient = &krb.Client{} + } + + if conf["dfs.namenode.kerberos.principal"] != "" { + options.KerberosServicePrincipleName = strings.Split(conf["dfs.namenode.kerberos.principal"], "@")[0] + } + return options, err } @@ -81,15 +127,34 @@ func ClientOptionsFromConf(conf HadoopConf) (ClientOptions, error) { // the client could not be created. func NewClient(options ClientOptions) (*Client, error) { var err error - if options.Namenode == nil { + if options.KerberosClient != nil && options.KerberosClient.Credentials == nil { + return nil, errors.New("kerberos enabled, but kerberos client is missing credentials") + } + + if options.KerberosClient != nil && options.KerberosServicePrincipleName == "" { + return nil, errors.New("kerberos enabled, but kerberos namenode SPN is not provided") + } + + if options.User == "" { + if options.KerberosClient != nil { + creds := options.KerberosClient.Credentials + options.User = creds.Username + "@" + creds.Realm + } else { + return nil, errors.New("user not specified") + } + } + options.Namenode, err = rpc.NewNamenodeConnectionWithOptions( rpc.NamenodeConnectionOptions{ - Addresses: options.Addresses, - User: options.User, - DialFunc: options.NamenodeDialFunc, + Addresses: options.Addresses, + User: options.User, + DialFunc: options.NamenodeDialFunc, + KerberosClient: options.KerberosClient, + KerberosServicePrincipleName: options.KerberosServicePrincipleName, }, ) + if err != nil { return nil, err } @@ -101,7 +166,9 @@ func NewClient(options ClientOptions) (*Client, error) { // New returns a connected Client, or an error if it can't connect. The user // will be the current system user. Any relevantoptions (including the // address(es) of the namenode(s), if an empty string is passed) will be loaded -// from the Hadoop configuration present at HADOOP_CONF_DIR. +// from the Hadoop configuration present at HADOOP_CONF_DIR. Note, however, +// that New will not attempt any Kerberos authentication; use NewClient if you +// need that. func New(address string) (*Client, error) { conf := LoadHadoopConf("") options, err := ClientOptionsFromConf(conf) diff --git a/client_test.go b/client_test.go index e2f17766..d9adb15b 100644 --- a/client_test.go +++ b/client_test.go @@ -115,7 +115,7 @@ func TestNewWithMultipleNodes(t *testing.T) { } nns = append([]string{"localhost:100"}, nns...) - _, err = NewClient(ClientOptions{Addresses: nns}) + _, err = NewClient(ClientOptions{Addresses: nns, User: "gohdfs1"}) assert.Nil(t, err) } diff --git a/conf.go b/conf.go index 63cbaf77..8eb59ffb 100644 --- a/conf.go +++ b/conf.go @@ -26,7 +26,7 @@ type propertyList struct { // pairs found in a user's hadoop configuration files. type HadoopConf map[string]string -var errUnresolvedNamenode = errors.New("no namenode address in configuration") +var errNoNamenodesInConf = errors.New("no namenode address(es) in configuration") // LoadHadoopConf returns a HadoopConf object representing configuration from // the specified path, or finds the correct path in the environment. If @@ -34,7 +34,6 @@ var errUnresolvedNamenode = errors.New("no namenode address in configuration") // directly to the directory where the xml files are. If neither is specified, // ${HADOOP_HOME}/conf will be used. func LoadHadoopConf(path string) HadoopConf { - if path == "" { path = os.Getenv("HADOOP_CONF_DIR") if path == "" { @@ -64,7 +63,9 @@ func LoadHadoopConf(path string) HadoopConf { } // Namenodes returns the namenode hosts present in the configuration. The -// returned slice will be sorted and deduped. +// returned slice will be sorted and deduped. The values are loaded from +// fs.defaultFS (or the deprecated fs.default.name), or fields beginning with +// dfs.namenode.rpc-address. func (conf HadoopConf) Namenodes() ([]string, error) { nns := make(map[string]bool) for key, value := range conf { @@ -77,7 +78,7 @@ func (conf HadoopConf) Namenodes() ([]string, error) { } if len(nns) == 0 { - return nil, errUnresolvedNamenode + return nil, errNoNamenodesInConf } keys := make([]string, 0, len(nns)) diff --git a/rpc/kerberos.go b/rpc/kerberos.go new file mode 100644 index 00000000..f8e2cf97 --- /dev/null +++ b/rpc/kerberos.go @@ -0,0 +1,150 @@ +package rpc + +import ( + "errors" + "fmt" + "net" + "regexp" + + hadoop "github.com/colinmarc/hdfs/protocol/hadoop_common" + "gopkg.in/jcmturner/gokrb5.v5/gssapi" + "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" + krbtypes "gopkg.in/jcmturner/gokrb5.v5/types" +) + +const saslRpcCallId = -33 + +var ( + errKerberosNotSupported = errors.New("kerberos authentication not supported by namenode") + krbSPNHost = regexp.MustCompile(`\A[^/]+/(_HOST)([@/]|\z)`) +) + +func (c *NamenodeConnection) doKerberosHandshake() error { + // All SASL requests/responses use this sequence number. + c.currentRequestID = saslRpcCallId + + // Start negotiation, and get the list of supported mechanisms in reply. + c.writeSaslRequest(&hadoop.RpcSaslProto{State: hadoop.RpcSaslProto_NEGOTIATE.Enum()}) + resp, err := c.readSaslResponse(hadoop.RpcSaslProto_NEGOTIATE) + if err != nil { + return err + } + + var mechanism *hadoop.RpcSaslProto_SaslAuth + for _, m := range resp.GetAuths() { + if *m.Method == "KERBEROS" { + mechanism = m + } + } + + if mechanism == nil { + return errKerberosNotSupported + } + + // Get a ticket from Kerberos, and send the initial token to the namenode. + token, sessionKey, err := c.getKerberosTicket() + if err != nil { + return err + } + + err = c.writeSaslRequest(&hadoop.RpcSaslProto{ + State: hadoop.RpcSaslProto_INITIATE.Enum(), + Token: token.MechToken, + Auths: []*hadoop.RpcSaslProto_SaslAuth{mechanism}, + }) + + if err != nil { + return err + } + + // In response, we get a server token to verify. + resp, err = c.readSaslResponse(hadoop.RpcSaslProto_CHALLENGE) + if err != nil { + return err + } + + var nnToken gssapi.WrapToken + err = nnToken.Unmarshal(resp.GetToken(), true) + if err != nil { + return err + } + + _, err = nnToken.VerifyCheckSum(sessionKey, keyusage.GSSAPI_ACCEPTOR_SEAL) + if err != nil { + return fmt.Errorf("invalid server token: %s", err) + } + + // Sign the payload and send it back to the namenode. + // TODO: Make sure we can support what is required based on what's in the + // payload. + signed, err := gssapi.NewInitiatorToken(nnToken.Payload, sessionKey) + if err != nil { + return err + } + + signedBytes, err := signed.Marshal() + if err != nil { + return err + } + + err = c.writeSaslRequest(&hadoop.RpcSaslProto{ + State: hadoop.RpcSaslProto_RESPONSE.Enum(), + Token: signedBytes, + }) + + if err != nil { + return err + } + + // Read the final response. If it's a SUCCESS, then we're done here. + _, err = c.readSaslResponse(hadoop.RpcSaslProto_SUCCESS) + return err +} + +func (c *NamenodeConnection) writeSaslRequest(req *hadoop.RpcSaslProto) error { + packet, err := makeRPCPacket(newRPCRequestHeader(saslRpcCallId, c.clientId), req) + if err != nil { + return err + } + + _, err = c.conn.Write(packet) + return err +} + +func (c *NamenodeConnection) readSaslResponse(expectedState hadoop.RpcSaslProto_SaslState) (*hadoop.RpcSaslProto, error) { + resp := &hadoop.RpcSaslProto{} + err := c.readResponse("sasl", resp) + if err != nil { + return nil, err + } else if resp.GetState() != expectedState { + return nil, fmt.Errorf("unexpected SASL state: %s", resp.GetState().String()) + } + + return resp, nil +} + +// getKerberosTicket returns an initial kerberos negotiation token and the +// paired session key, along with an error if any occured. +func (c *NamenodeConnection) getKerberosTicket() (gssapi.NegTokenInit, krbtypes.EncryptionKey, error) { + host, _, _ := net.SplitHostPort(c.host.address) + spn := replaceSPNHostWildcard(c.kerberosServicePrincipleName, host) + + ticket, key, err := c.kerberosClient.GetServiceTicket(spn) + if err != nil { + return gssapi.NegTokenInit{}, key, err + } + + token, err := gssapi.NewNegTokenInitKrb5(*c.kerberosClient.Credentials, ticket, key) + return token, key, err +} + +// replaceSPNHostWildcard substitutes the special string '_HOST' in the given +// SPN for the given (current) host. +func replaceSPNHostWildcard(spn, host string) string { + res := krbSPNHost.FindStringSubmatchIndex(spn) + if res == nil || res[2] == -1 { + return spn + } + + return spn[:res[2]] + host + spn[res[3]:] +} diff --git a/rpc/kerberos_test.go b/rpc/kerberos_test.go new file mode 100644 index 00000000..058dcecc --- /dev/null +++ b/rpc/kerberos_test.go @@ -0,0 +1,32 @@ +package rpc + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +const replacementSPNHost = "nn1.foo.com" + +func TestReplaceSPNHostWildcard(t *testing.T) { + tests := []struct { + SPN string + Expected string + }{ + {"nn/example.com", "nn/example.com"}, + {"nn/_HOST", "nn/nn1.foo.com"}, + {"nn/_HOST@EXAMPLE.COM", "nn/nn1.foo.com@EXAMPLE.COM"}, + {"nn/_HOST/EXAMPLE.COM", "nn/nn1.foo.com/EXAMPLE.COM"}, + {"nn/_HOSTFOO.COM", "nn/_HOSTFOO.COM"}, + {"_HOST", "_HOST"}, + {"/_HOST@EXAMPLE.COM", "/_HOST@EXAMPLE.COM"}, + {"_HOST/nn2.foo.com", "_HOST/nn2.foo.com"}, + {"nn/nn2.foo.com/_HOST", "nn/nn2.foo.com/_HOST"}, + } + + for _, test := range tests { + t.Run("SPN="+test.SPN, func(t *testing.T) { + assert.Equal(t, test.Expected, replaceSPNHostWildcard(test.SPN, replacementSPNHost)) + }) + } +} diff --git a/rpc/namenode.go b/rpc/namenode.go index 5aae39b7..a66c23e4 100644 --- a/rpc/namenode.go +++ b/rpc/namenode.go @@ -2,26 +2,26 @@ package rpc import ( "context" - "encoding/binary" "errors" "fmt" - "io" "net" "sync" "time" hadoop "github.com/colinmarc/hdfs/protocol/hadoop_common" "github.com/golang/protobuf/proto" + krb "gopkg.in/jcmturner/gokrb5.v5/client" ) const ( - rpcVersion = 0x09 - serviceClass = 0x0 - authProtocol = 0x0 - protocolClass = "org.apache.hadoop.hdfs.protocol.ClientProtocol" - protocolClassVersion = 1 - handshakeCallID = -3 - standbyExceptionClass = "org.apache.hadoop.ipc.StandbyException" + rpcVersion byte = 0x09 + serviceClass byte = 0x0 + noneAuthProtocol byte = 0x0 + saslAuthProtocol byte = 0xdf + protocolClass = "org.apache.hadoop.hdfs.protocol.ClientProtocol" + protocolClassVersion = 1 + handshakeCallID = -3 + standbyExceptionClass = "org.apache.hadoop.ipc.StandbyException" ) const backoffDuration = time.Second * 5 @@ -30,9 +30,12 @@ const backoffDuration = time.Second * 5 type NamenodeConnection struct { clientId []byte clientName string - currentRequestID int + currentRequestID int32 + + user string + kerberosClient *krb.Client + kerberosServicePrincipleName string - user string dialFunc func(ctx context.Context, network, addr string) (net.Conn, error) conn net.Conn host *namenodeHost @@ -51,6 +54,17 @@ type NamenodeConnectionOptions struct { // DialFunc is used to connect to the datanodes. If nil, then // (&net.Dialer{}).DialContext is used. DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) + // KerberosClient is used to connect to kerberized HDFS clusters. If provided, + // the NamenodeConnection will always mutually athenticate when connecting + // to the namenode(s). + KerberosClient *krb.Client + // KerberosServicePrincipleName specifiesthe Service Principle Name + // (/) for the namenode(s). Like in the + // dfs.namenode.kerberos.principal property of core-site.xml, the special + // string '_HOST' can be substituted for the hostname in a multi-namenode + // setup (for example: 'nn/_HOST@EXAMPLE.COM'). It is required if + // KerberosClient is provided. + KerberosServicePrincipleName string } // NamenodeError represents an interepreted error from the Namenode, including @@ -108,11 +122,13 @@ func NewNamenodeConnectionWithOptions(options NamenodeConnectionOptions) (*Namen // "globally unique" ID) and as the "client name" in various requests. clientId := newClientID() c := &NamenodeConnection{ - clientId: clientId, - clientName: "go-hdfs-" + string(clientId), - user: options.User, - hostList: hostList, - dialFunc: options.DialFunc, + clientId: clientId, + clientName: "go-hdfs-" + string(clientId), + kerberosClient: options.KerberosClient, + kerberosServicePrincipleName: options.KerberosServicePrincipleName, + user: options.User, + dialFunc: options.DialFunc, + hostList: hostList, } err := c.resolveConnection() @@ -141,7 +157,7 @@ func WrapNamenodeConnection(conn net.Conn, user string) (*NamenodeConnection, er hostList: make([]*namenodeHost, 0), } - err := c.writeNamenodeHandshake() + err := c.doNamenodeHandshake() if err != nil { conn.Close() return nil, fmt.Errorf("namenode handshake failed: %s", err) @@ -177,7 +193,7 @@ func (c *NamenodeConnection) resolveConnection() error { continue } - err = c.writeNamenodeHandshake() + err = c.doNamenodeHandshake() if err != nil { c.markFailure(err) continue @@ -281,30 +297,19 @@ func (c *NamenodeConnection) writeRequest(method string, req proto.Message) erro // | varint length + Response | // +-----------------------------------------------------------+ func (c *NamenodeConnection) readResponse(method string, resp proto.Message) error { - var packetLength uint32 - err := binary.Read(c.conn, binary.BigEndian, &packetLength) - if err != nil { - return err - } - - packet := make([]byte, packetLength) - _, err = io.ReadFull(c.conn, packet) + rrh := &hadoop.RpcResponseHeaderProto{} + err := readRPCPacket(c.conn, rrh, resp) if err != nil { return err - } - - rrh := &hadoop.RpcResponseHeaderProto{} - err = readRPCPacket(packet, rrh, resp) - - if rrh.GetStatus() != hadoop.RpcResponseHeaderProto_SUCCESS { + } else if int32(rrh.GetCallId()) != c.currentRequestID { + return errors.New("unexpected sequence number") + } else if rrh.GetStatus() != hadoop.RpcResponseHeaderProto_SUCCESS { return &NamenodeError{ Method: method, Message: rrh.GetErrorMsg(), Code: int(rrh.GetErrorDetail()), Exception: rrh.GetExceptionClassName(), } - } else if int(rrh.GetCallId()) != c.currentRequestID { - return errors.New("unexpected sequence number") } return nil @@ -320,18 +325,45 @@ func (c *NamenodeConnection) readResponse(method string, resp proto.Message) err // +-----------------------------------------------------------+ // | Auth protocol, 1 byte (Auth method None = 0x00) | // +-----------------------------------------------------------+ +// +// If the auth protocol is something other than 'none', the authentication +// handshake happens here. Otherwise, everything can be sent as one packet. +// +// +-----------------------------------------------------------+ // | uint32 length of the next two parts | // +-----------------------------------------------------------+ // | varint length + RpcRequestHeaderProto | // +-----------------------------------------------------------+ // | varint length + IpcConnectionContextProto | // +-----------------------------------------------------------+ -func (c *NamenodeConnection) writeNamenodeHandshake() error { +func (c *NamenodeConnection) doNamenodeHandshake() error { + authProtocol := noneAuthProtocol + kerberos := false + if c.kerberosClient != nil { + authProtocol = saslAuthProtocol + kerberos = true + } + rpcHeader := []byte{ 0x68, 0x72, 0x70, 0x63, // "hrpc" rpcVersion, serviceClass, authProtocol, } + _, err := c.conn.Write(rpcHeader) + if err != nil { + return err + } + + if kerberos { + err = c.doKerberosHandshake() + if err != nil { + return fmt.Errorf("SASL handshake: %s", err) + } + + // Reset the sequence number here, since we set it to -33 for the SASL bits. + c.currentRequestID = 0 + } + rrh := newRPCRequestHeader(handshakeCallID, c.clientId) cc := newConnectionContext(c.user) packet, err := makeRPCPacket(rrh, cc) @@ -339,7 +371,7 @@ func (c *NamenodeConnection) writeNamenodeHandshake() error { return err } - _, err = c.conn.Write(append(rpcHeader, packet...)) + _, err = c.conn.Write(packet) return err } @@ -351,11 +383,11 @@ func (c *NamenodeConnection) Close() error { return nil } -func newRPCRequestHeader(id int, clientID []byte) *hadoop.RpcRequestHeaderProto { +func newRPCRequestHeader(id int32, clientID []byte) *hadoop.RpcRequestHeaderProto { return &hadoop.RpcRequestHeaderProto{ RpcKind: hadoop.RpcKindProto_RPC_PROTOCOL_BUFFER.Enum(), RpcOp: hadoop.RpcRequestHeaderProto_RPC_FINAL_PACKET.Enum(), - CallId: proto.Int32(int32(id)), + CallId: proto.Int32(id), ClientId: clientID, } } diff --git a/rpc/rpc.go b/rpc/rpc.go index 14b1fae2..ad52d5a3 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -3,8 +3,8 @@ package rpc import ( - "bytes" "encoding/binary" + "errors" "fmt" "io" "math/rand" @@ -21,6 +21,8 @@ const ( checksumBlockOp = 0x55 ) +var errMalformedRPCMessage = errors.New("malformed RPC message") + // Used for client ID generation, below. const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" @@ -53,29 +55,46 @@ func makeRPCPacket(msgs ...proto.Message) ([]byte, error) { return packet, nil } -// Doesn't include the uint32 length -func readRPCPacket(b []byte, msgs ...proto.Message) error { - reader := bytes.NewReader(b) +func readRPCPacket(r io.Reader, msgs ...proto.Message) error { + var packetLength uint32 + err := binary.Read(r, binary.BigEndian, &packetLength) + if err != nil { + return err + } + + packet := make([]byte, packetLength) + _, err = io.ReadFull(r, packet) + if err != nil { + return err + } + for _, msg := range msgs { - msgLength, err := binary.ReadUvarint(reader) - if err != nil { - return err + // HDFS doesn't send all the response messages all the time (for example, if + // the RpcResponseHeaderProto contains an error). + if len(packet) == 0 { + return nil + } + + msgLength, n := binary.Uvarint(packet) + if n <= 0 || msgLength > uint64(len(packet)) { + return errMalformedRPCMessage } + packet = packet[n:] if msgLength != 0 { - msgBytes := make([]byte, msgLength) - _, err = reader.Read(msgBytes) + err = proto.Unmarshal(packet[:msgLength], msg) if err != nil { return err } - err = proto.Unmarshal(msgBytes, msg) - if err != nil { - return err - } + packet = packet[msgLength:] } } + if len(packet) > 0 { + return errMalformedRPCMessage + } + return nil } diff --git a/vendor/github.com/hashicorp/go-uuid/.travis.yml b/vendor/github.com/hashicorp/go-uuid/.travis.yml new file mode 100644 index 00000000..76984907 --- /dev/null +++ b/vendor/github.com/hashicorp/go-uuid/.travis.yml @@ -0,0 +1,12 @@ +language: go + +sudo: false + +go: + - 1.4 + - 1.5 + - 1.6 + - tip + +script: + - go test -bench . -benchmem -v ./... diff --git a/vendor/github.com/hashicorp/go-uuid/LICENSE b/vendor/github.com/hashicorp/go-uuid/LICENSE new file mode 100644 index 00000000..e87a115e --- /dev/null +++ b/vendor/github.com/hashicorp/go-uuid/LICENSE @@ -0,0 +1,363 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. + diff --git a/vendor/github.com/hashicorp/go-uuid/README.md b/vendor/github.com/hashicorp/go-uuid/README.md new file mode 100644 index 00000000..fbde8b9a --- /dev/null +++ b/vendor/github.com/hashicorp/go-uuid/README.md @@ -0,0 +1,8 @@ +# uuid [![Build Status](https://travis-ci.org/hashicorp/go-uuid.svg?branch=master)](https://travis-ci.org/hashicorp/go-uuid) + +Generates UUID-format strings using high quality, _purely random_ bytes. It is **not** intended to be RFC compliant, merely to use a well-understood string representation of a 128-bit value. It can also parse UUID-format strings into their component bytes. + +Documentation +============= + +The full documentation is available on [Godoc](http://godoc.org/github.com/hashicorp/go-uuid). diff --git a/vendor/github.com/hashicorp/go-uuid/uuid.go b/vendor/github.com/hashicorp/go-uuid/uuid.go new file mode 100644 index 00000000..ff9364c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-uuid/uuid.go @@ -0,0 +1,65 @@ +package uuid + +import ( + "crypto/rand" + "encoding/hex" + "fmt" +) + +// GenerateRandomBytes is used to generate random bytes of given size. +func GenerateRandomBytes(size int) ([]byte, error) { + buf := make([]byte, size) + if _, err := rand.Read(buf); err != nil { + return nil, fmt.Errorf("failed to read random bytes: %v", err) + } + return buf, nil +} + +// GenerateUUID is used to generate a random UUID +func GenerateUUID() (string, error) { + buf, err := GenerateRandomBytes(16) + if err != nil { + return "", err + } + return FormatUUID(buf) +} + +func FormatUUID(buf []byte) (string, error) { + if len(buf) != 16 { + return "", fmt.Errorf("wrong length byte slice (%d)", len(buf)) + } + + return fmt.Sprintf("%08x-%04x-%04x-%04x-%12x", + buf[0:4], + buf[4:6], + buf[6:8], + buf[8:10], + buf[10:16]), nil +} + +func ParseUUID(uuid string) ([]byte, error) { + if len(uuid) != 36 { + return nil, fmt.Errorf("uuid string is wrong length") + } + + hyph := []byte("-") + + if uuid[8] != hyph[0] || + uuid[13] != hyph[0] || + uuid[18] != hyph[0] || + uuid[23] != hyph[0] { + return nil, fmt.Errorf("uuid is improperly formatted") + } + + hexStr := uuid[0:8] + uuid[9:13] + uuid[14:18] + uuid[19:23] + uuid[24:36] + + ret, err := hex.DecodeString(hexStr) + if err != nil { + return nil, err + } + if len(ret) != 16 { + return nil, fmt.Errorf("decoded hex is the wrong length") + } + + return ret, nil +} diff --git a/vendor/github.com/jcmturner/gofork/LICENSE b/vendor/github.com/jcmturner/gofork/LICENSE new file mode 100644 index 00000000..6a66aea5 --- /dev/null +++ b/vendor/github.com/jcmturner/gofork/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/jcmturner/gofork/encoding/asn1/README.md b/vendor/github.com/jcmturner/gofork/encoding/asn1/README.md new file mode 100644 index 00000000..66a2a8cc --- /dev/null +++ b/vendor/github.com/jcmturner/gofork/encoding/asn1/README.md @@ -0,0 +1,5 @@ +This is a temporary repository that will be removed when the issues below are fixed in the core golang code. + +## Issues +* [encoding/asn1: cannot marshal into a GeneralString](https://github.com/golang/go/issues/18832) +* [encoding/asn1: cannot marshal into slice of strings and pass stringtype parameter tags to members](https://github.com/golang/go/issues/18834) \ No newline at end of file diff --git a/vendor/github.com/jcmturner/gofork/encoding/asn1/asn1.go b/vendor/github.com/jcmturner/gofork/encoding/asn1/asn1.go new file mode 100644 index 00000000..f1bb7671 --- /dev/null +++ b/vendor/github.com/jcmturner/gofork/encoding/asn1/asn1.go @@ -0,0 +1,1003 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package asn1 implements parsing of DER-encoded ASN.1 data structures, +// as defined in ITU-T Rec X.690. +// +// See also ``A Layman's Guide to a Subset of ASN.1, BER, and DER,'' +// http://luca.ntop.org/Teaching/Appunti/asn1.html. +package asn1 + +// ASN.1 is a syntax for specifying abstract objects and BER, DER, PER, XER etc +// are different encoding formats for those objects. Here, we'll be dealing +// with DER, the Distinguished Encoding Rules. DER is used in X.509 because +// it's fast to parse and, unlike BER, has a unique encoding for every object. +// When calculating hashes over objects, it's important that the resulting +// bytes be the same at both ends and DER removes this margin of error. +// +// ASN.1 is very complex and this package doesn't attempt to implement +// everything by any means. + +import ( + "errors" + "fmt" + "math/big" + "reflect" + "strconv" + "time" + "unicode/utf8" +) + +// A StructuralError suggests that the ASN.1 data is valid, but the Go type +// which is receiving it doesn't match. +type StructuralError struct { + Msg string +} + +func (e StructuralError) Error() string { return "asn1: structure error: " + e.Msg } + +// A SyntaxError suggests that the ASN.1 data is invalid. +type SyntaxError struct { + Msg string +} + +func (e SyntaxError) Error() string { return "asn1: syntax error: " + e.Msg } + +// We start by dealing with each of the primitive types in turn. + +// BOOLEAN + +func parseBool(bytes []byte) (ret bool, err error) { + if len(bytes) != 1 { + err = SyntaxError{"invalid boolean"} + return + } + + // DER demands that "If the encoding represents the boolean value TRUE, + // its single contents octet shall have all eight bits set to one." + // Thus only 0 and 255 are valid encoded values. + switch bytes[0] { + case 0: + ret = false + case 0xff: + ret = true + default: + err = SyntaxError{"invalid boolean"} + } + + return +} + +// INTEGER + +// checkInteger returns nil if the given bytes are a valid DER-encoded +// INTEGER and an error otherwise. +func checkInteger(bytes []byte) error { + if len(bytes) == 0 { + return StructuralError{"empty integer"} + } + if len(bytes) == 1 { + return nil + } + if (bytes[0] == 0 && bytes[1]&0x80 == 0) || (bytes[0] == 0xff && bytes[1]&0x80 == 0x80) { + return StructuralError{"integer not minimally-encoded"} + } + return nil +} + +// parseInt64 treats the given bytes as a big-endian, signed integer and +// returns the result. +func parseInt64(bytes []byte) (ret int64, err error) { + err = checkInteger(bytes) + if err != nil { + return + } + if len(bytes) > 8 { + // We'll overflow an int64 in this case. + err = StructuralError{"integer too large"} + return + } + for bytesRead := 0; bytesRead < len(bytes); bytesRead++ { + ret <<= 8 + ret |= int64(bytes[bytesRead]) + } + + // Shift up and down in order to sign extend the result. + ret <<= 64 - uint8(len(bytes))*8 + ret >>= 64 - uint8(len(bytes))*8 + return +} + +// parseInt treats the given bytes as a big-endian, signed integer and returns +// the result. +func parseInt32(bytes []byte) (int32, error) { + if err := checkInteger(bytes); err != nil { + return 0, err + } + ret64, err := parseInt64(bytes) + if err != nil { + return 0, err + } + if ret64 != int64(int32(ret64)) { + return 0, StructuralError{"integer too large"} + } + return int32(ret64), nil +} + +var bigOne = big.NewInt(1) + +// parseBigInt treats the given bytes as a big-endian, signed integer and returns +// the result. +func parseBigInt(bytes []byte) (*big.Int, error) { + if err := checkInteger(bytes); err != nil { + return nil, err + } + ret := new(big.Int) + if len(bytes) > 0 && bytes[0]&0x80 == 0x80 { + // This is a negative number. + notBytes := make([]byte, len(bytes)) + for i := range notBytes { + notBytes[i] = ^bytes[i] + } + ret.SetBytes(notBytes) + ret.Add(ret, bigOne) + ret.Neg(ret) + return ret, nil + } + ret.SetBytes(bytes) + return ret, nil +} + +// BIT STRING + +// BitString is the structure to use when you want an ASN.1 BIT STRING type. A +// bit string is padded up to the nearest byte in memory and the number of +// valid bits is recorded. Padding bits will be zero. +type BitString struct { + Bytes []byte // bits packed into bytes. + BitLength int // length in bits. +} + +// At returns the bit at the given index. If the index is out of range it +// returns false. +func (b BitString) At(i int) int { + if i < 0 || i >= b.BitLength { + return 0 + } + x := i / 8 + y := 7 - uint(i%8) + return int(b.Bytes[x]>>y) & 1 +} + +// RightAlign returns a slice where the padding bits are at the beginning. The +// slice may share memory with the BitString. +func (b BitString) RightAlign() []byte { + shift := uint(8 - (b.BitLength % 8)) + if shift == 8 || len(b.Bytes) == 0 { + return b.Bytes + } + + a := make([]byte, len(b.Bytes)) + a[0] = b.Bytes[0] >> shift + for i := 1; i < len(b.Bytes); i++ { + a[i] = b.Bytes[i-1] << (8 - shift) + a[i] |= b.Bytes[i] >> shift + } + + return a +} + +// parseBitString parses an ASN.1 bit string from the given byte slice and returns it. +func parseBitString(bytes []byte) (ret BitString, err error) { + if len(bytes) == 0 { + err = SyntaxError{"zero length BIT STRING"} + return + } + paddingBits := int(bytes[0]) + if paddingBits > 7 || + len(bytes) == 1 && paddingBits > 0 || + bytes[len(bytes)-1]&((1< 0 { + s += "." + } + s += strconv.Itoa(v) + } + + return s +} + +// parseObjectIdentifier parses an OBJECT IDENTIFIER from the given bytes and +// returns it. An object identifier is a sequence of variable length integers +// that are assigned in a hierarchy. +func parseObjectIdentifier(bytes []byte) (s []int, err error) { + if len(bytes) == 0 { + err = SyntaxError{"zero length OBJECT IDENTIFIER"} + return + } + + // In the worst case, we get two elements from the first byte (which is + // encoded differently) and then every varint is a single byte long. + s = make([]int, len(bytes)+1) + + // The first varint is 40*value1 + value2: + // According to this packing, value1 can take the values 0, 1 and 2 only. + // When value1 = 0 or value1 = 1, then value2 is <= 39. When value1 = 2, + // then there are no restrictions on value2. + v, offset, err := parseBase128Int(bytes, 0) + if err != nil { + return + } + if v < 80 { + s[0] = v / 40 + s[1] = v % 40 + } else { + s[0] = 2 + s[1] = v - 80 + } + + i := 2 + for ; offset < len(bytes); i++ { + v, offset, err = parseBase128Int(bytes, offset) + if err != nil { + return + } + s[i] = v + } + s = s[0:i] + return +} + +// ENUMERATED + +// An Enumerated is represented as a plain int. +type Enumerated int + +// FLAG + +// A Flag accepts any data and is set to true if present. +type Flag bool + +// parseBase128Int parses a base-128 encoded int from the given offset in the +// given byte slice. It returns the value and the new offset. +func parseBase128Int(bytes []byte, initOffset int) (ret, offset int, err error) { + offset = initOffset + for shifted := 0; offset < len(bytes); shifted++ { + if shifted == 4 { + err = StructuralError{"base 128 integer too large"} + return + } + ret <<= 7 + b := bytes[offset] + ret |= int(b & 0x7f) + offset++ + if b&0x80 == 0 { + return + } + } + err = SyntaxError{"truncated base 128 integer"} + return +} + +// UTCTime + +func parseUTCTime(bytes []byte) (ret time.Time, err error) { + s := string(bytes) + + formatStr := "0601021504Z0700" + ret, err = time.Parse(formatStr, s) + if err != nil { + formatStr = "060102150405Z0700" + ret, err = time.Parse(formatStr, s) + } + if err != nil { + return + } + + if serialized := ret.Format(formatStr); serialized != s { + err = fmt.Errorf("asn1: time did not serialize back to the original value and may be invalid: given %q, but serialized as %q", s, serialized) + return + } + + if ret.Year() >= 2050 { + // UTCTime only encodes times prior to 2050. See https://tools.ietf.org/html/rfc5280#section-4.1.2.5.1 + ret = ret.AddDate(-100, 0, 0) + } + + return +} + +// parseGeneralizedTime parses the GeneralizedTime from the given byte slice +// and returns the resulting time. +func parseGeneralizedTime(bytes []byte) (ret time.Time, err error) { + const formatStr = "20060102150405Z0700" + s := string(bytes) + + if ret, err = time.Parse(formatStr, s); err != nil { + return + } + + if serialized := ret.Format(formatStr); serialized != s { + err = fmt.Errorf("asn1: time did not serialize back to the original value and may be invalid: given %q, but serialized as %q", s, serialized) + } + + return +} + +// PrintableString + +// parsePrintableString parses a ASN.1 PrintableString from the given byte +// array and returns it. +func parsePrintableString(bytes []byte) (ret string, err error) { + for _, b := range bytes { + if !isPrintable(b) { + err = SyntaxError{"PrintableString contains invalid character"} + return + } + } + ret = string(bytes) + return +} + +// isPrintable reports whether the given b is in the ASN.1 PrintableString set. +func isPrintable(b byte) bool { + return 'a' <= b && b <= 'z' || + 'A' <= b && b <= 'Z' || + '0' <= b && b <= '9' || + '\'' <= b && b <= ')' || + '+' <= b && b <= '/' || + b == ' ' || + b == ':' || + b == '=' || + b == '?' || + // This is technically not allowed in a PrintableString. + // However, x509 certificates with wildcard strings don't + // always use the correct string type so we permit it. + b == '*' +} + +// IA5String + +// parseIA5String parses a ASN.1 IA5String (ASCII string) from the given +// byte slice and returns it. +func parseIA5String(bytes []byte) (ret string, err error) { + for _, b := range bytes { + if b >= utf8.RuneSelf { + err = SyntaxError{"IA5String contains invalid character"} + return + } + } + ret = string(bytes) + return +} + +// T61String + +// parseT61String parses a ASN.1 T61String (8-bit clean string) from the given +// byte slice and returns it. +func parseT61String(bytes []byte) (ret string, err error) { + return string(bytes), nil +} + +// UTF8String + +// parseUTF8String parses a ASN.1 UTF8String (raw UTF-8) from the given byte +// array and returns it. +func parseUTF8String(bytes []byte) (ret string, err error) { + if !utf8.Valid(bytes) { + return "", errors.New("asn1: invalid UTF-8 string") + } + return string(bytes), nil +} + +// A RawValue represents an undecoded ASN.1 object. +type RawValue struct { + Class, Tag int + IsCompound bool + Bytes []byte + FullBytes []byte // includes the tag and length +} + +// RawContent is used to signal that the undecoded, DER data needs to be +// preserved for a struct. To use it, the first field of the struct must have +// this type. It's an error for any of the other fields to have this type. +type RawContent []byte + +// Tagging + +// parseTagAndLength parses an ASN.1 tag and length pair from the given offset +// into a byte slice. It returns the parsed data and the new offset. SET and +// SET OF (tag 17) are mapped to SEQUENCE and SEQUENCE OF (tag 16) since we +// don't distinguish between ordered and unordered objects in this code. +func parseTagAndLength(bytes []byte, initOffset int) (ret tagAndLength, offset int, err error) { + offset = initOffset + // parseTagAndLength should not be called without at least a single + // byte to read. Thus this check is for robustness: + if offset >= len(bytes) { + err = errors.New("asn1: internal error in parseTagAndLength") + return + } + b := bytes[offset] + offset++ + ret.class = int(b >> 6) + ret.isCompound = b&0x20 == 0x20 + ret.tag = int(b & 0x1f) + + // If the bottom five bits are set, then the tag number is actually base 128 + // encoded afterwards + if ret.tag == 0x1f { + ret.tag, offset, err = parseBase128Int(bytes, offset) + if err != nil { + return + } + // Tags should be encoded in minimal form. + if ret.tag < 0x1f { + err = SyntaxError{"non-minimal tag"} + return + } + } + if offset >= len(bytes) { + err = SyntaxError{"truncated tag or length"} + return + } + b = bytes[offset] + offset++ + if b&0x80 == 0 { + // The length is encoded in the bottom 7 bits. + ret.length = int(b & 0x7f) + } else { + // Bottom 7 bits give the number of length bytes to follow. + numBytes := int(b & 0x7f) + if numBytes == 0 { + err = SyntaxError{"indefinite length found (not DER)"} + return + } + ret.length = 0 + for i := 0; i < numBytes; i++ { + if offset >= len(bytes) { + err = SyntaxError{"truncated tag or length"} + return + } + b = bytes[offset] + offset++ + if ret.length >= 1<<23 { + // We can't shift ret.length up without + // overflowing. + err = StructuralError{"length too large"} + return + } + ret.length <<= 8 + ret.length |= int(b) + if ret.length == 0 { + // DER requires that lengths be minimal. + err = StructuralError{"superfluous leading zeros in length"} + return + } + } + // Short lengths must be encoded in short form. + if ret.length < 0x80 { + err = StructuralError{"non-minimal length"} + return + } + } + + return +} + +// parseSequenceOf is used for SEQUENCE OF and SET OF values. It tries to parse +// a number of ASN.1 values from the given byte slice and returns them as a +// slice of Go values of the given type. +func parseSequenceOf(bytes []byte, sliceType reflect.Type, elemType reflect.Type) (ret reflect.Value, err error) { + expectedTag, compoundType, ok := getUniversalType(elemType) + if !ok { + err = StructuralError{"unknown Go type for slice"} + return + } + + // First we iterate over the input and count the number of elements, + // checking that the types are correct in each case. + numElements := 0 + for offset := 0; offset < len(bytes); { + var t tagAndLength + t, offset, err = parseTagAndLength(bytes, offset) + if err != nil { + return + } + switch t.tag { + case TagIA5String, TagGeneralString, TagT61String, TagUTF8String: + // We pretend that various other string types are + // PRINTABLE STRINGs so that a sequence of them can be + // parsed into a []string. + t.tag = TagPrintableString + case TagGeneralizedTime, TagUTCTime: + // Likewise, both time types are treated the same. + t.tag = TagUTCTime + } + + if t.class != ClassUniversal || t.isCompound != compoundType || t.tag != expectedTag { + err = StructuralError{"sequence tag mismatch"} + return + } + if invalidLength(offset, t.length, len(bytes)) { + err = SyntaxError{"truncated sequence"} + return + } + offset += t.length + numElements++ + } + ret = reflect.MakeSlice(sliceType, numElements, numElements) + params := fieldParameters{} + offset := 0 + for i := 0; i < numElements; i++ { + offset, err = parseField(ret.Index(i), bytes, offset, params) + if err != nil { + return + } + } + return +} + +var ( + bitStringType = reflect.TypeOf(BitString{}) + objectIdentifierType = reflect.TypeOf(ObjectIdentifier{}) + enumeratedType = reflect.TypeOf(Enumerated(0)) + flagType = reflect.TypeOf(Flag(false)) + timeType = reflect.TypeOf(time.Time{}) + rawValueType = reflect.TypeOf(RawValue{}) + rawContentsType = reflect.TypeOf(RawContent(nil)) + bigIntType = reflect.TypeOf(new(big.Int)) +) + +// invalidLength returns true iff offset + length > sliceLength, or if the +// addition would overflow. +func invalidLength(offset, length, sliceLength int) bool { + return offset+length < offset || offset+length > sliceLength +} + +// parseField is the main parsing function. Given a byte slice and an offset +// into the array, it will try to parse a suitable ASN.1 value out and store it +// in the given Value. +func parseField(v reflect.Value, bytes []byte, initOffset int, params fieldParameters) (offset int, err error) { + offset = initOffset + fieldType := v.Type() + + // If we have run out of data, it may be that there are optional elements at the end. + if offset == len(bytes) { + if !setDefaultValue(v, params) { + err = SyntaxError{"sequence truncated"} + } + return + } + + // Deal with raw values. + if fieldType == rawValueType { + var t tagAndLength + t, offset, err = parseTagAndLength(bytes, offset) + if err != nil { + return + } + if invalidLength(offset, t.length, len(bytes)) { + err = SyntaxError{"data truncated"} + return + } + result := RawValue{t.class, t.tag, t.isCompound, bytes[offset : offset+t.length], bytes[initOffset : offset+t.length]} + offset += t.length + v.Set(reflect.ValueOf(result)) + return + } + + // Deal with the ANY type. + if ifaceType := fieldType; ifaceType.Kind() == reflect.Interface && ifaceType.NumMethod() == 0 { + var t tagAndLength + t, offset, err = parseTagAndLength(bytes, offset) + if err != nil { + return + } + if invalidLength(offset, t.length, len(bytes)) { + err = SyntaxError{"data truncated"} + return + } + var result interface{} + if !t.isCompound && t.class == ClassUniversal { + innerBytes := bytes[offset : offset+t.length] + switch t.tag { + case TagPrintableString: + result, err = parsePrintableString(innerBytes) + case TagIA5String: + result, err = parseIA5String(innerBytes) + // jtasn1 addition of following case + case TagGeneralString: + result, err = parseIA5String(innerBytes) + case TagT61String: + result, err = parseT61String(innerBytes) + case TagUTF8String: + result, err = parseUTF8String(innerBytes) + case TagInteger: + result, err = parseInt64(innerBytes) + case TagBitString: + result, err = parseBitString(innerBytes) + case TagOID: + result, err = parseObjectIdentifier(innerBytes) + case TagUTCTime: + result, err = parseUTCTime(innerBytes) + case TagGeneralizedTime: + result, err = parseGeneralizedTime(innerBytes) + case TagOctetString: + result = innerBytes + default: + // If we don't know how to handle the type, we just leave Value as nil. + } + } + offset += t.length + if err != nil { + return + } + if result != nil { + v.Set(reflect.ValueOf(result)) + } + return + } + universalTag, compoundType, ok1 := getUniversalType(fieldType) + if !ok1 { + err = StructuralError{fmt.Sprintf("unknown Go type: %v", fieldType)} + return + } + + t, offset, err := parseTagAndLength(bytes, offset) + if err != nil { + return + } + if params.explicit { + expectedClass := ClassContextSpecific + if params.application { + expectedClass = ClassApplication + } + if offset == len(bytes) { + err = StructuralError{"explicit tag has no child"} + return + } + if t.class == expectedClass && t.tag == *params.tag && (t.length == 0 || t.isCompound) { + if t.length > 0 { + t, offset, err = parseTagAndLength(bytes, offset) + if err != nil { + return + } + } else { + if fieldType != flagType { + err = StructuralError{"zero length explicit tag was not an asn1.Flag"} + return + } + v.SetBool(true) + return + } + } else { + // The tags didn't match, it might be an optional element. + ok := setDefaultValue(v, params) + if ok { + offset = initOffset + } else { + err = StructuralError{"explicitly tagged member didn't match"} + } + return + } + } + + // Special case for strings: all the ASN.1 string types map to the Go + // type string. getUniversalType returns the tag for PrintableString + // when it sees a string, so if we see a different string type on the + // wire, we change the universal type to match. + if universalTag == TagPrintableString { + if t.class == ClassUniversal { + switch t.tag { + case TagIA5String, TagGeneralString, TagT61String, TagUTF8String: + universalTag = t.tag + } + } else if params.stringType != 0 { + universalTag = params.stringType + } + } + + // Special case for time: UTCTime and GeneralizedTime both map to the + // Go type time.Time. + if universalTag == TagUTCTime && t.tag == TagGeneralizedTime && t.class == ClassUniversal { + universalTag = TagGeneralizedTime + } + + if params.set { + universalTag = TagSet + } + + expectedClass := ClassUniversal + expectedTag := universalTag + + if !params.explicit && params.tag != nil { + expectedClass = ClassContextSpecific + expectedTag = *params.tag + } + + if !params.explicit && params.application && params.tag != nil { + expectedClass = ClassApplication + expectedTag = *params.tag + } + + // We have unwrapped any explicit tagging at this point. + if t.class != expectedClass || t.tag != expectedTag || t.isCompound != compoundType { + // Tags don't match. Again, it could be an optional element. + ok := setDefaultValue(v, params) + if ok { + offset = initOffset + } else { + err = StructuralError{fmt.Sprintf("tags don't match (%d vs %+v) %+v %s @%d", expectedTag, t, params, fieldType.Name(), offset)} + } + return + } + if invalidLength(offset, t.length, len(bytes)) { + err = SyntaxError{"data truncated"} + return + } + innerBytes := bytes[offset : offset+t.length] + offset += t.length + + // We deal with the structures defined in this package first. + switch fieldType { + case objectIdentifierType: + newSlice, err1 := parseObjectIdentifier(innerBytes) + v.Set(reflect.MakeSlice(v.Type(), len(newSlice), len(newSlice))) + if err1 == nil { + reflect.Copy(v, reflect.ValueOf(newSlice)) + } + err = err1 + return + case bitStringType: + bs, err1 := parseBitString(innerBytes) + if err1 == nil { + v.Set(reflect.ValueOf(bs)) + } + err = err1 + return + case timeType: + var time time.Time + var err1 error + if universalTag == TagUTCTime { + time, err1 = parseUTCTime(innerBytes) + } else { + time, err1 = parseGeneralizedTime(innerBytes) + } + if err1 == nil { + v.Set(reflect.ValueOf(time)) + } + err = err1 + return + case enumeratedType: + parsedInt, err1 := parseInt32(innerBytes) + if err1 == nil { + v.SetInt(int64(parsedInt)) + } + err = err1 + return + case flagType: + v.SetBool(true) + return + case bigIntType: + parsedInt, err1 := parseBigInt(innerBytes) + if err1 == nil { + v.Set(reflect.ValueOf(parsedInt)) + } + err = err1 + return + } + switch val := v; val.Kind() { + case reflect.Bool: + parsedBool, err1 := parseBool(innerBytes) + if err1 == nil { + val.SetBool(parsedBool) + } + err = err1 + return + case reflect.Int, reflect.Int32, reflect.Int64: + if val.Type().Size() == 4 { + parsedInt, err1 := parseInt32(innerBytes) + if err1 == nil { + val.SetInt(int64(parsedInt)) + } + err = err1 + } else { + parsedInt, err1 := parseInt64(innerBytes) + if err1 == nil { + val.SetInt(parsedInt) + } + err = err1 + } + return + // TODO(dfc) Add support for the remaining integer types + case reflect.Struct: + structType := fieldType + + if structType.NumField() > 0 && + structType.Field(0).Type == rawContentsType { + bytes := bytes[initOffset:offset] + val.Field(0).Set(reflect.ValueOf(RawContent(bytes))) + } + + innerOffset := 0 + for i := 0; i < structType.NumField(); i++ { + field := structType.Field(i) + if i == 0 && field.Type == rawContentsType { + continue + } + innerOffset, err = parseField(val.Field(i), innerBytes, innerOffset, parseFieldParameters(field.Tag.Get("asn1"))) + if err != nil { + return + } + } + // We allow extra bytes at the end of the SEQUENCE because + // adding elements to the end has been used in X.509 as the + // version numbers have increased. + return + case reflect.Slice: + sliceType := fieldType + if sliceType.Elem().Kind() == reflect.Uint8 { + val.Set(reflect.MakeSlice(sliceType, len(innerBytes), len(innerBytes))) + reflect.Copy(val, reflect.ValueOf(innerBytes)) + return + } + newSlice, err1 := parseSequenceOf(innerBytes, sliceType, sliceType.Elem()) + if err1 == nil { + val.Set(newSlice) + } + err = err1 + return + case reflect.String: + var v string + switch universalTag { + case TagPrintableString: + v, err = parsePrintableString(innerBytes) + case TagIA5String: + v, err = parseIA5String(innerBytes) + case TagT61String: + v, err = parseT61String(innerBytes) + case TagUTF8String: + v, err = parseUTF8String(innerBytes) + case TagGeneralString: + // GeneralString is specified in ISO-2022/ECMA-35, + // A brief review suggests that it includes structures + // that allow the encoding to change midstring and + // such. We give up and pass it as an 8-bit string. + v, err = parseT61String(innerBytes) + default: + err = SyntaxError{fmt.Sprintf("internal error: unknown string type %d", universalTag)} + } + if err == nil { + val.SetString(v) + } + return + } + err = StructuralError{"unsupported: " + v.Type().String()} + return +} + +// canHaveDefaultValue reports whether k is a Kind that we will set a default +// value for. (A signed integer, essentially.) +func canHaveDefaultValue(k reflect.Kind) bool { + switch k { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return true + } + + return false +} + +// setDefaultValue is used to install a default value, from a tag string, into +// a Value. It is successful if the field was optional, even if a default value +// wasn't provided or it failed to install it into the Value. +func setDefaultValue(v reflect.Value, params fieldParameters) (ok bool) { + if !params.optional { + return + } + ok = true + if params.defaultValue == nil { + return + } + if canHaveDefaultValue(v.Kind()) { + v.SetInt(*params.defaultValue) + } + return +} + +// Unmarshal parses the DER-encoded ASN.1 data structure b +// and uses the reflect package to fill in an arbitrary value pointed at by val. +// Because Unmarshal uses the reflect package, the structs +// being written to must use upper case field names. +// +// An ASN.1 INTEGER can be written to an int, int32, int64, +// or *big.Int (from the math/big package). +// If the encoded value does not fit in the Go type, +// Unmarshal returns a parse error. +// +// An ASN.1 BIT STRING can be written to a BitString. +// +// An ASN.1 OCTET STRING can be written to a []byte. +// +// An ASN.1 OBJECT IDENTIFIER can be written to an +// ObjectIdentifier. +// +// An ASN.1 ENUMERATED can be written to an Enumerated. +// +// An ASN.1 UTCTIME or GENERALIZEDTIME can be written to a time.Time. +// +// An ASN.1 PrintableString or IA5String can be written to a string. +// +// Any of the above ASN.1 values can be written to an interface{}. +// The value stored in the interface has the corresponding Go type. +// For integers, that type is int64. +// +// An ASN.1 SEQUENCE OF x or SET OF x can be written +// to a slice if an x can be written to the slice's element type. +// +// An ASN.1 SEQUENCE or SET can be written to a struct +// if each of the elements in the sequence can be +// written to the corresponding element in the struct. +// +// The following tags on struct fields have special meaning to Unmarshal: +// +// application specifies that a APPLICATION tag is used +// default:x sets the default value for optional integer fields +// explicit specifies that an additional, explicit tag wraps the implicit one +// optional marks the field as ASN.1 OPTIONAL +// set causes a SET, rather than a SEQUENCE type to be expected +// tag:x specifies the ASN.1 tag number; implies ASN.1 CONTEXT SPECIFIC +// +// If the type of the first field of a structure is RawContent then the raw +// ASN1 contents of the struct will be stored in it. +// +// If the type name of a slice element ends with "SET" then it's treated as if +// the "set" tag was set on it. This can be used with nested slices where a +// struct tag cannot be given. +// +// Other ASN.1 types are not supported; if it encounters them, +// Unmarshal returns a parse error. +func Unmarshal(b []byte, val interface{}) (rest []byte, err error) { + return UnmarshalWithParams(b, val, "") +} + +// UnmarshalWithParams allows field parameters to be specified for the +// top-level element. The form of the params is the same as the field tags. +func UnmarshalWithParams(b []byte, val interface{}, params string) (rest []byte, err error) { + v := reflect.ValueOf(val).Elem() + offset, err := parseField(v, b, 0, parseFieldParameters(params)) + if err != nil { + return nil, err + } + return b[offset:], nil +} diff --git a/vendor/github.com/jcmturner/gofork/encoding/asn1/common.go b/vendor/github.com/jcmturner/gofork/encoding/asn1/common.go new file mode 100644 index 00000000..7a9da49f --- /dev/null +++ b/vendor/github.com/jcmturner/gofork/encoding/asn1/common.go @@ -0,0 +1,173 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package asn1 + +import ( + "reflect" + "strconv" + "strings" +) + +// ASN.1 objects have metadata preceding them: +// the tag: the type of the object +// a flag denoting if this object is compound or not +// the class type: the namespace of the tag +// the length of the object, in bytes + +// Here are some standard tags and classes + +// ASN.1 tags represent the type of the following object. +const ( + TagBoolean = 1 + TagInteger = 2 + TagBitString = 3 + TagOctetString = 4 + TagOID = 6 + TagEnum = 10 + TagUTF8String = 12 + TagSequence = 16 + TagSet = 17 + TagPrintableString = 19 + TagT61String = 20 + TagIA5String = 22 + TagUTCTime = 23 + TagGeneralizedTime = 24 + TagGeneralString = 27 +) + +// ASN.1 class types represent the namespace of the tag. +const ( + ClassUniversal = 0 + ClassApplication = 1 + ClassContextSpecific = 2 + ClassPrivate = 3 +) + +type tagAndLength struct { + class, tag, length int + isCompound bool +} + +// ASN.1 has IMPLICIT and EXPLICIT tags, which can be translated as "instead +// of" and "in addition to". When not specified, every primitive type has a +// default tag in the UNIVERSAL class. +// +// For example: a BIT STRING is tagged [UNIVERSAL 3] by default (although ASN.1 +// doesn't actually have a UNIVERSAL keyword). However, by saying [IMPLICIT +// CONTEXT-SPECIFIC 42], that means that the tag is replaced by another. +// +// On the other hand, if it said [EXPLICIT CONTEXT-SPECIFIC 10], then an +// /additional/ tag would wrap the default tag. This explicit tag will have the +// compound flag set. +// +// (This is used in order to remove ambiguity with optional elements.) +// +// You can layer EXPLICIT and IMPLICIT tags to an arbitrary depth, however we +// don't support that here. We support a single layer of EXPLICIT or IMPLICIT +// tagging with tag strings on the fields of a structure. + +// fieldParameters is the parsed representation of tag string from a structure field. +type fieldParameters struct { + optional bool // true iff the field is OPTIONAL + explicit bool // true iff an EXPLICIT tag is in use. + application bool // true iff an APPLICATION tag is in use. + defaultValue *int64 // a default value for INTEGER typed fields (maybe nil). + tag *int // the EXPLICIT or IMPLICIT tag (maybe nil). + stringType int // the string tag to use when marshaling. + timeType int // the time tag to use when marshaling. + set bool // true iff this should be encoded as a SET + omitEmpty bool // true iff this should be omitted if empty when marshaling. + + // Invariants: + // if explicit is set, tag is non-nil. +} + +// Given a tag string with the format specified in the package comment, +// parseFieldParameters will parse it into a fieldParameters structure, +// ignoring unknown parts of the string. +func parseFieldParameters(str string) (ret fieldParameters) { + for _, part := range strings.Split(str, ",") { + switch { + case part == "optional": + ret.optional = true + case part == "explicit": + ret.explicit = true + if ret.tag == nil { + ret.tag = new(int) + } + case part == "generalized": + ret.timeType = TagGeneralizedTime + case part == "utc": + ret.timeType = TagUTCTime + case part == "ia5": + ret.stringType = TagIA5String + // jtasn1 case below added + case part == "generalstring": + ret.stringType = TagGeneralString + case part == "printable": + ret.stringType = TagPrintableString + case part == "utf8": + ret.stringType = TagUTF8String + case strings.HasPrefix(part, "default:"): + i, err := strconv.ParseInt(part[8:], 10, 64) + if err == nil { + ret.defaultValue = new(int64) + *ret.defaultValue = i + } + case strings.HasPrefix(part, "tag:"): + i, err := strconv.Atoi(part[4:]) + if err == nil { + ret.tag = new(int) + *ret.tag = i + } + case part == "set": + ret.set = true + case part == "application": + ret.application = true + if ret.tag == nil { + ret.tag = new(int) + } + case part == "omitempty": + ret.omitEmpty = true + } + } + return +} + +// Given a reflected Go type, getUniversalType returns the default tag number +// and expected compound flag. +func getUniversalType(t reflect.Type) (tagNumber int, isCompound, ok bool) { + switch t { + case objectIdentifierType: + return TagOID, false, true + case bitStringType: + return TagBitString, false, true + case timeType: + return TagUTCTime, false, true + case enumeratedType: + return TagEnum, false, true + case bigIntType: + return TagInteger, false, true + } + switch t.Kind() { + case reflect.Bool: + return TagBoolean, false, true + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return TagInteger, false, true + case reflect.Struct: + return TagSequence, true, true + case reflect.Slice: + if t.Elem().Kind() == reflect.Uint8 { + return TagOctetString, false, true + } + if strings.HasSuffix(t.Name(), "SET") { + return TagSet, true, true + } + return TagSequence, true, true + case reflect.String: + return TagPrintableString, false, true + } + return 0, false, false +} diff --git a/vendor/github.com/jcmturner/gofork/encoding/asn1/marshal.go b/vendor/github.com/jcmturner/gofork/encoding/asn1/marshal.go new file mode 100644 index 00000000..f52eee9d --- /dev/null +++ b/vendor/github.com/jcmturner/gofork/encoding/asn1/marshal.go @@ -0,0 +1,659 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package asn1 + +import ( + "bytes" + "errors" + "fmt" + "io" + "math/big" + "reflect" + "time" + "unicode/utf8" +) + +// A forkableWriter is an in-memory buffer that can be +// 'forked' to create new forkableWriters that bracket the +// original. After +// pre, post := w.fork() +// the overall sequence of bytes represented is logically w+pre+post. +type forkableWriter struct { + *bytes.Buffer + pre, post *forkableWriter +} + +func newForkableWriter() *forkableWriter { + return &forkableWriter{new(bytes.Buffer), nil, nil} +} + +func (f *forkableWriter) fork() (pre, post *forkableWriter) { + if f.pre != nil || f.post != nil { + panic("have already forked") + } + f.pre = newForkableWriter() + f.post = newForkableWriter() + return f.pre, f.post +} + +func (f *forkableWriter) Len() (l int) { + l += f.Buffer.Len() + if f.pre != nil { + l += f.pre.Len() + } + if f.post != nil { + l += f.post.Len() + } + return +} + +func (f *forkableWriter) writeTo(out io.Writer) (n int, err error) { + n, err = out.Write(f.Bytes()) + if err != nil { + return + } + + var nn int + + if f.pre != nil { + nn, err = f.pre.writeTo(out) + n += nn + if err != nil { + return + } + } + + if f.post != nil { + nn, err = f.post.writeTo(out) + n += nn + } + return +} + +func marshalBase128Int(out *forkableWriter, n int64) (err error) { + if n == 0 { + err = out.WriteByte(0) + return + } + + l := 0 + for i := n; i > 0; i >>= 7 { + l++ + } + + for i := l - 1; i >= 0; i-- { + o := byte(n >> uint(i*7)) + o &= 0x7f + if i != 0 { + o |= 0x80 + } + err = out.WriteByte(o) + if err != nil { + return + } + } + + return nil +} + +func marshalInt64(out *forkableWriter, i int64) (err error) { + n := int64Length(i) + + for ; n > 0; n-- { + err = out.WriteByte(byte(i >> uint((n-1)*8))) + if err != nil { + return + } + } + + return nil +} + +func int64Length(i int64) (numBytes int) { + numBytes = 1 + + for i > 127 { + numBytes++ + i >>= 8 + } + + for i < -128 { + numBytes++ + i >>= 8 + } + + return +} + +func marshalBigInt(out *forkableWriter, n *big.Int) (err error) { + if n.Sign() < 0 { + // A negative number has to be converted to two's-complement + // form. So we'll subtract 1 and invert. If the + // most-significant-bit isn't set then we'll need to pad the + // beginning with 0xff in order to keep the number negative. + nMinus1 := new(big.Int).Neg(n) + nMinus1.Sub(nMinus1, bigOne) + bytes := nMinus1.Bytes() + for i := range bytes { + bytes[i] ^= 0xff + } + if len(bytes) == 0 || bytes[0]&0x80 == 0 { + err = out.WriteByte(0xff) + if err != nil { + return + } + } + _, err = out.Write(bytes) + } else if n.Sign() == 0 { + // Zero is written as a single 0 zero rather than no bytes. + err = out.WriteByte(0x00) + } else { + bytes := n.Bytes() + if len(bytes) > 0 && bytes[0]&0x80 != 0 { + // We'll have to pad this with 0x00 in order to stop it + // looking like a negative number. + err = out.WriteByte(0) + if err != nil { + return + } + } + _, err = out.Write(bytes) + } + return +} + +func marshalLength(out *forkableWriter, i int) (err error) { + n := lengthLength(i) + + for ; n > 0; n-- { + err = out.WriteByte(byte(i >> uint((n-1)*8))) + if err != nil { + return + } + } + + return nil +} + +func lengthLength(i int) (numBytes int) { + numBytes = 1 + for i > 255 { + numBytes++ + i >>= 8 + } + return +} + +func marshalTagAndLength(out *forkableWriter, t tagAndLength) (err error) { + b := uint8(t.class) << 6 + if t.isCompound { + b |= 0x20 + } + if t.tag >= 31 { + b |= 0x1f + err = out.WriteByte(b) + if err != nil { + return + } + err = marshalBase128Int(out, int64(t.tag)) + if err != nil { + return + } + } else { + b |= uint8(t.tag) + err = out.WriteByte(b) + if err != nil { + return + } + } + + if t.length >= 128 { + l := lengthLength(t.length) + err = out.WriteByte(0x80 | byte(l)) + if err != nil { + return + } + err = marshalLength(out, t.length) + if err != nil { + return + } + } else { + err = out.WriteByte(byte(t.length)) + if err != nil { + return + } + } + + return nil +} + +func marshalBitString(out *forkableWriter, b BitString) (err error) { + paddingBits := byte((8 - b.BitLength%8) % 8) + err = out.WriteByte(paddingBits) + if err != nil { + return + } + _, err = out.Write(b.Bytes) + return +} + +func marshalObjectIdentifier(out *forkableWriter, oid []int) (err error) { + if len(oid) < 2 || oid[0] > 2 || (oid[0] < 2 && oid[1] >= 40) { + return StructuralError{"invalid object identifier"} + } + + err = marshalBase128Int(out, int64(oid[0]*40+oid[1])) + if err != nil { + return + } + for i := 2; i < len(oid); i++ { + err = marshalBase128Int(out, int64(oid[i])) + if err != nil { + return + } + } + + return +} + +func marshalPrintableString(out *forkableWriter, s string) (err error) { + b := []byte(s) + for _, c := range b { + if !isPrintable(c) { + return StructuralError{"PrintableString contains invalid character"} + } + } + + _, err = out.Write(b) + return +} + +func marshalIA5String(out *forkableWriter, s string) (err error) { + b := []byte(s) + for _, c := range b { + if c > 127 { + return StructuralError{"IA5String contains invalid character"} + } + } + + _, err = out.Write(b) + return +} + +func marshalUTF8String(out *forkableWriter, s string) (err error) { + _, err = out.Write([]byte(s)) + return +} + +func marshalTwoDigits(out *forkableWriter, v int) (err error) { + err = out.WriteByte(byte('0' + (v/10)%10)) + if err != nil { + return + } + return out.WriteByte(byte('0' + v%10)) +} + +func marshalFourDigits(out *forkableWriter, v int) (err error) { + var bytes [4]byte + for i := range bytes { + bytes[3-i] = '0' + byte(v%10) + v /= 10 + } + _, err = out.Write(bytes[:]) + return +} + +func outsideUTCRange(t time.Time) bool { + year := t.Year() + return year < 1950 || year >= 2050 +} + +func marshalUTCTime(out *forkableWriter, t time.Time) (err error) { + year := t.Year() + + switch { + case 1950 <= year && year < 2000: + err = marshalTwoDigits(out, year-1900) + case 2000 <= year && year < 2050: + err = marshalTwoDigits(out, year-2000) + default: + return StructuralError{"cannot represent time as UTCTime"} + } + if err != nil { + return + } + + return marshalTimeCommon(out, t) +} + +func marshalGeneralizedTime(out *forkableWriter, t time.Time) (err error) { + year := t.Year() + if year < 0 || year > 9999 { + return StructuralError{"cannot represent time as GeneralizedTime"} + } + if err = marshalFourDigits(out, year); err != nil { + return + } + + return marshalTimeCommon(out, t) +} + +func marshalTimeCommon(out *forkableWriter, t time.Time) (err error) { + _, month, day := t.Date() + + err = marshalTwoDigits(out, int(month)) + if err != nil { + return + } + + err = marshalTwoDigits(out, day) + if err != nil { + return + } + + hour, min, sec := t.Clock() + + err = marshalTwoDigits(out, hour) + if err != nil { + return + } + + err = marshalTwoDigits(out, min) + if err != nil { + return + } + + err = marshalTwoDigits(out, sec) + if err != nil { + return + } + + _, offset := t.Zone() + + switch { + case offset/60 == 0: + err = out.WriteByte('Z') + return + case offset > 0: + err = out.WriteByte('+') + case offset < 0: + err = out.WriteByte('-') + } + + if err != nil { + return + } + + offsetMinutes := offset / 60 + if offsetMinutes < 0 { + offsetMinutes = -offsetMinutes + } + + err = marshalTwoDigits(out, offsetMinutes/60) + if err != nil { + return + } + + err = marshalTwoDigits(out, offsetMinutes%60) + return +} + +func stripTagAndLength(in []byte) []byte { + _, offset, err := parseTagAndLength(in, 0) + if err != nil { + return in + } + return in[offset:] +} + +func marshalBody(out *forkableWriter, value reflect.Value, params fieldParameters) (err error) { + switch value.Type() { + case flagType: + return nil + case timeType: + t := value.Interface().(time.Time) + if params.timeType == TagGeneralizedTime || outsideUTCRange(t) { + return marshalGeneralizedTime(out, t) + } else { + return marshalUTCTime(out, t) + } + case bitStringType: + return marshalBitString(out, value.Interface().(BitString)) + case objectIdentifierType: + return marshalObjectIdentifier(out, value.Interface().(ObjectIdentifier)) + case bigIntType: + return marshalBigInt(out, value.Interface().(*big.Int)) + } + + switch v := value; v.Kind() { + case reflect.Bool: + if v.Bool() { + return out.WriteByte(255) + } else { + return out.WriteByte(0) + } + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return marshalInt64(out, v.Int()) + case reflect.Struct: + t := v.Type() + + startingField := 0 + + // If the first element of the structure is a non-empty + // RawContents, then we don't bother serializing the rest. + if t.NumField() > 0 && t.Field(0).Type == rawContentsType { + s := v.Field(0) + if s.Len() > 0 { + bytes := make([]byte, s.Len()) + for i := 0; i < s.Len(); i++ { + bytes[i] = uint8(s.Index(i).Uint()) + } + /* The RawContents will contain the tag and + * length fields but we'll also be writing + * those ourselves, so we strip them out of + * bytes */ + _, err = out.Write(stripTagAndLength(bytes)) + return + } else { + startingField = 1 + } + } + + for i := startingField; i < t.NumField(); i++ { + var pre *forkableWriter + pre, out = out.fork() + err = marshalField(pre, v.Field(i), parseFieldParameters(t.Field(i).Tag.Get("asn1"))) + if err != nil { + return + } + } + return + case reflect.Slice: + sliceType := v.Type() + if sliceType.Elem().Kind() == reflect.Uint8 { + bytes := make([]byte, v.Len()) + for i := 0; i < v.Len(); i++ { + bytes[i] = uint8(v.Index(i).Uint()) + } + _, err = out.Write(bytes) + return + } + + // jtasn1 Pass on the tags to the members but need to unset explicit switch and implicit value + //var fp fieldParameters + params.explicit = false + params.tag = nil + for i := 0; i < v.Len(); i++ { + var pre *forkableWriter + pre, out = out.fork() + err = marshalField(pre, v.Index(i), params) + if err != nil { + return + } + } + return + case reflect.String: + switch params.stringType { + case TagIA5String: + return marshalIA5String(out, v.String()) + case TagPrintableString: + return marshalPrintableString(out, v.String()) + default: + return marshalUTF8String(out, v.String()) + } + } + + return StructuralError{"unknown Go type"} +} + +func marshalField(out *forkableWriter, v reflect.Value, params fieldParameters) (err error) { + if !v.IsValid() { + return fmt.Errorf("asn1: cannot marshal nil value") + } + // If the field is an interface{} then recurse into it. + if v.Kind() == reflect.Interface && v.Type().NumMethod() == 0 { + return marshalField(out, v.Elem(), params) + } + + if v.Kind() == reflect.Slice && v.Len() == 0 && params.omitEmpty { + return + } + + if params.optional && params.defaultValue != nil && canHaveDefaultValue(v.Kind()) { + defaultValue := reflect.New(v.Type()).Elem() + defaultValue.SetInt(*params.defaultValue) + + if reflect.DeepEqual(v.Interface(), defaultValue.Interface()) { + return + } + } + + // If no default value is given then the zero value for the type is + // assumed to be the default value. This isn't obviously the correct + // behaviour, but it's what Go has traditionally done. + if params.optional && params.defaultValue == nil { + if reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface()) { + return + } + } + + if v.Type() == rawValueType { + rv := v.Interface().(RawValue) + if len(rv.FullBytes) != 0 { + _, err = out.Write(rv.FullBytes) + } else { + err = marshalTagAndLength(out, tagAndLength{rv.Class, rv.Tag, len(rv.Bytes), rv.IsCompound}) + if err != nil { + return + } + _, err = out.Write(rv.Bytes) + } + return + } + + tag, isCompound, ok := getUniversalType(v.Type()) + if !ok { + err = StructuralError{fmt.Sprintf("unknown Go type: %v", v.Type())} + return + } + class := ClassUniversal + + if params.timeType != 0 && tag != TagUTCTime { + return StructuralError{"explicit time type given to non-time member"} + } + + // jtasn1 updated to allow slices of strings + if params.stringType != 0 && !(tag == TagPrintableString || (v.Kind() == reflect.Slice && tag == 16 && v.Type().Elem().Kind() == reflect.String)) { + return StructuralError{"explicit string type given to non-string member"} + } + + switch tag { + case TagPrintableString: + if params.stringType == 0 { + // This is a string without an explicit string type. We'll use + // a PrintableString if the character set in the string is + // sufficiently limited, otherwise we'll use a UTF8String. + for _, r := range v.String() { + if r >= utf8.RuneSelf || !isPrintable(byte(r)) { + if !utf8.ValidString(v.String()) { + return errors.New("asn1: string not valid UTF-8") + } + tag = TagUTF8String + break + } + } + } else { + tag = params.stringType + } + case TagUTCTime: + if params.timeType == TagGeneralizedTime || outsideUTCRange(v.Interface().(time.Time)) { + tag = TagGeneralizedTime + } + } + + if params.set { + if tag != TagSequence { + return StructuralError{"non sequence tagged as set"} + } + tag = TagSet + } + + tags, body := out.fork() + + err = marshalBody(body, v, params) + if err != nil { + return + } + + bodyLen := body.Len() + + var explicitTag *forkableWriter + if params.explicit { + explicitTag, tags = tags.fork() + } + + if !params.explicit && params.tag != nil { + // implicit tag. + tag = *params.tag + class = ClassContextSpecific + } + + err = marshalTagAndLength(tags, tagAndLength{class, tag, bodyLen, isCompound}) + if err != nil { + return + } + + if params.explicit { + err = marshalTagAndLength(explicitTag, tagAndLength{ + class: ClassContextSpecific, + tag: *params.tag, + length: bodyLen + tags.Len(), + isCompound: true, + }) + } + + return err +} + +// Marshal returns the ASN.1 encoding of val. +// +// In addition to the struct tags recognised by Unmarshal, the following can be +// used: +// +// ia5: causes strings to be marshaled as ASN.1, IA5 strings +// omitempty: causes empty slices to be skipped +// printable: causes strings to be marshaled as ASN.1, PrintableString strings. +// utf8: causes strings to be marshaled as ASN.1, UTF8 strings +func Marshal(val interface{}) ([]byte, error) { + var out bytes.Buffer + v := reflect.ValueOf(val) + f := newForkableWriter() + err := marshalField(f, v, fieldParameters{}) + if err != nil { + return nil, err + } + _, err = f.writeTo(&out) + return out.Bytes(), err +} diff --git a/vendor/github.com/jcmturner/gofork/x/crypto/pbkdf2/pbkdf2.go b/vendor/github.com/jcmturner/gofork/x/crypto/pbkdf2/pbkdf2.go new file mode 100644 index 00000000..75d41876 --- /dev/null +++ b/vendor/github.com/jcmturner/gofork/x/crypto/pbkdf2/pbkdf2.go @@ -0,0 +1,98 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC +2898 / PKCS #5 v2.0. + +A key derivation function is useful when encrypting data based on a password +or any other not-fully-random data. It uses a pseudorandom function to derive +a secure encryption key based on the password. + +While v2.0 of the standard defines only one pseudorandom function to use, +HMAC-SHA1, the drafted v2.1 specification allows use of all five FIPS Approved +Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To +choose, you can pass the `New` functions from the different SHA packages to +pbkdf2.Key. +*/ +package pbkdf2 + +import ( + "crypto/hmac" + "hash" +) + +// Key derives a key from the password, salt and iteration count, returning a +// []byte of length keylen that can be used as cryptographic key. The key is +// derived based on the method described as PBKDF2 with the HMAC variant using +// the supplied hash function. +// +// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you +// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by +// doing: +// +// dk := pbkdf2.Key([]byte("some password"), salt, 4096, 32, sha1.New) +// +// Remember to get a good random salt. At least 8 bytes is recommended by the +// RFC. +// +// Using a higher iteration count will increase the cost of an exhaustive +// search but will also make derivation proportionally slower. +func Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte { + return Key64(password, salt, int64(iter), int64(keyLen), h) +} + +// Key64 derives a key from the password, salt and iteration count, returning a +// []byte of length keylen that can be used as cryptographic key. Key64 uses +// int64 for the iteration count and key length to allow larger values. +// The key is derived based on the method described as PBKDF2 with the HMAC +// variant using the supplied hash function. +// +// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you +// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by +// doing: +// +// dk := pbkdf2.Key([]byte("some password"), salt, 4096, 32, sha1.New) +// +// Remember to get a good random salt. At least 8 bytes is recommended by the +// RFC. +// +// Using a higher iteration count will increase the cost of an exhaustive +// search but will also make derivation proportionally slower. +func Key64(password, salt []byte, iter, keyLen int64, h func() hash.Hash) []byte { + prf := hmac.New(h, password) + hashLen := int64(prf.Size()) + numBlocks := (keyLen + hashLen - 1) / hashLen + + var buf [4]byte + dk := make([]byte, 0, numBlocks*hashLen) + U := make([]byte, hashLen) + for block := int64(1); block <= numBlocks; block++ { + // N.B.: || means concatenation, ^ means XOR + // for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter + // U_1 = PRF(password, salt || uint(i)) + prf.Reset() + prf.Write(salt) + buf[0] = byte(block >> 24) + buf[1] = byte(block >> 16) + buf[2] = byte(block >> 8) + buf[3] = byte(block) + prf.Write(buf[:4]) + dk = prf.Sum(dk) + T := dk[int64(len(dk))-hashLen:] + copy(U, T) + + // U_n = PRF(password, U_(n-1)) + for n := int64(2); n <= iter; n++ { + prf.Reset() + prf.Write(U) + U = U[:0] + U = prf.Sum(U) + for x := range U { + T[x] ^= U[x] + } + } + } + return dk[:keyLen] +} diff --git a/vendor/golang.org/x/crypto/AUTHORS b/vendor/golang.org/x/crypto/AUTHORS new file mode 100644 index 00000000..2b00ddba --- /dev/null +++ b/vendor/golang.org/x/crypto/AUTHORS @@ -0,0 +1,3 @@ +# This source code refers to The Go Authors for copyright purposes. +# The master list of authors is in the main Go distribution, +# visible at https://tip.golang.org/AUTHORS. diff --git a/vendor/golang.org/x/crypto/CONTRIBUTORS b/vendor/golang.org/x/crypto/CONTRIBUTORS new file mode 100644 index 00000000..1fbd3e97 --- /dev/null +++ b/vendor/golang.org/x/crypto/CONTRIBUTORS @@ -0,0 +1,3 @@ +# This source code was written by the Go contributors. +# The master list of contributors is in the main Go distribution, +# visible at https://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/golang.org/x/crypto/LICENSE b/vendor/golang.org/x/crypto/LICENSE new file mode 100644 index 00000000..6a66aea5 --- /dev/null +++ b/vendor/golang.org/x/crypto/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/crypto/PATENTS b/vendor/golang.org/x/crypto/PATENTS new file mode 100644 index 00000000..73309904 --- /dev/null +++ b/vendor/golang.org/x/crypto/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/crypto/md4/md4.go b/vendor/golang.org/x/crypto/md4/md4.go new file mode 100644 index 00000000..6d9ba9e5 --- /dev/null +++ b/vendor/golang.org/x/crypto/md4/md4.go @@ -0,0 +1,118 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package md4 implements the MD4 hash algorithm as defined in RFC 1320. +package md4 // import "golang.org/x/crypto/md4" + +import ( + "crypto" + "hash" +) + +func init() { + crypto.RegisterHash(crypto.MD4, New) +} + +// The size of an MD4 checksum in bytes. +const Size = 16 + +// The blocksize of MD4 in bytes. +const BlockSize = 64 + +const ( + _Chunk = 64 + _Init0 = 0x67452301 + _Init1 = 0xEFCDAB89 + _Init2 = 0x98BADCFE + _Init3 = 0x10325476 +) + +// digest represents the partial evaluation of a checksum. +type digest struct { + s [4]uint32 + x [_Chunk]byte + nx int + len uint64 +} + +func (d *digest) Reset() { + d.s[0] = _Init0 + d.s[1] = _Init1 + d.s[2] = _Init2 + d.s[3] = _Init3 + d.nx = 0 + d.len = 0 +} + +// New returns a new hash.Hash computing the MD4 checksum. +func New() hash.Hash { + d := new(digest) + d.Reset() + return d +} + +func (d *digest) Size() int { return Size } + +func (d *digest) BlockSize() int { return BlockSize } + +func (d *digest) Write(p []byte) (nn int, err error) { + nn = len(p) + d.len += uint64(nn) + if d.nx > 0 { + n := len(p) + if n > _Chunk-d.nx { + n = _Chunk - d.nx + } + for i := 0; i < n; i++ { + d.x[d.nx+i] = p[i] + } + d.nx += n + if d.nx == _Chunk { + _Block(d, d.x[0:]) + d.nx = 0 + } + p = p[n:] + } + n := _Block(d, p) + p = p[n:] + if len(p) > 0 { + d.nx = copy(d.x[:], p) + } + return +} + +func (d0 *digest) Sum(in []byte) []byte { + // Make a copy of d0, so that caller can keep writing and summing. + d := new(digest) + *d = *d0 + + // Padding. Add a 1 bit and 0 bits until 56 bytes mod 64. + len := d.len + var tmp [64]byte + tmp[0] = 0x80 + if len%64 < 56 { + d.Write(tmp[0 : 56-len%64]) + } else { + d.Write(tmp[0 : 64+56-len%64]) + } + + // Length in bits. + len <<= 3 + for i := uint(0); i < 8; i++ { + tmp[i] = byte(len >> (8 * i)) + } + d.Write(tmp[0:8]) + + if d.nx != 0 { + panic("d.nx != 0") + } + + for _, s := range d.s { + in = append(in, byte(s>>0)) + in = append(in, byte(s>>8)) + in = append(in, byte(s>>16)) + in = append(in, byte(s>>24)) + } + return in +} diff --git a/vendor/golang.org/x/crypto/md4/md4block.go b/vendor/golang.org/x/crypto/md4/md4block.go new file mode 100644 index 00000000..3fed475f --- /dev/null +++ b/vendor/golang.org/x/crypto/md4/md4block.go @@ -0,0 +1,89 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// MD4 block step. +// In its own file so that a faster assembly or C version +// can be substituted easily. + +package md4 + +var shift1 = []uint{3, 7, 11, 19} +var shift2 = []uint{3, 5, 9, 13} +var shift3 = []uint{3, 9, 11, 15} + +var xIndex2 = []uint{0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15} +var xIndex3 = []uint{0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15} + +func _Block(dig *digest, p []byte) int { + a := dig.s[0] + b := dig.s[1] + c := dig.s[2] + d := dig.s[3] + n := 0 + var X [16]uint32 + for len(p) >= _Chunk { + aa, bb, cc, dd := a, b, c, d + + j := 0 + for i := 0; i < 16; i++ { + X[i] = uint32(p[j]) | uint32(p[j+1])<<8 | uint32(p[j+2])<<16 | uint32(p[j+3])<<24 + j += 4 + } + + // If this needs to be made faster in the future, + // the usual trick is to unroll each of these + // loops by a factor of 4; that lets you replace + // the shift[] lookups with constants and, + // with suitable variable renaming in each + // unrolled body, delete the a, b, c, d = d, a, b, c + // (or you can let the optimizer do the renaming). + // + // The index variables are uint so that % by a power + // of two can be optimized easily by a compiler. + + // Round 1. + for i := uint(0); i < 16; i++ { + x := i + s := shift1[i%4] + f := ((c ^ d) & b) ^ d + a += f + X[x] + a = a<>(32-s) + a, b, c, d = d, a, b, c + } + + // Round 2. + for i := uint(0); i < 16; i++ { + x := xIndex2[i] + s := shift2[i%4] + g := (b & c) | (b & d) | (c & d) + a += g + X[x] + 0x5a827999 + a = a<>(32-s) + a, b, c, d = d, a, b, c + } + + // Round 3. + for i := uint(0); i < 16; i++ { + x := xIndex3[i] + s := shift3[i%4] + h := b ^ c ^ d + a += h + X[x] + 0x6ed9eba1 + a = a<>(32-s) + a, b, c, d = d, a, b, c + } + + a += aa + b += bb + c += cc + d += dd + + p = p[_Chunk:] + n += _Chunk + } + + dig.s[0] = a + dig.s[1] = b + dig.s[2] = c + dig.s[3] = d + return n +} diff --git a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go new file mode 100644 index 00000000..593f6530 --- /dev/null +++ b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go @@ -0,0 +1,77 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC +2898 / PKCS #5 v2.0. + +A key derivation function is useful when encrypting data based on a password +or any other not-fully-random data. It uses a pseudorandom function to derive +a secure encryption key based on the password. + +While v2.0 of the standard defines only one pseudorandom function to use, +HMAC-SHA1, the drafted v2.1 specification allows use of all five FIPS Approved +Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To +choose, you can pass the `New` functions from the different SHA packages to +pbkdf2.Key. +*/ +package pbkdf2 // import "golang.org/x/crypto/pbkdf2" + +import ( + "crypto/hmac" + "hash" +) + +// Key derives a key from the password, salt and iteration count, returning a +// []byte of length keylen that can be used as cryptographic key. The key is +// derived based on the method described as PBKDF2 with the HMAC variant using +// the supplied hash function. +// +// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you +// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by +// doing: +// +// dk := pbkdf2.Key([]byte("some password"), salt, 4096, 32, sha1.New) +// +// Remember to get a good random salt. At least 8 bytes is recommended by the +// RFC. +// +// Using a higher iteration count will increase the cost of an exhaustive +// search but will also make derivation proportionally slower. +func Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte { + prf := hmac.New(h, password) + hashLen := prf.Size() + numBlocks := (keyLen + hashLen - 1) / hashLen + + var buf [4]byte + dk := make([]byte, 0, numBlocks*hashLen) + U := make([]byte, hashLen) + for block := 1; block <= numBlocks; block++ { + // N.B.: || means concatenation, ^ means XOR + // for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter + // U_1 = PRF(password, salt || uint(i)) + prf.Reset() + prf.Write(salt) + buf[0] = byte(block >> 24) + buf[1] = byte(block >> 16) + buf[2] = byte(block >> 8) + buf[3] = byte(block) + prf.Write(buf[:4]) + dk = prf.Sum(dk) + T := dk[len(dk)-hashLen:] + copy(U, T) + + // U_n = PRF(password, U_(n-1)) + for n := 2; n <= iter; n++ { + prf.Reset() + prf.Write(U) + U = U[:0] + U = prf.Sum(U) + for x := range U { + T[x] ^= U[x] + } + } + } + return dk[:keyLen] +} diff --git a/vendor/gopkg.in/jcmturner/aescts.v1/.gitignore b/vendor/gopkg.in/jcmturner/aescts.v1/.gitignore new file mode 100644 index 00000000..a1338d68 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/aescts.v1/.gitignore @@ -0,0 +1,14 @@ +# Binaries for programs and plugins +*.exe +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 +.glide/ diff --git a/vendor/gopkg.in/jcmturner/aescts.v1/LICENSE b/vendor/gopkg.in/jcmturner/aescts.v1/LICENSE new file mode 100644 index 00000000..8dada3ed --- /dev/null +++ b/vendor/gopkg.in/jcmturner/aescts.v1/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/gopkg.in/jcmturner/aescts.v1/README.md b/vendor/gopkg.in/jcmturner/aescts.v1/README.md new file mode 100644 index 00000000..d1fddf3a --- /dev/null +++ b/vendor/gopkg.in/jcmturner/aescts.v1/README.md @@ -0,0 +1,16 @@ +# AES CBC Ciphertext Stealing +[![GoDoc](https://godoc.org/gopkg.in/jcmturner/aescts.v1?status.svg)](https://godoc.org/gopkg.in/jcmturner/aescts.v1) [![Go Report Card](https://goreportcard.com/badge/gopkg.in/jcmturner/aescts.v1)](https://goreportcard.com/report/gopkg.in/jcmturner/aescts.v1) + +Encrypt and decrypt data using AES CBC Ciphertext stealing mode. + +Reference: https://en.wikipedia.org/wiki/Ciphertext_stealing#CBC_ciphertext_stealing + +To get the package, execute: +``` +go get gopkg.in/jcmturner/aescts.v1 +``` +To import this package, add the following line to your code: +```go +import "gopkg.in/jcmturner/aescts.v1" + +``` \ No newline at end of file diff --git a/vendor/gopkg.in/jcmturner/aescts.v1/aescts.go b/vendor/gopkg.in/jcmturner/aescts.v1/aescts.go new file mode 100644 index 00000000..278713ea --- /dev/null +++ b/vendor/gopkg.in/jcmturner/aescts.v1/aescts.go @@ -0,0 +1,186 @@ +// Package aescts provides AES CBC CipherText Stealing encryption and decryption methods +package aescts + +import ( + "crypto/aes" + "crypto/cipher" + "errors" + "fmt" +) + +// Encrypt the message with the key and the initial vector. +// Returns: next iv, ciphertext bytes, error +func Encrypt(key, iv, plaintext []byte) ([]byte, []byte, error) { + l := len(plaintext) + + block, err := aes.NewCipher(key) + if err != nil { + return []byte{}, []byte{}, fmt.Errorf("Error creating cipher: %v", err) + } + mode := cipher.NewCBCEncrypter(block, iv) + + m := make([]byte, len(plaintext)) + copy(m, plaintext) + + /*For consistency, ciphertext stealing is always used for the last two + blocks of the data to be encrypted, as in [RC5]. If the data length + is a multiple of the block size, this is equivalent to plain CBC mode + with the last two ciphertext blocks swapped.*/ + /*The initial vector carried out from one encryption for use in a + subsequent encryption is the next-to-last block of the encryption + output; this is the encrypted form of the last plaintext block.*/ + if l <= aes.BlockSize { + m, _ = zeroPad(m, aes.BlockSize) + mode.CryptBlocks(m, m) + return m, m, nil + } + if l%aes.BlockSize == 0 { + mode.CryptBlocks(m, m) + iv = m[len(m)-aes.BlockSize:] + rb, _ := swapLastTwoBlocks(m, aes.BlockSize) + return iv, rb, nil + } + m, _ = zeroPad(m, aes.BlockSize) + rb, pb, lb, err := tailBlocks(m, aes.BlockSize) + if err != nil { + return []byte{}, []byte{}, fmt.Errorf("Error tailing blocks: %v", err) + } + var ct []byte + if rb != nil { + // Encrpt all but the lats 2 blocks and update the rolling iv + mode.CryptBlocks(rb, rb) + iv = rb[len(rb)-aes.BlockSize:] + mode = cipher.NewCBCEncrypter(block, iv) + ct = append(ct, rb...) + } + mode.CryptBlocks(pb, pb) + mode = cipher.NewCBCEncrypter(block, pb) + mode.CryptBlocks(lb, lb) + // Cipher Text Stealing (CTS) - Ref: https://en.wikipedia.org/wiki/Ciphertext_stealing#CBC_ciphertext_stealing + // Swap the last two cipher blocks + // Truncate the ciphertext to the length of the original plaintext + ct = append(ct, lb...) + ct = append(ct, pb...) + return lb, ct[:l], nil +} + +// Decrypt the ciphertext with the key and the initial vector. +func Decrypt(key, iv, ciphertext []byte) ([]byte, error) { + // Copy the cipher text as golang slices even when passed by value to this method can result in the backing arrays of the calling code value being updated. + ct := make([]byte, len(ciphertext)) + copy(ct, ciphertext) + if len(ct) < aes.BlockSize { + return []byte{}, fmt.Errorf("Ciphertext is not large enough. It is less that one block size. Blocksize:%v; Ciphertext:%v", aes.BlockSize, len(ct)) + } + // Configure the CBC + block, err := aes.NewCipher(key) + if err != nil { + return nil, fmt.Errorf("Error creating cipher: %v", err) + } + var mode cipher.BlockMode + + //If ciphertext is multiple of blocksize we just need to swap back the last two blocks and then do CBC + //If the ciphertext is just one block we can't swap so we just decrypt + if len(ct)%aes.BlockSize == 0 { + if len(ct) > aes.BlockSize { + ct, _ = swapLastTwoBlocks(ct, aes.BlockSize) + } + mode = cipher.NewCBCDecrypter(block, iv) + message := make([]byte, len(ct)) + mode.CryptBlocks(message, ct) + return message[:len(ct)], nil + } + + // Cipher Text Stealing (CTS) using CBC interface. Ref: https://en.wikipedia.org/wiki/Ciphertext_stealing#CBC_ciphertext_stealing + // Get ciphertext of the 2nd to last (penultimate) block (cpb), the last block (clb) and the rest (crb) + crb, cpb, clb, _ := tailBlocks(ct, aes.BlockSize) + v := make([]byte, len(iv), len(iv)) + copy(v, iv) + var message []byte + if crb != nil { + //If there is more than just the last and the penultimate block we decrypt it and the last bloc of this becomes the iv for later + rb := make([]byte, len(crb)) + mode = cipher.NewCBCDecrypter(block, v) + v = crb[len(crb)-aes.BlockSize:] + mode.CryptBlocks(rb, crb) + message = append(message, rb...) + } + + // We need to modify the cipher text + // Decryt the 2nd to last (penultimate) block with a the original iv + pb := make([]byte, aes.BlockSize) + mode = cipher.NewCBCDecrypter(block, iv) + mode.CryptBlocks(pb, cpb) + // number of byte needed to pad + npb := aes.BlockSize - len(ct)%aes.BlockSize + //pad last block using the number of bytes needed from the tail of the plaintext 2nd to last (penultimate) block + clb = append(clb, pb[len(pb)-npb:]...) + + // Now decrypt the last block in the penultimate position (iv will be from the crb, if the is no crb it's zeros) + // iv for the penultimate block decrypted in the last position becomes the modified last block + lb := make([]byte, aes.BlockSize) + mode = cipher.NewCBCDecrypter(block, v) + v = clb + mode.CryptBlocks(lb, clb) + message = append(message, lb...) + + // Now decrypt the penultimate block in the last position (iv will be from the modified last block) + mode = cipher.NewCBCDecrypter(block, v) + mode.CryptBlocks(cpb, cpb) + message = append(message, cpb...) + + // Truncate to the size of the original cipher text + return message[:len(ct)], nil +} + +func tailBlocks(b []byte, c int) ([]byte, []byte, []byte, error) { + if len(b) <= c { + return []byte{}, []byte{}, []byte{}, errors.New("bytes slice is not larger than one block so cannot tail") + } + // Get size of last block + var lbs int + if l := len(b) % aes.BlockSize; l == 0 { + lbs = aes.BlockSize + } else { + lbs = l + } + // Get last block + lb := b[len(b)-lbs:] + // Get 2nd to last (penultimate) block + pb := b[len(b)-lbs-c : len(b)-lbs] + if len(b) > 2*c { + rb := b[:len(b)-lbs-c] + return rb, pb, lb, nil + } + return nil, pb, lb, nil +} + +func swapLastTwoBlocks(b []byte, c int) ([]byte, error) { + rb, pb, lb, err := tailBlocks(b, c) + if err != nil { + return nil, err + } + var out []byte + if rb != nil { + out = append(out, rb...) + } + out = append(out, lb...) + out = append(out, pb...) + return out, nil +} + +// zeroPad pads bytes with zeros to nearest multiple of message size m. +func zeroPad(b []byte, m int) ([]byte, error) { + if m <= 0 { + return nil, errors.New("Invalid message block size when padding") + } + if b == nil || len(b) == 0 { + return nil, errors.New("Data not valid to pad: Zero size") + } + if l := len(b) % m; l != 0 { + n := m - l + z := make([]byte, n) + b = append(b, z...) + } + return b, nil +} diff --git a/vendor/gopkg.in/jcmturner/dnsutils.v1/.gitignore b/vendor/gopkg.in/jcmturner/dnsutils.v1/.gitignore new file mode 100644 index 00000000..a1338d68 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/dnsutils.v1/.gitignore @@ -0,0 +1,14 @@ +# Binaries for programs and plugins +*.exe +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 +.glide/ diff --git a/vendor/gopkg.in/jcmturner/dnsutils.v1/.travis.yml b/vendor/gopkg.in/jcmturner/dnsutils.v1/.travis.yml new file mode 100644 index 00000000..cab4f7b8 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/dnsutils.v1/.travis.yml @@ -0,0 +1,24 @@ +language: go + +go: + - 1.7.x + - 1.8.x + - 1.9.x + - master + +gobuild_args: -tags=integration -race + +sudo: required + +services: + - docker + +before_install: + - docker pull jcmturner/gokrb5:dns + - docker run -d -h kdc.test.gokrb5 -v /etc/localtime:/etc/localtime:ro -e "TEST_KDC_ADDR=127.0.0.1" -p 53:53 -p 53:53/udp --name dns jcmturner/gokrb5:dns + +before_script: + - sudo sed -i 's/nameserver .*/nameserver 127.0.0.1/g' /etc/resolv.conf + +env: + - DNSUTILS_OVERRIDE_NS="127.0.0.1:53" \ No newline at end of file diff --git a/vendor/gopkg.in/jcmturner/dnsutils.v1/LICENSE b/vendor/gopkg.in/jcmturner/dnsutils.v1/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/vendor/gopkg.in/jcmturner/dnsutils.v1/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/gopkg.in/jcmturner/dnsutils.v1/srv.go b/vendor/gopkg.in/jcmturner/dnsutils.v1/srv.go new file mode 100644 index 00000000..15ea912d --- /dev/null +++ b/vendor/gopkg.in/jcmturner/dnsutils.v1/srv.go @@ -0,0 +1,95 @@ +package dnsutils + +import ( + "math/rand" + "net" + "sort" +) + +// OrderedSRV returns a count of the results and a map keyed on the order they should be used. +// This based on the records' priority and randomised selection based on their relative weighting. +// The function's inputs are the same as those for net.LookupSRV +// To use in the correct order: +// +// count, orderedSRV, err := OrderedSRV(service, proto, name) +// i := 1 +// for i <= count { +// srv := orderedSRV[i] +// // Do something such as dial this SRV. If fails move on the the next or break if it succeeds. +// i += 1 +// } +func OrderedSRV(service, proto, name string) (int, map[int]*net.SRV, error) { + _, addrs, err := net.LookupSRV(service, proto, name) + if err != nil { + return 0, make(map[int]*net.SRV), err + } + index, osrv := orderSRV(addrs) + return index, osrv, nil +} + +func orderSRV(addrs []*net.SRV) (int, map[int]*net.SRV) { + // Initialise the ordered map + var o int + osrv := make(map[int]*net.SRV) + + prioMap := make(map[int][]*net.SRV, 0) + for _, srv := range addrs { + prioMap[int(srv.Priority)] = append(prioMap[int(srv.Priority)], srv) + } + + priorities := make([]int, 0) + for p := range prioMap { + priorities = append(priorities, p) + } + + var count int + sort.Ints(priorities) + for _, p := range priorities { + tos := weightedOrder(prioMap[p]) + for i, s := range tos { + count += 1 + osrv[o+i] = s + } + o += len(tos) + } + return count, osrv +} + +func weightedOrder(srvs []*net.SRV) map[int]*net.SRV { + // Get the total weight + var tw int + for _, s := range srvs { + tw += int(s.Weight) + } + + // Initialise the ordered map + o := 1 + osrv := make(map[int]*net.SRV) + + // Whilst there are still entries to be ordered + l := len(srvs) + for l > 0 { + i := rand.Intn(l) + s := srvs[i] + var rw int + if tw > 0 { + // Greater the weight the more likely this will be zero or less + rw = rand.Intn(tw) - int(s.Weight) + } + if rw <= 0 { + // Put entry in position + osrv[o] = s + if len(srvs) > 1 { + // Remove the entry from the source slice by swapping with the last entry and truncating + srvs[len(srvs)-1], srvs[i] = srvs[i], srvs[len(srvs)-1] + srvs = srvs[:len(srvs)-1] + l = len(srvs) + } else { + l = 0 + } + o += 1 + tw = tw - int(s.Weight) + } + } + return osrv +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/LICENSE b/vendor/gopkg.in/jcmturner/gokrb5.v5/LICENSE new file mode 100644 index 00000000..8dada3ed --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/asn1tools/tools.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/asn1tools/tools.go new file mode 100644 index 00000000..f27740b9 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/asn1tools/tools.go @@ -0,0 +1,86 @@ +// Package asn1tools provides tools for managing ASN1 marshaled data. +package asn1tools + +import ( + "github.com/jcmturner/gofork/encoding/asn1" +) + +// MarshalLengthBytes returns the ASN1 encoded bytes for the length 'l' +// +// There are two forms: short (for lengths between 0 and 127), and long definite (for lengths between 0 and 2^1008 -1). +// +// Short form: One octet. Bit 8 has value "0" and bits 7-1 give the length. +// +// Long form: Two to 127 octets. Bit 8 of first octet has value "1" and bits 7-1 give the number of additional length octets. Second and following octets give the length, base 256, most significant digit first. +func MarshalLengthBytes(l int) []byte { + if l <= 127 { + return []byte{byte(l)} + } + var b []byte + p := 1 + for i := 1; i < 127; { + b = append([]byte{byte((l % (p * 256)) / p)}, b...) + p = p * 256 + l = l - l%p + if l <= 0 { + break + } + } + return append([]byte{byte(128 + len(b))}, b...) +} + +// GetLengthFromASN returns the length of a slice of ASN1 encoded bytes from the ASN1 length header it contains. +func GetLengthFromASN(b []byte) int { + if int(b[1]) <= 127 { + return int(b[1]) + } + // The bytes that indicate the length + lb := b[2 : 2+int(b[1])-128] + base := 1 + l := 0 + for i := len(lb) - 1; i >= 0; i-- { + l += int(lb[i]) * base + base = base * 256 + } + return l +} + +// GetNumberBytesInLengthHeader returns the number of bytes in the ASn1 header that indicate the length. +func GetNumberBytesInLengthHeader(b []byte) int { + if int(b[1]) <= 127 { + return 1 + } + // The bytes that indicate the length + return 1 + int(b[1]) - 128 +} + +// AddASNAppTag adds an ASN1 encoding application tag value to the raw bytes provided. +func AddASNAppTag(b []byte, tag int) []byte { + r := asn1.RawValue{ + Class: asn1.ClassApplication, + IsCompound: true, + Tag: tag, + Bytes: b, + } + ab, _ := asn1.Marshal(r) + return ab +} + +/* +// The Marshal method of golang's asn1 package does not enable you to define wrapping the output in an application tag. +// This method adds that wrapping tag. +func AddASNAppTag(b []byte, tag int) []byte { + // The ASN1 wrapping consists of 2 bytes: + // 1st byte -> Identifier Octet - Application Tag + // 2nd byte -> The length (this will be the size indicated in the input bytes + 2 for the additional bytes we add here. + // Application Tag: + //| Bit: | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | + //| Value: | 0 | 1 | 1 | From the RFC spec 4120 | + //| Explanation | Defined by the ASN1 encoding rules for an application tag | A value of 1 indicates a constructed type | The ASN Application tag value | + // Therefore the value of the byte is an integer = ( Application tag value + 96 ) + //b = append(MarshalLengthBytes(int(b[1])+2), b...) + b = append(MarshalLengthBytes(len(b)), b...) + b = append([]byte{byte(96 + tag)}, b...) + return b +} +*/ diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/ASExchange.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/ASExchange.go new file mode 100644 index 00000000..f74ed4e6 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/ASExchange.go @@ -0,0 +1,154 @@ +package client + +import ( + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" + "gopkg.in/jcmturner/gokrb5.v5/iana/errorcode" + "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" + "gopkg.in/jcmturner/gokrb5.v5/iana/patype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/messages" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// ASExchange performs an AS exchange for the client to retrieve a TGT. +func (cl *Client) ASExchange(realm string, ASReq messages.ASReq, referral int) (messages.ASRep, error) { + if ok, err := cl.IsConfigured(); !ok { + return messages.ASRep{}, krberror.Errorf(err, krberror.ConfigError, "AS Exchange cannot be preformed") + } + + b, err := ASReq.Marshal() + if err != nil { + return messages.ASRep{}, krberror.Errorf(err, krberror.EncodingError, "AS Exchange Error: failed marshaling AS_REQ") + } + var ASRep messages.ASRep + + rb, err := cl.SendToKDC(b, realm) + if err != nil { + if e, ok := err.(messages.KRBError); ok { + switch e.ErrorCode { + case errorcode.KDC_ERR_PREAUTH_REQUIRED: + // From now on assume this client will need to do this pre-auth and set the PAData + cl.GoKrb5Conf.AssumePAEncTimestampRequired = true + err = setPAData(cl, e, &ASReq) + if err != nil { + return messages.ASRep{}, krberror.Errorf(err, krberror.KRBMsgError, "AS Exchange Error: failed setting AS_REQ PAData for pre-authentication required") + } + b, err := ASReq.Marshal() + if err != nil { + return messages.ASRep{}, krberror.Errorf(err, krberror.EncodingError, "AS Exchange Error: failed marshaling AS_REQ with PAData") + } + rb, err = cl.SendToKDC(b, realm) + if err != nil { + return messages.ASRep{}, krberror.Errorf(err, krberror.NetworkingError, "AS Exchange Error: failed sending AS_REQ to KDC") + } + case errorcode.KDC_ERR_WRONG_REALM: + // Client referral https://tools.ietf.org/html/rfc6806.html#section-7 + if referral > 5 { + return messages.ASRep{}, krberror.Errorf(err, krberror.KRBMsgError, "maximum number of client referrals exceeded") + } + referral++ + return cl.ASExchange(e.CRealm, ASReq, referral) + } + } else { + return messages.ASRep{}, krberror.Errorf(err, krberror.NetworkingError, "AS Exchange Error: failed sending AS_REQ to KDC") + } + } + err = ASRep.Unmarshal(rb) + if err != nil { + return messages.ASRep{}, krberror.Errorf(err, krberror.EncodingError, "AS Exchange Error: failed to process the AS_REP") + } + if ok, err := ASRep.IsValid(cl.Config, cl.Credentials, ASReq); !ok { + return messages.ASRep{}, krberror.Errorf(err, krberror.KRBMsgError, "AS Exchange Error: AS_REP is not valid or client password/keytab incorrect") + } + return ASRep, nil +} + +func setPAData(cl *Client, krberr messages.KRBError, ASReq *messages.ASReq) error { + if !cl.GoKrb5Conf.DisablePAFXFast { + pa := types.PAData{PADataType: patype.PA_REQ_ENC_PA_REP} + ASReq.PAData = append(ASReq.PAData, pa) + } + if cl.GoKrb5Conf.AssumePAEncTimestampRequired { + paTSb, err := types.GetPAEncTSEncAsnMarshalled() + if err != nil { + return krberror.Errorf(err, krberror.KRBMsgError, "Error creating PAEncTSEnc for Pre-Authentication") + } + var et etype.EType + if krberr.ErrorCode == 0 { + // This is not in response to an error from the KDC. It is preemptive + et, err = crypto.GetEtype(ASReq.ReqBody.EType[0]) // Take the first as preference + if err != nil { + return krberror.Errorf(err, krberror.EncryptingError, "error getting etype for pre-auth encryption") + } + } else { + // Get the etype to use from the PA data in the KRBError e-data + et, err = preAuthEType(krberr) + if err != nil { + return krberror.Errorf(err, krberror.EncryptingError, "error getting etype for pre-auth encryption") + } + } + key, err := cl.Key(et, krberr) + if err != nil { + return krberror.Errorf(err, krberror.EncryptingError, "Error getting key from credentials") + } + paEncTS, err := crypto.GetEncryptedData(paTSb, key, keyusage.AS_REQ_PA_ENC_TIMESTAMP, 1) + if err != nil { + return krberror.Errorf(err, krberror.EncryptingError, "Error encrypting pre-authentication timestamp") + } + pb, err := paEncTS.Marshal() + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error marshaling the PAEncTSEnc encrypted data") + } + pa := types.PAData{ + PADataType: patype.PA_ENC_TIMESTAMP, + PADataValue: pb, + } + ASReq.PAData = append(ASReq.PAData, pa) + } + return nil +} + +func preAuthEType(krberr messages.KRBError) (etype etype.EType, err error) { + //The preferred ordering of the "hint" pre-authentication data that + //affect client key selection is: ETYPE-INFO2, followed by ETYPE-INFO, + //followed by PW-SALT. + //A KDC SHOULD NOT send PA-PW-SALT when issuing a KRB-ERROR message + //that requests additional pre-authentication. Implementation note: + //Some KDC implementations issue an erroneous PA-PW-SALT when issuing a + //KRB-ERROR message that requests additional pre-authentication. + //Therefore, clients SHOULD ignore a PA-PW-SALT accompanying a + //KRB-ERROR message that requests additional pre-authentication. + var etypeID int32 + var pas types.PADataSequence + e := pas.Unmarshal(krberr.EData) + if e != nil { + err = krberror.Errorf(e, krberror.EncodingError, "error unmashalling KRBError data") + return + } + for _, pa := range pas { + switch pa.PADataType { + case patype.PA_ETYPE_INFO2: + info, e := pa.GetETypeInfo2() + if e != nil { + err = krberror.Errorf(e, krberror.EncodingError, "error unmashalling ETYPE-INFO2 data") + return + } + etypeID = info[0].EType + break + case patype.PA_ETYPE_INFO: + info, e := pa.GetETypeInfo() + if e != nil { + err = krberror.Errorf(e, krberror.EncodingError, "error unmashalling ETYPE-INFO data") + return + } + etypeID = info[0].EType + } + } + etype, e = crypto.GetEtype(etypeID) + if e != nil { + err = krberror.Errorf(e, krberror.EncryptingError, "Error creating etype") + return + } + return etype, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/TGSExchange.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/TGSExchange.go new file mode 100644 index 00000000..633fa70d --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/TGSExchange.go @@ -0,0 +1,101 @@ +package client + +import ( + "time" + + "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/messages" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// TGSExchange performs a TGS exchange to retrieve a ticket to the specified SPN. +// The ticket retrieved is added to the client's cache. +func (cl *Client) TGSExchange(spn types.PrincipalName, kdcRealm string, tkt messages.Ticket, sessionKey types.EncryptionKey, renewal bool, referral int) (tgsReq messages.TGSReq, tgsRep messages.TGSRep, err error) { + //// Check what sessions we have for this SPN. + //// Will get the session to the default realm if one does not exist for requested SPN + //sess, err := cl.GetSessionFromPrincipalName(spn) + //if err != nil { + // return tgsReq, tgsRep, err + //} + tgsReq, err = messages.NewTGSReq(cl.Credentials.CName, kdcRealm, cl.Config, tkt, sessionKey, spn, renewal) + if err != nil { + return tgsReq, tgsRep, krberror.Errorf(err, krberror.KRBMsgError, "TGS Exchange Error: failed to generate a new TGS_REQ") + } + b, err := tgsReq.Marshal() + if err != nil { + return tgsReq, tgsRep, krberror.Errorf(err, krberror.EncodingError, "TGS Exchange Error: failed to generate a new TGS_REQ") + } + r, err := cl.SendToKDC(b, kdcRealm) + if err != nil { + return tgsReq, tgsRep, krberror.Errorf(err, krberror.NetworkingError, "TGS Exchange Error: issue sending TGS_REQ to KDC") + } + err = tgsRep.Unmarshal(r) + if err != nil { + return tgsReq, tgsRep, krberror.Errorf(err, krberror.EncodingError, "TGS Exchange Error: failed to process the TGS_REP") + } + err = tgsRep.DecryptEncPart(sessionKey) + if err != nil { + return tgsReq, tgsRep, krberror.Errorf(err, krberror.EncodingError, "TGS Exchange Error: failed to process the TGS_REP") + } + if tgsRep.Ticket.SName.NameType == nametype.KRB_NT_SRV_INST && !tgsRep.Ticket.SName.Equal(spn) { + if referral > 5 { + return tgsReq, tgsRep, krberror.Errorf(err, krberror.KRBMsgError, "maximum number of referrals exceeded") + } + // Server referral https://tools.ietf.org/html/rfc6806.html#section-8 + // The TGS Rep contains a TGT for another domain as the service resides in that domain. + if ok, err := tgsRep.IsValid(cl.Config, tgsReq); !ok { + return tgsReq, tgsRep, krberror.Errorf(err, krberror.EncodingError, "TGS Exchange Error: TGS_REP is not valid") + } + cl.AddSession(tgsRep.Ticket, tgsRep.DecryptedEncPart) + realm := tgsRep.Ticket.SName.NameString[1] + referral++ + return cl.TGSExchange(spn, realm, tgsRep.Ticket, tgsRep.DecryptedEncPart.Key, false, referral) + } + if ok, err := tgsRep.IsValid(cl.Config, tgsReq); !ok { + return tgsReq, tgsRep, krberror.Errorf(err, krberror.EncodingError, "TGS Exchange Error: TGS_REP is not valid") + } + return tgsReq, tgsRep, nil +} + +// GetServiceTicket makes a request to get a service ticket for the SPN specified +// SPN format: / Eg. HTTP/www.example.com +// The ticket will be added to the client's ticket cache +func (cl *Client) GetServiceTicket(spn string) (messages.Ticket, types.EncryptionKey, error) { + var tkt messages.Ticket + var skey types.EncryptionKey + if tkt, skey, ok := cl.GetCachedTicket(spn); ok { + // Already a valid ticket in the cache + return tkt, skey, nil + } + princ := types.NewPrincipalName(nametype.KRB_NT_PRINCIPAL, spn) + sess, err := cl.GetSessionFromPrincipalName(princ) + if err != nil { + return tkt, skey, err + } + // Ensure TGT still valid + if time.Now().UTC().After(sess.EndTime) { + _, err := cl.updateSession(sess) + if err != nil { + return tkt, skey, err + } + // Get the session again as it could have been replaced by the update + sess, err = cl.GetSessionFromPrincipalName(princ) + if err != nil { + return tkt, skey, err + } + } + _, tgsRep, err := cl.TGSExchange(princ, sess.Realm, sess.TGT, sess.SessionKey, false, 0) + if err != nil { + return tkt, skey, err + } + cl.Cache.addEntry( + tgsRep.Ticket, + tgsRep.DecryptedEncPart.AuthTime, + tgsRep.DecryptedEncPart.StartTime, + tgsRep.DecryptedEncPart.EndTime, + tgsRep.DecryptedEncPart.RenewTill, + tgsRep.DecryptedEncPart.Key, + ) + return tgsRep.Ticket, tgsRep.DecryptedEncPart.Key, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/cache.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/cache.go new file mode 100644 index 00000000..694dec73 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/cache.go @@ -0,0 +1,102 @@ +package client + +import ( + "gopkg.in/jcmturner/gokrb5.v5/messages" + "gopkg.in/jcmturner/gokrb5.v5/types" + "strings" + "sync" + "time" +) + +// Cache for client tickets. +type Cache struct { + Entries map[string]CacheEntry + mux sync.RWMutex +} + +// CacheEntry holds details for a client cache entry. +type CacheEntry struct { + Ticket messages.Ticket + AuthTime time.Time + StartTime time.Time + EndTime time.Time + RenewTill time.Time + SessionKey types.EncryptionKey +} + +// NewCache creates a new client ticket cache instance. +func NewCache() *Cache { + return &Cache{ + Entries: map[string]CacheEntry{}, + } +} + +// GetEntry returns a cache entry that matches the SPN. +func (c *Cache) getEntry(spn string) (CacheEntry, bool) { + c.mux.RLock() + defer c.mux.RUnlock() + e, ok := (*c).Entries[spn] + return e, ok +} + +// AddEntry adds a ticket to the cache. +func (c *Cache) addEntry(tkt messages.Ticket, authTime, startTime, endTime, renewTill time.Time, sessionKey types.EncryptionKey) CacheEntry { + spn := strings.Join(tkt.SName.NameString, "/") + c.mux.Lock() + defer c.mux.Unlock() + (*c).Entries[spn] = CacheEntry{ + Ticket: tkt, + AuthTime: authTime, + StartTime: startTime, + EndTime: endTime, + RenewTill: renewTill, + SessionKey: sessionKey, + } + return c.Entries[spn] +} + +// RemoveEntry removes the cache entry for the defined SPN. +func (c *Cache) RemoveEntry(spn string) { + c.mux.Lock() + defer c.mux.Unlock() + delete(c.Entries, spn) +} + +// GetCachedTicket returns a ticket from the cache for the SPN. +// Only a ticket that is currently valid will be returned. +func (cl *Client) GetCachedTicket(spn string) (messages.Ticket, types.EncryptionKey, bool) { + if e, ok := cl.Cache.getEntry(spn); ok { + //If within time window of ticket return it + if time.Now().UTC().After(e.StartTime) && time.Now().UTC().Before(e.EndTime) { + return e.Ticket, e.SessionKey, true + } else if time.Now().UTC().Before(e.RenewTill) { + e, err := cl.renewTicket(e) + if err != nil { + return e.Ticket, e.SessionKey, false + } + return e.Ticket, e.SessionKey, true + } + } + var tkt messages.Ticket + var key types.EncryptionKey + return tkt, key, false +} + +// renewTicket renews a cache entry ticket. +// To renew from outside the client package use GetCachedTicket +func (cl *Client) renewTicket(e CacheEntry) (CacheEntry, error) { + spn := e.Ticket.SName + _, tgsRep, err := cl.TGSExchange(spn, e.Ticket.Realm, e.Ticket, e.SessionKey, true, 0) + if err != nil { + return e, err + } + e = cl.Cache.addEntry( + tgsRep.Ticket, + tgsRep.DecryptedEncPart.AuthTime, + tgsRep.DecryptedEncPart.StartTime, + tgsRep.DecryptedEncPart.EndTime, + tgsRep.DecryptedEncPart.RenewTill, + tgsRep.DecryptedEncPart.Key, + ) + return e, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/client.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/client.go new file mode 100644 index 00000000..bd770c32 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/client.go @@ -0,0 +1,215 @@ +// Package client provides a client library and methods for Kerberos 5 authentication. +package client + +import ( + "errors" + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/config" + "gopkg.in/jcmturner/gokrb5.v5/credentials" + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" + "gopkg.in/jcmturner/gokrb5.v5/iana/errorcode" + "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" + "gopkg.in/jcmturner/gokrb5.v5/keytab" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/messages" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// Client side configuration and state. +type Client struct { + Credentials *credentials.Credentials + Config *config.Config + GoKrb5Conf *Config + sessions *sessions + Cache *Cache +} + +// Config struct holds GoKRB5 specific client configurations. +// Set Disable_PA_FX_FAST to true to force this behaviour off. +// Set Assume_PA_ENC_TIMESTAMP_Required to send the PA_ENC_TIMESTAMP pro-actively rather than waiting for a KRB_ERROR response from the KDC indicating it is required. +type Config struct { + DisablePAFXFast bool + AssumePAEncTimestampRequired bool +} + +// NewClientWithPassword creates a new client from a password credential. +// Set the realm to empty string to use the default realm from config. +func NewClientWithPassword(username, realm, password string) Client { + creds := credentials.NewCredentials(username, realm) + return Client{ + Credentials: creds.WithPassword(password), + Config: config.NewConfig(), + GoKrb5Conf: &Config{}, + sessions: &sessions{ + Entries: make(map[string]*session), + }, + Cache: NewCache(), + } +} + +// NewClientWithKeytab creates a new client from a keytab credential. +func NewClientWithKeytab(username, realm string, kt keytab.Keytab) Client { + creds := credentials.NewCredentials(username, realm) + return Client{ + Credentials: creds.WithKeytab(kt), + Config: config.NewConfig(), + GoKrb5Conf: &Config{}, + sessions: &sessions{ + Entries: make(map[string]*session), + }, + Cache: NewCache(), + } +} + +// NewClientFromCCache create a client from a populated client cache. +// +// WARNING: A client created from CCache does not automatically renew TGTs and a failure will occur after the TGT expires. +func NewClientFromCCache(c credentials.CCache) (Client, error) { + cl := Client{ + Credentials: c.GetClientCredentials(), + Config: config.NewConfig(), + GoKrb5Conf: &Config{}, + sessions: &sessions{ + Entries: make(map[string]*session), + }, + Cache: NewCache(), + } + spn := types.PrincipalName{ + NameType: nametype.KRB_NT_SRV_INST, + NameString: []string{"krbtgt", c.DefaultPrincipal.Realm}, + } + cred, ok := c.GetEntry(spn) + if !ok { + return cl, errors.New("TGT not found in CCache") + } + var tgt messages.Ticket + err := tgt.Unmarshal(cred.Ticket) + if err != nil { + return cl, fmt.Errorf("TGT bytes in cache are not valid: %v", err) + } + cl.sessions.Entries[c.DefaultPrincipal.Realm] = &session{ + Realm: c.DefaultPrincipal.Realm, + AuthTime: cred.AuthTime, + EndTime: cred.EndTime, + RenewTill: cred.RenewTill, + TGT: tgt, + SessionKey: cred.Key, + } + for _, cred := range c.GetEntries() { + var tkt messages.Ticket + err = tkt.Unmarshal(cred.Ticket) + if err != nil { + return cl, fmt.Errorf("cache entry ticket bytes are not valid: %v", err) + } + cl.Cache.addEntry( + tkt, + cred.AuthTime, + cred.StartTime, + cred.EndTime, + cred.RenewTill, + cred.Key, + ) + } + return cl, nil +} + +// WithConfig sets the Kerberos configuration for the client. +func (cl *Client) WithConfig(cfg *config.Config) *Client { + cl.Config = cfg + return cl +} + +// WithKeytab adds a keytab to the client +func (cl *Client) WithKeytab(kt keytab.Keytab) *Client { + cl.Credentials.WithKeytab(kt) + return cl +} + +// WithPassword adds a password to the client +func (cl *Client) WithPassword(password string) *Client { + cl.Credentials.WithPassword(password) + return cl +} + +// Key returns a key for the client. Preferably from a keytab and then generated from the password. +// The KRBError would have been returned from the KDC and must be of type KDC_ERR_PREAUTH_REQUIRED. +// If a KRBError is not available pass messages.KRBError{} and a key will be returned from the credentials keytab. +func (cl *Client) Key(etype etype.EType, krberr messages.KRBError) (types.EncryptionKey, error) { + if cl.Credentials.HasKeytab() && etype != nil { + return cl.Credentials.Keytab.GetEncryptionKey(cl.Credentials.CName.NameString, cl.Credentials.Realm, 0, etype.GetETypeID()) + } else if cl.Credentials.HasPassword() { + if krberr.ErrorCode == errorcode.KDC_ERR_PREAUTH_REQUIRED { + var pas types.PADataSequence + err := pas.Unmarshal(krberr.EData) + if err != nil { + return types.EncryptionKey{}, fmt.Errorf("could not get PAData from KRBError to generate key from password: %v", err) + } + key, _, err := crypto.GetKeyFromPassword(cl.Credentials.Password, krberr.CName, krberr.CRealm, etype.GetETypeID(), pas) + return key, err + } + key, _, err := crypto.GetKeyFromPassword(cl.Credentials.Password, cl.Credentials.CName, cl.Credentials.Realm, etype.GetETypeID(), types.PADataSequence{}) + return key, err + } + return types.EncryptionKey{}, errors.New("credential has neither keytab or password to generate key") +} + +// LoadConfig loads the Kerberos configuration for the client from file path specified. +func (cl *Client) LoadConfig(cfgPath string) (*Client, error) { + cfg, err := config.Load(cfgPath) + if err != nil { + return cl, err + } + cl.Config = cfg + return cl, nil +} + +// IsConfigured indicates if the client has the values required set. +func (cl *Client) IsConfigured() (bool, error) { + // Client needs to have either a password, keytab or a session already (later when loading from CCache) + if !cl.Credentials.HasPassword() && !cl.Credentials.HasKeytab() { + sess, err := cl.GetSessionFromRealm(cl.Config.LibDefaults.DefaultRealm) + if err != nil || sess.AuthTime.IsZero() { + return false, errors.New("client has neither a keytab nor a password set and no session") + } + } + if cl.Credentials.Username == "" { + return false, errors.New("client does not have a username") + } + if cl.Config.LibDefaults.DefaultRealm == "" { + return false, errors.New("client krb5 config does not have a default realm") + } + if !cl.Config.LibDefaults.DNSLookupKDC { + for _, r := range cl.Config.Realms { + if r.Realm == cl.Config.LibDefaults.DefaultRealm { + if len(r.KDC) > 0 { + return true, nil + } + return false, errors.New("client krb5 config does not have any defined KDCs for the default realm") + } + } + } + return true, nil +} + +// Login the client with the KDC via an AS exchange. +func (cl *Client) Login() error { + if cl.Credentials.Realm == "" { + cl.Credentials.Realm = cl.Config.LibDefaults.DefaultRealm + } + ASReq, err := messages.NewASReqForTGT(cl.Credentials.Realm, cl.Config, cl.Credentials.CName) + if err != nil { + return krberror.Errorf(err, krberror.KRBMsgError, "error generating new AS_REQ") + } + err = setPAData(cl, messages.KRBError{}, &ASReq) + if err != nil { + return krberror.Errorf(err, krberror.KRBMsgError, "failed setting AS_REQ PAData") + } + ASRep, err := cl.ASExchange(cl.Credentials.Realm, ASReq, 0) + if err != nil { + return err + } + cl.AddSession(ASRep.Ticket, ASRep.DecryptedEncPart) + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/http.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/http.go new file mode 100644 index 00000000..c13afbeb --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/http.go @@ -0,0 +1,46 @@ +package client + +import ( + "encoding/base64" + "fmt" + "net/http" + "strings" + + "gopkg.in/jcmturner/gokrb5.v5/credentials" + "gopkg.in/jcmturner/gokrb5.v5/gssapi" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/messages" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// SetSPNEGOHeader gets the service ticket and sets it as the SPNEGO authorization header on HTTP request object. +// To auto generate the SPN from the request object pass a null string "". +func (cl *Client) SetSPNEGOHeader(r *http.Request, spn string) error { + if spn == "" { + spn = "HTTP/" + strings.SplitN(r.Host, ":", 2)[0] + } + tkt, skey, err := cl.GetServiceTicket(spn) + if err != nil { + return fmt.Errorf("could not get service ticket: %v", err) + } + err = SetSPNEGOHeader(*cl.Credentials, tkt, skey, r) + if err != nil { + return err + } + return nil +} + +// SetSPNEGOHeader sets the provided ticket as the SPNEGO authorization header on HTTP request object. +func SetSPNEGOHeader(creds credentials.Credentials, tkt messages.Ticket, sessionKey types.EncryptionKey, r *http.Request) error { + SPNEGOToken, err := gssapi.GetSPNEGOKrbNegTokenInit(creds, tkt, sessionKey) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "could not generate SPNEGO negotiation token") + } + nb, err := SPNEGOToken.Marshal() + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "could not marshal SPNEGO") + } + hs := "Negotiate " + base64.StdEncoding.EncodeToString(nb) + r.Header.Set("Authorization", hs) + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/network.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/network.go new file mode 100644 index 00000000..c330aeb2 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/network.go @@ -0,0 +1,213 @@ +package client + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "net" + "time" + + "gopkg.in/jcmturner/gokrb5.v5/iana/errorcode" + "gopkg.in/jcmturner/gokrb5.v5/messages" +) + +// SendToKDC performs network actions to send data to the KDC. +func (cl *Client) SendToKDC(b []byte, realm string) ([]byte, error) { + var rb []byte + if cl.Config.LibDefaults.UDPPreferenceLimit == 1 { + //1 means we should always use TCP + rb, errtcp := cl.sendKDCTCP(realm, b) + if errtcp != nil { + if e, ok := errtcp.(messages.KRBError); ok { + return rb, e + } + return rb, fmt.Errorf("communication error with KDC via TCP: %v", errtcp) + } + return rb, nil + } + if len(b) <= cl.Config.LibDefaults.UDPPreferenceLimit { + //Try UDP first, TCP second + rb, errudp := cl.sendKDCUDP(realm, b) + if errudp != nil { + if e, ok := errudp.(messages.KRBError); ok && e.ErrorCode != errorcode.KRB_ERR_RESPONSE_TOO_BIG { + // Got a KRBError from KDC + // If this is not a KRB_ERR_RESPONSE_TOO_BIG we will return immediately otherwise will try TCP. + return rb, e + } + // Try TCP + r, errtcp := cl.sendKDCTCP(realm, b) + if errtcp != nil { + if e, ok := errtcp.(messages.KRBError); ok { + // Got a KRBError + return r, e + } + return r, fmt.Errorf("failed to communicate with KDC. Attempts made with UDP (%v) and then TCP (%v)", errudp, errtcp) + } + rb = r + } + return rb, nil + } + //Try TCP first, UDP second + rb, errtcp := cl.sendKDCTCP(realm, b) + if errtcp != nil { + if e, ok := errtcp.(messages.KRBError); ok { + // Got a KRBError from KDC so returning and not trying UDP. + return rb, e + } + rb, errudp := cl.sendKDCUDP(realm, b) + if errudp != nil { + if e, ok := errudp.(messages.KRBError); ok { + // Got a KRBError + return rb, e + } + return rb, fmt.Errorf("failed to communicate with KDC. Attempts made with TCP (%v) and then UDP (%v)", errtcp, errudp) + } + } + return rb, nil +} + +func dialKDCUDP(count int, kdcs map[int]string) (conn *net.UDPConn, err error) { + i := 1 + for i <= count { + udpAddr, e := net.ResolveUDPAddr("udp", kdcs[i]) + if e != nil { + err = fmt.Errorf("error resolving KDC address: %v", e) + return + } + conn, err = net.DialUDP("udp", nil, udpAddr) + if err == nil { + conn.SetDeadline(time.Now().Add(time.Duration(5 * time.Second))) + return + } + i++ + } + err = errors.New("error in getting a UDP connection to any of the KDCs") + return +} + +func dialKDCTCP(count int, kdcs map[int]string) (conn *net.TCPConn, err error) { + i := 1 + for i <= count { + tcpAddr, e := net.ResolveTCPAddr("tcp", kdcs[i]) + if e != nil { + err = fmt.Errorf("error resolving KDC address: %v", e) + return + } + conn, err = net.DialTCP("tcp", nil, tcpAddr) + if err == nil { + conn.SetDeadline(time.Now().Add(time.Duration(5 * time.Second))) + return + } + i++ + } + err = errors.New("error in getting a TCP connection to any of the KDCs") + return +} + +// Send the bytes to the KDC over UDP. +func (cl *Client) sendKDCUDP(realm string, b []byte) ([]byte, error) { + var r []byte + count, kdcs, err := cl.Config.GetKDCs(realm, false) + if err != nil { + return r, err + } + conn, err := dialKDCUDP(count, kdcs) + if err != nil { + return r, err + } + r, err = cl.sendUDP(conn, b) + if err != nil { + return r, err + } + return checkForKRBError(r) +} + +func (cl *Client) sendKDCTCP(realm string, b []byte) ([]byte, error) { + var r []byte + count, kdcs, err := cl.Config.GetKDCs(realm, true) + if err != nil { + return r, err + } + conn, err := dialKDCTCP(count, kdcs) + if err != nil { + return r, err + } + rb, err := cl.sendTCP(conn, b) + if err != nil { + return r, err + } + return checkForKRBError(rb) +} + +// Send the bytes over UDP. +func (cl *Client) sendUDP(conn *net.UDPConn, b []byte) ([]byte, error) { + var r []byte + defer conn.Close() + _, err := conn.Write(b) + if err != nil { + return r, fmt.Errorf("error sending to (%s): %v", conn.RemoteAddr().String(), err) + } + udpbuf := make([]byte, 4096) + n, _, err := conn.ReadFrom(udpbuf) + r = udpbuf[:n] + if err != nil { + return r, fmt.Errorf("sending over UDP failed to %s: %v", conn.RemoteAddr().String(), err) + } + if len(r) < 1 { + return r, fmt.Errorf("no response data from %s", conn.RemoteAddr().String()) + } + return r, nil +} + +// Send the bytes over TCP. +func (cl *Client) sendTCP(conn *net.TCPConn, b []byte) ([]byte, error) { + defer conn.Close() + var r []byte + /* + RFC https://tools.ietf.org/html/rfc4120#section-7.2.2 + Each request (KRB_KDC_REQ) and response (KRB_KDC_REP or KRB_ERROR) + sent over the TCP stream is preceded by the length of the request as + 4 octets in network byte order. The high bit of the length is + reserved for future expansion and MUST currently be set to zero. If + a KDC that does not understand how to interpret a set high bit of the + length encoding receives a request with the high order bit of the + length set, it MUST return a KRB-ERROR message with the error + KRB_ERR_FIELD_TOOLONG and MUST close the TCP stream. + NB: network byte order == big endian + */ + var buf bytes.Buffer + binary.Write(&buf, binary.BigEndian, uint32(len(b))) + b = append(buf.Bytes(), b...) + + _, err := conn.Write(b) + if err != nil { + return r, fmt.Errorf("error sending to KDC (%s): %v", conn.RemoteAddr().String(), err) + } + + sh := make([]byte, 4, 4) + _, err = conn.Read(sh) + if err != nil { + return r, fmt.Errorf("error reading response size header: %v", err) + } + s := binary.BigEndian.Uint32(sh) + + rb := make([]byte, s, s) + _, err = io.ReadFull(conn, rb) + if err != nil { + return r, fmt.Errorf("error reading response: %v", err) + } + if len(rb) < 1 { + return r, fmt.Errorf("no response data from KDC %s", conn.RemoteAddr().String()) + } + return rb, nil +} + +func checkForKRBError(b []byte) ([]byte, error) { + var KRBErr messages.KRBError + if err := KRBErr.Unmarshal(b); err == nil { + return b, KRBErr + } + return b, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/passwd.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/passwd.go new file mode 100644 index 00000000..7733ab3c --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/passwd.go @@ -0,0 +1,94 @@ +package client + +import ( + "fmt" + "net" + + "gopkg.in/jcmturner/gokrb5.v5/kadmin" + "gopkg.in/jcmturner/gokrb5.v5/messages" +) + +// Kpasswd server response codes. +const ( + KRB5_KPASSWD_SUCCESS = 0 + KRB5_KPASSWD_MALFORMED = 1 + KRB5_KPASSWD_HARDERROR = 2 + KRB5_KPASSWD_AUTHERROR = 3 + KRB5_KPASSWD_SOFTERROR = 4 + KRB5_KPASSWD_ACCESSDENIED = 5 + KRB5_KPASSWD_BAD_VERSION = 6 + KRB5_KPASSWD_INITIAL_FLAG_NEEDED = 7 +) + +// ChangePasswd changes the password of the client to the value provided. +func (cl *Client) ChangePasswd(newPasswd string) (bool, error) { + ASReq, err := messages.NewASReqForChgPasswd(cl.Credentials.Realm, cl.Config, cl.Credentials.CName) + if err != nil { + return false, err + } + ASRep, err := cl.ASExchange(cl.Credentials.Realm, ASReq, 0) + if err != nil { + return false, err + } + + msg, key, err := kadmin.ChangePasswdMsg(cl.Credentials.CName, cl.Credentials.Realm, newPasswd, ASRep.Ticket, ASRep.DecryptedEncPart.Key) + if err != nil { + return false, err + } + r, err := cl.sendToKPasswd(msg) + if err != nil { + return false, err + } + err = r.Decrypt(key) + if err != nil { + return false, err + } + if r.ResultCode != KRB5_KPASSWD_SUCCESS { + return false, fmt.Errorf("error response from kdamin: %s", r.Result) + } + return true, nil +} + +func (cl *Client) sendToKPasswd(msg kadmin.Request) (r kadmin.Reply, err error) { + _, kps, err := cl.Config.GetKpasswdServers(cl.Credentials.Realm, true) + if err != nil { + return + } + addr := kps[1] + b, err := msg.Marshal() + if err != nil { + return + } + if len(b) <= cl.Config.LibDefaults.UDPPreferenceLimit { + return cl.sendKPasswdUDP(b, addr) + } + return cl.sendKPasswdTCP(b, addr) +} + +func (cl *Client) sendKPasswdTCP(b []byte, kadmindAddr string) (r kadmin.Reply, err error) { + tcpAddr, err := net.ResolveTCPAddr("tcp", kadmindAddr) + if err != nil { + return + } + conn, err := net.DialTCP("tcp", nil, tcpAddr) + if err != nil { + return + } + rb, err := cl.sendTCP(conn, b) + err = r.Unmarshal(rb) + return +} + +func (cl *Client) sendKPasswdUDP(b []byte, kadmindAddr string) (r kadmin.Reply, err error) { + udpAddr, err := net.ResolveUDPAddr("udp", kadmindAddr) + if err != nil { + return + } + conn, err := net.DialUDP("udp", nil, udpAddr) + if err != nil { + return + } + rb, err := cl.sendUDP(conn, b) + err = r.Unmarshal(rb) + return +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/session.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/session.go new file mode 100644 index 00000000..70def53c --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/session.go @@ -0,0 +1,172 @@ +package client + +import ( + "fmt" + "sync" + "time" + + "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/messages" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// Sessions keyed on the realm name +type sessions struct { + Entries map[string]*session + mux sync.RWMutex +} + +// Client session struct. +type session struct { + Realm string + AuthTime time.Time + EndTime time.Time + RenewTill time.Time + TGT messages.Ticket + SessionKey types.EncryptionKey + SessionKeyExpiration time.Time + cancel chan bool + mux sync.RWMutex +} + +func (s *session) update(tkt messages.Ticket, dep messages.EncKDCRepPart) { + s.mux.Lock() + defer s.mux.Unlock() + s.AuthTime = dep.AuthTime + s.AuthTime = dep.AuthTime + s.EndTime = dep.EndTime + s.RenewTill = dep.RenewTill + s.TGT = tkt + s.SessionKey = dep.Key + s.SessionKeyExpiration = dep.KeyExpiration +} + +// AddSession adds a session for a realm with a TGT to the client's session cache. +// A goroutine is started to automatically renew the TGT before expiry. +func (cl *Client) AddSession(tkt messages.Ticket, dep messages.EncKDCRepPart) { + cl.sessions.mux.Lock() + defer cl.sessions.mux.Unlock() + s := &session{ + Realm: tkt.SName.NameString[1], + AuthTime: dep.AuthTime, + EndTime: dep.EndTime, + RenewTill: dep.RenewTill, + TGT: tkt, + SessionKey: dep.Key, + SessionKeyExpiration: dep.KeyExpiration, + cancel: make(chan bool, 1), + } + // if a session already exists for this, cancel its auto renew. + if i, ok := cl.sessions.Entries[tkt.SName.NameString[1]]; ok { + i.cancel <- true + } + cl.sessions.Entries[tkt.SName.NameString[1]] = s + cl.enableAutoSessionRenewal(s) +} + +// enableAutoSessionRenewal turns on the automatic renewal for the client's TGT session. +func (cl *Client) enableAutoSessionRenewal(s *session) { + var timer *time.Timer + go func(s *session) { + for { + w := (s.EndTime.Sub(time.Now().UTC()) * 5) / 6 + if w < 0 { + return + } + timer = time.NewTimer(w) + select { + case <-timer.C: + renewal, err := cl.updateSession(s) + if !renewal && err == nil { + // end this goroutine as there will have been a new login and new auto renewal goroutine created. + return + } + case <-s.cancel: + // cancel has been called. Stop the timer and exit. + timer.Stop() + return + } + } + }(s) +} + +// RenewTGT renews the client's TGT session. +func (cl *Client) renewTGT(s *session) error { + spn := types.PrincipalName{ + NameType: nametype.KRB_NT_SRV_INST, + NameString: []string{"krbtgt", s.Realm}, + } + _, tgsRep, err := cl.TGSExchange(spn, s.TGT.Realm, s.TGT, s.SessionKey, true, 0) + if err != nil { + return krberror.Errorf(err, krberror.KRBMsgError, "Error renewing TGT") + } + s.update(tgsRep.Ticket, tgsRep.DecryptedEncPart) + return nil +} + +// updateSession updates either through renewal or creating a new login. +// The boolean indicates if the update was a renewal. +func (cl *Client) updateSession(s *session) (bool, error) { + if time.Now().UTC().Before(s.RenewTill) { + err := cl.renewTGT(s) + return true, err + } + err := cl.Login() + return false, err +} + +func (cl *Client) getSessionFromRemoteRealm(realm string) (*session, error) { + cl.sessions.mux.RLock() + sess, ok := cl.sessions.Entries[cl.Credentials.Realm] + cl.sessions.mux.RUnlock() + if !ok { + return nil, fmt.Errorf("client does not have a session for realm %s, login first", cl.Credentials.Realm) + } + + spn := types.PrincipalName{ + NameType: nametype.KRB_NT_SRV_INST, + NameString: []string{"krbtgt", realm}, + } + + _, tgsRep, err := cl.TGSExchange(spn, cl.Credentials.Realm, sess.TGT, sess.SessionKey, false, 0) + if err != nil { + return nil, err + } + cl.AddSession(tgsRep.Ticket, tgsRep.DecryptedEncPart) + + cl.sessions.mux.RLock() + defer cl.sessions.mux.RUnlock() + return cl.sessions.Entries[realm], nil +} + +// GetSessionFromRealm returns the session for the realm provided. +func (cl *Client) GetSessionFromRealm(realm string) (sess *session, err error) { + cl.sessions.mux.RLock() + s, ok := cl.sessions.Entries[realm] + cl.sessions.mux.RUnlock() + if !ok { + // Try to request TGT from trusted remote Realm + s, err = cl.getSessionFromRemoteRealm(realm) + if err != nil { + return + } + } + // Create another session to return to prevent race condition. + sess = &session{ + Realm: s.Realm, + AuthTime: s.AuthTime, + EndTime: s.EndTime, + RenewTill: s.RenewTill, + TGT: s.TGT, + SessionKey: s.SessionKey, + SessionKeyExpiration: s.SessionKeyExpiration, + } + return +} + +// GetSessionFromPrincipalName returns the session for the realm of the principal provided. +func (cl *Client) GetSessionFromPrincipalName(spn types.PrincipalName) (*session, error) { + realm := cl.Config.ResolveRealm(spn.NameString[len(spn.NameString)-1]) + return cl.GetSessionFromRealm(realm) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/config/hosts.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/config/hosts.go new file mode 100644 index 00000000..bd96bdca --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/config/hosts.go @@ -0,0 +1,134 @@ +package config + +import ( + "fmt" + "math/rand" + "net" + "strconv" + "strings" + + "gopkg.in/jcmturner/dnsutils.v1" +) + +// GetKDCs returns the count of KDCs available and a map of KDC host names keyed on preference order. +func (c *Config) GetKDCs(realm string, tcp bool) (int, map[int]string, error) { + kdcs := make(map[int]string) + var count int + + // Use DNS to resolve kerberos SRV records if configured to do so in krb5.conf. + if c.LibDefaults.DNSLookupKDC { + proto := "udp" + if tcp { + proto = "tcp" + } + c, addrs, err := dnsutils.OrderedSRV("kerberos", proto, realm) + if err != nil { + return count, kdcs, err + } + if len(addrs) < 1 { + return count, kdcs, fmt.Errorf("no KDC SRV records found for realm %s", realm) + } + count = c + for k, v := range addrs { + kdcs[k] = strings.TrimRight(v.Target, ".") + ":" + strconv.Itoa(int(v.Port)) + } + } else { + // Get the KDCs from the krb5.conf an order them randomly for preference. + var ks []string + for _, r := range c.Realms { + if r.Realm == realm { + ks = r.KDC + break + } + } + count = len(ks) + if count < 1 { + return count, kdcs, fmt.Errorf("no KDCs defined in configuration for realm %s", realm) + } + kdcs = randServOrder(ks) + } + return count, kdcs, nil +} + +// GetKpasswdServers returns the count of kpasswd servers available and a map of kpasswd host names keyed on preference order. +// https://web.mit.edu/kerberos/krb5-latest/doc/admin/conf_files/krb5_conf.html#realms - see kpasswd_server section +func (c *Config) GetKpasswdServers(realm string, tcp bool) (int, map[int]string, error) { + kdcs := make(map[int]string) + var count int + + // Use DNS to resolve kerberos SRV records if configured to do so in krb5.conf. + if c.LibDefaults.DNSLookupKDC { + proto := "udp" + if tcp { + proto = "tcp" + } + c, addrs, err := dnsutils.OrderedSRV("kpasswd", proto, realm) + if err != nil { + return count, kdcs, err + } + if c < 1 { + c, addrs, err = dnsutils.OrderedSRV("kerberos-adm", proto, realm) + if err != nil { + return count, kdcs, err + } + } + if len(addrs) < 1 { + return count, kdcs, fmt.Errorf("no kpasswd or kadmin SRV records found for realm %s", realm) + } + count = c + for k, v := range addrs { + kdcs[k] = strings.TrimRight(v.Target, ".") + ":" + strconv.Itoa(int(v.Port)) + } + } else { + // Get the KDCs from the krb5.conf an order them randomly for preference. + var ks []string + var ka []string + for _, r := range c.Realms { + if r.Realm == realm { + ks = r.KPasswdServer + ka = r.AdminServer + break + } + } + if len(ks) < 1 { + for _, k := range ka { + h, _, err := net.SplitHostPort(k) + if err != nil { + continue + } + ks = append(ks, h+":464") + } + } + count = len(ks) + if count < 1 { + return count, kdcs, fmt.Errorf("no kpasswd or kadmin defined in configuration for realm %s", realm) + } + kdcs = randServOrder(ks) + } + return count, kdcs, nil +} + +func randServOrder(ks []string) map[int]string { + kdcs := make(map[int]string) + count := len(ks) + i := 1 + if count > 1 { + l := len(ks) + for l > 0 { + ri := rand.Intn(l) + kdcs[i] = ks[ri] + if l > 1 { + // Remove the entry from the source slice by swapping with the last entry and truncating + ks[len(ks)-1], ks[ri] = ks[ri], ks[len(ks)-1] + ks = ks[:len(ks)-1] + l = len(ks) + } else { + l = 0 + } + i++ + } + } else { + kdcs[i] = ks[0] + } + return kdcs +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/config/krb5conf.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/config/krb5conf.go new file mode 100644 index 00000000..366301ad --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/config/krb5conf.go @@ -0,0 +1,665 @@ +// Package config implements KRB5 client and service configuration as described at https://web.mit.edu/kerberos/krb5-latest/doc/admin/conf_files/krb5_conf.html +package config + +import ( + "bufio" + "encoding/hex" + "errors" + "fmt" + "io" + "net" + "os" + "os/user" + "regexp" + "strconv" + "strings" + "time" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" +) + +// Config represents the KRB5 configuration. +type Config struct { + LibDefaults *LibDefaults + Realms []Realm + DomainRealm DomainRealm + //CaPaths + //AppDefaults + //Plugins +} + +// WeakETypeList is a list of encryption types that have been deemed weak. +const WeakETypeList = "des-cbc-crc des-cbc-md4 des-cbc-md5 des-cbc-raw des3-cbc-raw des-hmac-sha1 arcfour-hmac-exp rc4-hmac-exp arcfour-hmac-md5-exp des" + +// NewConfig creates a new config struct instance. +func NewConfig() *Config { + d := make(DomainRealm) + return &Config{ + LibDefaults: newLibDefaults(), + DomainRealm: d, + } +} + +// LibDefaults represents the [libdefaults] section of the configuration. +type LibDefaults struct { + AllowWeakCrypto bool //default false + // ap_req_checksum_type int //unlikely to support this + Canonicalize bool //default false + CCacheType int //default is 4. unlikely to implement older + Clockskew time.Duration //max allowed skew in seconds, default 300 + //Default_ccache_name string // default /tmp/krb5cc_%{uid} //Not implementing as will hold in memory + DefaultClientKeytabName string //default /usr/local/var/krb5/user/%{euid}/client.keytab + DefaultKeytabName string //default /etc/krb5.keytab + DefaultRealm string + DefaultTGSEnctypes []string //default aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4 + DefaultTktEnctypes []string //default aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4 + DefaultTGSEnctypeIDs []int32 //default aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4 + DefaultTktEnctypeIDs []int32 //default aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4 + DNSCanonicalizeHostname bool //default true + DNSLookupKDC bool //default false + DNSLookupRealm bool + ExtraAddresses []net.IP //Not implementing yet + Forwardable bool //default false + IgnoreAcceptorHostname bool //default false + K5LoginAuthoritative bool //default false + K5LoginDirectory string //default user's home directory. Must be owned by the user or root + KDCDefaultOptions asn1.BitString //default 0x00000010 (KDC_OPT_RENEWABLE_OK) + KDCTimeSync int //default 1 + //kdc_req_checksum_type int //unlikely to implement as for very old KDCs + NoAddresses bool //default true + PermittedEnctypes []string //default aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4 + PermittedEnctypeIDs []int32 + //plugin_base_dir string //not supporting plugins + PreferredPreauthTypes []int //default “17, 16, 15, 14”, which forces libkrb5 to attempt to use PKINIT if it is supported + Proxiable bool //default false + RDNS bool //default true + RealmTryDomains int //default -1 + RenewLifetime time.Duration //default 0 + SafeChecksumType int //default 8 + TicketLifetime time.Duration //default 1 day + UDPPreferenceLimit int // 1 means to always use tcp. MIT krb5 has a default value of 1465, and it prevents user setting more than 32700. + VerifyAPReqNofail bool //default false +} + +// Create a new LibDefaults struct. +func newLibDefaults() *LibDefaults { + uid := "0" + var hdir string + usr, _ := user.Current() + if usr != nil { + uid = usr.Uid + hdir = usr.HomeDir + } + opts := asn1.BitString{} + opts.Bytes, _ = hex.DecodeString("00000010") + opts.BitLength = len(opts.Bytes) * 8 + return &LibDefaults{ + CCacheType: 4, + Clockskew: time.Duration(300) * time.Second, + DefaultClientKeytabName: fmt.Sprintf("/usr/local/var/krb5/user/%s/client.keytab", uid), + DefaultKeytabName: "/etc/krb5.keytab", + DefaultTGSEnctypes: []string{"aes256-cts-hmac-sha1-96", "aes128-cts-hmac-sha1-96", "des3-cbc-sha1", "arcfour-hmac-md5", "camellia256-cts-cmac", "camellia128-cts-cmac", "des-cbc-crc", "des-cbc-md5", "des-cbc-md4"}, + DefaultTktEnctypes: []string{"aes256-cts-hmac-sha1-96", "aes128-cts-hmac-sha1-96", "des3-cbc-sha1", "arcfour-hmac-md5", "camellia256-cts-cmac", "camellia128-cts-cmac", "des-cbc-crc", "des-cbc-md5", "des-cbc-md4"}, + DNSCanonicalizeHostname: true, + K5LoginDirectory: hdir, + KDCDefaultOptions: opts, + KDCTimeSync: 1, + NoAddresses: true, + PermittedEnctypes: []string{"aes256-cts-hmac-sha1-96", "aes128-cts-hmac-sha1-96", "des3-cbc-sha1", "arcfour-hmac-md5", "camellia256-cts-cmac", "camellia128-cts-cmac", "des-cbc-crc", "des-cbc-md5", "des-cbc-md4"}, + RDNS: true, + RealmTryDomains: -1, + SafeChecksumType: 8, + TicketLifetime: time.Duration(24) * time.Hour, + UDPPreferenceLimit: 1465, + PreferredPreauthTypes: []int{17, 16, 15, 14}, + } +} + +// Parse the lines of the [libdefaults] section of the configuration into the LibDefaults struct. +func (l *LibDefaults) parseLines(lines []string) error { + for _, line := range lines { + line = strings.TrimSpace(line) + if line == "" { + continue + } + if strings.Contains(line, "v4_") { + return errors.New("v4 configurations are not supported in Realms section") + } + if !strings.Contains(line, "=") { + return fmt.Errorf("libdefaults configuration line invalid: %s", line) + } + + p := strings.Split(line, "=") + key := strings.TrimSpace(strings.ToLower(p[0])) + switch key { + case "allow_weak_crypto": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.AllowWeakCrypto = v + case "canonicalize": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.Canonicalize = v + case "ccache_type": + p[1] = strings.TrimSpace(p[1]) + v, err := strconv.ParseUint(p[1], 10, 32) + if err != nil || v < 0 || v > 4 { + return fmt.Errorf("libdefaults configuration line invalid: %s", line) + } + l.CCacheType = int(v) + case "clockskew": + d, err := parseDuration(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.Clockskew = d + case "default_client_keytab_name": + l.DefaultClientKeytabName = strings.TrimSpace(p[1]) + case "default_keytab_name": + l.DefaultKeytabName = strings.TrimSpace(p[1]) + case "default_realm": + l.DefaultRealm = strings.TrimSpace(p[1]) + case "default_tgs_enctypes": + l.DefaultTGSEnctypes = strings.Fields(p[1]) + case "default_tkt_enctypes": + l.DefaultTktEnctypes = strings.Fields(p[1]) + case "dns_canonicalize_hostname": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.DNSCanonicalizeHostname = v + case "dns_lookup_kdc": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.DNSLookupKDC = v + case "dns_lookup_realm": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.DNSLookupRealm = v + case "extra_addresses": + ipStr := strings.TrimSpace(p[1]) + for _, ip := range strings.Split(ipStr, ",") { + if eip := net.ParseIP(ip); eip != nil { + l.ExtraAddresses = append(l.ExtraAddresses, eip) + } + } + case "forwardable": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.Forwardable = v + case "ignore_acceptor_hostname": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.IgnoreAcceptorHostname = v + case "k5login_authoritative": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.K5LoginAuthoritative = v + case "k5login_directory": + l.K5LoginDirectory = strings.TrimSpace(p[1]) + case "kdc_default_options": + v := strings.TrimSpace(p[1]) + v = strings.Replace(v, "0x", "", -1) + b, err := hex.DecodeString(v) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid: %s", line) + } + l.KDCDefaultOptions.Bytes = b + l.KDCDefaultOptions.BitLength = len(b) * 8 + case "kdc_timesync": + p[1] = strings.TrimSpace(p[1]) + v, err := strconv.ParseInt(p[1], 10, 32) + if err != nil || v < 0 { + return fmt.Errorf("libdefaults configuration line invalid: %s", line) + } + l.KDCTimeSync = int(v) + case "noaddresses": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.NoAddresses = v + case "permitted_enctypes": + l.PermittedEnctypes = strings.Fields(p[1]) + case "preferred_preauth_types": + p[1] = strings.TrimSpace(p[1]) + t := strings.Split(p[1], ",") + var v []int + for _, s := range t { + i, err := strconv.ParseInt(s, 10, 32) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid: %s", line) + } + v = append(v, int(i)) + } + l.PreferredPreauthTypes = v + case "proxiable": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.Proxiable = v + case "rdns": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.RDNS = v + case "realm_try_domains": + p[1] = strings.TrimSpace(p[1]) + v, err := strconv.ParseInt(p[1], 10, 32) + if err != nil || v < -1 { + return fmt.Errorf("libdefaults configuration line invalid: %s", line) + } + l.RealmTryDomains = int(v) + case "renew_lifetime": + d, err := parseDuration(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.RenewLifetime = d + case "safe_checksum_type": + p[1] = strings.TrimSpace(p[1]) + v, err := strconv.ParseInt(p[1], 10, 32) + if err != nil || v < 0 { + return fmt.Errorf("libdefaults configuration line invalid: %s", line) + } + l.SafeChecksumType = int(v) + case "ticket_lifetime": + d, err := parseDuration(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.TicketLifetime = d + case "udp_preference_limit": + p[1] = strings.TrimSpace(p[1]) + v, err := strconv.ParseUint(p[1], 10, 32) + if err != nil || v > 32700 { + return fmt.Errorf("libdefaults configuration line invalid: %s", line) + } + l.UDPPreferenceLimit = int(v) + case "verify_ap_req_nofail": + v, err := parseBoolean(p[1]) + if err != nil { + return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) + } + l.VerifyAPReqNofail = v + default: + //Ignore the line + continue + } + } + l.DefaultTGSEnctypeIDs = parseETypes(l.DefaultTGSEnctypes, l.AllowWeakCrypto) + l.DefaultTktEnctypeIDs = parseETypes(l.DefaultTktEnctypes, l.AllowWeakCrypto) + l.PermittedEnctypeIDs = parseETypes(l.PermittedEnctypes, l.AllowWeakCrypto) + return nil +} + +// Realm represents an entry in the [realms] section of the configuration. +type Realm struct { + Realm string + AdminServer []string + //auth_to_local //Not implementing for now + //auth_to_local_names //Not implementing for now + DefaultDomain string + KDC []string + KPasswdServer []string //default admin_server:464 + MasterKDC []string +} + +// Parse the lines of a [realms] entry into the Realm struct. +func (r *Realm) parseLines(name string, lines []string) error { + r.Realm = name + var adminServerFinal bool + var KDCFinal bool + var kpasswdServerFinal bool + var masterKDCFinal bool + for _, line := range lines { + if strings.TrimSpace(line) == "" { + continue + } + if !strings.Contains(line, "=") { + return fmt.Errorf("realm configuration line invalid: %s", line) + } + + p := strings.Split(line, "=") + key := strings.TrimSpace(strings.ToLower(p[0])) + v := strings.TrimSpace(p[1]) + switch key { + case "admin_server": + appendUntilFinal(&r.AdminServer, v, &adminServerFinal) + case "default_domain": + r.DefaultDomain = v + case "kdc": + if !strings.Contains(v, ":") { + // No port number specified default to 88 + if strings.HasSuffix(v, `*`) { + v = strings.TrimSpace(strings.TrimSuffix(v, `*`)) + ":88*" + } else { + v = strings.TrimSpace(v) + ":88" + } + } + appendUntilFinal(&r.KDC, v, &KDCFinal) + case "kpasswd_server": + appendUntilFinal(&r.KPasswdServer, v, &kpasswdServerFinal) + case "master_kdc": + appendUntilFinal(&r.MasterKDC, v, &masterKDCFinal) + default: + //Ignore the line + continue + } + } + //default for Kpasswd_server = admin_server:464 + if len(r.KPasswdServer) < 1 { + for _, a := range r.AdminServer { + s := strings.Split(a, ":") + r.KPasswdServer = append(r.KPasswdServer, s[0]+":464") + } + } + return nil +} + +// Parse the lines of the [realms] section of the configuration into an slice of Realm structs. +func parseRealms(lines []string) ([]Realm, error) { + var realms []Realm + start := -1 + var name string + for i, l := range lines { + if strings.TrimSpace(l) == "" { + continue + } + if strings.Contains(l, "v4_") { + return nil, errors.New("v4 configurations are not supported in Realms section") + } + if strings.Contains(l, "{") { + if start >= 0 { + // already started a block!!! + return nil, errors.New("invalid Realms section in configuration") + } + start = i + if !strings.Contains(l, "=") { + return nil, fmt.Errorf("realm configuration line invalid: %s", l) + } + p := strings.Split(l, "=") + name = strings.TrimSpace(p[0]) + } + if strings.Contains(l, "}") { + if start < 0 { + // but not started a block!!! + return nil, errors.New("invalid Realms section in configuration") + } + var r Realm + r.parseLines(name, lines[start+1:i]) + realms = append(realms, r) + start = -1 + } + } + return realms, nil +} + +// DomainRealm maps the domains to realms representing the [domain_realm] section of the configuration. +type DomainRealm map[string]string + +// Parse the lines of the [domain_realm] section of the configuration and add to the mapping. +func (d *DomainRealm) parseLines(lines []string) error { + for _, line := range lines { + if strings.TrimSpace(line) == "" { + continue + } + if !strings.Contains(line, "=") { + return fmt.Errorf("realm configuration line invalid: %s", line) + } + p := strings.Split(line, "=") + domain := strings.TrimSpace(strings.ToLower(p[0])) + realm := strings.TrimSpace(strings.ToUpper(p[1])) + d.addMapping(domain, realm) + } + return nil +} + +// Add a domain to realm mapping. +func (d *DomainRealm) addMapping(domain, realm string) { + (*d)[domain] = realm +} + +// Delete a domain to realm mapping. +func (d *DomainRealm) deleteMapping(domain, realm string) { + delete(*d, domain) +} + +// ResolveRealm resolves the kerberos realm for the specified domain name from the domain to realm mapping. +// The most specific mapping is returned. +func (c *Config) ResolveRealm(domainName string) string { + domainName = strings.TrimSuffix(domainName, ".") + + // Try to match the entire hostname first + if r, ok := c.DomainRealm[domainName]; ok { + return r + } + + // Try to match all DNS domain parts + periods := strings.Count(domainName, ".") + 1 + for i := 2; i <= periods; i++ { + z := strings.SplitN(domainName, ".", i) + if r, ok := c.DomainRealm["."+z[len(z)-1]]; ok { + return r + } + } + return c.LibDefaults.DefaultRealm +} + +// Load the KRB5 configuration from the specified file path. +func Load(cfgPath string) (*Config, error) { + fh, err := os.Open(cfgPath) + if err != nil { + return nil, errors.New("configuration file could not be openned: " + cfgPath + " " + err.Error()) + } + defer fh.Close() + scanner := bufio.NewScanner(fh) + return NewConfigFromScanner(scanner) +} + +// NewConfigFromString creates a new Config struct from a string. +func NewConfigFromString(s string) (*Config, error) { + reader := strings.NewReader(s) + return NewConfigFromReader(reader) +} + +// NewConfigFromReader creates a new Config struct from an io.Reader. +func NewConfigFromReader(r io.Reader) (*Config, error) { + scanner := bufio.NewScanner(r) + return NewConfigFromScanner(scanner) +} + +// NewConfigFromScanner creates a new Config struct from a bufio.Scanner. +func NewConfigFromScanner(scanner *bufio.Scanner) (*Config, error) { + c := NewConfig() + sections := make(map[int]string) + var sectionLineNum []int + var lines []string + for scanner.Scan() { + // Skip comments and blank lines + if matched, _ := regexp.MatchString(`^\s*(#|;|\n)`, scanner.Text()); matched { + continue + } + if matched, _ := regexp.MatchString(`^\s*\[libdefaults\]\s*`, scanner.Text()); matched { + sections[len(lines)] = "libdefaults" + sectionLineNum = append(sectionLineNum, len(lines)) + continue + } + if matched, _ := regexp.MatchString(`^\s*\[realms\]\s*`, scanner.Text()); matched { + sections[len(lines)] = "realms" + sectionLineNum = append(sectionLineNum, len(lines)) + continue + } + if matched, _ := regexp.MatchString(`^\s*\[domain_realm\]\s*`, scanner.Text()); matched { + sections[len(lines)] = "domain_realm" + sectionLineNum = append(sectionLineNum, len(lines)) + continue + } + if matched, _ := regexp.MatchString(`^\s*\[.*\]\s*`, scanner.Text()); matched { + sections[len(lines)] = "unknown_section" + sectionLineNum = append(sectionLineNum, len(lines)) + continue + } + lines = append(lines, scanner.Text()) + } + for i, start := range sectionLineNum { + var end int + if i+1 >= len(sectionLineNum) { + end = len(lines) + } else { + end = sectionLineNum[i+1] + } + switch section := sections[start]; section { + case "libdefaults": + err := c.LibDefaults.parseLines(lines[start:end]) + if err != nil { + return nil, fmt.Errorf("error processing libdefaults section: %v", err) + } + case "realms": + realms, err := parseRealms(lines[start:end]) + if err != nil { + return nil, fmt.Errorf("error processing realms section: %v", err) + } + c.Realms = realms + case "domain_realm": + err := c.DomainRealm.parseLines(lines[start:end]) + if err != nil { + return nil, fmt.Errorf("error processing domaain_realm section: %v", err) + } + default: + continue + } + } + return c, nil +} + +// Parse a space delimited list of ETypes into a list of EType numbers optionally filtering out weak ETypes. +func parseETypes(s []string, w bool) []int32 { + var eti []int32 + for _, et := range s { + if !w { + var weak bool + for _, wet := range strings.Fields(WeakETypeList) { + if et == wet { + weak = true + break + } + } + if weak { + continue + } + } + i := etypeID.EtypeSupported(et) + if i != 0 { + eti = append(eti, i) + } + } + return eti +} + +// Parse a time duration string in the configuration to a golang time.Duration. +func parseDuration(s string) (time.Duration, error) { + s = strings.Replace(strings.TrimSpace(s), " ", "", -1) + + // handle Nd[NmNs] + if strings.Contains(s, "d") { + ds := strings.SplitN(s, "d", 2) + dn, err := strconv.ParseUint(ds[0], 10, 32) + if err != nil { + return time.Duration(0), errors.New("invalid time duration") + } + d := time.Duration(dn*24) * time.Hour + if ds[1] != "" { + dp, err := time.ParseDuration(ds[1]) + if err != nil { + return time.Duration(0), errors.New("invalid time duration") + } + d = d + dp + } + return d, nil + } + + // handle Nm[Ns] + d, err := time.ParseDuration(s) + if err == nil { + return d, nil + } + + // handle N + v, err := strconv.ParseUint(s, 10, 32) + if err == nil && v > 0 { + return time.Duration(v) * time.Second, nil + } + + // handle h:m[:s] + if strings.Contains(s, ":") { + t := strings.Split(s, ":") + if 2 > len(t) || len(t) > 3 { + return time.Duration(0), errors.New("invalid time duration value") + } + var i []int + for _, n := range t { + j, err := strconv.ParseInt(n, 10, 16) + if err != nil { + return time.Duration(0), errors.New("invalid time duration value") + } + i = append(i, int(j)) + } + d := time.Duration(i[0])*time.Hour + time.Duration(i[1])*time.Minute + if len(i) == 3 { + d = d + time.Duration(i[2])*time.Second + } + return d, nil + } + return time.Duration(0), errors.New("invalid time duration value") +} + +// Parse possible boolean values to golang bool. +func parseBoolean(s string) (bool, error) { + s = strings.TrimSpace(s) + v, err := strconv.ParseBool(s) + if err == nil { + return v, nil + } + switch strings.ToLower(s) { + case "yes": + return true, nil + case "y": + return true, nil + case "no": + return false, nil + case "n": + return false, nil + } + return false, errors.New("invalid boolean value") +} + +// Parse array of strings but stop if an asterisk is placed at the end of a line. +func appendUntilFinal(s *[]string, value string, final *bool) { + if *final { + return + } + if last := len(value) - 1; last >= 0 && value[last] == '*' { + *final = true + value = value[:len(value)-1] + } + *s = append(*s, value) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/ccache.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/ccache.go new file mode 100644 index 00000000..3ef5758e --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/ccache.go @@ -0,0 +1,351 @@ +package credentials + +import ( + "bytes" + "encoding/binary" + "errors" + "io/ioutil" + "strings" + "time" + "unsafe" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +const ( + headerFieldTagKDCOffset = 1 +) + +// The first byte of the file always has the value 5. +// The value of the second byte contains the version number (1 through 4) +// Versions 1 and 2 of the file format use native byte order for integer representations. +// Versions 3 and 4 always use big-endian byte order +// After the two-byte version indicator, the file has three parts: +// 1) the header (in version 4 only) +// 2) the default principal name +// 3) a sequence of credentials + +// CCache is the file credentials cache as define here: https://web.mit.edu/kerberos/krb5-latest/doc/formats/ccache_file_format.html +type CCache struct { + Version uint8 + Header header + DefaultPrincipal principal + Credentials []credential + Path string +} + +type header struct { + length uint16 + fields []headerField +} + +type headerField struct { + tag uint16 + length uint16 + value []byte +} + +// Credential cache entry principal struct. +type principal struct { + Realm string + PrincipalName types.PrincipalName +} + +type credential struct { + Client principal + Server principal + Key types.EncryptionKey + AuthTime time.Time + StartTime time.Time + EndTime time.Time + RenewTill time.Time + IsSKey bool + TicketFlags asn1.BitString + Addresses []types.HostAddress + AuthData []types.AuthorizationDataEntry + Ticket []byte + SecondTicket []byte +} + +// LoadCCache loads a credential cache file into a CCache type. +func LoadCCache(cpath string) (CCache, error) { + k, err := ioutil.ReadFile(cpath) + if err != nil { + return CCache{}, err + } + c, err := ParseCCache(k) + c.Path = cpath + return c, err +} + +// ParseCCache byte slice of credential cache data into CCache type. +func ParseCCache(b []byte) (c CCache, err error) { + p := 0 + //The first byte of the file always has the value 5 + if int8(b[p]) != 5 { + err = errors.New("Invalid credential cache data. First byte does not equal 5") + return + } + p++ + //Get credential cache version + //The second byte contains the version number (1 to 4) + c.Version = uint8(b[p]) + if c.Version < 1 || c.Version > 4 { + err = errors.New("Invalid credential cache data. Keytab version is not within 1 to 4") + if err != nil { + return + } + } + p++ + //Version 1 or 2 of the file format uses native byte order for integer representations. Versions 3 & 4 always uses big-endian byte order + var endian binary.ByteOrder + endian = binary.BigEndian + if (c.Version == 1 || c.Version == 2) && isNativeEndianLittle() { + endian = binary.LittleEndian + } + if c.Version == 4 { + err = parseHeader(b, &p, &c, &endian) + if err != nil { + return + } + } + c.DefaultPrincipal = parsePrincipal(b, &p, &c, &endian) + for p < len(b) { + cred, e := parseCredential(b, &p, &c, &endian) + if e != nil { + err = e + return + } + c.Credentials = append(c.Credentials, cred) + } + return +} + +func parseHeader(b []byte, p *int, c *CCache, e *binary.ByteOrder) error { + if c.Version != 4 { + return errors.New("Credentials cache version is not 4 so there is no header to parse.") + } + h := header{} + h.length = uint16(readInt16(b, p, e)) + for *p <= int(h.length) { + f := headerField{} + f.tag = uint16(readInt16(b, p, e)) + f.length = uint16(readInt16(b, p, e)) + f.value = b[*p : *p+int(f.length)] + *p += int(f.length) + if !f.valid() { + return errors.New("Invalid credential cache header found") + } + h.fields = append(h.fields, f) + } + c.Header = h + return nil +} + +// Parse the Keytab bytes of a principal into a Keytab entry's principal. +func parsePrincipal(b []byte, p *int, c *CCache, e *binary.ByteOrder) (princ principal) { + if c.Version != 1 { + //Name Type is omitted in version 1 + princ.PrincipalName.NameType = int32(readInt32(b, p, e)) + } + nc := int(readInt32(b, p, e)) + if c.Version == 1 { + //In version 1 the number of components includes the realm. Minus 1 to make consistent with version 2 + nc-- + } + lenRealm := readInt32(b, p, e) + princ.Realm = string(readBytes(b, p, int(lenRealm), e)) + for i := 0; i < int(nc); i++ { + l := readInt32(b, p, e) + princ.PrincipalName.NameString = append(princ.PrincipalName.NameString, string(readBytes(b, p, int(l), e))) + } + return princ +} + +func parseCredential(b []byte, p *int, c *CCache, e *binary.ByteOrder) (cred credential, err error) { + cred.Client = parsePrincipal(b, p, c, e) + cred.Server = parsePrincipal(b, p, c, e) + key := types.EncryptionKey{} + key.KeyType = int32(readInt16(b, p, e)) + if c.Version == 3 { + //repeated twice in version 3 + key.KeyType = int32(readInt16(b, p, e)) + } + key.KeyValue = readData(b, p, e) + cred.Key = key + cred.AuthTime = readTimestamp(b, p, e) + cred.StartTime = readTimestamp(b, p, e) + cred.EndTime = readTimestamp(b, p, e) + cred.RenewTill = readTimestamp(b, p, e) + if ik := readInt8(b, p, e); ik == 0 { + cred.IsSKey = false + } else { + cred.IsSKey = true + } + cred.TicketFlags = types.NewKrbFlags() + cred.TicketFlags.Bytes = readBytes(b, p, 4, e) + l := int(readInt32(b, p, e)) + cred.Addresses = make([]types.HostAddress, l, l) + for i := range cred.Addresses { + cred.Addresses[i] = readAddress(b, p, e) + } + l = int(readInt32(b, p, e)) + cred.AuthData = make([]types.AuthorizationDataEntry, l, l) + for i := range cred.AuthData { + cred.AuthData[i] = readAuthDataEntry(b, p, e) + } + cred.Ticket = readData(b, p, e) + cred.SecondTicket = readData(b, p, e) + return +} + +// GetClientPrincipalName returns a PrincipalName type for the client the credentials cache is for. +func (c *CCache) GetClientPrincipalName() types.PrincipalName { + return c.DefaultPrincipal.PrincipalName +} + +// GetClientRealm returns the reals of the client the credentials cache is for. +func (c *CCache) GetClientRealm() string { + return c.DefaultPrincipal.Realm +} + +// GetClientCredentials returns a Credentials object representing the client of the credentials cache. +func (c *CCache) GetClientCredentials() *Credentials { + return &Credentials{ + Username: c.DefaultPrincipal.PrincipalName.GetPrincipalNameString(), + Realm: c.GetClientRealm(), + CName: c.DefaultPrincipal.PrincipalName, + } +} + +// Contains tests if the cache contains a credential for the provided server PrincipalName +func (c *CCache) Contains(p types.PrincipalName) bool { + for _, cred := range c.Credentials { + if cred.Server.PrincipalName.Equal(p) { + return true + } + } + return false +} + +// GetEntry returns a specific credential for the PrincipalName provided. +func (c *CCache) GetEntry(p types.PrincipalName) (credential, bool) { + var cred credential + var found bool + for i := range c.Credentials { + if c.Credentials[i].Server.PrincipalName.Equal(p) { + cred = c.Credentials[i] + found = true + break + } + } + if !found { + return cred, false + } + return cred, true +} + +// GetEntries filters out configuration entries an returns a slice of credentials. +func (c *CCache) GetEntries() []credential { + var creds []credential + for _, cred := range c.Credentials { + // Filter out configuration entries + if strings.HasPrefix(cred.Server.Realm, "X-CACHECONF") { + continue + } + creds = append(creds, cred) + } + return creds +} + +func (h *headerField) valid() bool { + // At this time there is only one defined header field. + // Its tag value is 1, its length is always 8. + // Its contents are two 32-bit integers giving the seconds and microseconds + // of the time offset of the KDC relative to the client. + // Adding this offset to the current time on the client should give the current time on the KDC, if that offset has not changed since the initial authentication. + + // Done as a switch in case other tag values are added in the future. + switch h.tag { + case headerFieldTagKDCOffset: + if h.length != 8 || len(h.value) != 8 { + return false + } + return true + } + return false +} + +func readData(b []byte, p *int, e *binary.ByteOrder) []byte { + l := readInt32(b, p, e) + return readBytes(b, p, int(l), e) +} + +func readAddress(b []byte, p *int, e *binary.ByteOrder) types.HostAddress { + a := types.HostAddress{} + a.AddrType = int32(readInt16(b, p, e)) + a.Address = readData(b, p, e) + return a +} + +func readAuthDataEntry(b []byte, p *int, e *binary.ByteOrder) types.AuthorizationDataEntry { + a := types.AuthorizationDataEntry{} + a.ADType = int32(readInt16(b, p, e)) + a.ADData = readData(b, p, e) + return a +} + +// Read bytes representing a timestamp. +func readTimestamp(b []byte, p *int, e *binary.ByteOrder) time.Time { + return time.Unix(int64(readInt32(b, p, e)), 0) +} + +// Read bytes representing an eight bit integer. +func readInt8(b []byte, p *int, e *binary.ByteOrder) (i int8) { + buf := bytes.NewBuffer(b[*p : *p+1]) + binary.Read(buf, *e, &i) + *p++ + return +} + +// Read bytes representing a sixteen bit integer. +func readInt16(b []byte, p *int, e *binary.ByteOrder) (i int16) { + buf := bytes.NewBuffer(b[*p : *p+2]) + binary.Read(buf, *e, &i) + *p += 2 + return +} + +// Read bytes representing a thirty two bit integer. +func readInt32(b []byte, p *int, e *binary.ByteOrder) (i int32) { + buf := bytes.NewBuffer(b[*p : *p+4]) + binary.Read(buf, *e, &i) + *p += 4 + return +} + +func readBytes(b []byte, p *int, s int, e *binary.ByteOrder) []byte { + buf := bytes.NewBuffer(b[*p : *p+s]) + r := make([]byte, s) + binary.Read(buf, *e, &r) + *p += s + return r +} + +func isNativeEndianLittle() bool { + var x = 0x012345678 + var p = unsafe.Pointer(&x) + var bp = (*[4]byte)(p) + + var endian bool + if 0x01 == bp[0] { + endian = false + } else if (0x78 & 0xff) == (bp[0] & 0xff) { + endian = true + } else { + // Default to big endian + endian = false + } + return endian +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/credentials.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/credentials.go new file mode 100644 index 00000000..b1b47552 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/credentials.go @@ -0,0 +1,257 @@ +// Package credentials provides credentials management for Kerberos 5 authentication. +package credentials + +import ( + "time" + + "github.com/hashicorp/go-uuid" + "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" + "gopkg.in/jcmturner/gokrb5.v5/keytab" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +const ( + // AttributeKeyADCredentials assigned number for AD credentials. + AttributeKeyADCredentials = 1 +) + +// Credentials struct for a user. +// Contains either a keytab, password or both. +// Keytabs are used over passwords if both are defined. +type Credentials struct { + Username string + displayName string + Realm string + CName types.PrincipalName + Keytab keytab.Keytab + Password string + Attributes map[int]interface{} + ValidUntil time.Time + + authenticated bool + human bool + authTime time.Time + groupMembership map[string]bool + sessionID string +} + +// ADCredentials contains information obtained from the PAC. +type ADCredentials struct { + EffectiveName string + FullName string + UserID int + PrimaryGroupID int + LogOnTime time.Time + LogOffTime time.Time + PasswordLastSet time.Time + GroupMembershipSIDs []string + LogonDomainName string + LogonDomainID string + LogonServer string +} + +// NewCredentials creates a new Credentials instance. +func NewCredentials(username string, realm string) Credentials { + uid, err := uuid.GenerateUUID() + if err != nil { + uid = "00unique-sess-ions-uuid-unavailable0" + } + return Credentials{ + Username: username, + displayName: username, + Realm: realm, + CName: types.NewPrincipalName(nametype.KRB_NT_PRINCIPAL, username), + Keytab: keytab.NewKeytab(), + Attributes: make(map[int]interface{}), + sessionID: uid, + } +} + +// NewCredentialsFromPrincipal creates a new Credentials instance with the user details provides as a PrincipalName type. +func NewCredentialsFromPrincipal(cname types.PrincipalName, realm string) Credentials { + uid, err := uuid.GenerateUUID() + if err != nil { + uid = "00unique-sess-ions-uuid-unavailable0" + } + return Credentials{ + Username: cname.GetPrincipalNameString(), + displayName: cname.GetPrincipalNameString(), + Realm: realm, + CName: cname, + Keytab: keytab.NewKeytab(), + Attributes: make(map[int]interface{}), + groupMembership: make(map[string]bool), + sessionID: uid, + } +} + +// WithKeytab sets the Keytab in the Credentials struct. +func (c *Credentials) WithKeytab(kt keytab.Keytab) *Credentials { + c.Keytab = kt + return c +} + +// WithPassword sets the password in the Credentials struct. +func (c *Credentials) WithPassword(password string) *Credentials { + c.Password = password + return c +} + +// HasKeytab queries if the Credentials has a keytab defined. +func (c *Credentials) HasKeytab() bool { + if len(c.Keytab.Entries) > 0 { + return true + } + return false +} + +// SetValidUntil sets the expiry time of the credentials +func (c *Credentials) SetValidUntil(t time.Time) { + c.ValidUntil = t +} + +// HasPassword queries if the Credentials has a password defined. +func (c *Credentials) HasPassword() bool { + if c.Password != "" { + return true + } + return false +} + +// SetADCredentials adds ADCredentials attributes to the credentials +func (c *Credentials) SetADCredentials(a ADCredentials) { + c.Attributes[AttributeKeyADCredentials] = a + if a.FullName != "" { + c.SetDisplayName(a.FullName) + } + if a.EffectiveName != "" { + c.SetUserName(a.EffectiveName) + } + if a.LogonDomainName != "" { + c.SetDomain(a.LogonDomainName) + } + for i := range a.GroupMembershipSIDs { + c.AddAuthzAttribute(a.GroupMembershipSIDs[i]) + } +} + +// Methods to implement goidentity.Identity interface + +// UserName returns the credential's username. +func (c *Credentials) UserName() string { + return c.Username +} + +// SetUserName sets the username value on the credential. +func (c *Credentials) SetUserName(s string) { + c.Username = s +} + +// Domain returns the credential's domain. +func (c *Credentials) Domain() string { + return c.Realm +} + +// SetDomain sets the domain value on the credential. +func (c *Credentials) SetDomain(s string) { + c.Realm = s +} + +// DisplayName returns the credential's display name. +func (c *Credentials) DisplayName() string { + return c.displayName +} + +// SetDisplayName sets the display name value on the credential. +func (c *Credentials) SetDisplayName(s string) { + c.displayName = s +} + +// Human returns if the credential represents a human or not. +func (c *Credentials) Human() bool { + return c.human +} + +// SetHuman sets the credential as human. +func (c *Credentials) SetHuman(b bool) { + c.human = b +} + +// AuthTime returns the time the credential was authenticated. +func (c *Credentials) AuthTime() time.Time { + return c.authTime +} + +// SetAuthTime sets the time the credential was authenticated. +func (c *Credentials) SetAuthTime(t time.Time) { + c.authTime = t +} + +// AuthzAttributes returns the credentials authorizing attributes. +func (c *Credentials) AuthzAttributes() []string { + s := make([]string, len(c.groupMembership)) + i := 0 + for a := range c.groupMembership { + s[i] = a + i++ + } + return s +} + +// Authenticated indicates if the credential has been successfully authenticated or not. +func (c *Credentials) Authenticated() bool { + return c.authenticated +} + +// SetAuthenticated sets the credential as having been successfully authenticated. +func (c *Credentials) SetAuthenticated(b bool) { + c.authenticated = b +} + +// AddAuthzAttribute adds an authorization attribute to the credential. +func (c *Credentials) AddAuthzAttribute(a string) { + c.groupMembership[a] = true +} + +// RemoveAuthzAttribute removes an authorization attribute from the credential. +func (c *Credentials) RemoveAuthzAttribute(a string) { + if _, ok := c.groupMembership[a]; !ok { + return + } + delete(c.groupMembership, a) +} + +// EnableAuthzAttribute toggles an authorization attribute to an enabled state on the credential. +func (c *Credentials) EnableAuthzAttribute(a string) { + if enabled, ok := c.groupMembership[a]; ok && !enabled { + c.groupMembership[a] = true + } +} + +// DisableAuthzAttribute toggles an authorization attribute to a disabled state on the credential. +func (c *Credentials) DisableAuthzAttribute(a string) { + if enabled, ok := c.groupMembership[a]; ok && enabled { + c.groupMembership[a] = false + } +} + +// Authorized indicates if the credential has the specified authorizing attribute. +func (c *Credentials) Authorized(a string) bool { + if enabled, ok := c.groupMembership[a]; ok && enabled { + return true + } + return false +} + +// SessionID returns the credential's session ID. +func (c *Credentials) SessionID() string { + return c.sessionID +} + +// Expired indicates if the credential has expired. +func (c *Credentials) Expired() bool { + if !c.ValidUntil.IsZero() && time.Now().UTC().After(c.ValidUntil) { + return true + } + return false +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha1-96.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha1-96.go new file mode 100644 index 00000000..53c4db1d --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha1-96.go @@ -0,0 +1,173 @@ +package crypto + +import ( + "crypto/aes" + "crypto/hmac" + "crypto/sha1" + "hash" + + "gopkg.in/jcmturner/gokrb5.v5/crypto/common" + "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961" + "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962" + "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" + "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" +) + +// RFC 3962 +//+--------------------------------------------------------------------+ +//| protocol key format 128- or 256-bit string | +//| | +//| string-to-key function PBKDF2+DK with variable | +//| iteration count (see | +//| above) | +//| | +//| default string-to-key parameters 00 00 10 00 | +//| | +//| key-generation seed length key size | +//| | +//| random-to-key function identity function | +//| | +//| hash function, H SHA-1 | +//| | +//| HMAC output size, h 12 octets (96 bits) | +//| | +//| message block size, m 1 octet | +//| | +//| encryption/decryption functions, AES in CBC-CTS mode | +//| E and D (cipher block size 16 | +//| octets), with next-to- | +//| last block (last block | +//| if only one) as CBC-style | +//| ivec | +//+--------------------------------------------------------------------+ +// +//+--------------------------------------------------------------------+ +//| encryption types | +//+--------------------------------------------------------------------+ +//| type name etype value key size | +//+--------------------------------------------------------------------+ +//| aes128-cts-hmac-sha1-96 17 128 | +//| aes256-cts-hmac-sha1-96 18 256 | +//+--------------------------------------------------------------------+ +// +//+--------------------------------------------------------------------+ +//| checksum types | +//+--------------------------------------------------------------------+ +//| type name sumtype value length | +//+--------------------------------------------------------------------+ +//| hmac-sha1-96-aes128 15 96 | +//| hmac-sha1-96-aes256 16 96 | +//+--------------------------------------------------------------------+ + +// Aes128CtsHmacSha96 implements Kerberos encryption type aes128-cts-hmac-sha1-96 +type Aes128CtsHmacSha96 struct { +} + +// GetETypeID returns the EType ID number. +func (e Aes128CtsHmacSha96) GetETypeID() int32 { + return etypeID.AES128_CTS_HMAC_SHA1_96 +} + +// GetHashID returns the checksum type ID number. +func (e Aes128CtsHmacSha96) GetHashID() int32 { + return chksumtype.HMAC_SHA1_96_AES128 +} + +// GetKeyByteSize returns the number of bytes for key of this etype. +func (e Aes128CtsHmacSha96) GetKeyByteSize() int { + return 128 / 8 +} + +// GetKeySeedBitLength returns the number of bits for the seed for key generation. +func (e Aes128CtsHmacSha96) GetKeySeedBitLength() int { + return e.GetKeyByteSize() * 8 +} + +// GetHashFunc returns the hash function for this etype. +func (e Aes128CtsHmacSha96) GetHashFunc() func() hash.Hash { + return sha1.New +} + +// GetMessageBlockByteSize returns the block size for the etype's messages. +func (e Aes128CtsHmacSha96) GetMessageBlockByteSize() int { + return 1 +} + +// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. +func (e Aes128CtsHmacSha96) GetDefaultStringToKeyParams() string { + return "00001000" +} + +// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. +func (e Aes128CtsHmacSha96) GetConfounderByteSize() int { + return aes.BlockSize +} + +// GetHMACBitLength returns the bit count size of the integrity hash. +func (e Aes128CtsHmacSha96) GetHMACBitLength() int { + return 96 +} + +// GetCypherBlockBitLength returns the bit count size of the cypher block. +func (e Aes128CtsHmacSha96) GetCypherBlockBitLength() int { + return aes.BlockSize * 8 +} + +// StringToKey returns a key derived from the string provided. +func (e Aes128CtsHmacSha96) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { + return rfc3962.StringToKey(secret, salt, s2kparams, e) +} + +// RandomToKey returns a key from the bytes provided. +func (e Aes128CtsHmacSha96) RandomToKey(b []byte) []byte { + return rfc3961.RandomToKey(b) +} + +// EncryptData encrypts the data provided. +func (e Aes128CtsHmacSha96) EncryptData(key, data []byte) ([]byte, []byte, error) { + return rfc3962.EncryptData(key, data, e) +} + +// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. +func (e Aes128CtsHmacSha96) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { + return rfc3962.EncryptMessage(key, message, usage, e) +} + +// DecryptData decrypts the data provided. +func (e Aes128CtsHmacSha96) DecryptData(key, data []byte) ([]byte, error) { + return rfc3962.DecryptData(key, data, e) +} + +// DecryptMessage decrypts the message provided and verifies the integrity of the message. +func (e Aes128CtsHmacSha96) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { + return rfc3962.DecryptMessage(key, ciphertext, usage, e) +} + +// DeriveKey derives a key from the protocol key based on the usage value. +func (e Aes128CtsHmacSha96) DeriveKey(protocolKey, usage []byte) ([]byte, error) { + return rfc3961.DeriveKey(protocolKey, usage, e) +} + +// DeriveRandom generates data needed for key generation. +func (e Aes128CtsHmacSha96) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { + return rfc3961.DeriveRandom(protocolKey, usage, e) +} + +// VerifyIntegrity checks the integrity of the plaintext message. +func (e Aes128CtsHmacSha96) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { + return rfc3961.VerifyIntegrity(protocolKey, ct, pt, usage, e) +} + +// GetChecksumHash returns a keyed checksum hash of the bytes provided. +func (e Aes128CtsHmacSha96) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { + return common.GetHash(data, protocolKey, common.GetUsageKc(usage), e) +} + +// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. +func (e Aes128CtsHmacSha96) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { + c, err := e.GetChecksumHash(protocolKey, data, usage) + if err != nil { + return false + } + return hmac.Equal(chksum, c) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha256-128.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha256-128.go new file mode 100644 index 00000000..a95ee99e --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha256-128.go @@ -0,0 +1,135 @@ +package crypto + +import ( + "crypto/aes" + "crypto/hmac" + "crypto/sha256" + "hash" + + "gopkg.in/jcmturner/gokrb5.v5/crypto/common" + "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009" + "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" + "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" +) + +// RFC https://tools.ietf.org/html/rfc8009 + +// Aes128CtsHmacSha256128 implements Kerberos encryption type aes128-cts-hmac-sha256-128 +type Aes128CtsHmacSha256128 struct { +} + +// GetETypeID returns the EType ID number. +func (e Aes128CtsHmacSha256128) GetETypeID() int32 { + return etypeID.AES128_CTS_HMAC_SHA256_128 +} + +// GetHashID returns the checksum type ID number. +func (e Aes128CtsHmacSha256128) GetHashID() int32 { + return chksumtype.HMAC_SHA256_128_AES128 +} + +// GetKeyByteSize returns the number of bytes for key of this etype. +func (e Aes128CtsHmacSha256128) GetKeyByteSize() int { + return 128 / 8 +} + +// GetKeySeedBitLength returns the number of bits for the seed for key generation. +func (e Aes128CtsHmacSha256128) GetKeySeedBitLength() int { + return e.GetKeyByteSize() * 8 +} + +// GetHashFunc returns the hash function for this etype. +func (e Aes128CtsHmacSha256128) GetHashFunc() func() hash.Hash { + return sha256.New +} + +// GetMessageBlockByteSize returns the block size for the etype's messages. +func (e Aes128CtsHmacSha256128) GetMessageBlockByteSize() int { + return 1 +} + +// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. +func (e Aes128CtsHmacSha256128) GetDefaultStringToKeyParams() string { + return "00008000" +} + +// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. +func (e Aes128CtsHmacSha256128) GetConfounderByteSize() int { + return aes.BlockSize +} + +// GetHMACBitLength returns the bit count size of the integrity hash. +func (e Aes128CtsHmacSha256128) GetHMACBitLength() int { + return 128 +} + +// GetCypherBlockBitLength returns the bit count size of the cypher block. +func (e Aes128CtsHmacSha256128) GetCypherBlockBitLength() int { + return aes.BlockSize * 8 +} + +// StringToKey returns a key derived from the string provided. +func (e Aes128CtsHmacSha256128) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { + saltp := rfc8009.GetSaltP(salt, "aes128-cts-hmac-sha256-128") + return rfc8009.StringToKey(secret, saltp, s2kparams, e) +} + +// RandomToKey returns a key from the bytes provided. +func (e Aes128CtsHmacSha256128) RandomToKey(b []byte) []byte { + return rfc8009.RandomToKey(b) +} + +// EncryptData encrypts the data provided. +func (e Aes128CtsHmacSha256128) EncryptData(key, data []byte) ([]byte, []byte, error) { + return rfc8009.EncryptData(key, data, e) +} + +// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. +func (e Aes128CtsHmacSha256128) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { + return rfc8009.EncryptMessage(key, message, usage, e) +} + +// DecryptData decrypts the data provided. +func (e Aes128CtsHmacSha256128) DecryptData(key, data []byte) ([]byte, error) { + return rfc8009.DecryptData(key, data, e) +} + +// DecryptMessage decrypts the message provided and verifies the integrity of the message. +func (e Aes128CtsHmacSha256128) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { + return rfc8009.DecryptMessage(key, ciphertext, usage, e) +} + +// DeriveKey derives a key from the protocol key based on the usage value. +func (e Aes128CtsHmacSha256128) DeriveKey(protocolKey, usage []byte) ([]byte, error) { + return rfc8009.DeriveKey(protocolKey, usage, e), nil +} + +// DeriveRandom generates data needed for key generation. +func (e Aes128CtsHmacSha256128) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { + return rfc8009.DeriveRandom(protocolKey, usage, e) +} + +// VerifyIntegrity checks the integrity of the ciphertext message. +// The HMAC is calculated over the cipher state concatenated with the +// AES output, instead of being calculated over the confounder and +// plaintext. This allows the message receiver to verify the +// integrity of the message before decrypting the message. +// Therefore the pt value to this interface method is not use. Pass any []byte. +func (e Aes128CtsHmacSha256128) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { + // We don't need ib just there for the interface + return rfc8009.VerifyIntegrity(protocolKey, ct, usage, e) +} + +// GetChecksumHash returns a keyed checksum hash of the bytes provided. +func (e Aes128CtsHmacSha256128) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { + return common.GetHash(data, protocolKey, common.GetUsageKc(usage), e) +} + +// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. +func (e Aes128CtsHmacSha256128) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { + c, err := e.GetChecksumHash(protocolKey, data, usage) + if err != nil { + return false + } + return hmac.Equal(chksum, c) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha1-96.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha1-96.go new file mode 100644 index 00000000..14a1ce61 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha1-96.go @@ -0,0 +1,173 @@ +package crypto + +import ( + "crypto/aes" + "crypto/hmac" + "crypto/sha1" + "hash" + + "gopkg.in/jcmturner/gokrb5.v5/crypto/common" + "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961" + "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962" + "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" + "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" +) + +// RFC 3962 +//+--------------------------------------------------------------------+ +//| protocol key format 128- or 256-bit string | +//| | +//| string-to-key function PBKDF2+DK with variable | +//| iteration count (see | +//| above) | +//| | +//| default string-to-key parameters 00 00 10 00 | +//| | +//| key-generation seed length key size | +//| | +//| random-to-key function identity function | +//| | +//| hash function, H SHA-1 | +//| | +//| HMAC output size, h 12 octets (96 bits) | +//| | +//| message block size, m 1 octet | +//| | +//| encryption/decryption functions, AES in CBC-CTS mode | +//| E and D (cipher block size 16 | +//| octets), with next-to- | +//| last block (last block | +//| if only one) as CBC-style | +//| ivec | +//+--------------------------------------------------------------------+ +// +//+--------------------------------------------------------------------+ +//| encryption types | +//+--------------------------------------------------------------------+ +//| type name etype value key size | +//+--------------------------------------------------------------------+ +//| aes128-cts-hmac-sha1-96 17 128 | +//| aes256-cts-hmac-sha1-96 18 256 | +//+--------------------------------------------------------------------+ +// +//+--------------------------------------------------------------------+ +//| checksum types | +//+--------------------------------------------------------------------+ +//| type name sumtype value length | +//+--------------------------------------------------------------------+ +//| hmac-sha1-96-aes128 15 96 | +//| hmac-sha1-96-aes256 16 96 | +//+--------------------------------------------------------------------+ + +// Aes256CtsHmacSha96 implements Kerberos encryption type aes256-cts-hmac-sha1-96 +type Aes256CtsHmacSha96 struct { +} + +// GetETypeID returns the EType ID number. +func (e Aes256CtsHmacSha96) GetETypeID() int32 { + return etypeID.AES256_CTS_HMAC_SHA1_96 +} + +// GetHashID returns the checksum type ID number. +func (e Aes256CtsHmacSha96) GetHashID() int32 { + return chksumtype.HMAC_SHA1_96_AES256 +} + +// GetKeyByteSize returns the number of bytes for key of this etype. +func (e Aes256CtsHmacSha96) GetKeyByteSize() int { + return 256 / 8 +} + +// GetKeySeedBitLength returns the number of bits for the seed for key generation. +func (e Aes256CtsHmacSha96) GetKeySeedBitLength() int { + return e.GetKeyByteSize() * 8 +} + +// GetHashFunc returns the hash function for this etype. +func (e Aes256CtsHmacSha96) GetHashFunc() func() hash.Hash { + return sha1.New +} + +// GetMessageBlockByteSize returns the block size for the etype's messages. +func (e Aes256CtsHmacSha96) GetMessageBlockByteSize() int { + return 1 +} + +// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. +func (e Aes256CtsHmacSha96) GetDefaultStringToKeyParams() string { + return "00001000" +} + +// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. +func (e Aes256CtsHmacSha96) GetConfounderByteSize() int { + return aes.BlockSize +} + +// GetHMACBitLength returns the bit count size of the integrity hash. +func (e Aes256CtsHmacSha96) GetHMACBitLength() int { + return 96 +} + +// GetCypherBlockBitLength returns the bit count size of the cypher block. +func (e Aes256CtsHmacSha96) GetCypherBlockBitLength() int { + return aes.BlockSize * 8 +} + +// StringToKey returns a key derived from the string provided. +func (e Aes256CtsHmacSha96) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { + return rfc3962.StringToKey(secret, salt, s2kparams, e) +} + +// RandomToKey returns a key from the bytes provided. +func (e Aes256CtsHmacSha96) RandomToKey(b []byte) []byte { + return rfc3961.RandomToKey(b) +} + +// EncryptData encrypts the data provided. +func (e Aes256CtsHmacSha96) EncryptData(key, data []byte) ([]byte, []byte, error) { + return rfc3962.EncryptData(key, data, e) +} + +// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. +func (e Aes256CtsHmacSha96) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { + return rfc3962.EncryptMessage(key, message, usage, e) +} + +// DecryptData decrypts the data provided. +func (e Aes256CtsHmacSha96) DecryptData(key, data []byte) ([]byte, error) { + return rfc3962.DecryptData(key, data, e) +} + +// DecryptMessage decrypts the message provided and verifies the integrity of the message. +func (e Aes256CtsHmacSha96) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { + return rfc3962.DecryptMessage(key, ciphertext, usage, e) +} + +// DeriveKey derives a key from the protocol key based on the usage value. +func (e Aes256CtsHmacSha96) DeriveKey(protocolKey, usage []byte) ([]byte, error) { + return rfc3961.DeriveKey(protocolKey, usage, e) +} + +// DeriveRandom generates data needed for key generation. +func (e Aes256CtsHmacSha96) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { + return rfc3961.DeriveRandom(protocolKey, usage, e) +} + +// VerifyIntegrity checks the integrity of the plaintext message. +func (e Aes256CtsHmacSha96) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { + return rfc3961.VerifyIntegrity(protocolKey, ct, pt, usage, e) +} + +// GetChecksumHash returns a keyed checksum hash of the bytes provided. +func (e Aes256CtsHmacSha96) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { + return common.GetHash(data, protocolKey, common.GetUsageKc(usage), e) +} + +// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. +func (e Aes256CtsHmacSha96) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { + c, err := e.GetChecksumHash(protocolKey, data, usage) + if err != nil { + return false + } + return hmac.Equal(chksum, c) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha384-192.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha384-192.go new file mode 100644 index 00000000..f073a05f --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha384-192.go @@ -0,0 +1,135 @@ +package crypto + +import ( + "crypto/aes" + "crypto/hmac" + "crypto/sha512" + "hash" + + "gopkg.in/jcmturner/gokrb5.v5/crypto/common" + "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009" + "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" + "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" +) + +// RFC https://tools.ietf.org/html/rfc8009 + +// Aes256CtsHmacSha384192 implements Kerberos encryption type aes256-cts-hmac-sha384-192 +type Aes256CtsHmacSha384192 struct { +} + +// GetETypeID returns the EType ID number. +func (e Aes256CtsHmacSha384192) GetETypeID() int32 { + return etypeID.AES256_CTS_HMAC_SHA384_192 +} + +// GetHashID returns the checksum type ID number. +func (e Aes256CtsHmacSha384192) GetHashID() int32 { + return chksumtype.HMAC_SHA384_192_AES256 +} + +// GetKeyByteSize returns the number of bytes for key of this etype. +func (e Aes256CtsHmacSha384192) GetKeyByteSize() int { + return 192 / 8 +} + +// GetKeySeedBitLength returns the number of bits for the seed for key generation. +func (e Aes256CtsHmacSha384192) GetKeySeedBitLength() int { + return e.GetKeyByteSize() * 8 +} + +// GetHashFunc returns the hash function for this etype. +func (e Aes256CtsHmacSha384192) GetHashFunc() func() hash.Hash { + return sha512.New384 +} + +// GetMessageBlockByteSize returns the block size for the etype's messages. +func (e Aes256CtsHmacSha384192) GetMessageBlockByteSize() int { + return 1 +} + +// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. +func (e Aes256CtsHmacSha384192) GetDefaultStringToKeyParams() string { + return "00008000" +} + +// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. +func (e Aes256CtsHmacSha384192) GetConfounderByteSize() int { + return aes.BlockSize +} + +// GetHMACBitLength returns the bit count size of the integrity hash. +func (e Aes256CtsHmacSha384192) GetHMACBitLength() int { + return 192 +} + +// GetCypherBlockBitLength returns the bit count size of the cypher block. +func (e Aes256CtsHmacSha384192) GetCypherBlockBitLength() int { + return aes.BlockSize * 8 +} + +// StringToKey returns a key derived from the string provided. +func (e Aes256CtsHmacSha384192) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { + saltp := rfc8009.GetSaltP(salt, "aes256-cts-hmac-sha384-192") + return rfc8009.StringToKey(secret, saltp, s2kparams, e) +} + +// RandomToKey returns a key from the bytes provided. +func (e Aes256CtsHmacSha384192) RandomToKey(b []byte) []byte { + return rfc8009.RandomToKey(b) +} + +// EncryptData encrypts the data provided. +func (e Aes256CtsHmacSha384192) EncryptData(key, data []byte) ([]byte, []byte, error) { + return rfc8009.EncryptData(key, data, e) +} + +// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. +func (e Aes256CtsHmacSha384192) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { + return rfc8009.EncryptMessage(key, message, usage, e) +} + +// DecryptData decrypts the data provided. +func (e Aes256CtsHmacSha384192) DecryptData(key, data []byte) ([]byte, error) { + return rfc8009.DecryptData(key, data, e) +} + +// DecryptMessage decrypts the message provided and verifies the integrity of the message. +func (e Aes256CtsHmacSha384192) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { + return rfc8009.DecryptMessage(key, ciphertext, usage, e) +} + +// DeriveKey derives a key from the protocol key based on the usage value. +func (e Aes256CtsHmacSha384192) DeriveKey(protocolKey, usage []byte) ([]byte, error) { + return rfc8009.DeriveKey(protocolKey, usage, e), nil +} + +// DeriveRandom generates data needed for key generation. +func (e Aes256CtsHmacSha384192) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { + return rfc8009.DeriveRandom(protocolKey, usage, e) +} + +// VerifyIntegrity checks the integrity of the ciphertext message. +// The HMAC is calculated over the cipher state concatenated with the +// AES output, instead of being calculated over the confounder and +// plaintext. This allows the message receiver to verify the +// integrity of the message before decrypting the message. +// Therefore the pt value to this interface method is not use. Pass any []byte. +func (e Aes256CtsHmacSha384192) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { + // We don't need ib just there for the interface + return rfc8009.VerifyIntegrity(protocolKey, ct, usage, e) +} + +// GetChecksumHash returns a keyed checksum hash of the bytes provided. +func (e Aes256CtsHmacSha384192) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { + return common.GetHash(data, protocolKey, common.GetUsageKc(usage), e) +} + +// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. +func (e Aes256CtsHmacSha384192) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { + c, err := e.GetChecksumHash(protocolKey, data, usage) + if err != nil { + return false + } + return hmac.Equal(chksum, c) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/common/common.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/common/common.go new file mode 100644 index 00000000..874f93c0 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/common/common.go @@ -0,0 +1,143 @@ +// Package common provides encryption methods common across encryption types +package common + +import ( + "bytes" + "crypto/hmac" + "encoding/binary" + "encoding/hex" + "errors" + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" +) + +// ZeroPad pads bytes with zeros to nearest multiple of message size m. +func ZeroPad(b []byte, m int) ([]byte, error) { + if m <= 0 { + return nil, errors.New("Invalid message block size when padding") + } + if b == nil || len(b) == 0 { + return nil, errors.New("Data not valid to pad: Zero size") + } + if l := len(b) % m; l != 0 { + n := m - l + z := make([]byte, n) + b = append(b, z...) + } + return b, nil +} + +// PKCS7Pad pads bytes according to RFC 2315 to nearest multiple of message size m. +func PKCS7Pad(b []byte, m int) ([]byte, error) { + if m <= 0 { + return nil, errors.New("Invalid message block size when padding") + } + if b == nil || len(b) == 0 { + return nil, errors.New("Data not valid to pad: Zero size") + } + n := m - (len(b) % m) + pb := make([]byte, len(b)+n) + copy(pb, b) + copy(pb[len(b):], bytes.Repeat([]byte{byte(n)}, n)) + return pb, nil +} + +// PKCS7Unpad removes RFC 2315 padding from byes where message size is m. +func PKCS7Unpad(b []byte, m int) ([]byte, error) { + if m <= 0 { + return nil, errors.New("invalid message block size when unpadding") + } + if b == nil || len(b) == 0 { + return nil, errors.New("padded data not valid: Zero size") + } + if len(b)%m != 0 { + return nil, errors.New("padded data not valid: Not multiple of message block size") + } + c := b[len(b)-1] + n := int(c) + if n == 0 || n > len(b) { + return nil, errors.New("padded data not valid: Data may not have been padded") + } + for i := 0; i < n; i++ { + if b[len(b)-n+i] != c { + return nil, errors.New("padded data not valid") + } + } + return b[:len(b)-n], nil +} + +// GetHash generates the keyed hash value according to the etype's hash function. +func GetHash(pt, key []byte, usage []byte, etype etype.EType) ([]byte, error) { + k, err := etype.DeriveKey(key, usage) + if err != nil { + return nil, fmt.Errorf("unable to derive key for checksum: %v", err) + } + mac := hmac.New(etype.GetHashFunc(), k) + p := make([]byte, len(pt)) + copy(p, pt) + mac.Write(p) + return mac.Sum(nil)[:etype.GetHMACBitLength()/8], nil +} + +// GetChecksumHash returns a keyed checksum hash of the bytes provided. +func GetChecksumHash(b, key []byte, usage uint32, etype etype.EType) ([]byte, error) { + return GetHash(b, key, GetUsageKc(usage), etype) +} + +// GetIntegrityHash returns a keyed integrity hash of the bytes provided. +func GetIntegrityHash(b, key []byte, usage uint32, etype etype.EType) ([]byte, error) { + return GetHash(b, key, GetUsageKi(usage), etype) +} + +// VerifyChecksum compares the checksum of the msg bytes is the same as the checksum provided. +func VerifyChecksum(key, chksum, msg []byte, usage uint32, etype etype.EType) bool { + //The ciphertext output is the concatenation of the output of the basic + //encryption function E and a (possibly truncated) HMAC using the + //specified hash function H, both applied to the plaintext with a + //random confounder prefix and sufficient padding to bring it to a + //multiple of the message block size. When the HMAC is computed, the + //key is used in the protocol key form. + expectedMAC, _ := GetChecksumHash(msg, key, usage, etype) + return hmac.Equal(chksum, expectedMAC) +} + +// GetUsageKc returns the checksum key usage value for the usage number un. +// +// RFC 3961: The "well-known constant" used for the DK function is the key usage number, expressed as four octets in big-endian order, followed by one octet indicated below. +// +// Kc = DK(base-key, usage | 0x99); +func GetUsageKc(un uint32) []byte { + return getUsage(un, 0x99) +} + +// GetUsageKe returns the encryption key usage value for the usage number un +// +// RFC 3961: The "well-known constant" used for the DK function is the key usage number, expressed as four octets in big-endian order, followed by one octet indicated below. +// +// Ke = DK(base-key, usage | 0xAA); +func GetUsageKe(un uint32) []byte { + return getUsage(un, 0xAA) +} + +// GetUsageKi returns the integrity key usage value for the usage number un +// +// RFC 3961: The "well-known constant" used for the DK function is the key usage number, expressed as four octets in big-endian order, followed by one octet indicated below. +// +// Ki = DK(base-key, usage | 0x55); +func GetUsageKi(un uint32) []byte { + return getUsage(un, 0x55) +} + +func getUsage(un uint32, o byte) []byte { + var buf bytes.Buffer + binary.Write(&buf, binary.BigEndian, un) + return append(buf.Bytes(), o) +} + +// IterationsToS2Kparams converts the number of iterations as an integer to a string representation. +func IterationsToS2Kparams(i uint32) string { + b := make([]byte, 4, 4) + binary.BigEndian.PutUint32(b, i) + return hex.EncodeToString(b) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/crypto.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/crypto.go new file mode 100644 index 00000000..3ad5a576 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/crypto.go @@ -0,0 +1,175 @@ +// Package crypto implements cryptographic functions for Kerberos 5 implementation. +package crypto + +import ( + "encoding/hex" + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" + "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" + "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" + "gopkg.in/jcmturner/gokrb5.v5/iana/patype" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// GetEtype returns an instances of the required etype struct for the etype ID. +func GetEtype(id int32) (etype.EType, error) { + switch id { + case etypeID.AES128_CTS_HMAC_SHA1_96: + var et Aes128CtsHmacSha96 + return et, nil + case etypeID.AES256_CTS_HMAC_SHA1_96: + var et Aes256CtsHmacSha96 + return et, nil + case etypeID.AES128_CTS_HMAC_SHA256_128: + var et Aes128CtsHmacSha256128 + return et, nil + case etypeID.AES256_CTS_HMAC_SHA384_192: + var et Aes256CtsHmacSha384192 + return et, nil + case etypeID.DES3_CBC_SHA1_KD: + var et Des3CbcSha1Kd + return et, nil + case etypeID.RC4_HMAC: + var et RC4HMAC + return et, nil + default: + return nil, fmt.Errorf("unknown or unsupported EType: %d", id) + } +} + +// GetChksumEtype returns an instances of the required etype struct for the checksum ID. +func GetChksumEtype(id int32) (etype.EType, error) { + switch id { + case chksumtype.HMAC_SHA1_96_AES128: + var et Aes128CtsHmacSha96 + return et, nil + case chksumtype.HMAC_SHA1_96_AES256: + var et Aes256CtsHmacSha96 + return et, nil + case chksumtype.HMAC_SHA256_128_AES128: + var et Aes128CtsHmacSha256128 + return et, nil + case chksumtype.HMAC_SHA384_192_AES256: + var et Aes256CtsHmacSha384192 + return et, nil + case chksumtype.HMAC_SHA1_DES3_KD: + var et Des3CbcSha1Kd + return et, nil + case chksumtype.KERB_CHECKSUM_HMAC_MD5: + var et RC4HMAC + return et, nil + //case chksumtype.KERB_CHECKSUM_HMAC_MD5_UNSIGNED: + // var et RC4HMAC + // return et, nil + default: + return nil, fmt.Errorf("unknown or unsupported checksum type: %d", id) + } +} + +// GetKeyFromPassword generates an encryption key from the principal's password. +func GetKeyFromPassword(passwd string, cname types.PrincipalName, realm string, etypeID int32, pas types.PADataSequence) (types.EncryptionKey, etype.EType, error) { + var key types.EncryptionKey + et, err := GetEtype(etypeID) + if err != nil { + return key, et, fmt.Errorf("error getting encryption type: %v", err) + } + sk2p := et.GetDefaultStringToKeyParams() + var salt string + var paID int32 + for _, pa := range pas { + switch pa.PADataType { + case patype.PA_PW_SALT: + if paID > pa.PADataType { + continue + } + salt = string(pa.PADataValue) + case patype.PA_ETYPE_INFO: + if paID > pa.PADataType { + continue + } + var eti types.ETypeInfo + err := eti.Unmarshal(pa.PADataValue) + if err != nil { + return key, et, fmt.Errorf("error unmashaling PA Data to PA-ETYPE-INFO2: %v", err) + } + if etypeID != eti[0].EType { + et, err = GetEtype(eti[0].EType) + if err != nil { + return key, et, fmt.Errorf("error getting encryption type: %v", err) + } + } + salt = string(eti[0].Salt) + case patype.PA_ETYPE_INFO2: + if paID > pa.PADataType { + continue + } + var et2 types.ETypeInfo2 + err := et2.Unmarshal(pa.PADataValue) + if err != nil { + return key, et, fmt.Errorf("error unmashalling PA Data to PA-ETYPE-INFO2: %v", err) + } + if etypeID != et2[0].EType { + et, err = GetEtype(et2[0].EType) + if err != nil { + return key, et, fmt.Errorf("error getting encryption type: %v", err) + } + } + if len(et2[0].S2KParams) == 4 { + sk2p = hex.EncodeToString(et2[0].S2KParams) + } + salt = et2[0].Salt + } + } + if salt == "" { + salt = cname.GetSalt(realm) + } + k, err := et.StringToKey(passwd, salt, sk2p) + if err != nil { + return key, et, fmt.Errorf("error deriving key from string: %+v", err) + } + key = types.EncryptionKey{ + KeyType: etypeID, + KeyValue: k, + } + return key, et, nil +} + +// GetEncryptedData encrypts the data provided and returns and EncryptedData type. +// Pass a usage value of zero to use the key provided directly rather than deriving one. +func GetEncryptedData(plainBytes []byte, key types.EncryptionKey, usage uint32, kvno int) (types.EncryptedData, error) { + var ed types.EncryptedData + et, err := GetEtype(key.KeyType) + if err != nil { + return ed, fmt.Errorf("error getting etype: %v", err) + } + _, b, err := et.EncryptMessage(key.KeyValue, plainBytes, usage) + if err != nil { + return ed, err + } + + ed = types.EncryptedData{ + EType: key.KeyType, + Cipher: b, + KVNO: kvno, + } + return ed, nil +} + +// DecryptEncPart decrypts the EncryptedData. +func DecryptEncPart(ed types.EncryptedData, key types.EncryptionKey, usage uint32) ([]byte, error) { + return DecryptMessage(ed.Cipher, key, usage) +} + +// DecryptMessage decrypts the ciphertext and verifies the integrity. +func DecryptMessage(ciphertext []byte, key types.EncryptionKey, usage uint32) ([]byte, error) { + et, err := GetEtype(key.KeyType) + if err != nil { + return []byte{}, fmt.Errorf("error decrypting: %v", err) + } + b, err := et.DecryptMessage(key.KeyValue, ciphertext, usage) + if err != nil { + return nil, fmt.Errorf("error decrypting: %v", err) + } + return b, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/des3-cbc-sha1-kd.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/des3-cbc-sha1-kd.go new file mode 100644 index 00000000..e068bbb0 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/des3-cbc-sha1-kd.go @@ -0,0 +1,174 @@ +package crypto + +import ( + "crypto/des" + "crypto/hmac" + "crypto/sha1" + "errors" + "hash" + + "gopkg.in/jcmturner/gokrb5.v5/crypto/common" + "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961" + "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" + "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" +) + +//RFC: 3961 Section 6.3 + +/* + des3-cbc-hmac-sha1-kd, hmac-sha1-des3-kd + ------------------------------------------------ + protocol key format 24 bytes, parity in low + bit of each + + key-generation seed 21 bytes + length + + hash function SHA-1 + + HMAC output size 160 bits + + message block size 8 bytes + + default string-to-key empty string + params + + encryption and triple-DES encrypt and + decryption functions decrypt, in outer-CBC + mode (cipher block size + 8 octets) + + key generation functions: + + random-to-key DES3random-to-key (see + below) + + string-to-key DES3string-to-key (see + below) + + The des3-cbc-hmac-sha1-kd encryption type is assigned the value + sixteen (16). The hmac-sha1-des3-kd checksum algorithm is assigned a + checksum type number of twelve (12)*/ + +// Des3CbcSha1Kd implements Kerberos encryption type des3-cbc-hmac-sha1-kd +type Des3CbcSha1Kd struct { +} + +// GetETypeID returns the EType ID number. +func (e Des3CbcSha1Kd) GetETypeID() int32 { + return etypeID.DES3_CBC_SHA1_KD +} + +// GetHashID returns the checksum type ID number. +func (e Des3CbcSha1Kd) GetHashID() int32 { + return chksumtype.HMAC_SHA1_DES3_KD +} + +// GetKeyByteSize returns the number of bytes for key of this etype. +func (e Des3CbcSha1Kd) GetKeyByteSize() int { + return 24 +} + +// GetKeySeedBitLength returns the number of bits for the seed for key generation. +func (e Des3CbcSha1Kd) GetKeySeedBitLength() int { + return 21 * 8 +} + +// GetHashFunc returns the hash function for this etype. +func (e Des3CbcSha1Kd) GetHashFunc() func() hash.Hash { + return sha1.New +} + +// GetMessageBlockByteSize returns the block size for the etype's messages. +func (e Des3CbcSha1Kd) GetMessageBlockByteSize() int { + //For traditional CBC mode with padding, it would be the underlying cipher's block size + return des.BlockSize +} + +// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. +func (e Des3CbcSha1Kd) GetDefaultStringToKeyParams() string { + var s string + return s +} + +// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. +func (e Des3CbcSha1Kd) GetConfounderByteSize() int { + return des.BlockSize +} + +// GetHMACBitLength returns the bit count size of the integrity hash. +func (e Des3CbcSha1Kd) GetHMACBitLength() int { + return e.GetHashFunc()().Size() * 8 +} + +// GetCypherBlockBitLength returns the bit count size of the cypher block. +func (e Des3CbcSha1Kd) GetCypherBlockBitLength() int { + return des.BlockSize * 8 +} + +// StringToKey returns a key derived from the string provided. +func (e Des3CbcSha1Kd) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { + if s2kparams != "" { + return []byte{}, errors.New("s2kparams must be an empty string") + } + return rfc3961.DES3StringToKey(secret, salt, e) +} + +// RandomToKey returns a key from the bytes provided. +func (e Des3CbcSha1Kd) RandomToKey(b []byte) []byte { + return rfc3961.DES3RandomToKey(b) +} + +// DeriveRandom generates data needed for key generation. +func (e Des3CbcSha1Kd) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { + r, err := rfc3961.DeriveRandom(protocolKey, usage, e) + return r, err +} + +// DeriveKey derives a key from the protocol key based on the usage value. +func (e Des3CbcSha1Kd) DeriveKey(protocolKey, usage []byte) ([]byte, error) { + r, err := e.DeriveRandom(protocolKey, usage) + if err != nil { + return nil, err + } + return e.RandomToKey(r), nil +} + +// EncryptData encrypts the data provided. +func (e Des3CbcSha1Kd) EncryptData(key, data []byte) ([]byte, []byte, error) { + return rfc3961.DES3EncryptData(key, data, e) +} + +// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. +func (e Des3CbcSha1Kd) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { + return rfc3961.DES3EncryptMessage(key, message, usage, e) +} + +// DecryptData decrypts the data provided. +func (e Des3CbcSha1Kd) DecryptData(key, data []byte) ([]byte, error) { + return rfc3961.DES3DecryptData(key, data, e) +} + +// DecryptMessage decrypts the message provided and verifies the integrity of the message. +func (e Des3CbcSha1Kd) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { + return rfc3961.DES3DecryptMessage(key, ciphertext, usage, e) +} + +// VerifyIntegrity checks the integrity of the plaintext message. +func (e Des3CbcSha1Kd) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { + return rfc3961.VerifyIntegrity(protocolKey, ct, pt, usage, e) +} + +// GetChecksumHash returns a keyed checksum hash of the bytes provided. +func (e Des3CbcSha1Kd) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { + return common.GetHash(data, protocolKey, common.GetUsageKc(usage), e) +} + +// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. +func (e Des3CbcSha1Kd) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { + c, err := e.GetChecksumHash(protocolKey, data, usage) + if err != nil { + return false + } + return hmac.Equal(chksum, c) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/etype/etype.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/etype/etype.go new file mode 100644 index 00000000..ee7510e2 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/etype/etype.go @@ -0,0 +1,29 @@ +// Package etype provides the Kerberos Encryption Type interface +package etype + +import "hash" + +// EType is the interface defining the Encryption Type. +type EType interface { + GetETypeID() int32 + GetHashID() int32 + GetKeyByteSize() int + GetKeySeedBitLength() int // key-generation seed length, k + GetDefaultStringToKeyParams() string // default string-to-key parameters (s2kparams) + StringToKey(string, salt, s2kparams string) ([]byte, error) // string-to-key (UTF-8 string, UTF-8 string, opaque)->(protocol-key) + RandomToKey(b []byte) []byte // random-to-key (bitstring[K])->(protocol-key) + GetHMACBitLength() int // HMAC output size, h + GetMessageBlockByteSize() int // message block size, m + EncryptData(key, data []byte) ([]byte, []byte, error) // E function - encrypt (specific-key, state, octet string)->(state, octet string) + EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) + DecryptData(key, data []byte) ([]byte, error) // D function + DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) + GetCypherBlockBitLength() int // cipher block size, c + GetConfounderByteSize() int // This is the same as the cipher block size but in bytes. + DeriveKey(protocolKey, usage []byte) ([]byte, error) // DK key-derivation (protocol-key, integer)->(specific-key) + DeriveRandom(protocolKey, usage []byte) ([]byte, error) // DR pseudo-random (protocol-key, octet-string)->(octet-string) + VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool + GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) + VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool + GetHashFunc() func() hash.Hash +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rc4-hmac.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rc4-hmac.go new file mode 100644 index 00000000..741bd284 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rc4-hmac.go @@ -0,0 +1,137 @@ +package crypto + +import ( + "bytes" + "crypto/md5" + "hash" + "io" + + "golang.org/x/crypto/md4" + "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961" + "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757" + "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" + "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" +) + +//http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/sun/security/krb5/internal/crypto/dk/ArcFourCrypto.java#ArcFourCrypto.encrypt%28byte%5B%5D%2Cint%2Cbyte%5B%5D%2Cbyte%5B%5D%2Cbyte%5B%5D%2Cint%2Cint%29 + +// RC4HMAC implements Kerberos encryption type aes256-cts-hmac-sha1-96 +type RC4HMAC struct { +} + +// GetETypeID returns the EType ID number. +func (e RC4HMAC) GetETypeID() int32 { + return etypeID.RC4_HMAC +} + +// GetHashID returns the checksum type ID number. +func (e RC4HMAC) GetHashID() int32 { + return chksumtype.KERB_CHECKSUM_HMAC_MD5 +} + +// GetKeyByteSize returns the number of bytes for key of this etype. +func (e RC4HMAC) GetKeyByteSize() int { + return 16 +} + +// GetKeySeedBitLength returns the number of bits for the seed for key generation. +func (e RC4HMAC) GetKeySeedBitLength() int { + return e.GetKeyByteSize() * 8 +} + +// GetHashFunc returns the hash function for this etype. +func (e RC4HMAC) GetHashFunc() func() hash.Hash { + return md5.New +} + +// GetMessageBlockByteSize returns the block size for the etype's messages. +func (e RC4HMAC) GetMessageBlockByteSize() int { + return 1 +} + +// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. +func (e RC4HMAC) GetDefaultStringToKeyParams() string { + return "" +} + +// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. +func (e RC4HMAC) GetConfounderByteSize() int { + return 8 +} + +// GetHMACBitLength returns the bit count size of the integrity hash. +func (e RC4HMAC) GetHMACBitLength() int { + return md5.Size * 8 +} + +// GetCypherBlockBitLength returns the bit count size of the cypher block. +func (e RC4HMAC) GetCypherBlockBitLength() int { + return 8 // doesn't really apply +} + +// StringToKey returns a key derived from the string provided. +func (e RC4HMAC) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { + return rfc4757.StringToKey(secret) +} + +// RandomToKey returns a key from the bytes provided. +func (e RC4HMAC) RandomToKey(b []byte) []byte { + r := bytes.NewReader(b) + h := md4.New() + io.Copy(h, r) + return h.Sum(nil) +} + +// EncryptData encrypts the data provided. +func (e RC4HMAC) EncryptData(key, data []byte) ([]byte, []byte, error) { + b, err := rfc4757.EncryptData(key, data, e) + return []byte{}, b, err +} + +// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. +func (e RC4HMAC) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { + b, err := rfc4757.EncryptMessage(key, message, usage, false, e) + return []byte{}, b, err +} + +// DecryptData decrypts the data provided. +func (e RC4HMAC) DecryptData(key, data []byte) ([]byte, error) { + return rfc4757.DecryptData(key, data, e) +} + +// DecryptMessage decrypts the message provided and verifies the integrity of the message. +func (e RC4HMAC) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { + return rfc4757.DecryptMessage(key, ciphertext, usage, false, e) +} + +// DeriveKey derives a key from the protocol key based on the usage value. +func (e RC4HMAC) DeriveKey(protocolKey, usage []byte) ([]byte, error) { + return rfc4757.HMAC(protocolKey, usage), nil +} + +// DeriveRandom generates data needed for key generation. +func (e RC4HMAC) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { + return rfc3961.DeriveRandom(protocolKey, usage, e) +} + +// VerifyIntegrity checks the integrity of the plaintext message. +func (e RC4HMAC) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { + return rfc4757.VerifyIntegrity(protocolKey, pt, ct, e) +} + +// GetChecksumHash returns a keyed checksum hash of the bytes provided. +func (e RC4HMAC) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { + return rfc4757.Checksum(protocolKey, usage, data) +} + +// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. +func (e RC4HMAC) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { + checksum, err := rfc4757.Checksum(protocolKey, usage, data) + if err != nil { + return false + } + if !bytes.Equal(checksum, chksum) { + return false + } + return true +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/encryption.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/encryption.go new file mode 100644 index 00000000..d19ed100 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/encryption.go @@ -0,0 +1,125 @@ +// Package rfc3961 provides encryption and checksum methods as specified in RFC 3961 +package rfc3961 + +import ( + "crypto/cipher" + "crypto/des" + "crypto/hmac" + "crypto/rand" + "errors" + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/crypto/common" + "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" +) + +// DES3EncryptData encrypts the data provided using DES3 and methods specific to the etype provided. +func DES3EncryptData(key, data []byte, e etype.EType) ([]byte, []byte, error) { + if len(key) != e.GetKeyByteSize() { + return nil, nil, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) + } + data, _ = common.ZeroPad(data, e.GetMessageBlockByteSize()) + + block, err := des.NewTripleDESCipher(key) + if err != nil { + return nil, nil, fmt.Errorf("error creating cipher: %v", err) + } + + //RFC 3961: initial cipher state All bits zero + ivz := make([]byte, des.BlockSize) + + ct := make([]byte, len(data)) + mode := cipher.NewCBCEncrypter(block, ivz) + mode.CryptBlocks(ct, data) + return ct[len(ct)-e.GetMessageBlockByteSize():], ct, nil +} + +// DES3EncryptMessage encrypts the message provided using DES3 and methods specific to the etype provided. +// The encrypted data is concatenated with its integrity hash to create an encrypted message. +func DES3EncryptMessage(key, message []byte, usage uint32, e etype.EType) ([]byte, []byte, error) { + //confounder + c := make([]byte, e.GetConfounderByteSize()) + _, err := rand.Read(c) + if err != nil { + return []byte{}, []byte{}, fmt.Errorf("could not generate random confounder: %v", err) + } + plainBytes := append(c, message...) + plainBytes, _ = common.ZeroPad(plainBytes, e.GetMessageBlockByteSize()) + + // Derive key for encryption from usage + var k []byte + if usage != 0 { + k, err = e.DeriveKey(key, common.GetUsageKe(usage)) + if err != nil { + return []byte{}, []byte{}, fmt.Errorf("error deriving key for encryption: %v", err) + } + } + + iv, b, err := e.EncryptData(k, plainBytes) + if err != nil { + return iv, b, fmt.Errorf("error encrypting data: %v", err) + } + + // Generate and append integrity hash + ih, err := common.GetIntegrityHash(plainBytes, key, usage, e) + if err != nil { + return iv, b, fmt.Errorf("error encrypting data: %v", err) + } + b = append(b, ih...) + return iv, b, nil +} + +// DES3DecryptData decrypts the data provided using DES3 and methods specific to the etype provided. +func DES3DecryptData(key, data []byte, e etype.EType) ([]byte, error) { + if len(key) != e.GetKeyByteSize() { + return []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) + } + + if len(data) < des.BlockSize || len(data)%des.BlockSize != 0 { + return []byte{}, errors.New("ciphertext is not a multiple of the block size") + } + block, err := des.NewTripleDESCipher(key) + if err != nil { + return []byte{}, fmt.Errorf("error creating cipher: %v", err) + } + pt := make([]byte, len(data)) + ivz := make([]byte, des.BlockSize) + mode := cipher.NewCBCDecrypter(block, ivz) + mode.CryptBlocks(pt, data) + return pt, nil +} + +// DES3DecryptMessage decrypts the message provided using DES3 and methods specific to the etype provided. +// The integrity of the message is also verified. +func DES3DecryptMessage(key, ciphertext []byte, usage uint32, e etype.EType) ([]byte, error) { + //Derive the key + k, err := e.DeriveKey(key, common.GetUsageKe(usage)) + if err != nil { + return nil, fmt.Errorf("error deriving key: %v", err) + } + // Strip off the checksum from the end + b, err := e.DecryptData(k, ciphertext[:len(ciphertext)-e.GetHMACBitLength()/8]) + if err != nil { + return nil, fmt.Errorf("error decrypting: %v", err) + } + //Verify checksum + if !e.VerifyIntegrity(key, ciphertext, b, usage) { + return nil, errors.New("error decrypting: integrity verification failed") + } + //Remove the confounder bytes + return b[e.GetConfounderByteSize():], nil +} + +// VerifyIntegrity verifies the integrity of cipertext bytes ct. +func VerifyIntegrity(key, ct, pt []byte, usage uint32, etype etype.EType) bool { + //The ciphertext output is the concatenation of the output of the basic + //encryption function E and a (possibly truncated) HMAC using the + //specified hash function H, both applied to the plaintext with a + //random confounder prefix and sufficient padding to bring it to a + //multiple of the message block size. When the HMAC is computed, the + //key is used in the protocol key form. + h := make([]byte, etype.GetHMACBitLength()/8) + copy(h, ct[len(ct)-etype.GetHMACBitLength()/8:]) + expectedMAC, _ := common.GetIntegrityHash(pt, key, usage, etype) + return hmac.Equal(h, expectedMAC) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/keyDerivation.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/keyDerivation.go new file mode 100644 index 00000000..b9f0dc9e --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/keyDerivation.go @@ -0,0 +1,134 @@ +package rfc3961 + +import ( + "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" +) + +const ( + prfconstant = "prf" +) + +// DeriveRandom implements the RFC 3961 defined function: DR(Key, Constant) = k-truncate(E(Key, Constant, initial-cipher-state)). +// +// key: base key or protocol key. Likely to be a key from a keytab file. +// +// usage: a constant. +// +// n: block size in bits (not bytes) - note if you use something like aes.BlockSize this is in bytes. +// +// k: key length / key seed length in bits. Eg. for AES256 this value is 256. +// +// e: the encryption etype function to use. +func DeriveRandom(key, usage []byte, e etype.EType) ([]byte, error) { + n := e.GetCypherBlockBitLength() + k := e.GetKeySeedBitLength() + //Ensure the usage constant is at least the size of the cypher block size. Pass it through the nfold algorithm that will "stretch" it if needs be. + nFoldUsage := Nfold(usage, n) + //k-truncate implemented by creating a byte array the size of k (k is in bits hence /8) + out := make([]byte, k/8) + + /*If the output of E is shorter than k bits, it is fed back into the encryption as many times as necessary. + The construct is as follows (where | indicates concatentation): + + K1 = E(Key, n-fold(Constant), initial-cipher-state) + K2 = E(Key, K1, initial-cipher-state) + K3 = E(Key, K2, initial-cipher-state) + K4 = ... + + DR(Key, Constant) = k-truncate(K1 | K2 | K3 | K4 ...)*/ + _, K, err := e.EncryptData(key, nFoldUsage) + if err != nil { + return out, err + } + for i := copy(out, K); i < len(out); { + _, K, _ = e.EncryptData(key, K) + i = i + copy(out[i:], K) + } + return out, nil +} + +// DeriveKey derives a key from the protocol key based on the usage and the etype's specific methods. +func DeriveKey(protocolKey, usage []byte, e etype.EType) ([]byte, error) { + r, err := e.DeriveRandom(protocolKey, usage) + if err != nil { + return nil, err + } + return e.RandomToKey(r), nil +} + +// RandomToKey returns a key from the bytes provided according to the definition in RFC 3961. +func RandomToKey(b []byte) []byte { + return b +} + +// DES3RandomToKey returns a key from the bytes provided according to the definition in RFC 3961 for DES3 etypes. +func DES3RandomToKey(b []byte) []byte { + r := stretch56Bits(b[:7]) + r2 := stretch56Bits(b[7:14]) + r = append(r, r2...) + r3 := stretch56Bits(b[14:21]) + r = append(r, r3...) + return r +} + +// DES3StringToKey returns a key derived from the string provided according to the definition in RFC 3961 for DES3 etypes. +func DES3StringToKey(secret, salt string, e etype.EType) ([]byte, error) { + s := secret + salt + tkey := e.RandomToKey(Nfold([]byte(s), e.GetKeySeedBitLength())) + return e.DeriveKey(tkey, []byte("kerberos")) +} + +// PseudoRandom function as defined in RFC 3961 +func PseudoRandom(key, b []byte, e etype.EType) ([]byte, error) { + h := e.GetHashFunc()() + h.Write(b) + tmp := h.Sum(nil)[:e.GetMessageBlockByteSize()] + k, err := e.DeriveKey(key, []byte(prfconstant)) + if err != nil { + return []byte{}, err + } + _, prf, err := e.EncryptData(k, tmp) + if err != nil { + return []byte{}, err + } + return prf, nil +} + +func stretch56Bits(b []byte) []byte { + d := make([]byte, len(b), len(b)) + copy(d, b) + var lb byte + for i, v := range d { + bv, nb := calcEvenParity(v) + d[i] = nb + if bv != 0 { + lb = lb | (1 << uint(i+1)) + } else { + lb = lb &^ (1 << uint(i+1)) + } + } + _, lb = calcEvenParity(lb) + d = append(d, lb) + return d +} + +func calcEvenParity(b byte) (uint8, uint8) { + lowestbit := b & 0x01 + // c counter of 1s in the first 7 bits of the byte + var c int + // Iterate over the highest 7 bits (hence p starts at 1 not zero) and count the 1s. + for p := 1; p < 8; p++ { + v := b & (1 << uint(p)) + if v != 0 { + c++ + } + } + if c%2 == 0 { + //Even number of 1s so set parity to 1 + b = b | 1 + } else { + //Odd number of 1s so set parity to 0 + b = b &^ 1 + } + return lowestbit, b +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/nfold.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/nfold.go new file mode 100644 index 00000000..779d1c6e --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/nfold.go @@ -0,0 +1,128 @@ +package rfc3961 + +/* +Implementation of the n-fold algorithm as defined in RFC 3961. + +n-fold is an algorithm that takes m input bits and "stretches" them +to form n output bits with equal contribution from each input bit to +the output, as described in [Blumenthal96]: + +We first define a primitive called n-folding, which takes a +variable-length input block and produces a fixed-length output +sequence. The intent is to give each input bit approximately +equal weight in determining the value of each output bit. Note +that whenever we need to treat a string of octets as a number, the +assumed representation is Big-Endian -- Most Significant Byte +first. + +To n-fold a number X, replicate the input value to a length that +is the least common multiple of n and the length of X. Before +each repetition, the input is rotated to the right by 13 bit +positions. The successive n-bit chunks are added together using +1's-complement addition (that is, with end-around carry) to yield +a n-bit result.... +*/ + +/* Credits +This golang implementation of nfold used the following project for help with implementation detail. +Although their source is in java it was helpful as a reference implementation of the RFC. +You can find the source code of their open source project along with license information below. +We acknowledge and are grateful to these developers for their contributions to open source + +Project: Apache Directory (http://http://directory.apache.org/) +https://svn.apache.org/repos/asf/directory/apacheds/tags/1.5.1/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/NFold.java +License: http://www.apache.org/licenses/LICENSE-2.0 +*/ + +// Nfold expands the key to ensure it is not smaller than one cipher block. +// Defined in RFC 3961. +// +// m input bytes that will be "stretched" to the least common multiple of n bits and the bit length of m. +func Nfold(m []byte, n int) []byte { + k := len(m) * 8 + + //Get the lowest common multiple of the two bit sizes + lcm := lcm(n, k) + relicate := lcm / k + var sumBytes []byte + + for i := 0; i < relicate; i++ { + rotation := 13 * i + sumBytes = append(sumBytes, rotateRight(m, rotation)...) + } + + nfold := make([]byte, n/8) + sum := make([]byte, n/8) + for i := 0; i < lcm/n; i++ { + for j := 0; j < n/8; j++ { + sum[j] = sumBytes[j+(i*len(sum))] + } + nfold = onesComplementAddition(nfold, sum) + } + return nfold +} + +func onesComplementAddition(n1, n2 []byte) []byte { + numBits := len(n1) * 8 + out := make([]byte, numBits/8) + carry := 0 + for i := numBits - 1; i > -1; i-- { + n1b := getBit(&n1, i) + n2b := getBit(&n2, i) + s := n1b + n2b + carry + + if s == 0 || s == 1 { + setBit(&out, i, s) + carry = 0 + } else if s == 2 { + carry = 1 + } else if s == 3 { + setBit(&out, i, 1) + carry = 1 + } + } + if carry == 1 { + carryArray := make([]byte, len(n1)) + carryArray[len(carryArray)-1] = 1 + out = onesComplementAddition(out, carryArray) + } + return out +} + +func rotateRight(b []byte, step int) []byte { + out := make([]byte, len(b)) + bitLen := len(b) * 8 + for i := 0; i < bitLen; i++ { + v := getBit(&b, i) + setBit(&out, (i+step)%bitLen, v) + } + return out +} + +func lcm(x, y int) int { + return (x * y) / gcd(x, y) +} + +func gcd(x, y int) int { + for y != 0 { + x, y = y, x%y + } + return x +} + +func getBit(b *[]byte, p int) int { + pByte := p / 8 + pBit := uint(p % 8) + vByte := (*b)[pByte] + vInt := int(vByte >> (8 - (pBit + 1)) & 0x0001) + return vInt +} + +func setBit(b *[]byte, p, v int) { + pByte := p / 8 + pBit := uint(p % 8) + oldByte := (*b)[pByte] + var newByte byte + newByte = byte(v<<(8-(pBit+1))) | oldByte + (*b)[pByte] = newByte +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/encryption.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/encryption.go new file mode 100644 index 00000000..41736124 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/encryption.go @@ -0,0 +1,89 @@ +// Package rfc3962 provides encryption and checksum methods as specified in RFC 3962 +package rfc3962 + +import ( + "crypto/rand" + "errors" + "fmt" + + "gopkg.in/jcmturner/aescts.v1" + "gopkg.in/jcmturner/gokrb5.v5/crypto/common" + "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" +) + +// EncryptData encrypts the data provided using methods specific to the etype provided as defined in RFC 3962. +func EncryptData(key, data []byte, e etype.EType) ([]byte, []byte, error) { + if len(key) != e.GetKeyByteSize() { + return []byte{}, []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) + } + ivz := make([]byte, e.GetCypherBlockBitLength()/8) + return aescts.Encrypt(key, ivz, data) +} + +// EncryptMessage encrypts the message provided using the methods specific to the etype provided as defined in RFC 3962. +// The encrypted data is concatenated with its integrity hash to create an encrypted message. +func EncryptMessage(key, message []byte, usage uint32, e etype.EType) ([]byte, []byte, error) { + if len(key) != e.GetKeyByteSize() { + return []byte{}, []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) + } + //confounder + c := make([]byte, e.GetConfounderByteSize()) + _, err := rand.Read(c) + if err != nil { + return []byte{}, []byte{}, fmt.Errorf("could not generate random confounder: %v", err) + } + plainBytes := append(c, message...) + + // Derive key for encryption from usage + var k []byte + if usage != 0 { + k, err = e.DeriveKey(key, common.GetUsageKe(usage)) + if err != nil { + return []byte{}, []byte{}, fmt.Errorf("error deriving key for encryption: %v", err) + } + } + + // Encrypt the data + iv, b, err := e.EncryptData(k, plainBytes) + if err != nil { + return iv, b, fmt.Errorf("error encrypting data: %v", err) + } + + // Generate and append integrity hash + ih, err := common.GetIntegrityHash(plainBytes, key, usage, e) + if err != nil { + return iv, b, fmt.Errorf("error encrypting data: %v", err) + } + b = append(b, ih...) + return iv, b, nil +} + +// DecryptData decrypts the data provided using the methods specific to the etype provided as defined in RFC 3962. +func DecryptData(key, data []byte, e etype.EType) ([]byte, error) { + if len(key) != e.GetKeyByteSize() { + return []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) + } + ivz := make([]byte, e.GetCypherBlockBitLength()/8) + return aescts.Decrypt(key, ivz, data) +} + +// DecryptMessage decrypts the message provided using the methods specific to the etype provided as defined in RFC 3962. +// The integrity of the message is also verified. +func DecryptMessage(key, ciphertext []byte, usage uint32, e etype.EType) ([]byte, error) { + //Derive the key + k, err := e.DeriveKey(key, common.GetUsageKe(usage)) + if err != nil { + return nil, fmt.Errorf("error deriving key: %v", err) + } + // Strip off the checksum from the end + b, err := e.DecryptData(k, ciphertext[:len(ciphertext)-e.GetHMACBitLength()/8]) + if err != nil { + return nil, err + } + //Verify checksum + if !e.VerifyIntegrity(key, ciphertext, b, usage) { + return nil, errors.New("integrity verification failed") + } + //Remove the confounder bytes + return b[e.GetConfounderByteSize():], nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/keyDerivation.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/keyDerivation.go new file mode 100644 index 00000000..a25d4483 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/keyDerivation.go @@ -0,0 +1,58 @@ +package rfc3962 + +import ( + "encoding/binary" + "encoding/hex" + "errors" + + "github.com/jcmturner/gofork/x/crypto/pbkdf2" + "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" +) + +const ( + s2kParamsZero = 4294967296 +) + +// StringToKey returns a key derived from the string provided according to the definition in RFC 3961. +func StringToKey(secret, salt, s2kparams string, e etype.EType) ([]byte, error) { + i, err := S2KparamsToItertions(s2kparams) + if err != nil { + return nil, err + } + return StringToKeyIter(secret, salt, i, e) +} + +// StringToPBKDF2 generates an encryption key from a pass phrase and salt string using the PBKDF2 function from PKCS #5 v2.0 +func StringToPBKDF2(secret, salt string, iterations int64, e etype.EType) []byte { + return pbkdf2.Key64([]byte(secret), []byte(salt), iterations, int64(e.GetKeyByteSize()), e.GetHashFunc()) +} + +// StringToKeyIter returns a key derived from the string provided according to the definition in RFC 3961. +func StringToKeyIter(secret, salt string, iterations int64, e etype.EType) ([]byte, error) { + tkey := e.RandomToKey(StringToPBKDF2(secret, salt, iterations, e)) + return e.DeriveKey(tkey, []byte("kerberos")) +} + +// S2KparamsToItertions converts the string representation of iterations to an integer +func S2KparamsToItertions(s2kparams string) (int64, error) { + //process s2kparams string + //The parameter string is four octets indicating an unsigned + //number in big-endian order. This is the number of iterations to be + //performed. If the value is 00 00 00 00, the number of iterations to + //be performed is 4,294,967,296 (2**32). + var i uint32 + if len(s2kparams) != 8 { + return int64(s2kParamsZero), errors.New("invalid s2kparams length") + } + b, err := hex.DecodeString(s2kparams) + if err != nil { + return int64(s2kParamsZero), errors.New("invalid s2kparams, cannot decode string to bytes") + } + i = binary.BigEndian.Uint32(b) + //buf := bytes.NewBuffer(b) + //err = binary.Read(buf, binary.BigEndian, &i) + if err != nil { + return int64(s2kParamsZero), errors.New("invalid s2kparams, cannot convert to big endian int32") + } + return int64(i), nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/checksum.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/checksum.go new file mode 100644 index 00000000..45276e95 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/checksum.go @@ -0,0 +1,40 @@ +package rfc4757 + +import ( + "bytes" + "crypto/hmac" + "crypto/md5" + "io" +) + +// Checksum returns a hash of the data in accordance with RFC 4757 +func Checksum(key []byte, usage uint32, data []byte) ([]byte, error) { + // Create hashing key + s := append([]byte(`signaturekey`), byte(0x00)) //includes zero octet at end + mac := hmac.New(md5.New, key) + mac.Write(s) + Ksign := mac.Sum(nil) + + // Format data + tb := UsageToMSMsgType(usage) + p := append(tb, data...) + h := md5.New() + rb := bytes.NewReader(p) + _, err := io.Copy(h, rb) + if err != nil { + return []byte{}, err + } + tmp := h.Sum(nil) + + // Generate HMAC + mac = hmac.New(md5.New, Ksign) + mac.Write(tmp) + return mac.Sum(nil), nil +} + +// HMAC returns a keyed MD5 checksum of the data +func HMAC(key []byte, data []byte) []byte { + mac := hmac.New(md5.New, key) + mac.Write(data) + return mac.Sum(nil) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/encryption.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/encryption.go new file mode 100644 index 00000000..3c8505db --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/encryption.go @@ -0,0 +1,83 @@ +// Package rfc4757 provides encryption and checksum methods as specified in RFC 4757 +package rfc4757 + +import ( + "bytes" + "crypto/rand" + "crypto/rc4" + "errors" + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" +) + +// EncryptData encrypts the data provided using methods specific to the etype provided as defined in RFC 4757. +func EncryptData(key, data []byte, e etype.EType) ([]byte, error) { + if len(key) != e.GetKeyByteSize() { + return []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) + } + rc4Cipher, err := rc4.NewCipher(key) + if err != nil { + return []byte{}, fmt.Errorf("error creating RC4 cipher: %v", err) + } + ed := make([]byte, len(data)) + copy(ed, data) + rc4Cipher.XORKeyStream(ed, ed) + rc4Cipher.Reset() + return ed, nil +} + +// DecryptData decrypts the data provided using the methods specific to the etype provided as defined in RFC 4757. +func DecryptData(key, data []byte, e etype.EType) ([]byte, error) { + return EncryptData(key, data, e) +} + +// EncryptMessage encrypts the message provided using the methods specific to the etype provided as defined in RFC 4757. +// The encrypted data is concatenated with its RC4 header containing integrity checksum and confounder to create an encrypted message. +func EncryptMessage(key, data []byte, usage uint32, export bool, e etype.EType) ([]byte, error) { + confounder := make([]byte, e.GetConfounderByteSize()) // size = 8 + _, err := rand.Read(confounder) + if err != nil { + return []byte{}, fmt.Errorf("error generating confounder: %v", err) + } + k1 := key + k2 := HMAC(k1, UsageToMSMsgType(usage)) + toenc := append(confounder, data...) + chksum := HMAC(k2, toenc) + k3 := HMAC(k2, chksum) + + ed, err := EncryptData(k3, toenc, e) + if err != nil { + return []byte{}, fmt.Errorf("error encrypting data: %v", err) + } + + msg := append(chksum, ed...) + return msg, nil +} + +// DecryptMessage decrypts the message provided using the methods specific to the etype provided as defined in RFC 4757. +// The integrity of the message is also verified. +func DecryptMessage(key, data []byte, usage uint32, export bool, e etype.EType) ([]byte, error) { + checksum := data[:e.GetHMACBitLength()/8] + ct := data[e.GetHMACBitLength()/8:] + _, k2, k3 := deriveKeys(key, checksum, usage, export) + + pt, err := DecryptData(k3, ct, e) + if err != nil { + return []byte{}, fmt.Errorf("error decrypting data: %v", err) + } + + if !VerifyIntegrity(k2, pt, data, e) { + return []byte{}, errors.New("integrity checksum incorrect") + } + return pt[e.GetConfounderByteSize():], nil +} + +// VerifyIntegrity checks the integrity checksum of the data matches that calculated from the decrypted data. +func VerifyIntegrity(key, pt, data []byte, e etype.EType) bool { + chksum := HMAC(key, pt) + if bytes.Equal(chksum, data[:e.GetHMACBitLength()/8]) { + return true + } + return false +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/keyDerivation.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/keyDerivation.go new file mode 100644 index 00000000..5e7ec480 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/keyDerivation.go @@ -0,0 +1,55 @@ +package rfc4757 + +import ( + "bytes" + "encoding/hex" + "errors" + "fmt" + "io" + + "golang.org/x/crypto/md4" +) + +// StringToKey returns a key derived from the string provided according to the definition in RFC 4757. +func StringToKey(secret string) ([]byte, error) { + b := make([]byte, len(secret)*2, len(secret)*2) + for i, r := range secret { + u := fmt.Sprintf("%04x", r) + c, err := hex.DecodeString(u) + if err != nil { + return []byte{}, errors.New("character could not be encoded") + } + // Swap round the two bytes to make little endian as we put into byte slice + b[2*i] = c[1] + b[2*i+1] = c[0] + } + r := bytes.NewReader(b) + h := md4.New() + _, err := io.Copy(h, r) + if err != nil { + return []byte{}, err + } + return h.Sum(nil), nil +} + +func deriveKeys(key, checksum []byte, usage uint32, export bool) (k1, k2, k3 []byte) { + //if export { + // L40 := make([]byte, 14, 14) + // copy(L40, []byte(`fortybits`)) + // k1 = HMAC(key, L40) + //} else { + // tb := MessageTypeBytes(usage) + // k1 = HMAC(key, tb) + //} + //k2 = k1[:16] + //if export { + // mask := []byte{0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB} + // copy(k1[7:16], mask) + //} + //k3 = HMAC(k1, checksum) + //return + k1 = key + k2 = HMAC(k1, UsageToMSMsgType(usage)) + k3 = HMAC(k2, checksum) + return +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/msgtype.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/msgtype.go new file mode 100644 index 00000000..068588d3 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/msgtype.go @@ -0,0 +1,20 @@ +package rfc4757 + +import "encoding/binary" + +// UsageToMSMsgType converts Kerberos key usage numbers to Microsoft message type encoded as a little-endian four byte slice. +func UsageToMSMsgType(usage uint32) []byte { + // Translate usage numbers to the Microsoft T numbers + switch usage { + case 3: + usage = 8 + case 9: + usage = 8 + case 23: + usage = 13 + } + // Now convert to bytes + tb := make([]byte, 4) // We force an int32 input so we can't go over 4 bytes + binary.PutUvarint(tb, uint64(usage)) + return tb +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/encryption.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/encryption.go new file mode 100644 index 00000000..caa6098e --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/encryption.go @@ -0,0 +1,128 @@ +// Package rfc8009 provides encryption and checksum methods as specified in RFC 8009 +package rfc8009 + +import ( + "crypto/aes" + "crypto/hmac" + "crypto/rand" + "errors" + "fmt" + + "gopkg.in/jcmturner/aescts.v1" + "gopkg.in/jcmturner/gokrb5.v5/crypto/common" + "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" + "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" +) + +// EncryptData encrypts the data provided using methods specific to the etype provided as defined in RFC 8009. +func EncryptData(key, data []byte, e etype.EType) ([]byte, []byte, error) { + kl := e.GetKeyByteSize() + if e.GetETypeID() == etypeID.AES256_CTS_HMAC_SHA384_192 { + kl = 32 + } + if len(key) != kl { + return []byte{}, []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) + } + ivz := make([]byte, aes.BlockSize) + return aescts.Encrypt(key, ivz, data) +} + +// EncryptMessage encrypts the message provided using the methods specific to the etype provided as defined in RFC 8009. +// The encrypted data is concatenated with its integrity hash to create an encrypted message. +func EncryptMessage(key, message []byte, usage uint32, e etype.EType) ([]byte, []byte, error) { + kl := e.GetKeyByteSize() + if e.GetETypeID() == etypeID.AES256_CTS_HMAC_SHA384_192 { + kl = 32 + } + if len(key) != kl { + return []byte{}, []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", kl, len(key)) + } + if len(key) != e.GetKeyByteSize() { + } + //confounder + c := make([]byte, e.GetConfounderByteSize()) + _, err := rand.Read(c) + if err != nil { + return []byte{}, []byte{}, fmt.Errorf("could not generate random confounder: %v", err) + } + plainBytes := append(c, message...) + + // Derive key for encryption from usage + var k []byte + if usage != 0 { + k, err = e.DeriveKey(key, common.GetUsageKe(usage)) + if err != nil { + return []byte{}, []byte{}, fmt.Errorf("error deriving key for encryption: %v", err) + } + } + + // Encrypt the data + iv, b, err := e.EncryptData(k, plainBytes) + if err != nil { + return iv, b, fmt.Errorf("error encrypting data: %v", err) + } + + ivz := make([]byte, e.GetConfounderByteSize()) + ih, err := GetIntegityHash(ivz, b, key, usage, e) + if err != nil { + return iv, b, fmt.Errorf("error encrypting data: %v", err) + } + b = append(b, ih...) + return iv, b, nil +} + +// DecryptData decrypts the data provided using the methods specific to the etype provided as defined in RFC 8009. +func DecryptData(key, data []byte, e etype.EType) ([]byte, error) { + kl := e.GetKeyByteSize() + if e.GetETypeID() == etypeID.AES256_CTS_HMAC_SHA384_192 { + kl = 32 + } + if len(key) != kl { + return []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", kl, len(key)) + } + ivz := make([]byte, aes.BlockSize) + return aescts.Decrypt(key, ivz, data) +} + +// DecryptMessage decrypts the message provided using the methods specific to the etype provided as defined in RFC 8009. +// The integrity of the message is also verified. +func DecryptMessage(key, ciphertext []byte, usage uint32, e etype.EType) ([]byte, error) { + //Derive the key + k, err := e.DeriveKey(key, common.GetUsageKe(usage)) + if err != nil { + return nil, fmt.Errorf("error deriving key: %v", err) + } + // Strip off the checksum from the end + b, err := e.DecryptData(k, ciphertext[:len(ciphertext)-e.GetHMACBitLength()/8]) + if err != nil { + return nil, err + } + //Verify checksum + if !e.VerifyIntegrity(key, ciphertext, b, usage) { + return nil, errors.New("integrity verification failed") + } + //Remove the confounder bytes + return b[e.GetConfounderByteSize():], nil +} + +// GetIntegityHash returns a keyed integrity hash of the bytes provided as defined in RFC 8009 +func GetIntegityHash(iv, c, key []byte, usage uint32, e etype.EType) ([]byte, error) { + // Generate and append integrity hash + // The HMAC is calculated over the cipher state concatenated with the + // AES output, instead of being calculated over the confounder and + // plaintext. This allows the message receiver to verify the + // integrity of the message before decrypting the message. + // H = HMAC(Ki, IV | C) + ib := append(iv, c...) + return common.GetIntegrityHash(ib, key, usage, e) +} + +// VerifyIntegrity verifies the integrity of cipertext bytes ct. +func VerifyIntegrity(key, ct []byte, usage uint32, etype etype.EType) bool { + h := make([]byte, etype.GetHMACBitLength()/8) + copy(h, ct[len(ct)-etype.GetHMACBitLength()/8:]) + ivz := make([]byte, etype.GetConfounderByteSize()) + ib := append(ivz, ct[:len(ct)-(etype.GetHMACBitLength()/8)]...) + expectedMAC, _ := common.GetIntegrityHash(ib, key, usage, etype) + return hmac.Equal(h, expectedMAC) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/keyDerivation.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/keyDerivation.go new file mode 100644 index 00000000..74cb903b --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/keyDerivation.go @@ -0,0 +1,144 @@ +package rfc8009 + +import ( + "crypto/hmac" + "encoding/binary" + "encoding/hex" + "errors" + + "golang.org/x/crypto/pbkdf2" + "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" + "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" +) + +const ( + s2kParamsZero = 32768 +) + +// DeriveRandom for key derivation as defined in RFC 8009 +func DeriveRandom(protocolKey, usage []byte, e etype.EType) ([]byte, error) { + h := e.GetHashFunc()() + return KDF_HMAC_SHA2(protocolKey, []byte("prf"), usage, h.Size(), e), nil +} + +// DeriveKey derives a key from the protocol key based on the usage and the etype's specific methods. +// +// https://tools.ietf.org/html/rfc8009#section-5 +// +// If the enctype is aes128-cts-hmac-sha256-128: +// Kc = KDF-HMAC-SHA2(base-key, usage | 0x99, 128) +// Ke = KDF-HMAC-SHA2(base-key, usage | 0xAA, 128) +// Ki = KDF-HMAC-SHA2(base-key, usage | 0x55, 128) +// +// If the enctype is aes256-cts-hmac-sha384-192: +// Kc = KDF-HMAC-SHA2(base-key, usage | 0x99, 192) +// Ke = KDF-HMAC-SHA2(base-key, usage | 0xAA, 256) +// Ki = KDF-HMAC-SHA2(base-key, usage | 0x55, 192) +func DeriveKey(protocolKey, label []byte, e etype.EType) []byte { + var context []byte + var kl int + // Key length is longer for aes256-cts-hmac-sha384-192 is it is a Ke or from StringToKey (where label is "kerberos") + if e.GetETypeID() == etypeID.AES256_CTS_HMAC_SHA384_192 { + switch label[len(label)-1] { + case 0x73: + // 0x73 is "s" so label could be kerberos meaning StringToKey so now check if the label is "kerberos" + kerblabel := []byte("kerberos") + if len(label) != len(kerblabel) { + break + } + for i, b := range label { + if b != kerblabel[i] { + kl = e.GetKeySeedBitLength() + break + } + } + if kl == 0 { + // This is StringToKey + kl = 256 + } + case 0xAA: + // This is a Ke + kl = 256 + } + } + if kl == 0 { + kl = e.GetKeySeedBitLength() + } + return e.RandomToKey(KDF_HMAC_SHA2(protocolKey, label, context, kl, e)) +} + +// RandomToKey returns a key from the bytes provided according to the definition in RFC 8009. +func RandomToKey(b []byte) []byte { + return b +} + +// StringToKey returns a key derived from the string provided according to the definition in RFC 8009. +func StringToKey(secret, salt, s2kparams string, e etype.EType) ([]byte, error) { + i, err := S2KparamsToItertions(s2kparams) + if err != nil { + return nil, err + } + return StringToKeyIter(secret, salt, int(i), e) +} + +// StringToKeyIter returns a key derived from the string provided according to the definition in RFC 8009. +func StringToKeyIter(secret, salt string, iterations int, e etype.EType) ([]byte, error) { + tkey := e.RandomToKey(StringToPBKDF2(secret, salt, iterations, e)) + return e.DeriveKey(tkey, []byte("kerberos")) +} + +// StringToPBKDF2 generates an encryption key from a pass phrase and salt string using the PBKDF2 function from PKCS #5 v2.0 +func StringToPBKDF2(secret, salt string, iterations int, e etype.EType) []byte { + kl := e.GetKeyByteSize() + if e.GetETypeID() == etypeID.AES256_CTS_HMAC_SHA384_192 { + kl = 32 + } + return pbkdf2.Key([]byte(secret), []byte(salt), iterations, kl, e.GetHashFunc()) +} + +// KDF_HMAC_SHA2 key derivation: https://tools.ietf.org/html/rfc8009#section-3 +func KDF_HMAC_SHA2(protocolKey, label, context []byte, kl int, e etype.EType) []byte { + //k: Length in bits of the key to be outputted, expressed in big-endian binary representation in 4 bytes. + k := make([]byte, 4, 4) + binary.BigEndian.PutUint32(k, uint32(kl)) + + c := make([]byte, 4, 4) + binary.BigEndian.PutUint32(c, uint32(1)) + c = append(c, label...) + c = append(c, byte(uint8(0))) + if len(context) > 0 { + c = append(c, context...) + } + c = append(c, k...) + + mac := hmac.New(e.GetHashFunc(), protocolKey) + mac.Write(c) + return mac.Sum(nil)[:(kl / 8)] +} + +// GetSaltP returns the salt value based on the etype name: https://tools.ietf.org/html/rfc8009#section-4 +func GetSaltP(salt, ename string) string { + b := []byte(ename) + b = append(b, byte(uint8(0))) + b = append(b, []byte(salt)...) + return string(b) +} + +// S2KparamsToItertions converts the string representation of iterations to an integer for RFC 8009. +func S2KparamsToItertions(s2kparams string) (int, error) { + var i uint32 + if len(s2kparams) != 8 { + return s2kParamsZero, errors.New("Invalid s2kparams length") + } + b, err := hex.DecodeString(s2kparams) + if err != nil { + return s2kParamsZero, errors.New("Invalid s2kparams, cannot decode string to bytes") + } + i = binary.BigEndian.Uint32(b) + //buf := bytes.NewBuffer(b) + //err = binary.Read(buf, binary.BigEndian, &i) + if err != nil { + return s2kParamsZero, errors.New("Invalid s2kparams, cannot convert to big endian int32") + } + return int(i), nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/ContextFlags.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/ContextFlags.go new file mode 100644 index 00000000..d5b26948 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/ContextFlags.go @@ -0,0 +1,36 @@ +package gssapi + +import "github.com/jcmturner/gofork/encoding/asn1" + +/* +ContextFlags ::= BIT STRING { + delegFlag (0), + mutualFlag (1), + replayFlag (2), + sequenceFlag (3), + anonFlag (4), + confFlag (5), + integFlag (6) +} (SIZE (32)) +*/ + +const ( + delegFlag = 0 + mutualFlag = 1 + replayFlag = 2 + sequenceFlag = 3 + anonFlag = 4 + confFlag = 5 + integFlag = 6 +) + +// ContextFlags flags for GSSAPI +type ContextFlags asn1.BitString + +// NewContextFlags creates a new ContextFlags instance. +func NewContextFlags() ContextFlags { + var c ContextFlags + c.BitLength = 32 + c.Bytes = make([]byte, 4) + return c +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/MechType.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/MechType.go new file mode 100644 index 00000000..587cdccd --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/MechType.go @@ -0,0 +1,9 @@ +package gssapi + +import "github.com/jcmturner/gofork/encoding/asn1" + +// MechTypeOIDKRB5 is the MechType OID for Kerberos 5 +var MechTypeOIDKRB5 = asn1.ObjectIdentifier{1, 2, 840, 113554, 1, 2, 2} + +// MechTypeOIDMSLegacyKRB5 is the MechType OID for MS legacy Kerberos 5 +var MechTypeOIDMSLegacyKRB5 = asn1.ObjectIdentifier{1, 2, 840, 48018, 1, 2, 2} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/NegotiationToken.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/NegotiationToken.go new file mode 100644 index 00000000..f603c47f --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/NegotiationToken.go @@ -0,0 +1,149 @@ +package gssapi + +import ( + "errors" + "fmt" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/credentials" + "gopkg.in/jcmturner/gokrb5.v5/messages" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +/* +https://msdn.microsoft.com/en-us/library/ms995330.aspx + +NegotiationToken ::= CHOICE { + negTokenInit [0] NegTokenInit, This is the Negotiation token sent from the client to the server. + negTokenResp [1] NegTokenResp +} + +NegTokenInit ::= SEQUENCE { + mechTypes [0] MechTypeList, + reqFlags [1] ContextFlags OPTIONAL, + -- inherited from RFC 2478 for backward compatibility, + -- RECOMMENDED to be left out + mechToken [2] OCTET STRING OPTIONAL, + mechListMIC [3] OCTET STRING OPTIONAL, + ... +} + +NegTokenResp ::= SEQUENCE { + negState [0] ENUMERATED { + accept-completed (0), + accept-incomplete (1), + reject (2), + request-mic (3) + } OPTIONAL, + -- REQUIRED in the first reply from the target + supportedMech [1] MechType OPTIONAL, + -- present only in the first reply from the target + responseToken [2] OCTET STRING OPTIONAL, + mechListMIC [3] OCTET STRING OPTIONAL, + ... +} +*/ + +// NegTokenInit implements Negotiation Token of type Init +type NegTokenInit struct { + MechTypes []asn1.ObjectIdentifier `asn1:"explicit,tag:0"` + ReqFlags ContextFlags `asn1:"explicit,optional,tag:1"` + MechToken []byte `asn1:"explicit,optional,tag:2"` + MechTokenMIC []byte `asn1:"explicit,optional,tag:3"` +} + +// NegTokenResp implements Negotiation Token of type Resp/Targ +type NegTokenResp struct { + NegState asn1.Enumerated `asn1:"explicit,tag:0"` + SupportedMech asn1.ObjectIdentifier `asn1:"explicit,optional,tag:1"` + ResponseToken []byte `asn1:"explicit,optional,tag:2"` + MechListMIC []byte `asn1:"explicit,optional,tag:3"` +} + +// NegTokenTarg implements Negotiation Token of type Resp/Targ +type NegTokenTarg NegTokenResp + +// UnmarshalNegToken umarshals and returns either a NegTokenInit or a NegTokenResp. +// +// The boolean indicates if the response is a NegTokenInit. +// If error is nil and the boolean is false the response is a NegTokenResp. +func UnmarshalNegToken(b []byte) (bool, interface{}, error) { + var a asn1.RawValue + _, err := asn1.Unmarshal(b, &a) + if err != nil { + return false, nil, fmt.Errorf("error unmarshalling NegotiationToken: %v", err) + } + switch a.Tag { + case 0: + var negToken NegTokenInit + _, err = asn1.Unmarshal(a.Bytes, &negToken) + if err != nil { + return false, nil, fmt.Errorf("error unmarshalling NegotiationToken type %d (Init): %v", a.Tag, err) + } + return true, negToken, nil + case 1: + var negToken NegTokenResp + _, err = asn1.Unmarshal(a.Bytes, &negToken) + if err != nil { + return false, nil, fmt.Errorf("error unmarshalling NegotiationToken type %d (Resp/Targ): %v", a.Tag, err) + } + return false, negToken, nil + default: + return false, nil, errors.New("unknown choice type for NegotiationToken") + } + +} + +// Marshal an Init negotiation token +func (n *NegTokenInit) Marshal() ([]byte, error) { + b, err := asn1.Marshal(*n) + if err != nil { + return nil, err + } + nt := asn1.RawValue{ + Tag: 0, + Class: 2, + IsCompound: true, + Bytes: b, + } + nb, err := asn1.Marshal(nt) + if err != nil { + return nil, err + } + return nb, nil +} + +// Marshal a Resp/Targ negotiation token +func (n *NegTokenResp) Marshal() ([]byte, error) { + b, err := asn1.Marshal(*n) + if err != nil { + return nil, err + } + nt := asn1.RawValue{ + Tag: 1, + Class: 2, + IsCompound: true, + Bytes: b, + } + nb, err := asn1.Marshal(nt) + if err != nil { + return nil, err + } + return nb, nil +} + +// NewNegTokenInitKrb5 creates new Init negotiation token for Kerberos 5 +func NewNegTokenInitKrb5(creds credentials.Credentials, tkt messages.Ticket, sessionKey types.EncryptionKey) (NegTokenInit, error) { + mt, err := NewAPREQMechToken(creds, tkt, sessionKey, []int{GSS_C_INTEG_FLAG, GSS_C_CONF_FLAG}, []int{}) + if err != nil { + return NegTokenInit{}, fmt.Errorf("error getting MechToken; %v", err) + } + mtb, err := mt.Marshal() + if err != nil { + return NegTokenInit{}, fmt.Errorf("error marshalling MechToken; %v", err) + } + return NegTokenInit{ + MechTypes: []asn1.ObjectIdentifier{MechTypeOIDKRB5}, + MechToken: mtb, + }, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/WrapToken.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/WrapToken.go new file mode 100644 index 00000000..10d6c37c --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/WrapToken.go @@ -0,0 +1,234 @@ +package gssapi + +import ( + "bytes" + "encoding/binary" + "encoding/hex" + "errors" + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +/* +From RFC 4121, section 4.2.6.2: + + Use of the GSS_Wrap() call yields a token (referred as the Wrap token + in this document), which consists of a descriptive header, followed + by a body portion that contains either the input user data in + plaintext concatenated with the checksum, or the input user data + encrypted. The GSS_Wrap() token SHALL have the following format: + + Octet no Name Description + -------------------------------------------------------------- + 0..1 TOK_ID Identification field. Tokens emitted by + GSS_Wrap() contain the hex value 05 04 + expressed in big-endian order in this + field. + 2 Flags Attributes field, as described in section + 4.2.2. + 3 Filler Contains the hex value FF. + 4..5 EC Contains the "extra count" field, in big- + endian order as described in section 4.2.3. + 6..7 RRC Contains the "right rotation count" in big- + endian order, as described in section + 4.2.5. + 8..15 SndSeqNum Sequence number field in clear text, + expressed in big-endian order. + 16..last Data Encrypted data for Wrap tokens with + confidentiality, or plaintext data followed + by the checksum for Wrap tokens without + confidentiality, as described in section + 4.2.4. + +Quick notes: + - "EC" or "Extra Count" refers to the length of the cheksum. + - "Flags" (complete details in section 4.2.2) is a set of bits: + - if bit 0 is set, it means the token was sent by the acceptor (generally the kerberized service). + - bit 1 indicates that the token's payload is encrypted + - bit 2 indicates if the message is protected using a subkey defined by the acceptor. + - When computing checksums, EC and RRC MUST be set to 0. + - Wrap Tokens are not ASN.1 encoded. +*/ +const ( + HdrLen = 16 // Length of the Wrap Token's header + FillerByte byte = 0xFF +) + +// WrapToken represents a GSS API Wrap token, as defined in RFC 4121. +// It contains the header fields, the payload and the checksum, and provides +// the logic for converting to/from bytes plus computing and verifying checksums +type WrapToken struct { + // const GSS Token ID: 0x0504 + Flags byte // contains three flags: acceptor, sealed, acceptor subkey + // const Filler: 0xFF + EC uint16 // checksum length. big-endian + RRC uint16 // right rotation count. big-endian + SndSeqNum uint64 // sender's sequence number. big-endian + Payload []byte // your data! :) + CheckSum []byte // authenticated checksum of { payload | header } +} + +// Return the 2 bytes identifying a GSS API Wrap token +func getGssWrapTokenId() *[2]byte { + return &[2]byte{0x05, 0x04} +} + +// Marshal the WrapToken into a byte slice. +// The payload should have been set and the checksum computed, otherwise an error is returned. +func (wt *WrapToken) Marshal() ([]byte, error) { + if wt.CheckSum == nil { + return nil, errors.New("checksum has not been set") + } + if wt.Payload == nil { + return nil, errors.New("payload has not been set") + } + + pldOffset := HdrLen // Offset of the payload in the token + chkSOffset := HdrLen + len(wt.Payload) // Offset of the checksum in the token + + bytes := make([]byte, chkSOffset+int(wt.EC)) + copy(bytes[0:], getGssWrapTokenId()[:]) + bytes[2] = wt.Flags + bytes[3] = FillerByte + binary.BigEndian.PutUint16(bytes[4:6], wt.EC) + binary.BigEndian.PutUint16(bytes[6:8], wt.RRC) + binary.BigEndian.PutUint64(bytes[8:16], wt.SndSeqNum) + copy(bytes[pldOffset:], wt.Payload) + copy(bytes[chkSOffset:], wt.CheckSum) + return bytes, nil +} + +// ComputeAndSetCheckSum uses the passed encryption key and key usage to compute the checksum over the payload and +// the header, and sets the CheckSum field of this WrapToken. +// If the payload has not been set or the checksum has already been set, an error is returned. +func (wt *WrapToken) ComputeAndSetCheckSum(key types.EncryptionKey, keyUsage uint32) error { + if wt.Payload == nil { + return errors.New("payload has not been set") + } + if wt.CheckSum != nil { + return errors.New("checksum has already been computed") + } + chkSum, cErr := wt.ComputeCheckSum(key, keyUsage) + if cErr != nil { + return cErr + } + wt.CheckSum = chkSum + return nil +} + +// ComputeCheckSum computes and returns the checksum of this token, computed using the passed key and key usage. +// Conforms to RFC 4121 in that the checksum will be computed over { body | header }, +// with the EC and RRC flags zeroed out. +// In the context of Kerberos Wrap tokens, mostly keyusage GSSAPI_ACCEPTOR_SEAL (=22) +// and GSSAPI_INITIATOR_SEAL (=24) will be used. +// Note: This will NOT update the struct's Checksum field. +func (wt *WrapToken) ComputeCheckSum(key types.EncryptionKey, keyUsage uint32) ([]byte, error) { + if wt.Payload == nil { + return nil, errors.New("cannot compute checksum with uninitialized payload") + } + // Build a slice containing { payload | header } + checksumMe := make([]byte, HdrLen+len(wt.Payload)) + copy(checksumMe[0:], wt.Payload) + copy(checksumMe[len(wt.Payload):], getChecksumHeader(wt.Flags, wt.SndSeqNum)) + + encType, err := crypto.GetEtype(key.KeyType) + if err != nil { + return nil, err + } + return encType.GetChecksumHash(key.KeyValue, checksumMe, keyUsage) +} + +// Build a header suitable for a checksum computation +func getChecksumHeader(flags byte, senderSeqNum uint64) []byte { + header := make([]byte, 16) + copy(header[0:], []byte{0x05, 0x04, flags, 0xFF, 0x00, 0x00, 0x00, 0x00}) + binary.BigEndian.PutUint64(header[8:], senderSeqNum) + return header +} + +// VerifyCheckSum computes the token's checksum with the provided key and usage, +// and compares it to the checksum present in the token. +// In case of any failure, (false, Err) is returned, with Err an explanatory error. +func (wt *WrapToken) VerifyCheckSum(key types.EncryptionKey, keyUsage uint32) (bool, error) { + computed, cErr := wt.ComputeCheckSum(key, keyUsage) + if cErr != nil { + return false, cErr + } + if !bytes.Equal(computed, wt.CheckSum) { + return false, fmt.Errorf( + "checksum mismatch. Computed: %s, Contained in token: %s", + hex.EncodeToString(computed), hex.EncodeToString(wt.CheckSum)) + } + return true, nil +} + +// Unmarshal bytes into the corresponding WrapToken. +// If expectFromAcceptor is true, we expect the token to have been emitted by the gss acceptor, +// and will check the according flag, returning an error if the token does not match the expectation. +func (wt *WrapToken) Unmarshal(b []byte, expectFromAcceptor bool) error { + // Check if we can read a whole header + if len(b) < 16 { + return errors.New("bytes shorter than header length") + } + // Is the Token ID correct? + if !bytes.Equal(getGssWrapTokenId()[:], b[0:2]) { + return fmt.Errorf("wrong Token ID. Expected %s, was %s", + hex.EncodeToString(getGssWrapTokenId()[:]), + hex.EncodeToString(b[0:2])) + } + // Check the acceptor flag + flags := b[2] + isFromAcceptor := flags&0x01 == 1 + if isFromAcceptor && !expectFromAcceptor { + return errors.New("unexpected acceptor flag is set: not expecting a token from the acceptor") + } + if !isFromAcceptor && expectFromAcceptor { + return errors.New("expected acceptor flag is not set: expecting a token from the acceptor, not the initiator") + } + // Check the filler byte + if b[3] != FillerByte { + return fmt.Errorf("unexpected filler byte: expecting 0xFF, was %s ", hex.EncodeToString(b[3:4])) + } + checksumL := binary.BigEndian.Uint16(b[4:6]) + // Sanity check on the checksum length + if int(checksumL) > len(b)-HdrLen { + return fmt.Errorf("inconsistent checksum length: %d bytes to parse, checksum length is %d", len(b), checksumL) + } + + wt.Flags = flags + wt.EC = checksumL + wt.RRC = binary.BigEndian.Uint16(b[6:8]) + wt.SndSeqNum = binary.BigEndian.Uint64(b[8:16]) + wt.Payload = b[16 : len(b)-int(checksumL)] + wt.CheckSum = b[len(b)-int(checksumL):] + return nil +} + +// NewInitiatorToken builds a new initiator token (acceptor flag will be set to 0) and computes the authenticated checksum. +// Other flags are set to 0, and the RRC and sequence number are initialized to 0. +// Note that in certain circumstances you may need to provide a sequence number that has been defined earlier. +// This is currently not supported. +func NewInitiatorToken(payload []byte, key types.EncryptionKey) (*WrapToken, error) { + encType, err := crypto.GetEtype(key.KeyType) + if err != nil { + return nil, err + } + + token := WrapToken{ + Flags: 0x00, // all zeroed out (this is a token sent by the initiator) + // Checksum size: lenth of output of the HMAC function, in bytes. + EC: uint16(encType.GetHMACBitLength() / 8), + RRC: 0, + SndSeqNum: 0, + Payload: payload, + } + + if err := token.ComputeAndSetCheckSum(key, keyusage.GSSAPI_INITIATOR_SEAL); err != nil { + return nil, err + } + + return &token, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/gssapi.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/gssapi.go new file mode 100644 index 00000000..137f42e7 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/gssapi.go @@ -0,0 +1,102 @@ +// Package gssapi implements Generic Security Services Application Program Interface required for SPNEGO kerberos authentication. +package gssapi + +import ( + "errors" + "fmt" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/asn1tools" + "gopkg.in/jcmturner/gokrb5.v5/credentials" + "gopkg.in/jcmturner/gokrb5.v5/messages" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// SPNEGO_OID is the OID for SPNEGO header type. +var SPNEGO_OID = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 2} + +// SPNEGO header struct +type SPNEGO struct { + Init bool + Resp bool + NegTokenInit NegTokenInit + NegTokenResp NegTokenResp +} + +// Unmarshal SPNEGO negotiation token +func (s *SPNEGO) Unmarshal(b []byte) error { + var r []byte + var err error + if b[0] != byte(161) { + // Not a NegTokenResp/Targ could be a NegTokenInit + var oid asn1.ObjectIdentifier + r, err = asn1.UnmarshalWithParams(b, &oid, fmt.Sprintf("application,explicit,tag:%v", 0)) + if err != nil { + return fmt.Errorf("not a valid SPNEGO token: %v", err) + } + // Check the OID is the SPNEGO OID value + if !oid.Equal(SPNEGO_OID) { + return fmt.Errorf("OID %s does not match SPNEGO OID %s", oid.String(), SPNEGO_OID.String()) + } + } else { + // Could be a NegTokenResp/Targ + r = b + } + + var a asn1.RawValue + _, err = asn1.Unmarshal(r, &a) + if err != nil { + return fmt.Errorf("error unmarshalling SPNEGO: %v", err) + } + switch a.Tag { + case 0: + _, err = asn1.Unmarshal(a.Bytes, &s.NegTokenInit) + if err != nil { + return fmt.Errorf("error unmarshalling NegotiationToken type %d (Init): %v", a.Tag, err) + } + s.Init = true + case 1: + _, err = asn1.Unmarshal(a.Bytes, &s.NegTokenResp) + if err != nil { + return fmt.Errorf("error unmarshalling NegotiationToken type %d (Resp/Targ): %v", a.Tag, err) + } + s.Resp = true + default: + return errors.New("unknown choice type for NegotiationToken") + } + return nil +} + +// Marshal SPNEGO negotiation token +func (s *SPNEGO) Marshal() ([]byte, error) { + var b []byte + if s.Init { + hb, _ := asn1.Marshal(SPNEGO_OID) + tb, err := s.NegTokenInit.Marshal() + if err != nil { + return b, fmt.Errorf("could not marshal NegTokenInit: %v", err) + } + b = append(hb, tb...) + return asn1tools.AddASNAppTag(b, 0), nil + } + if s.Resp { + b, err := s.NegTokenResp.Marshal() + if err != nil { + return b, fmt.Errorf("could not marshal NegTokenResp: %v", err) + } + return b, nil + } + return b, errors.New("SPNEGO cannot be marshalled. It contains neither a NegTokenInit or NegTokenResp") +} + +// GetSPNEGOKrbNegTokenInit returns an SPNEGO struct containing a NegTokenInit. +func GetSPNEGOKrbNegTokenInit(creds credentials.Credentials, tkt messages.Ticket, sessionKey types.EncryptionKey) (SPNEGO, error) { + negTokenInit, err := NewNegTokenInitKrb5(creds, tkt, sessionKey) + if err != nil { + return SPNEGO{}, fmt.Errorf("could not create NegTokenInit: %v", err) + } + return SPNEGO{ + Init: true, + NegTokenInit: negTokenInit, + }, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/krb5Token.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/krb5Token.go new file mode 100644 index 00000000..d5cb61bb --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/krb5Token.go @@ -0,0 +1,202 @@ +package gssapi + +import ( + "encoding/binary" + "encoding/hex" + "errors" + "fmt" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/asn1tools" + "gopkg.in/jcmturner/gokrb5.v5/credentials" + "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/messages" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// GSSAPI MechToken IDs and flags. +const ( + TOK_ID_KRB_AP_REQ = "0100" + TOK_ID_KRB_AP_REP = "0200" + TOK_ID_KRB_ERROR = "0300" + + GSS_C_DELEG_FLAG = 1 + GSS_C_MUTUAL_FLAG = 2 + GSS_C_REPLAY_FLAG = 4 + GSS_C_SEQUENCE_FLAG = 8 + GSS_C_CONF_FLAG = 16 + GSS_C_INTEG_FLAG = 32 +) + +// MechToken implementation for GSSAPI. +type MechToken struct { + OID asn1.ObjectIdentifier + TokID []byte + APReq messages.APReq + APRep messages.APRep + KRBError messages.KRBError +} + +// Marshal a MechToken into a slice of bytes. +func (m *MechToken) Marshal() ([]byte, error) { + // Create the header + b, _ := asn1.Marshal(m.OID) + b = append(b, m.TokID...) + var tb []byte + var err error + switch hex.EncodeToString(m.TokID) { + case TOK_ID_KRB_AP_REQ: + tb, err = m.APReq.Marshal() + if err != nil { + return []byte{}, fmt.Errorf("error marshalling AP_REQ for MechToken: %v", err) + } + case TOK_ID_KRB_AP_REP: + return []byte{}, errors.New("marshal of AP_REP GSSAPI MechToken not supported by gokrb5") + case TOK_ID_KRB_ERROR: + return []byte{}, errors.New("marshal of KRB_ERROR GSSAPI MechToken not supported by gokrb5") + } + if err != nil { + return []byte{}, fmt.Errorf("error mashalling kerberos message within mech token: %v", err) + } + b = append(b, tb...) + return asn1tools.AddASNAppTag(b, 0), nil +} + +// Unmarshal a MechToken. +func (m *MechToken) Unmarshal(b []byte) error { + var oid asn1.ObjectIdentifier + r, err := asn1.UnmarshalWithParams(b, &oid, fmt.Sprintf("application,explicit,tag:%v", 0)) + if err != nil { + return fmt.Errorf("error unmarshalling MechToken OID: %v", err) + } + m.OID = oid + m.TokID = r[0:2] + switch hex.EncodeToString(m.TokID) { + case TOK_ID_KRB_AP_REQ: + var a messages.APReq + err = a.Unmarshal(r[2:]) + if err != nil { + return fmt.Errorf("error unmarshalling MechToken AP_REQ: %v", err) + } + m.APReq = a + case TOK_ID_KRB_AP_REP: + var a messages.APRep + err = a.Unmarshal(r[2:]) + if err != nil { + return fmt.Errorf("error unmarshalling MechToken AP_REP: %v", err) + } + m.APRep = a + case TOK_ID_KRB_ERROR: + var a messages.KRBError + err = a.Unmarshal(r[2:]) + if err != nil { + return fmt.Errorf("error unmarshalling MechToken KRBError: %v", err) + } + m.KRBError = a + } + return nil +} + +// IsAPReq tests if the MechToken contains an AP_REQ. +func (m *MechToken) IsAPReq() bool { + if hex.EncodeToString(m.TokID) == TOK_ID_KRB_AP_REQ { + return true + } + return false +} + +// IsAPRep tests if the MechToken contains an AP_REP. +func (m *MechToken) IsAPRep() bool { + if hex.EncodeToString(m.TokID) == TOK_ID_KRB_AP_REP { + return true + } + return false +} + +// IsKRBError tests if the MechToken contains an KRB_ERROR. +func (m *MechToken) IsKRBError() bool { + if hex.EncodeToString(m.TokID) == TOK_ID_KRB_ERROR { + return true + } + return false +} + +// NewAPREQMechToken creates new Kerberos AP_REQ MechToken. +func NewAPREQMechToken(creds credentials.Credentials, tkt messages.Ticket, sessionKey types.EncryptionKey, GSSAPIFlags []int, APOptions []int) (MechToken, error) { + var m MechToken + m.OID = MechTypeOIDKRB5 + tb, _ := hex.DecodeString(TOK_ID_KRB_AP_REQ) + m.TokID = tb + + auth, err := NewAuthenticator(creds, GSSAPIFlags) + if err != nil { + return m, err + } + APReq, err := messages.NewAPReq( + tkt, + sessionKey, + auth, + ) + if err != nil { + return m, err + } + for _, o := range APOptions { + types.SetFlag(&APReq.APOptions, o) + } + m.APReq = APReq + return m, nil +} + +// NewAuthenticator creates a new kerberos authenticator for kerberos MechToken +func NewAuthenticator(creds credentials.Credentials, flags []int) (types.Authenticator, error) { + //RFC 4121 Section 4.1.1 + auth, err := types.NewAuthenticator(creds.Realm, creds.CName) + if err != nil { + return auth, krberror.Errorf(err, krberror.KRBMsgError, "error generating new authenticator") + } + auth.Cksum = types.Checksum{ + CksumType: chksumtype.GSSAPI, + Checksum: newAuthenticatorChksum(flags), + } + return auth, nil +} + +// Create new authenticator checksum for kerberos MechToken +func newAuthenticatorChksum(flags []int) []byte { + a := make([]byte, 24) + binary.LittleEndian.PutUint32(a[:4], 16) + for _, i := range flags { + if i == GSS_C_DELEG_FLAG { + x := make([]byte, 28-len(a)) + a = append(a, x...) + } + f := binary.LittleEndian.Uint32(a[20:24]) + f |= uint32(i) + binary.LittleEndian.PutUint32(a[20:24], f) + } + return a +} + +/* +The authenticator checksum field SHALL have the following format: + +Octet Name Description +----------------------------------------------------------------- +0..3 Lgth Number of octets in Bnd field; Represented + in little-endian order; Currently contains + hex value 10 00 00 00 (16). +4..19 Bnd Channel binding information, as described in + section 4.1.1.2. +20..23 Flags Four-octet context-establishment flags in + little-endian order as described in section + 4.1.1.1. +24..25 DlgOpt The delegation option identifier (=1) in + little-endian order [optional]. This field + and the next two fields are present if and + only if GSS_C_DELEG_FLAG is set as described + in section 4.1.1.1. +26..27 Dlgth The length of the Deleg field in little-endian order [optional]. +28..(n-1) Deleg A KRB_CRED message (n = Dlgth + 28) [optional]. +n..last Exts Extensions [optional]. +*/ diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/addrtype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/addrtype/constants.go new file mode 100644 index 00000000..457b89d7 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/addrtype/constants.go @@ -0,0 +1,15 @@ +// Package addrtype provides Address type assigned numbers. +package addrtype + +// Address type IDs. +const ( + IPv4 int32 = 2 + Directional int32 = 3 + ChaosNet int32 = 5 + XNS int32 = 6 + ISO int32 = 7 + DECNETPhaseIV int32 = 12 + AppleTalkDDP int32 = 16 + NetBios int32 = 20 + IPv6 int32 = 24 +) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/adtype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/adtype/constants.go new file mode 100644 index 00000000..e805b746 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/adtype/constants.go @@ -0,0 +1,23 @@ +// Package adtype provides Authenticator type assigned numbers. +package adtype + +// Authenticator type IDs. +const ( + ADIfRelevant int32 = 1 + ADIntendedForServer int32 = 2 + ADIntendedForApplicationClass int32 = 3 + ADKDCIssued int32 = 4 + ADAndOr int32 = 5 + ADMandatoryTicketExtensions int32 = 6 + ADInTicketExtensions int32 = 7 + ADMandatoryForKDC int32 = 8 + OSFDCE int32 = 64 + SESAME int32 = 65 + ADOSFDCEPKICertID int32 = 66 + ADAuthenticationStrength int32 = 70 + ADFXFastArmor int32 = 71 + ADFXFastUsed int32 = 72 + ADWin2KPAC int32 = 128 + ADEtypeNegotiation int32 = 129 + //Reserved values 9-63 +) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag/constants.go new file mode 100644 index 00000000..d74cd60e --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag/constants.go @@ -0,0 +1,24 @@ +// Package asnAppTag provides ASN1 application tag numbers. +package asnAppTag + +// ASN1 application tag numbers. +const ( + Ticket = 1 + Authenticator = 2 + EncTicketPart = 3 + ASREQ = 10 + TGSREQ = 12 + ASREP = 11 + TGSREP = 13 + APREQ = 14 + APREP = 15 + KRBSafe = 20 + KRBPriv = 21 + KRBCred = 22 + EncASRepPart = 25 + EncTGSRepPart = 26 + EncAPRepPart = 27 + EncKrbPrivPart = 28 + EncKrbCredPart = 29 + KRBError = 30 +) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype/constants.go new file mode 100644 index 00000000..93db952d --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype/constants.go @@ -0,0 +1,32 @@ +// Package chksumtype provides Kerberos 5 checksum type assigned numbers. +package chksumtype + +// Checksum type IDs. +const ( + //RESERVED : 0 + CRC32 int32 = 1 + RSA_MD4 int32 = 2 + RSA_MD4_DES int32 = 3 + DES_MAC int32 = 4 + DES_MAC_K int32 = 5 + RSA_MD4_DES_K int32 = 6 + RSA_MD5 int32 = 7 + RSA_MD5_DES int32 = 8 + RSA_MD5_DES3 int32 = 9 + SHA1_ID10 int32 = 10 + //UNASSIGNED : 11 + HMAC_SHA1_DES3_KD int32 = 12 + HMAC_SHA1_DES3 int32 = 13 + SHA1_ID14 int32 = 14 + HMAC_SHA1_96_AES128 int32 = 15 + HMAC_SHA1_96_AES256 int32 = 16 + CMAC_CAMELLIA128 int32 = 17 + CMAC_CAMELLIA256 int32 = 18 + HMAC_SHA256_128_AES128 int32 = 19 + HMAC_SHA384_192_AES256 int32 = 20 + //UNASSIGNED : 21-32770 + GSSAPI int32 = 32771 + //UNASSIGNED : 32772-2147483647 + KERB_CHECKSUM_HMAC_MD5_UNSIGNED uint32 = 4294967158 // 0xFFFFFF76 documentation says this is -138 but in an unsigned int this is 4294967158 + KERB_CHECKSUM_HMAC_MD5 int32 = -138 +) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/constants.go new file mode 100644 index 00000000..0b8e916d --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/constants.go @@ -0,0 +1,5 @@ +// Package iana provides Kerberos 5 assigned numbers. +package iana + +// PVNO is the Protocol Version Number. +const PVNO = 5 diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/errorcode/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/errorcode/constants.go new file mode 100644 index 00000000..fd756bc5 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/errorcode/constants.go @@ -0,0 +1,155 @@ +// Package errorcode provides Kerberos 5 assigned error codes. +package errorcode + +import "fmt" + +// Kerberos error codes. +const ( + KDC_ERR_NONE int32 = 0 //No error + KDC_ERR_NAME_EXP int32 = 1 //Client's entry in database has expired + KDC_ERR_SERVICE_EXP int32 = 2 //Server's entry in database has expired + KDC_ERR_BAD_PVNO int32 = 3 //Requested protocol version number not supported + KDC_ERR_C_OLD_MAST_KVNO int32 = 4 //Client's key encrypted in old master key + KDC_ERR_S_OLD_MAST_KVNO int32 = 5 //Server's key encrypted in old master key + KDC_ERR_C_PRINCIPAL_UNKNOWN int32 = 6 //Client not found in Kerberos database + KDC_ERR_S_PRINCIPAL_UNKNOWN int32 = 7 //Server not found in Kerberos database + KDC_ERR_PRINCIPAL_NOT_UNIQUE int32 = 8 //Multiple principal entries in database + KDC_ERR_NULL_KEY int32 = 9 //The client or server has a null key + KDC_ERR_CANNOT_POSTDATE int32 = 10 //Ticket not eligible for postdating + KDC_ERR_NEVER_VALID int32 = 11 //Requested starttime is later than end time + KDC_ERR_POLICY int32 = 12 //KDC policy rejects request + KDC_ERR_BADOPTION int32 = 13 //KDC cannot accommodate requested option + KDC_ERR_ETYPE_NOSUPP int32 = 14 //KDC has no support for encryption type + KDC_ERR_SUMTYPE_NOSUPP int32 = 15 //KDC has no support for checksum type + KDC_ERR_PADATA_TYPE_NOSUPP int32 = 16 //KDC has no support for padata type + KDC_ERR_TRTYPE_NOSUPP int32 = 17 //KDC has no support for transited type + KDC_ERR_CLIENT_REVOKED int32 = 18 //Clients credentials have been revoked + KDC_ERR_SERVICE_REVOKED int32 = 19 //Credentials for server have been revoked + KDC_ERR_TGT_REVOKED int32 = 20 //TGT has been revoked + KDC_ERR_CLIENT_NOTYET int32 = 21 //Client not yet valid; try again later + KDC_ERR_SERVICE_NOTYET int32 = 22 //Server not yet valid; try again later + KDC_ERR_KEY_EXPIRED int32 = 23 //Password has expired; change password to reset + KDC_ERR_PREAUTH_FAILED int32 = 24 //Pre-authentication information was invalid + KDC_ERR_PREAUTH_REQUIRED int32 = 25 //Additional pre-authentication required + KDC_ERR_SERVER_NOMATCH int32 = 26 //Requested server and ticket don't match + KDC_ERR_MUST_USE_USER2USER int32 = 27 //Server principal valid for user2user only + KDC_ERR_PATH_NOT_ACCEPTED int32 = 28 //KDC Policy rejects transited path + KDC_ERR_SVC_UNAVAILABLE int32 = 29 //A service is not available + KRB_AP_ERR_BAD_INTEGRITY int32 = 31 //Integrity check on decrypted field failed + KRB_AP_ERR_TKT_EXPIRED int32 = 32 //Ticket expired + KRB_AP_ERR_TKT_NYV int32 = 33 //Ticket not yet valid + KRB_AP_ERR_REPEAT int32 = 34 //Request is a replay + KRB_AP_ERR_NOT_US int32 = 35 //The ticket isn't for us + KRB_AP_ERR_BADMATCH int32 = 36 //Ticket and authenticator don't match + KRB_AP_ERR_SKEW int32 = 37 //Clock skew too great + KRB_AP_ERR_BADADDR int32 = 38 //Incorrect net address + KRB_AP_ERR_BADVERSION int32 = 39 //Protocol version mismatch + KRB_AP_ERR_MSG_TYPE int32 = 40 //Invalid msg type + KRB_AP_ERR_MODIFIED int32 = 41 //Message stream modified + KRB_AP_ERR_BADORDER int32 = 42 //Message out of order + KRB_AP_ERR_BADKEYVER int32 = 44 //Specified version of key is not available + KRB_AP_ERR_NOKEY int32 = 45 //Service key not available + KRB_AP_ERR_MUT_FAIL int32 = 46 //Mutual authentication failed + KRB_AP_ERR_BADDIRECTION int32 = 47 //Incorrect message direction + KRB_AP_ERR_METHOD int32 = 48 //Alternative authentication method required + KRB_AP_ERR_BADSEQ int32 = 49 //Incorrect sequence number in message + KRB_AP_ERR_INAPP_CKSUM int32 = 50 //Inappropriate type of checksum in message + KRB_AP_PATH_NOT_ACCEPTED int32 = 51 //Policy rejects transited path + KRB_ERR_RESPONSE_TOO_BIG int32 = 52 //Response too big for UDP; retry with TCP + KRB_ERR_GENERIC int32 = 60 //Generic error (description in e-text) + KRB_ERR_FIELD_TOOLONG int32 = 61 //Field is too long for this implementation + KDC_ERROR_CLIENT_NOT_TRUSTED int32 = 62 //Reserved for PKINIT + KDC_ERROR_KDC_NOT_TRUSTED int32 = 63 //Reserved for PKINIT + KDC_ERROR_INVALID_SIG int32 = 64 //Reserved for PKINIT + KDC_ERR_KEY_TOO_WEAK int32 = 65 //Reserved for PKINIT + KDC_ERR_CERTIFICATE_MISMATCH int32 = 66 //Reserved for PKINIT + KRB_AP_ERR_NO_TGT int32 = 67 //No TGT available to validate USER-TO-USER + KDC_ERR_WRONG_REALM int32 = 68 //Reserved for future use + KRB_AP_ERR_USER_TO_USER_REQUIRED int32 = 69 //Ticket must be for USER-TO-USER + KDC_ERR_CANT_VERIFY_CERTIFICATE int32 = 70 //Reserved for PKINIT + KDC_ERR_INVALID_CERTIFICATE int32 = 71 //Reserved for PKINIT + KDC_ERR_REVOKED_CERTIFICATE int32 = 72 //Reserved for PKINIT + KDC_ERR_REVOCATION_STATUS_UNKNOWN int32 = 73 //Reserved for PKINIT + KDC_ERR_REVOCATION_STATUS_UNAVAILABLE int32 = 74 //Reserved for PKINIT + KDC_ERR_CLIENT_NAME_MISMATCH int32 = 75 //Reserved for PKINIT + KDC_ERR_KDC_NAME_MISMATCH int32 = 76 //Reserved for PKINIT +) + +// Lookup an error code description. +func Lookup(i int32) string { + if s, ok := errorcodeLookup[i]; ok { + return fmt.Sprintf("(%d) %s", i, s) + } + return fmt.Sprintf("Unknown ErrorCode %d", i) +} + +var errorcodeLookup = map[int32]string{ + KDC_ERR_NONE: "KDC_ERR_NONE No error", + KDC_ERR_NAME_EXP: "KDC_ERR_NAME_EXP Client's entry in database has expired", + KDC_ERR_SERVICE_EXP: "KDC_ERR_SERVICE_EXP Server's entry in database has expired", + KDC_ERR_BAD_PVNO: "KDC_ERR_BAD_PVNO Requested protocol version number not supported", + KDC_ERR_C_OLD_MAST_KVNO: "KDC_ERR_C_OLD_MAST_KVNO Client's key encrypted in old master key", + KDC_ERR_S_OLD_MAST_KVNO: "KDC_ERR_S_OLD_MAST_KVNO Server's key encrypted in old master key", + KDC_ERR_C_PRINCIPAL_UNKNOWN: "KDC_ERR_C_PRINCIPAL_UNKNOWN Client not found in Kerberos database", + KDC_ERR_S_PRINCIPAL_UNKNOWN: "KDC_ERR_S_PRINCIPAL_UNKNOWN Server not found in Kerberos database", + KDC_ERR_PRINCIPAL_NOT_UNIQUE: "KDC_ERR_PRINCIPAL_NOT_UNIQUE Multiple principal entries in database", + KDC_ERR_NULL_KEY: "KDC_ERR_NULL_KEY The client or server has a null key", + KDC_ERR_CANNOT_POSTDATE: "KDC_ERR_CANNOT_POSTDATE Ticket not eligible for postdating", + KDC_ERR_NEVER_VALID: "KDC_ERR_NEVER_VALID Requested starttime is later than end time", + KDC_ERR_POLICY: "KDC_ERR_POLICY KDC policy rejects request", + KDC_ERR_BADOPTION: "KDC_ERR_BADOPTION KDC cannot accommodate requested option", + KDC_ERR_ETYPE_NOSUPP: "KDC_ERR_ETYPE_NOSUPP KDC has no support for encryption type", + KDC_ERR_SUMTYPE_NOSUPP: "KDC_ERR_SUMTYPE_NOSUPP KDC has no support for checksum type", + KDC_ERR_PADATA_TYPE_NOSUPP: "KDC_ERR_PADATA_TYPE_NOSUPP KDC has no support for padata type", + KDC_ERR_TRTYPE_NOSUPP: "KDC_ERR_TRTYPE_NOSUPP KDC has no support for transited type", + KDC_ERR_CLIENT_REVOKED: "KDC_ERR_CLIENT_REVOKED Clients credentials have been revoked", + KDC_ERR_SERVICE_REVOKED: "KDC_ERR_SERVICE_REVOKED Credentials for server have been revoked", + KDC_ERR_TGT_REVOKED: "KDC_ERR_TGT_REVOKED TGT has been revoked", + KDC_ERR_CLIENT_NOTYET: "KDC_ERR_CLIENT_NOTYET Client not yet valid; try again later", + KDC_ERR_SERVICE_NOTYET: "KDC_ERR_SERVICE_NOTYET Server not yet valid; try again later", + KDC_ERR_KEY_EXPIRED: "KDC_ERR_KEY_EXPIRED Password has expired; change password to reset", + KDC_ERR_PREAUTH_FAILED: "KDC_ERR_PREAUTH_FAILED Pre-authentication information was invalid", + KDC_ERR_PREAUTH_REQUIRED: "KDC_ERR_PREAUTH_REQUIRED Additional pre-authentication required", + KDC_ERR_SERVER_NOMATCH: "KDC_ERR_SERVER_NOMATCH Requested server and ticket don't match", + KDC_ERR_MUST_USE_USER2USER: "KDC_ERR_MUST_USE_USER2USER Server principal valid for user2user only", + KDC_ERR_PATH_NOT_ACCEPTED: "KDC_ERR_PATH_NOT_ACCEPTED KDC Policy rejects transited path", + KDC_ERR_SVC_UNAVAILABLE: "KDC_ERR_SVC_UNAVAILABLE A service is not available", + KRB_AP_ERR_BAD_INTEGRITY: "KRB_AP_ERR_BAD_INTEGRITY Integrity check on decrypted field failed", + KRB_AP_ERR_TKT_EXPIRED: "KRB_AP_ERR_TKT_EXPIRED Ticket expired", + KRB_AP_ERR_TKT_NYV: "KRB_AP_ERR_TKT_NYV Ticket not yet valid", + KRB_AP_ERR_REPEAT: "KRB_AP_ERR_REPEAT Request is a replay", + KRB_AP_ERR_NOT_US: "KRB_AP_ERR_NOT_US The ticket isn't for us", + KRB_AP_ERR_BADMATCH: "KRB_AP_ERR_BADMATCH Ticket and authenticator don't match", + KRB_AP_ERR_SKEW: "KRB_AP_ERR_SKEW Clock skew too great", + KRB_AP_ERR_BADADDR: "KRB_AP_ERR_BADADDR Incorrect net address", + KRB_AP_ERR_BADVERSION: "KRB_AP_ERR_BADVERSION Protocol version mismatch", + KRB_AP_ERR_MSG_TYPE: "KRB_AP_ERR_MSG_TYPE Invalid msg type", + KRB_AP_ERR_MODIFIED: "KRB_AP_ERR_MODIFIED Message stream modified", + KRB_AP_ERR_BADORDER: "KRB_AP_ERR_BADORDER Message out of order", + KRB_AP_ERR_BADKEYVER: "KRB_AP_ERR_BADKEYVER Specified version of key is not available", + KRB_AP_ERR_NOKEY: "KRB_AP_ERR_NOKEY Service key not available", + KRB_AP_ERR_MUT_FAIL: "KRB_AP_ERR_MUT_FAIL Mutual authentication failed", + KRB_AP_ERR_BADDIRECTION: "KRB_AP_ERR_BADDIRECTION Incorrect message direction", + KRB_AP_ERR_METHOD: "KRB_AP_ERR_METHOD Alternative authentication method required", + KRB_AP_ERR_BADSEQ: "KRB_AP_ERR_BADSEQ Incorrect sequence number in message", + KRB_AP_ERR_INAPP_CKSUM: "KRB_AP_ERR_INAPP_CKSUM Inappropriate type of checksum in message", + KRB_AP_PATH_NOT_ACCEPTED: "KRB_AP_PATH_NOT_ACCEPTED Policy rejects transited path", + KRB_ERR_RESPONSE_TOO_BIG: "KRB_ERR_RESPONSE_TOO_BIG Response too big for UDP; retry with TCP", + KRB_ERR_GENERIC: "KRB_ERR_GENERIC Generic error (description in e-text)", + KRB_ERR_FIELD_TOOLONG: "KRB_ERR_FIELD_TOOLONG Field is too long for this implementation", + KDC_ERROR_CLIENT_NOT_TRUSTED: "KDC_ERROR_CLIENT_NOT_TRUSTED Reserved for PKINIT", + KDC_ERROR_KDC_NOT_TRUSTED: "KDC_ERROR_KDC_NOT_TRUSTED Reserved for PKINIT", + KDC_ERROR_INVALID_SIG: "KDC_ERROR_INVALID_SIG Reserved for PKINIT", + KDC_ERR_KEY_TOO_WEAK: "KDC_ERR_KEY_TOO_WEAK Reserved for PKINIT", + KDC_ERR_CERTIFICATE_MISMATCH: "KDC_ERR_CERTIFICATE_MISMATCH Reserved for PKINIT", + KRB_AP_ERR_NO_TGT: "KRB_AP_ERR_NO_TGT No TGT available to validate USER-TO-USER", + KDC_ERR_WRONG_REALM: "KDC_ERR_WRONG_REALM Reserved for future use", + KRB_AP_ERR_USER_TO_USER_REQUIRED: "KRB_AP_ERR_USER_TO_USER_REQUIRED Ticket must be for USER-TO-USER", + KDC_ERR_CANT_VERIFY_CERTIFICATE: "KDC_ERR_CANT_VERIFY_CERTIFICATE Reserved for PKINIT", + KDC_ERR_INVALID_CERTIFICATE: "KDC_ERR_INVALID_CERTIFICATE Reserved for PKINIT", + KDC_ERR_REVOKED_CERTIFICATE: "KDC_ERR_REVOKED_CERTIFICATE Reserved for PKINIT", + KDC_ERR_REVOCATION_STATUS_UNKNOWN: "KDC_ERR_REVOCATION_STATUS_UNKNOWN Reserved for PKINIT", + KDC_ERR_REVOCATION_STATUS_UNAVAILABLE: "KDC_ERR_REVOCATION_STATUS_UNAVAILABLE Reserved for PKINIT", + KDC_ERR_CLIENT_NAME_MISMATCH: "KDC_ERR_CLIENT_NAME_MISMATCH Reserved for PKINIT", + KDC_ERR_KDC_NAME_MISMATCH: "KDC_ERR_KDC_NAME_MISMATCH Reserved for PKINIT", +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/etypeID/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/etypeID/constants.go new file mode 100644 index 00000000..65cd72fb --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/etypeID/constants.go @@ -0,0 +1,101 @@ +// Package etypeID provides Kerberos 5 encryption type assigned numbers. +package etypeID + +// Kerberos encryption type assigned numbers. +const ( + //RESERVED : 0 + DES_CBC_CRC int32 = 1 + DES_CBC_MD4 int32 = 2 + DES_CBC_MD5 int32 = 3 + DES_CBC_RAW int32 = 4 + DES3_CBC_MD5 int32 = 5 + DES3_CBC_RAW int32 = 6 + DES3_CBC_SHA1 int32 = 7 + DES_HMAC_SHA1 int32 = 8 + DSAWITHSHA1_CMSOID int32 = 9 + MD5WITHRSAENCRYPTION_CMSOID int32 = 10 + SHA1WITHRSAENCRYPTION_CMSOID int32 = 11 + RC2CBC_ENVOID int32 = 12 + RSAENCRYPTION_ENVOID int32 = 13 + RSAES_OAEP_ENV_OID int32 = 14 + DES_EDE3_CBC_ENV_OID int32 = 15 + DES3_CBC_SHA1_KD int32 = 16 + AES128_CTS_HMAC_SHA1_96 int32 = 17 + AES256_CTS_HMAC_SHA1_96 int32 = 18 + AES128_CTS_HMAC_SHA256_128 int32 = 19 + AES256_CTS_HMAC_SHA384_192 int32 = 20 + //UNASSIGNED : 21-22 + RC4_HMAC int32 = 23 + RC4_HMAC_EXP int32 = 24 + CAMELLIA128_CTS_CMAC int32 = 25 + CAMELLIA256_CTS_CMAC int32 = 26 + //UNASSIGNED : 27-64 + SUBKEY_KEYMATERIAL int32 = 65 + //UNASSIGNED : 66-2147483647 +) + +// ETypesByName is a map of EncType names to their assigned EncType number. +var ETypesByName = map[string]int32{ + "des-cbc-crc": DES_CBC_CRC, + "des-cbc-md4": DES_CBC_MD4, + "des-cbc-md5": DES_CBC_MD5, + "des-cbc-raw": DES_CBC_RAW, + "des3-cbc-md5": DES3_CBC_MD5, + "des3-cbc-raw": DES3_CBC_RAW, + "des3-cbc-sha1": DES3_CBC_SHA1, + "des3-hmac-sha1": DES_HMAC_SHA1, + "des3-cbc-sha1-kd": DES3_CBC_SHA1_KD, + "des-hmac-sha1": DES_HMAC_SHA1, + "dsaWithSHA1-CmsOID": DSAWITHSHA1_CMSOID, + "md5WithRSAEncryption-CmsOID": MD5WITHRSAENCRYPTION_CMSOID, + "sha1WithRSAEncryption-CmsOID": SHA1WITHRSAENCRYPTION_CMSOID, + "rc2CBC-EnvOID": RC2CBC_ENVOID, + "rsaEncryption-EnvOID": RSAENCRYPTION_ENVOID, + "rsaES-OAEP-ENV-OID": RSAES_OAEP_ENV_OID, + "des-ede3-cbc-Env-OID": DES_EDE3_CBC_ENV_OID, + "aes128-cts-hmac-sha1-96": AES128_CTS_HMAC_SHA1_96, + "aes128-cts": AES128_CTS_HMAC_SHA1_96, + "aes128-sha1": AES128_CTS_HMAC_SHA1_96, + "aes256-cts-hmac-sha1-96": AES256_CTS_HMAC_SHA1_96, + "aes256-cts": AES128_CTS_HMAC_SHA1_96, + "aes256-sha1": AES128_CTS_HMAC_SHA1_96, + "aes128-cts-hmac-sha256-128": AES128_CTS_HMAC_SHA256_128, + "aes128-sha2": AES128_CTS_HMAC_SHA256_128, + "aes256-cts-hmac-sha384-192": AES256_CTS_HMAC_SHA384_192, + "aes256-sha2": AES256_CTS_HMAC_SHA384_192, + "arcfour-hmac": RC4_HMAC, + "rc4-hmac": RC4_HMAC, + "arcfour-hmac-md5": RC4_HMAC, + "arcfour-hmac-exp": RC4_HMAC_EXP, + "rc4-hmac-exp": RC4_HMAC_EXP, + "arcfour-hmac-md5-exp": RC4_HMAC_EXP, + "camellia128-cts-cmac": CAMELLIA128_CTS_CMAC, + "camellia128-cts": CAMELLIA128_CTS_CMAC, + "camellia256-cts-cmac": CAMELLIA256_CTS_CMAC, + "camellia256-cts": CAMELLIA256_CTS_CMAC, + "subkey-keymaterial": SUBKEY_KEYMATERIAL, +} + +// EtypeSupported resolves the etype name string to the etype ID. +// If zero is returned the etype is not supported by gokrb5. +func EtypeSupported(etype string) int32 { + // Slice of supported enctype IDs + s := []int32{ + AES128_CTS_HMAC_SHA1_96, + AES256_CTS_HMAC_SHA1_96, + AES128_CTS_HMAC_SHA256_128, + AES256_CTS_HMAC_SHA384_192, + DES3_CBC_SHA1_KD, + RC4_HMAC, + } + id := ETypesByName[etype] + if id == 0 { + return id + } + for _, sid := range s { + if id == sid { + return id + } + } + return 0 +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/flags/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/flags/constants.go new file mode 100644 index 00000000..67a1fa75 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/flags/constants.go @@ -0,0 +1,30 @@ +// Package flags provides Kerberos 5 flag assigned numbers. +package flags + +// Flag values for KRB5 messages and tickets. +const ( + Reserved = 0 + Forwardable = 1 + Forwarded = 2 + Proxiable = 3 + Proxy = 4 + AllowPostDate = 5 + MayPostDate = 5 + PostDated = 6 + Invalid = 7 + Renewable = 8 + Initial = 9 + PreAuthent = 10 + HWAuthent = 11 + OptHardwareAuth = 11 + RequestAnonymous = 12 + TransitedPolicyChecked = 12 + OKAsDelegate = 13 + EncPARep = 15 + Canonicalize = 15 + DisableTransitedCheck = 26 + RenewableOK = 27 + EncTktInSkey = 28 + Renew = 30 + Validate = 31 +) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/keyusage/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/keyusage/constants.go new file mode 100644 index 00000000..5b232d1d --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/keyusage/constants.go @@ -0,0 +1,42 @@ +// Package keyusage provides Kerberos 5 key usage assigned numbers. +package keyusage + +// Key usage numbers. +const ( + AS_REQ_PA_ENC_TIMESTAMP = 1 + KDC_REP_TICKET = 2 + AS_REP_ENCPART = 3 + TGS_REQ_KDC_REQ_BODY_AUTHDATA_SESSION_KEY = 4 + TGS_REQ_KDC_REQ_BODY_AUTHDATA_SUB_KEY = 5 + TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR_CHKSUM = 6 + TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR = 7 + TGS_REP_ENCPART_SESSION_KEY = 8 + TGS_REP_ENCPART_AUTHENTICATOR_SUB_KEY = 9 + AP_REQ_AUTHENTICATOR_CHKSUM = 10 + AP_REQ_AUTHENTICATOR = 11 + AP_REP_ENCPART = 12 + KRB_PRIV_ENCPART = 13 + KRB_CRED_ENCPART = 14 + KRB_SAFE_CHKSUM = 15 + KERB_NON_KERB_SALT = 16 + KERB_NON_KERB_CKSUM_SALT = 17 + //18. Reserved for future use in Kerberos and related protocols. + AD_KDC_ISSUED_CHKSUM = 19 + //20-21. Reserved for future use in Kerberos and related protocols. + GSSAPI_ACCEPTOR_SEAL = 22 + GSSAPI_ACCEPTOR_SIGN = 23 + GSSAPI_INITIATOR_SEAL = 24 + GSSAPI_INITIATOR_SIGN = 25 + KEY_USAGE_FAST_REQ_CHKSUM = 50 + KEY_USAGE_FAST_ENC = 51 + KEY_USAGE_FAST_REP = 52 + KEY_USAGE_FAST_FINISHED = 53 + KEY_USAGE_ENC_CHALLENGE_CLIENT = 54 + KEY_USAGE_ENC_CHALLENGE_KDC = 55 + KEY_USAGE_AS_REQ = 56 + //26-511. Reserved for future use in Kerberos and related protocols. + //512-1023. Reserved for uses internal to a Kerberos implementation. + //1024. Encryption for application use in protocols that do not specify key usage values + //1025. Checksums for application use in protocols that do not specify key usage values + //1026-2047. Reserved for application use. +) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/msgtype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/msgtype/constants.go new file mode 100644 index 00000000..ad21810b --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/msgtype/constants.go @@ -0,0 +1,18 @@ +// Package msgtype provides Kerberos 5 message type assigned numbers. +package msgtype + +// KRB message type IDs. +const ( + KRB_AS_REQ = 10 //Request for initial authentication + KRB_AS_REP = 11 //Response to KRB_AS_REQ request + KRB_TGS_REQ = 12 //Request for authentication based on TGT + KRB_TGS_REP = 13 //Response to KRB_TGS_REQ request + KRB_AP_REQ = 14 //Application request to server + KRB_AP_REP = 15 //Response to KRB_AP_REQ_MUTUAL + KRB_RESERVED16 = 16 //Reserved for user-to-user krb_tgt_request + KRB_RESERVED17 = 17 //Reserved for user-to-user krb_tgt_reply + KRB_SAFE = 20 // Safe (checksummed) application message + KRB_PRIV = 21 // Private (encrypted) application message + KRB_CRED = 22 //Private (encrypted) message to forward credentials + KRB_ERROR = 30 //Error response +) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/nametype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/nametype/constants.go new file mode 100644 index 00000000..c111a05f --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/nametype/constants.go @@ -0,0 +1,15 @@ +// Package nametype provides Kerberos 5 principal name type numbers. +package nametype + +// Kerberos name type IDs. +const ( + KRB_NT_UNKNOWN int32 = 0 //Name type not known + KRB_NT_PRINCIPAL int32 = 1 //Just the name of the principal as in DCE, or for users + KRB_NT_SRV_INST int32 = 2 //Service and other unique instance (krbtgt) + KRB_NT_SRV_HST int32 = 3 //Service with host name as instance (telnet, rcommands) + KRB_NT_SRV_XHST int32 = 4 //Service with host as remaining components + KRB_NT_UID int32 = 5 //Unique ID + KRB_NT_X500_PRINCIPAL int32 = 6 //Encoded X.509 Distinguished name [RFC2253] + KRB_NT_SMTP_NAME int32 = 7 //Name in form of SMTP email name (e.g., user@example.com) + KRB_NT_ENTERPRISE int32 = 10 //Enterprise name; may be mapped to principal name +) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/patype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/patype/constants.go new file mode 100644 index 00000000..aa04f637 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/patype/constants.go @@ -0,0 +1,77 @@ +// Package patype provides Kerberos 5 pre-authentication type assigned numbers. +package patype + +// Kerberos pre-authentication type assigned numbers. +const ( + PA_TGS_REQ int32 = 1 + PA_ENC_TIMESTAMP int32 = 2 + PA_PW_SALT int32 = 3 + //RESERVED : 4 + PA_ENC_UNIX_TIME int32 = 5 + PA_SANDIA_SECUREID int32 = 6 + PA_SESAME int32 = 7 + PA_OSF_DCE int32 = 8 + PA_CYBERSAFE_SECUREID int32 = 9 + PA_AFS3_SALT int32 = 10 + PA_ETYPE_INFO int32 = 11 + PA_SAM_CHALLENGE int32 = 12 + PA_SAM_RESPONSE int32 = 13 + PA_PK_AS_REQ_OLD int32 = 14 + PA_PK_AS_REP_OLD int32 = 15 + PA_PK_AS_REQ int32 = 16 + PA_PK_AS_REP int32 = 17 + PA_PK_OCSP_RESPONSE int32 = 18 + PA_ETYPE_INFO2 int32 = 19 + PA_USE_SPECIFIED_KVNO int32 = 20 + PA_SVR_REFERRAL_INFO int32 = 20 + PA_SAM_REDIRECT int32 = 21 + PA_GET_FROM_TYPED_DATA int32 = 22 + TD_PADATA int32 = 22 + PA_SAM_ETYPE_INFO int32 = 23 + PA_ALT_PRINC int32 = 24 + PA_SERVER_REFERRAL int32 = 25 + //UNASSIGNED : 26-29 + PA_SAM_CHALLENGE2 int32 = 30 + PA_SAM_RESPONSE2 int32 = 31 + //UNASSIGNED : 32-40 + PA_EXTRA_TGT int32 = 41 + //UNASSIGNED : 42-100 + TD_PKINIT_CMS_CERTIFICATES int32 = 101 + TD_KRB_PRINCIPAL int32 = 102 + TD_KRB_REALM int32 = 103 + TD_TRUSTED_CERTIFIERS int32 = 104 + TD_CERTIFICATE_INDEX int32 = 105 + TD_APP_DEFINED_ERROR int32 = 106 + TD_REQ_NONCE int32 = 107 + TD_REQ_SEQ int32 = 108 + TD_DH_PARAMETERS int32 = 109 + //UNASSIGNED : 110 + TD_CMS_DIGEST_ALGORITHMS int32 = 111 + TD_CERT_DIGEST_ALGORITHMS int32 = 112 + //UNASSIGNED : 113-127 + PA_PAC_REQUEST int32 = 128 + PA_FOR_USER int32 = 129 + PA_FOR_X509_USER int32 = 130 + PA_FOR_CHECK_DUPS int32 = 131 + PA_AS_CHECKSUM int32 = 132 + PA_FX_COOKIE int32 = 133 + PA_AUTHENTICATION_SET int32 = 134 + PA_AUTH_SET_SELECTED int32 = 135 + PA_FX_FAST int32 = 136 + PA_FX_ERROR int32 = 137 + PA_ENCRYPTED_CHALLENGE int32 = 138 + //UNASSIGNED : 139-140 + PA_OTP_CHALLENGE int32 = 141 + PA_OTP_REQUEST int32 = 142 + PA_OTP_CONFIRM int32 = 143 + PA_OTP_PIN_CHANGE int32 = 144 + PA_EPAK_AS_REQ int32 = 145 + PA_EPAK_AS_REP int32 = 146 + PA_PKINIT_KX int32 = 147 + PA_PKU2U_NAME int32 = 148 + PA_REQ_ENC_PA_REP int32 = 149 + PA_AS_FRESHNESS int32 = 150 + //UNASSIGNED : 151-164 + PA_SUPPORTED_ETYPES int32 = 165 + PA_EXTENDED_ERROR int32 = 166 +) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/changepasswddata.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/changepasswddata.go new file mode 100644 index 00000000..f48cb388 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/changepasswddata.go @@ -0,0 +1,23 @@ +package kadmin + +import ( + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// ChangePasswdData is the payload to a password change message. +type ChangePasswdData struct { + NewPasswd []byte `asn1:"explicit,tag:0"` + TargName types.PrincipalName `asn1:"explicit,optional,tag:1"` + TargRealm string `asn1:"generalstring,optional,explicit,tag:2"` +} + +// Marshal ChangePasswdData into a byte slice. +func (c *ChangePasswdData) Marshal() ([]byte, error) { + b, err := asn1.Marshal(*c) + if err != nil { + return []byte{}, err + } + //b = asn1tools.AddASNAppTag(b, asnAppTag.) + return b, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/message.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/message.go new file mode 100644 index 00000000..13104a5d --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/message.go @@ -0,0 +1,114 @@ +package kadmin + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "math" + + "gopkg.in/jcmturner/gokrb5.v5/messages" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +const ( + verisonHex = "ff80" +) + +// Request message for changing password. +type Request struct { + APREQ messages.APReq + KRBPriv messages.KRBPriv +} + +// Reply message for a password change. +type Reply struct { + MessageLength int + Version int + APREPLength int + APREP messages.APRep + KRBPriv messages.KRBPriv + KRBError messages.KRBError + IsKRBError bool + ResultCode uint16 + Result string +} + +// Marshal a Request into a byte slice. +func (m *Request) Marshal() (b []byte, err error) { + b = []byte{255, 128} // protocol version number: contains the hex constant 0xff80 (big-endian integer). + ab, e := m.APREQ.Marshal() + if e != nil { + err = fmt.Errorf("error marshaling AP_REQ: %v", e) + return + } + if len(ab) > math.MaxUint16 { + err = errors.New("length of AP_REQ greater then max Uint16 size") + return + } + al := make([]byte, 2) + binary.BigEndian.PutUint16(al, uint16(len(ab))) + b = append(b, al...) + b = append(b, ab...) + pb, e := m.KRBPriv.Marshal() + if e != nil { + err = fmt.Errorf("error marshaling KRB_Priv: %v", e) + return + } + b = append(b, pb...) + if len(b)+2 > math.MaxUint16 { + err = errors.New("length of message greater then max Uint16 size") + return + } + ml := make([]byte, 2) + binary.BigEndian.PutUint16(ml, uint16(len(b)+2)) + b = append(ml, b...) + return +} + +// Unmarshal a byte slice into a Reply. +func (m *Reply) Unmarshal(b []byte) error { + m.MessageLength = int(binary.BigEndian.Uint16(b[0:2])) + m.Version = int(binary.BigEndian.Uint16(b[2:4])) + if m.Version != 1 { + return fmt.Errorf("kadmin reply has incorrect protocol version number: %d", m.Version) + } + m.APREPLength = int(binary.BigEndian.Uint16(b[4:6])) + if m.APREPLength != 0 { + err := m.APREP.Unmarshal(b[6 : 6+m.APREPLength]) + if err != nil { + return err + } + err = m.KRBPriv.Unmarshal(b[6+m.APREPLength : m.MessageLength]) + if err != nil { + return err + } + } else { + m.IsKRBError = true + m.KRBError.Unmarshal(b[6:m.MessageLength]) + m.ResultCode, m.Result = parseResponse(m.KRBError.EData) + } + return nil +} + +func parseResponse(b []byte) (c uint16, s string) { + c = binary.BigEndian.Uint16(b[0:2]) + buf := bytes.NewBuffer(b[2:]) + m := make([]byte, len(b)-2) + binary.Read(buf, binary.BigEndian, &m) + s = string(m) + return +} + +// Decrypt the encrypted part of the KRBError within the change password Reply. +func (m *Reply) Decrypt(key types.EncryptionKey) error { + if m.IsKRBError { + return m.KRBError + } + err := m.KRBPriv.DecryptEncPart(key) + if err != nil { + return err + } + m.ResultCode, m.Result = parseResponse(m.KRBPriv.DecryptedEncPart.UserData) + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/passwd.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/passwd.go new file mode 100644 index 00000000..1b03fd1a --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/passwd.go @@ -0,0 +1,68 @@ +// Package kadmin provides Kerberos administration capabilities. +package kadmin + +import ( + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/messages" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// ChangePasswdMsg generate a change password request and also return the key needed to decrypt the reply. +func ChangePasswdMsg(cname types.PrincipalName, realm, password string, tkt messages.Ticket, sessionKey types.EncryptionKey) (r Request, k types.EncryptionKey, err error) { + // Create change password data struct and marshal to bytes + chgpasswd := ChangePasswdData{ + NewPasswd: []byte(password), + TargName: cname, + TargRealm: realm, + } + chpwdb, err := chgpasswd.Marshal() + if err != nil { + err = krberror.Errorf(err, krberror.KRBMsgError, "error marshaling change passwd data") + return + } + + // Generate authenticator + auth, err := types.NewAuthenticator(realm, cname) + if err != nil { + err = krberror.Errorf(err, krberror.KRBMsgError, "error generating new authenticator") + return + } + etype, err := crypto.GetEtype(sessionKey.KeyType) + if err != nil { + err = krberror.Errorf(err, krberror.KRBMsgError, "error generating subkey etype") + return + } + err = auth.GenerateSeqNumberAndSubKey(etype.GetETypeID(), etype.GetKeyByteSize()) + if err != nil { + err = krberror.Errorf(err, krberror.KRBMsgError, "error generating subkey") + return + } + k = auth.SubKey + + // Generate AP_REQ + APreq, err := messages.NewAPReq(tkt, sessionKey, auth) + if err != nil { + return + } + + // Form the KRBPriv encpart data + kp := messages.EncKrbPrivPart{ + UserData: chpwdb, + Timestamp: auth.CTime, + Usec: auth.Cusec, + SequenceNumber: auth.SeqNumber, + } + kpriv := messages.NewKRBPriv(kp) + err = kpriv.EncryptEncPart(k) + if err != nil { + err = krberror.Errorf(err, krberror.EncryptingError, "error encrypting change passwd data") + return + } + + r = Request{ + APREQ: APreq, + KRBPriv: kpriv, + } + return +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/keytab/keytab.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/keytab/keytab.go new file mode 100644 index 00000000..c4664588 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/keytab/keytab.go @@ -0,0 +1,369 @@ +// Package keytab implements Kerberos keytabs: https://web.mit.edu/kerberos/krb5-devel/doc/formats/keytab_file_format.html. +package keytab + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "io/ioutil" + "time" + "unsafe" + + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +const ( + keytabFirstByte byte = 05 +) + +// Keytab struct. +type Keytab struct { + Version uint8 + Entries []entry +} + +// Keytab entry struct. +type entry struct { + Principal principal + Timestamp time.Time + KVNO8 uint8 + Key types.EncryptionKey + KVNO uint32 +} + +// Keytab entry principal struct. +type principal struct { + NumComponents int16 + Realm string + Components []string + NameType int32 +} + +// NewKeytab creates new, empty Keytab type. +func NewKeytab() Keytab { + var e []entry + return Keytab{ + Version: 0, + Entries: e, + } +} + +// GetEncryptionKey returns the EncryptionKey from the Keytab for the newest entry with the required kvno, etype and matching principal. +func (kt *Keytab) GetEncryptionKey(nameString []string, realm string, kvno int, etype int32) (types.EncryptionKey, error) { + var key types.EncryptionKey + var t time.Time + for _, k := range kt.Entries { + if k.Principal.Realm == realm && len(k.Principal.Components) == len(nameString) && + k.Key.KeyType == etype && + (k.KVNO == uint32(kvno) || kvno == 0) && + k.Timestamp.After(t) { + + p := true + for i, n := range k.Principal.Components { + if nameString[i] != n { + p = false + break + } + } + if p { + key = k.Key + t = k.Timestamp + } + } + } + if len(key.KeyValue) < 1 { + return key, fmt.Errorf("matching key not found in keytab. Looking for %v realm: %v kvno: %v etype: %v", nameString, realm, kvno, etype) + } + return key, nil +} + +// Create a new Keytab entry. +func newKeytabEntry() entry { + var b []byte + return entry{ + Principal: newPrincipal(), + Timestamp: time.Time{}, + KVNO8: 0, + Key: types.EncryptionKey{ + KeyType: 0, + KeyValue: b, + }, + KVNO: 0, + } +} + +// Create a new principal. +func newPrincipal() principal { + var c []string + return principal{ + NumComponents: 0, + Realm: "", + Components: c, + NameType: 0, + } +} + +// Load a Keytab file into a Keytab type. +func Load(ktPath string) (kt Keytab, err error) { + k, err := ioutil.ReadFile(ktPath) + if err != nil { + return + } + return Parse(k) +} + +// Marshal keytab into byte slice +func (kt Keytab) Marshal() ([]byte, error) { + b := []byte{keytabFirstByte, kt.Version} + for _, e := range kt.Entries { + eb, err := e.marshal(int(kt.Version)) + if err != nil { + return b, err + } + b = append(b, eb...) + } + return b, nil +} + +// Write the keytab bytes to io.Writer. +// Returns the number of bytes written +func (kt Keytab) Write(w io.Writer) (int, error) { + b, err := kt.Marshal() + if err != nil { + return 0, fmt.Errorf("error marshaling keytab: %v", err) + } + return w.Write(b) +} + +// Parse byte slice of Keytab data into Keytab type. +func Parse(b []byte) (kt Keytab, err error) { + //The first byte of the file always has the value 5 + if b[0] != keytabFirstByte { + err = errors.New("invalid keytab data. First byte does not equal 5") + return + } + //Get keytab version + //The 2nd byte contains the version number (1 or 2) + kt.Version = uint8(b[1]) + if kt.Version != 1 && kt.Version != 2 { + err = errors.New("invalid keytab data. Keytab version is neither 1 nor 2") + return + } + //Version 1 of the file format uses native byte order for integer representations. Version 2 always uses big-endian byte order + var endian binary.ByteOrder + endian = binary.BigEndian + if kt.Version == 1 && isNativeEndianLittle() { + endian = binary.LittleEndian + } + /* + After the two-byte version indicator, the file contains a sequence of signed 32-bit record lengths followed by key records or holes. + A positive record length indicates a valid key entry whose size is equal to or less than the record length. + A negative length indicates a zero-filled hole whose size is the inverse of the length. + A length of 0 indicates the end of the file. + */ + // n tracks position in the byte array + n := 2 + l := readInt32(b, &n, &endian) + for l != 0 { + if l < 0 { + //Zero padded so skip over + l = l * -1 + n = n + int(l) + } else { + //fmt.Printf("Bytes for entry: %v\n", b[n:n+int(l)]) + eb := b[n : n+int(l)] + n = n + int(l) + ke := newKeytabEntry() + // p keeps track as to where we are in the byte stream + var p int + parsePrincipal(eb, &p, &kt, &ke, &endian) + ke.Timestamp = readTimestamp(eb, &p, &endian) + ke.KVNO8 = uint8(readInt8(eb, &p, &endian)) + ke.Key.KeyType = int32(readInt16(eb, &p, &endian)) + kl := int(readInt16(eb, &p, &endian)) + ke.Key.KeyValue = readBytes(eb, &p, kl, &endian) + //The 32-bit key version overrides the 8-bit key version. + // To determine if it is present, the implementation must check that at least 4 bytes remain in the record after the other fields are read, + // and that the value of the 32-bit integer contained in those bytes is non-zero. + if len(eb)-p >= 4 { + // The 32-bit key may be present + ke.KVNO = uint32(readInt32(eb, &p, &endian)) + } + if ke.KVNO == 0 { + // Handles if the value from the last 4 bytes was zero and also if there are not the 4 bytes present. Makes sense to put the same value here as KVNO8 + ke.KVNO = uint32(ke.KVNO8) + } + // Add the entry to the keytab + kt.Entries = append(kt.Entries, ke) + } + // Check if there are still 4 bytes left to read + if n > len(b) || len(b[n:]) < 4 { + break + } + // Read the size of the next entry + l = readInt32(b, &n, &endian) + } + return +} + +func (e entry) marshal(v int) ([]byte, error) { + var b []byte + pb, err := e.Principal.marshal(v) + if err != nil { + return b, err + } + b = append(b, pb...) + + var endian binary.ByteOrder + endian = binary.BigEndian + if v == 1 && isNativeEndianLittle() { + endian = binary.LittleEndian + } + + t := make([]byte, 9) + endian.PutUint32(t[0:4], uint32(e.Timestamp.Unix())) + t[4] = byte(e.KVNO8) + endian.PutUint16(t[5:7], uint16(e.Key.KeyType)) + endian.PutUint16(t[7:9], uint16(len(e.Key.KeyValue))) + b = append(b, t...) + + buf := new(bytes.Buffer) + err = binary.Write(buf, endian, e.Key.KeyValue) + if err != nil { + return b, err + } + b = append(b, buf.Bytes()...) + + t = make([]byte, 4) + endian.PutUint32(t, e.KVNO) + b = append(b, t...) + + // Add the length header + t = make([]byte, 4) + endian.PutUint32(t, uint32(len(b))) + b = append(t, b...) + return b, nil +} + +// Parse the Keytab bytes of a principal into a Keytab entry's principal. +func parsePrincipal(b []byte, p *int, kt *Keytab, ke *entry, e *binary.ByteOrder) error { + ke.Principal.NumComponents = readInt16(b, p, e) + if kt.Version == 1 { + //In version 1 the number of components includes the realm. Minus 1 to make consistent with version 2 + ke.Principal.NumComponents-- + } + lenRealm := readInt16(b, p, e) + ke.Principal.Realm = string(readBytes(b, p, int(lenRealm), e)) + for i := 0; i < int(ke.Principal.NumComponents); i++ { + l := readInt16(b, p, e) + ke.Principal.Components = append(ke.Principal.Components, string(readBytes(b, p, int(l), e))) + } + if kt.Version != 1 { + //Name Type is omitted in version 1 + ke.Principal.NameType = readInt32(b, p, e) + } + return nil +} + +func (p principal) marshal(v int) ([]byte, error) { + //var b []byte + b := make([]byte, 2) + var endian binary.ByteOrder + endian = binary.BigEndian + if v == 1 && isNativeEndianLittle() { + endian = binary.LittleEndian + } + endian.PutUint16(b[0:], uint16(p.NumComponents)) + realm, err := marshalString(p.Realm, v) + if err != nil { + return b, err + } + b = append(b, realm...) + for _, c := range p.Components { + cb, err := marshalString(c, v) + if err != nil { + return b, err + } + b = append(b, cb...) + } + if v != 1 { + t := make([]byte, 4) + endian.PutUint32(t, uint32(p.NameType)) + b = append(b, t...) + } + return b, nil +} + +func marshalString(s string, v int) ([]byte, error) { + sb := []byte(s) + b := make([]byte, 2) + var endian binary.ByteOrder + endian = binary.BigEndian + if v == 1 && isNativeEndianLittle() { + endian = binary.LittleEndian + } + endian.PutUint16(b[0:], uint16(len(sb))) + buf := new(bytes.Buffer) + err := binary.Write(buf, endian, sb) + if err != nil { + return b, err + } + b = append(b, buf.Bytes()...) + return b, err +} + +// Read bytes representing a timestamp. +func readTimestamp(b []byte, p *int, e *binary.ByteOrder) time.Time { + return time.Unix(int64(readInt32(b, p, e)), 0) +} + +// Read bytes representing an eight bit integer. +func readInt8(b []byte, p *int, e *binary.ByteOrder) (i int8) { + buf := bytes.NewBuffer(b[*p : *p+1]) + binary.Read(buf, *e, &i) + *p++ + return +} + +// Read bytes representing a sixteen bit integer. +func readInt16(b []byte, p *int, e *binary.ByteOrder) (i int16) { + buf := bytes.NewBuffer(b[*p : *p+2]) + binary.Read(buf, *e, &i) + *p += 2 + return +} + +// Read bytes representing a thirty two bit integer. +func readInt32(b []byte, p *int, e *binary.ByteOrder) (i int32) { + buf := bytes.NewBuffer(b[*p : *p+4]) + binary.Read(buf, *e, &i) + *p += 4 + return +} + +func readBytes(b []byte, p *int, s int, e *binary.ByteOrder) []byte { + buf := bytes.NewBuffer(b[*p : *p+s]) + r := make([]byte, s) + binary.Read(buf, *e, &r) + *p += s + return r +} + +func isNativeEndianLittle() bool { + var x = 0x012345678 + var p = unsafe.Pointer(&x) + var bp = (*[4]byte)(p) + + var endian bool + if 0x01 == bp[0] { + endian = false + } else if (0x78 & 0xff) == (bp[0] & 0xff) { + endian = true + } else { + // Default to big endian + endian = false + } + return endian +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/krberror/error.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/krberror/error.go new file mode 100644 index 00000000..f2334d25 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/krberror/error.go @@ -0,0 +1,73 @@ +// Package krberror provides error type and functions for gokrb5. +package krberror + +import ( + "fmt" + "strings" +) + +// Error type descriptions. +const ( + separator = " < " + EncodingError = "Encoding_Error" + NetworkingError = "Networking_Error" + DecryptingError = "Decrypting_Error" + EncryptingError = "Encrypting_Error" + ChksumError = "Checksum_Error" + KRBMsgError = "KRBMessage_Handling_Error" + ConfigError = "Configuration_Error" +) + +// Krberror is an error type for gokrb5 +type Krberror struct { + RootCause string + EText []string +} + +// Error function to implement the error interface. +func (e Krberror) Error() string { + return fmt.Sprintf("[Root cause: %s] ", e.RootCause) + strings.Join(e.EText, separator) +} + +// Add another error statement to the error. +func (e *Krberror) Add(et string, s string) { + e.EText = append([]string{fmt.Sprintf("%s: %s", et, s)}, e.EText...) +} + +// NewKrberror creates a new instance of Krberror. +func NewKrberror(et, s string) Krberror { + return Krberror{ + RootCause: et, + EText: []string{s}, + } +} + +// Errorf appends to or creates a new Krberror. +func Errorf(err error, et, format string, a ...interface{}) Krberror { + if e, ok := err.(Krberror); ok { + if len(a) > 0 { + e.EText = append([]string{fmt.Sprintf("%s: "+format, et, a)}, e.EText...) + return e + } + e.EText = append([]string{fmt.Sprintf("%s: "+format, et)}, e.EText...) + return e + } + if len(a) > 0 { + return NewErrorf(et, format+": %s", a, err) + } + return NewErrorf(et, format+": %s", err) +} + +// NewErrorf creates a new Krberror from a formatted string. +func NewErrorf(et, format string, a ...interface{}) Krberror { + var s string + if len(a) > 0 { + s = fmt.Sprintf("%s: %s", et, fmt.Sprintf(format, a...)) + } else { + s = fmt.Sprintf("%s: %s", et, format) + } + return Krberror{ + RootCause: et, + EText: []string{s}, + } +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APRep.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APRep.go new file mode 100644 index 00000000..a67a9f1c --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APRep.go @@ -0,0 +1,64 @@ +package messages + +import ( + "fmt" + "time" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" + "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +/* +AP-REP ::= [APPLICATION 15] SEQUENCE { +pvno [0] INTEGER (5), +msg-type [1] INTEGER (15), +enc-part [2] EncryptedData -- EncAPRepPart +} + +EncAPRepPart ::= [APPLICATION 27] SEQUENCE { + ctime [0] KerberosTime, + cusec [1] Microseconds, + subkey [2] EncryptionKey OPTIONAL, + seq-number [3] UInt32 OPTIONAL +} +*/ + +// APRep implements RFC 4120 KRB_AP_REP: https://tools.ietf.org/html/rfc4120#section-5.5.2. +type APRep struct { + PVNO int `asn1:"explicit,tag:0"` + MsgType int `asn1:"explicit,tag:1"` + EncPart types.EncryptedData `asn1:"explicit,tag:2"` +} + +// EncAPRepPart is the encrypted part of KRB_AP_REP. +type EncAPRepPart struct { + CTime time.Time `asn1:"generalized,explicit,tag:0"` + Cusec int `asn1:"explicit,tag:1"` + Subkey types.EncryptionKey `asn1:"optional,explicit,tag:2"` + SequenceNumber int64 `asn1:"optional,explicit,tag:3"` +} + +// Unmarshal bytes b into the APRep struct. +func (a *APRep) Unmarshal(b []byte) error { + _, err := asn1.UnmarshalWithParams(b, a, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.APREP)) + if err != nil { + return processUnmarshalReplyError(b, err) + } + expectedMsgType := msgtype.KRB_AP_REP + if a.MsgType != expectedMsgType { + return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a KRB_AP_REP. Expected: %v; Actual: %v", expectedMsgType, a.MsgType) + } + return nil +} + +// Unmarshal bytes b into the APRep encrypted part struct. +func (a *EncAPRepPart) Unmarshal(b []byte) error { + _, err := asn1.UnmarshalWithParams(b, a, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.EncAPRepPart)) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "AP_REP unmarshal error") + } + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APReq.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APReq.go new file mode 100644 index 00000000..ff0be67f --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APReq.go @@ -0,0 +1,157 @@ +package messages + +import ( + "fmt" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/asn1tools" + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/iana" + "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" + "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" + "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" + "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +/*AP-REQ ::= [APPLICATION 14] SEQUENCE { +pvno [0] INTEGER (5), +msg-type [1] INTEGER (14), +ap-options [2] APOptions, +ticket [3] Ticket, +authenticator [4] EncryptedData -- Authenticator +} + +APOptions ::= KerberosFlags +-- reserved(0), +-- use-session-key(1), +-- mutual-required(2)*/ + +type marshalAPReq struct { + PVNO int `asn1:"explicit,tag:0"` + MsgType int `asn1:"explicit,tag:1"` + APOptions asn1.BitString `asn1:"explicit,tag:2"` + // Ticket needs to be a raw value as it is wrapped in an APPLICATION tag + Ticket asn1.RawValue `asn1:"explicit,tag:3"` + Authenticator types.EncryptedData `asn1:"explicit,tag:4"` +} + +// APReq implements RFC 4120 KRB_AP_REQ: https://tools.ietf.org/html/rfc4120#section-5.5.1. +type APReq struct { + PVNO int `asn1:"explicit,tag:0"` + MsgType int `asn1:"explicit,tag:1"` + APOptions asn1.BitString `asn1:"explicit,tag:2"` + Ticket Ticket `asn1:"explicit,tag:3"` + Authenticator types.EncryptedData `asn1:"explicit,tag:4"` +} + +// NewAPReq generates a new KRB_AP_REQ struct. +func NewAPReq(tkt Ticket, sessionKey types.EncryptionKey, auth types.Authenticator) (APReq, error) { + var a APReq + ed, err := encryptAuthenticator(auth, sessionKey, tkt) + if err != nil { + return a, krberror.Errorf(err, krberror.KRBMsgError, "Error creating Authenticator for AP_REQ") + } + a = APReq{ + PVNO: iana.PVNO, + MsgType: msgtype.KRB_AP_REQ, + APOptions: types.NewKrbFlags(), + Ticket: tkt, + Authenticator: ed, + } + return a, nil +} + +// Encrypt Authenticator +func encryptAuthenticator(a types.Authenticator, sessionKey types.EncryptionKey, tkt Ticket) (types.EncryptedData, error) { + var ed types.EncryptedData + m, err := a.Marshal() + if err != nil { + return ed, krberror.Errorf(err, krberror.EncodingError, "Marshaling error of EncryptedData form of Authenticator") + } + usage := authenticatorKeyUsage(tkt.SName.NameType) + ed, err = crypto.GetEncryptedData(m, sessionKey, uint32(usage), tkt.EncPart.KVNO) + if err != nil { + return ed, krberror.Errorf(err, krberror.EncryptingError, "Error encrypting Authenticator") + } + return ed, nil +} + +// DecryptAuthenticator decrypts the Authenticator within the AP_REQ. +// sessionKey may simply be the key within the decrypted EncPart of the ticket within the AP_REQ. +func (a *APReq) DecryptAuthenticator(sessionKey types.EncryptionKey) (auth types.Authenticator, err error) { + usage := authenticatorKeyUsage(a.Ticket.SName.NameType) + ab, e := crypto.DecryptEncPart(a.Authenticator, sessionKey, uint32(usage)) + if e != nil { + err = fmt.Errorf("error decrypting authenticator: %v", e) + return + } + e = auth.Unmarshal(ab) + if e != nil { + err = fmt.Errorf("error unmarshaling authenticator") + return + } + return +} + +func authenticatorKeyUsage(nt int32) int { + switch nt { + case nametype.KRB_NT_PRINCIPAL: + return keyusage.AP_REQ_AUTHENTICATOR + case nametype.KRB_NT_SRV_HST: + return keyusage.AP_REQ_AUTHENTICATOR + case nametype.KRB_NT_SRV_INST: + return keyusage.TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR + default: + return keyusage.AP_REQ_AUTHENTICATOR + } +} + +// Unmarshal bytes b into the APReq struct. +func (a *APReq) Unmarshal(b []byte) error { + var m marshalAPReq + _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.APREQ)) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Unmarshal error of AP_REQ") + } + if m.MsgType != msgtype.KRB_AP_REQ { + return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate an AP_REQ. Expected: %v; Actual: %v", msgtype.KRB_AP_REQ, m.MsgType) + } + a.PVNO = m.PVNO + a.MsgType = m.MsgType + a.APOptions = m.APOptions + a.Authenticator = m.Authenticator + a.Ticket, err = UnmarshalTicket(m.Ticket.Bytes) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Unmarshaling error of Ticket within AP_REQ") + } + return nil +} + +// Marshal APReq struct. +func (a *APReq) Marshal() ([]byte, error) { + m := marshalAPReq{ + PVNO: a.PVNO, + MsgType: a.MsgType, + APOptions: a.APOptions, + Authenticator: a.Authenticator, + } + var b []byte + b, err := a.Ticket.Marshal() + if err != nil { + return b, err + } + m.Ticket = asn1.RawValue{ + Class: asn1.ClassContextSpecific, + IsCompound: true, + Tag: 3, + Bytes: b, + } + mk, err := asn1.Marshal(m) + if err != nil { + return mk, krberror.Errorf(err, krberror.EncodingError, "Marshaling error of AP_REQ") + } + mk = asn1tools.AddASNAppTag(mk, asnAppTag.APREQ) + return mk, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCRep.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCRep.go new file mode 100644 index 00000000..8874f9fd --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCRep.go @@ -0,0 +1,312 @@ +package messages + +// Reference: https://www.ietf.org/rfc/rfc4120.txt +// Section: 5.4.2 + +import ( + "fmt" + "time" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/config" + "gopkg.in/jcmturner/gokrb5.v5/credentials" + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" + "gopkg.in/jcmturner/gokrb5.v5/iana/flags" + "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" + "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" + "gopkg.in/jcmturner/gokrb5.v5/iana/patype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +type marshalKDCRep struct { + PVNO int `asn1:"explicit,tag:0"` + MsgType int `asn1:"explicit,tag:1"` + PAData types.PADataSequence `asn1:"explicit,optional,tag:2"` + CRealm string `asn1:"generalstring,explicit,tag:3"` + CName types.PrincipalName `asn1:"explicit,tag:4"` + // Ticket needs to be a raw value as it is wrapped in an APPLICATION tag + Ticket asn1.RawValue `asn1:"explicit,tag:5"` + EncPart types.EncryptedData `asn1:"explicit,tag:6"` +} + +// KDCRepFields represents the KRB_KDC_REP fields. +type KDCRepFields struct { + PVNO int + MsgType int + PAData []types.PAData + CRealm string + CName types.PrincipalName + Ticket Ticket + EncPart types.EncryptedData + DecryptedEncPart EncKDCRepPart +} + +// ASRep implements RFC 4120 KRB_AS_REP: https://tools.ietf.org/html/rfc4120#section-5.4.2. +type ASRep struct { + KDCRepFields +} + +// TGSRep implements RFC 4120 KRB_TGS_REP: https://tools.ietf.org/html/rfc4120#section-5.4.2. +type TGSRep struct { + KDCRepFields +} + +// EncKDCRepPart is the encrypted part of KRB_KDC_REP. +type EncKDCRepPart struct { + Key types.EncryptionKey `asn1:"explicit,tag:0"` + LastReqs []LastReq `asn1:"explicit,tag:1"` + Nonce int `asn1:"explicit,tag:2"` + KeyExpiration time.Time `asn1:"generalized,explicit,optional,tag:3"` + Flags asn1.BitString `asn1:"explicit,tag:4"` + AuthTime time.Time `asn1:"generalized,explicit,tag:5"` + StartTime time.Time `asn1:"generalized,explicit,optional,tag:6"` + EndTime time.Time `asn1:"generalized,explicit,tag:7"` + RenewTill time.Time `asn1:"generalized,explicit,optional,tag:8"` + SRealm string `asn1:"generalstring,explicit,tag:9"` + SName types.PrincipalName `asn1:"explicit,tag:10"` + CAddr []types.HostAddress `asn1:"explicit,optional,tag:11"` + EncPAData types.PADataSequence `asn1:"explicit,optional,tag:12"` +} + +// LastReq part of KRB_KDC_REP. +type LastReq struct { + LRType int32 `asn1:"explicit,tag:0"` + LRValue time.Time `asn1:"generalized,explicit,tag:1"` +} + +// Unmarshal bytes b into the ASRep struct. +func (k *ASRep) Unmarshal(b []byte) error { + var m marshalKDCRep + _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.ASREP)) + if err != nil { + return processUnmarshalReplyError(b, err) + } + if m.MsgType != msgtype.KRB_AS_REP { + return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate an AS_REP. Expected: %v; Actual: %v", msgtype.KRB_AS_REP, m.MsgType) + } + //Process the raw ticket within + tkt, err := UnmarshalTicket(m.Ticket.Bytes) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling Ticket within AS_REP") + } + k.KDCRepFields = KDCRepFields{ + PVNO: m.PVNO, + MsgType: m.MsgType, + PAData: m.PAData, + CRealm: m.CRealm, + CName: m.CName, + Ticket: tkt, + EncPart: m.EncPart, + } + return nil +} + +// Unmarshal bytes b into the TGSRep struct. +func (k *TGSRep) Unmarshal(b []byte) error { + var m marshalKDCRep + _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.TGSREP)) + if err != nil { + return processUnmarshalReplyError(b, err) + } + if m.MsgType != msgtype.KRB_TGS_REP { + return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate an TGS_REP. Expected: %v; Actual: %v", msgtype.KRB_TGS_REP, m.MsgType) + } + //Process the raw ticket within + tkt, err := UnmarshalTicket(m.Ticket.Bytes) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling Ticket within TGS_REP") + } + k.KDCRepFields = KDCRepFields{ + PVNO: m.PVNO, + MsgType: m.MsgType, + PAData: m.PAData, + CRealm: m.CRealm, + CName: m.CName, + Ticket: tkt, + EncPart: m.EncPart, + } + return nil +} + +// Unmarshal bytes b into encrypted part of KRB_KDC_REP. +func (e *EncKDCRepPart) Unmarshal(b []byte) error { + _, err := asn1.UnmarshalWithParams(b, e, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.EncASRepPart)) + if err != nil { + // Try using tag 26 + /* Ref: RFC 4120 + Compatibility note: Some implementations unconditionally send an + encrypted EncTGSRepPart (application tag number 26) in this field + regardless of whether the reply is a AS-REP or a TGS-REP. In the + interest of compatibility, implementors MAY relax the check on the + tag number of the decrypted ENC-PART.*/ + _, err = asn1.UnmarshalWithParams(b, e, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.EncTGSRepPart)) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling encrypted part within KDC_REP") + } + } + return nil +} + +// DecryptEncPart decrypts the encrypted part of an AS_REP. +func (k *ASRep) DecryptEncPart(c *credentials.Credentials) (types.EncryptionKey, error) { + var key types.EncryptionKey + var err error + if c.HasKeytab() { + key, err = c.Keytab.GetEncryptionKey(k.CName.NameString, k.CRealm, k.EncPart.KVNO, k.EncPart.EType) + if err != nil { + return key, krberror.Errorf(err, krberror.DecryptingError, "Error decrypting AS_REP encrypted part") + } + } + if c.HasPassword() { + key, _, err = crypto.GetKeyFromPassword(c.Password, k.CName, k.CRealm, k.EncPart.EType, k.PAData) + if err != nil { + return key, krberror.Errorf(err, krberror.DecryptingError, "Error decrypting AS_REP encrypted part") + } + } + if !c.HasKeytab() && !c.HasPassword() { + return key, krberror.NewErrorf(krberror.DecryptingError, "No secret available in credentials to preform decryption of AS_REP encrypted part") + } + b, err := crypto.DecryptEncPart(k.EncPart, key, keyusage.AS_REP_ENCPART) + if err != nil { + return key, krberror.Errorf(err, krberror.DecryptingError, "Error decrypting AS_REP encrypted part") + } + var denc EncKDCRepPart + err = denc.Unmarshal(b) + if err != nil { + return key, krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling decrypted encpart of AS_REP") + } + k.DecryptedEncPart = denc + return key, nil +} + +// IsValid checks the validity of AS_REP message. +func (k *ASRep) IsValid(cfg *config.Config, creds *credentials.Credentials, asReq ASReq) (bool, error) { + //Ref RFC 4120 Section 3.1.5 + if k.CName.NameType != asReq.ReqBody.CName.NameType || k.CName.NameString == nil { + return false, krberror.NewErrorf(krberror.KRBMsgError, "CName in response does not match what was requested. Requested: %+v; Reply: %+v", asReq.ReqBody.CName, k.CName) + } + for i := range k.CName.NameString { + if k.CName.NameString[i] != asReq.ReqBody.CName.NameString[i] { + return false, krberror.NewErrorf(krberror.KRBMsgError, "CName in response does not match what was requested. Requested: %+v; Reply: %+v", asReq.ReqBody.CName, k.CName) + } + } + if k.CRealm != asReq.ReqBody.Realm { + return false, krberror.NewErrorf(krberror.KRBMsgError, "CRealm in response does not match what was requested. Requested: %s; Reply: %s", asReq.ReqBody.Realm, k.CRealm) + } + key, err := k.DecryptEncPart(creds) + if err != nil { + return false, krberror.Errorf(err, krberror.DecryptingError, "Error decrypting EncPart of AS_REP") + } + if k.DecryptedEncPart.Nonce != asReq.ReqBody.Nonce { + return false, krberror.NewErrorf(krberror.KRBMsgError, "Possible replay attack, nonce in response does not match that in request") + } + if k.DecryptedEncPart.SName.NameType != asReq.ReqBody.SName.NameType || k.DecryptedEncPart.SName.NameString == nil { + return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response does not match what was requested. Requested: %v; Reply: %v", asReq.ReqBody.SName, k.DecryptedEncPart.SName) + } + for i := range k.CName.NameString { + if k.DecryptedEncPart.SName.NameString[i] != asReq.ReqBody.SName.NameString[i] { + return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response does not match what was requested. Requested: %+v; Reply: %+v", asReq.ReqBody.SName, k.DecryptedEncPart.SName) + } + } + if k.DecryptedEncPart.SRealm != asReq.ReqBody.Realm { + return false, krberror.NewErrorf(krberror.KRBMsgError, "SRealm in response does not match what was requested. Requested: %s; Reply: %s", asReq.ReqBody.Realm, k.DecryptedEncPart.SRealm) + } + if len(asReq.ReqBody.Addresses) > 0 { + if !types.HostAddressesEqual(k.DecryptedEncPart.CAddr, asReq.ReqBody.Addresses) { + return false, krberror.NewErrorf(krberror.KRBMsgError, "Addresses listed in the AS_REP does not match those listed in the AS_REQ") + } + } + t := time.Now().UTC() + if t.Sub(k.DecryptedEncPart.AuthTime) > cfg.LibDefaults.Clockskew || k.DecryptedEncPart.AuthTime.Sub(t) > cfg.LibDefaults.Clockskew { + return false, krberror.NewErrorf(krberror.KRBMsgError, "Clock skew with KDC too large. Greater than %v seconds", cfg.LibDefaults.Clockskew.Seconds()) + } + // RFC 6806 https://tools.ietf.org/html/rfc6806.html#section-11 + if asReq.PAData.Contains(patype.PA_REQ_ENC_PA_REP) && types.IsFlagSet(&k.DecryptedEncPart.Flags, flags.EncPARep) { + if len(k.DecryptedEncPart.EncPAData) < 2 || !k.DecryptedEncPart.EncPAData.Contains(patype.PA_FX_FAST) { + return false, krberror.NewErrorf(krberror.KRBMsgError, "KDC did not respond appropriately to FAST negotiation") + } + for _, pa := range k.DecryptedEncPart.EncPAData { + if pa.PADataType == patype.PA_REQ_ENC_PA_REP { + var pafast types.PAReqEncPARep + err := pafast.Unmarshal(pa.PADataValue) + if err != nil { + return false, krberror.Errorf(err, krberror.EncodingError, "KDC FAST negotiation response error, could not unmarshal PA_REQ_ENC_PA_REP") + } + etype, err := crypto.GetChksumEtype(pafast.ChksumType) + if err != nil { + return false, krberror.Errorf(err, krberror.ChksumError, "KDC FAST negotiation response error") + } + ab, _ := asReq.Marshal() + if !etype.VerifyChecksum(key.KeyValue, ab, pafast.Chksum, keyusage.KEY_USAGE_AS_REQ) { + return false, krberror.Errorf(err, krberror.ChksumError, "KDC FAST negotiation response checksum invalid") + } + } + } + } + return true, nil +} + +// DecryptEncPart decrypts the encrypted part of an TGS_REP. +func (k *TGSRep) DecryptEncPart(key types.EncryptionKey) error { + b, err := crypto.DecryptEncPart(k.EncPart, key, keyusage.TGS_REP_ENCPART_SESSION_KEY) + if err != nil { + return krberror.Errorf(err, krberror.DecryptingError, "Error decrypting TGS_REP EncPart") + } + var denc EncKDCRepPart + err = denc.Unmarshal(b) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling encrypted part") + } + k.DecryptedEncPart = denc + return nil +} + +// IsValid checks the validity of the TGS_REP message. +func (k *TGSRep) IsValid(cfg *config.Config, tgsReq TGSReq) (bool, error) { + if k.CName.NameType != tgsReq.ReqBody.CName.NameType || k.CName.NameString == nil { + return false, krberror.NewErrorf(krberror.KRBMsgError, "CName type in response does not match what was requested. Requested: %+v; Reply: %+v", tgsReq.ReqBody.CName, k.CName) + } + for i := range k.CName.NameString { + if k.CName.NameString[i] != tgsReq.ReqBody.CName.NameString[i] { + return false, krberror.NewErrorf(krberror.KRBMsgError, "CName in response does not match what was requested. Requested: %+v; Reply: %+v", tgsReq.ReqBody.CName, k.CName) + } + } + if k.Ticket.Realm != tgsReq.ReqBody.Realm { + return false, krberror.NewErrorf(krberror.KRBMsgError, "Realm in response ticket does not match what was requested. Requested: %s; Reply: %s", tgsReq.ReqBody.Realm, k.Ticket.Realm) + } + if k.DecryptedEncPart.Nonce != tgsReq.ReqBody.Nonce { + return false, krberror.NewErrorf(krberror.KRBMsgError, "Possible replay attack, nonce in response does not match that in request") + } + //if k.Ticket.SName.NameType != tgsReq.ReqBody.SName.NameType || k.Ticket.SName.NameString == nil { + // return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response ticket does not match what was requested. Requested: %v; Reply: %v", tgsReq.ReqBody.SName, k.Ticket.SName) + //} + //for i := range k.Ticket.SName.NameString { + // if k.Ticket.SName.NameString[i] != tgsReq.ReqBody.SName.NameString[i] { + // return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response ticket does not match what was requested. Requested: %+v; Reply: %+v", tgsReq.ReqBody.SName, k.Ticket.SName) + // } + //} + //if k.DecryptedEncPart.SName.NameType != tgsReq.ReqBody.SName.NameType || k.DecryptedEncPart.SName.NameString == nil { + // return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response does not match what was requested. Requested: %v; Reply: %v", tgsReq.ReqBody.SName, k.DecryptedEncPart.SName) + //} + //for i := range k.DecryptedEncPart.SName.NameString { + // if k.DecryptedEncPart.SName.NameString[i] != tgsReq.ReqBody.SName.NameString[i] { + // return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response does not match what was requested. Requested: %+v; Reply: %+v", tgsReq.ReqBody.SName, k.DecryptedEncPart.SName) + // } + //} + if k.DecryptedEncPart.SRealm != tgsReq.ReqBody.Realm { + return false, krberror.NewErrorf(krberror.KRBMsgError, "SRealm in response does not match what was requested. Requested: %s; Reply: %s", tgsReq.ReqBody.Realm, k.DecryptedEncPart.SRealm) + } + if len(k.DecryptedEncPart.CAddr) > 0 { + if !types.HostAddressesEqual(k.DecryptedEncPart.CAddr, tgsReq.ReqBody.Addresses) { + return false, krberror.NewErrorf(krberror.KRBMsgError, "Addresses listed in the TGS_REP does not match those listed in the TGS_REQ") + } + } + if time.Since(k.DecryptedEncPart.StartTime) > cfg.LibDefaults.Clockskew || k.DecryptedEncPart.StartTime.Sub(time.Now().UTC()) > cfg.LibDefaults.Clockskew { + if time.Since(k.DecryptedEncPart.AuthTime) > cfg.LibDefaults.Clockskew || k.DecryptedEncPart.AuthTime.Sub(time.Now().UTC()) > cfg.LibDefaults.Clockskew { + return false, krberror.NewErrorf(krberror.KRBMsgError, "Clock skew with KDC too large. Greater than %v seconds.", cfg.LibDefaults.Clockskew.Seconds()) + } + } + return true, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCReq.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCReq.go new file mode 100644 index 00000000..be0ff0a0 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCReq.go @@ -0,0 +1,402 @@ +package messages + +// Reference: https://www.ietf.org/rfc/rfc4120.txt +// Section: 5.4.1 + +import ( + "crypto/rand" + "fmt" + "math" + "math/big" + "time" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/asn1tools" + "gopkg.in/jcmturner/gokrb5.v5/config" + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/iana" + "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" + "gopkg.in/jcmturner/gokrb5.v5/iana/flags" + "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" + "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" + "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" + "gopkg.in/jcmturner/gokrb5.v5/iana/patype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +type marshalKDCReq struct { + PVNO int `asn1:"explicit,tag:1"` + MsgType int `asn1:"explicit,tag:2"` + PAData types.PADataSequence `asn1:"explicit,optional,tag:3"` + ReqBody asn1.RawValue `asn1:"explicit,tag:4"` +} + +// KDCReqFields represents the KRB_KDC_REQ fields. +type KDCReqFields struct { + PVNO int + MsgType int + PAData types.PADataSequence + ReqBody KDCReqBody + Renewal bool +} + +// ASReq implements RFC 4120 KRB_AS_REQ: https://tools.ietf.org/html/rfc4120#section-5.4.1. +type ASReq struct { + KDCReqFields +} + +// TGSReq implements RFC 4120 KRB_TGS_REQ: https://tools.ietf.org/html/rfc4120#section-5.4.1. +type TGSReq struct { + KDCReqFields +} + +type marshalKDCReqBody struct { + KDCOptions asn1.BitString `asn1:"explicit,tag:0"` + CName types.PrincipalName `asn1:"explicit,optional,tag:1"` + Realm string `asn1:"generalstring,explicit,tag:2"` + SName types.PrincipalName `asn1:"explicit,optional,tag:3"` + From time.Time `asn1:"generalized,explicit,optional,tag:4"` + Till time.Time `asn1:"generalized,explicit,tag:5"` + RTime time.Time `asn1:"generalized,explicit,optional,tag:6"` + Nonce int `asn1:"explicit,tag:7"` + EType []int32 `asn1:"explicit,tag:8"` + Addresses []types.HostAddress `asn1:"explicit,optional,tag:9"` + EncAuthData types.EncryptedData `asn1:"explicit,optional,tag:10"` + // Ticket needs to be a raw value as it is wrapped in an APPLICATION tag + AdditionalTickets asn1.RawValue `asn1:"explicit,optional,tag:11"` +} + +// KDCReqBody implements the KRB_KDC_REQ request body. +type KDCReqBody struct { + KDCOptions asn1.BitString `asn1:"explicit,tag:0"` + CName types.PrincipalName `asn1:"explicit,optional,tag:1"` + Realm string `asn1:"generalstring,explicit,tag:2"` + SName types.PrincipalName `asn1:"explicit,optional,tag:3"` + From time.Time `asn1:"generalized,explicit,optional,tag:4"` + Till time.Time `asn1:"generalized,explicit,tag:5"` + RTime time.Time `asn1:"generalized,explicit,optional,tag:6"` + Nonce int `asn1:"explicit,tag:7"` + EType []int32 `asn1:"explicit,tag:8"` + Addresses []types.HostAddress `asn1:"explicit,optional,tag:9"` + EncAuthData types.EncryptedData `asn1:"explicit,optional,tag:10"` + AdditionalTickets []Ticket `asn1:"explicit,optional,tag:11"` +} + +// NewASReqForTGT generates a new KRB_AS_REQ struct for a TGT request. +func NewASReqForTGT(realm string, c *config.Config, cname types.PrincipalName) (ASReq, error) { + sname := types.PrincipalName{ + NameType: nametype.KRB_NT_SRV_INST, + NameString: []string{"krbtgt", realm}, + } + return NewASReq(realm, c, cname, sname) +} + +// NewASReqForChgPasswd generates a new KRB_AS_REQ struct for a change password request. +func NewASReqForChgPasswd(realm string, c *config.Config, cname types.PrincipalName) (ASReq, error) { + sname := types.PrincipalName{ + NameType: nametype.KRB_NT_PRINCIPAL, + NameString: []string{"kadmin", "changepw"}, + } + return NewASReq(realm, c, cname, sname) +} + +// NewASReq generates a new KRB_AS_REQ struct for a given SNAME. +func NewASReq(realm string, c *config.Config, cname, sname types.PrincipalName) (ASReq, error) { + nonce, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt32)) + if err != nil { + return ASReq{}, err + } + t := time.Now().UTC() + // Copy the default options to make this thread safe + kopts := types.NewKrbFlags() + copy(kopts.Bytes, c.LibDefaults.KDCDefaultOptions.Bytes) + kopts.BitLength = c.LibDefaults.KDCDefaultOptions.BitLength + a := ASReq{ + KDCReqFields{ + PVNO: iana.PVNO, + MsgType: msgtype.KRB_AS_REQ, + PAData: types.PADataSequence{}, + ReqBody: KDCReqBody{ + KDCOptions: kopts, + Realm: realm, + CName: cname, + SName: sname, + Till: t.Add(c.LibDefaults.TicketLifetime), + Nonce: int(nonce.Int64()), + EType: c.LibDefaults.DefaultTktEnctypeIDs, + }, + }, + } + if c.LibDefaults.Forwardable { + types.SetFlag(&a.ReqBody.KDCOptions, flags.Forwardable) + } + if c.LibDefaults.Canonicalize { + types.SetFlag(&a.ReqBody.KDCOptions, flags.Canonicalize) + } + if c.LibDefaults.Proxiable { + types.SetFlag(&a.ReqBody.KDCOptions, flags.Proxiable) + } + if c.LibDefaults.RenewLifetime != 0 { + types.SetFlag(&a.ReqBody.KDCOptions, flags.Renewable) + a.ReqBody.RTime = t.Add(c.LibDefaults.RenewLifetime) + a.ReqBody.RTime = t.Add(time.Duration(48) * time.Hour) + } + if !c.LibDefaults.NoAddresses { + ha, err := types.LocalHostAddresses() + if err != nil { + return a, fmt.Errorf("could not get local addresses: %v", err) + } + ha = append(ha, types.HostAddressesFromNetIPs(c.LibDefaults.ExtraAddresses)...) + a.ReqBody.Addresses = ha + } + return a, nil +} + +// NewTGSReq generates a new KRB_TGS_REQ struct. +func NewTGSReq(cname types.PrincipalName, kdcRealm string, c *config.Config, tkt Ticket, sessionKey types.EncryptionKey, spn types.PrincipalName, renewal bool) (TGSReq, error) { + nonce, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt32)) + if err != nil { + return TGSReq{}, err + } + t := time.Now().UTC() + a := TGSReq{ + KDCReqFields{ + PVNO: iana.PVNO, + MsgType: msgtype.KRB_TGS_REQ, + ReqBody: KDCReqBody{ + KDCOptions: types.NewKrbFlags(), + Realm: kdcRealm, + SName: spn, + Till: t.Add(c.LibDefaults.TicketLifetime), + Nonce: int(nonce.Int64()), + EType: c.LibDefaults.DefaultTGSEnctypeIDs, + }, + Renewal: renewal, + }, + } + if c.LibDefaults.Forwardable { + types.SetFlag(&a.ReqBody.KDCOptions, flags.Forwardable) + } + if c.LibDefaults.Canonicalize { + types.SetFlag(&a.ReqBody.KDCOptions, flags.Canonicalize) + } + if c.LibDefaults.Proxiable { + types.SetFlag(&a.ReqBody.KDCOptions, flags.Proxiable) + } + if c.LibDefaults.RenewLifetime > time.Duration(0) { + types.SetFlag(&a.ReqBody.KDCOptions, flags.Renewable) + a.ReqBody.RTime = t.Add(c.LibDefaults.RenewLifetime) + } + if !c.LibDefaults.NoAddresses { + ha, err := types.LocalHostAddresses() + if err != nil { + return a, fmt.Errorf("could not get local addresses: %v", err) + } + ha = append(ha, types.HostAddressesFromNetIPs(c.LibDefaults.ExtraAddresses)...) + a.ReqBody.Addresses = ha + } + if renewal { + types.SetFlag(&a.ReqBody.KDCOptions, flags.Renew) + types.SetFlag(&a.ReqBody.KDCOptions, flags.Renewable) + } + auth, err := types.NewAuthenticator(tkt.Realm, cname) + if err != nil { + return a, krberror.Errorf(err, krberror.KRBMsgError, "error generating new authenticator") + } + // Add the CName to make validation of the reply easier + a.ReqBody.CName = auth.CName + b, err := a.ReqBody.Marshal() + if err != nil { + return a, krberror.Errorf(err, krberror.EncodingError, "error marshaling TGS_REQ body") + } + etype, err := crypto.GetEtype(sessionKey.KeyType) + if err != nil { + return a, krberror.Errorf(err, krberror.EncryptingError, "error getting etype to encrypt authenticator") + } + cb, err := etype.GetChecksumHash(sessionKey.KeyValue, b, keyusage.TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR_CHKSUM) + if err != nil { + return a, krberror.Errorf(err, krberror.ChksumError, "error getting etype checksum hash") + } + auth.Cksum = types.Checksum{ + CksumType: etype.GetHashID(), + Checksum: cb, + } + apReq, err := NewAPReq(tkt, sessionKey, auth) + if err != nil { + return a, krberror.Errorf(err, krberror.KRBMsgError, "error generating new AP_REQ") + } + apb, err := apReq.Marshal() + if err != nil { + return a, krberror.Errorf(err, krberror.EncodingError, "error marshaling AP_REQ for pre-authentication data") + } + a.PAData = types.PADataSequence{ + types.PAData{ + PADataType: patype.PA_TGS_REQ, + PADataValue: apb, + }, + } + return a, nil +} + +// Unmarshal bytes b into the ASReq struct. +func (k *ASReq) Unmarshal(b []byte) error { + var m marshalKDCReq + _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.ASREQ)) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling AS_REQ") + } + expectedMsgType := msgtype.KRB_AS_REQ + if m.MsgType != expectedMsgType { + return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a AS_REQ. Expected: %v; Actual: %v", expectedMsgType, m.MsgType) + } + var reqb KDCReqBody + err = reqb.Unmarshal(m.ReqBody.Bytes) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "error processing AS_REQ body") + } + k.MsgType = m.MsgType + k.PAData = m.PAData + k.PVNO = m.PVNO + k.ReqBody = reqb + return nil +} + +// Unmarshal bytes b into the TGSReq struct. +func (k *TGSReq) Unmarshal(b []byte) error { + var m marshalKDCReq + _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.TGSREQ)) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling TGS_REQ") + } + expectedMsgType := msgtype.KRB_TGS_REQ + if m.MsgType != expectedMsgType { + return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a TGS_REQ. Expected: %v; Actual: %v", expectedMsgType, m.MsgType) + } + var reqb KDCReqBody + err = reqb.Unmarshal(m.ReqBody.Bytes) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error processing TGS_REQ body") + } + k.MsgType = m.MsgType + k.PAData = m.PAData + k.PVNO = m.PVNO + k.ReqBody = reqb + return nil +} + +// Unmarshal bytes b into the KRB_KDC_REQ body struct. +func (k *KDCReqBody) Unmarshal(b []byte) error { + var m marshalKDCReqBody + _, err := asn1.Unmarshal(b, &m) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling KDC_REQ body") + } + k.KDCOptions = m.KDCOptions + if len(k.KDCOptions.Bytes) < 4 { + tb := make([]byte, 4-len(k.KDCOptions.Bytes)) + k.KDCOptions.Bytes = append(tb, k.KDCOptions.Bytes...) + k.KDCOptions.BitLength = len(k.KDCOptions.Bytes) * 8 + } + k.CName = m.CName + k.Realm = m.Realm + k.SName = m.SName + k.From = m.From + k.Till = m.Till + k.RTime = m.RTime + k.Nonce = m.Nonce + k.EType = m.EType + k.Addresses = m.Addresses + k.EncAuthData = m.EncAuthData + if len(m.AdditionalTickets.Bytes) > 0 { + k.AdditionalTickets, err = UnmarshalTicketsSequence(m.AdditionalTickets) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling additional tickets") + } + } + return nil +} + +// Marshal ASReq struct. +func (k *ASReq) Marshal() ([]byte, error) { + m := marshalKDCReq{ + PVNO: k.PVNO, + MsgType: k.MsgType, + PAData: k.PAData, + } + b, err := k.ReqBody.Marshal() + if err != nil { + var mk []byte + return mk, err + } + m.ReqBody = asn1.RawValue{ + Class: asn1.ClassContextSpecific, + IsCompound: true, + Tag: 4, + Bytes: b, + } + mk, err := asn1.Marshal(m) + if err != nil { + return mk, krberror.Errorf(err, krberror.EncodingError, "Error marshaling AS_REQ") + } + mk = asn1tools.AddASNAppTag(mk, asnAppTag.ASREQ) + return mk, nil +} + +// Marshal TGSReq struct. +func (k *TGSReq) Marshal() ([]byte, error) { + m := marshalKDCReq{ + PVNO: k.PVNO, + MsgType: k.MsgType, + PAData: k.PAData, + } + b, err := k.ReqBody.Marshal() + if err != nil { + var mk []byte + return mk, err + } + m.ReqBody = asn1.RawValue{ + Class: asn1.ClassContextSpecific, + IsCompound: true, + Tag: 4, + Bytes: b, + } + mk, err := asn1.Marshal(m) + if err != nil { + return mk, krberror.Errorf(err, krberror.EncodingError, "Error marshaling AS_REQ") + } + mk = asn1tools.AddASNAppTag(mk, asnAppTag.TGSREQ) + return mk, nil +} + +// Marshal KRB_KDC_REQ body struct. +func (k *KDCReqBody) Marshal() ([]byte, error) { + var b []byte + m := marshalKDCReqBody{ + KDCOptions: k.KDCOptions, + CName: k.CName, + Realm: k.Realm, + SName: k.SName, + From: k.From, + Till: k.Till, + RTime: k.RTime, + Nonce: k.Nonce, + EType: k.EType, + Addresses: k.Addresses, + EncAuthData: k.EncAuthData, + } + rawtkts, err := MarshalTicketSequence(k.AdditionalTickets) + if err != nil { + return b, krberror.Errorf(err, krberror.EncodingError, "Error in marshaling KDC request body additional tickets") + } + //The asn1.rawValue needs the tag setting on it for where it is in the KDCReqBody + rawtkts.Tag = 11 + if len(rawtkts.Bytes) > 0 { + m.AdditionalTickets = rawtkts + } + b, err = asn1.Marshal(m) + if err != nil { + return b, krberror.Errorf(err, krberror.EncodingError, "Error in marshaling KDC request body") + } + return b, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBCred.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBCred.go new file mode 100644 index 00000000..0739d977 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBCred.go @@ -0,0 +1,102 @@ +package messages + +import ( + "fmt" + "time" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" + "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" + "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +type marshalKRBCred struct { + PVNO int `asn1:"explicit,tag:0"` + MsgType int `asn1:"explicit,tag:1"` + Tickets asn1.RawValue `asn1:"explicit,tag:2"` + EncPart types.EncryptedData `asn1:"explicit,tag:3"` +} + +// KRBCred implements RFC 4120 KRB_CRED: https://tools.ietf.org/html/rfc4120#section-5.8.1. +type KRBCred struct { + PVNO int + MsgType int + Tickets []Ticket + EncPart types.EncryptedData + DecryptedEncPart EncKrbCredPart +} + +// EncKrbCredPart is the encrypted part of KRB_CRED. +type EncKrbCredPart struct { + TicketInfo []KrbCredInfo `asn1:"explicit,tag:0"` + Nouce int `asn1:"optional,explicit,tag:1"` + Timestamp time.Time `asn1:"generalized,optional,explicit,tag:2"` + Usec int `asn1:"optional,explicit,tag:3"` + SAddress types.HostAddress `asn1:"optional,explicit,tag:4"` + RAddress types.HostAddress `asn1:"optional,explicit,tag:5"` +} + +// KrbCredInfo is the KRB_CRED_INFO part of KRB_CRED. +type KrbCredInfo struct { + Key types.EncryptionKey `asn1:"explicit,tag:0"` + PRealm string `asn1:"generalstring,optional,explicit,tag:1"` + PName types.PrincipalName `asn1:"optional,explicit,tag:2"` + Flags asn1.BitString `asn1:"optional,explicit,tag:3"` + AuthTime time.Time `asn1:"generalized,optional,explicit,tag:4"` + StartTime time.Time `asn1:"generalized,optional,explicit,tag:5"` + EndTime time.Time `asn1:"generalized,optional,explicit,tag:6"` + RenewTill time.Time `asn1:"generalized,optional,explicit,tag:7"` + SRealm string `asn1:"optional,explicit,ia5,tag:8"` + SName types.PrincipalName `asn1:"optional,explicit,tag:9"` + CAddr types.HostAddresses `asn1:"optional,explicit,tag:10"` +} + +// Unmarshal bytes b into the KRBCred struct. +func (k *KRBCred) Unmarshal(b []byte) error { + var m marshalKRBCred + _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.KRBCred)) + if err != nil { + return processUnmarshalReplyError(b, err) + } + expectedMsgType := msgtype.KRB_CRED + if m.MsgType != expectedMsgType { + return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a KRB_CRED. Expected: %v; Actual: %v", expectedMsgType, m.MsgType) + } + k.PVNO = m.PVNO + k.MsgType = m.MsgType + k.EncPart = m.EncPart + if len(m.Tickets.Bytes) > 0 { + k.Tickets, err = UnmarshalTicketsSequence(m.Tickets) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling tickets within KRB_CRED") + } + } + return nil +} + +// DecryptEncPart decrypts the encrypted part of a KRB_CRED. +func (k *KRBCred) DecryptEncPart(key types.EncryptionKey) error { + b, err := crypto.DecryptEncPart(k.EncPart, key, keyusage.KRB_CRED_ENCPART) + if err != nil { + return krberror.Errorf(err, krberror.DecryptingError, "Error decrypting KRB_CRED EncPart") + } + var denc EncKrbCredPart + err = denc.Unmarshal(b) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling encrypted part of KRB_CRED") + } + k.DecryptedEncPart = denc + return nil +} + +// Unmarshal bytes b into the encrypted part of KRB_CRED. +func (k *EncKrbCredPart) Unmarshal(b []byte) error { + _, err := asn1.UnmarshalWithParams(b, k, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.EncKrbCredPart)) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling EncKrbCredPart") + } + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBError.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBError.go new file mode 100644 index 00000000..29ec8be0 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBError.go @@ -0,0 +1,83 @@ +// Package messages implements Kerberos 5 message types and methods. +package messages + +import ( + "fmt" + "time" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/iana" + "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" + "gopkg.in/jcmturner/gokrb5.v5/iana/errorcode" + "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// KRBError implements RFC 4120 KRB_ERROR: https://tools.ietf.org/html/rfc4120#section-5.9.1. +type KRBError struct { + PVNO int `asn1:"explicit,tag:0"` + MsgType int `asn1:"explicit,tag:1"` + CTime time.Time `asn1:"generalized,optional,explicit,tag:2"` + Cusec int `asn1:"optional,explicit,tag:3"` + STime time.Time `asn1:"generalized,explicit,tag:4"` + Susec int `asn1:"explicit,tag:5"` + ErrorCode int32 `asn1:"explicit,tag:6"` + CRealm string `asn1:"generalstring,optional,explicit,tag:7"` + CName types.PrincipalName `asn1:"optional,explicit,tag:8"` + Realm string `asn1:"generalstring,explicit,tag:9"` + SName types.PrincipalName `asn1:"explicit,tag:10"` + EText string `asn1:"generalstring,optional,explicit,tag:11"` + EData []byte `asn1:"optional,explicit,tag:12"` +} + +// NewKRBError creates a new KRBError. +func NewKRBError(sname types.PrincipalName, realm string, code int32, etext string) KRBError { + t := time.Now().UTC() + return KRBError{ + PVNO: iana.PVNO, + MsgType: msgtype.KRB_ERROR, + STime: t, + Susec: int((t.UnixNano() / int64(time.Microsecond)) - (t.Unix() * 1e6)), + ErrorCode: code, + SName: sname, + Realm: realm, + EText: etext, + } +} + +// Unmarshal bytes b into the KRBError struct. +func (k *KRBError) Unmarshal(b []byte) error { + _, err := asn1.UnmarshalWithParams(b, k, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.KRBError)) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "KRB_ERROR unmarshal error") + } + expectedMsgType := msgtype.KRB_ERROR + if k.MsgType != expectedMsgType { + return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a KRB_ERROR. Expected: %v; Actual: %v", expectedMsgType, k.MsgType) + } + return nil +} + +// Error method implementing error interface on KRBError struct. +func (k KRBError) Error() string { + etxt := fmt.Sprintf("KRB Error: %s", errorcode.Lookup(k.ErrorCode)) + if k.EText != "" { + etxt = fmt.Sprintf("%s - %s", etxt, k.EText) + } + return etxt +} + +func processUnmarshalReplyError(b []byte, err error) error { + switch err.(type) { + case asn1.StructuralError: + var krberr KRBError + tmperr := krberr.Unmarshal(b) + if tmperr != nil { + return krberror.Errorf(err, krberror.EncodingError, "Failed to unmarshal KDC's reply") + } + return krberr + default: + return krberror.Errorf(err, krberror.EncodingError, "Failed to unmarshal KDC's reply") + } +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBPriv.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBPriv.go new file mode 100644 index 00000000..d0a2a171 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBPriv.go @@ -0,0 +1,108 @@ +package messages + +import ( + "fmt" + "time" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/asn1tools" + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/iana" + "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" + "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" + "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// KRBPriv implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.7.1. +type KRBPriv struct { + PVNO int `asn1:"explicit,tag:0"` + MsgType int `asn1:"explicit,tag:1"` + EncPart types.EncryptedData `asn1:"explicit,tag:3"` + DecryptedEncPart EncKrbPrivPart `asn1:"optional,omitempty"` // Not part of ASN1 bytes so marked as optional so unmarshalling works +} + +// EncKrbPrivPart is the encrypted part of KRB_PRIV. +type EncKrbPrivPart struct { + UserData []byte `asn1:"explicit,tag:0"` + Timestamp time.Time `asn1:"generalized,optional,explicit,tag:1"` + Usec int `asn1:"optional,explicit,tag:2"` + SequenceNumber int64 `asn1:"optional,explicit,tag:3"` + SAddress types.HostAddress `asn1:"explicit,tag:4"` + RAddress types.HostAddress `asn1:"optional,explicit,tag:5"` +} + +// NewKRBPriv returns a new KRBPriv type. +func NewKRBPriv(part EncKrbPrivPart) KRBPriv { + return KRBPriv{ + PVNO: iana.PVNO, + MsgType: msgtype.KRB_PRIV, + DecryptedEncPart: part, + } +} + +// Unmarshal bytes b into the KRBPriv struct. +func (k *KRBPriv) Unmarshal(b []byte) error { + _, err := asn1.UnmarshalWithParams(b, k, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.KRBPriv)) + if err != nil { + return processUnmarshalReplyError(b, err) + } + expectedMsgType := msgtype.KRB_PRIV + if k.MsgType != expectedMsgType { + return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a KRB_PRIV. Expected: %v; Actual: %v", expectedMsgType, k.MsgType) + } + return nil +} + +// Unmarshal bytes b into the EncKrbPrivPart struct. +func (k *EncKrbPrivPart) Unmarshal(b []byte) error { + _, err := asn1.UnmarshalWithParams(b, k, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.EncKrbPrivPart)) + if err != nil { + return krberror.Errorf(err, krberror.EncodingError, "KRB_PRIV unmarshal error") + } + return nil +} + +// Marshal the KRBPriv. +func (k *KRBPriv) Marshal() ([]byte, error) { + tk := KRBPriv{ + PVNO: k.PVNO, + MsgType: k.MsgType, + EncPart: k.EncPart, + } + b, err := asn1.Marshal(tk) + if err != nil { + return []byte{}, err + } + b = asn1tools.AddASNAppTag(b, asnAppTag.KRBPriv) + return b, nil +} + +// EncryptEncPart encrypts the DecryptedEncPart within the KRBPriv. +// Use to prepare for marshaling. +func (k *KRBPriv) EncryptEncPart(key types.EncryptionKey) error { + b, err := asn1.Marshal(k.DecryptedEncPart) + if err != nil { + return err + } + b = asn1tools.AddASNAppTag(b, asnAppTag.EncKrbPrivPart) + k.EncPart, err = crypto.GetEncryptedData(b, key, keyusage.KRB_PRIV_ENCPART, 1) + if err != nil { + return err + } + return nil +} + +// DecryptEncPart decrypts the encrypted part of the KRBPriv message. +func (k *KRBPriv) DecryptEncPart(key types.EncryptionKey) error { + b, err := crypto.DecryptEncPart(k.EncPart, key, keyusage.KRB_PRIV_ENCPART) + if err != nil { + return fmt.Errorf("error decrypting KRBPriv EncPart: %v", err) + } + err = k.DecryptedEncPart.Unmarshal(b) + if err != nil { + return fmt.Errorf("error unmarshaling encrypted part: %v", err) + } + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBSafe.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBSafe.go new file mode 100644 index 00000000..47bd4672 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBSafe.go @@ -0,0 +1,61 @@ +package messages + +import ( + "fmt" + "time" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" + "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +/* +KRB-SAFE ::= [APPLICATION 20] SEQUENCE { + pvno [0] INTEGER (5), + msg-type [1] INTEGER (20), + safe-body [2] KRB-SAFE-BODY, + cksum [3] Checksum +} + +KRB-SAFE-BODY ::= SEQUENCE { + user-data [0] OCTET STRING, + timestamp [1] KerberosTime OPTIONAL, + usec [2] Microseconds OPTIONAL, + seq-number [3] UInt32 OPTIONAL, + s-address [4] HostAddress, + r-address [5] HostAddress OPTIONAL +} +*/ + +// KRBSafe implements RFC 4120 KRB_SAFE: https://tools.ietf.org/html/rfc4120#section-5.6.1. +type KRBSafe struct { + PVNO int `asn1:"explicit,tag:0"` + MsgType int `asn1:"explicit,tag:1"` + SafeBody KRBSafeBody `asn1:"explicit,tag:2"` + Cksum types.Checksum `asn1:"explicit,tag:3"` +} + +// KRBSafeBody implements the KRB_SAFE_BODY of KRB_SAFE. +type KRBSafeBody struct { + UserData []byte `asn1:"explicit,tag:0"` + Timestamp time.Time `asn1:"generalized,optional,explicit,tag:1"` + Usec int `asn1:"optional,explicit,tag:2"` + SequenceNumber int64 `asn1:"optional,explicit,tag:3"` + SAddress types.HostAddress `asn1:"explicit,tag:4"` + RAddress types.HostAddress `asn1:"optional,explicit,tag:5"` +} + +// Unmarshal bytes b into the KRBSafe struct. +func (s *KRBSafe) Unmarshal(b []byte) error { + _, err := asn1.UnmarshalWithParams(b, s, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.KRBSafe)) + if err != nil { + return processUnmarshalReplyError(b, err) + } + expectedMsgType := msgtype.KRB_SAFE + if s.MsgType != expectedMsgType { + return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a KRB_SAFE. Expected: %v; Actual: %v", expectedMsgType, s.MsgType) + } + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/Ticket.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/Ticket.go new file mode 100644 index 00000000..89faea61 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/Ticket.go @@ -0,0 +1,251 @@ +package messages + +import ( + "crypto/rand" + "fmt" + "strings" + "time" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/asn1tools" + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/iana" + "gopkg.in/jcmturner/gokrb5.v5/iana/adtype" + "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" + "gopkg.in/jcmturner/gokrb5.v5/iana/errorcode" + "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" + "gopkg.in/jcmturner/gokrb5.v5/keytab" + "gopkg.in/jcmturner/gokrb5.v5/krberror" + "gopkg.in/jcmturner/gokrb5.v5/pac" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// Reference: https://www.ietf.org/rfc/rfc4120.txt +// Section: 5.3 + +// Ticket implements the Kerberos ticket. +type Ticket struct { + TktVNO int `asn1:"explicit,tag:0"` + Realm string `asn1:"generalstring,explicit,tag:1"` + SName types.PrincipalName `asn1:"explicit,tag:2"` + EncPart types.EncryptedData `asn1:"explicit,tag:3"` + DecryptedEncPart EncTicketPart `asn1:"optional"` // Not part of ASN1 bytes so marked as optional so unmarshalling works +} + +// EncTicketPart is the encrypted part of the Ticket. +type EncTicketPart struct { + Flags asn1.BitString `asn1:"explicit,tag:0"` + Key types.EncryptionKey `asn1:"explicit,tag:1"` + CRealm string `asn1:"generalstring,explicit,tag:2"` + CName types.PrincipalName `asn1:"explicit,tag:3"` + Transited TransitedEncoding `asn1:"explicit,tag:4"` + AuthTime time.Time `asn1:"generalized,explicit,tag:5"` + StartTime time.Time `asn1:"generalized,explicit,optional,tag:6"` + EndTime time.Time `asn1:"generalized,explicit,tag:7"` + RenewTill time.Time `asn1:"generalized,explicit,optional,tag:8"` + CAddr types.HostAddresses `asn1:"explicit,optional,tag:9"` + AuthorizationData types.AuthorizationData `asn1:"explicit,optional,tag:10"` +} + +// TransitedEncoding part of the ticket's encrypted part. +type TransitedEncoding struct { + TRType int32 `asn1:"explicit,tag:0"` + Contents []byte `asn1:"explicit,tag:1"` +} + +// NewTicket creates a new Ticket instance. +func NewTicket(cname types.PrincipalName, crealm string, sname types.PrincipalName, srealm string, flags asn1.BitString, sktab keytab.Keytab, eTypeID int32, kvno int, authTime, startTime, endTime, renewTill time.Time) (Ticket, types.EncryptionKey, error) { + etype, err := crypto.GetEtype(eTypeID) + if err != nil { + return Ticket{}, types.EncryptionKey{}, krberror.Errorf(err, krberror.EncryptingError, "error getting etype for new ticket") + } + ks := etype.GetKeyByteSize() + kv := make([]byte, ks, ks) + rand.Read(kv) + sessionKey := types.EncryptionKey{ + KeyType: eTypeID, + KeyValue: kv, + } + etp := EncTicketPart{ + Flags: flags, + Key: sessionKey, + CRealm: crealm, + CName: cname, + Transited: TransitedEncoding{}, + AuthTime: authTime, + StartTime: startTime, + EndTime: endTime, + RenewTill: renewTill, + } + b, err := asn1.Marshal(etp) + if err != nil { + return Ticket{}, types.EncryptionKey{}, krberror.Errorf(err, krberror.EncodingError, "error marshalling ticket encpart") + } + b = asn1tools.AddASNAppTag(b, asnAppTag.EncTicketPart) + skey, err := sktab.GetEncryptionKey(sname.NameString, srealm, kvno, eTypeID) + if err != nil { + return Ticket{}, types.EncryptionKey{}, krberror.Errorf(err, krberror.EncryptingError, "error getting encryption key for new ticket") + } + ed, err := crypto.GetEncryptedData(b, skey, keyusage.KDC_REP_TICKET, kvno) + if err != nil { + return Ticket{}, types.EncryptionKey{}, krberror.Errorf(err, krberror.EncryptingError, "error encrypting ticket encpart") + } + tkt := Ticket{ + TktVNO: iana.PVNO, + Realm: srealm, + SName: sname, + EncPart: ed, + } + return tkt, sessionKey, nil +} + +// Unmarshal bytes b into a Ticket struct. +func (t *Ticket) Unmarshal(b []byte) error { + _, err := asn1.UnmarshalWithParams(b, t, fmt.Sprintf("application,explicit,tag:%d", asnAppTag.Ticket)) + return err +} + +// Marshal the Ticket. +func (t *Ticket) Marshal() ([]byte, error) { + b, err := asn1.Marshal(*t) + if err != nil { + return nil, err + } + b = asn1tools.AddASNAppTag(b, asnAppTag.Ticket) + return b, nil +} + +// Unmarshal bytes b into the EncTicketPart struct. +func (t *EncTicketPart) Unmarshal(b []byte) error { + _, err := asn1.UnmarshalWithParams(b, t, fmt.Sprintf("application,explicit,tag:%d", asnAppTag.EncTicketPart)) + return err +} + +// UnmarshalTicket returns a ticket from the bytes provided. +func UnmarshalTicket(b []byte) (t Ticket, err error) { + _, err = asn1.UnmarshalWithParams(b, &t, fmt.Sprintf("application,explicit,tag:%d", asnAppTag.Ticket)) + return +} + +// UnmarshalTicketsSequence returns a slice of Tickets from a raw ASN1 value. +func UnmarshalTicketsSequence(in asn1.RawValue) ([]Ticket, error) { + //This is a workaround to a asn1 decoding issue in golang - https://github.com/golang/go/issues/17321. It's not pretty I'm afraid + //We pull out raw values from the larger raw value (that is actually the data of the sequence of raw values) and track our position moving along the data. + b := in.Bytes + // Ignore the head of the asn1 stream (1 byte for tag and those for the length) as this is what tells us its a sequence but we're handling it ourselves + p := 1 + asn1tools.GetNumberBytesInLengthHeader(in.Bytes) + var tkts []Ticket + var raw asn1.RawValue + for p < (len(b)) { + _, err := asn1.UnmarshalWithParams(b[p:], &raw, fmt.Sprintf("application,tag:%d", asnAppTag.Ticket)) + if err != nil { + return nil, fmt.Errorf("unmarshaling sequence of tickets failed geting length of ticket: %v", err) + } + t, err := UnmarshalTicket(b[p:]) + if err != nil { + return nil, fmt.Errorf("unmarshaling sequence of tickets failed: %v", err) + } + p += len(raw.FullBytes) + tkts = append(tkts, t) + } + MarshalTicketSequence(tkts) + return tkts, nil +} + +// MarshalTicketSequence marshals a slice of Tickets returning an ASN1 raw value containing the ticket sequence. +func MarshalTicketSequence(tkts []Ticket) (asn1.RawValue, error) { + raw := asn1.RawValue{ + Class: 2, + IsCompound: true, + } + if len(tkts) < 1 { + // There are no tickets to marshal + return raw, nil + } + var btkts []byte + for i, t := range tkts { + b, err := t.Marshal() + if err != nil { + return raw, fmt.Errorf("error marshaling ticket number %d in seqence of tickets", i+1) + } + btkts = append(btkts, b...) + } + // The ASN1 wrapping consists of 2 bytes: + // 1st byte -> Identifier Octet - In this case an OCTET STRING (ASN TAG + // 2nd byte -> The length (this will be the size indicated in the input bytes + 2 for the additional bytes we add here. + // Application Tag: + //| Byte: | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | + //| Value: | 0 | 1 | 1 | From the RFC spec 4120 | + //| Explanation | Defined by the ASN1 encoding rules for an application tag | A value of 1 indicates a constructed type | The ASN Application tag value | + btkts = append(asn1tools.MarshalLengthBytes(len(btkts)), btkts...) + btkts = append([]byte{byte(32 + asn1.TagSequence)}, btkts...) + raw.Bytes = btkts + // If we need to create the full bytes then identifier octet is "context-specific" = 128 + "constructed" + 32 + the wrapping explicit tag (11) + //fmt.Fprintf(os.Stderr, "mRaw fb: %v\n", raw.FullBytes) + return raw, nil +} + +// DecryptEncPart decrypts the encrypted part of the ticket. +func (t *Ticket) DecryptEncPart(keytab keytab.Keytab, ktprinc string) error { + var upn types.PrincipalName + realm := t.Realm + if ktprinc != "" { + var r string + upn, r = types.ParseSPNString(ktprinc) + if r != "" { + realm = r + } + } else { + upn = t.SName + } + key, err := keytab.GetEncryptionKey(upn.NameString, realm, t.EncPart.KVNO, t.EncPart.EType) + if err != nil { + return NewKRBError(t.SName, t.Realm, errorcode.KRB_AP_ERR_NOKEY, fmt.Sprintf("Could not get key from keytab: %v", err)) + } + b, err := crypto.DecryptEncPart(t.EncPart, key, keyusage.KDC_REP_TICKET) + if err != nil { + return fmt.Errorf("error decrypting Ticket EncPart: %v", err) + } + var denc EncTicketPart + err = denc.Unmarshal(b) + if err != nil { + return fmt.Errorf("error unmarshaling encrypted part: %v", err) + } + t.DecryptedEncPart = denc + return nil +} + +// GetPACType returns a Microsoft PAC that has been extracted from the ticket and processed. +func (t *Ticket) GetPACType(keytab keytab.Keytab, sa string) (bool, pac.PACType, error) { + var isPAC bool + for _, ad := range t.DecryptedEncPart.AuthorizationData { + if ad.ADType == adtype.ADIfRelevant { + var ad2 types.AuthorizationData + err := ad2.Unmarshal(ad.ADData) + if err != nil { + continue + } + if ad2[0].ADType == adtype.ADWin2KPAC { + isPAC = true + var p pac.PACType + err = p.Unmarshal(ad2[0].ADData) + if err != nil { + return isPAC, p, fmt.Errorf("error unmarshaling PAC: %v", err) + } + var upn []string + if sa != "" { + upn = strings.Split(sa, "/") + } else { + upn = t.SName.NameString + } + key, err := keytab.GetEncryptionKey(upn, t.Realm, t.EncPart.KVNO, t.EncPart.EType) + if err != nil { + return isPAC, p, NewKRBError(t.SName, t.Realm, errorcode.KRB_AP_ERR_NOKEY, fmt.Sprintf("Could not get key from keytab: %v", err)) + } + err = p.ProcessPACInfoBuffers(key) + return isPAC, p, err + } + } + } + return isPAC, pac.PACType{}, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/claims_set_metadata.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/claims_set_metadata.go new file mode 100644 index 00000000..d53b63db --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/claims_set_metadata.go @@ -0,0 +1,39 @@ +package mstypes + +import ( + "encoding/binary" + + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// ClaimsSetMetadata implements https://msdn.microsoft.com/en-us/library/hh554073.aspx +type ClaimsSetMetadata struct { + ULClaimsSetSize uint32 + ClaimsSet []byte + USCompressionFormat uint32 // Enum see constants below for options + ULUncompressedClaimsSetSize uint32 + USReservedType uint16 + ULReservedFieldSize uint32 + ReservedField []byte +} + +// Compression format assigned numbers. +const ( + CompressionFormatNone = 0 + CompressionFormatLZNT1 = 2 + CompressionFormatXPress = 3 + CompressionFormatXPressHuff = 4 +) + +// ReadClaimsSetMetadata reads a ClaimsSetMetadata from the bytes slice. +func ReadClaimsSetMetadata(b *[]byte, p *int, e *binary.ByteOrder) ClaimsSetMetadata { + var c ClaimsSetMetadata + c.ULClaimsSetSize = ndr.ReadUint32(b, p, e) + c.ClaimsSet = ndr.ReadBytes(b, p, int(c.ULClaimsSetSize), e) + c.USCompressionFormat = ndr.ReadUint32(b, p, e) + c.ULUncompressedClaimsSetSize = ndr.ReadUint32(b, p, e) + c.USReservedType = ndr.ReadUint16(b, p, e) + c.ULReservedFieldSize = ndr.ReadUint32(b, p, e) + c.ReservedField = ndr.ReadBytes(b, p, int(c.ULReservedFieldSize), e) + return c +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/filetime.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/filetime.go new file mode 100644 index 00000000..f67912ad --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/filetime.go @@ -0,0 +1,65 @@ +// Package mstypes implements representations of Microsoft types for PAC processing. +package mstypes + +import ( + "encoding/binary" + "time" + + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +/* +FILETIME is a windows data structure. +Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724284%28v=vs.85%29.aspx +It contains two parts that are 32bit integers: + dwLowDateTime + dwHighDateTime +We need to combine these two into one 64bit integer. +This gives the number of 100 nano second period from January 1, 1601, Coordinated Universal Time (UTC) +*/ + +const unixEpochDiff = 116444736000000000 + +// FileTime implements the Microsoft FILETIME type https://msdn.microsoft.com/en-us/library/cc230324.aspx +type FileTime struct { + LowDateTime uint32 + HighDateTime uint32 +} + +// Time return a golang Time type from the FileTime +func (ft FileTime) Time() time.Time { + ns := (ft.MSEpoch() - unixEpochDiff) * 100 + return time.Unix(0, int64(ns)).UTC() +} + +// MSEpoch returns the FileTime as a Microsoft epoch, the number of 100 nano second periods elapsed from January 1, 1601 UTC. +func (ft FileTime) MSEpoch() int64 { + return (int64(ft.HighDateTime) << 32) + int64(ft.LowDateTime) +} + +// Unix returns the FileTime as a Unix time, the number of seconds elapsed since January 1, 1970 UTC. +func (ft FileTime) Unix() int64 { + return (ft.MSEpoch() - unixEpochDiff) / 10000000 +} + +// GetFileTime returns a FileTime type from the provided Golang Time type. +func GetFileTime(t time.Time) FileTime { + ns := t.UnixNano() + fp := (ns / 100) + unixEpochDiff + hd := fp >> 32 + ld := fp - (hd << 32) + return FileTime{ + LowDateTime: uint32(ld), + HighDateTime: uint32(hd), + } +} + +// ReadFileTime reads a FileTime from the bytes slice. +func ReadFileTime(b *[]byte, p *int, e *binary.ByteOrder) FileTime { + l := ndr.ReadUint32(b, p, e) + h := ndr.ReadUint32(b, p, e) + return FileTime{ + LowDateTime: l, + HighDateTime: h, + } +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/group_membership.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/group_membership.go new file mode 100644 index 00000000..4801c205 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/group_membership.go @@ -0,0 +1,53 @@ +package mstypes + +import ( + "encoding/binary" + + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// GroupMembership implements https://msdn.microsoft.com/en-us/library/cc237945.aspx +// RelativeID : A 32-bit unsigned integer that contains the RID of a particular group. +// The possible values for the Attributes flags are identical to those specified in KERB_SID_AND_ATTRIBUTES +type GroupMembership struct { + RelativeID uint32 + Attributes uint32 +} + +// ReadGroupMembership reads a GroupMembership from the bytes slice. +func ReadGroupMembership(b *[]byte, p *int, e *binary.ByteOrder) GroupMembership { + r := ndr.ReadUint32(b, p, e) + a := ndr.ReadUint32(b, p, e) + return GroupMembership{ + RelativeID: r, + Attributes: a, + } +} + +// DomainGroupMembership implements https://msdn.microsoft.com/en-us/library/hh536344.aspx +// DomainId: A SID structure that contains the SID for the domain.This member is used in conjunction with the GroupIds members to create group SIDs for the device. +// GroupCount: A 32-bit unsigned integer that contains the number of groups within the domain to which the account belongs. +// GroupIds: A pointer to a list of GROUP_MEMBERSHIP structures that contain the groups to which the account belongs in the domain. The number of groups in this list MUST be equal to GroupCount. +type DomainGroupMembership struct { + DomainID RPCSID + GroupCount uint32 + GroupIDs []GroupMembership // Size is value of GroupCount +} + +// ReadDomainGroupMembership reads a DomainGroupMembership from the bytes slice. +func ReadDomainGroupMembership(b *[]byte, p *int, e *binary.ByteOrder) (DomainGroupMembership, error) { + d, err := ReadRPCSID(b, p, e) + if err != nil { + return DomainGroupMembership{}, err + } + c := ndr.ReadUint32(b, p, e) + g := make([]GroupMembership, c, c) + for i := range g { + g[i] = ReadGroupMembership(b, p, e) + } + return DomainGroupMembership{ + DomainID: d, + GroupCount: c, + GroupIDs: g, + }, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/kerb_sid_and_attributes.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/kerb_sid_and_attributes.go new file mode 100644 index 00000000..f84c578c --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/kerb_sid_and_attributes.go @@ -0,0 +1,42 @@ +package mstypes + +import ( + "encoding/binary" + + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// Attributes of a security group membership and can be combined by using the bitwise OR operation. +// They are used by an access check mechanism to specify whether the membership is to be used in an access check decision. +const ( + SEGroupMandatory = 31 + SEGroupEnabledByDefault = 30 + SEGroupEnabled = 29 + SEGroupOwner = 28 + SEGroupResource = 2 + //All other bits MUST be set to zero and MUST be ignored on receipt. +) + +// KerbSidAndAttributes implements https://msdn.microsoft.com/en-us/library/cc237947.aspx +type KerbSidAndAttributes struct { + SID RPCSID // A pointer to an RPC_SID structure. + Attributes uint32 +} + +// ReadKerbSidAndAttributes reads a KerbSidAndAttribute from the bytes slice. +func ReadKerbSidAndAttributes(b *[]byte, p *int, e *binary.ByteOrder) (KerbSidAndAttributes, error) { + s, err := ReadRPCSID(b, p, e) + if err != nil { + return KerbSidAndAttributes{}, err + } + a := ndr.ReadUint32(b, p, e) + return KerbSidAndAttributes{ + SID: s, + Attributes: a, + }, nil +} + +// SetFlag sets a flag in a uint32 attribute value. +func SetFlag(a *uint32, i uint) { + *a = *a | (1 << (31 - i)) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/rpc_unicode_string.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/rpc_unicode_string.go new file mode 100644 index 00000000..3c38afe2 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/rpc_unicode_string.go @@ -0,0 +1,36 @@ +package mstypes + +import ( + "encoding/binary" + + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// RPCUnicodeString implements https://msdn.microsoft.com/en-us/library/cc230365.aspx +type RPCUnicodeString struct { + Length uint16 // The length, in bytes, of the string pointed to by the Buffer member, not including the terminating null character if any. The length MUST be a multiple of 2. The length SHOULD equal the entire size of the Buffer, in which case there is no terminating null character. Any method that accesses this structure MUST use the Length specified instead of relying on the presence or absence of a null character. + MaximumLength uint16 // The maximum size, in bytes, of the string pointed to by Buffer. The size MUST be a multiple of 2. If not, the size MUST be decremented by 1 prior to use. This value MUST not be less than Length. + BufferPrt uint32 // A pointer to a string buffer. If MaximumLength is greater than zero, the buffer MUST contain a non-null value. + Value string +} + +// ReadRPCUnicodeString reads a RPCUnicodeString from the bytes slice. +func ReadRPCUnicodeString(b *[]byte, p *int, e *binary.ByteOrder) (RPCUnicodeString, error) { + l := ndr.ReadUint16(b, p, e) + ml := ndr.ReadUint16(b, p, e) + if ml < l || l%2 != 0 || ml%2 != 0 { + return RPCUnicodeString{}, ndr.Malformed{EText: "Invalid data for RPC_UNICODE_STRING"} + } + ptr := ndr.ReadUint32(b, p, e) + return RPCUnicodeString{ + Length: l, + MaximumLength: ml, + BufferPrt: ptr, + }, nil +} + +// UnmarshalString populates a golang string into the RPCUnicodeString struct. +func (s *RPCUnicodeString) UnmarshalString(b *[]byte, p *int, e *binary.ByteOrder) (err error) { + s.Value, err = ndr.ReadConformantVaryingString(b, p, e) + return +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/sid.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/sid.go new file mode 100644 index 00000000..0a62fa19 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/sid.go @@ -0,0 +1,70 @@ +package mstypes + +import ( + "encoding/binary" + "encoding/hex" + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// RPCSID implements https://msdn.microsoft.com/en-us/library/cc230364.aspx +type RPCSID struct { + Revision uint8 // An 8-bit unsigned integer that specifies the revision level of the SID. This value MUST be set to 0x01. + SubAuthorityCount uint8 // An 8-bit unsigned integer that specifies the number of elements in the SubAuthority array. The maximum number of elements allowed is 15. + IdentifierAuthority RPCSIDIdentifierAuthority // An RPC_SID_IDENTIFIER_AUTHORITY structure that indicates the authority under which the SID was created. It describes the entity that created the SID. The Identifier Authority value {0,0,0,0,0,5} denotes SIDs created by the NT SID authority. + SubAuthority []uint32 // A variable length array of unsigned 32-bit integers that uniquely identifies a principal relative to the IdentifierAuthority. Its length is determined by SubAuthorityCount. +} + +// RPCSIDIdentifierAuthority implements https://msdn.microsoft.com/en-us/library/cc230372.aspx +type RPCSIDIdentifierAuthority struct { + Value []byte // 6 bytes +} + +// ReadRPCSID reads a RPC_SID from the bytes slice. +func ReadRPCSID(b *[]byte, p *int, e *binary.ByteOrder) (RPCSID, error) { + size := int(ndr.ReadUint32(b, p, e)) // This is part of the NDR encoding rather than the data type. + r := ndr.ReadUint8(b, p) + if r != uint8(1) { + return RPCSID{}, ndr.Malformed{EText: fmt.Sprintf("SID revision value read as %d when it must be 1", r)} + } + c := ndr.ReadUint8(b, p) + a := ReadRPCSIDIdentifierAuthority(b, p, e) + s := make([]uint32, c, c) + if size != len(s) { + return RPCSID{}, ndr.Malformed{EText: fmt.Sprintf("Number of elements (%d) within SID in the byte stream does not equal the SubAuthorityCount (%d)", size, c)} + } + for i := 0; i < len(s); i++ { + s[i] = ndr.ReadUint32(b, p, e) + } + return RPCSID{ + Revision: r, + SubAuthorityCount: c, + IdentifierAuthority: a, + SubAuthority: s, + }, nil +} + +// ReadRPCSIDIdentifierAuthority reads a RPC_SIDIdentifierAuthority from the bytes slice. +func ReadRPCSIDIdentifierAuthority(b *[]byte, p *int, e *binary.ByteOrder) RPCSIDIdentifierAuthority { + return RPCSIDIdentifierAuthority{ + Value: ndr.ReadBytes(b, p, 6, e), + } +} + +// ToString returns the string representation of the RPC_SID. +func (s *RPCSID) ToString() string { + var str string + b := append(make([]byte, 2, 2), s.IdentifierAuthority.Value...) + // For a strange reason this is read big endian: https://msdn.microsoft.com/en-us/library/dd302645.aspx + i := binary.BigEndian.Uint64(b) + if i >= 4294967296 { + str = fmt.Sprintf("S-1-0x%s", hex.EncodeToString(s.IdentifierAuthority.Value)) + } else { + str = fmt.Sprintf("S-1-%d", i) + } + for _, sub := range s.SubAuthority { + str = fmt.Sprintf("%s-%d", str, sub) + } + return str +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/user_session_key.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/user_session_key.go new file mode 100644 index 00000000..f3324c45 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/user_session_key.go @@ -0,0 +1,30 @@ +package mstypes + +import ( + "encoding/binary" + + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// CypherBlock implements https://msdn.microsoft.com/en-us/library/cc237040.aspx +type CypherBlock struct { + Data []byte // size = 8 +} + +// UserSessionKey implements https://msdn.microsoft.com/en-us/library/cc237080.aspx +type UserSessionKey struct { + Data []CypherBlock // size = 2 +} + +// ReadUserSessionKey reads a UserSessionKey from the bytes slice. +func ReadUserSessionKey(b *[]byte, p *int, e *binary.ByteOrder) UserSessionKey { + cb1 := CypherBlock{ + Data: ndr.ReadBytes(b, p, 8, e), + } + cb2 := CypherBlock{ + Data: ndr.ReadBytes(b, p, 8, e), + } + return UserSessionKey{ + Data: []CypherBlock{cb1, cb2}, + } +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/error.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/error.go new file mode 100644 index 00000000..0dced225 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/error.go @@ -0,0 +1,13 @@ +package ndr + +import "fmt" + +// Malformed implements the error interface for malformed NDR encoding errors. +type Malformed struct { + EText string +} + +// Error implements the error interface on the Malformed struct. +func (e Malformed) Error() string { + return fmt.Sprintf("Malformed NDR steam: %s", e.EText) +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/ndr.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/ndr.go new file mode 100644 index 00000000..97958f5e --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/ndr.go @@ -0,0 +1,246 @@ +// Package ndr is a partial implementation of NDR encoding: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm +package ndr + +import ( + "bytes" + "encoding/binary" + "fmt" + "math" +) + +/* +Serialization Version 1 +https://msdn.microsoft.com/en-us/library/cc243563.aspx + +Common Header - https://msdn.microsoft.com/en-us/library/cc243890.aspx +8 bytes in total: +- First byte - Version: Must equal 1 +- Second byte - 1st 4 bits: Endianess (0=Big; 1=Little); 2nd 4 bits: Character Encoding (0=ASCII; 1=EBCDIC) +- 3rd - Floating point representation +- 4th - Common Header Length: Must equal 8 +- 5th - 8th - Filler: MUST be set to 0xcccccccc on marshaling, and SHOULD be ignored during unmarshaling. + +Private Header - https://msdn.microsoft.com/en-us/library/cc243919.aspx +8 bytes in total: +- First 4 bytes - Indicates the length of a serialized top-level type in the octet stream. It MUST include the padding length and exclude the header itself. +- Second 4 bytes - Filler: MUST be set to 0 (zero) during marshaling, and SHOULD be ignored during unmarshaling. +*/ + +const ( + protocolVersion = 1 + commonHeaderBytes = 8 + privateHeaderBytes = 8 + bigEndian = 0 + littleEndian = 1 + ascii = 0 + ebcdic = 1 + ieee = 0 + vax = 1 + cray = 2 + ibm = 3 +) + +// CommonHeader implements the NDR common header: https://msdn.microsoft.com/en-us/library/cc243889.aspx +type CommonHeader struct { + Version uint8 + Endianness binary.ByteOrder + CharacterEncoding uint8 + //FloatRepresentation uint8 + HeaderLength uint16 + Filler []byte +} + +// PrivateHeader implements the NDR private header: https://msdn.microsoft.com/en-us/library/cc243919.aspx +type PrivateHeader struct { + ObjectBufferLength uint32 + Filler []byte +} + +// ReadHeaders processes the bytes to return the NDR Common and Private headers. +func ReadHeaders(b *[]byte) (CommonHeader, PrivateHeader, int, error) { + ch, p, err := GetCommonHeader(b) + if err != nil { + return CommonHeader{}, PrivateHeader{}, 0, err + } + ph, err := GetPrivateHeader(b, &p, &ch.Endianness) + if err != nil { + return CommonHeader{}, PrivateHeader{}, 0, err + } + return ch, ph, p, err +} + +// GetCommonHeader processes the bytes to return the NDR Common header. +func GetCommonHeader(b *[]byte) (CommonHeader, int, error) { + //The first 8 bytes comprise the Common RPC Header for type marshalling. + if len(*b) < commonHeaderBytes { + return CommonHeader{}, 0, Malformed{EText: "Not enough bytes."} + } + if (*b)[0] != protocolVersion { + return CommonHeader{}, 0, Malformed{EText: fmt.Sprintf("Stream does not indicate a RPC Type serialization of version %v", protocolVersion)} + } + endian := int((*b)[1] >> 4 & 0xF) + if endian != 0 && endian != 1 { + return CommonHeader{}, 1, Malformed{EText: "Common header does not indicate a valid endianness"} + } + charEncoding := uint8((*b)[1] & 0xF) + if charEncoding != 0 && charEncoding != 1 { + return CommonHeader{}, 1, Malformed{EText: "Common header does not indicate a valid charater encoding"} + } + var bo binary.ByteOrder + switch endian { + case littleEndian: + bo = binary.LittleEndian + case bigEndian: + bo = binary.BigEndian + } + l := bo.Uint16((*b)[2:4]) + if l != commonHeaderBytes { + return CommonHeader{}, 4, Malformed{EText: fmt.Sprintf("Common header does not indicate a valid length: %v instead of %v", uint8((*b)[3]), commonHeaderBytes)} + } + + return CommonHeader{ + Version: uint8((*b)[0]), + Endianness: bo, + CharacterEncoding: charEncoding, + //FloatRepresentation: uint8(b[2]), + HeaderLength: l, + Filler: (*b)[4:8], + }, 8, nil +} + +// GetPrivateHeader processes the bytes to return the NDR Private header. +func GetPrivateHeader(b *[]byte, p *int, bo *binary.ByteOrder) (PrivateHeader, error) { + //The next 8 bytes comprise the RPC type marshalling private header for constructed types. + if len(*b) < (privateHeaderBytes) { + return PrivateHeader{}, Malformed{EText: "Not enough bytes."} + } + var l uint32 + buf := bytes.NewBuffer((*b)[*p : *p+4]) + binary.Read(buf, *bo, &l) + if l%8 != 0 { + return PrivateHeader{}, Malformed{EText: "Object buffer length not a multiple of 8"} + } + *p += 8 + return PrivateHeader{ + ObjectBufferLength: l, + Filler: (*b)[4:8], + }, nil +} + +// ReadUint8 reads bytes representing a thirty two bit integer. +func ReadUint8(b *[]byte, p *int) (i uint8) { + if len((*b)[*p:]) < 1 { + return + } + ensureAlignment(p, 1) + i = uint8((*b)[*p]) + *p++ + return +} + +// ReadUint16 reads bytes representing a thirty two bit integer. +func ReadUint16(b *[]byte, p *int, e *binary.ByteOrder) (i uint16) { + if len((*b)[*p:]) < 2 { + return + } + ensureAlignment(p, 2) + i = (*e).Uint16((*b)[*p : *p+2]) + *p += 2 + return +} + +// ReadUint32 reads bytes representing a thirty two bit integer. +func ReadUint32(b *[]byte, p *int, e *binary.ByteOrder) (i uint32) { + if len((*b)[*p:]) < 4 { + return + } + ensureAlignment(p, 4) + i = (*e).Uint32((*b)[*p : *p+4]) + *p += 4 + return +} + +// ReadUint64 reads bytes representing a thirty two bit integer. +func ReadUint64(b *[]byte, p *int, e *binary.ByteOrder) (i uint64) { + if len((*b)[*p:]) < 8 { + return + } + ensureAlignment(p, 8) + i = (*e).Uint64((*b)[*p : *p+8]) + *p += 8 + return +} + +// ReadBytes reads the number of bytes specified. +func ReadBytes(b *[]byte, p *int, s int, e *binary.ByteOrder) (r []byte) { + if len((*b)[*p:]) < s { + return + } + buf := bytes.NewBuffer((*b)[*p : *p+s]) + r = make([]byte, s) + binary.Read(buf, *e, &r) + *p += s + return r +} + +// ReadBool reads bytes representing a boolean. +func ReadBool(b *[]byte, p *int) bool { + if len((*b)[*p:]) < 1 { + return false + } + if ReadUint8(b, p) != 0 { + return true + } + return false +} + +// ReadIEEEfloat32 reads bytes representing a IEEE formatted 32 bit float. +func ReadIEEEfloat32(b *[]byte, p *int, e *binary.ByteOrder) float32 { + ensureAlignment(p, 4) + return math.Float32frombits(ReadUint32(b, p, e)) +} + +// ReadIEEEfloat64 reads bytes representing a IEEE formatted 64 bit float. +func ReadIEEEfloat64(b *[]byte, p *int, e *binary.ByteOrder) float64 { + ensureAlignment(p, 8) + return math.Float64frombits(ReadUint64(b, p, e)) +} + +// ReadConformantVaryingString reads a Conformant and Varying String from the bytes slice. +// A conformant and varying string is a string in which the maximum number of elements is not known beforehand and therefore is included in the representation of the string. +// NDR represents a conformant and varying string as an ordered sequence of representations of the string elements, preceded by three unsigned long integers. +// The first integer gives the maximum number of elements in the string, including the terminator. +// The second integer gives the offset from the first index of the string to the first index of the actual subset being passed. +// The third integer gives the actual number of elements being passed, including the terminator. +func ReadConformantVaryingString(b *[]byte, p *int, e *binary.ByteOrder) (string, error) { + m := ReadUint32(b, p, e) // Max element count + o := ReadUint32(b, p, e) // Offset + a := ReadUint32(b, p, e) // Actual count + if a > (m-o) || o > m { + return "", Malformed{EText: fmt.Sprintf("Not enough bytes. Max: %d, Offset: %d, Actual: %d", m, o, a)} + } + //Unicode string so each element is 2 bytes + //move position based on the offset + if o > 0 { + *p += int(o * 2) + } + s := make([]rune, a, a) + for i := 0; i < len(s); i++ { + s[i] = rune(ReadUint16(b, p, e)) + } + ensureAlignment(p, 4) + return string(s), nil +} + +// ReadUniDimensionalConformantArrayHeader reads a UniDimensionalConformantArrayHeader from the bytes slice. +func ReadUniDimensionalConformantArrayHeader(b *[]byte, p *int, e *binary.ByteOrder) int { + return int(ReadUint32(b, p, e)) +} + +func ensureAlignment(p *int, byteSize int) { + if byteSize > 0 { + if s := *p % byteSize; s != 0 { + *p += byteSize - s + } + } +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_claims.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_claims.go new file mode 100644 index 00000000..54d70944 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_claims.go @@ -0,0 +1,38 @@ +package pac + +import ( + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/mstypes" + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// ClientClaimsInfo implements https://msdn.microsoft.com/en-us/library/hh536365.aspx +type ClientClaimsInfo struct { + Claims mstypes.ClaimsSetMetadata +} + +// Unmarshal bytes into the ClientClaimsInfo struct +func (k *ClientClaimsInfo) Unmarshal(b []byte) error { + ch, _, p, err := ndr.ReadHeaders(&b) + if err != nil { + return fmt.Errorf("error parsing byte stream headers: %v", err) + } + e := &ch.Endianness + + //The next 4 bytes are an RPC unique pointer referent. We just skip these + p += 4 + + k.Claims = mstypes.ReadClaimsSetMetadata(&b, &p, e) + + //Check that there is only zero padding left + if len(b) >= p { + for _, v := range b[p:] { + if v != 0 { + return ndr.Malformed{EText: "Non-zero padding left over at end of data stream"} + } + } + } + + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_info.go new file mode 100644 index 00000000..fd925db5 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_info.go @@ -0,0 +1,45 @@ +package pac + +import ( + "encoding/binary" + + "gopkg.in/jcmturner/gokrb5.v5/mstypes" + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// ClientInfo implements https://msdn.microsoft.com/en-us/library/cc237951.aspx +type ClientInfo struct { + ClientID mstypes.FileTime // A FILETIME structure in little-endian format that contains the Kerberos initial ticket-granting ticket TGT authentication time + NameLength uint16 // An unsigned 16-bit integer in little-endian format that specifies the length, in bytes, of the Name field. + Name string // An array of 16-bit Unicode characters in little-endian format that contains the client's account name. +} + +// Unmarshal bytes into the ClientInfo struct +func (k *ClientInfo) Unmarshal(b []byte) error { + //The PAC_CLIENT_INFO structure is a simple structure that is not NDR-encoded. + var p int + var e binary.ByteOrder = binary.LittleEndian + + k.ClientID = mstypes.ReadFileTime(&b, &p, &e) + k.NameLength = ndr.ReadUint16(&b, &p, &e) + if len(b[p:]) < int(k.NameLength) { + return ndr.Malformed{EText: "PAC ClientInfo length truncated"} + } + //Length divided by 2 as each run is 16bits = 2bytes + s := make([]rune, k.NameLength/2, k.NameLength/2) + for i := 0; i < len(s); i++ { + s[i] = rune(ndr.ReadUint16(&b, &p, &e)) + } + k.Name = string(s) + + //Check that there is only zero padding left + if len(b) >= p { + for _, v := range b[p:] { + if v != 0 { + return ndr.Malformed{EText: "Non-zero padding left over at end of data stream"} + } + } + } + + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/credentials_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/credentials_info.go new file mode 100644 index 00000000..ff89d34c --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/credentials_info.go @@ -0,0 +1,132 @@ +package pac + +import ( + "encoding/binary" + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" + "gopkg.in/jcmturner/gokrb5.v5/mstypes" + "gopkg.in/jcmturner/gokrb5.v5/ndr" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// https://msdn.microsoft.com/en-us/library/cc237931.aspx + +// CredentialsInfo implements https://msdn.microsoft.com/en-us/library/cc237953.aspx +type CredentialsInfo struct { + Version uint32 // A 32-bit unsigned integer in little-endian format that defines the version. MUST be 0x00000000. + EType uint32 + PACCredentialDataEncrypted []byte // Key usage number for encryption: KERB_NON_KERB_SALT (16) + PACCredentialData CredentialData +} + +// Unmarshal bytes into the CredentialsInfo struct +func (c *CredentialsInfo) Unmarshal(b []byte, k types.EncryptionKey) error { + ch, _, p, err := ndr.ReadHeaders(&b) + if err != nil { + return fmt.Errorf("error parsing byte stream headers: %v", err) + } + e := &ch.Endianness + + //The next 4 bytes are an RPC unique pointer referent. We just skip these + p += 4 + + c.Version = ndr.ReadUint32(&b, &p, e) + c.EType = ndr.ReadUint32(&b, &p, e) + c.PACCredentialDataEncrypted = ndr.ReadBytes(&b, &p, len(b)-p, e) + + err = c.DecryptEncPart(k, e) + if err != nil { + return fmt.Errorf("error decrypting PAC Credentials Data: %v", err) + } + return nil +} + +// DecryptEncPart decrypts the encrypted part of the CredentialsInfo. +func (c *CredentialsInfo) DecryptEncPart(k types.EncryptionKey, e *binary.ByteOrder) error { + if k.KeyType != int32(c.EType) { + return fmt.Errorf("key provided is not the correct type. Type needed: %d, type provided: %d", c.EType, k.KeyType) + } + pt, err := crypto.DecryptMessage(c.PACCredentialDataEncrypted, k, keyusage.KERB_NON_KERB_SALT) + if err != nil { + return err + } + var p int + c.PACCredentialData = ReadPACCredentialData(&pt, &p, e) + return nil +} + +// CredentialData implements https://msdn.microsoft.com/en-us/library/cc237952.aspx +// This structure is encrypted prior to being encoded in any other structures. +// Encryption is performed by first serializing the data structure via Network Data Representation (NDR) encoding, as specified in [MS-RPCE]. +// Once serialized, the data is encrypted using the key and cryptographic system selected through the AS protocol and the KRB_AS_REP message +// Fields (for capturing this information) and cryptographic parameters are specified in PAC_CREDENTIAL_INFO (section 2.6.1). +type CredentialData struct { + CredentialCount uint32 + Credentials []SECPKGSupplementalCred // Size is the value of CredentialCount +} + +// ReadPACCredentialData reads a CredentialData from the byte slice. +func ReadPACCredentialData(b *[]byte, p *int, e *binary.ByteOrder) CredentialData { + c := ndr.ReadUint32(b, p, e) + cr := make([]SECPKGSupplementalCred, c, c) + for i := range cr { + cr[i] = ReadSECPKGSupplementalCred(b, p, e) + } + return CredentialData{ + CredentialCount: c, + Credentials: cr, + } +} + +// SECPKGSupplementalCred implements https://msdn.microsoft.com/en-us/library/cc237956.aspx +type SECPKGSupplementalCred struct { + PackageName mstypes.RPCUnicodeString + CredentialSize uint32 + Credentials []uint8 // Is a ptr. Size is the value of CredentialSize +} + +// ReadSECPKGSupplementalCred reads a SECPKGSupplementalCred from the byte slice. +func ReadSECPKGSupplementalCred(b *[]byte, p *int, e *binary.ByteOrder) SECPKGSupplementalCred { + n, _ := mstypes.ReadRPCUnicodeString(b, p, e) + cs := ndr.ReadUint32(b, p, e) + c := make([]uint8, cs, cs) + for i := range c { + c[i] = ndr.ReadUint8(b, p) + } + return SECPKGSupplementalCred{ + PackageName: n, + CredentialSize: cs, + Credentials: c, + } +} + +// NTLMSupplementalCred implements https://msdn.microsoft.com/en-us/library/cc237949.aspx +type NTLMSupplementalCred struct { + Version uint32 // A 32-bit unsigned integer that defines the credential version.This field MUST be 0x00000000. + Flags uint32 + LMPassword []byte // A 16-element array of unsigned 8-bit integers that define the LM OWF. The LmPassword member MUST be ignored if the L flag is not set in the Flags member. + NTPassword []byte // A 16-element array of unsigned 8-bit integers that define the NT OWF. The LtPassword member MUST be ignored if the N flag is not set in the Flags member. +} + +// ReadNTLMSupplementalCred reads a NTLMSupplementalCred from the byte slice. +func ReadNTLMSupplementalCred(b *[]byte, p *int, e *binary.ByteOrder) NTLMSupplementalCred { + v := ndr.ReadUint32(b, p, e) + f := ndr.ReadUint32(b, p, e) + l := ndr.ReadBytes(b, p, 16, e) + n := ndr.ReadBytes(b, p, 16, e) + return NTLMSupplementalCred{ + Version: v, + Flags: f, + LMPassword: l, + NTPassword: n, + } +} + +const ( + // NTLMSupCredLMOWF indicates that the LM OWF member is present and valid. + NTLMSupCredLMOWF = 31 + // NTLMSupCredNTOWF indicates that the NT OWF member is present and valid. + NTLMSupCredNTOWF = 30 +) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_claims.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_claims.go new file mode 100644 index 00000000..3a6699a8 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_claims.go @@ -0,0 +1,38 @@ +package pac + +import ( + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/mstypes" + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// DeviceClaimsInfo implements https://msdn.microsoft.com/en-us/library/hh554226.aspx +type DeviceClaimsInfo struct { + Claims mstypes.ClaimsSetMetadata +} + +// Unmarshal bytes into the DeviceClaimsInfo struct +func (k *DeviceClaimsInfo) Unmarshal(b []byte) error { + ch, _, p, err := ndr.ReadHeaders(&b) + if err != nil { + return fmt.Errorf("error parsing byte stream headers: %v", err) + } + e := &ch.Endianness + + //The next 4 bytes are an RPC unique pointer referent. We just skip these + p += 4 + + k.Claims = mstypes.ReadClaimsSetMetadata(&b, &p, e) + + //Check that there is only zero padding left + if len(b) >= p { + for _, v := range b[p:] { + if v != 0 { + return ndr.Malformed{EText: "non-zero padding left over at end of data stream"} + } + } + } + + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_info.go new file mode 100644 index 00000000..9155525a --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_info.go @@ -0,0 +1,93 @@ +package pac + +import ( + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/mstypes" + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// DeviceInfo implements https://msdn.microsoft.com/en-us/library/hh536402.aspx +type DeviceInfo struct { + UserID uint32 // A 32-bit unsigned integer that contains the RID of the account. If the UserId member equals 0x00000000, the first group SID in this member is the SID for this account. + PrimaryGroupID uint32 // A 32-bit unsigned integer that contains the RID for the primary group to which this account belongs. + AccountDomainID mstypes.RPCSID // A SID structure that contains the SID for the domain of the account.This member is used in conjunction with the UserId, and GroupIds members to create the user and group SIDs for the client. + AccountGroupCount uint32 // A 32-bit unsigned integer that contains the number of groups within the account domain to which the account belongs + AccountGroupIDs []mstypes.GroupMembership // A pointer to a list of GROUP_MEMBERSHIP (section 2.2.2) structures that contains the groups to which the account belongs in the account domain. The number of groups in this list MUST be equal to GroupCount. + SIDCount uint32 // A 32-bit unsigned integer that contains the total number of SIDs present in the ExtraSids member. + ExtraSIDs []mstypes.KerbSidAndAttributes // A pointer to a list of KERB_SID_AND_ATTRIBUTES structures that contain a list of SIDs corresponding to groups not in domains. If the UserId member equals 0x00000000, the first group SID in this member is the SID for this account. + DomainGroupCount uint32 // A 32-bit unsigned integer that contains the number of domains with groups to which the account belongs. + DomainGroup []mstypes.DomainGroupMembership // A pointer to a list of DOMAIN_GROUP_MEMBERSHIP structures (section 2.2.3) that contains the domains to which the account belongs to a group. The number of sets in this list MUST be equal to DomainCount. +} + +// Unmarshal bytes into the DeviceInfo struct +func (k *DeviceInfo) Unmarshal(b []byte) error { + ch, _, p, err := ndr.ReadHeaders(&b) + if err != nil { + return fmt.Errorf("error parsing byte stream headers: %v", err) + } + e := &ch.Endianness + + //The next 4 bytes are an RPC unique pointer referent. We just skip these + p += 4 + + k.UserID = ndr.ReadUint32(&b, &p, e) + k.PrimaryGroupID = ndr.ReadUint32(&b, &p, e) + k.AccountDomainID, err = mstypes.ReadRPCSID(&b, &p, e) + if err != nil { + return err + } + k.AccountGroupCount = ndr.ReadUint32(&b, &p, e) + if k.AccountGroupCount > 0 { + ag := make([]mstypes.GroupMembership, k.AccountGroupCount, k.AccountGroupCount) + for i := range ag { + ag[i] = mstypes.ReadGroupMembership(&b, &p, e) + } + k.AccountGroupIDs = ag + } + + k.SIDCount = ndr.ReadUint32(&b, &p, e) + if k.SIDCount > 0 { + ac := ndr.ReadUniDimensionalConformantArrayHeader(&b, &p, e) + if ac != int(k.SIDCount) { + return fmt.Errorf("error with size of ExtraSIDs list. expected: %d, Actual: %d", k.SIDCount, ac) + } + es := make([]mstypes.KerbSidAndAttributes, k.SIDCount, k.SIDCount) + attr := make([]uint32, k.SIDCount, k.SIDCount) + ptr := make([]uint32, k.SIDCount, k.SIDCount) + for i := range attr { + ptr[i] = ndr.ReadUint32(&b, &p, e) + attr[i] = ndr.ReadUint32(&b, &p, e) + } + for i := range es { + if ptr[i] != 0 { + s, err := mstypes.ReadRPCSID(&b, &p, e) + es[i] = mstypes.KerbSidAndAttributes{SID: s, Attributes: attr[i]} + if err != nil { + return ndr.Malformed{EText: fmt.Sprintf("could not read ExtraSIDs: %v", err)} + } + } + } + k.ExtraSIDs = es + } + + k.DomainGroupCount = ndr.ReadUint32(&b, &p, e) + if k.DomainGroupCount > 0 { + dg := make([]mstypes.DomainGroupMembership, k.DomainGroupCount, k.DomainGroupCount) + for i := range dg { + dg[i], _ = mstypes.ReadDomainGroupMembership(&b, &p, e) + } + k.DomainGroup = dg + } + + //Check that there is only zero padding left + if len(b) >= p { + for _, v := range b[p:] { + if v != 0 { + return ndr.Malformed{EText: "non-zero padding left over at end of data stream"} + } + } + } + + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/kerb_validation_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/kerb_validation_info.go new file mode 100644 index 00000000..c7916a8e --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/kerb_validation_info.go @@ -0,0 +1,286 @@ +// Package pac implements Microsoft Privilege Attribute Certificate (PAC) processing. +package pac + +import ( + "errors" + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/mstypes" + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// KERB_VALIDATION_INFO flags. +const ( + USERFLAG_GUEST = 31 // Authentication was done via the GUEST account; no password was used. + USERFLAG_NO_ENCRYPTION_AVAILABLE = 30 // No encryption is available. + USERFLAG_LAN_MANAGER_KEY = 28 // LAN Manager key was used for authentication. + USERFLAG_SUB_AUTH = 25 // Sub-authentication used; session key came from the sub-authentication package. + USERFLAG_EXTRA_SIDS = 26 // Indicates that the ExtraSids field is populated and contains additional SIDs. + USERFLAG_MACHINE_ACCOUNT = 24 // Indicates that the account is a machine account. + USERFLAG_DC_NTLM2 = 23 // Indicates that the domain controller understands NTLMv2. + USERFLAG_RESOURCE_GROUPIDS = 22 // Indicates that the ResourceGroupIds field is populated. + USERFLAG_PROFILEPATH = 21 // Indicates that ProfilePath is populated. + USERFLAG_NTLM2_NTCHALLENGERESP = 20 // The NTLMv2 response from the NtChallengeResponseFields ([MS-NLMP] section 2.2.1.3) was used for authentication and session key generation. + USERFLAG_LM2_LMCHALLENGERESP = 19 // The LMv2 response from the LmChallengeResponseFields ([MS-NLMP] section 2.2.1.3) was used for authentication and session key generation. + USERFLAG_AUTH_LMCHALLENGERESP_KEY_NTCHALLENGERESP = 18 // The LMv2 response from the LmChallengeResponseFields ([MS-NLMP] section 2.2.1.3) was used for authentication and the NTLMv2 response from the NtChallengeResponseFields ([MS-NLMP] section 2.2.1.3) was used session key generation. +) + +// KerbValidationInfo implement https://msdn.microsoft.com/en-us/library/cc237948.aspx +// The KERB_VALIDATION_INFO structure defines the user's logon and authorization information +// provided by the DC. The KERB_VALIDATION_INFO structure is a subset of the +// NETLOGON_VALIDATION_SAM_INFO4 structure ([MS-NRPC] section 2.2.1.4.13). +// It is a subset due to historical reasons and to the use of the common Active Directory to generate this information. +// The KERB_VALIDATION_INFO structure is marshaled by RPC [MS-RPCE]. +type KerbValidationInfo struct { + LogOnTime mstypes.FileTime + LogOffTime mstypes.FileTime + KickOffTime mstypes.FileTime + PasswordLastSet mstypes.FileTime + PasswordCanChange mstypes.FileTime + PasswordMustChange mstypes.FileTime + EffectiveName mstypes.RPCUnicodeString + FullName mstypes.RPCUnicodeString + LogonScript mstypes.RPCUnicodeString + ProfilePath mstypes.RPCUnicodeString + HomeDirectory mstypes.RPCUnicodeString + HomeDirectoryDrive mstypes.RPCUnicodeString + LogonCount uint16 + BadPasswordCount uint16 + UserID uint32 + PrimaryGroupID uint32 + GroupCount uint32 + pGroupIDs uint32 + GroupIDs []mstypes.GroupMembership + UserFlags uint32 + UserSessionKey mstypes.UserSessionKey + LogonServer mstypes.RPCUnicodeString + LogonDomainName mstypes.RPCUnicodeString + pLogonDomainID uint32 + LogonDomainID mstypes.RPCSID + Reserved1 []uint32 // Has 2 elements + UserAccountControl uint32 + SubAuthStatus uint32 + LastSuccessfulILogon mstypes.FileTime + LastFailedILogon mstypes.FileTime + FailedILogonCount uint32 + Reserved3 uint32 + SIDCount uint32 + pExtraSIDs uint32 + ExtraSIDs []mstypes.KerbSidAndAttributes + pResourceGroupDomainSID uint32 + ResourceGroupDomainSID mstypes.RPCSID + ResourceGroupCount uint32 + pResourceGroupIDs uint32 + ResourceGroupIDs []mstypes.GroupMembership +} + +// Unmarshal bytes into the DeviceInfo struct +func (k *KerbValidationInfo) Unmarshal(b []byte) (err error) { + ch, _, p, err := ndr.ReadHeaders(&b) + if err != nil { + return fmt.Errorf("error parsing byte stream headers: %v", err) + } + e := &ch.Endianness + + //The next 4 bytes are an RPC unique pointer referent. We just skip these + p += 4 + + k.LogOnTime = mstypes.ReadFileTime(&b, &p, e) + k.LogOffTime = mstypes.ReadFileTime(&b, &p, e) + k.KickOffTime = mstypes.ReadFileTime(&b, &p, e) + k.PasswordLastSet = mstypes.ReadFileTime(&b, &p, e) + k.PasswordCanChange = mstypes.ReadFileTime(&b, &p, e) + k.PasswordMustChange = mstypes.ReadFileTime(&b, &p, e) + + if k.EffectiveName, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { + return + } + if k.FullName, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { + return + } + if k.LogonScript, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { + return + } + if k.ProfilePath, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { + return + } + if k.HomeDirectory, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { + return + } + if k.HomeDirectoryDrive, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { + return + } + + k.LogonCount = ndr.ReadUint16(&b, &p, e) + k.BadPasswordCount = ndr.ReadUint16(&b, &p, e) + k.UserID = ndr.ReadUint32(&b, &p, e) + k.PrimaryGroupID = ndr.ReadUint32(&b, &p, e) + k.GroupCount = ndr.ReadUint32(&b, &p, e) + k.pGroupIDs = ndr.ReadUint32(&b, &p, e) + + k.UserFlags = ndr.ReadUint32(&b, &p, e) + k.UserSessionKey = mstypes.ReadUserSessionKey(&b, &p, e) + + if k.LogonServer, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { + return + } + if k.LogonDomainName, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { + return + } + + k.pLogonDomainID = ndr.ReadUint32(&b, &p, e) + + k.Reserved1 = []uint32{ + ndr.ReadUint32(&b, &p, e), + ndr.ReadUint32(&b, &p, e), + } + + k.UserAccountControl = ndr.ReadUint32(&b, &p, e) + k.SubAuthStatus = ndr.ReadUint32(&b, &p, e) + k.LastSuccessfulILogon = mstypes.ReadFileTime(&b, &p, e) + k.LastFailedILogon = mstypes.ReadFileTime(&b, &p, e) + k.FailedILogonCount = ndr.ReadUint32(&b, &p, e) + k.Reserved3 = ndr.ReadUint32(&b, &p, e) + + k.SIDCount = ndr.ReadUint32(&b, &p, e) + k.pExtraSIDs = ndr.ReadUint32(&b, &p, e) + + k.pResourceGroupDomainSID = ndr.ReadUint32(&b, &p, e) + k.ResourceGroupCount = ndr.ReadUint32(&b, &p, e) + k.pResourceGroupIDs = ndr.ReadUint32(&b, &p, e) + + // Populate pointers + if err = k.EffectiveName.UnmarshalString(&b, &p, e); err != nil { + return + } + if err = k.FullName.UnmarshalString(&b, &p, e); err != nil { + return + } + if err = k.LogonScript.UnmarshalString(&b, &p, e); err != nil { + return + } + if err = k.ProfilePath.UnmarshalString(&b, &p, e); err != nil { + return + } + if err = k.HomeDirectory.UnmarshalString(&b, &p, e); err != nil { + return + } + if err = k.HomeDirectoryDrive.UnmarshalString(&b, &p, e); err != nil { + return + } + + if k.GroupCount > 0 { + ac := ndr.ReadUniDimensionalConformantArrayHeader(&b, &p, e) + if ac != int(k.GroupCount) { + return errors.New("error with size of group list") + } + g := make([]mstypes.GroupMembership, k.GroupCount, k.GroupCount) + for i := range g { + g[i] = mstypes.ReadGroupMembership(&b, &p, e) + } + k.GroupIDs = g + } + + if err = k.LogonServer.UnmarshalString(&b, &p, e); err != nil { + return + } + if err = k.LogonDomainName.UnmarshalString(&b, &p, e); err != nil { + return + } + + if k.pLogonDomainID != 0 { + k.LogonDomainID, err = mstypes.ReadRPCSID(&b, &p, e) + if err != nil { + return fmt.Errorf("error reading LogonDomainID: %v", err) + } + } + + if k.SIDCount > 0 { + ac := ndr.ReadUniDimensionalConformantArrayHeader(&b, &p, e) + if ac != int(k.SIDCount) { + return fmt.Errorf("error with size of ExtraSIDs list. Expected: %d, Actual: %d", k.SIDCount, ac) + } + es := make([]mstypes.KerbSidAndAttributes, k.SIDCount, k.SIDCount) + attr := make([]uint32, k.SIDCount, k.SIDCount) + ptr := make([]uint32, k.SIDCount, k.SIDCount) + for i := range attr { + ptr[i] = ndr.ReadUint32(&b, &p, e) + attr[i] = ndr.ReadUint32(&b, &p, e) + } + for i := range es { + if ptr[i] != 0 { + s, err := mstypes.ReadRPCSID(&b, &p, e) + es[i] = mstypes.KerbSidAndAttributes{SID: s, Attributes: attr[i]} + if err != nil { + return ndr.Malformed{EText: fmt.Sprintf("could not read ExtraSIDs: %v", err)} + } + } + } + k.ExtraSIDs = es + } + + if k.pResourceGroupDomainSID != 0 { + k.ResourceGroupDomainSID, err = mstypes.ReadRPCSID(&b, &p, e) + if err != nil { + return err + } + } + + if k.ResourceGroupCount > 0 { + ac := ndr.ReadUniDimensionalConformantArrayHeader(&b, &p, e) + if ac != int(k.ResourceGroupCount) { + return fmt.Errorf("error with size of ResourceGroup list. Expected: %d, Actual: %d", k.ResourceGroupCount, ac) + } + g := make([]mstypes.GroupMembership, ac, ac) + for i := range g { + g[i] = mstypes.ReadGroupMembership(&b, &p, e) + } + k.ResourceGroupIDs = g + } + + //Check that there is only zero padding left + if len(b) >= p { + for _, v := range b[p:] { + if v != 0 { + return ndr.Malformed{EText: "non-zero padding left over at end of data stream"} + } + } + } + + return nil +} + +// GetGroupMembershipSIDs returns a slice of strings containing the group membership SIDs found in the PAC. +func (k *KerbValidationInfo) GetGroupMembershipSIDs() []string { + var g []string + lSID := k.LogonDomainID.ToString() + for i := range k.GroupIDs { + g = append(g, fmt.Sprintf("%s-%d", lSID, k.GroupIDs[i].RelativeID)) + } + for _, s := range k.ExtraSIDs { + var exists = false + for _, es := range g { + if es == s.SID.ToString() { + exists = true + break + } + } + if !exists { + g = append(g, s.SID.ToString()) + } + } + for _, r := range k.ResourceGroupIDs { + var exists = false + s := fmt.Sprintf("%s-%d", k.ResourceGroupDomainSID.ToString(), r.RelativeID) + for _, es := range g { + if es == s { + exists = true + break + } + } + if !exists { + g = append(g, s) + } + } + return g +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_info_buffer.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_info_buffer.go new file mode 100644 index 00000000..70cd68f7 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_info_buffer.go @@ -0,0 +1,39 @@ +package pac + +import ( + "encoding/binary" + + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +const ( + ulTypeKerbValidationInfo = 1 + ulTypeCredentials = 2 + ulTypePACServerSignatureData = 6 + ulTypePACKDCSignatureData = 7 + ulTypePACClientInfo = 10 + ulTypeS4UDelegationInfo = 11 + ulTypeUPNDNSInfo = 12 + ulTypePACClientClaimsInfo = 13 + ulTypePACDeviceInfo = 14 + ulTypePACDeviceClaimsInfo = 15 +) + +// InfoBuffer implements the PAC Info Buffer: https://msdn.microsoft.com/en-us/library/cc237954.aspx +type InfoBuffer struct { + ULType uint32 // A 32-bit unsigned integer in little-endian format that describes the type of data present in the buffer contained at Offset. + CBBufferSize uint32 // A 32-bit unsigned integer in little-endian format that contains the size, in bytes, of the buffer in the PAC located at Offset. + Offset uint64 // A 64-bit unsigned integer in little-endian format that contains the offset to the beginning of the buffer, in bytes, from the beginning of the PACTYPE structure. The data offset MUST be a multiple of eight. The following sections specify the format of each type of element. +} + +// ReadPACInfoBuffer reads a InfoBuffer from the byte slice. +func ReadPACInfoBuffer(b *[]byte, p *int, e *binary.ByteOrder) InfoBuffer { + u := ndr.ReadUint32(b, p, e) + s := ndr.ReadUint32(b, p, e) + o := ndr.ReadUint64(b, p, e) + return InfoBuffer{ + ULType: u, + CBBufferSize: s, + Offset: o, + } +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_type.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_type.go new file mode 100644 index 00000000..ea2a8ad4 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_type.go @@ -0,0 +1,205 @@ +package pac + +import ( + "encoding/binary" + "errors" + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/crypto" + "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" + "gopkg.in/jcmturner/gokrb5.v5/ndr" + "gopkg.in/jcmturner/gokrb5.v5/types" +) + +// PACType implements: https://msdn.microsoft.com/en-us/library/cc237950.aspx +type PACType struct { + CBuffers uint32 + Version uint32 + Buffers []InfoBuffer + Data []byte + KerbValidationInfo *KerbValidationInfo + CredentialsInfo *CredentialsInfo + ServerChecksum *SignatureData + KDCChecksum *SignatureData + ClientInfo *ClientInfo + S4UDelegationInfo *S4UDelegationInfo + UPNDNSInfo *UPNDNSInfo + ClientClaimsInfo *ClientClaimsInfo + DeviceInfo *DeviceInfo + DeviceClaimsInfo *DeviceClaimsInfo + ZeroSigData []byte +} + +// Unmarshal bytes into the PACType struct +func (pac *PACType) Unmarshal(b []byte) error { + var p int + var e binary.ByteOrder = binary.LittleEndian + pac.Data = b + zb := make([]byte, len(b), len(b)) + copy(zb, b) + pac.ZeroSigData = zb + pac.CBuffers = ndr.ReadUint32(&b, &p, &e) + pac.Version = ndr.ReadUint32(&b, &p, &e) + buf := make([]InfoBuffer, pac.CBuffers, pac.CBuffers) + for i := range buf { + buf[i] = ReadPACInfoBuffer(&b, &p, &e) + } + pac.Buffers = buf + return nil +} + +// ProcessPACInfoBuffers processes the PAC Info Buffers. +// https://msdn.microsoft.com/en-us/library/cc237954.aspx +func (pac *PACType) ProcessPACInfoBuffers(key types.EncryptionKey) error { + for _, buf := range pac.Buffers { + p := make([]byte, buf.CBBufferSize, buf.CBBufferSize) + copy(p, pac.Data[int(buf.Offset):int(buf.Offset)+int(buf.CBBufferSize)]) + switch int(buf.ULType) { + case ulTypeKerbValidationInfo: + if pac.KerbValidationInfo != nil { + //Must ignore subsequent buffers of this type + continue + } + var k KerbValidationInfo + err := k.Unmarshal(p) + if err != nil { + return fmt.Errorf("error processing KerbValidationInfo: %v", err) + } + pac.KerbValidationInfo = &k + case ulTypeCredentials: + if pac.CredentialsInfo != nil { + //Must ignore subsequent buffers of this type + continue + } + var k CredentialsInfo + err := k.Unmarshal(p, key) + if err != nil { + return fmt.Errorf("error processing CredentialsInfo: %v", err) + } + pac.CredentialsInfo = &k + case ulTypePACServerSignatureData: + if pac.ServerChecksum != nil { + //Must ignore subsequent buffers of this type + continue + } + var k SignatureData + zb, err := k.Unmarshal(p) + copy(pac.ZeroSigData[int(buf.Offset):int(buf.Offset)+int(buf.CBBufferSize)], zb) + if err != nil { + return fmt.Errorf("error processing ServerChecksum: %v", err) + } + pac.ServerChecksum = &k + case ulTypePACKDCSignatureData: + if pac.KDCChecksum != nil { + //Must ignore subsequent buffers of this type + continue + } + var k SignatureData + zb, err := k.Unmarshal(p) + copy(pac.ZeroSigData[int(buf.Offset):int(buf.Offset)+int(buf.CBBufferSize)], zb) + if err != nil { + return fmt.Errorf("error processing KDCChecksum: %v", err) + } + pac.KDCChecksum = &k + case ulTypePACClientInfo: + if pac.ClientInfo != nil { + //Must ignore subsequent buffers of this type + continue + } + var k ClientInfo + err := k.Unmarshal(p) + if err != nil { + return fmt.Errorf("error processing ClientInfo: %v", err) + } + pac.ClientInfo = &k + case ulTypeS4UDelegationInfo: + if pac.S4UDelegationInfo != nil { + //Must ignore subsequent buffers of this type + continue + } + var k S4UDelegationInfo + err := k.Unmarshal(p) + if err != nil { + return fmt.Errorf("error processing S4U_DelegationInfo: %v", err) + } + pac.S4UDelegationInfo = &k + case ulTypeUPNDNSInfo: + if pac.UPNDNSInfo != nil { + //Must ignore subsequent buffers of this type + continue + } + var k UPNDNSInfo + err := k.Unmarshal(p) + if err != nil { + return fmt.Errorf("error processing UPN_DNSInfo: %v", err) + } + pac.UPNDNSInfo = &k + case ulTypePACClientClaimsInfo: + if pac.ClientClaimsInfo != nil { + //Must ignore subsequent buffers of this type + continue + } + var k ClientClaimsInfo + err := k.Unmarshal(p) + if err != nil { + return fmt.Errorf("error processing ClientClaimsInfo: %v", err) + } + pac.ClientClaimsInfo = &k + case ulTypePACDeviceInfo: + if pac.DeviceInfo != nil { + //Must ignore subsequent buffers of this type + continue + } + var k DeviceInfo + err := k.Unmarshal(p) + if err != nil { + return fmt.Errorf("error processing DeviceInfo: %v", err) + } + pac.DeviceInfo = &k + case ulTypePACDeviceClaimsInfo: + if pac.DeviceClaimsInfo != nil { + //Must ignore subsequent buffers of this type + continue + } + var k DeviceClaimsInfo + err := k.Unmarshal(p) + if err != nil { + return fmt.Errorf("error processing DeviceClaimsInfo: %v", err) + } + pac.DeviceClaimsInfo = &k + } + } + + if ok, err := pac.validate(key); !ok { + return err + } + + return nil +} + +func (pac *PACType) validate(key types.EncryptionKey) (bool, error) { + if pac.KerbValidationInfo == nil { + return false, errors.New("PAC Info Buffers does not contain a KerbValidationInfo") + } + if pac.ServerChecksum == nil { + return false, errors.New("PAC Info Buffers does not contain a ServerChecksum") + } + if pac.KDCChecksum == nil { + return false, errors.New("PAC Info Buffers does not contain a KDCChecksum") + } + if pac.ClientInfo == nil { + return false, errors.New("PAC Info Buffers does not contain a ClientInfo") + } + etype, err := crypto.GetChksumEtype(int32(pac.ServerChecksum.SignatureType)) + if err != nil { + return false, err + } + if ok := etype.VerifyChecksum(key.KeyValue, + pac.ZeroSigData, + pac.ServerChecksum.Signature, + keyusage.KERB_NON_KERB_CKSUM_SALT); !ok { + return false, errors.New("PAC service checksum verification failed") + } + + return true, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/s4u_delegation_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/s4u_delegation_info.go new file mode 100644 index 00000000..e13fea2f --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/s4u_delegation_info.go @@ -0,0 +1,55 @@ +package pac + +import ( + "fmt" + + "gopkg.in/jcmturner/gokrb5.v5/mstypes" + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// S4UDelegationInfo implements https://msdn.microsoft.com/en-us/library/cc237944.aspx +type S4UDelegationInfo struct { + S4U2proxyTarget mstypes.RPCUnicodeString // The name of the principal to whom the application can forward the ticket. + TransitedListSize uint32 + S4UTransitedServices []mstypes.RPCUnicodeString // List of all services that have been delegated through by this client and subsequent services or servers.. Size is value of TransitedListSize +} + +// Unmarshal bytes into the S4UDelegationInfo struct +func (k *S4UDelegationInfo) Unmarshal(b []byte) error { + ch, _, p, err := ndr.ReadHeaders(&b) + if err != nil { + return fmt.Errorf("error parsing byte stream headers: %v", err) + } + e := &ch.Endianness + + //The next 4 bytes are an RPC unique pointer referent. We just skip these + p += 4 + + k.S4U2proxyTarget, err = mstypes.ReadRPCUnicodeString(&b, &p, e) + if err != nil { + return err + } + k.TransitedListSize = ndr.ReadUint32(&b, &p, e) + if k.TransitedListSize > 0 { + ts := make([]mstypes.RPCUnicodeString, k.TransitedListSize, k.TransitedListSize) + for i := range ts { + ts[i], err = mstypes.ReadRPCUnicodeString(&b, &p, e) + if err != nil { + return err + } + } + for i := range ts { + ts[i].UnmarshalString(&b, &p, e) + } + k.S4UTransitedServices = ts + } + + //Check that there is only zero padding left + for _, v := range b[p:] { + if v != 0 { + return ndr.Malformed{EText: "non-zero padding left over at end of data stream"} + } + } + + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/signature_data.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/signature_data.go new file mode 100644 index 00000000..3b588dd7 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/signature_data.go @@ -0,0 +1,74 @@ +package pac + +import ( + "encoding/binary" + + "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +/* +https://msdn.microsoft.com/en-us/library/cc237955.aspx + +The Key Usage Value MUST be KERB_NON_KERB_CKSUM_SALT (17) [MS-KILE] (section 3.1.5.9). + +Server Signature (SignatureType = 0x00000006) +https://msdn.microsoft.com/en-us/library/cc237957.aspx +The KDC will use the long-term key that the KDC shares with the server, so that the server can verify this signature on receiving a PAC. +The server signature is a keyed hash [RFC4757] of the entire PAC message, with the Signature fields of both PAC_SIGNATURE_DATA structures set to zero. +The key used to protect the ciphertext part of the response is used. +The checksum type corresponds to the key unless the key is DES, in which case the KERB_CHECKSUM_HMAC_MD5 key is used. +The resulting hash value is then placed in the Signature field of the server's PAC_SIGNATURE_DATA structure. + +KDC Signature (SignatureType = 0x00000007) +https://msdn.microsoft.com/en-us/library/dd357117.aspx +The KDC will use KDC (krbtgt) key [RFC4120], so that other KDCs can verify this signature on receiving a PAC. +The KDC signature is a keyed hash [RFC4757] of the Server Signature field in the PAC message. +The cryptographic system that is used to calculate the checksum depends on which system the KDC supports, as defined below: +- Supports RC4-HMAC --> KERB_CHECKSUM_HMAC_MD5 +- Does not support RC4-HMAC and supports AES256 --> HMAC_SHA1_96_AES256 +- Does not support RC4-HMAC or AES256-CTS-HMAC-SHA1-96, and supports AES128-CTS-HMAC-SHA1-96 --> HMAC_SHA1_96_AES128 +- Does not support RC4-HMAC, AES128-CTS-HMAC-SHA1-96 or AES256-CTS-HMAC-SHA1-96 --> None. The checksum operation will fail. +*/ + +// SignatureData implements https://msdn.microsoft.com/en-us/library/cc237955.aspx +type SignatureData struct { + SignatureType uint32 // A 32-bit unsigned integer value in little-endian format that defines the cryptographic system used to calculate the checksum. This MUST be one of the following checksum types: KERB_CHECKSUM_HMAC_MD5 (signature size = 16), HMAC_SHA1_96_AES128 (signature size = 12), HMAC_SHA1_96_AES256 (signature size = 12). + Signature []byte // Size depends on the type. See comment above. + RODCIdentifier uint16 // A 16-bit unsigned integer value in little-endian format that contains the first 16 bits of the key version number ([MS-KILE] section 3.1.5.8) when the KDC is an RODC. When the KDC is not an RODC, this field does not exist. +} + +// Unmarshal bytes into the SignatureData struct +func (k *SignatureData) Unmarshal(b []byte) ([]byte, error) { + var p int + var e binary.ByteOrder = binary.LittleEndian + + k.SignatureType = ndr.ReadUint32(&b, &p, &e) + var c int + switch k.SignatureType { + case chksumtype.KERB_CHECKSUM_HMAC_MD5_UNSIGNED: + c = 16 + case uint32(chksumtype.HMAC_SHA1_96_AES128): + c = 12 + case uint32(chksumtype.HMAC_SHA1_96_AES256): + c = 12 + } + sp := p + k.Signature = ndr.ReadBytes(&b, &p, c, &e) + k.RODCIdentifier = ndr.ReadUint16(&b, &p, &e) + + //Check that there is only zero padding left + for _, v := range b[p:] { + if v != 0 { + return []byte{}, ndr.Malformed{EText: "Non-zero padding left over at end of data stream"} + } + } + + // Create bytes with zeroed signature needed for checksum verification + rb := make([]byte, len(b), len(b)) + copy(rb, b) + z := make([]byte, len(b), len(b)) + copy(rb[sp:sp+c], z) + + return rb, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/upn_dns_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/upn_dns_info.go new file mode 100644 index 00000000..4695ce37 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/upn_dns_info.go @@ -0,0 +1,66 @@ +package pac + +import ( + "encoding/binary" + "sort" + + "gopkg.in/jcmturner/gokrb5.v5/ndr" +) + +// UPNDNSInfo implements https://msdn.microsoft.com/en-us/library/dd240468.aspx +type UPNDNSInfo struct { + UPNLength uint16 // An unsigned 16-bit integer in little-endian format that specifies the length, in bytes, of the UPN field. + UPNOffset uint16 // An unsigned 16-bit integer in little-endian format that contains the offset to the beginning of the buffer, in bytes, from the beginning of the UPN_DNS_INFO structure. + DNSDomainNameLength uint16 + DNSDomainNameOffset uint16 + Flags uint32 + UPN string + DNSDomain string +} + +const ( + upnNoUPNAttr = 31 // The user account object does not have the userPrincipalName attribute ([MS-ADA3] section 2.349) set. A UPN constructed by concatenating the user name with the DNS domain name of the account domain is provided. +) + +// Unmarshal bytes into the UPN_DNSInfo struct +func (k *UPNDNSInfo) Unmarshal(b []byte) error { + //The UPN_DNS_INFO structure is a simple structure that is not NDR-encoded. + var p int + var e binary.ByteOrder = binary.LittleEndian + + k.UPNLength = ndr.ReadUint16(&b, &p, &e) + k.UPNOffset = ndr.ReadUint16(&b, &p, &e) + k.DNSDomainNameLength = ndr.ReadUint16(&b, &p, &e) + k.DNSDomainNameOffset = ndr.ReadUint16(&b, &p, &e) + k.Flags = ndr.ReadUint32(&b, &p, &e) + ub := b[k.UPNOffset : k.UPNOffset+k.UPNLength] + db := b[k.DNSDomainNameOffset : k.DNSDomainNameOffset+k.DNSDomainNameLength] + + u := make([]rune, k.UPNLength/2, k.UPNLength/2) + for i := 0; i < len(u); i++ { + q := i * 2 + u[i] = rune(ndr.ReadUint16(&ub, &q, &e)) + } + k.UPN = string(u) + d := make([]rune, k.DNSDomainNameLength/2, k.DNSDomainNameLength/2) + for i := 0; i < len(d); i++ { + q := i * 2 + d[i] = rune(ndr.ReadUint16(&db, &q, &e)) + } + k.DNSDomain = string(d) + + l := []int{ + p, + int(k.UPNOffset + k.UPNLength), + int(k.DNSDomainNameOffset + k.DNSDomainNameLength), + } + sort.Ints(l) + //Check that there is only zero padding left + for _, v := range b[l[2]:] { + if v != 0 { + return ndr.Malformed{EText: "Non-zero padding left over at end of data stream."} + } + } + + return nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Authenticator.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Authenticator.go new file mode 100644 index 00000000..0395922f --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Authenticator.go @@ -0,0 +1,100 @@ +// Package types provides Kerberos 5 data types. +package types + +import ( + "crypto/rand" + "fmt" + "math" + "math/big" + "time" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/asn1tools" + "gopkg.in/jcmturner/gokrb5.v5/iana" + "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" +) + +/*Authenticator ::= [APPLICATION 2] SEQUENCE { +authenticator-vno [0] INTEGER (5), +crealm [1] Realm, +cname [2] PrincipalName, +cksum [3] Checksum OPTIONAL, +cusec [4] Microseconds, +ctime [5] KerberosTime, +subkey [6] EncryptionKey OPTIONAL, +seq-number [7] UInt32 OPTIONAL, +authorization-data [8] AuthorizationData OPTIONAL +} + + cksum + This field contains a checksum of the application data that + accompanies the KRB_AP_REQ, computed using a key usage value of 10 + in normal application exchanges, or 6 when used in the TGS-REQ + PA-TGS-REQ AP-DATA field. + +*/ + +// Authenticator - A record containing information that can be shown to have been recently generated using the session key known only by the client and server. +// https://tools.ietf.org/html/rfc4120#section-5.5.1 +type Authenticator struct { + AVNO int `asn1:"explicit,tag:0"` + CRealm string `asn1:"generalstring,explicit,tag:1"` + CName PrincipalName `asn1:"explicit,tag:2"` + Cksum Checksum `asn1:"explicit,optional,tag:3"` + Cusec int `asn1:"explicit,tag:4"` + CTime time.Time `asn1:"generalized,explicit,tag:5"` + SubKey EncryptionKey `asn1:"explicit,optional,tag:6"` + SeqNumber int64 `asn1:"explicit,optional,tag:7"` + AuthorizationData AuthorizationData `asn1:"explicit,optional,tag:8"` +} + +// NewAuthenticator creates a new Authenticator. +func NewAuthenticator(realm string, cname PrincipalName) (Authenticator, error) { + seq, err := rand.Int(rand.Reader, big.NewInt(math.MaxUint32)) + if err != nil { + return Authenticator{}, err + } + t := time.Now().UTC() + return Authenticator{ + AVNO: iana.PVNO, + CRealm: realm, + CName: cname, + Cksum: Checksum{}, + Cusec: int((t.UnixNano() / int64(time.Microsecond)) - (t.Unix() * 1e6)), + CTime: t, + SeqNumber: seq.Int64(), + }, nil +} + +// GenerateSeqNumberAndSubKey sets the Authenticator's sequence number and subkey. +func (a *Authenticator) GenerateSeqNumberAndSubKey(keyType int32, keySize int) error { + seq, err := rand.Int(rand.Reader, big.NewInt(math.MaxUint32)) + if err != nil { + return err + } + a.SeqNumber = seq.Int64() + //Generate subkey value + sk := make([]byte, keySize, keySize) + rand.Read(sk) + a.SubKey = EncryptionKey{ + KeyType: keyType, + KeyValue: sk, + } + return nil +} + +// Unmarshal bytes into the Authenticator. +func (a *Authenticator) Unmarshal(b []byte) error { + _, err := asn1.UnmarshalWithParams(b, a, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.Authenticator)) + return err +} + +// Marshal the Authenticator. +func (a *Authenticator) Marshal() ([]byte, error) { + b, err := asn1.Marshal(*a) + if err != nil { + return nil, err + } + b = asn1tools.AddASNAppTag(b, asnAppTag.Authenticator) + return b, nil +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/AuthorizationData.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/AuthorizationData.go new file mode 100644 index 00000000..c9448008 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/AuthorizationData.go @@ -0,0 +1,123 @@ +package types + +import ( + "github.com/jcmturner/gofork/encoding/asn1" +) + +// Reference: https://www.ietf.org/rfc/rfc4120.txt +// Section: 5.2.6 + +/* +AuthorizationData + +-- NOTE: AuthorizationData is always used as an OPTIONAL field and +-- should not be empty. +AuthorizationData ::= SEQUENCE OF SEQUENCE { +ad-type [0] Int32, +ad-data [1] OCTET STRING +} + +ad-data +This field contains authorization data to be interpreted according +to the value of the corresponding ad-type field. + +ad-type + This field specifies the format for the ad-data subfield. All +negative values are reserved for local use. Non-negative values +are reserved for registered use. + +Each sequence of type and data is referred to as an authorization +element. Elements MAY be application specific; however, there is a +common set of recursive elements that should be understood by all +implementations. These elements contain other elements embedded +within them, and the interpretation of the encapsulating element +determines which of the embedded elements must be interpreted, and +which may be ignored. + +These common authorization data elements are recursively defined, +meaning that the ad-data for these types will itself contain a +sequence of authorization data whose interpretation is affected by +the encapsulating element. Depending on the meaning of the +encapsulating element, the encapsulated elements may be ignored, +might be interpreted as issued directly by the KDC, or might be +stored in a separate plaintext part of the ticket. The types of the +encapsulating elements are specified as part of the Kerberos +specification because the behavior based on these values should be +understood across implementations, whereas other elements need only +be understood by the applications that they affect. + +Authorization data elements are considered critical if present in a +ticket or authenticator. If an unknown authorization data element +type is received by a server either in an AP-REQ or in a ticket +contained in an AP-REQ, then, unless it is encapsulated in a known +authorization data element amending the criticality of the elements +it contains, authentication MUST fail. Authorization data is +intended to restrict the use of a ticket. If the service cannot +determine whether the restriction applies to that service, then a +security weakness may result if the ticket can be used for that +service. Authorization elements that are optional can be enclosed in +an AD-IF-RELEVANT element. + +In the definitions that follow, the value of the ad-type for the +element will be specified as the least significant part of the +subsection number, and the value of the ad-data will be as shown in +the ASN.1 structure that follows the subsection heading. + + Contents of ad-data ad-type + + DER encoding of AD-IF-RELEVANT 1 + + DER encoding of AD-KDCIssued 4 + + DER encoding of AD-AND-OR 5 + + DER encoding of AD-MANDATORY-FOR-KDC 8 + +*/ + +// AuthorizationData implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6 +type AuthorizationData []AuthorizationDataEntry + +// AuthorizationDataEntry implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6 +type AuthorizationDataEntry struct { + ADType int32 `asn1:"explicit,tag:0"` + ADData []byte `asn1:"explicit,tag:1"` +} + +// ADIfRelevant implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.1 +type ADIfRelevant AuthorizationData + +// ADKDCIssued implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.2 +type ADKDCIssued struct { + ADChecksum Checksum `asn1:"explicit,tag:0"` + IRealm string `asn1:"optional,generalstring,explicit,tag:1"` + Isname PrincipalName `asn1:"optional,explicit,tag:2"` + Elements AuthorizationData `asn1:"explicit,tag:3"` +} + +// ADAndOr implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.3 +type ADAndOr struct { + ConditionCount int32 `asn1:"explicit,tag:0"` + Elements AuthorizationData `asn1:"explicit,tag:1"` +} + +// ADMandatoryForKDC implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.4 +type ADMandatoryForKDC AuthorizationData + +// Unmarshal bytes into the ADKDCIssued. +func (a *ADKDCIssued) Unmarshal(b []byte) error { + _, err := asn1.Unmarshal(b, a) + return err +} + +// Unmarshal bytes into the AuthorizationData. +func (a *AuthorizationData) Unmarshal(b []byte) error { + _, err := asn1.Unmarshal(b, a) + return err +} + +// Unmarshal bytes into the AuthorizationDataEntry. +func (a *AuthorizationDataEntry) Unmarshal(b []byte) error { + _, err := asn1.Unmarshal(b, a) + return err +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Cryptosystem.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Cryptosystem.go new file mode 100644 index 00000000..7e8b4ab2 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Cryptosystem.go @@ -0,0 +1,55 @@ +package types + +import ( + "github.com/jcmturner/gofork/encoding/asn1" +) + +// Reference: https://www.ietf.org/rfc/rfc4120.txt +// Section: 5.2.9 + +// EncryptedData implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.9 +type EncryptedData struct { + EType int32 `asn1:"explicit,tag:0"` + KVNO int `asn1:"explicit,optional,tag:1"` + Cipher []byte `asn1:"explicit,tag:2"` +} + +// EncryptionKey implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.9 +// AKA KeyBlock +type EncryptionKey struct { + KeyType int32 `asn1:"explicit,tag:0"` + KeyValue []byte `asn1:"explicit,tag:1"` +} + +// Checksum implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.9 +type Checksum struct { + CksumType int32 `asn1:"explicit,tag:0"` + Checksum []byte `asn1:"explicit,tag:1"` +} + +// Unmarshal bytes into the EncryptedData. +func (a *EncryptedData) Unmarshal(b []byte) error { + _, err := asn1.Unmarshal(b, a) + return err +} + +// Marshal the EncryptedData. +func (a *EncryptedData) Marshal() ([]byte, error) { + edb, err := asn1.Marshal(*a) + if err != nil { + return edb, err + } + return edb, nil +} + +// Unmarshal bytes into the EncryptionKey. +func (a *EncryptionKey) Unmarshal(b []byte) error { + _, err := asn1.Unmarshal(b, a) + return err +} + +// Unmarshal bytes into the Checksum. +func (a *Checksum) Unmarshal(b []byte) error { + _, err := asn1.Unmarshal(b, a) + return err +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/HostAddress.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/HostAddress.go new file mode 100644 index 00000000..3ec0d3f5 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/HostAddress.go @@ -0,0 +1,206 @@ +package types + +// Reference: https://www.ietf.org/rfc/rfc4120.txt +// Section: 5.2.5 + +import ( + "bytes" + "fmt" + "net" + + "github.com/jcmturner/gofork/encoding/asn1" + "gopkg.in/jcmturner/gokrb5.v5/iana/addrtype" +) + +/* +HostAddress and HostAddresses + +HostAddress ::= SEQUENCE { + addr-type [0] Int32, + address [1] OCTET STRING +} + +-- NOTE: HostAddresses is always used as an OPTIONAL field and +-- should not be empty. +HostAddresses -- NOTE: subtly different from rfc1510, + -- but has a value mapping and encodes the same + ::= SEQUENCE OF HostAddress + +The host address encodings consist of two fields: + +addr-type + This field specifies the type of address that follows. Pre- + defined values for this field are specified in Section 7.5.3. + +address + This field encodes a single address of type addr-type. +*/ + +// HostAddresses implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.5 +type HostAddresses []HostAddress + +// HostAddress implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.5 +type HostAddress struct { + AddrType int32 `asn1:"explicit,tag:0"` + Address []byte `asn1:"explicit,tag:1"` +} + +// GetHostAddress returns a HostAddress struct from a string in the format : +func GetHostAddress(s string) (HostAddress, error) { + var h HostAddress + cAddr, _, err := net.SplitHostPort(s) + if err != nil { + return h, fmt.Errorf("invalid format of client address: %v", err) + } + ip := net.ParseIP(cAddr) + hb, err := ip.MarshalText() + if err != nil { + return h, fmt.Errorf("could not marshal client's address into bytes: %v", err) + } + var ht int32 + if ip.To4() != nil { + ht = addrtype.IPv4 + } else if ip.To16() != nil { + ht = addrtype.IPv6 + } else { + return h, fmt.Errorf("could not determine client's address types: %v", err) + } + h = HostAddress{ + AddrType: ht, + Address: hb, + } + return h, nil +} + +// GetAddress returns a string representation of the HostAddress. +func (h *HostAddress) GetAddress() (string, error) { + var b []byte + _, err := asn1.Unmarshal(h.Address, &b) + return string(b), err +} + +// LocalHostAddresses returns a HostAddresses struct for the local machines interface IP addresses. +func LocalHostAddresses() (ha HostAddresses, err error) { + ifs, err := net.Interfaces() + if err != nil { + return + } + for _, iface := range ifs { + if iface.Flags&net.FlagLoopback != 0 || iface.Flags&net.FlagUp == 0 { + // Interface is either loopback of not up + continue + } + addrs, err := iface.Addrs() + if err != nil { + continue + } + for _, addr := range addrs { + var ip net.IP + switch v := addr.(type) { + case *net.IPNet: + ip = v.IP + case *net.IPAddr: + ip = v.IP + } + var a HostAddress + if ip.To16() == nil { + //neither IPv4 or IPv6 + continue + } + if ip.To4() != nil { + //Is IPv4 + a.AddrType = addrtype.IPv4 + a.Address = ip.To4() + } else { + a.AddrType = addrtype.IPv6 + a.Address = ip.To16() + } + ha = append(ha, a) + } + } + return ha, nil +} + +// HostAddressesFromNetIPs returns a HostAddresses type from a slice of net.IP +func HostAddressesFromNetIPs(ips []net.IP) (ha HostAddresses) { + for _, ip := range ips { + ha = append(ha, HostAddressFromNetIP(ip)) + } + return ha +} + +// HostAddressFromNetIP returns a HostAddress type from a net.IP +func HostAddressFromNetIP(ip net.IP) HostAddress { + if ip.To4() != nil { + //Is IPv4 + return HostAddress{ + AddrType: addrtype.IPv4, + Address: ip.To4(), + } + } + return HostAddress{ + AddrType: addrtype.IPv6, + Address: ip.To16(), + } +} + +// HostAddressesEqual tests if two HostAddress slices are equal. +func HostAddressesEqual(h, a []HostAddress) bool { + if len(h) != len(a) { + return false + } + for _, e := range a { + var found bool + for _, i := range h { + if e.Equal(i) { + found = true + break + } + } + if !found { + return false + } + } + return true +} + +// HostAddressesContains tests if a HostAddress is contained in a HostAddress slice. +func HostAddressesContains(h []HostAddress, a HostAddress) bool { + for _, e := range h { + if e.Equal(a) { + return true + } + } + return false +} + +// Equal tests if the HostAddress is equal to another HostAddress provided. +func (h *HostAddress) Equal(a HostAddress) bool { + if h.AddrType != a.AddrType { + return false + } + return bytes.Equal(h.Address, a.Address) +} + +// Contains tests if a HostAddress is contained within the HostAddresses struct. +func (h *HostAddresses) Contains(a HostAddress) bool { + for _, e := range *h { + if e.Equal(a) { + return true + } + } + return false +} + +// Equal tests if a HostAddress slice is equal to the HostAddresses struct. +func (h *HostAddresses) Equal(a []HostAddress) bool { + if len(*h) != len(a) { + return false + } + for _, e := range a { + if !h.Contains(e) { + return false + } + } + return true +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/KerberosFlags.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/KerberosFlags.go new file mode 100644 index 00000000..06c3a170 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/KerberosFlags.go @@ -0,0 +1,124 @@ +package types + +// Reference: https://www.ietf.org/rfc/rfc4120.txt +// Section: 5.2.8 + +import ( + "github.com/jcmturner/gofork/encoding/asn1" +) + +/* +KerberosFlags + +For several message types, a specific constrained bit string type, +KerberosFlags, is used. + +KerberosFlags ::= BIT STRING (SIZE (32..MAX)) +-- minimum number of bits shall be sent, +-- but no fewer than 32 + +Compatibility note: The following paragraphs describe a change from +the RFC 1510 description of bit strings that would result in +incompatility in the case of an implementation that strictly +conformed to ASN.1 DER and RFC 1510. + +ASN.1 bit strings have multiple uses. The simplest use of a bit +string is to contain a vector of bits, with no particular meaning +attached to individual bits. This vector of bits is not necessarily +a multiple of eight bits long. The use in Kerberos of a bit string +as a compact boolean vector wherein each element has a distinct +meaning poses some problems. The natural notation for a compact +boolean vector is the ASN.1 "NamedBit" notation, and the DER require +that encodings of a bit string using "NamedBit" notation exclude any +trailing zero bits. This truncation is easy to neglect, especially +given C language implementations that naturally choose to store +boolean vectors as 32-bit integers. + +For example, if the notation for KDCOptions were to include the +"NamedBit" notation, as in RFC 1510, and a KDCOptions value to be +encoded had only the "forwardable" (bit number one) bit set, the DER +encoding MUST include only two bits: the first reserved bit +("reserved", bit number zero, value zero) and the one-valued bit (bit +number one) for "forwardable". + +Most existing implementations of Kerberos unconditionally send 32 +bits on the wire when encoding bit strings used as boolean vectors. +This behavior violates the ASN.1 syntax used for flag values in RFC +1510, but it occurs on such a widely installed base that the protocol +description is being modified to accommodate it. + +Consequently, this document removes the "NamedBit" notations for +individual bits, relegating them to comments. The size constraint on +the KerberosFlags type requires that at least 32 bits be encoded at +all times, though a lenient implementation MAY choose to accept fewer +than 32 bits and to treat the missing bits as set to zero. + +Currently, no uses of KerberosFlags specify more than 32 bits' worth +of flags, although future revisions of this document may do so. When +more than 32 bits are to be transmitted in a KerberosFlags value, +future revisions to this document will likely specify that the +smallest number of bits needed to encode the highest-numbered one- +valued bit should be sent. This is somewhat similar to the DER +encoding of a bit string that is declared with the "NamedBit" +notation. +*/ + +// NewKrbFlags returns an ASN1 BitString struct of the right size for KrbFlags. +func NewKrbFlags() asn1.BitString { + f := asn1.BitString{} + f.Bytes = make([]byte, 4) + f.BitLength = len(f.Bytes) * 8 + return f +} + +// SetFlags sets the flags of an ASN1 BitString. +func SetFlags(f *asn1.BitString, j []int) { + for _, i := range j { + SetFlag(f, i) + } +} + +// SetFlag sets a flag in an ASN1 BitString. +func SetFlag(f *asn1.BitString, i int) { + for l := len(f.Bytes); l < 4; l++ { + (*f).Bytes = append((*f).Bytes, byte(0)) + (*f).BitLength = len((*f).Bytes) * 8 + } + //Which byte? + b := int(i / 8) + //Which bit in byte + p := uint(7 - (i - 8*b)) + (*f).Bytes[b] = (*f).Bytes[b] | (1 << p) +} + +// UnsetFlags unsets flags in an ASN1 BitString. +func UnsetFlags(f *asn1.BitString, j []int) { + for _, i := range j { + UnsetFlag(f, i) + } +} + +// UnsetFlag unsets a flag in an ASN1 BitString. +func UnsetFlag(f *asn1.BitString, i int) { + for l := len(f.Bytes); l < 4; l++ { + (*f).Bytes = append((*f).Bytes, byte(0)) + (*f).BitLength = len((*f).Bytes) * 8 + } + //Which byte? + b := int(i / 8) + //Which bit in byte + p := uint(7 - (i - 8*b)) + (*f).Bytes[b] = (*f).Bytes[b] &^ (1 << p) +} + +// IsFlagSet tests if a flag is set in the ASN1 BitString. +func IsFlagSet(f *asn1.BitString, i int) bool { + //Which byte? + b := int(i / 8) + //Which bit in byte + p := uint(7 - (i - 8*b)) + if (*f).Bytes[b]&(1</@ +// a PrincipalName type will be returned with the name type set to KRB_NT_PRINCIPAL(1) +// and the realm will be returned as a string. If the "@" suffix +// is not included in the SPN then the value of realm string returned will be "" +func ParseSPNString(spn string) (pn PrincipalName, realm string) { + if strings.Contains(spn, "@") { + s := strings.Split(spn, "@") + realm = s[len(s)-1] + spn = strings.TrimSuffix(spn, "@"+realm) + } + pn = NewPrincipalName(nametype.KRB_NT_PRINCIPAL, spn) + return +} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/TypedData.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/TypedData.go new file mode 100644 index 00000000..19e9f496 --- /dev/null +++ b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/TypedData.go @@ -0,0 +1,18 @@ +package types + +import "github.com/jcmturner/gofork/encoding/asn1" + +// TypedData implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.9.1 +type TypedData struct { + DataType int32 `asn1:"explicit,tag:0"` + DataValue []byte `asn1:"optional,explicit,tag:1"` +} + +// TypedDataSequence implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.9.1 +type TypedDataSequence []TypedData + +// Unmarshal bytes into the TypedDataSequence. +func (a *TypedDataSequence) Unmarshal(b []byte) error { + _, err := asn1.Unmarshal(b, a) + return err +} From 20350c529c68bd0077f29059ef111e03e0752baa Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 23 Jul 2018 15:00:05 +0200 Subject: [PATCH 033/159] Add Kerberos support to the command-line client --- cmd/hdfs/kerberos.go | 57 ++++++++++++++++++++++++++++++++++++++++++++ cmd/hdfs/main.go | 18 ++++++++++---- 2 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 cmd/hdfs/kerberos.go diff --git a/cmd/hdfs/kerberos.go b/cmd/hdfs/kerberos.go new file mode 100644 index 00000000..be3c8a05 --- /dev/null +++ b/cmd/hdfs/kerberos.go @@ -0,0 +1,57 @@ +package main + +import ( + "fmt" + "os" + "os/user" + "strings" + + krb "gopkg.in/jcmturner/gokrb5.v5/client" + "gopkg.in/jcmturner/gokrb5.v5/config" + "gopkg.in/jcmturner/gokrb5.v5/credentials" +) + +// TODO: Write a kerberos_windows.go and move this to kerberos_unix.go. This +// assumes MIT kerberos on unix. + +func getKerberosClient() (*krb.Client, error) { + configPath := os.Getenv("KRB5_CONFIG") + if configPath == "" { + configPath = "/etc/krb5.conf" + } + + cfg, err := config.Load(configPath) + if err != nil { + return nil, err + } + + // Determine the ccache location from the environment, falling back to the + // default location. + ccachePath := os.Getenv("KRB5CCNAME") + if strings.Contains(ccachePath, ":") { + if strings.HasPrefix(ccachePath, "FILE:") { + ccachePath = strings.SplitN(ccachePath, ":", 2)[1] + } else { + return nil, fmt.Errorf("unusable ccache: %s", ccachePath) + } + } else if ccachePath == "" { + u, err := user.Current() + if err != nil { + return nil, err + } + + ccachePath = fmt.Sprintf("/tmp/krb5cc_%s", u.Uid) + } + + ccache, err := credentials.LoadCCache(ccachePath) + if err != nil { + return nil, err + } + + client, err := krb.NewClientFromCCache(ccache) + if err != nil { + return nil, err + } + + return client.WithConfig(cfg), nil +} diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go index 78673643..ba5c7a5b 100755 --- a/cmd/hdfs/main.go +++ b/cmd/hdfs/main.go @@ -5,6 +5,7 @@ import ( "fmt" "net" "os" + "os/user" "time" "github.com/colinmarc/hdfs" @@ -193,11 +194,20 @@ func getClient(namenode string) (*hdfs.Client, error) { } var err error - options.User = os.Getenv("HADOOP_USER_NAME") - if options.User == "" { - options.User, err = hdfs.Username() + if options.KerberosClient != nil { + options.KerberosClient, err = getKerberosClient() if err != nil { - return nil, fmt.Errorf("Couldn't determine user: %s", err) + return nil, fmt.Errorf("Problem with kerberos authentication: %s", err) + } + } else { + options.User = os.Getenv("HADOOP_USER_NAME") + if options.User == "" { + u, err := user.Current() + if err != nil { + return nil, fmt.Errorf("Couldn't determine user: %s", err) + } + + options.User = u.Username } } From a2aa011225b0d8023d7fcf10539331086b8c57f3 Mon Sep 17 00:00:00 2001 From: Mukesh Sharma Date: Fri, 20 Jul 2018 19:54:41 +0200 Subject: [PATCH 034/159] Kerberos testing in travis --- .travis.yml | 3 +- client_test.go | 33 +++++++++++++- minicluster.sh | 10 +++++ travis-setup-cdh5.sh | 100 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 144 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 15fecf1c..4658ca23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ go_import_path: github.com/colinmarc/hdfs go: 1.x env: - PLATFORM=cdh5 +- PLATFORM=cdh5 KERBEROS=true - PLATFORM=hdp2 install: - git clone https://github.com/sstephenson/bats $HOME/bats @@ -27,6 +28,6 @@ deploy: repo: colinmarc/hdfs tags: true all_branches: true - condition: $PLATFORM = cdh5 + condition: $PLATFORM = hdp2 cache: - "$HOME/bats" diff --git a/client_test.go b/client_test.go index d9adb15b..41a69b76 100644 --- a/client_test.go +++ b/client_test.go @@ -1,6 +1,7 @@ package hdfs import ( + "fmt" "io/ioutil" "os" "os/user" @@ -9,6 +10,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + krb "gopkg.in/jcmturner/gokrb5.v5/client" + "gopkg.in/jcmturner/gokrb5.v5/config" + "gopkg.in/jcmturner/gokrb5.v5/credentials" ) var cachedClients = make(map[string]*Client) @@ -37,7 +41,12 @@ func getClientForUser(t *testing.T, username string) *Client { t.Fatal("No hadoop configuration found at HADOOP_CONF_DIR") } - options.User = username + if options.KerberosClient != nil { + options.KerberosClient = getKerberosClient(t, username) + } else { + options.User = username + } + client, err := NewClient(options) if err != nil { t.Fatal(err) @@ -47,6 +56,28 @@ func getClientForUser(t *testing.T, username string) *Client { return client } +// getKerberosClient expects a ccache file for each user mentioned in the tests +// to live at /tmp/krb5cc_gohdfs_, and krb5.conf to live at +// /etc/krb5.conf +func getKerberosClient(t *testing.T, username string) *krb.Client { + cfg, err := config.Load("/etc/krb5.conf") + if err != nil { + t.Skip("Couldn't load krb config:", err) + } + + ccache, err := credentials.LoadCCache(fmt.Sprintf("/tmp/krb5cc_gohdfs_%s", username)) + if err != nil { + t.Skipf("Couldn't load keytab for user %s: %s", username, err) + } + + client, err := krb.NewClientFromCCache(ccache) + if err != nil { + t.Fatal("Couldn't initialize krb client:", err) + } + + return client.WithConfig(cfg) +} + func touch(t *testing.T, path string) { touchMask(t, path, 0) } diff --git a/minicluster.sh b/minicluster.sh index 324f16c9..5b2ca146 100755 --- a/minicluster.sh +++ b/minicluster.sh @@ -36,6 +36,16 @@ EOF echo "Waiting for namenode to start up..." $HADOOP_HOME/bin/hdfs dfsadmin -safemode wait +export HADOOP_CONF_DIR=$(mktemp -d) +cat > $HADOOP_CONF_DIR/core-site.xml < + + fs.defaultFS + hdfs://$HADOOP_NAMENODE + + +EOF + export HADOOP_FS="$HADOOP_HOME/bin/hadoop fs" ./fixtures.sh diff --git a/travis-setup-cdh5.sh b/travis-setup-cdh5.sh index 0b76142a..1739f571 100755 --- a/travis-setup-cdh5.sh +++ b/travis-setup-cdh5.sh @@ -2,6 +2,8 @@ set -e +KERBEROS=${KERBEROS-"false"} + UBUNTU_CODENAME=$(lsb_release -c | awk '{print $2}') sudo tee /etc/apt/sources.list.d/cdh.list < @@ -23,6 +79,34 @@ sudo tee /etc/hadoop/conf.gohdfs/core-site.xml <fs.defaultFS hdfs://localhost:9000 + + hadoop.security.authentication + $CONF_AUTHENTICATION + + + hadoop.security.authorization + $KERBEROS + + + dfs.namenode.keytab.file + /tmp/nn.keytab + + + dfs.namenode.kerberos.principal + nn/localhost@$KERBEROS_REALM + + + dfs.web.authentication.kerberos.principal + nn/localhost@$KERBEROS_REALM + + + dfs.datanode.keytab.file + /tmp/dn.keytab + + + dfs.datanode.kerberos.principal + dn/localhost@$KERBEROS_REALM + EOF @@ -40,6 +124,22 @@ sudo tee /etc/hadoop/conf.gohdfs/hdfs-site.xml <dfs.permissions.superusergroup hadoop + + dfs.safemode.extension + 0 + + + dfs.safemode.min.datanodes + 1 + + + dfs.block.access.token.enable + $KERBEROS + + + ignore.secure.ports.for.testing + true + EOF From df8db1c9b8130cecc13ba0180ffdf572fc4ec4a4 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 21 Jul 2018 18:43:57 +0200 Subject: [PATCH 035/159] When appending, use the BlockLocation from the AppendResponseProto Before, we were making an extra getBlockLocations request to get the block location to write to. This worked fine except under kerberos, where the append call had the correct access token for the block. The fix also saves us a round trip. --- file_writer.go | 30 +++++++----------------------- file_writer_test.go | 4 ++-- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/file_writer.go b/file_writer.go index 328e1ee3..aa685871 100644 --- a/file_writer.go +++ b/file_writer.go @@ -85,7 +85,7 @@ func (c *Client) CreateFile(name string, replication int, blockSize int64, perm // acknowledged asynchronously, it is very important that Close is called after // all data has been written. func (c *Client) Append(name string) (*FileWriter, error) { - info, err := c.getFileInfo(name) + _, err := c.getFileInfo(name) if err != nil { return nil, &os.PathError{"append", name, err} } @@ -105,19 +105,6 @@ func (c *Client) Append(name string) (*FileWriter, error) { return nil, &os.PathError{"append", name, err} } - req := &hdfs.GetBlockLocationsRequestProto{ - Src: proto.String(name), - Offset: proto.Uint64(0), - Length: proto.Uint64(uint64(info.Size())), - } - resp := &hdfs.GetBlockLocationsResponseProto{} - - err = c.namenode.Execute("getBlockLocations", req, resp) - if err != nil { - return nil, err - } - - blocks := resp.GetLocations().GetBlocks() f := &FileWriter{ client: c, name: name, @@ -125,21 +112,18 @@ func (c *Client) Append(name string) (*FileWriter, error) { blockSize: int64(appendResp.Stat.GetBlocksize()), } - if len(blocks) == 0 { - return f, nil - } - - lastBlock := blocks[len(blocks)-1] - lastBlockSize := int64(lastBlock.GetB().GetNumBytes()) - if lastBlockSize == 0 || lastBlockSize == f.blockSize { + // This returns nil if there are no blocks (it's an empty file) or if the + // last block is full (so we have to start a fresh block). + block := appendResp.GetBlock() + if block == nil { return f, nil } f.blockWriter = &rpc.BlockWriter{ ClientName: f.client.namenode.ClientName(), - Block: lastBlock, + Block: block, BlockSize: f.blockSize, - Offset: int64(lastBlock.B.GetNumBytes()), + Offset: int64(block.B.GetNumBytes()), Append: true, UseDatanodeHostname: f.client.options.UseDatanodeHostname, DialFunc: f.client.options.DatanodeDialFunc, diff --git a/file_writer_test.go b/file_writer_test.go index 8282e43c..6968cb66 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -466,7 +466,7 @@ func TestFileAppendDeadlineBefore(t *testing.T) { client := getClient(t) mkdirp(t, "/_test/append") - writer, err := client.Create("/_test/append/5.txt") + writer, err := client.Create("/_test/append/6.txt") require.NoError(t, err) n, err := writer.Write([]byte("foobar\n")) @@ -476,7 +476,7 @@ func TestFileAppendDeadlineBefore(t *testing.T) { err = writer.Close() require.NoError(t, err) - writer, err = client.Append("/_test/append/5.txt") + writer, err = client.Append("/_test/append/6.txt") require.NoError(t, err) writer.SetDeadline(time.Now()) From 4a72860e20b59cef840c5fe9341cb239291f450b Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 21 Jul 2018 19:17:27 +0200 Subject: [PATCH 036/159] Add some Kerberos documentation to the README --- README.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f85d184b..11b64647 100644 --- a/README.md +++ b/README.md @@ -84,19 +84,35 @@ Installing the commandline client Grab a tarball from the [releases page](https://github.com/colinmarc/hdfs/releases) and unzip it wherever you like. -You'll want to add the following line to your `.bashrc` or `.profile`: +To configure the client, make sure one or both of these environment variables +point to your Hadoop configuration (`core-site.xml` and `hdfs-site.xml`). On +systems with Hadoop installed, they should already be set. - export HADOOP_NAMENODE="namenode:8020" + $ export HADOOP_HOME="/etc/hadoop" + $ export HADOOP_CONF_DIR="/etc/hadoop/conf" To install tab completion globally on linux, copy or link the `bash_completion` file which comes with the tarball into the right place: - ln -sT bash_completion /etc/bash_completion.d/gohdfs + $ ln -sT bash_completion /etc/bash_completion.d/gohdfs -By default, the HDFS user is set to the currently-logged-in user. You can -override this in your `.bashrc` or `.profile`: +By default on non-kerberized clusters, the HDFS user is set to the +currently-logged-in user. You can override this with another environment +variable: - export HADOOP_USER_NAME=username + $ export HADOOP_USER_NAME=username + +Using the commandline client with Kerberos authentication +--------------------------------------------------------- + +Like `hadoop fs`, the commandline client expects a `ccache` file in the default +location: `/tmp/krb5cc_`. That means it should 'just work' to use `kinit`: + + $ kinit bob@EXAMPLE.com + $ hdfs ls / + +If that doesn't work, try setting the `KRB5CCNAME` environment variable to +wherever you have the `ccache` saved. Compatibility ------------- From 4690a6e6043b3f18d0baddaba80b26b8d839ff24 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Thu, 2 Aug 2018 18:15:16 +0200 Subject: [PATCH 037/159] Fix some bash completion issues - Complete words that are not the last word (fixes #92) - Add a space only if at the very end - Complete empty paths to be the user dir --- cmd/hdfs/bash_completion | 4 ++-- cmd/hdfs/complete.go | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cmd/hdfs/bash_completion b/cmd/hdfs/bash_completion index dbb9294b..f4b9e695 100644 --- a/cmd/hdfs/bash_completion +++ b/cmd/hdfs/bash_completion @@ -5,11 +5,11 @@ _hdfs_complete() local cur prev opts COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" - words=$(IFS=$' '; echo "${COMP_WORDS[*]}") + words=$(IFS=$' '; echo "${COMP_WORDS[@]:0:COMP_CWORD+1}") opts=$(${COMP_WORDS[0]} complete "$words") COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - if [[ $COMPREPLY != "" && $COMPREPLY != */ ]] + if [[ $COMPREPLY != "" && $COMPREPLY != */ && $COMP_POINT == ${#COMP_LINE} ]] then COMPREPLY="$COMPREPLY " fi diff --git a/cmd/hdfs/complete.go b/cmd/hdfs/complete.go index a469b7b0..d9575a83 100644 --- a/cmd/hdfs/complete.go +++ b/cmd/hdfs/complete.go @@ -45,13 +45,15 @@ func completePath(fragment string) { return } - fullPath := paths[0] - if hasGlob(fullPath) { + client, err := getClient(namenode) + if err != nil { return } - client, err := getClient(namenode) - if err != nil { + fullPath := paths[0] + if fullPath == "" { + fullPath = userDir() + "/" + } else if hasGlob(fullPath) { return } From 48eb8d6c34a97ffc73b406356f0f2e1c569b42a5 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Thu, 2 Aug 2018 18:54:06 +0200 Subject: [PATCH 038/159] Complete paths for get/put, and don't complete chown/chmod args Fixes #93. --- cmd/hdfs/bash_completion | 8 +++++++- cmd/hdfs/complete.go | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/cmd/hdfs/bash_completion b/cmd/hdfs/bash_completion index f4b9e695..de838864 100644 --- a/cmd/hdfs/bash_completion +++ b/cmd/hdfs/bash_completion @@ -7,7 +7,13 @@ _hdfs_complete() cur="${COMP_WORDS[COMP_CWORD]}" words=$(IFS=$' '; echo "${COMP_WORDS[@]:0:COMP_CWORD+1}") opts=$(${COMP_WORDS[0]} complete "$words") - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + + if [[ $opts == "_FILE_" ]] + then + COMPREPLY=( $(compgen -o default -- ${cur}) ) + else + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + fi if [[ $COMPREPLY != "" && $COMPREPLY != */ && $COMP_POINT == ${#COMP_LINE} ]] then diff --git a/cmd/hdfs/complete.go b/cmd/hdfs/complete.go index d9575a83..e00a51be 100644 --- a/cmd/hdfs/complete.go +++ b/cmd/hdfs/complete.go @@ -23,6 +23,8 @@ var knownCommands = []string{ "checksum", "get", "getmerge", + "put", + "df", } func complete(args []string) { @@ -31,14 +33,26 @@ func complete(args []string) { if len(words) <= 1 { fmt.Println(strings.Join(knownCommands, " ")) - } else { - completePath(words[len(words)-1]) + } else if isKnownCommand(words[0]) { + position := countPosition(words) + completeArg(words[0], words[len(words)-1], position) } } else { fmt.Println(strings.Join(knownCommands, " ")) } } +func completeArg(command, fragment string, position int) { + if (command == "put" && position == 1) || + ((command == "get" || command == "getmerge") && position == 2) { + fmt.Println("_FILE_") // The bash_completion bit knows about this special string. + } else if (command == "chmod" || command == "chown") && position == 1 { + return + } else if !strings.HasPrefix(fragment, "-") { + completePath(fragment) + } +} + func completePath(fragment string) { paths, namenode, err := normalizePaths([]string{fragment}) if err != nil { @@ -94,3 +108,23 @@ func completePath(fragment string) { fmt.Println() } + +func isKnownCommand(command string) bool { + for _, c := range knownCommands { + if command == c { + return true + } + } + return false +} + +func countPosition(words []string) int { + var position int + for _, w := range words { + if !strings.HasPrefix(w, "-") { + position++ + } + } + + return position - 1 +} From 9746310a4d311e21ce43b2a645c5a1e64c5e8efa Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 1 Aug 2018 16:46:29 +0200 Subject: [PATCH 039/159] Convert the library to a go module --- .travis.yml | 2 +- Gopkg.lock | 117 -- Gopkg.toml | 38 - Makefile | 5 +- go.mod | 16 + go.sum | 27 + vendor/github.com/davecgh/go-spew/LICENSE | 15 - .../github.com/davecgh/go-spew/spew/bypass.go | 152 -- .../davecgh/go-spew/spew/bypasssafe.go | 38 - .../github.com/davecgh/go-spew/spew/common.go | 341 ----- .../github.com/davecgh/go-spew/spew/config.go | 306 ---- vendor/github.com/davecgh/go-spew/spew/doc.go | 211 --- .../github.com/davecgh/go-spew/spew/dump.go | 509 ------ .../github.com/davecgh/go-spew/spew/format.go | 419 ----- .../github.com/davecgh/go-spew/spew/spew.go | 148 -- vendor/github.com/golang/protobuf/AUTHORS | 3 - .../github.com/golang/protobuf/CONTRIBUTORS | 3 - vendor/github.com/golang/protobuf/LICENSE | 31 - .../github.com/golang/protobuf/proto/Makefile | 43 - .../github.com/golang/protobuf/proto/clone.go | 229 --- .../golang/protobuf/proto/decode.go | 970 ------------ .../golang/protobuf/proto/discard.go | 151 -- .../golang/protobuf/proto/encode.go | 1362 ----------------- .../github.com/golang/protobuf/proto/equal.go | 300 ---- .../golang/protobuf/proto/extensions.go | 587 ------- .../github.com/golang/protobuf/proto/lib.go | 897 ----------- .../golang/protobuf/proto/message_set.go | 311 ---- .../golang/protobuf/proto/pointer_reflect.go | 484 ------ .../golang/protobuf/proto/pointer_unsafe.go | 270 ---- .../golang/protobuf/proto/properties.go | 872 ----------- .../github.com/golang/protobuf/proto/text.go | 854 ----------- .../golang/protobuf/proto/text_parser.go | 895 ----------- .../github.com/hashicorp/go-uuid/.travis.yml | 12 - vendor/github.com/hashicorp/go-uuid/LICENSE | 363 ----- vendor/github.com/hashicorp/go-uuid/README.md | 8 - vendor/github.com/hashicorp/go-uuid/uuid.go | 65 - vendor/github.com/jcmturner/gofork/LICENSE | 27 - .../jcmturner/gofork/encoding/asn1/README.md | 5 - .../jcmturner/gofork/encoding/asn1/asn1.go | 1003 ------------ .../jcmturner/gofork/encoding/asn1/common.go | 173 --- .../jcmturner/gofork/encoding/asn1/marshal.go | 659 -------- .../gofork/x/crypto/pbkdf2/pbkdf2.go | 98 -- vendor/github.com/pborman/getopt/AUTHORS | 1 - .../github.com/pborman/getopt/CONTRIBUTING.md | 10 - vendor/github.com/pborman/getopt/LICENSE | 27 - vendor/github.com/pborman/getopt/README.md | 226 --- vendor/github.com/pborman/getopt/bool.go | 74 - vendor/github.com/pborman/getopt/counter.go | 81 - vendor/github.com/pborman/getopt/duration.go | 56 - vendor/github.com/pborman/getopt/enum.go | 73 - vendor/github.com/pborman/getopt/error.go | 93 -- vendor/github.com/pborman/getopt/getopt.go | 536 ------- vendor/github.com/pborman/getopt/int.go | 67 - vendor/github.com/pborman/getopt/int16.go | 67 - vendor/github.com/pborman/getopt/int32.go | 67 - vendor/github.com/pborman/getopt/int64.go | 67 - vendor/github.com/pborman/getopt/list.go | 69 - vendor/github.com/pborman/getopt/option.go | 193 --- vendor/github.com/pborman/getopt/set.go | 268 ---- vendor/github.com/pborman/getopt/signed.go | 110 -- vendor/github.com/pborman/getopt/string.go | 53 - vendor/github.com/pborman/getopt/uint.go | 67 - vendor/github.com/pborman/getopt/uint16.go | 67 - vendor/github.com/pborman/getopt/uint32.go | 67 - vendor/github.com/pborman/getopt/uint64.go | 67 - vendor/github.com/pborman/getopt/unsigned.go | 111 -- vendor/github.com/pborman/getopt/var.go | 63 - vendor/github.com/pmezard/go-difflib/LICENSE | 27 - .../pmezard/go-difflib/difflib/difflib.go | 772 ---------- vendor/github.com/stretchr/testify/LICENSE | 22 - .../testify/assert/assertion_format.go | 405 ----- .../testify/assert/assertion_format.go.tmpl | 4 - .../testify/assert/assertion_forward.go | 798 ---------- .../testify/assert/assertion_forward.go.tmpl | 4 - .../stretchr/testify/assert/assertions.go | 1312 ---------------- .../github.com/stretchr/testify/assert/doc.go | 45 - .../stretchr/testify/assert/errors.go | 10 - .../testify/assert/forward_assertions.go | 16 - .../testify/assert/http_assertions.go | 127 -- .../stretchr/testify/require/doc.go | 28 - .../testify/require/forward_requirements.go | 16 - .../stretchr/testify/require/require.go | 979 ------------ .../stretchr/testify/require/require.go.tmpl | 6 - .../testify/require/require_forward.go | 799 ---------- .../testify/require/require_forward.go.tmpl | 4 - .../stretchr/testify/require/requirements.go | 9 - vendor/golang.org/x/crypto/AUTHORS | 3 - vendor/golang.org/x/crypto/CONTRIBUTORS | 3 - vendor/golang.org/x/crypto/LICENSE | 27 - vendor/golang.org/x/crypto/PATENTS | 22 - vendor/golang.org/x/crypto/md4/md4.go | 118 -- vendor/golang.org/x/crypto/md4/md4block.go | 89 -- vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go | 77 - .../gopkg.in/jcmturner/aescts.v1/.gitignore | 14 - vendor/gopkg.in/jcmturner/aescts.v1/LICENSE | 201 --- vendor/gopkg.in/jcmturner/aescts.v1/README.md | 16 - vendor/gopkg.in/jcmturner/aescts.v1/aescts.go | 186 --- .../gopkg.in/jcmturner/dnsutils.v1/.gitignore | 14 - .../jcmturner/dnsutils.v1/.travis.yml | 24 - vendor/gopkg.in/jcmturner/dnsutils.v1/LICENSE | 201 --- vendor/gopkg.in/jcmturner/dnsutils.v1/srv.go | 95 -- vendor/gopkg.in/jcmturner/gokrb5.v5/LICENSE | 201 --- .../jcmturner/gokrb5.v5/asn1tools/tools.go | 86 -- .../jcmturner/gokrb5.v5/client/ASExchange.go | 154 -- .../jcmturner/gokrb5.v5/client/TGSExchange.go | 101 -- .../jcmturner/gokrb5.v5/client/cache.go | 102 -- .../jcmturner/gokrb5.v5/client/client.go | 215 --- .../jcmturner/gokrb5.v5/client/http.go | 46 - .../jcmturner/gokrb5.v5/client/network.go | 213 --- .../jcmturner/gokrb5.v5/client/passwd.go | 94 -- .../jcmturner/gokrb5.v5/client/session.go | 172 --- .../jcmturner/gokrb5.v5/config/hosts.go | 134 -- .../jcmturner/gokrb5.v5/config/krb5conf.go | 665 -------- .../jcmturner/gokrb5.v5/credentials/ccache.go | 351 ----- .../gokrb5.v5/credentials/credentials.go | 257 ---- .../crypto/aes128-cts-hmac-sha1-96.go | 173 --- .../crypto/aes128-cts-hmac-sha256-128.go | 135 -- .../crypto/aes256-cts-hmac-sha1-96.go | 173 --- .../crypto/aes256-cts-hmac-sha384-192.go | 135 -- .../gokrb5.v5/crypto/common/common.go | 143 -- .../jcmturner/gokrb5.v5/crypto/crypto.go | 175 --- .../gokrb5.v5/crypto/des3-cbc-sha1-kd.go | 174 --- .../jcmturner/gokrb5.v5/crypto/etype/etype.go | 29 - .../jcmturner/gokrb5.v5/crypto/rc4-hmac.go | 137 -- .../gokrb5.v5/crypto/rfc3961/encryption.go | 125 -- .../gokrb5.v5/crypto/rfc3961/keyDerivation.go | 134 -- .../gokrb5.v5/crypto/rfc3961/nfold.go | 128 -- .../gokrb5.v5/crypto/rfc3962/encryption.go | 89 -- .../gokrb5.v5/crypto/rfc3962/keyDerivation.go | 58 - .../gokrb5.v5/crypto/rfc4757/checksum.go | 40 - .../gokrb5.v5/crypto/rfc4757/encryption.go | 83 - .../gokrb5.v5/crypto/rfc4757/keyDerivation.go | 55 - .../gokrb5.v5/crypto/rfc4757/msgtype.go | 20 - .../gokrb5.v5/crypto/rfc8009/encryption.go | 128 -- .../gokrb5.v5/crypto/rfc8009/keyDerivation.go | 144 -- .../gokrb5.v5/gssapi/ContextFlags.go | 36 - .../jcmturner/gokrb5.v5/gssapi/MechType.go | 9 - .../gokrb5.v5/gssapi/NegotiationToken.go | 149 -- .../jcmturner/gokrb5.v5/gssapi/WrapToken.go | 234 --- .../jcmturner/gokrb5.v5/gssapi/gssapi.go | 102 -- .../jcmturner/gokrb5.v5/gssapi/krb5Token.go | 202 --- .../gokrb5.v5/iana/addrtype/constants.go | 15 - .../gokrb5.v5/iana/adtype/constants.go | 23 - .../gokrb5.v5/iana/asnAppTag/constants.go | 24 - .../gokrb5.v5/iana/chksumtype/constants.go | 32 - .../jcmturner/gokrb5.v5/iana/constants.go | 5 - .../gokrb5.v5/iana/errorcode/constants.go | 155 -- .../gokrb5.v5/iana/etypeID/constants.go | 101 -- .../gokrb5.v5/iana/flags/constants.go | 30 - .../gokrb5.v5/iana/keyusage/constants.go | 42 - .../gokrb5.v5/iana/msgtype/constants.go | 18 - .../gokrb5.v5/iana/nametype/constants.go | 15 - .../gokrb5.v5/iana/patype/constants.go | 77 - .../gokrb5.v5/kadmin/changepasswddata.go | 23 - .../jcmturner/gokrb5.v5/kadmin/message.go | 114 -- .../jcmturner/gokrb5.v5/kadmin/passwd.go | 68 - .../jcmturner/gokrb5.v5/keytab/keytab.go | 369 ----- .../jcmturner/gokrb5.v5/krberror/error.go | 73 - .../jcmturner/gokrb5.v5/messages/APRep.go | 64 - .../jcmturner/gokrb5.v5/messages/APReq.go | 157 -- .../jcmturner/gokrb5.v5/messages/KDCRep.go | 312 ---- .../jcmturner/gokrb5.v5/messages/KDCReq.go | 402 ----- .../jcmturner/gokrb5.v5/messages/KRBCred.go | 102 -- .../jcmturner/gokrb5.v5/messages/KRBError.go | 83 - .../jcmturner/gokrb5.v5/messages/KRBPriv.go | 108 -- .../jcmturner/gokrb5.v5/messages/KRBSafe.go | 61 - .../jcmturner/gokrb5.v5/messages/Ticket.go | 251 --- .../gokrb5.v5/mstypes/claims_set_metadata.go | 39 - .../jcmturner/gokrb5.v5/mstypes/filetime.go | 65 - .../gokrb5.v5/mstypes/group_membership.go | 53 - .../mstypes/kerb_sid_and_attributes.go | 42 - .../gokrb5.v5/mstypes/rpc_unicode_string.go | 36 - .../jcmturner/gokrb5.v5/mstypes/sid.go | 70 - .../gokrb5.v5/mstypes/user_session_key.go | 30 - .../gopkg.in/jcmturner/gokrb5.v5/ndr/error.go | 13 - .../gopkg.in/jcmturner/gokrb5.v5/ndr/ndr.go | 246 --- .../jcmturner/gokrb5.v5/pac/client_claims.go | 38 - .../jcmturner/gokrb5.v5/pac/client_info.go | 45 - .../gokrb5.v5/pac/credentials_info.go | 132 -- .../jcmturner/gokrb5.v5/pac/device_claims.go | 38 - .../jcmturner/gokrb5.v5/pac/device_info.go | 93 -- .../gokrb5.v5/pac/kerb_validation_info.go | 286 ---- .../gokrb5.v5/pac/pac_info_buffer.go | 39 - .../jcmturner/gokrb5.v5/pac/pac_type.go | 205 --- .../gokrb5.v5/pac/s4u_delegation_info.go | 55 - .../jcmturner/gokrb5.v5/pac/signature_data.go | 74 - .../jcmturner/gokrb5.v5/pac/upn_dns_info.go | 66 - .../gokrb5.v5/types/Authenticator.go | 100 -- .../gokrb5.v5/types/AuthorizationData.go | 123 -- .../jcmturner/gokrb5.v5/types/Cryptosystem.go | 55 - .../jcmturner/gokrb5.v5/types/HostAddress.go | 206 --- .../gokrb5.v5/types/KerberosFlags.go | 124 -- .../jcmturner/gokrb5.v5/types/PAData.go | 155 -- .../gokrb5.v5/types/PrincipalName.go | 66 - .../jcmturner/gokrb5.v5/types/TypedData.go | 18 - 195 files changed, 45 insertions(+), 33064 deletions(-) delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml create mode 100644 go.mod create mode 100644 go.sum delete mode 100644 vendor/github.com/davecgh/go-spew/LICENSE delete mode 100644 vendor/github.com/davecgh/go-spew/spew/bypass.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/bypasssafe.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/common.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/config.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/doc.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/dump.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/format.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/spew.go delete mode 100644 vendor/github.com/golang/protobuf/AUTHORS delete mode 100644 vendor/github.com/golang/protobuf/CONTRIBUTORS delete mode 100644 vendor/github.com/golang/protobuf/LICENSE delete mode 100644 vendor/github.com/golang/protobuf/proto/Makefile delete mode 100644 vendor/github.com/golang/protobuf/proto/clone.go delete mode 100644 vendor/github.com/golang/protobuf/proto/decode.go delete mode 100644 vendor/github.com/golang/protobuf/proto/discard.go delete mode 100644 vendor/github.com/golang/protobuf/proto/encode.go delete mode 100644 vendor/github.com/golang/protobuf/proto/equal.go delete mode 100644 vendor/github.com/golang/protobuf/proto/extensions.go delete mode 100644 vendor/github.com/golang/protobuf/proto/lib.go delete mode 100644 vendor/github.com/golang/protobuf/proto/message_set.go delete mode 100644 vendor/github.com/golang/protobuf/proto/pointer_reflect.go delete mode 100644 vendor/github.com/golang/protobuf/proto/pointer_unsafe.go delete mode 100644 vendor/github.com/golang/protobuf/proto/properties.go delete mode 100644 vendor/github.com/golang/protobuf/proto/text.go delete mode 100644 vendor/github.com/golang/protobuf/proto/text_parser.go delete mode 100644 vendor/github.com/hashicorp/go-uuid/.travis.yml delete mode 100644 vendor/github.com/hashicorp/go-uuid/LICENSE delete mode 100644 vendor/github.com/hashicorp/go-uuid/README.md delete mode 100644 vendor/github.com/hashicorp/go-uuid/uuid.go delete mode 100644 vendor/github.com/jcmturner/gofork/LICENSE delete mode 100644 vendor/github.com/jcmturner/gofork/encoding/asn1/README.md delete mode 100644 vendor/github.com/jcmturner/gofork/encoding/asn1/asn1.go delete mode 100644 vendor/github.com/jcmturner/gofork/encoding/asn1/common.go delete mode 100644 vendor/github.com/jcmturner/gofork/encoding/asn1/marshal.go delete mode 100644 vendor/github.com/jcmturner/gofork/x/crypto/pbkdf2/pbkdf2.go delete mode 100644 vendor/github.com/pborman/getopt/AUTHORS delete mode 100644 vendor/github.com/pborman/getopt/CONTRIBUTING.md delete mode 100644 vendor/github.com/pborman/getopt/LICENSE delete mode 100644 vendor/github.com/pborman/getopt/README.md delete mode 100644 vendor/github.com/pborman/getopt/bool.go delete mode 100644 vendor/github.com/pborman/getopt/counter.go delete mode 100644 vendor/github.com/pborman/getopt/duration.go delete mode 100644 vendor/github.com/pborman/getopt/enum.go delete mode 100644 vendor/github.com/pborman/getopt/error.go delete mode 100644 vendor/github.com/pborman/getopt/getopt.go delete mode 100644 vendor/github.com/pborman/getopt/int.go delete mode 100644 vendor/github.com/pborman/getopt/int16.go delete mode 100644 vendor/github.com/pborman/getopt/int32.go delete mode 100644 vendor/github.com/pborman/getopt/int64.go delete mode 100644 vendor/github.com/pborman/getopt/list.go delete mode 100644 vendor/github.com/pborman/getopt/option.go delete mode 100644 vendor/github.com/pborman/getopt/set.go delete mode 100644 vendor/github.com/pborman/getopt/signed.go delete mode 100644 vendor/github.com/pborman/getopt/string.go delete mode 100644 vendor/github.com/pborman/getopt/uint.go delete mode 100644 vendor/github.com/pborman/getopt/uint16.go delete mode 100644 vendor/github.com/pborman/getopt/uint32.go delete mode 100644 vendor/github.com/pborman/getopt/uint64.go delete mode 100644 vendor/github.com/pborman/getopt/unsigned.go delete mode 100644 vendor/github.com/pborman/getopt/var.go delete mode 100644 vendor/github.com/pmezard/go-difflib/LICENSE delete mode 100644 vendor/github.com/pmezard/go-difflib/difflib/difflib.go delete mode 100644 vendor/github.com/stretchr/testify/LICENSE delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_format.go delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_forward.go delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/assert/assertions.go delete mode 100644 vendor/github.com/stretchr/testify/assert/doc.go delete mode 100644 vendor/github.com/stretchr/testify/assert/errors.go delete mode 100644 vendor/github.com/stretchr/testify/assert/forward_assertions.go delete mode 100644 vendor/github.com/stretchr/testify/assert/http_assertions.go delete mode 100644 vendor/github.com/stretchr/testify/require/doc.go delete mode 100644 vendor/github.com/stretchr/testify/require/forward_requirements.go delete mode 100644 vendor/github.com/stretchr/testify/require/require.go delete mode 100644 vendor/github.com/stretchr/testify/require/require.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/require/require_forward.go delete mode 100644 vendor/github.com/stretchr/testify/require/require_forward.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/require/requirements.go delete mode 100644 vendor/golang.org/x/crypto/AUTHORS delete mode 100644 vendor/golang.org/x/crypto/CONTRIBUTORS delete mode 100644 vendor/golang.org/x/crypto/LICENSE delete mode 100644 vendor/golang.org/x/crypto/PATENTS delete mode 100644 vendor/golang.org/x/crypto/md4/md4.go delete mode 100644 vendor/golang.org/x/crypto/md4/md4block.go delete mode 100644 vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go delete mode 100644 vendor/gopkg.in/jcmturner/aescts.v1/.gitignore delete mode 100644 vendor/gopkg.in/jcmturner/aescts.v1/LICENSE delete mode 100644 vendor/gopkg.in/jcmturner/aescts.v1/README.md delete mode 100644 vendor/gopkg.in/jcmturner/aescts.v1/aescts.go delete mode 100644 vendor/gopkg.in/jcmturner/dnsutils.v1/.gitignore delete mode 100644 vendor/gopkg.in/jcmturner/dnsutils.v1/.travis.yml delete mode 100644 vendor/gopkg.in/jcmturner/dnsutils.v1/LICENSE delete mode 100644 vendor/gopkg.in/jcmturner/dnsutils.v1/srv.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/LICENSE delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/asn1tools/tools.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/ASExchange.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/TGSExchange.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/cache.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/client.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/http.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/network.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/passwd.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/client/session.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/config/hosts.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/config/krb5conf.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/ccache.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/credentials.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha1-96.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha256-128.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha1-96.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha384-192.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/common/common.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/crypto.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/des3-cbc-sha1-kd.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/etype/etype.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rc4-hmac.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/encryption.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/keyDerivation.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/nfold.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/encryption.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/keyDerivation.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/checksum.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/encryption.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/keyDerivation.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/msgtype.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/encryption.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/keyDerivation.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/ContextFlags.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/MechType.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/NegotiationToken.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/WrapToken.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/gssapi.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/krb5Token.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/addrtype/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/adtype/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/errorcode/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/etypeID/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/flags/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/keyusage/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/msgtype/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/nametype/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/iana/patype/constants.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/changepasswddata.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/message.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/passwd.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/keytab/keytab.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/krberror/error.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APRep.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APReq.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCRep.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCReq.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBCred.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBError.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBPriv.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBSafe.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/messages/Ticket.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/claims_set_metadata.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/filetime.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/group_membership.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/kerb_sid_and_attributes.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/rpc_unicode_string.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/sid.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/user_session_key.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/error.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/ndr.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_claims.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_info.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/credentials_info.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_claims.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_info.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/kerb_validation_info.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_info_buffer.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_type.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/s4u_delegation_info.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/signature_data.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/pac/upn_dns_info.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/Authenticator.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/AuthorizationData.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/Cryptosystem.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/HostAddress.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/KerberosFlags.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/PAData.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/PrincipalName.go delete mode 100644 vendor/gopkg.in/jcmturner/gokrb5.v5/types/TypedData.go diff --git a/.travis.yml b/.travis.yml index 4658ca23..de65cb28 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ sudo: required language: go go_import_path: github.com/colinmarc/hdfs -go: 1.x +go: 1.11beta2 env: - PLATFORM=cdh5 - PLATFORM=cdh5 KERBEROS=true diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index fa1edf6f..00000000 --- a/Gopkg.lock +++ /dev/null @@ -1,117 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - branch = "master" - name = "github.com/golang/protobuf" - packages = ["proto"] - revision = "925541529c1fa6821df4e44ce2723319eb2be768" - -[[projects]] - branch = "master" - name = "github.com/hashicorp/go-uuid" - packages = ["."] - revision = "27454136f0364f2d44b1276c552d69105cf8c498" - -[[projects]] - branch = "master" - name = "github.com/jcmturner/gofork" - packages = [ - "encoding/asn1", - "x/crypto/pbkdf2" - ] - revision = "2aebee971930cd0dd525873330952ab7df5ac95c" - -[[projects]] - branch = "master" - name = "github.com/pborman/getopt" - packages = ["."] - revision = "7148bc3a4c3008adfcab60cbebfd0576018f330b" - -[[projects]] - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - name = "github.com/stretchr/testify" - packages = [ - "assert", - "require" - ] - revision = "b91bfb9ebec76498946beb6af7c0230c7cc7ba6c" - version = "v1.2.0" - -[[projects]] - branch = "master" - name = "golang.org/x/crypto" - packages = [ - "md4", - "pbkdf2" - ] - revision = "a2144134853fc9a27a7b1e3eb4f19f1a76df13c9" - -[[projects]] - name = "gopkg.in/jcmturner/aescts.v1" - packages = ["."] - revision = "f6abebb3171c4c1b1fea279cb7c7325020a26290" - version = "v1.0.1" - -[[projects]] - name = "gopkg.in/jcmturner/dnsutils.v1" - packages = ["."] - revision = "13eeb8d49ffb74d7a75784c35e4d900607a3943c" - version = "v1.0.1" - -[[projects]] - name = "gopkg.in/jcmturner/gokrb5.v5" - packages = [ - "asn1tools", - "client", - "config", - "credentials", - "crypto", - "crypto/common", - "crypto/etype", - "crypto/rfc3961", - "crypto/rfc3962", - "crypto/rfc4757", - "crypto/rfc8009", - "gssapi", - "iana", - "iana/addrtype", - "iana/adtype", - "iana/asnAppTag", - "iana/chksumtype", - "iana/errorcode", - "iana/etypeID", - "iana/flags", - "iana/keyusage", - "iana/msgtype", - "iana/nametype", - "iana/patype", - "kadmin", - "keytab", - "krberror", - "messages", - "mstypes", - "ndr", - "pac", - "types" - ] - revision = "5502bb09507bcc91e28c9b6feba046beb2e007d1" - version = "v5.2.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "1d8135f1a2177170f1fe8a07cf27bdf40ebf2786c22069ec383bf78b48bff646" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index fb9023b3..00000000 --- a/Gopkg.toml +++ /dev/null @@ -1,38 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - branch = "master" - name = "github.com/pborman/getopt" - -[prune] - go-tests = true - unused-packages = true - -[[constraint]] - name = "gopkg.in/jcmturner/gokrb5.v5" - version = "5.2.0" diff --git a/Makefile b/Makefile index 61ce230c..4ab8ad3b 100644 --- a/Makefile +++ b/Makefile @@ -22,11 +22,8 @@ clean-protos: hdfs: clean $(SOURCES) go build -ldflags "-X main.version=$(TRAVIS_TAG)" ./cmd/hdfs -install: get-deps - go install ./... - test: hdfs - go test -v -race $(shell go list ./... | grep -v vendor) + go test -v -race ./... bats ./cmd/hdfs/test/*.bats clean: diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..2a326da9 --- /dev/null +++ b/go.mod @@ -0,0 +1,16 @@ +module github.com/colinmarc/hdfs + +require ( + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/golang/protobuf v1.1.0 + github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036 // indirect + github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930 // indirect + github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117 + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/testify v1.2.2 + golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb // indirect + gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect + gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect + gopkg.in/jcmturner/gokrb5.v5 v5.3.0 + gopkg.in/jcmturner/rpc.v0 v0.0.2 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..d59752cb --- /dev/null +++ b/go.sum @@ -0,0 +1,27 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/golang/protobuf v1.1.0 h1:0iH4Ffd/meGoXqF2lSAhZHt8X+cPgkfn/cb6Cce5Vpc= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036 h1:d8T6WIONl4rMCPcQ/eY3uSz3+e4/GaoflKjXrWMex1U= +github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930 h1:v4CYlQ+HeysPHsr2QFiEO60gKqnvn1xwvuKhhAhuEkk= +github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117 h1:7822vZ646Atgxkp3tqrSufChvAAYgIy+iFEGpQntwlI= +github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb h1:Ah9YqXLj6fEgeKqcmBuLCbAsrF3ScD7dJ/bYM0C6tXI= +golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= +gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= +gopkg.in/jcmturner/gokrb5.v5 v5.2.0 h1:O5C+1x6Aem8UTPbMB6wwy/5KH8/4QMb4wAZcUjggqt4= +gopkg.in/jcmturner/gokrb5.v5 v5.2.0/go.mod h1:oQz8Wc5GsctOTgCVyKad1Vw4TCWz5G6gfIQr88RPv4k= +gopkg.in/jcmturner/gokrb5.v5 v5.3.0 h1:RS1MYApX27Hx1Xw7NECs7XxGxxrm69/4OmaRuX9kwec= +gopkg.in/jcmturner/gokrb5.v5 v5.3.0/go.mod h1:oQz8Wc5GsctOTgCVyKad1Vw4TCWz5G6gfIQr88RPv4k= +gopkg.in/jcmturner/rpc.v0 v0.0.2 h1:wBTgrbL1qmLBUPsYVCqdJiI5aJgQhexmK+JkTHPUNJI= +gopkg.in/jcmturner/rpc.v0 v0.0.2/go.mod h1:NzMq6cRzR9lipgw7WxRBHNx5N8SifBuaCQsOT1kWY/E= diff --git a/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE deleted file mode 100644 index c8364161..00000000 --- a/vendor/github.com/davecgh/go-spew/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2012-2016 Dave Collins - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go deleted file mode 100644 index 8a4a6589..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/bypass.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2015-2016 Dave Collins -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -// NOTE: Due to the following build constraints, this file will only be compiled -// when the code is not running on Google App Engine, compiled by GopherJS, and -// "-tags safe" is not added to the go build command line. The "disableunsafe" -// tag is deprecated and thus should not be used. -// +build !js,!appengine,!safe,!disableunsafe - -package spew - -import ( - "reflect" - "unsafe" -) - -const ( - // UnsafeDisabled is a build-time constant which specifies whether or - // not access to the unsafe package is available. - UnsafeDisabled = false - - // ptrSize is the size of a pointer on the current arch. - ptrSize = unsafe.Sizeof((*byte)(nil)) -) - -var ( - // offsetPtr, offsetScalar, and offsetFlag are the offsets for the - // internal reflect.Value fields. These values are valid before golang - // commit ecccf07e7f9d which changed the format. The are also valid - // after commit 82f48826c6c7 which changed the format again to mirror - // the original format. Code in the init function updates these offsets - // as necessary. - offsetPtr = uintptr(ptrSize) - offsetScalar = uintptr(0) - offsetFlag = uintptr(ptrSize * 2) - - // flagKindWidth and flagKindShift indicate various bits that the - // reflect package uses internally to track kind information. - // - // flagRO indicates whether or not the value field of a reflect.Value is - // read-only. - // - // flagIndir indicates whether the value field of a reflect.Value is - // the actual data or a pointer to the data. - // - // These values are valid before golang commit 90a7c3c86944 which - // changed their positions. Code in the init function updates these - // flags as necessary. - flagKindWidth = uintptr(5) - flagKindShift = uintptr(flagKindWidth - 1) - flagRO = uintptr(1 << 0) - flagIndir = uintptr(1 << 1) -) - -func init() { - // Older versions of reflect.Value stored small integers directly in the - // ptr field (which is named val in the older versions). Versions - // between commits ecccf07e7f9d and 82f48826c6c7 added a new field named - // scalar for this purpose which unfortunately came before the flag - // field, so the offset of the flag field is different for those - // versions. - // - // This code constructs a new reflect.Value from a known small integer - // and checks if the size of the reflect.Value struct indicates it has - // the scalar field. When it does, the offsets are updated accordingly. - vv := reflect.ValueOf(0xf00) - if unsafe.Sizeof(vv) == (ptrSize * 4) { - offsetScalar = ptrSize * 2 - offsetFlag = ptrSize * 3 - } - - // Commit 90a7c3c86944 changed the flag positions such that the low - // order bits are the kind. This code extracts the kind from the flags - // field and ensures it's the correct type. When it's not, the flag - // order has been changed to the newer format, so the flags are updated - // accordingly. - upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag) - upfv := *(*uintptr)(upf) - flagKindMask := uintptr((1<>flagKindShift != uintptr(reflect.Int) { - flagKindShift = 0 - flagRO = 1 << 5 - flagIndir = 1 << 6 - - // Commit adf9b30e5594 modified the flags to separate the - // flagRO flag into two bits which specifies whether or not the - // field is embedded. This causes flagIndir to move over a bit - // and means that flagRO is the combination of either of the - // original flagRO bit and the new bit. - // - // This code detects the change by extracting what used to be - // the indirect bit to ensure it's set. When it's not, the flag - // order has been changed to the newer format, so the flags are - // updated accordingly. - if upfv&flagIndir == 0 { - flagRO = 3 << 5 - flagIndir = 1 << 7 - } - } -} - -// unsafeReflectValue converts the passed reflect.Value into a one that bypasses -// the typical safety restrictions preventing access to unaddressable and -// unexported data. It works by digging the raw pointer to the underlying -// value out of the protected value and generating a new unprotected (unsafe) -// reflect.Value to it. -// -// This allows us to check for implementations of the Stringer and error -// interfaces to be used for pretty printing ordinarily unaddressable and -// inaccessible values such as unexported struct fields. -func unsafeReflectValue(v reflect.Value) (rv reflect.Value) { - indirects := 1 - vt := v.Type() - upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr) - rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag)) - if rvf&flagIndir != 0 { - vt = reflect.PtrTo(v.Type()) - indirects++ - } else if offsetScalar != 0 { - // The value is in the scalar field when it's not one of the - // reference types. - switch vt.Kind() { - case reflect.Uintptr: - case reflect.Chan: - case reflect.Func: - case reflect.Map: - case reflect.Ptr: - case reflect.UnsafePointer: - default: - upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + - offsetScalar) - } - } - - pv := reflect.NewAt(vt, upv) - rv = pv - for i := 0; i < indirects; i++ { - rv = rv.Elem() - } - return rv -} diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go deleted file mode 100644 index 1fe3cf3d..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2015-2016 Dave Collins -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -// NOTE: Due to the following build constraints, this file will only be compiled -// when the code is running on Google App Engine, compiled by GopherJS, or -// "-tags safe" is added to the go build command line. The "disableunsafe" -// tag is deprecated and thus should not be used. -// +build js appengine safe disableunsafe - -package spew - -import "reflect" - -const ( - // UnsafeDisabled is a build-time constant which specifies whether or - // not access to the unsafe package is available. - UnsafeDisabled = true -) - -// unsafeReflectValue typically converts the passed reflect.Value into a one -// that bypasses the typical safety restrictions preventing access to -// unaddressable and unexported data. However, doing this relies on access to -// the unsafe package. This is a stub version which simply returns the passed -// reflect.Value when the unsafe package is not available. -func unsafeReflectValue(v reflect.Value) reflect.Value { - return v -} diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go deleted file mode 100644 index 7c519ff4..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/common.go +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew - -import ( - "bytes" - "fmt" - "io" - "reflect" - "sort" - "strconv" -) - -// Some constants in the form of bytes to avoid string overhead. This mirrors -// the technique used in the fmt package. -var ( - panicBytes = []byte("(PANIC=") - plusBytes = []byte("+") - iBytes = []byte("i") - trueBytes = []byte("true") - falseBytes = []byte("false") - interfaceBytes = []byte("(interface {})") - commaNewlineBytes = []byte(",\n") - newlineBytes = []byte("\n") - openBraceBytes = []byte("{") - openBraceNewlineBytes = []byte("{\n") - closeBraceBytes = []byte("}") - asteriskBytes = []byte("*") - colonBytes = []byte(":") - colonSpaceBytes = []byte(": ") - openParenBytes = []byte("(") - closeParenBytes = []byte(")") - spaceBytes = []byte(" ") - pointerChainBytes = []byte("->") - nilAngleBytes = []byte("") - maxNewlineBytes = []byte("\n") - maxShortBytes = []byte("") - circularBytes = []byte("") - circularShortBytes = []byte("") - invalidAngleBytes = []byte("") - openBracketBytes = []byte("[") - closeBracketBytes = []byte("]") - percentBytes = []byte("%") - precisionBytes = []byte(".") - openAngleBytes = []byte("<") - closeAngleBytes = []byte(">") - openMapBytes = []byte("map[") - closeMapBytes = []byte("]") - lenEqualsBytes = []byte("len=") - capEqualsBytes = []byte("cap=") -) - -// hexDigits is used to map a decimal value to a hex digit. -var hexDigits = "0123456789abcdef" - -// catchPanic handles any panics that might occur during the handleMethods -// calls. -func catchPanic(w io.Writer, v reflect.Value) { - if err := recover(); err != nil { - w.Write(panicBytes) - fmt.Fprintf(w, "%v", err) - w.Write(closeParenBytes) - } -} - -// handleMethods attempts to call the Error and String methods on the underlying -// type the passed reflect.Value represents and outputes the result to Writer w. -// -// It handles panics in any called methods by catching and displaying the error -// as the formatted value. -func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) { - // We need an interface to check if the type implements the error or - // Stringer interface. However, the reflect package won't give us an - // interface on certain things like unexported struct fields in order - // to enforce visibility rules. We use unsafe, when it's available, - // to bypass these restrictions since this package does not mutate the - // values. - if !v.CanInterface() { - if UnsafeDisabled { - return false - } - - v = unsafeReflectValue(v) - } - - // Choose whether or not to do error and Stringer interface lookups against - // the base type or a pointer to the base type depending on settings. - // Technically calling one of these methods with a pointer receiver can - // mutate the value, however, types which choose to satisify an error or - // Stringer interface with a pointer receiver should not be mutating their - // state inside these interface methods. - if !cs.DisablePointerMethods && !UnsafeDisabled && !v.CanAddr() { - v = unsafeReflectValue(v) - } - if v.CanAddr() { - v = v.Addr() - } - - // Is it an error or Stringer? - switch iface := v.Interface().(type) { - case error: - defer catchPanic(w, v) - if cs.ContinueOnMethod { - w.Write(openParenBytes) - w.Write([]byte(iface.Error())) - w.Write(closeParenBytes) - w.Write(spaceBytes) - return false - } - - w.Write([]byte(iface.Error())) - return true - - case fmt.Stringer: - defer catchPanic(w, v) - if cs.ContinueOnMethod { - w.Write(openParenBytes) - w.Write([]byte(iface.String())) - w.Write(closeParenBytes) - w.Write(spaceBytes) - return false - } - w.Write([]byte(iface.String())) - return true - } - return false -} - -// printBool outputs a boolean value as true or false to Writer w. -func printBool(w io.Writer, val bool) { - if val { - w.Write(trueBytes) - } else { - w.Write(falseBytes) - } -} - -// printInt outputs a signed integer value to Writer w. -func printInt(w io.Writer, val int64, base int) { - w.Write([]byte(strconv.FormatInt(val, base))) -} - -// printUint outputs an unsigned integer value to Writer w. -func printUint(w io.Writer, val uint64, base int) { - w.Write([]byte(strconv.FormatUint(val, base))) -} - -// printFloat outputs a floating point value using the specified precision, -// which is expected to be 32 or 64bit, to Writer w. -func printFloat(w io.Writer, val float64, precision int) { - w.Write([]byte(strconv.FormatFloat(val, 'g', -1, precision))) -} - -// printComplex outputs a complex value using the specified float precision -// for the real and imaginary parts to Writer w. -func printComplex(w io.Writer, c complex128, floatPrecision int) { - r := real(c) - w.Write(openParenBytes) - w.Write([]byte(strconv.FormatFloat(r, 'g', -1, floatPrecision))) - i := imag(c) - if i >= 0 { - w.Write(plusBytes) - } - w.Write([]byte(strconv.FormatFloat(i, 'g', -1, floatPrecision))) - w.Write(iBytes) - w.Write(closeParenBytes) -} - -// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x' -// prefix to Writer w. -func printHexPtr(w io.Writer, p uintptr) { - // Null pointer. - num := uint64(p) - if num == 0 { - w.Write(nilAngleBytes) - return - } - - // Max uint64 is 16 bytes in hex + 2 bytes for '0x' prefix - buf := make([]byte, 18) - - // It's simpler to construct the hex string right to left. - base := uint64(16) - i := len(buf) - 1 - for num >= base { - buf[i] = hexDigits[num%base] - num /= base - i-- - } - buf[i] = hexDigits[num] - - // Add '0x' prefix. - i-- - buf[i] = 'x' - i-- - buf[i] = '0' - - // Strip unused leading bytes. - buf = buf[i:] - w.Write(buf) -} - -// valuesSorter implements sort.Interface to allow a slice of reflect.Value -// elements to be sorted. -type valuesSorter struct { - values []reflect.Value - strings []string // either nil or same len and values - cs *ConfigState -} - -// newValuesSorter initializes a valuesSorter instance, which holds a set of -// surrogate keys on which the data should be sorted. It uses flags in -// ConfigState to decide if and how to populate those surrogate keys. -func newValuesSorter(values []reflect.Value, cs *ConfigState) sort.Interface { - vs := &valuesSorter{values: values, cs: cs} - if canSortSimply(vs.values[0].Kind()) { - return vs - } - if !cs.DisableMethods { - vs.strings = make([]string, len(values)) - for i := range vs.values { - b := bytes.Buffer{} - if !handleMethods(cs, &b, vs.values[i]) { - vs.strings = nil - break - } - vs.strings[i] = b.String() - } - } - if vs.strings == nil && cs.SpewKeys { - vs.strings = make([]string, len(values)) - for i := range vs.values { - vs.strings[i] = Sprintf("%#v", vs.values[i].Interface()) - } - } - return vs -} - -// canSortSimply tests whether a reflect.Kind is a primitive that can be sorted -// directly, or whether it should be considered for sorting by surrogate keys -// (if the ConfigState allows it). -func canSortSimply(kind reflect.Kind) bool { - // This switch parallels valueSortLess, except for the default case. - switch kind { - case reflect.Bool: - return true - case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - return true - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: - return true - case reflect.Float32, reflect.Float64: - return true - case reflect.String: - return true - case reflect.Uintptr: - return true - case reflect.Array: - return true - } - return false -} - -// Len returns the number of values in the slice. It is part of the -// sort.Interface implementation. -func (s *valuesSorter) Len() int { - return len(s.values) -} - -// Swap swaps the values at the passed indices. It is part of the -// sort.Interface implementation. -func (s *valuesSorter) Swap(i, j int) { - s.values[i], s.values[j] = s.values[j], s.values[i] - if s.strings != nil { - s.strings[i], s.strings[j] = s.strings[j], s.strings[i] - } -} - -// valueSortLess returns whether the first value should sort before the second -// value. It is used by valueSorter.Less as part of the sort.Interface -// implementation. -func valueSortLess(a, b reflect.Value) bool { - switch a.Kind() { - case reflect.Bool: - return !a.Bool() && b.Bool() - case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - return a.Int() < b.Int() - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: - return a.Uint() < b.Uint() - case reflect.Float32, reflect.Float64: - return a.Float() < b.Float() - case reflect.String: - return a.String() < b.String() - case reflect.Uintptr: - return a.Uint() < b.Uint() - case reflect.Array: - // Compare the contents of both arrays. - l := a.Len() - for i := 0; i < l; i++ { - av := a.Index(i) - bv := b.Index(i) - if av.Interface() == bv.Interface() { - continue - } - return valueSortLess(av, bv) - } - } - return a.String() < b.String() -} - -// Less returns whether the value at index i should sort before the -// value at index j. It is part of the sort.Interface implementation. -func (s *valuesSorter) Less(i, j int) bool { - if s.strings == nil { - return valueSortLess(s.values[i], s.values[j]) - } - return s.strings[i] < s.strings[j] -} - -// sortValues is a sort function that handles both native types and any type that -// can be converted to error or Stringer. Other inputs are sorted according to -// their Value.String() value to ensure display stability. -func sortValues(values []reflect.Value, cs *ConfigState) { - if len(values) == 0 { - return - } - sort.Sort(newValuesSorter(values, cs)) -} diff --git a/vendor/github.com/davecgh/go-spew/spew/config.go b/vendor/github.com/davecgh/go-spew/spew/config.go deleted file mode 100644 index 2e3d22f3..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/config.go +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew - -import ( - "bytes" - "fmt" - "io" - "os" -) - -// ConfigState houses the configuration options used by spew to format and -// display values. There is a global instance, Config, that is used to control -// all top-level Formatter and Dump functionality. Each ConfigState instance -// provides methods equivalent to the top-level functions. -// -// The zero value for ConfigState provides no indentation. You would typically -// want to set it to a space or a tab. -// -// Alternatively, you can use NewDefaultConfig to get a ConfigState instance -// with default settings. See the documentation of NewDefaultConfig for default -// values. -type ConfigState struct { - // Indent specifies the string to use for each indentation level. The - // global config instance that all top-level functions use set this to a - // single space by default. If you would like more indentation, you might - // set this to a tab with "\t" or perhaps two spaces with " ". - Indent string - - // MaxDepth controls the maximum number of levels to descend into nested - // data structures. The default, 0, means there is no limit. - // - // NOTE: Circular data structures are properly detected, so it is not - // necessary to set this value unless you specifically want to limit deeply - // nested data structures. - MaxDepth int - - // DisableMethods specifies whether or not error and Stringer interfaces are - // invoked for types that implement them. - DisableMethods bool - - // DisablePointerMethods specifies whether or not to check for and invoke - // error and Stringer interfaces on types which only accept a pointer - // receiver when the current type is not a pointer. - // - // NOTE: This might be an unsafe action since calling one of these methods - // with a pointer receiver could technically mutate the value, however, - // in practice, types which choose to satisify an error or Stringer - // interface with a pointer receiver should not be mutating their state - // inside these interface methods. As a result, this option relies on - // access to the unsafe package, so it will not have any effect when - // running in environments without access to the unsafe package such as - // Google App Engine or with the "safe" build tag specified. - DisablePointerMethods bool - - // DisablePointerAddresses specifies whether to disable the printing of - // pointer addresses. This is useful when diffing data structures in tests. - DisablePointerAddresses bool - - // DisableCapacities specifies whether to disable the printing of capacities - // for arrays, slices, maps and channels. This is useful when diffing - // data structures in tests. - DisableCapacities bool - - // ContinueOnMethod specifies whether or not recursion should continue once - // a custom error or Stringer interface is invoked. The default, false, - // means it will print the results of invoking the custom error or Stringer - // interface and return immediately instead of continuing to recurse into - // the internals of the data type. - // - // NOTE: This flag does not have any effect if method invocation is disabled - // via the DisableMethods or DisablePointerMethods options. - ContinueOnMethod bool - - // SortKeys specifies map keys should be sorted before being printed. Use - // this to have a more deterministic, diffable output. Note that only - // native types (bool, int, uint, floats, uintptr and string) and types - // that support the error or Stringer interfaces (if methods are - // enabled) are supported, with other types sorted according to the - // reflect.Value.String() output which guarantees display stability. - SortKeys bool - - // SpewKeys specifies that, as a last resort attempt, map keys should - // be spewed to strings and sorted by those strings. This is only - // considered if SortKeys is true. - SpewKeys bool -} - -// Config is the active configuration of the top-level functions. -// The configuration can be changed by modifying the contents of spew.Config. -var Config = ConfigState{Indent: " "} - -// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the formatted string as a value that satisfies error. See NewFormatter -// for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Errorf(format, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Errorf(format string, a ...interface{}) (err error) { - return fmt.Errorf(format, c.convertArgs(a)...) -} - -// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprint(w, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Fprint(w io.Writer, a ...interface{}) (n int, err error) { - return fmt.Fprint(w, c.convertArgs(a)...) -} - -// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprintf(w, format, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { - return fmt.Fprintf(w, format, c.convertArgs(a)...) -} - -// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it -// passed with a Formatter interface returned by c.NewFormatter. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprintln(w, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { - return fmt.Fprintln(w, c.convertArgs(a)...) -} - -// Print is a wrapper for fmt.Print that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Print(c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Print(a ...interface{}) (n int, err error) { - return fmt.Print(c.convertArgs(a)...) -} - -// Printf is a wrapper for fmt.Printf that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Printf(format, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Printf(format string, a ...interface{}) (n int, err error) { - return fmt.Printf(format, c.convertArgs(a)...) -} - -// Println is a wrapper for fmt.Println that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Println(c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Println(a ...interface{}) (n int, err error) { - return fmt.Println(c.convertArgs(a)...) -} - -// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprint(c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Sprint(a ...interface{}) string { - return fmt.Sprint(c.convertArgs(a)...) -} - -// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were -// passed with a Formatter interface returned by c.NewFormatter. It returns -// the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Sprintf(format string, a ...interface{}) string { - return fmt.Sprintf(format, c.convertArgs(a)...) -} - -// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it -// were passed with a Formatter interface returned by c.NewFormatter. It -// returns the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprintln(c.NewFormatter(a), c.NewFormatter(b)) -func (c *ConfigState) Sprintln(a ...interface{}) string { - return fmt.Sprintln(c.convertArgs(a)...) -} - -/* -NewFormatter returns a custom formatter that satisfies the fmt.Formatter -interface. As a result, it integrates cleanly with standard fmt package -printing functions. The formatter is useful for inline printing of smaller data -types similar to the standard %v format specifier. - -The custom formatter only responds to the %v (most compact), %+v (adds pointer -addresses), %#v (adds types), and %#+v (adds types and pointer addresses) verb -combinations. Any other verbs such as %x and %q will be sent to the the -standard fmt package for formatting. In addition, the custom formatter ignores -the width and precision arguments (however they will still work on the format -specifiers not handled by the custom formatter). - -Typically this function shouldn't be called directly. It is much easier to make -use of the custom formatter by calling one of the convenience functions such as -c.Printf, c.Println, or c.Printf. -*/ -func (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter { - return newFormatter(c, v) -} - -// Fdump formats and displays the passed arguments to io.Writer w. It formats -// exactly the same as Dump. -func (c *ConfigState) Fdump(w io.Writer, a ...interface{}) { - fdump(c, w, a...) -} - -/* -Dump displays the passed parameters to standard out with newlines, customizable -indentation, and additional debug information such as complete types and all -pointer addresses used to indirect to the final value. It provides the -following features over the built-in printing facilities provided by the fmt -package: - - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output - -The configuration options are controlled by modifying the public members -of c. See ConfigState for options documentation. - -See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to -get the formatted result as a string. -*/ -func (c *ConfigState) Dump(a ...interface{}) { - fdump(c, os.Stdout, a...) -} - -// Sdump returns a string with the passed arguments formatted exactly the same -// as Dump. -func (c *ConfigState) Sdump(a ...interface{}) string { - var buf bytes.Buffer - fdump(c, &buf, a...) - return buf.String() -} - -// convertArgs accepts a slice of arguments and returns a slice of the same -// length with each argument converted to a spew Formatter interface using -// the ConfigState associated with s. -func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) { - formatters = make([]interface{}, len(args)) - for index, arg := range args { - formatters[index] = newFormatter(c, arg) - } - return formatters -} - -// NewDefaultConfig returns a ConfigState with the following default settings. -// -// Indent: " " -// MaxDepth: 0 -// DisableMethods: false -// DisablePointerMethods: false -// ContinueOnMethod: false -// SortKeys: false -func NewDefaultConfig() *ConfigState { - return &ConfigState{Indent: " "} -} diff --git a/vendor/github.com/davecgh/go-spew/spew/doc.go b/vendor/github.com/davecgh/go-spew/spew/doc.go deleted file mode 100644 index aacaac6f..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/doc.go +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* -Package spew implements a deep pretty printer for Go data structures to aid in -debugging. - -A quick overview of the additional features spew provides over the built-in -printing facilities for Go data types are as follows: - - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output (only when using - Dump style) - -There are two different approaches spew allows for dumping Go data structures: - - * Dump style which prints with newlines, customizable indentation, - and additional debug information such as types and all pointer addresses - used to indirect to the final value - * A custom Formatter interface that integrates cleanly with the standard fmt - package and replaces %v, %+v, %#v, and %#+v to provide inline printing - similar to the default %v while providing the additional functionality - outlined above and passing unsupported format verbs such as %x and %q - along to fmt - -Quick Start - -This section demonstrates how to quickly get started with spew. See the -sections below for further details on formatting and configuration options. - -To dump a variable with full newlines, indentation, type, and pointer -information use Dump, Fdump, or Sdump: - spew.Dump(myVar1, myVar2, ...) - spew.Fdump(someWriter, myVar1, myVar2, ...) - str := spew.Sdump(myVar1, myVar2, ...) - -Alternatively, if you would prefer to use format strings with a compacted inline -printing style, use the convenience wrappers Printf, Fprintf, etc with -%v (most compact), %+v (adds pointer addresses), %#v (adds types), or -%#+v (adds types and pointer addresses): - spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) - spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) - spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) - spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) - -Configuration Options - -Configuration of spew is handled by fields in the ConfigState type. For -convenience, all of the top-level functions use a global state available -via the spew.Config global. - -It is also possible to create a ConfigState instance that provides methods -equivalent to the top-level functions. This allows concurrent configuration -options. See the ConfigState documentation for more details. - -The following configuration options are available: - * Indent - String to use for each indentation level for Dump functions. - It is a single space by default. A popular alternative is "\t". - - * MaxDepth - Maximum number of levels to descend into nested data structures. - There is no limit by default. - - * DisableMethods - Disables invocation of error and Stringer interface methods. - Method invocation is enabled by default. - - * DisablePointerMethods - Disables invocation of error and Stringer interface methods on types - which only accept pointer receivers from non-pointer variables. - Pointer method invocation is enabled by default. - - * DisablePointerAddresses - DisablePointerAddresses specifies whether to disable the printing of - pointer addresses. This is useful when diffing data structures in tests. - - * DisableCapacities - DisableCapacities specifies whether to disable the printing of - capacities for arrays, slices, maps and channels. This is useful when - diffing data structures in tests. - - * ContinueOnMethod - Enables recursion into types after invoking error and Stringer interface - methods. Recursion after method invocation is disabled by default. - - * SortKeys - Specifies map keys should be sorted before being printed. Use - this to have a more deterministic, diffable output. Note that - only native types (bool, int, uint, floats, uintptr and string) - and types which implement error or Stringer interfaces are - supported with other types sorted according to the - reflect.Value.String() output which guarantees display - stability. Natural map order is used by default. - - * SpewKeys - Specifies that, as a last resort attempt, map keys should be - spewed to strings and sorted by those strings. This is only - considered if SortKeys is true. - -Dump Usage - -Simply call spew.Dump with a list of variables you want to dump: - - spew.Dump(myVar1, myVar2, ...) - -You may also call spew.Fdump if you would prefer to output to an arbitrary -io.Writer. For example, to dump to standard error: - - spew.Fdump(os.Stderr, myVar1, myVar2, ...) - -A third option is to call spew.Sdump to get the formatted output as a string: - - str := spew.Sdump(myVar1, myVar2, ...) - -Sample Dump Output - -See the Dump example for details on the setup of the types and variables being -shown here. - - (main.Foo) { - unexportedField: (*main.Bar)(0xf84002e210)({ - flag: (main.Flag) flagTwo, - data: (uintptr) - }), - ExportedField: (map[interface {}]interface {}) (len=1) { - (string) (len=3) "one": (bool) true - } - } - -Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C -command as shown. - ([]uint8) (len=32 cap=32) { - 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | - 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| - 00000020 31 32 |12| - } - -Custom Formatter - -Spew provides a custom formatter that implements the fmt.Formatter interface -so that it integrates cleanly with standard fmt package printing functions. The -formatter is useful for inline printing of smaller data types similar to the -standard %v format specifier. - -The custom formatter only responds to the %v (most compact), %+v (adds pointer -addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb -combinations. Any other verbs such as %x and %q will be sent to the the -standard fmt package for formatting. In addition, the custom formatter ignores -the width and precision arguments (however they will still work on the format -specifiers not handled by the custom formatter). - -Custom Formatter Usage - -The simplest way to make use of the spew custom formatter is to call one of the -convenience functions such as spew.Printf, spew.Println, or spew.Printf. The -functions have syntax you are most likely already familiar with: - - spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) - spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) - spew.Println(myVar, myVar2) - spew.Fprintf(os.Stderr, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) - spew.Fprintf(os.Stderr, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) - -See the Index for the full list convenience functions. - -Sample Formatter Output - -Double pointer to a uint8: - %v: <**>5 - %+v: <**>(0xf8400420d0->0xf8400420c8)5 - %#v: (**uint8)5 - %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 - -Pointer to circular struct with a uint8 field and a pointer to itself: - %v: <*>{1 <*>} - %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} - %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} - %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)} - -See the Printf example for details on the setup of variables being shown -here. - -Errors - -Since it is possible for custom Stringer/error interfaces to panic, spew -detects them and handles them internally by printing the panic information -inline with the output. Since spew is intended to provide deep pretty printing -capabilities on structures, it intentionally does not return any errors. -*/ -package spew diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go deleted file mode 100644 index df1d582a..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/dump.go +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew - -import ( - "bytes" - "encoding/hex" - "fmt" - "io" - "os" - "reflect" - "regexp" - "strconv" - "strings" -) - -var ( - // uint8Type is a reflect.Type representing a uint8. It is used to - // convert cgo types to uint8 slices for hexdumping. - uint8Type = reflect.TypeOf(uint8(0)) - - // cCharRE is a regular expression that matches a cgo char. - // It is used to detect character arrays to hexdump them. - cCharRE = regexp.MustCompile("^.*\\._Ctype_char$") - - // cUnsignedCharRE is a regular expression that matches a cgo unsigned - // char. It is used to detect unsigned character arrays to hexdump - // them. - cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$") - - // cUint8tCharRE is a regular expression that matches a cgo uint8_t. - // It is used to detect uint8_t arrays to hexdump them. - cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$") -) - -// dumpState contains information about the state of a dump operation. -type dumpState struct { - w io.Writer - depth int - pointers map[uintptr]int - ignoreNextType bool - ignoreNextIndent bool - cs *ConfigState -} - -// indent performs indentation according to the depth level and cs.Indent -// option. -func (d *dumpState) indent() { - if d.ignoreNextIndent { - d.ignoreNextIndent = false - return - } - d.w.Write(bytes.Repeat([]byte(d.cs.Indent), d.depth)) -} - -// unpackValue returns values inside of non-nil interfaces when possible. -// This is useful for data types like structs, arrays, slices, and maps which -// can contain varying types packed inside an interface. -func (d *dumpState) unpackValue(v reflect.Value) reflect.Value { - if v.Kind() == reflect.Interface && !v.IsNil() { - v = v.Elem() - } - return v -} - -// dumpPtr handles formatting of pointers by indirecting them as necessary. -func (d *dumpState) dumpPtr(v reflect.Value) { - // Remove pointers at or below the current depth from map used to detect - // circular refs. - for k, depth := range d.pointers { - if depth >= d.depth { - delete(d.pointers, k) - } - } - - // Keep list of all dereferenced pointers to show later. - pointerChain := make([]uintptr, 0) - - // Figure out how many levels of indirection there are by dereferencing - // pointers and unpacking interfaces down the chain while detecting circular - // references. - nilFound := false - cycleFound := false - indirects := 0 - ve := v - for ve.Kind() == reflect.Ptr { - if ve.IsNil() { - nilFound = true - break - } - indirects++ - addr := ve.Pointer() - pointerChain = append(pointerChain, addr) - if pd, ok := d.pointers[addr]; ok && pd < d.depth { - cycleFound = true - indirects-- - break - } - d.pointers[addr] = d.depth - - ve = ve.Elem() - if ve.Kind() == reflect.Interface { - if ve.IsNil() { - nilFound = true - break - } - ve = ve.Elem() - } - } - - // Display type information. - d.w.Write(openParenBytes) - d.w.Write(bytes.Repeat(asteriskBytes, indirects)) - d.w.Write([]byte(ve.Type().String())) - d.w.Write(closeParenBytes) - - // Display pointer information. - if !d.cs.DisablePointerAddresses && len(pointerChain) > 0 { - d.w.Write(openParenBytes) - for i, addr := range pointerChain { - if i > 0 { - d.w.Write(pointerChainBytes) - } - printHexPtr(d.w, addr) - } - d.w.Write(closeParenBytes) - } - - // Display dereferenced value. - d.w.Write(openParenBytes) - switch { - case nilFound == true: - d.w.Write(nilAngleBytes) - - case cycleFound == true: - d.w.Write(circularBytes) - - default: - d.ignoreNextType = true - d.dump(ve) - } - d.w.Write(closeParenBytes) -} - -// dumpSlice handles formatting of arrays and slices. Byte (uint8 under -// reflection) arrays and slices are dumped in hexdump -C fashion. -func (d *dumpState) dumpSlice(v reflect.Value) { - // Determine whether this type should be hex dumped or not. Also, - // for types which should be hexdumped, try to use the underlying data - // first, then fall back to trying to convert them to a uint8 slice. - var buf []uint8 - doConvert := false - doHexDump := false - numEntries := v.Len() - if numEntries > 0 { - vt := v.Index(0).Type() - vts := vt.String() - switch { - // C types that need to be converted. - case cCharRE.MatchString(vts): - fallthrough - case cUnsignedCharRE.MatchString(vts): - fallthrough - case cUint8tCharRE.MatchString(vts): - doConvert = true - - // Try to use existing uint8 slices and fall back to converting - // and copying if that fails. - case vt.Kind() == reflect.Uint8: - // We need an addressable interface to convert the type - // to a byte slice. However, the reflect package won't - // give us an interface on certain things like - // unexported struct fields in order to enforce - // visibility rules. We use unsafe, when available, to - // bypass these restrictions since this package does not - // mutate the values. - vs := v - if !vs.CanInterface() || !vs.CanAddr() { - vs = unsafeReflectValue(vs) - } - if !UnsafeDisabled { - vs = vs.Slice(0, numEntries) - - // Use the existing uint8 slice if it can be - // type asserted. - iface := vs.Interface() - if slice, ok := iface.([]uint8); ok { - buf = slice - doHexDump = true - break - } - } - - // The underlying data needs to be converted if it can't - // be type asserted to a uint8 slice. - doConvert = true - } - - // Copy and convert the underlying type if needed. - if doConvert && vt.ConvertibleTo(uint8Type) { - // Convert and copy each element into a uint8 byte - // slice. - buf = make([]uint8, numEntries) - for i := 0; i < numEntries; i++ { - vv := v.Index(i) - buf[i] = uint8(vv.Convert(uint8Type).Uint()) - } - doHexDump = true - } - } - - // Hexdump the entire slice as needed. - if doHexDump { - indent := strings.Repeat(d.cs.Indent, d.depth) - str := indent + hex.Dump(buf) - str = strings.Replace(str, "\n", "\n"+indent, -1) - str = strings.TrimRight(str, d.cs.Indent) - d.w.Write([]byte(str)) - return - } - - // Recursively call dump for each item. - for i := 0; i < numEntries; i++ { - d.dump(d.unpackValue(v.Index(i))) - if i < (numEntries - 1) { - d.w.Write(commaNewlineBytes) - } else { - d.w.Write(newlineBytes) - } - } -} - -// dump is the main workhorse for dumping a value. It uses the passed reflect -// value to figure out what kind of object we are dealing with and formats it -// appropriately. It is a recursive function, however circular data structures -// are detected and handled properly. -func (d *dumpState) dump(v reflect.Value) { - // Handle invalid reflect values immediately. - kind := v.Kind() - if kind == reflect.Invalid { - d.w.Write(invalidAngleBytes) - return - } - - // Handle pointers specially. - if kind == reflect.Ptr { - d.indent() - d.dumpPtr(v) - return - } - - // Print type information unless already handled elsewhere. - if !d.ignoreNextType { - d.indent() - d.w.Write(openParenBytes) - d.w.Write([]byte(v.Type().String())) - d.w.Write(closeParenBytes) - d.w.Write(spaceBytes) - } - d.ignoreNextType = false - - // Display length and capacity if the built-in len and cap functions - // work with the value's kind and the len/cap itself is non-zero. - valueLen, valueCap := 0, 0 - switch v.Kind() { - case reflect.Array, reflect.Slice, reflect.Chan: - valueLen, valueCap = v.Len(), v.Cap() - case reflect.Map, reflect.String: - valueLen = v.Len() - } - if valueLen != 0 || !d.cs.DisableCapacities && valueCap != 0 { - d.w.Write(openParenBytes) - if valueLen != 0 { - d.w.Write(lenEqualsBytes) - printInt(d.w, int64(valueLen), 10) - } - if !d.cs.DisableCapacities && valueCap != 0 { - if valueLen != 0 { - d.w.Write(spaceBytes) - } - d.w.Write(capEqualsBytes) - printInt(d.w, int64(valueCap), 10) - } - d.w.Write(closeParenBytes) - d.w.Write(spaceBytes) - } - - // Call Stringer/error interfaces if they exist and the handle methods flag - // is enabled - if !d.cs.DisableMethods { - if (kind != reflect.Invalid) && (kind != reflect.Interface) { - if handled := handleMethods(d.cs, d.w, v); handled { - return - } - } - } - - switch kind { - case reflect.Invalid: - // Do nothing. We should never get here since invalid has already - // been handled above. - - case reflect.Bool: - printBool(d.w, v.Bool()) - - case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - printInt(d.w, v.Int(), 10) - - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: - printUint(d.w, v.Uint(), 10) - - case reflect.Float32: - printFloat(d.w, v.Float(), 32) - - case reflect.Float64: - printFloat(d.w, v.Float(), 64) - - case reflect.Complex64: - printComplex(d.w, v.Complex(), 32) - - case reflect.Complex128: - printComplex(d.w, v.Complex(), 64) - - case reflect.Slice: - if v.IsNil() { - d.w.Write(nilAngleBytes) - break - } - fallthrough - - case reflect.Array: - d.w.Write(openBraceNewlineBytes) - d.depth++ - if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { - d.indent() - d.w.Write(maxNewlineBytes) - } else { - d.dumpSlice(v) - } - d.depth-- - d.indent() - d.w.Write(closeBraceBytes) - - case reflect.String: - d.w.Write([]byte(strconv.Quote(v.String()))) - - case reflect.Interface: - // The only time we should get here is for nil interfaces due to - // unpackValue calls. - if v.IsNil() { - d.w.Write(nilAngleBytes) - } - - case reflect.Ptr: - // Do nothing. We should never get here since pointers have already - // been handled above. - - case reflect.Map: - // nil maps should be indicated as different than empty maps - if v.IsNil() { - d.w.Write(nilAngleBytes) - break - } - - d.w.Write(openBraceNewlineBytes) - d.depth++ - if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { - d.indent() - d.w.Write(maxNewlineBytes) - } else { - numEntries := v.Len() - keys := v.MapKeys() - if d.cs.SortKeys { - sortValues(keys, d.cs) - } - for i, key := range keys { - d.dump(d.unpackValue(key)) - d.w.Write(colonSpaceBytes) - d.ignoreNextIndent = true - d.dump(d.unpackValue(v.MapIndex(key))) - if i < (numEntries - 1) { - d.w.Write(commaNewlineBytes) - } else { - d.w.Write(newlineBytes) - } - } - } - d.depth-- - d.indent() - d.w.Write(closeBraceBytes) - - case reflect.Struct: - d.w.Write(openBraceNewlineBytes) - d.depth++ - if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { - d.indent() - d.w.Write(maxNewlineBytes) - } else { - vt := v.Type() - numFields := v.NumField() - for i := 0; i < numFields; i++ { - d.indent() - vtf := vt.Field(i) - d.w.Write([]byte(vtf.Name)) - d.w.Write(colonSpaceBytes) - d.ignoreNextIndent = true - d.dump(d.unpackValue(v.Field(i))) - if i < (numFields - 1) { - d.w.Write(commaNewlineBytes) - } else { - d.w.Write(newlineBytes) - } - } - } - d.depth-- - d.indent() - d.w.Write(closeBraceBytes) - - case reflect.Uintptr: - printHexPtr(d.w, uintptr(v.Uint())) - - case reflect.UnsafePointer, reflect.Chan, reflect.Func: - printHexPtr(d.w, v.Pointer()) - - // There were not any other types at the time this code was written, but - // fall back to letting the default fmt package handle it in case any new - // types are added. - default: - if v.CanInterface() { - fmt.Fprintf(d.w, "%v", v.Interface()) - } else { - fmt.Fprintf(d.w, "%v", v.String()) - } - } -} - -// fdump is a helper function to consolidate the logic from the various public -// methods which take varying writers and config states. -func fdump(cs *ConfigState, w io.Writer, a ...interface{}) { - for _, arg := range a { - if arg == nil { - w.Write(interfaceBytes) - w.Write(spaceBytes) - w.Write(nilAngleBytes) - w.Write(newlineBytes) - continue - } - - d := dumpState{w: w, cs: cs} - d.pointers = make(map[uintptr]int) - d.dump(reflect.ValueOf(arg)) - d.w.Write(newlineBytes) - } -} - -// Fdump formats and displays the passed arguments to io.Writer w. It formats -// exactly the same as Dump. -func Fdump(w io.Writer, a ...interface{}) { - fdump(&Config, w, a...) -} - -// Sdump returns a string with the passed arguments formatted exactly the same -// as Dump. -func Sdump(a ...interface{}) string { - var buf bytes.Buffer - fdump(&Config, &buf, a...) - return buf.String() -} - -/* -Dump displays the passed parameters to standard out with newlines, customizable -indentation, and additional debug information such as complete types and all -pointer addresses used to indirect to the final value. It provides the -following features over the built-in printing facilities provided by the fmt -package: - - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output - -The configuration options are controlled by an exported package global, -spew.Config. See ConfigState for options documentation. - -See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to -get the formatted result as a string. -*/ -func Dump(a ...interface{}) { - fdump(&Config, os.Stdout, a...) -} diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go deleted file mode 100644 index c49875ba..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/format.go +++ /dev/null @@ -1,419 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew - -import ( - "bytes" - "fmt" - "reflect" - "strconv" - "strings" -) - -// supportedFlags is a list of all the character flags supported by fmt package. -const supportedFlags = "0-+# " - -// formatState implements the fmt.Formatter interface and contains information -// about the state of a formatting operation. The NewFormatter function can -// be used to get a new Formatter which can be used directly as arguments -// in standard fmt package printing calls. -type formatState struct { - value interface{} - fs fmt.State - depth int - pointers map[uintptr]int - ignoreNextType bool - cs *ConfigState -} - -// buildDefaultFormat recreates the original format string without precision -// and width information to pass in to fmt.Sprintf in the case of an -// unrecognized type. Unless new types are added to the language, this -// function won't ever be called. -func (f *formatState) buildDefaultFormat() (format string) { - buf := bytes.NewBuffer(percentBytes) - - for _, flag := range supportedFlags { - if f.fs.Flag(int(flag)) { - buf.WriteRune(flag) - } - } - - buf.WriteRune('v') - - format = buf.String() - return format -} - -// constructOrigFormat recreates the original format string including precision -// and width information to pass along to the standard fmt package. This allows -// automatic deferral of all format strings this package doesn't support. -func (f *formatState) constructOrigFormat(verb rune) (format string) { - buf := bytes.NewBuffer(percentBytes) - - for _, flag := range supportedFlags { - if f.fs.Flag(int(flag)) { - buf.WriteRune(flag) - } - } - - if width, ok := f.fs.Width(); ok { - buf.WriteString(strconv.Itoa(width)) - } - - if precision, ok := f.fs.Precision(); ok { - buf.Write(precisionBytes) - buf.WriteString(strconv.Itoa(precision)) - } - - buf.WriteRune(verb) - - format = buf.String() - return format -} - -// unpackValue returns values inside of non-nil interfaces when possible and -// ensures that types for values which have been unpacked from an interface -// are displayed when the show types flag is also set. -// This is useful for data types like structs, arrays, slices, and maps which -// can contain varying types packed inside an interface. -func (f *formatState) unpackValue(v reflect.Value) reflect.Value { - if v.Kind() == reflect.Interface { - f.ignoreNextType = false - if !v.IsNil() { - v = v.Elem() - } - } - return v -} - -// formatPtr handles formatting of pointers by indirecting them as necessary. -func (f *formatState) formatPtr(v reflect.Value) { - // Display nil if top level pointer is nil. - showTypes := f.fs.Flag('#') - if v.IsNil() && (!showTypes || f.ignoreNextType) { - f.fs.Write(nilAngleBytes) - return - } - - // Remove pointers at or below the current depth from map used to detect - // circular refs. - for k, depth := range f.pointers { - if depth >= f.depth { - delete(f.pointers, k) - } - } - - // Keep list of all dereferenced pointers to possibly show later. - pointerChain := make([]uintptr, 0) - - // Figure out how many levels of indirection there are by derferencing - // pointers and unpacking interfaces down the chain while detecting circular - // references. - nilFound := false - cycleFound := false - indirects := 0 - ve := v - for ve.Kind() == reflect.Ptr { - if ve.IsNil() { - nilFound = true - break - } - indirects++ - addr := ve.Pointer() - pointerChain = append(pointerChain, addr) - if pd, ok := f.pointers[addr]; ok && pd < f.depth { - cycleFound = true - indirects-- - break - } - f.pointers[addr] = f.depth - - ve = ve.Elem() - if ve.Kind() == reflect.Interface { - if ve.IsNil() { - nilFound = true - break - } - ve = ve.Elem() - } - } - - // Display type or indirection level depending on flags. - if showTypes && !f.ignoreNextType { - f.fs.Write(openParenBytes) - f.fs.Write(bytes.Repeat(asteriskBytes, indirects)) - f.fs.Write([]byte(ve.Type().String())) - f.fs.Write(closeParenBytes) - } else { - if nilFound || cycleFound { - indirects += strings.Count(ve.Type().String(), "*") - } - f.fs.Write(openAngleBytes) - f.fs.Write([]byte(strings.Repeat("*", indirects))) - f.fs.Write(closeAngleBytes) - } - - // Display pointer information depending on flags. - if f.fs.Flag('+') && (len(pointerChain) > 0) { - f.fs.Write(openParenBytes) - for i, addr := range pointerChain { - if i > 0 { - f.fs.Write(pointerChainBytes) - } - printHexPtr(f.fs, addr) - } - f.fs.Write(closeParenBytes) - } - - // Display dereferenced value. - switch { - case nilFound == true: - f.fs.Write(nilAngleBytes) - - case cycleFound == true: - f.fs.Write(circularShortBytes) - - default: - f.ignoreNextType = true - f.format(ve) - } -} - -// format is the main workhorse for providing the Formatter interface. It -// uses the passed reflect value to figure out what kind of object we are -// dealing with and formats it appropriately. It is a recursive function, -// however circular data structures are detected and handled properly. -func (f *formatState) format(v reflect.Value) { - // Handle invalid reflect values immediately. - kind := v.Kind() - if kind == reflect.Invalid { - f.fs.Write(invalidAngleBytes) - return - } - - // Handle pointers specially. - if kind == reflect.Ptr { - f.formatPtr(v) - return - } - - // Print type information unless already handled elsewhere. - if !f.ignoreNextType && f.fs.Flag('#') { - f.fs.Write(openParenBytes) - f.fs.Write([]byte(v.Type().String())) - f.fs.Write(closeParenBytes) - } - f.ignoreNextType = false - - // Call Stringer/error interfaces if they exist and the handle methods - // flag is enabled. - if !f.cs.DisableMethods { - if (kind != reflect.Invalid) && (kind != reflect.Interface) { - if handled := handleMethods(f.cs, f.fs, v); handled { - return - } - } - } - - switch kind { - case reflect.Invalid: - // Do nothing. We should never get here since invalid has already - // been handled above. - - case reflect.Bool: - printBool(f.fs, v.Bool()) - - case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - printInt(f.fs, v.Int(), 10) - - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: - printUint(f.fs, v.Uint(), 10) - - case reflect.Float32: - printFloat(f.fs, v.Float(), 32) - - case reflect.Float64: - printFloat(f.fs, v.Float(), 64) - - case reflect.Complex64: - printComplex(f.fs, v.Complex(), 32) - - case reflect.Complex128: - printComplex(f.fs, v.Complex(), 64) - - case reflect.Slice: - if v.IsNil() { - f.fs.Write(nilAngleBytes) - break - } - fallthrough - - case reflect.Array: - f.fs.Write(openBracketBytes) - f.depth++ - if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { - f.fs.Write(maxShortBytes) - } else { - numEntries := v.Len() - for i := 0; i < numEntries; i++ { - if i > 0 { - f.fs.Write(spaceBytes) - } - f.ignoreNextType = true - f.format(f.unpackValue(v.Index(i))) - } - } - f.depth-- - f.fs.Write(closeBracketBytes) - - case reflect.String: - f.fs.Write([]byte(v.String())) - - case reflect.Interface: - // The only time we should get here is for nil interfaces due to - // unpackValue calls. - if v.IsNil() { - f.fs.Write(nilAngleBytes) - } - - case reflect.Ptr: - // Do nothing. We should never get here since pointers have already - // been handled above. - - case reflect.Map: - // nil maps should be indicated as different than empty maps - if v.IsNil() { - f.fs.Write(nilAngleBytes) - break - } - - f.fs.Write(openMapBytes) - f.depth++ - if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { - f.fs.Write(maxShortBytes) - } else { - keys := v.MapKeys() - if f.cs.SortKeys { - sortValues(keys, f.cs) - } - for i, key := range keys { - if i > 0 { - f.fs.Write(spaceBytes) - } - f.ignoreNextType = true - f.format(f.unpackValue(key)) - f.fs.Write(colonBytes) - f.ignoreNextType = true - f.format(f.unpackValue(v.MapIndex(key))) - } - } - f.depth-- - f.fs.Write(closeMapBytes) - - case reflect.Struct: - numFields := v.NumField() - f.fs.Write(openBraceBytes) - f.depth++ - if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { - f.fs.Write(maxShortBytes) - } else { - vt := v.Type() - for i := 0; i < numFields; i++ { - if i > 0 { - f.fs.Write(spaceBytes) - } - vtf := vt.Field(i) - if f.fs.Flag('+') || f.fs.Flag('#') { - f.fs.Write([]byte(vtf.Name)) - f.fs.Write(colonBytes) - } - f.format(f.unpackValue(v.Field(i))) - } - } - f.depth-- - f.fs.Write(closeBraceBytes) - - case reflect.Uintptr: - printHexPtr(f.fs, uintptr(v.Uint())) - - case reflect.UnsafePointer, reflect.Chan, reflect.Func: - printHexPtr(f.fs, v.Pointer()) - - // There were not any other types at the time this code was written, but - // fall back to letting the default fmt package handle it if any get added. - default: - format := f.buildDefaultFormat() - if v.CanInterface() { - fmt.Fprintf(f.fs, format, v.Interface()) - } else { - fmt.Fprintf(f.fs, format, v.String()) - } - } -} - -// Format satisfies the fmt.Formatter interface. See NewFormatter for usage -// details. -func (f *formatState) Format(fs fmt.State, verb rune) { - f.fs = fs - - // Use standard formatting for verbs that are not v. - if verb != 'v' { - format := f.constructOrigFormat(verb) - fmt.Fprintf(fs, format, f.value) - return - } - - if f.value == nil { - if fs.Flag('#') { - fs.Write(interfaceBytes) - } - fs.Write(nilAngleBytes) - return - } - - f.format(reflect.ValueOf(f.value)) -} - -// newFormatter is a helper function to consolidate the logic from the various -// public methods which take varying config states. -func newFormatter(cs *ConfigState, v interface{}) fmt.Formatter { - fs := &formatState{value: v, cs: cs} - fs.pointers = make(map[uintptr]int) - return fs -} - -/* -NewFormatter returns a custom formatter that satisfies the fmt.Formatter -interface. As a result, it integrates cleanly with standard fmt package -printing functions. The formatter is useful for inline printing of smaller data -types similar to the standard %v format specifier. - -The custom formatter only responds to the %v (most compact), %+v (adds pointer -addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb -combinations. Any other verbs such as %x and %q will be sent to the the -standard fmt package for formatting. In addition, the custom formatter ignores -the width and precision arguments (however they will still work on the format -specifiers not handled by the custom formatter). - -Typically this function shouldn't be called directly. It is much easier to make -use of the custom formatter by calling one of the convenience functions such as -Printf, Println, or Fprintf. -*/ -func NewFormatter(v interface{}) fmt.Formatter { - return newFormatter(&Config, v) -} diff --git a/vendor/github.com/davecgh/go-spew/spew/spew.go b/vendor/github.com/davecgh/go-spew/spew/spew.go deleted file mode 100644 index 32c0e338..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/spew.go +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew - -import ( - "fmt" - "io" -) - -// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the formatted string as a value that satisfies error. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Errorf(format, spew.NewFormatter(a), spew.NewFormatter(b)) -func Errorf(format string, a ...interface{}) (err error) { - return fmt.Errorf(format, convertArgs(a)...) -} - -// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprint(w, spew.NewFormatter(a), spew.NewFormatter(b)) -func Fprint(w io.Writer, a ...interface{}) (n int, err error) { - return fmt.Fprint(w, convertArgs(a)...) -} - -// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprintf(w, format, spew.NewFormatter(a), spew.NewFormatter(b)) -func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { - return fmt.Fprintf(w, format, convertArgs(a)...) -} - -// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it -// passed with a default Formatter interface returned by NewFormatter. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Fprintln(w, spew.NewFormatter(a), spew.NewFormatter(b)) -func Fprintln(w io.Writer, a ...interface{}) (n int, err error) { - return fmt.Fprintln(w, convertArgs(a)...) -} - -// Print is a wrapper for fmt.Print that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Print(spew.NewFormatter(a), spew.NewFormatter(b)) -func Print(a ...interface{}) (n int, err error) { - return fmt.Print(convertArgs(a)...) -} - -// Printf is a wrapper for fmt.Printf that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Printf(format, spew.NewFormatter(a), spew.NewFormatter(b)) -func Printf(format string, a ...interface{}) (n int, err error) { - return fmt.Printf(format, convertArgs(a)...) -} - -// Println is a wrapper for fmt.Println that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the number of bytes written and any write error encountered. See -// NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Println(spew.NewFormatter(a), spew.NewFormatter(b)) -func Println(a ...interface{}) (n int, err error) { - return fmt.Println(convertArgs(a)...) -} - -// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprint(spew.NewFormatter(a), spew.NewFormatter(b)) -func Sprint(a ...interface{}) string { - return fmt.Sprint(convertArgs(a)...) -} - -// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were -// passed with a default Formatter interface returned by NewFormatter. It -// returns the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprintf(format, spew.NewFormatter(a), spew.NewFormatter(b)) -func Sprintf(format string, a ...interface{}) string { - return fmt.Sprintf(format, convertArgs(a)...) -} - -// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it -// were passed with a default Formatter interface returned by NewFormatter. It -// returns the resulting string. See NewFormatter for formatting details. -// -// This function is shorthand for the following syntax: -// -// fmt.Sprintln(spew.NewFormatter(a), spew.NewFormatter(b)) -func Sprintln(a ...interface{}) string { - return fmt.Sprintln(convertArgs(a)...) -} - -// convertArgs accepts a slice of arguments and returns a slice of the same -// length with each argument converted to a default spew Formatter interface. -func convertArgs(args []interface{}) (formatters []interface{}) { - formatters = make([]interface{}, len(args)) - for index, arg := range args { - formatters[index] = NewFormatter(arg) - } - return formatters -} diff --git a/vendor/github.com/golang/protobuf/AUTHORS b/vendor/github.com/golang/protobuf/AUTHORS deleted file mode 100644 index 15167cd7..00000000 --- a/vendor/github.com/golang/protobuf/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code refers to The Go Authors for copyright purposes. -# The master list of authors is in the main Go distribution, -# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/github.com/golang/protobuf/CONTRIBUTORS b/vendor/github.com/golang/protobuf/CONTRIBUTORS deleted file mode 100644 index 1c4577e9..00000000 --- a/vendor/github.com/golang/protobuf/CONTRIBUTORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code was written by the Go contributors. -# The master list of contributors is in the main Go distribution, -# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE deleted file mode 100644 index 1b1b1921..00000000 --- a/vendor/github.com/golang/protobuf/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Go support for Protocol Buffers - Google's data interchange format - -Copyright 2010 The Go Authors. All rights reserved. -https://github.com/golang/protobuf - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/github.com/golang/protobuf/proto/Makefile b/vendor/github.com/golang/protobuf/proto/Makefile deleted file mode 100644 index e2e0651a..00000000 --- a/vendor/github.com/golang/protobuf/proto/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -install: - go install - -test: install generate-test-pbs - go test - - -generate-test-pbs: - make install - make -C testdata - protoc --go_out=Mtestdata/test.proto=github.com/golang/protobuf/proto/testdata,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. proto3_proto/proto3.proto - make diff --git a/vendor/github.com/golang/protobuf/proto/clone.go b/vendor/github.com/golang/protobuf/proto/clone.go deleted file mode 100644 index e392575b..00000000 --- a/vendor/github.com/golang/protobuf/proto/clone.go +++ /dev/null @@ -1,229 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2011 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Protocol buffer deep copy and merge. -// TODO: RawMessage. - -package proto - -import ( - "log" - "reflect" - "strings" -) - -// Clone returns a deep copy of a protocol buffer. -func Clone(pb Message) Message { - in := reflect.ValueOf(pb) - if in.IsNil() { - return pb - } - - out := reflect.New(in.Type().Elem()) - // out is empty so a merge is a deep copy. - mergeStruct(out.Elem(), in.Elem()) - return out.Interface().(Message) -} - -// Merge merges src into dst. -// Required and optional fields that are set in src will be set to that value in dst. -// Elements of repeated fields will be appended. -// Merge panics if src and dst are not the same type, or if dst is nil. -func Merge(dst, src Message) { - in := reflect.ValueOf(src) - out := reflect.ValueOf(dst) - if out.IsNil() { - panic("proto: nil destination") - } - if in.Type() != out.Type() { - // Explicit test prior to mergeStruct so that mistyped nils will fail - panic("proto: type mismatch") - } - if in.IsNil() { - // Merging nil into non-nil is a quiet no-op - return - } - mergeStruct(out.Elem(), in.Elem()) -} - -func mergeStruct(out, in reflect.Value) { - sprop := GetProperties(in.Type()) - for i := 0; i < in.NumField(); i++ { - f := in.Type().Field(i) - if strings.HasPrefix(f.Name, "XXX_") { - continue - } - mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i]) - } - - if emIn, ok := extendable(in.Addr().Interface()); ok { - emOut, _ := extendable(out.Addr().Interface()) - mIn, muIn := emIn.extensionsRead() - if mIn != nil { - mOut := emOut.extensionsWrite() - muIn.Lock() - mergeExtension(mOut, mIn) - muIn.Unlock() - } - } - - uf := in.FieldByName("XXX_unrecognized") - if !uf.IsValid() { - return - } - uin := uf.Bytes() - if len(uin) > 0 { - out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...)) - } -} - -// mergeAny performs a merge between two values of the same type. -// viaPtr indicates whether the values were indirected through a pointer (implying proto2). -// prop is set if this is a struct field (it may be nil). -func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) { - if in.Type() == protoMessageType { - if !in.IsNil() { - if out.IsNil() { - out.Set(reflect.ValueOf(Clone(in.Interface().(Message)))) - } else { - Merge(out.Interface().(Message), in.Interface().(Message)) - } - } - return - } - switch in.Kind() { - case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, - reflect.String, reflect.Uint32, reflect.Uint64: - if !viaPtr && isProto3Zero(in) { - return - } - out.Set(in) - case reflect.Interface: - // Probably a oneof field; copy non-nil values. - if in.IsNil() { - return - } - // Allocate destination if it is not set, or set to a different type. - // Otherwise we will merge as normal. - if out.IsNil() || out.Elem().Type() != in.Elem().Type() { - out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T) - } - mergeAny(out.Elem(), in.Elem(), false, nil) - case reflect.Map: - if in.Len() == 0 { - return - } - if out.IsNil() { - out.Set(reflect.MakeMap(in.Type())) - } - // For maps with value types of *T or []byte we need to deep copy each value. - elemKind := in.Type().Elem().Kind() - for _, key := range in.MapKeys() { - var val reflect.Value - switch elemKind { - case reflect.Ptr: - val = reflect.New(in.Type().Elem().Elem()) - mergeAny(val, in.MapIndex(key), false, nil) - case reflect.Slice: - val = in.MapIndex(key) - val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) - default: - val = in.MapIndex(key) - } - out.SetMapIndex(key, val) - } - case reflect.Ptr: - if in.IsNil() { - return - } - if out.IsNil() { - out.Set(reflect.New(in.Elem().Type())) - } - mergeAny(out.Elem(), in.Elem(), true, nil) - case reflect.Slice: - if in.IsNil() { - return - } - if in.Type().Elem().Kind() == reflect.Uint8 { - // []byte is a scalar bytes field, not a repeated field. - - // Edge case: if this is in a proto3 message, a zero length - // bytes field is considered the zero value, and should not - // be merged. - if prop != nil && prop.proto3 && in.Len() == 0 { - return - } - - // Make a deep copy. - // Append to []byte{} instead of []byte(nil) so that we never end up - // with a nil result. - out.SetBytes(append([]byte{}, in.Bytes()...)) - return - } - n := in.Len() - if out.IsNil() { - out.Set(reflect.MakeSlice(in.Type(), 0, n)) - } - switch in.Type().Elem().Kind() { - case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, - reflect.String, reflect.Uint32, reflect.Uint64: - out.Set(reflect.AppendSlice(out, in)) - default: - for i := 0; i < n; i++ { - x := reflect.Indirect(reflect.New(in.Type().Elem())) - mergeAny(x, in.Index(i), false, nil) - out.Set(reflect.Append(out, x)) - } - } - case reflect.Struct: - mergeStruct(out, in) - default: - // unknown type, so not a protocol buffer - log.Printf("proto: don't know how to copy %v", in) - } -} - -func mergeExtension(out, in map[int32]Extension) { - for extNum, eIn := range in { - eOut := Extension{desc: eIn.desc} - if eIn.value != nil { - v := reflect.New(reflect.TypeOf(eIn.value)).Elem() - mergeAny(v, reflect.ValueOf(eIn.value), false, nil) - eOut.value = v.Interface() - } - if eIn.enc != nil { - eOut.enc = make([]byte, len(eIn.enc)) - copy(eOut.enc, eIn.enc) - } - - out[extNum] = eOut - } -} diff --git a/vendor/github.com/golang/protobuf/proto/decode.go b/vendor/github.com/golang/protobuf/proto/decode.go deleted file mode 100644 index aa207298..00000000 --- a/vendor/github.com/golang/protobuf/proto/decode.go +++ /dev/null @@ -1,970 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Routines for decoding protocol buffer data to construct in-memory representations. - */ - -import ( - "errors" - "fmt" - "io" - "os" - "reflect" -) - -// errOverflow is returned when an integer is too large to be represented. -var errOverflow = errors.New("proto: integer overflow") - -// ErrInternalBadWireType is returned by generated code when an incorrect -// wire type is encountered. It does not get returned to user code. -var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") - -// The fundamental decoders that interpret bytes on the wire. -// Those that take integer types all return uint64 and are -// therefore of type valueDecoder. - -// DecodeVarint reads a varint-encoded integer from the slice. -// It returns the integer and the number of bytes consumed, or -// zero if there is not enough. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func DecodeVarint(buf []byte) (x uint64, n int) { - for shift := uint(0); shift < 64; shift += 7 { - if n >= len(buf) { - return 0, 0 - } - b := uint64(buf[n]) - n++ - x |= (b & 0x7F) << shift - if (b & 0x80) == 0 { - return x, n - } - } - - // The number is too large to represent in a 64-bit value. - return 0, 0 -} - -func (p *Buffer) decodeVarintSlow() (x uint64, err error) { - i := p.index - l := len(p.buf) - - for shift := uint(0); shift < 64; shift += 7 { - if i >= l { - err = io.ErrUnexpectedEOF - return - } - b := p.buf[i] - i++ - x |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - p.index = i - return - } - } - - // The number is too large to represent in a 64-bit value. - err = errOverflow - return -} - -// DecodeVarint reads a varint-encoded integer from the Buffer. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func (p *Buffer) DecodeVarint() (x uint64, err error) { - i := p.index - buf := p.buf - - if i >= len(buf) { - return 0, io.ErrUnexpectedEOF - } else if buf[i] < 0x80 { - p.index++ - return uint64(buf[i]), nil - } else if len(buf)-i < 10 { - return p.decodeVarintSlow() - } - - var b uint64 - // we already checked the first byte - x = uint64(buf[i]) - 0x80 - i++ - - b = uint64(buf[i]) - i++ - x += b << 7 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 7 - - b = uint64(buf[i]) - i++ - x += b << 14 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 14 - - b = uint64(buf[i]) - i++ - x += b << 21 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 21 - - b = uint64(buf[i]) - i++ - x += b << 28 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 28 - - b = uint64(buf[i]) - i++ - x += b << 35 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 35 - - b = uint64(buf[i]) - i++ - x += b << 42 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 42 - - b = uint64(buf[i]) - i++ - x += b << 49 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 49 - - b = uint64(buf[i]) - i++ - x += b << 56 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 56 - - b = uint64(buf[i]) - i++ - x += b << 63 - if b&0x80 == 0 { - goto done - } - // x -= 0x80 << 63 // Always zero. - - return 0, errOverflow - -done: - p.index = i - return x, nil -} - -// DecodeFixed64 reads a 64-bit integer from the Buffer. -// This is the format for the -// fixed64, sfixed64, and double protocol buffer types. -func (p *Buffer) DecodeFixed64() (x uint64, err error) { - // x, err already 0 - i := p.index + 8 - if i < 0 || i > len(p.buf) { - err = io.ErrUnexpectedEOF - return - } - p.index = i - - x = uint64(p.buf[i-8]) - x |= uint64(p.buf[i-7]) << 8 - x |= uint64(p.buf[i-6]) << 16 - x |= uint64(p.buf[i-5]) << 24 - x |= uint64(p.buf[i-4]) << 32 - x |= uint64(p.buf[i-3]) << 40 - x |= uint64(p.buf[i-2]) << 48 - x |= uint64(p.buf[i-1]) << 56 - return -} - -// DecodeFixed32 reads a 32-bit integer from the Buffer. -// This is the format for the -// fixed32, sfixed32, and float protocol buffer types. -func (p *Buffer) DecodeFixed32() (x uint64, err error) { - // x, err already 0 - i := p.index + 4 - if i < 0 || i > len(p.buf) { - err = io.ErrUnexpectedEOF - return - } - p.index = i - - x = uint64(p.buf[i-4]) - x |= uint64(p.buf[i-3]) << 8 - x |= uint64(p.buf[i-2]) << 16 - x |= uint64(p.buf[i-1]) << 24 - return -} - -// DecodeZigzag64 reads a zigzag-encoded 64-bit integer -// from the Buffer. -// This is the format used for the sint64 protocol buffer type. -func (p *Buffer) DecodeZigzag64() (x uint64, err error) { - x, err = p.DecodeVarint() - if err != nil { - return - } - x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) - return -} - -// DecodeZigzag32 reads a zigzag-encoded 32-bit integer -// from the Buffer. -// This is the format used for the sint32 protocol buffer type. -func (p *Buffer) DecodeZigzag32() (x uint64, err error) { - x, err = p.DecodeVarint() - if err != nil { - return - } - x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) - return -} - -// These are not ValueDecoders: they produce an array of bytes or a string. -// bytes, embedded messages - -// DecodeRawBytes reads a count-delimited byte buffer from the Buffer. -// This is the format used for the bytes protocol buffer -// type and for embedded messages. -func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) { - n, err := p.DecodeVarint() - if err != nil { - return nil, err - } - - nb := int(n) - if nb < 0 { - return nil, fmt.Errorf("proto: bad byte length %d", nb) - } - end := p.index + nb - if end < p.index || end > len(p.buf) { - return nil, io.ErrUnexpectedEOF - } - - if !alloc { - // todo: check if can get more uses of alloc=false - buf = p.buf[p.index:end] - p.index += nb - return - } - - buf = make([]byte, nb) - copy(buf, p.buf[p.index:]) - p.index += nb - return -} - -// DecodeStringBytes reads an encoded string from the Buffer. -// This is the format used for the proto2 string type. -func (p *Buffer) DecodeStringBytes() (s string, err error) { - buf, err := p.DecodeRawBytes(false) - if err != nil { - return - } - return string(buf), nil -} - -// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. -// If the protocol buffer has extensions, and the field matches, add it as an extension. -// Otherwise, if the XXX_unrecognized field exists, append the skipped data there. -func (o *Buffer) skipAndSave(t reflect.Type, tag, wire int, base structPointer, unrecField field) error { - oi := o.index - - err := o.skip(t, tag, wire) - if err != nil { - return err - } - - if !unrecField.IsValid() { - return nil - } - - ptr := structPointer_Bytes(base, unrecField) - - // Add the skipped field to struct field - obuf := o.buf - - o.buf = *ptr - o.EncodeVarint(uint64(tag<<3 | wire)) - *ptr = append(o.buf, obuf[oi:o.index]...) - - o.buf = obuf - - return nil -} - -// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. -func (o *Buffer) skip(t reflect.Type, tag, wire int) error { - - var u uint64 - var err error - - switch wire { - case WireVarint: - _, err = o.DecodeVarint() - case WireFixed64: - _, err = o.DecodeFixed64() - case WireBytes: - _, err = o.DecodeRawBytes(false) - case WireFixed32: - _, err = o.DecodeFixed32() - case WireStartGroup: - for { - u, err = o.DecodeVarint() - if err != nil { - break - } - fwire := int(u & 0x7) - if fwire == WireEndGroup { - break - } - ftag := int(u >> 3) - err = o.skip(t, ftag, fwire) - if err != nil { - break - } - } - default: - err = fmt.Errorf("proto: can't skip unknown wire type %d for %s", wire, t) - } - return err -} - -// Unmarshaler is the interface representing objects that can -// unmarshal themselves. The method should reset the receiver before -// decoding starts. The argument points to data that may be -// overwritten, so implementations should not keep references to the -// buffer. -type Unmarshaler interface { - Unmarshal([]byte) error -} - -// Unmarshal parses the protocol buffer representation in buf and places the -// decoded result in pb. If the struct underlying pb does not match -// the data in buf, the results can be unpredictable. -// -// Unmarshal resets pb before starting to unmarshal, so any -// existing data in pb is always removed. Use UnmarshalMerge -// to preserve and append to existing data. -func Unmarshal(buf []byte, pb Message) error { - pb.Reset() - return UnmarshalMerge(buf, pb) -} - -// UnmarshalMerge parses the protocol buffer representation in buf and -// writes the decoded result to pb. If the struct underlying pb does not match -// the data in buf, the results can be unpredictable. -// -// UnmarshalMerge merges into existing data in pb. -// Most code should use Unmarshal instead. -func UnmarshalMerge(buf []byte, pb Message) error { - // If the object can unmarshal itself, let it. - if u, ok := pb.(Unmarshaler); ok { - return u.Unmarshal(buf) - } - return NewBuffer(buf).Unmarshal(pb) -} - -// DecodeMessage reads a count-delimited message from the Buffer. -func (p *Buffer) DecodeMessage(pb Message) error { - enc, err := p.DecodeRawBytes(false) - if err != nil { - return err - } - return NewBuffer(enc).Unmarshal(pb) -} - -// DecodeGroup reads a tag-delimited group from the Buffer. -func (p *Buffer) DecodeGroup(pb Message) error { - typ, base, err := getbase(pb) - if err != nil { - return err - } - return p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), true, base) -} - -// Unmarshal parses the protocol buffer representation in the -// Buffer and places the decoded result in pb. If the struct -// underlying pb does not match the data in the buffer, the results can be -// unpredictable. -// -// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal. -func (p *Buffer) Unmarshal(pb Message) error { - // If the object can unmarshal itself, let it. - if u, ok := pb.(Unmarshaler); ok { - err := u.Unmarshal(p.buf[p.index:]) - p.index = len(p.buf) - return err - } - - typ, base, err := getbase(pb) - if err != nil { - return err - } - - err = p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), false, base) - - if collectStats { - stats.Decode++ - } - - return err -} - -// unmarshalType does the work of unmarshaling a structure. -func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group bool, base structPointer) error { - var state errorState - required, reqFields := prop.reqCount, uint64(0) - - var err error - for err == nil && o.index < len(o.buf) { - oi := o.index - var u uint64 - u, err = o.DecodeVarint() - if err != nil { - break - } - wire := int(u & 0x7) - if wire == WireEndGroup { - if is_group { - if required > 0 { - // Not enough information to determine the exact field. - // (See below.) - return &RequiredNotSetError{"{Unknown}"} - } - return nil // input is satisfied - } - return fmt.Errorf("proto: %s: wiretype end group for non-group", st) - } - tag := int(u >> 3) - if tag <= 0 { - return fmt.Errorf("proto: %s: illegal tag %d (wire type %d)", st, tag, wire) - } - fieldnum, ok := prop.decoderTags.get(tag) - if !ok { - // Maybe it's an extension? - if prop.extendable { - if e, _ := extendable(structPointer_Interface(base, st)); isExtensionField(e, int32(tag)) { - if err = o.skip(st, tag, wire); err == nil { - extmap := e.extensionsWrite() - ext := extmap[int32(tag)] // may be missing - ext.enc = append(ext.enc, o.buf[oi:o.index]...) - extmap[int32(tag)] = ext - } - continue - } - } - // Maybe it's a oneof? - if prop.oneofUnmarshaler != nil { - m := structPointer_Interface(base, st).(Message) - // First return value indicates whether tag is a oneof field. - ok, err = prop.oneofUnmarshaler(m, tag, wire, o) - if err == ErrInternalBadWireType { - // Map the error to something more descriptive. - // Do the formatting here to save generated code space. - err = fmt.Errorf("bad wiretype for oneof field in %T", m) - } - if ok { - continue - } - } - err = o.skipAndSave(st, tag, wire, base, prop.unrecField) - continue - } - p := prop.Prop[fieldnum] - - if p.dec == nil { - fmt.Fprintf(os.Stderr, "proto: no protobuf decoder for %s.%s\n", st, st.Field(fieldnum).Name) - continue - } - dec := p.dec - if wire != WireStartGroup && wire != p.WireType { - if wire == WireBytes && p.packedDec != nil { - // a packable field - dec = p.packedDec - } else { - err = fmt.Errorf("proto: bad wiretype for field %s.%s: got wiretype %d, want %d", st, st.Field(fieldnum).Name, wire, p.WireType) - continue - } - } - decErr := dec(o, p, base) - if decErr != nil && !state.shouldContinue(decErr, p) { - err = decErr - } - if err == nil && p.Required { - // Successfully decoded a required field. - if tag <= 64 { - // use bitmap for fields 1-64 to catch field reuse. - var mask uint64 = 1 << uint64(tag-1) - if reqFields&mask == 0 { - // new required field - reqFields |= mask - required-- - } - } else { - // This is imprecise. It can be fooled by a required field - // with a tag > 64 that is encoded twice; that's very rare. - // A fully correct implementation would require allocating - // a data structure, which we would like to avoid. - required-- - } - } - } - if err == nil { - if is_group { - return io.ErrUnexpectedEOF - } - if state.err != nil { - return state.err - } - if required > 0 { - // Not enough information to determine the exact field. If we use extra - // CPU, we could determine the field only if the missing required field - // has a tag <= 64 and we check reqFields. - return &RequiredNotSetError{"{Unknown}"} - } - } - return err -} - -// Individual type decoders -// For each, -// u is the decoded value, -// v is a pointer to the field (pointer) in the struct - -// Sizes of the pools to allocate inside the Buffer. -// The goal is modest amortization and allocation -// on at least 16-byte boundaries. -const ( - boolPoolSize = 16 - uint32PoolSize = 8 - uint64PoolSize = 4 -) - -// Decode a bool. -func (o *Buffer) dec_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - if len(o.bools) == 0 { - o.bools = make([]bool, boolPoolSize) - } - o.bools[0] = u != 0 - *structPointer_Bool(base, p.field) = &o.bools[0] - o.bools = o.bools[1:] - return nil -} - -func (o *Buffer) dec_proto3_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - *structPointer_BoolVal(base, p.field) = u != 0 - return nil -} - -// Decode an int32. -func (o *Buffer) dec_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word32_Set(structPointer_Word32(base, p.field), o, uint32(u)) - return nil -} - -func (o *Buffer) dec_proto3_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word32Val_Set(structPointer_Word32Val(base, p.field), uint32(u)) - return nil -} - -// Decode an int64. -func (o *Buffer) dec_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word64_Set(structPointer_Word64(base, p.field), o, u) - return nil -} - -func (o *Buffer) dec_proto3_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word64Val_Set(structPointer_Word64Val(base, p.field), o, u) - return nil -} - -// Decode a string. -func (o *Buffer) dec_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - *structPointer_String(base, p.field) = &s - return nil -} - -func (o *Buffer) dec_proto3_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - *structPointer_StringVal(base, p.field) = s - return nil -} - -// Decode a slice of bytes ([]byte). -func (o *Buffer) dec_slice_byte(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - *structPointer_Bytes(base, p.field) = b - return nil -} - -// Decode a slice of bools ([]bool). -func (o *Buffer) dec_slice_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - v := structPointer_BoolSlice(base, p.field) - *v = append(*v, u != 0) - return nil -} - -// Decode a slice of bools ([]bool) in packed format. -func (o *Buffer) dec_slice_packed_bool(p *Properties, base structPointer) error { - v := structPointer_BoolSlice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded bools - fin := o.index + nb - if fin < o.index { - return errOverflow - } - - y := *v - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - y = append(y, u != 0) - } - - *v = y - return nil -} - -// Decode a slice of int32s ([]int32). -func (o *Buffer) dec_slice_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - structPointer_Word32Slice(base, p.field).Append(uint32(u)) - return nil -} - -// Decode a slice of int32s ([]int32) in packed format. -func (o *Buffer) dec_slice_packed_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Slice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded int32s - - fin := o.index + nb - if fin < o.index { - return errOverflow - } - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - v.Append(uint32(u)) - } - return nil -} - -// Decode a slice of int64s ([]int64). -func (o *Buffer) dec_slice_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - - structPointer_Word64Slice(base, p.field).Append(u) - return nil -} - -// Decode a slice of int64s ([]int64) in packed format. -func (o *Buffer) dec_slice_packed_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Slice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded int64s - - fin := o.index + nb - if fin < o.index { - return errOverflow - } - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - v.Append(u) - } - return nil -} - -// Decode a slice of strings ([]string). -func (o *Buffer) dec_slice_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - v := structPointer_StringSlice(base, p.field) - *v = append(*v, s) - return nil -} - -// Decode a slice of slice of bytes ([][]byte). -func (o *Buffer) dec_slice_slice_byte(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - v := structPointer_BytesSlice(base, p.field) - *v = append(*v, b) - return nil -} - -// Decode a map field. -func (o *Buffer) dec_new_map(p *Properties, base structPointer) error { - raw, err := o.DecodeRawBytes(false) - if err != nil { - return err - } - oi := o.index // index at the end of this map entry - o.index -= len(raw) // move buffer back to start of map entry - - mptr := structPointer_NewAt(base, p.field, p.mtype) // *map[K]V - if mptr.Elem().IsNil() { - mptr.Elem().Set(reflect.MakeMap(mptr.Type().Elem())) - } - v := mptr.Elem() // map[K]V - - // Prepare addressable doubly-indirect placeholders for the key and value types. - // See enc_new_map for why. - keyptr := reflect.New(reflect.PtrTo(p.mtype.Key())).Elem() // addressable *K - keybase := toStructPointer(keyptr.Addr()) // **K - - var valbase structPointer - var valptr reflect.Value - switch p.mtype.Elem().Kind() { - case reflect.Slice: - // []byte - var dummy []byte - valptr = reflect.ValueOf(&dummy) // *[]byte - valbase = toStructPointer(valptr) // *[]byte - case reflect.Ptr: - // message; valptr is **Msg; need to allocate the intermediate pointer - valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V - valptr.Set(reflect.New(valptr.Type().Elem())) - valbase = toStructPointer(valptr) - default: - // everything else - valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V - valbase = toStructPointer(valptr.Addr()) // **V - } - - // Decode. - // This parses a restricted wire format, namely the encoding of a message - // with two fields. See enc_new_map for the format. - for o.index < oi { - // tagcode for key and value properties are always a single byte - // because they have tags 1 and 2. - tagcode := o.buf[o.index] - o.index++ - switch tagcode { - case p.mkeyprop.tagcode[0]: - if err := p.mkeyprop.dec(o, p.mkeyprop, keybase); err != nil { - return err - } - case p.mvalprop.tagcode[0]: - if err := p.mvalprop.dec(o, p.mvalprop, valbase); err != nil { - return err - } - default: - // TODO: Should we silently skip this instead? - return fmt.Errorf("proto: bad map data tag %d", raw[0]) - } - } - keyelem, valelem := keyptr.Elem(), valptr.Elem() - if !keyelem.IsValid() { - keyelem = reflect.Zero(p.mtype.Key()) - } - if !valelem.IsValid() { - valelem = reflect.Zero(p.mtype.Elem()) - } - - v.SetMapIndex(keyelem, valelem) - return nil -} - -// Decode a group. -func (o *Buffer) dec_struct_group(p *Properties, base structPointer) error { - bas := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(bas) { - // allocate new nested message - bas = toStructPointer(reflect.New(p.stype)) - structPointer_SetStructPointer(base, p.field, bas) - } - return o.unmarshalType(p.stype, p.sprop, true, bas) -} - -// Decode an embedded message. -func (o *Buffer) dec_struct_message(p *Properties, base structPointer) (err error) { - raw, e := o.DecodeRawBytes(false) - if e != nil { - return e - } - - bas := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(bas) { - // allocate new nested message - bas = toStructPointer(reflect.New(p.stype)) - structPointer_SetStructPointer(base, p.field, bas) - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - iv := structPointer_Interface(bas, p.stype) - return iv.(Unmarshaler).Unmarshal(raw) - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, false, bas) - o.buf = obuf - o.index = oi - - return err -} - -// Decode a slice of embedded messages. -func (o *Buffer) dec_slice_struct_message(p *Properties, base structPointer) error { - return o.dec_slice_struct(p, false, base) -} - -// Decode a slice of embedded groups. -func (o *Buffer) dec_slice_struct_group(p *Properties, base structPointer) error { - return o.dec_slice_struct(p, true, base) -} - -// Decode a slice of structs ([]*struct). -func (o *Buffer) dec_slice_struct(p *Properties, is_group bool, base structPointer) error { - v := reflect.New(p.stype) - bas := toStructPointer(v) - structPointer_StructPointerSlice(base, p.field).Append(bas) - - if is_group { - err := o.unmarshalType(p.stype, p.sprop, is_group, bas) - return err - } - - raw, err := o.DecodeRawBytes(false) - if err != nil { - return err - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - iv := v.Interface() - return iv.(Unmarshaler).Unmarshal(raw) - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, is_group, bas) - - o.buf = obuf - o.index = oi - - return err -} diff --git a/vendor/github.com/golang/protobuf/proto/discard.go b/vendor/github.com/golang/protobuf/proto/discard.go deleted file mode 100644 index bd0e3bb4..00000000 --- a/vendor/github.com/golang/protobuf/proto/discard.go +++ /dev/null @@ -1,151 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2017 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "fmt" - "reflect" - "strings" -) - -// DiscardUnknown recursively discards all unknown fields from this message -// and all embedded messages. -// -// When unmarshaling a message with unrecognized fields, the tags and values -// of such fields are preserved in the Message. This allows a later call to -// marshal to be able to produce a message that continues to have those -// unrecognized fields. To avoid this, DiscardUnknown is used to -// explicitly clear the unknown fields after unmarshaling. -// -// For proto2 messages, the unknown fields of message extensions are only -// discarded from messages that have been accessed via GetExtension. -func DiscardUnknown(m Message) { - discardLegacy(m) -} - -func discardLegacy(m Message) { - v := reflect.ValueOf(m) - if v.Kind() != reflect.Ptr || v.IsNil() { - return - } - v = v.Elem() - if v.Kind() != reflect.Struct { - return - } - t := v.Type() - - for i := 0; i < v.NumField(); i++ { - f := t.Field(i) - if strings.HasPrefix(f.Name, "XXX_") { - continue - } - vf := v.Field(i) - tf := f.Type - - // Unwrap tf to get its most basic type. - var isPointer, isSlice bool - if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { - isSlice = true - tf = tf.Elem() - } - if tf.Kind() == reflect.Ptr { - isPointer = true - tf = tf.Elem() - } - if isPointer && isSlice && tf.Kind() != reflect.Struct { - panic(fmt.Sprintf("%T.%s cannot be a slice of pointers to primitive types", m, f.Name)) - } - - switch tf.Kind() { - case reflect.Struct: - switch { - case !isPointer: - panic(fmt.Sprintf("%T.%s cannot be a direct struct value", m, f.Name)) - case isSlice: // E.g., []*pb.T - for j := 0; j < vf.Len(); j++ { - discardLegacy(vf.Index(j).Interface().(Message)) - } - default: // E.g., *pb.T - discardLegacy(vf.Interface().(Message)) - } - case reflect.Map: - switch { - case isPointer || isSlice: - panic(fmt.Sprintf("%T.%s cannot be a pointer to a map or a slice of map values", m, f.Name)) - default: // E.g., map[K]V - tv := vf.Type().Elem() - if tv.Kind() == reflect.Ptr && tv.Implements(protoMessageType) { // Proto struct (e.g., *T) - for _, key := range vf.MapKeys() { - val := vf.MapIndex(key) - discardLegacy(val.Interface().(Message)) - } - } - } - case reflect.Interface: - // Must be oneof field. - switch { - case isPointer || isSlice: - panic(fmt.Sprintf("%T.%s cannot be a pointer to a interface or a slice of interface values", m, f.Name)) - default: // E.g., test_proto.isCommunique_Union interface - if !vf.IsNil() && f.Tag.Get("protobuf_oneof") != "" { - vf = vf.Elem() // E.g., *test_proto.Communique_Msg - if !vf.IsNil() { - vf = vf.Elem() // E.g., test_proto.Communique_Msg - vf = vf.Field(0) // E.g., Proto struct (e.g., *T) or primitive value - if vf.Kind() == reflect.Ptr { - discardLegacy(vf.Interface().(Message)) - } - } - } - } - } - } - - if vf := v.FieldByName("XXX_unrecognized"); vf.IsValid() { - if vf.Type() != reflect.TypeOf([]byte{}) { - panic("expected XXX_unrecognized to be of type []byte") - } - vf.Set(reflect.ValueOf([]byte(nil))) - } - - // For proto2 messages, only discard unknown fields in message extensions - // that have been accessed via GetExtension. - if em, ok := extendable(m); ok { - // Ignore lock since discardLegacy is not concurrency safe. - emm, _ := em.extensionsRead() - for _, mx := range emm { - if m, ok := mx.value.(Message); ok { - discardLegacy(m) - } - } - } -} diff --git a/vendor/github.com/golang/protobuf/proto/encode.go b/vendor/github.com/golang/protobuf/proto/encode.go deleted file mode 100644 index 8b84d1b2..00000000 --- a/vendor/github.com/golang/protobuf/proto/encode.go +++ /dev/null @@ -1,1362 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Routines for encoding data into the wire format for protocol buffers. - */ - -import ( - "errors" - "fmt" - "reflect" - "sort" -) - -// RequiredNotSetError is the error returned if Marshal is called with -// a protocol buffer struct whose required fields have not -// all been initialized. It is also the error returned if Unmarshal is -// called with an encoded protocol buffer that does not include all the -// required fields. -// -// When printed, RequiredNotSetError reports the first unset required field in a -// message. If the field cannot be precisely determined, it is reported as -// "{Unknown}". -type RequiredNotSetError struct { - field string -} - -func (e *RequiredNotSetError) Error() string { - return fmt.Sprintf("proto: required field %q not set", e.field) -} - -var ( - // errRepeatedHasNil is the error returned if Marshal is called with - // a struct with a repeated field containing a nil element. - errRepeatedHasNil = errors.New("proto: repeated field has nil element") - - // errOneofHasNil is the error returned if Marshal is called with - // a struct with a oneof field containing a nil element. - errOneofHasNil = errors.New("proto: oneof field has nil value") - - // ErrNil is the error returned if Marshal is called with nil. - ErrNil = errors.New("proto: Marshal called with nil") - - // ErrTooLarge is the error returned if Marshal is called with a - // message that encodes to >2GB. - ErrTooLarge = errors.New("proto: message encodes to over 2 GB") -) - -// The fundamental encoders that put bytes on the wire. -// Those that take integer types all accept uint64 and are -// therefore of type valueEncoder. - -const maxVarintBytes = 10 // maximum length of a varint - -// maxMarshalSize is the largest allowed size of an encoded protobuf, -// since C++ and Java use signed int32s for the size. -const maxMarshalSize = 1<<31 - 1 - -// EncodeVarint returns the varint encoding of x. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -// Not used by the package itself, but helpful to clients -// wishing to use the same encoding. -func EncodeVarint(x uint64) []byte { - var buf [maxVarintBytes]byte - var n int - for n = 0; x > 127; n++ { - buf[n] = 0x80 | uint8(x&0x7F) - x >>= 7 - } - buf[n] = uint8(x) - n++ - return buf[0:n] -} - -// EncodeVarint writes a varint-encoded integer to the Buffer. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func (p *Buffer) EncodeVarint(x uint64) error { - for x >= 1<<7 { - p.buf = append(p.buf, uint8(x&0x7f|0x80)) - x >>= 7 - } - p.buf = append(p.buf, uint8(x)) - return nil -} - -// SizeVarint returns the varint encoding size of an integer. -func SizeVarint(x uint64) int { - return sizeVarint(x) -} - -func sizeVarint(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} - -// EncodeFixed64 writes a 64-bit integer to the Buffer. -// This is the format for the -// fixed64, sfixed64, and double protocol buffer types. -func (p *Buffer) EncodeFixed64(x uint64) error { - p.buf = append(p.buf, - uint8(x), - uint8(x>>8), - uint8(x>>16), - uint8(x>>24), - uint8(x>>32), - uint8(x>>40), - uint8(x>>48), - uint8(x>>56)) - return nil -} - -func sizeFixed64(x uint64) int { - return 8 -} - -// EncodeFixed32 writes a 32-bit integer to the Buffer. -// This is the format for the -// fixed32, sfixed32, and float protocol buffer types. -func (p *Buffer) EncodeFixed32(x uint64) error { - p.buf = append(p.buf, - uint8(x), - uint8(x>>8), - uint8(x>>16), - uint8(x>>24)) - return nil -} - -func sizeFixed32(x uint64) int { - return 4 -} - -// EncodeZigzag64 writes a zigzag-encoded 64-bit integer -// to the Buffer. -// This is the format used for the sint64 protocol buffer type. -func (p *Buffer) EncodeZigzag64(x uint64) error { - // use signed number to get arithmetic right shift. - return p.EncodeVarint((x << 1) ^ uint64((int64(x) >> 63))) -} - -func sizeZigzag64(x uint64) int { - return sizeVarint((x << 1) ^ uint64((int64(x) >> 63))) -} - -// EncodeZigzag32 writes a zigzag-encoded 32-bit integer -// to the Buffer. -// This is the format used for the sint32 protocol buffer type. -func (p *Buffer) EncodeZigzag32(x uint64) error { - // use signed number to get arithmetic right shift. - return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) -} - -func sizeZigzag32(x uint64) int { - return sizeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) -} - -// EncodeRawBytes writes a count-delimited byte buffer to the Buffer. -// This is the format used for the bytes protocol buffer -// type and for embedded messages. -func (p *Buffer) EncodeRawBytes(b []byte) error { - p.EncodeVarint(uint64(len(b))) - p.buf = append(p.buf, b...) - return nil -} - -func sizeRawBytes(b []byte) int { - return sizeVarint(uint64(len(b))) + - len(b) -} - -// EncodeStringBytes writes an encoded string to the Buffer. -// This is the format used for the proto2 string type. -func (p *Buffer) EncodeStringBytes(s string) error { - p.EncodeVarint(uint64(len(s))) - p.buf = append(p.buf, s...) - return nil -} - -func sizeStringBytes(s string) int { - return sizeVarint(uint64(len(s))) + - len(s) -} - -// Marshaler is the interface representing objects that can marshal themselves. -type Marshaler interface { - Marshal() ([]byte, error) -} - -// Marshal takes the protocol buffer -// and encodes it into the wire format, returning the data. -func Marshal(pb Message) ([]byte, error) { - // Can the object marshal itself? - if m, ok := pb.(Marshaler); ok { - return m.Marshal() - } - p := NewBuffer(nil) - err := p.Marshal(pb) - if p.buf == nil && err == nil { - // Return a non-nil slice on success. - return []byte{}, nil - } - return p.buf, err -} - -// EncodeMessage writes the protocol buffer to the Buffer, -// prefixed by a varint-encoded length. -func (p *Buffer) EncodeMessage(pb Message) error { - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return ErrNil - } - if err == nil { - var state errorState - err = p.enc_len_struct(GetProperties(t.Elem()), base, &state) - } - return err -} - -// Marshal takes the protocol buffer -// and encodes it into the wire format, writing the result to the -// Buffer. -func (p *Buffer) Marshal(pb Message) error { - // Can the object marshal itself? - if m, ok := pb.(Marshaler); ok { - data, err := m.Marshal() - p.buf = append(p.buf, data...) - return err - } - - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return ErrNil - } - if err == nil { - err = p.enc_struct(GetProperties(t.Elem()), base) - } - - if collectStats { - (stats).Encode++ // Parens are to work around a goimports bug. - } - - if len(p.buf) > maxMarshalSize { - return ErrTooLarge - } - return err -} - -// Size returns the encoded size of a protocol buffer. -func Size(pb Message) (n int) { - // Can the object marshal itself? If so, Size is slow. - // TODO: add Size to Marshaler, or add a Sizer interface. - if m, ok := pb.(Marshaler); ok { - b, _ := m.Marshal() - return len(b) - } - - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return 0 - } - if err == nil { - n = size_struct(GetProperties(t.Elem()), base) - } - - if collectStats { - (stats).Size++ // Parens are to work around a goimports bug. - } - - return -} - -// Individual type encoders. - -// Encode a bool. -func (o *Buffer) enc_bool(p *Properties, base structPointer) error { - v := *structPointer_Bool(base, p.field) - if v == nil { - return ErrNil - } - x := 0 - if *v { - x = 1 - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_bool(p *Properties, base structPointer) error { - v := *structPointer_BoolVal(base, p.field) - if !v { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, 1) - return nil -} - -func size_bool(p *Properties, base structPointer) int { - v := *structPointer_Bool(base, p.field) - if v == nil { - return 0 - } - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -func size_proto3_bool(p *Properties, base structPointer) int { - v := *structPointer_BoolVal(base, p.field) - if !v && !p.oneof { - return 0 - } - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -// Encode an int32. -func (o *Buffer) enc_int32(p *Properties, base structPointer) error { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return ErrNil - } - x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return 0 - } - x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func size_proto3_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode a uint32. -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return ErrNil - } - x := word32_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return 0 - } - x := word32_Get(v) - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func size_proto3_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode an int64. -func (o *Buffer) enc_int64(p *Properties, base structPointer) error { - v := structPointer_Word64(base, p.field) - if word64_IsNil(v) { - return ErrNil - } - x := word64_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func (o *Buffer) enc_proto3_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func size_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64(base, p.field) - if word64_IsNil(v) { - return 0 - } - x := word64_Get(v) - n += len(p.tagcode) - n += p.valSize(x) - return -} - -func size_proto3_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(x) - return -} - -// Encode a string. -func (o *Buffer) enc_string(p *Properties, base structPointer) error { - v := *structPointer_String(base, p.field) - if v == nil { - return ErrNil - } - x := *v - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(x) - return nil -} - -func (o *Buffer) enc_proto3_string(p *Properties, base structPointer) error { - v := *structPointer_StringVal(base, p.field) - if v == "" { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(v) - return nil -} - -func size_string(p *Properties, base structPointer) (n int) { - v := *structPointer_String(base, p.field) - if v == nil { - return 0 - } - x := *v - n += len(p.tagcode) - n += sizeStringBytes(x) - return -} - -func size_proto3_string(p *Properties, base structPointer) (n int) { - v := *structPointer_StringVal(base, p.field) - if v == "" && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeStringBytes(v) - return -} - -// All protocol buffer fields are nillable, but be careful. -func isNil(v reflect.Value) bool { - switch v.Kind() { - case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return v.IsNil() - } - return false -} - -// Encode a message struct. -func (o *Buffer) enc_struct_message(p *Properties, base structPointer) error { - var state errorState - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return ErrNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return state.err - } - - o.buf = append(o.buf, p.tagcode...) - return o.enc_len_struct(p.sprop, structp, &state) -} - -func size_struct_message(p *Properties, base structPointer) int { - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return 0 - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n0 := len(p.tagcode) - n1 := sizeRawBytes(data) - return n0 + n1 - } - - n0 := len(p.tagcode) - n1 := size_struct(p.sprop, structp) - n2 := sizeVarint(uint64(n1)) // size of encoded length - return n0 + n1 + n2 -} - -// Encode a group struct. -func (o *Buffer) enc_struct_group(p *Properties, base structPointer) error { - var state errorState - b := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(b) { - return ErrNil - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) - err := o.enc_struct(p.sprop, b) - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) - return state.err -} - -func size_struct_group(p *Properties, base structPointer) (n int) { - b := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(b) { - return 0 - } - - n += sizeVarint(uint64((p.Tag << 3) | WireStartGroup)) - n += size_struct(p.sprop, b) - n += sizeVarint(uint64((p.Tag << 3) | WireEndGroup)) - return -} - -// Encode a slice of bools ([]bool). -func (o *Buffer) enc_slice_bool(p *Properties, base structPointer) error { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return ErrNil - } - for _, x := range s { - o.buf = append(o.buf, p.tagcode...) - v := uint64(0) - if x { - v = 1 - } - p.valEnc(o, v) - } - return nil -} - -func size_slice_bool(p *Properties, base structPointer) int { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return 0 - } - return l * (len(p.tagcode) + 1) // each bool takes exactly one byte -} - -// Encode a slice of bools ([]bool) in packed format. -func (o *Buffer) enc_slice_packed_bool(p *Properties, base structPointer) error { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(l)) // each bool takes exactly one byte - for _, x := range s { - v := uint64(0) - if x { - v = 1 - } - p.valEnc(o, v) - } - return nil -} - -func size_slice_packed_bool(p *Properties, base structPointer) (n int) { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return 0 - } - n += len(p.tagcode) - n += sizeVarint(uint64(l)) - n += l // each bool takes exactly one byte - return -} - -// Encode a slice of bytes ([]byte). -func (o *Buffer) enc_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if s == nil { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(s) - return nil -} - -func (o *Buffer) enc_proto3_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if len(s) == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(s) - return nil -} - -func size_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if s == nil && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeRawBytes(s) - return -} - -func size_proto3_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if len(s) == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeRawBytes(s) - return -} - -// Encode a slice of int32s ([]int32). -func (o *Buffer) enc_slice_int32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - p.valEnc(o, uint64(x)) - } - return nil -} - -func size_slice_int32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - n += p.valSize(uint64(x)) - } - return -} - -// Encode a slice of int32s ([]int32) in packed format. -func (o *Buffer) enc_slice_packed_int32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - p.valEnc(buf, uint64(x)) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_int32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - bufSize += p.valSize(uint64(x)) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of uint32s ([]uint32). -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_slice_uint32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - x := s.Index(i) - p.valEnc(o, uint64(x)) - } - return nil -} - -func size_slice_uint32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - x := s.Index(i) - n += p.valSize(uint64(x)) - } - return -} - -// Encode a slice of uint32s ([]uint32) in packed format. -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_slice_packed_uint32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - p.valEnc(buf, uint64(s.Index(i))) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_uint32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - bufSize += p.valSize(uint64(s.Index(i))) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of int64s ([]int64). -func (o *Buffer) enc_slice_int64(p *Properties, base structPointer) error { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, s.Index(i)) - } - return nil -} - -func size_slice_int64(p *Properties, base structPointer) (n int) { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - n += p.valSize(s.Index(i)) - } - return -} - -// Encode a slice of int64s ([]int64) in packed format. -func (o *Buffer) enc_slice_packed_int64(p *Properties, base structPointer) error { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - p.valEnc(buf, s.Index(i)) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_int64(p *Properties, base structPointer) (n int) { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - bufSize += p.valSize(s.Index(i)) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of slice of bytes ([][]byte). -func (o *Buffer) enc_slice_slice_byte(p *Properties, base structPointer) error { - ss := *structPointer_BytesSlice(base, p.field) - l := len(ss) - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(ss[i]) - } - return nil -} - -func size_slice_slice_byte(p *Properties, base structPointer) (n int) { - ss := *structPointer_BytesSlice(base, p.field) - l := len(ss) - if l == 0 { - return 0 - } - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - n += sizeRawBytes(ss[i]) - } - return -} - -// Encode a slice of strings ([]string). -func (o *Buffer) enc_slice_string(p *Properties, base structPointer) error { - ss := *structPointer_StringSlice(base, p.field) - l := len(ss) - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(ss[i]) - } - return nil -} - -func size_slice_string(p *Properties, base structPointer) (n int) { - ss := *structPointer_StringSlice(base, p.field) - l := len(ss) - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - n += sizeStringBytes(ss[i]) - } - return -} - -// Encode a slice of message structs ([]*struct). -func (o *Buffer) enc_slice_struct_message(p *Properties, base structPointer) error { - var state errorState - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - for i := 0; i < l; i++ { - structp := s.Index(i) - if structPointer_IsNil(structp) { - return errRepeatedHasNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - continue - } - - o.buf = append(o.buf, p.tagcode...) - err := o.enc_len_struct(p.sprop, structp, &state) - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - } - return state.err -} - -func size_slice_struct_message(p *Properties, base structPointer) (n int) { - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - structp := s.Index(i) - if structPointer_IsNil(structp) { - return // return the size up to this point - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n += sizeRawBytes(data) - continue - } - - n0 := size_struct(p.sprop, structp) - n1 := sizeVarint(uint64(n0)) // size of encoded length - n += n0 + n1 - } - return -} - -// Encode a slice of group structs ([]*struct). -func (o *Buffer) enc_slice_struct_group(p *Properties, base structPointer) error { - var state errorState - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - for i := 0; i < l; i++ { - b := s.Index(i) - if structPointer_IsNil(b) { - return errRepeatedHasNil - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) - - err := o.enc_struct(p.sprop, b) - - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) - } - return state.err -} - -func size_slice_struct_group(p *Properties, base structPointer) (n int) { - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - n += l * sizeVarint(uint64((p.Tag<<3)|WireStartGroup)) - n += l * sizeVarint(uint64((p.Tag<<3)|WireEndGroup)) - for i := 0; i < l; i++ { - b := s.Index(i) - if structPointer_IsNil(b) { - return // return size up to this point - } - - n += size_struct(p.sprop, b) - } - return -} - -// Encode an extension map. -func (o *Buffer) enc_map(p *Properties, base structPointer) error { - exts := structPointer_ExtMap(base, p.field) - if err := encodeExtensionsMap(*exts); err != nil { - return err - } - - return o.enc_map_body(*exts) -} - -func (o *Buffer) enc_exts(p *Properties, base structPointer) error { - exts := structPointer_Extensions(base, p.field) - - v, mu := exts.extensionsRead() - if v == nil { - return nil - } - - mu.Lock() - defer mu.Unlock() - if err := encodeExtensionsMap(v); err != nil { - return err - } - - return o.enc_map_body(v) -} - -func (o *Buffer) enc_map_body(v map[int32]Extension) error { - // Fast-path for common cases: zero or one extensions. - if len(v) <= 1 { - for _, e := range v { - o.buf = append(o.buf, e.enc...) - } - return nil - } - - // Sort keys to provide a deterministic encoding. - keys := make([]int, 0, len(v)) - for k := range v { - keys = append(keys, int(k)) - } - sort.Ints(keys) - - for _, k := range keys { - o.buf = append(o.buf, v[int32(k)].enc...) - } - return nil -} - -func size_map(p *Properties, base structPointer) int { - v := structPointer_ExtMap(base, p.field) - return extensionsMapSize(*v) -} - -func size_exts(p *Properties, base structPointer) int { - v := structPointer_Extensions(base, p.field) - return extensionsSize(v) -} - -// Encode a map field. -func (o *Buffer) enc_new_map(p *Properties, base structPointer) error { - var state errorState // XXX: or do we need to plumb this through? - - /* - A map defined as - map map_field = N; - is encoded in the same way as - message MapFieldEntry { - key_type key = 1; - value_type value = 2; - } - repeated MapFieldEntry map_field = N; - */ - - v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V - if v.Len() == 0 { - return nil - } - - keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) - - enc := func() error { - if err := p.mkeyprop.enc(o, p.mkeyprop, keybase); err != nil { - return err - } - if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil && err != ErrNil { - return err - } - return nil - } - - // Don't sort map keys. It is not required by the spec, and C++ doesn't do it. - for _, key := range v.MapKeys() { - val := v.MapIndex(key) - - keycopy.Set(key) - valcopy.Set(val) - - o.buf = append(o.buf, p.tagcode...) - if err := o.enc_len_thing(enc, &state); err != nil { - return err - } - } - return nil -} - -func size_new_map(p *Properties, base structPointer) int { - v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V - - keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) - - n := 0 - for _, key := range v.MapKeys() { - val := v.MapIndex(key) - keycopy.Set(key) - valcopy.Set(val) - - // Tag codes for key and val are the responsibility of the sub-sizer. - keysize := p.mkeyprop.size(p.mkeyprop, keybase) - valsize := p.mvalprop.size(p.mvalprop, valbase) - entry := keysize + valsize - // Add on tag code and length of map entry itself. - n += len(p.tagcode) + sizeVarint(uint64(entry)) + entry - } - return n -} - -// mapEncodeScratch returns a new reflect.Value matching the map's value type, -// and a structPointer suitable for passing to an encoder or sizer. -func mapEncodeScratch(mapType reflect.Type) (keycopy, valcopy reflect.Value, keybase, valbase structPointer) { - // Prepare addressable doubly-indirect placeholders for the key and value types. - // This is needed because the element-type encoders expect **T, but the map iteration produces T. - - keycopy = reflect.New(mapType.Key()).Elem() // addressable K - keyptr := reflect.New(reflect.PtrTo(keycopy.Type())).Elem() // addressable *K - keyptr.Set(keycopy.Addr()) // - keybase = toStructPointer(keyptr.Addr()) // **K - - // Value types are more varied and require special handling. - switch mapType.Elem().Kind() { - case reflect.Slice: - // []byte - var dummy []byte - valcopy = reflect.ValueOf(&dummy).Elem() // addressable []byte - valbase = toStructPointer(valcopy.Addr()) - case reflect.Ptr: - // message; the generated field type is map[K]*Msg (so V is *Msg), - // so we only need one level of indirection. - valcopy = reflect.New(mapType.Elem()).Elem() // addressable V - valbase = toStructPointer(valcopy.Addr()) - default: - // everything else - valcopy = reflect.New(mapType.Elem()).Elem() // addressable V - valptr := reflect.New(reflect.PtrTo(valcopy.Type())).Elem() // addressable *V - valptr.Set(valcopy.Addr()) // - valbase = toStructPointer(valptr.Addr()) // **V - } - return -} - -// Encode a struct. -func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error { - var state errorState - // Encode fields in tag order so that decoders may use optimizations - // that depend on the ordering. - // https://developers.google.com/protocol-buffers/docs/encoding#order - for _, i := range prop.order { - p := prop.Prop[i] - if p.enc != nil { - err := p.enc(o, p, base) - if err != nil { - if err == ErrNil { - if p.Required && state.err == nil { - state.err = &RequiredNotSetError{p.Name} - } - } else if err == errRepeatedHasNil { - // Give more context to nil values in repeated fields. - return errors.New("repeated field " + p.OrigName + " has nil element") - } else if !state.shouldContinue(err, p) { - return err - } - } - if len(o.buf) > maxMarshalSize { - return ErrTooLarge - } - } - } - - // Do oneof fields. - if prop.oneofMarshaler != nil { - m := structPointer_Interface(base, prop.stype).(Message) - if err := prop.oneofMarshaler(m, o); err == ErrNil { - return errOneofHasNil - } else if err != nil { - return err - } - } - - // Add unrecognized fields at the end. - if prop.unrecField.IsValid() { - v := *structPointer_Bytes(base, prop.unrecField) - if len(o.buf)+len(v) > maxMarshalSize { - return ErrTooLarge - } - if len(v) > 0 { - o.buf = append(o.buf, v...) - } - } - - return state.err -} - -func size_struct(prop *StructProperties, base structPointer) (n int) { - for _, i := range prop.order { - p := prop.Prop[i] - if p.size != nil { - n += p.size(p, base) - } - } - - // Add unrecognized fields at the end. - if prop.unrecField.IsValid() { - v := *structPointer_Bytes(base, prop.unrecField) - n += len(v) - } - - // Factor in any oneof fields. - if prop.oneofSizer != nil { - m := structPointer_Interface(base, prop.stype).(Message) - n += prop.oneofSizer(m) - } - - return -} - -var zeroes [20]byte // longer than any conceivable sizeVarint - -// Encode a struct, preceded by its encoded length (as a varint). -func (o *Buffer) enc_len_struct(prop *StructProperties, base structPointer, state *errorState) error { - return o.enc_len_thing(func() error { return o.enc_struct(prop, base) }, state) -} - -// Encode something, preceded by its encoded length (as a varint). -func (o *Buffer) enc_len_thing(enc func() error, state *errorState) error { - iLen := len(o.buf) - o.buf = append(o.buf, 0, 0, 0, 0) // reserve four bytes for length - iMsg := len(o.buf) - err := enc() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - lMsg := len(o.buf) - iMsg - lLen := sizeVarint(uint64(lMsg)) - switch x := lLen - (iMsg - iLen); { - case x > 0: // actual length is x bytes larger than the space we reserved - // Move msg x bytes right. - o.buf = append(o.buf, zeroes[:x]...) - copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) - case x < 0: // actual length is x bytes smaller than the space we reserved - // Move msg x bytes left. - copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) - o.buf = o.buf[:len(o.buf)+x] // x is negative - } - // Encode the length in the reserved space. - o.buf = o.buf[:iLen] - o.EncodeVarint(uint64(lMsg)) - o.buf = o.buf[:len(o.buf)+lMsg] - return state.err -} - -// errorState maintains the first error that occurs and updates that error -// with additional context. -type errorState struct { - err error -} - -// shouldContinue reports whether encoding should continue upon encountering the -// given error. If the error is RequiredNotSetError, shouldContinue returns true -// and, if this is the first appearance of that error, remembers it for future -// reporting. -// -// If prop is not nil, it may update any error with additional context about the -// field with the error. -func (s *errorState) shouldContinue(err error, prop *Properties) bool { - // Ignore unset required fields. - reqNotSet, ok := err.(*RequiredNotSetError) - if !ok { - return false - } - if s.err == nil { - if prop != nil { - err = &RequiredNotSetError{prop.Name + "." + reqNotSet.field} - } - s.err = err - } - return true -} diff --git a/vendor/github.com/golang/protobuf/proto/equal.go b/vendor/github.com/golang/protobuf/proto/equal.go deleted file mode 100644 index 2ed1cf59..00000000 --- a/vendor/github.com/golang/protobuf/proto/equal.go +++ /dev/null @@ -1,300 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2011 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Protocol buffer comparison. - -package proto - -import ( - "bytes" - "log" - "reflect" - "strings" -) - -/* -Equal returns true iff protocol buffers a and b are equal. -The arguments must both be pointers to protocol buffer structs. - -Equality is defined in this way: - - Two messages are equal iff they are the same type, - corresponding fields are equal, unknown field sets - are equal, and extensions sets are equal. - - Two set scalar fields are equal iff their values are equal. - If the fields are of a floating-point type, remember that - NaN != x for all x, including NaN. If the message is defined - in a proto3 .proto file, fields are not "set"; specifically, - zero length proto3 "bytes" fields are equal (nil == {}). - - Two repeated fields are equal iff their lengths are the same, - and their corresponding elements are equal. Note a "bytes" field, - although represented by []byte, is not a repeated field and the - rule for the scalar fields described above applies. - - Two unset fields are equal. - - Two unknown field sets are equal if their current - encoded state is equal. - - Two extension sets are equal iff they have corresponding - elements that are pairwise equal. - - Two map fields are equal iff their lengths are the same, - and they contain the same set of elements. Zero-length map - fields are equal. - - Every other combination of things are not equal. - -The return value is undefined if a and b are not protocol buffers. -*/ -func Equal(a, b Message) bool { - if a == nil || b == nil { - return a == b - } - v1, v2 := reflect.ValueOf(a), reflect.ValueOf(b) - if v1.Type() != v2.Type() { - return false - } - if v1.Kind() == reflect.Ptr { - if v1.IsNil() { - return v2.IsNil() - } - if v2.IsNil() { - return false - } - v1, v2 = v1.Elem(), v2.Elem() - } - if v1.Kind() != reflect.Struct { - return false - } - return equalStruct(v1, v2) -} - -// v1 and v2 are known to have the same type. -func equalStruct(v1, v2 reflect.Value) bool { - sprop := GetProperties(v1.Type()) - for i := 0; i < v1.NumField(); i++ { - f := v1.Type().Field(i) - if strings.HasPrefix(f.Name, "XXX_") { - continue - } - f1, f2 := v1.Field(i), v2.Field(i) - if f.Type.Kind() == reflect.Ptr { - if n1, n2 := f1.IsNil(), f2.IsNil(); n1 && n2 { - // both unset - continue - } else if n1 != n2 { - // set/unset mismatch - return false - } - b1, ok := f1.Interface().(raw) - if ok { - b2 := f2.Interface().(raw) - // RawMessage - if !bytes.Equal(b1.Bytes(), b2.Bytes()) { - return false - } - continue - } - f1, f2 = f1.Elem(), f2.Elem() - } - if !equalAny(f1, f2, sprop.Prop[i]) { - return false - } - } - - if em1 := v1.FieldByName("XXX_InternalExtensions"); em1.IsValid() { - em2 := v2.FieldByName("XXX_InternalExtensions") - if !equalExtensions(v1.Type(), em1.Interface().(XXX_InternalExtensions), em2.Interface().(XXX_InternalExtensions)) { - return false - } - } - - if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() { - em2 := v2.FieldByName("XXX_extensions") - if !equalExtMap(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) { - return false - } - } - - uf := v1.FieldByName("XXX_unrecognized") - if !uf.IsValid() { - return true - } - - u1 := uf.Bytes() - u2 := v2.FieldByName("XXX_unrecognized").Bytes() - if !bytes.Equal(u1, u2) { - return false - } - - return true -} - -// v1 and v2 are known to have the same type. -// prop may be nil. -func equalAny(v1, v2 reflect.Value, prop *Properties) bool { - if v1.Type() == protoMessageType { - m1, _ := v1.Interface().(Message) - m2, _ := v2.Interface().(Message) - return Equal(m1, m2) - } - switch v1.Kind() { - case reflect.Bool: - return v1.Bool() == v2.Bool() - case reflect.Float32, reflect.Float64: - return v1.Float() == v2.Float() - case reflect.Int32, reflect.Int64: - return v1.Int() == v2.Int() - case reflect.Interface: - // Probably a oneof field; compare the inner values. - n1, n2 := v1.IsNil(), v2.IsNil() - if n1 || n2 { - return n1 == n2 - } - e1, e2 := v1.Elem(), v2.Elem() - if e1.Type() != e2.Type() { - return false - } - return equalAny(e1, e2, nil) - case reflect.Map: - if v1.Len() != v2.Len() { - return false - } - for _, key := range v1.MapKeys() { - val2 := v2.MapIndex(key) - if !val2.IsValid() { - // This key was not found in the second map. - return false - } - if !equalAny(v1.MapIndex(key), val2, nil) { - return false - } - } - return true - case reflect.Ptr: - // Maps may have nil values in them, so check for nil. - if v1.IsNil() && v2.IsNil() { - return true - } - if v1.IsNil() != v2.IsNil() { - return false - } - return equalAny(v1.Elem(), v2.Elem(), prop) - case reflect.Slice: - if v1.Type().Elem().Kind() == reflect.Uint8 { - // short circuit: []byte - - // Edge case: if this is in a proto3 message, a zero length - // bytes field is considered the zero value. - if prop != nil && prop.proto3 && v1.Len() == 0 && v2.Len() == 0 { - return true - } - if v1.IsNil() != v2.IsNil() { - return false - } - return bytes.Equal(v1.Interface().([]byte), v2.Interface().([]byte)) - } - - if v1.Len() != v2.Len() { - return false - } - for i := 0; i < v1.Len(); i++ { - if !equalAny(v1.Index(i), v2.Index(i), prop) { - return false - } - } - return true - case reflect.String: - return v1.Interface().(string) == v2.Interface().(string) - case reflect.Struct: - return equalStruct(v1, v2) - case reflect.Uint32, reflect.Uint64: - return v1.Uint() == v2.Uint() - } - - // unknown type, so not a protocol buffer - log.Printf("proto: don't know how to compare %v", v1) - return false -} - -// base is the struct type that the extensions are based on. -// x1 and x2 are InternalExtensions. -func equalExtensions(base reflect.Type, x1, x2 XXX_InternalExtensions) bool { - em1, _ := x1.extensionsRead() - em2, _ := x2.extensionsRead() - return equalExtMap(base, em1, em2) -} - -func equalExtMap(base reflect.Type, em1, em2 map[int32]Extension) bool { - if len(em1) != len(em2) { - return false - } - - for extNum, e1 := range em1 { - e2, ok := em2[extNum] - if !ok { - return false - } - - m1, m2 := e1.value, e2.value - - if m1 != nil && m2 != nil { - // Both are unencoded. - if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { - return false - } - continue - } - - // At least one is encoded. To do a semantically correct comparison - // we need to unmarshal them first. - var desc *ExtensionDesc - if m := extensionMaps[base]; m != nil { - desc = m[extNum] - } - if desc == nil { - log.Printf("proto: don't know how to compare extension %d of %v", extNum, base) - continue - } - var err error - if m1 == nil { - m1, err = decodeExtension(e1.enc, desc) - } - if m2 == nil && err == nil { - m2, err = decodeExtension(e2.enc, desc) - } - if err != nil { - // The encoded form is invalid. - log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err) - return false - } - if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { - return false - } - } - - return true -} diff --git a/vendor/github.com/golang/protobuf/proto/extensions.go b/vendor/github.com/golang/protobuf/proto/extensions.go deleted file mode 100644 index eaad2183..00000000 --- a/vendor/github.com/golang/protobuf/proto/extensions.go +++ /dev/null @@ -1,587 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Types and routines for supporting protocol buffer extensions. - */ - -import ( - "errors" - "fmt" - "reflect" - "strconv" - "sync" -) - -// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message. -var ErrMissingExtension = errors.New("proto: missing extension") - -// ExtensionRange represents a range of message extensions for a protocol buffer. -// Used in code generated by the protocol compiler. -type ExtensionRange struct { - Start, End int32 // both inclusive -} - -// extendableProto is an interface implemented by any protocol buffer generated by the current -// proto compiler that may be extended. -type extendableProto interface { - Message - ExtensionRangeArray() []ExtensionRange - extensionsWrite() map[int32]Extension - extensionsRead() (map[int32]Extension, sync.Locker) -} - -// extendableProtoV1 is an interface implemented by a protocol buffer generated by the previous -// version of the proto compiler that may be extended. -type extendableProtoV1 interface { - Message - ExtensionRangeArray() []ExtensionRange - ExtensionMap() map[int32]Extension -} - -// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto. -type extensionAdapter struct { - extendableProtoV1 -} - -func (e extensionAdapter) extensionsWrite() map[int32]Extension { - return e.ExtensionMap() -} - -func (e extensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) { - return e.ExtensionMap(), notLocker{} -} - -// notLocker is a sync.Locker whose Lock and Unlock methods are nops. -type notLocker struct{} - -func (n notLocker) Lock() {} -func (n notLocker) Unlock() {} - -// extendable returns the extendableProto interface for the given generated proto message. -// If the proto message has the old extension format, it returns a wrapper that implements -// the extendableProto interface. -func extendable(p interface{}) (extendableProto, bool) { - if ep, ok := p.(extendableProto); ok { - return ep, ok - } - if ep, ok := p.(extendableProtoV1); ok { - return extensionAdapter{ep}, ok - } - return nil, false -} - -// XXX_InternalExtensions is an internal representation of proto extensions. -// -// Each generated message struct type embeds an anonymous XXX_InternalExtensions field, -// thus gaining the unexported 'extensions' method, which can be called only from the proto package. -// -// The methods of XXX_InternalExtensions are not concurrency safe in general, -// but calls to logically read-only methods such as has and get may be executed concurrently. -type XXX_InternalExtensions struct { - // The struct must be indirect so that if a user inadvertently copies a - // generated message and its embedded XXX_InternalExtensions, they - // avoid the mayhem of a copied mutex. - // - // The mutex serializes all logically read-only operations to p.extensionMap. - // It is up to the client to ensure that write operations to p.extensionMap are - // mutually exclusive with other accesses. - p *struct { - mu sync.Mutex - extensionMap map[int32]Extension - } -} - -// extensionsWrite returns the extension map, creating it on first use. -func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension { - if e.p == nil { - e.p = new(struct { - mu sync.Mutex - extensionMap map[int32]Extension - }) - e.p.extensionMap = make(map[int32]Extension) - } - return e.p.extensionMap -} - -// extensionsRead returns the extensions map for read-only use. It may be nil. -// The caller must hold the returned mutex's lock when accessing Elements within the map. -func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Locker) { - if e.p == nil { - return nil, nil - } - return e.p.extensionMap, &e.p.mu -} - -var extendableProtoType = reflect.TypeOf((*extendableProto)(nil)).Elem() -var extendableProtoV1Type = reflect.TypeOf((*extendableProtoV1)(nil)).Elem() - -// ExtensionDesc represents an extension specification. -// Used in generated code from the protocol compiler. -type ExtensionDesc struct { - ExtendedType Message // nil pointer to the type that is being extended - ExtensionType interface{} // nil pointer to the extension type - Field int32 // field number - Name string // fully-qualified name of extension, for text formatting - Tag string // protobuf tag style - Filename string // name of the file in which the extension is defined -} - -func (ed *ExtensionDesc) repeated() bool { - t := reflect.TypeOf(ed.ExtensionType) - return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 -} - -// Extension represents an extension in a message. -type Extension struct { - // When an extension is stored in a message using SetExtension - // only desc and value are set. When the message is marshaled - // enc will be set to the encoded form of the message. - // - // When a message is unmarshaled and contains extensions, each - // extension will have only enc set. When such an extension is - // accessed using GetExtension (or GetExtensions) desc and value - // will be set. - desc *ExtensionDesc - value interface{} - enc []byte -} - -// SetRawExtension is for testing only. -func SetRawExtension(base Message, id int32, b []byte) { - epb, ok := extendable(base) - if !ok { - return - } - extmap := epb.extensionsWrite() - extmap[id] = Extension{enc: b} -} - -// isExtensionField returns true iff the given field number is in an extension range. -func isExtensionField(pb extendableProto, field int32) bool { - for _, er := range pb.ExtensionRangeArray() { - if er.Start <= field && field <= er.End { - return true - } - } - return false -} - -// checkExtensionTypes checks that the given extension is valid for pb. -func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error { - var pbi interface{} = pb - // Check the extended type. - if ea, ok := pbi.(extensionAdapter); ok { - pbi = ea.extendableProtoV1 - } - if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b { - return errors.New("proto: bad extended type; " + b.String() + " does not extend " + a.String()) - } - // Check the range. - if !isExtensionField(pb, extension.Field) { - return errors.New("proto: bad extension number; not in declared ranges") - } - return nil -} - -// extPropKey is sufficient to uniquely identify an extension. -type extPropKey struct { - base reflect.Type - field int32 -} - -var extProp = struct { - sync.RWMutex - m map[extPropKey]*Properties -}{ - m: make(map[extPropKey]*Properties), -} - -func extensionProperties(ed *ExtensionDesc) *Properties { - key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field} - - extProp.RLock() - if prop, ok := extProp.m[key]; ok { - extProp.RUnlock() - return prop - } - extProp.RUnlock() - - extProp.Lock() - defer extProp.Unlock() - // Check again. - if prop, ok := extProp.m[key]; ok { - return prop - } - - prop := new(Properties) - prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil) - extProp.m[key] = prop - return prop -} - -// encode encodes any unmarshaled (unencoded) extensions in e. -func encodeExtensions(e *XXX_InternalExtensions) error { - m, mu := e.extensionsRead() - if m == nil { - return nil // fast path - } - mu.Lock() - defer mu.Unlock() - return encodeExtensionsMap(m) -} - -// encode encodes any unmarshaled (unencoded) extensions in e. -func encodeExtensionsMap(m map[int32]Extension) error { - for k, e := range m { - if e.value == nil || e.desc == nil { - // Extension is only in its encoded form. - continue - } - - // We don't skip extensions that have an encoded form set, - // because the extension value may have been mutated after - // the last time this function was called. - - et := reflect.TypeOf(e.desc.ExtensionType) - props := extensionProperties(e.desc) - - p := NewBuffer(nil) - // If e.value has type T, the encoder expects a *struct{ X T }. - // Pass a *T with a zero field and hope it all works out. - x := reflect.New(et) - x.Elem().Set(reflect.ValueOf(e.value)) - if err := props.enc(p, props, toStructPointer(x)); err != nil { - return err - } - e.enc = p.buf - m[k] = e - } - return nil -} - -func extensionsSize(e *XXX_InternalExtensions) (n int) { - m, mu := e.extensionsRead() - if m == nil { - return 0 - } - mu.Lock() - defer mu.Unlock() - return extensionsMapSize(m) -} - -func extensionsMapSize(m map[int32]Extension) (n int) { - for _, e := range m { - if e.value == nil || e.desc == nil { - // Extension is only in its encoded form. - n += len(e.enc) - continue - } - - // We don't skip extensions that have an encoded form set, - // because the extension value may have been mutated after - // the last time this function was called. - - et := reflect.TypeOf(e.desc.ExtensionType) - props := extensionProperties(e.desc) - - // If e.value has type T, the encoder expects a *struct{ X T }. - // Pass a *T with a zero field and hope it all works out. - x := reflect.New(et) - x.Elem().Set(reflect.ValueOf(e.value)) - n += props.size(props, toStructPointer(x)) - } - return -} - -// HasExtension returns whether the given extension is present in pb. -func HasExtension(pb Message, extension *ExtensionDesc) bool { - // TODO: Check types, field numbers, etc.? - epb, ok := extendable(pb) - if !ok { - return false - } - extmap, mu := epb.extensionsRead() - if extmap == nil { - return false - } - mu.Lock() - _, ok = extmap[extension.Field] - mu.Unlock() - return ok -} - -// ClearExtension removes the given extension from pb. -func ClearExtension(pb Message, extension *ExtensionDesc) { - epb, ok := extendable(pb) - if !ok { - return - } - // TODO: Check types, field numbers, etc.? - extmap := epb.extensionsWrite() - delete(extmap, extension.Field) -} - -// GetExtension parses and returns the given extension of pb. -// If the extension is not present and has no default value it returns ErrMissingExtension. -func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) { - epb, ok := extendable(pb) - if !ok { - return nil, errors.New("proto: not an extendable proto") - } - - if err := checkExtensionTypes(epb, extension); err != nil { - return nil, err - } - - emap, mu := epb.extensionsRead() - if emap == nil { - return defaultExtensionValue(extension) - } - mu.Lock() - defer mu.Unlock() - e, ok := emap[extension.Field] - if !ok { - // defaultExtensionValue returns the default value or - // ErrMissingExtension if there is no default. - return defaultExtensionValue(extension) - } - - if e.value != nil { - // Already decoded. Check the descriptor, though. - if e.desc != extension { - // This shouldn't happen. If it does, it means that - // GetExtension was called twice with two different - // descriptors with the same field number. - return nil, errors.New("proto: descriptor conflict") - } - return e.value, nil - } - - v, err := decodeExtension(e.enc, extension) - if err != nil { - return nil, err - } - - // Remember the decoded version and drop the encoded version. - // That way it is safe to mutate what we return. - e.value = v - e.desc = extension - e.enc = nil - emap[extension.Field] = e - return e.value, nil -} - -// defaultExtensionValue returns the default value for extension. -// If no default for an extension is defined ErrMissingExtension is returned. -func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { - t := reflect.TypeOf(extension.ExtensionType) - props := extensionProperties(extension) - - sf, _, err := fieldDefault(t, props) - if err != nil { - return nil, err - } - - if sf == nil || sf.value == nil { - // There is no default value. - return nil, ErrMissingExtension - } - - if t.Kind() != reflect.Ptr { - // We do not need to return a Ptr, we can directly return sf.value. - return sf.value, nil - } - - // We need to return an interface{} that is a pointer to sf.value. - value := reflect.New(t).Elem() - value.Set(reflect.New(value.Type().Elem())) - if sf.kind == reflect.Int32 { - // We may have an int32 or an enum, but the underlying data is int32. - // Since we can't set an int32 into a non int32 reflect.value directly - // set it as a int32. - value.Elem().SetInt(int64(sf.value.(int32))) - } else { - value.Elem().Set(reflect.ValueOf(sf.value)) - } - return value.Interface(), nil -} - -// decodeExtension decodes an extension encoded in b. -func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { - o := NewBuffer(b) - - t := reflect.TypeOf(extension.ExtensionType) - - props := extensionProperties(extension) - - // t is a pointer to a struct, pointer to basic type or a slice. - // Allocate a "field" to store the pointer/slice itself; the - // pointer/slice will be stored here. We pass - // the address of this field to props.dec. - // This passes a zero field and a *t and lets props.dec - // interpret it as a *struct{ x t }. - value := reflect.New(t).Elem() - - for { - // Discard wire type and field number varint. It isn't needed. - if _, err := o.DecodeVarint(); err != nil { - return nil, err - } - - if err := props.dec(o, props, toStructPointer(value.Addr())); err != nil { - return nil, err - } - - if o.index >= len(o.buf) { - break - } - } - return value.Interface(), nil -} - -// GetExtensions returns a slice of the extensions present in pb that are also listed in es. -// The returned slice has the same length as es; missing extensions will appear as nil elements. -func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { - epb, ok := extendable(pb) - if !ok { - return nil, errors.New("proto: not an extendable proto") - } - extensions = make([]interface{}, len(es)) - for i, e := range es { - extensions[i], err = GetExtension(epb, e) - if err == ErrMissingExtension { - err = nil - } - if err != nil { - return - } - } - return -} - -// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order. -// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing -// just the Field field, which defines the extension's field number. -func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { - epb, ok := extendable(pb) - if !ok { - return nil, fmt.Errorf("proto: %T is not an extendable proto.Message", pb) - } - registeredExtensions := RegisteredExtensions(pb) - - emap, mu := epb.extensionsRead() - if emap == nil { - return nil, nil - } - mu.Lock() - defer mu.Unlock() - extensions := make([]*ExtensionDesc, 0, len(emap)) - for extid, e := range emap { - desc := e.desc - if desc == nil { - desc = registeredExtensions[extid] - if desc == nil { - desc = &ExtensionDesc{Field: extid} - } - } - - extensions = append(extensions, desc) - } - return extensions, nil -} - -// SetExtension sets the specified extension of pb to the specified value. -func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error { - epb, ok := extendable(pb) - if !ok { - return errors.New("proto: not an extendable proto") - } - if err := checkExtensionTypes(epb, extension); err != nil { - return err - } - typ := reflect.TypeOf(extension.ExtensionType) - if typ != reflect.TypeOf(value) { - return errors.New("proto: bad extension value type") - } - // nil extension values need to be caught early, because the - // encoder can't distinguish an ErrNil due to a nil extension - // from an ErrNil due to a missing field. Extensions are - // always optional, so the encoder would just swallow the error - // and drop all the extensions from the encoded message. - if reflect.ValueOf(value).IsNil() { - return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) - } - - extmap := epb.extensionsWrite() - extmap[extension.Field] = Extension{desc: extension, value: value} - return nil -} - -// ClearAllExtensions clears all extensions from pb. -func ClearAllExtensions(pb Message) { - epb, ok := extendable(pb) - if !ok { - return - } - m := epb.extensionsWrite() - for k := range m { - delete(m, k) - } -} - -// A global registry of extensions. -// The generated code will register the generated descriptors by calling RegisterExtension. - -var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc) - -// RegisterExtension is called from the generated code. -func RegisterExtension(desc *ExtensionDesc) { - st := reflect.TypeOf(desc.ExtendedType).Elem() - m := extensionMaps[st] - if m == nil { - m = make(map[int32]*ExtensionDesc) - extensionMaps[st] = m - } - if _, ok := m[desc.Field]; ok { - panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field))) - } - m[desc.Field] = desc -} - -// RegisteredExtensions returns a map of the registered extensions of a -// protocol buffer struct, indexed by the extension number. -// The argument pb should be a nil pointer to the struct type. -func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { - return extensionMaps[reflect.TypeOf(pb).Elem()] -} diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go deleted file mode 100644 index 1c225504..00000000 --- a/vendor/github.com/golang/protobuf/proto/lib.go +++ /dev/null @@ -1,897 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -Package proto converts data structures to and from the wire format of -protocol buffers. It works in concert with the Go source code generated -for .proto files by the protocol compiler. - -A summary of the properties of the protocol buffer interface -for a protocol buffer variable v: - - - Names are turned from camel_case to CamelCase for export. - - There are no methods on v to set fields; just treat - them as structure fields. - - There are getters that return a field's value if set, - and return the field's default value if unset. - The getters work even if the receiver is a nil message. - - The zero value for a struct is its correct initialization state. - All desired fields must be set before marshaling. - - A Reset() method will restore a protobuf struct to its zero state. - - Non-repeated fields are pointers to the values; nil means unset. - That is, optional or required field int32 f becomes F *int32. - - Repeated fields are slices. - - Helper functions are available to aid the setting of fields. - msg.Foo = proto.String("hello") // set field - - Constants are defined to hold the default values of all fields that - have them. They have the form Default_StructName_FieldName. - Because the getter methods handle defaulted values, - direct use of these constants should be rare. - - Enums are given type names and maps from names to values. - Enum values are prefixed by the enclosing message's name, or by the - enum's type name if it is a top-level enum. Enum types have a String - method, and a Enum method to assist in message construction. - - Nested messages, groups and enums have type names prefixed with the name of - the surrounding message type. - - Extensions are given descriptor names that start with E_, - followed by an underscore-delimited list of the nested messages - that contain it (if any) followed by the CamelCased name of the - extension field itself. HasExtension, ClearExtension, GetExtension - and SetExtension are functions for manipulating extensions. - - Oneof field sets are given a single field in their message, - with distinguished wrapper types for each possible field value. - - Marshal and Unmarshal are functions to encode and decode the wire format. - -When the .proto file specifies `syntax="proto3"`, there are some differences: - - - Non-repeated fields of non-message type are values instead of pointers. - - Enum types do not get an Enum method. - -The simplest way to describe this is to see an example. -Given file test.proto, containing - - package example; - - enum FOO { X = 17; } - - message Test { - required string label = 1; - optional int32 type = 2 [default=77]; - repeated int64 reps = 3; - optional group OptionalGroup = 4 { - required string RequiredField = 5; - } - oneof union { - int32 number = 6; - string name = 7; - } - } - -The resulting file, test.pb.go, is: - - package example - - import proto "github.com/golang/protobuf/proto" - import math "math" - - type FOO int32 - const ( - FOO_X FOO = 17 - ) - var FOO_name = map[int32]string{ - 17: "X", - } - var FOO_value = map[string]int32{ - "X": 17, - } - - func (x FOO) Enum() *FOO { - p := new(FOO) - *p = x - return p - } - func (x FOO) String() string { - return proto.EnumName(FOO_name, int32(x)) - } - func (x *FOO) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FOO_value, data) - if err != nil { - return err - } - *x = FOO(value) - return nil - } - - type Test struct { - Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` - Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` - Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` - Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` - // Types that are valid to be assigned to Union: - // *Test_Number - // *Test_Name - Union isTest_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` - } - func (m *Test) Reset() { *m = Test{} } - func (m *Test) String() string { return proto.CompactTextString(m) } - func (*Test) ProtoMessage() {} - - type isTest_Union interface { - isTest_Union() - } - - type Test_Number struct { - Number int32 `protobuf:"varint,6,opt,name=number"` - } - type Test_Name struct { - Name string `protobuf:"bytes,7,opt,name=name"` - } - - func (*Test_Number) isTest_Union() {} - func (*Test_Name) isTest_Union() {} - - func (m *Test) GetUnion() isTest_Union { - if m != nil { - return m.Union - } - return nil - } - const Default_Test_Type int32 = 77 - - func (m *Test) GetLabel() string { - if m != nil && m.Label != nil { - return *m.Label - } - return "" - } - - func (m *Test) GetType() int32 { - if m != nil && m.Type != nil { - return *m.Type - } - return Default_Test_Type - } - - func (m *Test) GetOptionalgroup() *Test_OptionalGroup { - if m != nil { - return m.Optionalgroup - } - return nil - } - - type Test_OptionalGroup struct { - RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` - } - func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } - func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } - - func (m *Test_OptionalGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" - } - - func (m *Test) GetNumber() int32 { - if x, ok := m.GetUnion().(*Test_Number); ok { - return x.Number - } - return 0 - } - - func (m *Test) GetName() string { - if x, ok := m.GetUnion().(*Test_Name); ok { - return x.Name - } - return "" - } - - func init() { - proto.RegisterEnum("example.FOO", FOO_name, FOO_value) - } - -To create and play with a Test object: - - package main - - import ( - "log" - - "github.com/golang/protobuf/proto" - pb "./example.pb" - ) - - func main() { - test := &pb.Test{ - Label: proto.String("hello"), - Type: proto.Int32(17), - Reps: []int64{1, 2, 3}, - Optionalgroup: &pb.Test_OptionalGroup{ - RequiredField: proto.String("good bye"), - }, - Union: &pb.Test_Name{"fred"}, - } - data, err := proto.Marshal(test) - if err != nil { - log.Fatal("marshaling error: ", err) - } - newTest := &pb.Test{} - err = proto.Unmarshal(data, newTest) - if err != nil { - log.Fatal("unmarshaling error: ", err) - } - // Now test and newTest contain the same data. - if test.GetLabel() != newTest.GetLabel() { - log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) - } - // Use a type switch to determine which oneof was set. - switch u := test.Union.(type) { - case *pb.Test_Number: // u.Number contains the number. - case *pb.Test_Name: // u.Name contains the string. - } - // etc. - } -*/ -package proto - -import ( - "encoding/json" - "fmt" - "log" - "reflect" - "sort" - "strconv" - "sync" -) - -// Message is implemented by generated protocol buffer messages. -type Message interface { - Reset() - String() string - ProtoMessage() -} - -// Stats records allocation details about the protocol buffer encoders -// and decoders. Useful for tuning the library itself. -type Stats struct { - Emalloc uint64 // mallocs in encode - Dmalloc uint64 // mallocs in decode - Encode uint64 // number of encodes - Decode uint64 // number of decodes - Chit uint64 // number of cache hits - Cmiss uint64 // number of cache misses - Size uint64 // number of sizes -} - -// Set to true to enable stats collection. -const collectStats = false - -var stats Stats - -// GetStats returns a copy of the global Stats structure. -func GetStats() Stats { return stats } - -// A Buffer is a buffer manager for marshaling and unmarshaling -// protocol buffers. It may be reused between invocations to -// reduce memory usage. It is not necessary to use a Buffer; -// the global functions Marshal and Unmarshal create a -// temporary Buffer and are fine for most applications. -type Buffer struct { - buf []byte // encode/decode byte stream - index int // read point - - // pools of basic types to amortize allocation. - bools []bool - uint32s []uint32 - uint64s []uint64 - - // extra pools, only used with pointer_reflect.go - int32s []int32 - int64s []int64 - float32s []float32 - float64s []float64 -} - -// NewBuffer allocates a new Buffer and initializes its internal data to -// the contents of the argument slice. -func NewBuffer(e []byte) *Buffer { - return &Buffer{buf: e} -} - -// Reset resets the Buffer, ready for marshaling a new protocol buffer. -func (p *Buffer) Reset() { - p.buf = p.buf[0:0] // for reading/writing - p.index = 0 // for reading -} - -// SetBuf replaces the internal buffer with the slice, -// ready for unmarshaling the contents of the slice. -func (p *Buffer) SetBuf(s []byte) { - p.buf = s - p.index = 0 -} - -// Bytes returns the contents of the Buffer. -func (p *Buffer) Bytes() []byte { return p.buf } - -/* - * Helper routines for simplifying the creation of optional fields of basic type. - */ - -// Bool is a helper routine that allocates a new bool value -// to store v and returns a pointer to it. -func Bool(v bool) *bool { - return &v -} - -// Int32 is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it. -func Int32(v int32) *int32 { - return &v -} - -// Int is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it, but unlike Int32 -// its argument value is an int. -func Int(v int) *int32 { - p := new(int32) - *p = int32(v) - return p -} - -// Int64 is a helper routine that allocates a new int64 value -// to store v and returns a pointer to it. -func Int64(v int64) *int64 { - return &v -} - -// Float32 is a helper routine that allocates a new float32 value -// to store v and returns a pointer to it. -func Float32(v float32) *float32 { - return &v -} - -// Float64 is a helper routine that allocates a new float64 value -// to store v and returns a pointer to it. -func Float64(v float64) *float64 { - return &v -} - -// Uint32 is a helper routine that allocates a new uint32 value -// to store v and returns a pointer to it. -func Uint32(v uint32) *uint32 { - return &v -} - -// Uint64 is a helper routine that allocates a new uint64 value -// to store v and returns a pointer to it. -func Uint64(v uint64) *uint64 { - return &v -} - -// String is a helper routine that allocates a new string value -// to store v and returns a pointer to it. -func String(v string) *string { - return &v -} - -// EnumName is a helper function to simplify printing protocol buffer enums -// by name. Given an enum map and a value, it returns a useful string. -func EnumName(m map[int32]string, v int32) string { - s, ok := m[v] - if ok { - return s - } - return strconv.Itoa(int(v)) -} - -// UnmarshalJSONEnum is a helper function to simplify recovering enum int values -// from their JSON-encoded representation. Given a map from the enum's symbolic -// names to its int values, and a byte buffer containing the JSON-encoded -// value, it returns an int32 that can be cast to the enum type by the caller. -// -// The function can deal with both JSON representations, numeric and symbolic. -func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { - if data[0] == '"' { - // New style: enums are strings. - var repr string - if err := json.Unmarshal(data, &repr); err != nil { - return -1, err - } - val, ok := m[repr] - if !ok { - return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) - } - return val, nil - } - // Old style: enums are ints. - var val int32 - if err := json.Unmarshal(data, &val); err != nil { - return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) - } - return val, nil -} - -// DebugPrint dumps the encoded data in b in a debugging format with a header -// including the string s. Used in testing but made available for general debugging. -func (p *Buffer) DebugPrint(s string, b []byte) { - var u uint64 - - obuf := p.buf - index := p.index - p.buf = b - p.index = 0 - depth := 0 - - fmt.Printf("\n--- %s ---\n", s) - -out: - for { - for i := 0; i < depth; i++ { - fmt.Print(" ") - } - - index := p.index - if index == len(p.buf) { - break - } - - op, err := p.DecodeVarint() - if err != nil { - fmt.Printf("%3d: fetching op err %v\n", index, err) - break out - } - tag := op >> 3 - wire := op & 7 - - switch wire { - default: - fmt.Printf("%3d: t=%3d unknown wire=%d\n", - index, tag, wire) - break out - - case WireBytes: - var r []byte - - r, err = p.DecodeRawBytes(false) - if err != nil { - break out - } - fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r)) - if len(r) <= 6 { - for i := 0; i < len(r); i++ { - fmt.Printf(" %.2x", r[i]) - } - } else { - for i := 0; i < 3; i++ { - fmt.Printf(" %.2x", r[i]) - } - fmt.Printf(" ..") - for i := len(r) - 3; i < len(r); i++ { - fmt.Printf(" %.2x", r[i]) - } - } - fmt.Printf("\n") - - case WireFixed32: - u, err = p.DecodeFixed32() - if err != nil { - fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u) - - case WireFixed64: - u, err = p.DecodeFixed64() - if err != nil { - fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u) - - case WireVarint: - u, err = p.DecodeVarint() - if err != nil { - fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u) - - case WireStartGroup: - fmt.Printf("%3d: t=%3d start\n", index, tag) - depth++ - - case WireEndGroup: - depth-- - fmt.Printf("%3d: t=%3d end\n", index, tag) - } - } - - if depth != 0 { - fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth) - } - fmt.Printf("\n") - - p.buf = obuf - p.index = index -} - -// SetDefaults sets unset protocol buffer fields to their default values. -// It only modifies fields that are both unset and have defined defaults. -// It recursively sets default values in any non-nil sub-messages. -func SetDefaults(pb Message) { - setDefaults(reflect.ValueOf(pb), true, false) -} - -// v is a pointer to a struct. -func setDefaults(v reflect.Value, recur, zeros bool) { - v = v.Elem() - - defaultMu.RLock() - dm, ok := defaults[v.Type()] - defaultMu.RUnlock() - if !ok { - dm = buildDefaultMessage(v.Type()) - defaultMu.Lock() - defaults[v.Type()] = dm - defaultMu.Unlock() - } - - for _, sf := range dm.scalars { - f := v.Field(sf.index) - if !f.IsNil() { - // field already set - continue - } - dv := sf.value - if dv == nil && !zeros { - // no explicit default, and don't want to set zeros - continue - } - fptr := f.Addr().Interface() // **T - // TODO: Consider batching the allocations we do here. - switch sf.kind { - case reflect.Bool: - b := new(bool) - if dv != nil { - *b = dv.(bool) - } - *(fptr.(**bool)) = b - case reflect.Float32: - f := new(float32) - if dv != nil { - *f = dv.(float32) - } - *(fptr.(**float32)) = f - case reflect.Float64: - f := new(float64) - if dv != nil { - *f = dv.(float64) - } - *(fptr.(**float64)) = f - case reflect.Int32: - // might be an enum - if ft := f.Type(); ft != int32PtrType { - // enum - f.Set(reflect.New(ft.Elem())) - if dv != nil { - f.Elem().SetInt(int64(dv.(int32))) - } - } else { - // int32 field - i := new(int32) - if dv != nil { - *i = dv.(int32) - } - *(fptr.(**int32)) = i - } - case reflect.Int64: - i := new(int64) - if dv != nil { - *i = dv.(int64) - } - *(fptr.(**int64)) = i - case reflect.String: - s := new(string) - if dv != nil { - *s = dv.(string) - } - *(fptr.(**string)) = s - case reflect.Uint8: - // exceptional case: []byte - var b []byte - if dv != nil { - db := dv.([]byte) - b = make([]byte, len(db)) - copy(b, db) - } else { - b = []byte{} - } - *(fptr.(*[]byte)) = b - case reflect.Uint32: - u := new(uint32) - if dv != nil { - *u = dv.(uint32) - } - *(fptr.(**uint32)) = u - case reflect.Uint64: - u := new(uint64) - if dv != nil { - *u = dv.(uint64) - } - *(fptr.(**uint64)) = u - default: - log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind) - } - } - - for _, ni := range dm.nested { - f := v.Field(ni) - // f is *T or []*T or map[T]*T - switch f.Kind() { - case reflect.Ptr: - if f.IsNil() { - continue - } - setDefaults(f, recur, zeros) - - case reflect.Slice: - for i := 0; i < f.Len(); i++ { - e := f.Index(i) - if e.IsNil() { - continue - } - setDefaults(e, recur, zeros) - } - - case reflect.Map: - for _, k := range f.MapKeys() { - e := f.MapIndex(k) - if e.IsNil() { - continue - } - setDefaults(e, recur, zeros) - } - } - } -} - -var ( - // defaults maps a protocol buffer struct type to a slice of the fields, - // with its scalar fields set to their proto-declared non-zero default values. - defaultMu sync.RWMutex - defaults = make(map[reflect.Type]defaultMessage) - - int32PtrType = reflect.TypeOf((*int32)(nil)) -) - -// defaultMessage represents information about the default values of a message. -type defaultMessage struct { - scalars []scalarField - nested []int // struct field index of nested messages -} - -type scalarField struct { - index int // struct field index - kind reflect.Kind // element type (the T in *T or []T) - value interface{} // the proto-declared default value, or nil -} - -// t is a struct type. -func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { - sprop := GetProperties(t) - for _, prop := range sprop.Prop { - fi, ok := sprop.decoderTags.get(prop.Tag) - if !ok { - // XXX_unrecognized - continue - } - ft := t.Field(fi).Type - - sf, nested, err := fieldDefault(ft, prop) - switch { - case err != nil: - log.Print(err) - case nested: - dm.nested = append(dm.nested, fi) - case sf != nil: - sf.index = fi - dm.scalars = append(dm.scalars, *sf) - } - } - - return dm -} - -// fieldDefault returns the scalarField for field type ft. -// sf will be nil if the field can not have a default. -// nestedMessage will be true if this is a nested message. -// Note that sf.index is not set on return. -func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { - var canHaveDefault bool - switch ft.Kind() { - case reflect.Ptr: - if ft.Elem().Kind() == reflect.Struct { - nestedMessage = true - } else { - canHaveDefault = true // proto2 scalar field - } - - case reflect.Slice: - switch ft.Elem().Kind() { - case reflect.Ptr: - nestedMessage = true // repeated message - case reflect.Uint8: - canHaveDefault = true // bytes field - } - - case reflect.Map: - if ft.Elem().Kind() == reflect.Ptr { - nestedMessage = true // map with message values - } - } - - if !canHaveDefault { - if nestedMessage { - return nil, true, nil - } - return nil, false, nil - } - - // We now know that ft is a pointer or slice. - sf = &scalarField{kind: ft.Elem().Kind()} - - // scalar fields without defaults - if !prop.HasDefault { - return sf, false, nil - } - - // a scalar field: either *T or []byte - switch ft.Elem().Kind() { - case reflect.Bool: - x, err := strconv.ParseBool(prop.Default) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err) - } - sf.value = x - case reflect.Float32: - x, err := strconv.ParseFloat(prop.Default, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err) - } - sf.value = float32(x) - case reflect.Float64: - x, err := strconv.ParseFloat(prop.Default, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err) - } - sf.value = x - case reflect.Int32: - x, err := strconv.ParseInt(prop.Default, 10, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err) - } - sf.value = int32(x) - case reflect.Int64: - x, err := strconv.ParseInt(prop.Default, 10, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err) - } - sf.value = x - case reflect.String: - sf.value = prop.Default - case reflect.Uint8: - // []byte (not *uint8) - sf.value = []byte(prop.Default) - case reflect.Uint32: - x, err := strconv.ParseUint(prop.Default, 10, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err) - } - sf.value = uint32(x) - case reflect.Uint64: - x, err := strconv.ParseUint(prop.Default, 10, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err) - } - sf.value = x - default: - return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind()) - } - - return sf, false, nil -} - -// Map fields may have key types of non-float scalars, strings and enums. -// The easiest way to sort them in some deterministic order is to use fmt. -// If this turns out to be inefficient we can always consider other options, -// such as doing a Schwartzian transform. - -func mapKeys(vs []reflect.Value) sort.Interface { - s := mapKeySorter{ - vs: vs, - // default Less function: textual comparison - less: func(a, b reflect.Value) bool { - return fmt.Sprint(a.Interface()) < fmt.Sprint(b.Interface()) - }, - } - - // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps; - // numeric keys are sorted numerically. - if len(vs) == 0 { - return s - } - switch vs[0].Kind() { - case reflect.Int32, reflect.Int64: - s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } - case reflect.Uint32, reflect.Uint64: - s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } - } - - return s -} - -type mapKeySorter struct { - vs []reflect.Value - less func(a, b reflect.Value) bool -} - -func (s mapKeySorter) Len() int { return len(s.vs) } -func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] } -func (s mapKeySorter) Less(i, j int) bool { - return s.less(s.vs[i], s.vs[j]) -} - -// isProto3Zero reports whether v is a zero proto3 value. -func isProto3Zero(v reflect.Value) bool { - switch v.Kind() { - case reflect.Bool: - return !v.Bool() - case reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint32, reflect.Uint64: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.String: - return v.String() == "" - } - return false -} - -// ProtoPackageIsVersion2 is referenced from generated protocol buffer files -// to assert that that code is compatible with this version of the proto package. -const ProtoPackageIsVersion2 = true - -// ProtoPackageIsVersion1 is referenced from generated protocol buffer files -// to assert that that code is compatible with this version of the proto package. -const ProtoPackageIsVersion1 = true diff --git a/vendor/github.com/golang/protobuf/proto/message_set.go b/vendor/github.com/golang/protobuf/proto/message_set.go deleted file mode 100644 index fd982dec..00000000 --- a/vendor/github.com/golang/protobuf/proto/message_set.go +++ /dev/null @@ -1,311 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Support for message sets. - */ - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "reflect" - "sort" -) - -// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. -// A message type ID is required for storing a protocol buffer in a message set. -var errNoMessageTypeID = errors.New("proto does not have a message type ID") - -// The first two types (_MessageSet_Item and messageSet) -// model what the protocol compiler produces for the following protocol message: -// message MessageSet { -// repeated group Item = 1 { -// required int32 type_id = 2; -// required string message = 3; -// }; -// } -// That is the MessageSet wire format. We can't use a proto to generate these -// because that would introduce a circular dependency between it and this package. - -type _MessageSet_Item struct { - TypeId *int32 `protobuf:"varint,2,req,name=type_id"` - Message []byte `protobuf:"bytes,3,req,name=message"` -} - -type messageSet struct { - Item []*_MessageSet_Item `protobuf:"group,1,rep"` - XXX_unrecognized []byte - // TODO: caching? -} - -// Make sure messageSet is a Message. -var _ Message = (*messageSet)(nil) - -// messageTypeIder is an interface satisfied by a protocol buffer type -// that may be stored in a MessageSet. -type messageTypeIder interface { - MessageTypeId() int32 -} - -func (ms *messageSet) find(pb Message) *_MessageSet_Item { - mti, ok := pb.(messageTypeIder) - if !ok { - return nil - } - id := mti.MessageTypeId() - for _, item := range ms.Item { - if *item.TypeId == id { - return item - } - } - return nil -} - -func (ms *messageSet) Has(pb Message) bool { - if ms.find(pb) != nil { - return true - } - return false -} - -func (ms *messageSet) Unmarshal(pb Message) error { - if item := ms.find(pb); item != nil { - return Unmarshal(item.Message, pb) - } - if _, ok := pb.(messageTypeIder); !ok { - return errNoMessageTypeID - } - return nil // TODO: return error instead? -} - -func (ms *messageSet) Marshal(pb Message) error { - msg, err := Marshal(pb) - if err != nil { - return err - } - if item := ms.find(pb); item != nil { - // reuse existing item - item.Message = msg - return nil - } - - mti, ok := pb.(messageTypeIder) - if !ok { - return errNoMessageTypeID - } - - mtid := mti.MessageTypeId() - ms.Item = append(ms.Item, &_MessageSet_Item{ - TypeId: &mtid, - Message: msg, - }) - return nil -} - -func (ms *messageSet) Reset() { *ms = messageSet{} } -func (ms *messageSet) String() string { return CompactTextString(ms) } -func (*messageSet) ProtoMessage() {} - -// Support for the message_set_wire_format message option. - -func skipVarint(buf []byte) []byte { - i := 0 - for ; buf[i]&0x80 != 0; i++ { - } - return buf[i+1:] -} - -// MarshalMessageSet encodes the extension map represented by m in the message set wire format. -// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. -func MarshalMessageSet(exts interface{}) ([]byte, error) { - var m map[int32]Extension - switch exts := exts.(type) { - case *XXX_InternalExtensions: - if err := encodeExtensions(exts); err != nil { - return nil, err - } - m, _ = exts.extensionsRead() - case map[int32]Extension: - if err := encodeExtensionsMap(exts); err != nil { - return nil, err - } - m = exts - default: - return nil, errors.New("proto: not an extension map") - } - - // Sort extension IDs to provide a deterministic encoding. - // See also enc_map in encode.go. - ids := make([]int, 0, len(m)) - for id := range m { - ids = append(ids, int(id)) - } - sort.Ints(ids) - - ms := &messageSet{Item: make([]*_MessageSet_Item, 0, len(m))} - for _, id := range ids { - e := m[int32(id)] - // Remove the wire type and field number varint, as well as the length varint. - msg := skipVarint(skipVarint(e.enc)) - - ms.Item = append(ms.Item, &_MessageSet_Item{ - TypeId: Int32(int32(id)), - Message: msg, - }) - } - return Marshal(ms) -} - -// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. -// It is called by generated Unmarshal methods on protocol buffer messages with the message_set_wire_format option. -func UnmarshalMessageSet(buf []byte, exts interface{}) error { - var m map[int32]Extension - switch exts := exts.(type) { - case *XXX_InternalExtensions: - m = exts.extensionsWrite() - case map[int32]Extension: - m = exts - default: - return errors.New("proto: not an extension map") - } - - ms := new(messageSet) - if err := Unmarshal(buf, ms); err != nil { - return err - } - for _, item := range ms.Item { - id := *item.TypeId - msg := item.Message - - // Restore wire type and field number varint, plus length varint. - // Be careful to preserve duplicate items. - b := EncodeVarint(uint64(id)<<3 | WireBytes) - if ext, ok := m[id]; ok { - // Existing data; rip off the tag and length varint - // so we join the new data correctly. - // We can assume that ext.enc is set because we are unmarshaling. - o := ext.enc[len(b):] // skip wire type and field number - _, n := DecodeVarint(o) // calculate length of length varint - o = o[n:] // skip length varint - msg = append(o, msg...) // join old data and new data - } - b = append(b, EncodeVarint(uint64(len(msg)))...) - b = append(b, msg...) - - m[id] = Extension{enc: b} - } - return nil -} - -// MarshalMessageSetJSON encodes the extension map represented by m in JSON format. -// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option. -func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { - var m map[int32]Extension - switch exts := exts.(type) { - case *XXX_InternalExtensions: - m, _ = exts.extensionsRead() - case map[int32]Extension: - m = exts - default: - return nil, errors.New("proto: not an extension map") - } - var b bytes.Buffer - b.WriteByte('{') - - // Process the map in key order for deterministic output. - ids := make([]int32, 0, len(m)) - for id := range m { - ids = append(ids, id) - } - sort.Sort(int32Slice(ids)) // int32Slice defined in text.go - - for i, id := range ids { - ext := m[id] - if i > 0 { - b.WriteByte(',') - } - - msd, ok := messageSetMap[id] - if !ok { - // Unknown type; we can't render it, so skip it. - continue - } - fmt.Fprintf(&b, `"[%s]":`, msd.name) - - x := ext.value - if x == nil { - x = reflect.New(msd.t.Elem()).Interface() - if err := Unmarshal(ext.enc, x.(Message)); err != nil { - return nil, err - } - } - d, err := json.Marshal(x) - if err != nil { - return nil, err - } - b.Write(d) - } - b.WriteByte('}') - return b.Bytes(), nil -} - -// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format. -// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option. -func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error { - // Common-case fast path. - if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) { - return nil - } - - // This is fairly tricky, and it's not clear that it is needed. - return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented") -} - -// A global registry of types that can be used in a MessageSet. - -var messageSetMap = make(map[int32]messageSetDesc) - -type messageSetDesc struct { - t reflect.Type // pointer to struct - name string -} - -// RegisterMessageSetType is called from the generated code. -func RegisterMessageSetType(m Message, fieldNum int32, name string) { - messageSetMap[fieldNum] = messageSetDesc{ - t: reflect.TypeOf(m), - name: name, - } -} diff --git a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go deleted file mode 100644 index fb512e2e..00000000 --- a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go +++ /dev/null @@ -1,484 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build appengine js - -// This file contains an implementation of proto field accesses using package reflect. -// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can -// be used on App Engine. - -package proto - -import ( - "math" - "reflect" -) - -// A structPointer is a pointer to a struct. -type structPointer struct { - v reflect.Value -} - -// toStructPointer returns a structPointer equivalent to the given reflect value. -// The reflect value must itself be a pointer to a struct. -func toStructPointer(v reflect.Value) structPointer { - return structPointer{v} -} - -// IsNil reports whether p is nil. -func structPointer_IsNil(p structPointer) bool { - return p.v.IsNil() -} - -// Interface returns the struct pointer as an interface value. -func structPointer_Interface(p structPointer, _ reflect.Type) interface{} { - return p.v.Interface() -} - -// A field identifies a field in a struct, accessible from a structPointer. -// In this implementation, a field is identified by the sequence of field indices -// passed to reflect's FieldByIndex. -type field []int - -// toField returns a field equivalent to the given reflect field. -func toField(f *reflect.StructField) field { - return f.Index -} - -// invalidField is an invalid field identifier. -var invalidField = field(nil) - -// IsValid reports whether the field identifier is valid. -func (f field) IsValid() bool { return f != nil } - -// field returns the given field in the struct as a reflect value. -func structPointer_field(p structPointer, f field) reflect.Value { - // Special case: an extension map entry with a value of type T - // passes a *T to the struct-handling code with a zero field, - // expecting that it will be treated as equivalent to *struct{ X T }, - // which has the same memory layout. We have to handle that case - // specially, because reflect will panic if we call FieldByIndex on a - // non-struct. - if f == nil { - return p.v.Elem() - } - - return p.v.Elem().FieldByIndex(f) -} - -// ifield returns the given field in the struct as an interface value. -func structPointer_ifield(p structPointer, f field) interface{} { - return structPointer_field(p, f).Addr().Interface() -} - -// Bytes returns the address of a []byte field in the struct. -func structPointer_Bytes(p structPointer, f field) *[]byte { - return structPointer_ifield(p, f).(*[]byte) -} - -// BytesSlice returns the address of a [][]byte field in the struct. -func structPointer_BytesSlice(p structPointer, f field) *[][]byte { - return structPointer_ifield(p, f).(*[][]byte) -} - -// Bool returns the address of a *bool field in the struct. -func structPointer_Bool(p structPointer, f field) **bool { - return structPointer_ifield(p, f).(**bool) -} - -// BoolVal returns the address of a bool field in the struct. -func structPointer_BoolVal(p structPointer, f field) *bool { - return structPointer_ifield(p, f).(*bool) -} - -// BoolSlice returns the address of a []bool field in the struct. -func structPointer_BoolSlice(p structPointer, f field) *[]bool { - return structPointer_ifield(p, f).(*[]bool) -} - -// String returns the address of a *string field in the struct. -func structPointer_String(p structPointer, f field) **string { - return structPointer_ifield(p, f).(**string) -} - -// StringVal returns the address of a string field in the struct. -func structPointer_StringVal(p structPointer, f field) *string { - return structPointer_ifield(p, f).(*string) -} - -// StringSlice returns the address of a []string field in the struct. -func structPointer_StringSlice(p structPointer, f field) *[]string { - return structPointer_ifield(p, f).(*[]string) -} - -// Extensions returns the address of an extension map field in the struct. -func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { - return structPointer_ifield(p, f).(*XXX_InternalExtensions) -} - -// ExtMap returns the address of an extension map field in the struct. -func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { - return structPointer_ifield(p, f).(*map[int32]Extension) -} - -// NewAt returns the reflect.Value for a pointer to a field in the struct. -func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { - return structPointer_field(p, f).Addr() -} - -// SetStructPointer writes a *struct field in the struct. -func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { - structPointer_field(p, f).Set(q.v) -} - -// GetStructPointer reads a *struct field in the struct. -func structPointer_GetStructPointer(p structPointer, f field) structPointer { - return structPointer{structPointer_field(p, f)} -} - -// StructPointerSlice the address of a []*struct field in the struct. -func structPointer_StructPointerSlice(p structPointer, f field) structPointerSlice { - return structPointerSlice{structPointer_field(p, f)} -} - -// A structPointerSlice represents the address of a slice of pointers to structs -// (themselves messages or groups). That is, v.Type() is *[]*struct{...}. -type structPointerSlice struct { - v reflect.Value -} - -func (p structPointerSlice) Len() int { return p.v.Len() } -func (p structPointerSlice) Index(i int) structPointer { return structPointer{p.v.Index(i)} } -func (p structPointerSlice) Append(q structPointer) { - p.v.Set(reflect.Append(p.v, q.v)) -} - -var ( - int32Type = reflect.TypeOf(int32(0)) - uint32Type = reflect.TypeOf(uint32(0)) - float32Type = reflect.TypeOf(float32(0)) - int64Type = reflect.TypeOf(int64(0)) - uint64Type = reflect.TypeOf(uint64(0)) - float64Type = reflect.TypeOf(float64(0)) -) - -// A word32 represents a field of type *int32, *uint32, *float32, or *enum. -// That is, v.Type() is *int32, *uint32, *float32, or *enum and v is assignable. -type word32 struct { - v reflect.Value -} - -// IsNil reports whether p is nil. -func word32_IsNil(p word32) bool { - return p.v.IsNil() -} - -// Set sets p to point at a newly allocated word with bits set to x. -func word32_Set(p word32, o *Buffer, x uint32) { - t := p.v.Type().Elem() - switch t { - case int32Type: - if len(o.int32s) == 0 { - o.int32s = make([]int32, uint32PoolSize) - } - o.int32s[0] = int32(x) - p.v.Set(reflect.ValueOf(&o.int32s[0])) - o.int32s = o.int32s[1:] - return - case uint32Type: - if len(o.uint32s) == 0 { - o.uint32s = make([]uint32, uint32PoolSize) - } - o.uint32s[0] = x - p.v.Set(reflect.ValueOf(&o.uint32s[0])) - o.uint32s = o.uint32s[1:] - return - case float32Type: - if len(o.float32s) == 0 { - o.float32s = make([]float32, uint32PoolSize) - } - o.float32s[0] = math.Float32frombits(x) - p.v.Set(reflect.ValueOf(&o.float32s[0])) - o.float32s = o.float32s[1:] - return - } - - // must be enum - p.v.Set(reflect.New(t)) - p.v.Elem().SetInt(int64(int32(x))) -} - -// Get gets the bits pointed at by p, as a uint32. -func word32_Get(p word32) uint32 { - elem := p.v.Elem() - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") -} - -// Word32 returns a reference to a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32(p structPointer, f field) word32 { - return word32{structPointer_field(p, f)} -} - -// A word32Val represents a field of type int32, uint32, float32, or enum. -// That is, v.Type() is int32, uint32, float32, or enum and v is assignable. -type word32Val struct { - v reflect.Value -} - -// Set sets *p to x. -func word32Val_Set(p word32Val, x uint32) { - switch p.v.Type() { - case int32Type: - p.v.SetInt(int64(x)) - return - case uint32Type: - p.v.SetUint(uint64(x)) - return - case float32Type: - p.v.SetFloat(float64(math.Float32frombits(x))) - return - } - - // must be enum - p.v.SetInt(int64(int32(x))) -} - -// Get gets the bits pointed at by p, as a uint32. -func word32Val_Get(p word32Val) uint32 { - elem := p.v - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") -} - -// Word32Val returns a reference to a int32, uint32, float32, or enum field in the struct. -func structPointer_Word32Val(p structPointer, f field) word32Val { - return word32Val{structPointer_field(p, f)} -} - -// A word32Slice is a slice of 32-bit values. -// That is, v.Type() is []int32, []uint32, []float32, or []enum. -type word32Slice struct { - v reflect.Value -} - -func (p word32Slice) Append(x uint32) { - n, m := p.v.Len(), p.v.Cap() - if n < m { - p.v.SetLen(n + 1) - } else { - t := p.v.Type().Elem() - p.v.Set(reflect.Append(p.v, reflect.Zero(t))) - } - elem := p.v.Index(n) - switch elem.Kind() { - case reflect.Int32: - elem.SetInt(int64(int32(x))) - case reflect.Uint32: - elem.SetUint(uint64(x)) - case reflect.Float32: - elem.SetFloat(float64(math.Float32frombits(x))) - } -} - -func (p word32Slice) Len() int { - return p.v.Len() -} - -func (p word32Slice) Index(i int) uint32 { - elem := p.v.Index(i) - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") -} - -// Word32Slice returns a reference to a []int32, []uint32, []float32, or []enum field in the struct. -func structPointer_Word32Slice(p structPointer, f field) word32Slice { - return word32Slice{structPointer_field(p, f)} -} - -// word64 is like word32 but for 64-bit values. -type word64 struct { - v reflect.Value -} - -func word64_Set(p word64, o *Buffer, x uint64) { - t := p.v.Type().Elem() - switch t { - case int64Type: - if len(o.int64s) == 0 { - o.int64s = make([]int64, uint64PoolSize) - } - o.int64s[0] = int64(x) - p.v.Set(reflect.ValueOf(&o.int64s[0])) - o.int64s = o.int64s[1:] - return - case uint64Type: - if len(o.uint64s) == 0 { - o.uint64s = make([]uint64, uint64PoolSize) - } - o.uint64s[0] = x - p.v.Set(reflect.ValueOf(&o.uint64s[0])) - o.uint64s = o.uint64s[1:] - return - case float64Type: - if len(o.float64s) == 0 { - o.float64s = make([]float64, uint64PoolSize) - } - o.float64s[0] = math.Float64frombits(x) - p.v.Set(reflect.ValueOf(&o.float64s[0])) - o.float64s = o.float64s[1:] - return - } - panic("unreachable") -} - -func word64_IsNil(p word64) bool { - return p.v.IsNil() -} - -func word64_Get(p word64) uint64 { - elem := p.v.Elem() - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return elem.Uint() - case reflect.Float64: - return math.Float64bits(elem.Float()) - } - panic("unreachable") -} - -func structPointer_Word64(p structPointer, f field) word64 { - return word64{structPointer_field(p, f)} -} - -// word64Val is like word32Val but for 64-bit values. -type word64Val struct { - v reflect.Value -} - -func word64Val_Set(p word64Val, o *Buffer, x uint64) { - switch p.v.Type() { - case int64Type: - p.v.SetInt(int64(x)) - return - case uint64Type: - p.v.SetUint(x) - return - case float64Type: - p.v.SetFloat(math.Float64frombits(x)) - return - } - panic("unreachable") -} - -func word64Val_Get(p word64Val) uint64 { - elem := p.v - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return elem.Uint() - case reflect.Float64: - return math.Float64bits(elem.Float()) - } - panic("unreachable") -} - -func structPointer_Word64Val(p structPointer, f field) word64Val { - return word64Val{structPointer_field(p, f)} -} - -type word64Slice struct { - v reflect.Value -} - -func (p word64Slice) Append(x uint64) { - n, m := p.v.Len(), p.v.Cap() - if n < m { - p.v.SetLen(n + 1) - } else { - t := p.v.Type().Elem() - p.v.Set(reflect.Append(p.v, reflect.Zero(t))) - } - elem := p.v.Index(n) - switch elem.Kind() { - case reflect.Int64: - elem.SetInt(int64(int64(x))) - case reflect.Uint64: - elem.SetUint(uint64(x)) - case reflect.Float64: - elem.SetFloat(float64(math.Float64frombits(x))) - } -} - -func (p word64Slice) Len() int { - return p.v.Len() -} - -func (p word64Slice) Index(i int) uint64 { - elem := p.v.Index(i) - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return uint64(elem.Uint()) - case reflect.Float64: - return math.Float64bits(float64(elem.Float())) - } - panic("unreachable") -} - -func structPointer_Word64Slice(p structPointer, f field) word64Slice { - return word64Slice{structPointer_field(p, f)} -} diff --git a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go b/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go deleted file mode 100644 index 6b5567d4..00000000 --- a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go +++ /dev/null @@ -1,270 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build !appengine,!js - -// This file contains the implementation of the proto field accesses using package unsafe. - -package proto - -import ( - "reflect" - "unsafe" -) - -// NOTE: These type_Foo functions would more idiomatically be methods, -// but Go does not allow methods on pointer types, and we must preserve -// some pointer type for the garbage collector. We use these -// funcs with clunky names as our poor approximation to methods. -// -// An alternative would be -// type structPointer struct { p unsafe.Pointer } -// but that does not registerize as well. - -// A structPointer is a pointer to a struct. -type structPointer unsafe.Pointer - -// toStructPointer returns a structPointer equivalent to the given reflect value. -func toStructPointer(v reflect.Value) structPointer { - return structPointer(unsafe.Pointer(v.Pointer())) -} - -// IsNil reports whether p is nil. -func structPointer_IsNil(p structPointer) bool { - return p == nil -} - -// Interface returns the struct pointer, assumed to have element type t, -// as an interface value. -func structPointer_Interface(p structPointer, t reflect.Type) interface{} { - return reflect.NewAt(t, unsafe.Pointer(p)).Interface() -} - -// A field identifies a field in a struct, accessible from a structPointer. -// In this implementation, a field is identified by its byte offset from the start of the struct. -type field uintptr - -// toField returns a field equivalent to the given reflect field. -func toField(f *reflect.StructField) field { - return field(f.Offset) -} - -// invalidField is an invalid field identifier. -const invalidField = ^field(0) - -// IsValid reports whether the field identifier is valid. -func (f field) IsValid() bool { - return f != ^field(0) -} - -// Bytes returns the address of a []byte field in the struct. -func structPointer_Bytes(p structPointer, f field) *[]byte { - return (*[]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// BytesSlice returns the address of a [][]byte field in the struct. -func structPointer_BytesSlice(p structPointer, f field) *[][]byte { - return (*[][]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// Bool returns the address of a *bool field in the struct. -func structPointer_Bool(p structPointer, f field) **bool { - return (**bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// BoolVal returns the address of a bool field in the struct. -func structPointer_BoolVal(p structPointer, f field) *bool { - return (*bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// BoolSlice returns the address of a []bool field in the struct. -func structPointer_BoolSlice(p structPointer, f field) *[]bool { - return (*[]bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// String returns the address of a *string field in the struct. -func structPointer_String(p structPointer, f field) **string { - return (**string)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// StringVal returns the address of a string field in the struct. -func structPointer_StringVal(p structPointer, f field) *string { - return (*string)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// StringSlice returns the address of a []string field in the struct. -func structPointer_StringSlice(p structPointer, f field) *[]string { - return (*[]string)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// ExtMap returns the address of an extension map field in the struct. -func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { - return (*XXX_InternalExtensions)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { - return (*map[int32]Extension)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// NewAt returns the reflect.Value for a pointer to a field in the struct. -func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { - return reflect.NewAt(typ, unsafe.Pointer(uintptr(p)+uintptr(f))) -} - -// SetStructPointer writes a *struct field in the struct. -func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { - *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) = q -} - -// GetStructPointer reads a *struct field in the struct. -func structPointer_GetStructPointer(p structPointer, f field) structPointer { - return *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// StructPointerSlice the address of a []*struct field in the struct. -func structPointer_StructPointerSlice(p structPointer, f field) *structPointerSlice { - return (*structPointerSlice)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// A structPointerSlice represents a slice of pointers to structs (themselves submessages or groups). -type structPointerSlice []structPointer - -func (v *structPointerSlice) Len() int { return len(*v) } -func (v *structPointerSlice) Index(i int) structPointer { return (*v)[i] } -func (v *structPointerSlice) Append(p structPointer) { *v = append(*v, p) } - -// A word32 is the address of a "pointer to 32-bit value" field. -type word32 **uint32 - -// IsNil reports whether *v is nil. -func word32_IsNil(p word32) bool { - return *p == nil -} - -// Set sets *v to point at a newly allocated word set to x. -func word32_Set(p word32, o *Buffer, x uint32) { - if len(o.uint32s) == 0 { - o.uint32s = make([]uint32, uint32PoolSize) - } - o.uint32s[0] = x - *p = &o.uint32s[0] - o.uint32s = o.uint32s[1:] -} - -// Get gets the value pointed at by *v. -func word32_Get(p word32) uint32 { - return **p -} - -// Word32 returns the address of a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32(p structPointer, f field) word32 { - return word32((**uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// A word32Val is the address of a 32-bit value field. -type word32Val *uint32 - -// Set sets *p to x. -func word32Val_Set(p word32Val, x uint32) { - *p = x -} - -// Get gets the value pointed at by p. -func word32Val_Get(p word32Val) uint32 { - return *p -} - -// Word32Val returns the address of a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32Val(p structPointer, f field) word32Val { - return word32Val((*uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// A word32Slice is a slice of 32-bit values. -type word32Slice []uint32 - -func (v *word32Slice) Append(x uint32) { *v = append(*v, x) } -func (v *word32Slice) Len() int { return len(*v) } -func (v *word32Slice) Index(i int) uint32 { return (*v)[i] } - -// Word32Slice returns the address of a []int32, []uint32, []float32, or []enum field in the struct. -func structPointer_Word32Slice(p structPointer, f field) *word32Slice { - return (*word32Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// word64 is like word32 but for 64-bit values. -type word64 **uint64 - -func word64_Set(p word64, o *Buffer, x uint64) { - if len(o.uint64s) == 0 { - o.uint64s = make([]uint64, uint64PoolSize) - } - o.uint64s[0] = x - *p = &o.uint64s[0] - o.uint64s = o.uint64s[1:] -} - -func word64_IsNil(p word64) bool { - return *p == nil -} - -func word64_Get(p word64) uint64 { - return **p -} - -func structPointer_Word64(p structPointer, f field) word64 { - return word64((**uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// word64Val is like word32Val but for 64-bit values. -type word64Val *uint64 - -func word64Val_Set(p word64Val, o *Buffer, x uint64) { - *p = x -} - -func word64Val_Get(p word64Val) uint64 { - return *p -} - -func structPointer_Word64Val(p structPointer, f field) word64Val { - return word64Val((*uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// word64Slice is like word32Slice but for 64-bit values. -type word64Slice []uint64 - -func (v *word64Slice) Append(x uint64) { *v = append(*v, x) } -func (v *word64Slice) Len() int { return len(*v) } -func (v *word64Slice) Index(i int) uint64 { return (*v)[i] } - -func structPointer_Word64Slice(p structPointer, f field) *word64Slice { - return (*word64Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go deleted file mode 100644 index ec2289c0..00000000 --- a/vendor/github.com/golang/protobuf/proto/properties.go +++ /dev/null @@ -1,872 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Routines for encoding data into the wire format for protocol buffers. - */ - -import ( - "fmt" - "log" - "os" - "reflect" - "sort" - "strconv" - "strings" - "sync" -) - -const debug bool = false - -// Constants that identify the encoding of a value on the wire. -const ( - WireVarint = 0 - WireFixed64 = 1 - WireBytes = 2 - WireStartGroup = 3 - WireEndGroup = 4 - WireFixed32 = 5 -) - -const startSize = 10 // initial slice/string sizes - -// Encoders are defined in encode.go -// An encoder outputs the full representation of a field, including its -// tag and encoder type. -type encoder func(p *Buffer, prop *Properties, base structPointer) error - -// A valueEncoder encodes a single integer in a particular encoding. -type valueEncoder func(o *Buffer, x uint64) error - -// Sizers are defined in encode.go -// A sizer returns the encoded size of a field, including its tag and encoder -// type. -type sizer func(prop *Properties, base structPointer) int - -// A valueSizer returns the encoded size of a single integer in a particular -// encoding. -type valueSizer func(x uint64) int - -// Decoders are defined in decode.go -// A decoder creates a value from its wire representation. -// Unrecognized subelements are saved in unrec. -type decoder func(p *Buffer, prop *Properties, base structPointer) error - -// A valueDecoder decodes a single integer in a particular encoding. -type valueDecoder func(o *Buffer) (x uint64, err error) - -// A oneofMarshaler does the marshaling for all oneof fields in a message. -type oneofMarshaler func(Message, *Buffer) error - -// A oneofUnmarshaler does the unmarshaling for a oneof field in a message. -type oneofUnmarshaler func(Message, int, int, *Buffer) (bool, error) - -// A oneofSizer does the sizing for all oneof fields in a message. -type oneofSizer func(Message) int - -// tagMap is an optimization over map[int]int for typical protocol buffer -// use-cases. Encoded protocol buffers are often in tag order with small tag -// numbers. -type tagMap struct { - fastTags []int - slowTags map[int]int -} - -// tagMapFastLimit is the upper bound on the tag number that will be stored in -// the tagMap slice rather than its map. -const tagMapFastLimit = 1024 - -func (p *tagMap) get(t int) (int, bool) { - if t > 0 && t < tagMapFastLimit { - if t >= len(p.fastTags) { - return 0, false - } - fi := p.fastTags[t] - return fi, fi >= 0 - } - fi, ok := p.slowTags[t] - return fi, ok -} - -func (p *tagMap) put(t int, fi int) { - if t > 0 && t < tagMapFastLimit { - for len(p.fastTags) < t+1 { - p.fastTags = append(p.fastTags, -1) - } - p.fastTags[t] = fi - return - } - if p.slowTags == nil { - p.slowTags = make(map[int]int) - } - p.slowTags[t] = fi -} - -// StructProperties represents properties for all the fields of a struct. -// decoderTags and decoderOrigNames should only be used by the decoder. -type StructProperties struct { - Prop []*Properties // properties for each field - reqCount int // required count - decoderTags tagMap // map from proto tag to struct field number - decoderOrigNames map[string]int // map from original name to struct field number - order []int // list of struct field numbers in tag order - unrecField field // field id of the XXX_unrecognized []byte field - extendable bool // is this an extendable proto - - oneofMarshaler oneofMarshaler - oneofUnmarshaler oneofUnmarshaler - oneofSizer oneofSizer - stype reflect.Type - - // OneofTypes contains information about the oneof fields in this message. - // It is keyed by the original name of a field. - OneofTypes map[string]*OneofProperties -} - -// OneofProperties represents information about a specific field in a oneof. -type OneofProperties struct { - Type reflect.Type // pointer to generated struct type for this oneof field - Field int // struct field number of the containing oneof in the message - Prop *Properties -} - -// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec. -// See encode.go, (*Buffer).enc_struct. - -func (sp *StructProperties) Len() int { return len(sp.order) } -func (sp *StructProperties) Less(i, j int) bool { - return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag -} -func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] } - -// Properties represents the protocol-specific behavior of a single struct field. -type Properties struct { - Name string // name of the field, for error messages - OrigName string // original name before protocol compiler (always set) - JSONName string // name to use for JSON; determined by protoc - Wire string - WireType int - Tag int - Required bool - Optional bool - Repeated bool - Packed bool // relevant for repeated primitives only - Enum string // set for enum types only - proto3 bool // whether this is known to be a proto3 field; set for []byte only - oneof bool // whether this is a oneof field - - Default string // default value - HasDefault bool // whether an explicit default was provided - def_uint64 uint64 - - enc encoder - valEnc valueEncoder // set for bool and numeric types only - field field - tagcode []byte // encoding of EncodeVarint((Tag<<3)|WireType) - tagbuf [8]byte - stype reflect.Type // set for struct types only - sprop *StructProperties // set for struct types only - isMarshaler bool - isUnmarshaler bool - - mtype reflect.Type // set for map types only - mkeyprop *Properties // set for map types only - mvalprop *Properties // set for map types only - - size sizer - valSize valueSizer // set for bool and numeric types only - - dec decoder - valDec valueDecoder // set for bool and numeric types only - - // If this is a packable field, this will be the decoder for the packed version of the field. - packedDec decoder -} - -// String formats the properties in the protobuf struct field tag style. -func (p *Properties) String() string { - s := p.Wire - s = "," - s += strconv.Itoa(p.Tag) - if p.Required { - s += ",req" - } - if p.Optional { - s += ",opt" - } - if p.Repeated { - s += ",rep" - } - if p.Packed { - s += ",packed" - } - s += ",name=" + p.OrigName - if p.JSONName != p.OrigName { - s += ",json=" + p.JSONName - } - if p.proto3 { - s += ",proto3" - } - if p.oneof { - s += ",oneof" - } - if len(p.Enum) > 0 { - s += ",enum=" + p.Enum - } - if p.HasDefault { - s += ",def=" + p.Default - } - return s -} - -// Parse populates p by parsing a string in the protobuf struct field tag style. -func (p *Properties) Parse(s string) { - // "bytes,49,opt,name=foo,def=hello!" - fields := strings.Split(s, ",") // breaks def=, but handled below. - if len(fields) < 2 { - fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) - return - } - - p.Wire = fields[0] - switch p.Wire { - case "varint": - p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeVarint - p.valDec = (*Buffer).DecodeVarint - p.valSize = sizeVarint - case "fixed32": - p.WireType = WireFixed32 - p.valEnc = (*Buffer).EncodeFixed32 - p.valDec = (*Buffer).DecodeFixed32 - p.valSize = sizeFixed32 - case "fixed64": - p.WireType = WireFixed64 - p.valEnc = (*Buffer).EncodeFixed64 - p.valDec = (*Buffer).DecodeFixed64 - p.valSize = sizeFixed64 - case "zigzag32": - p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeZigzag32 - p.valDec = (*Buffer).DecodeZigzag32 - p.valSize = sizeZigzag32 - case "zigzag64": - p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeZigzag64 - p.valDec = (*Buffer).DecodeZigzag64 - p.valSize = sizeZigzag64 - case "bytes", "group": - p.WireType = WireBytes - // no numeric converter for non-numeric types - default: - fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) - return - } - - var err error - p.Tag, err = strconv.Atoi(fields[1]) - if err != nil { - return - } - - for i := 2; i < len(fields); i++ { - f := fields[i] - switch { - case f == "req": - p.Required = true - case f == "opt": - p.Optional = true - case f == "rep": - p.Repeated = true - case f == "packed": - p.Packed = true - case strings.HasPrefix(f, "name="): - p.OrigName = f[5:] - case strings.HasPrefix(f, "json="): - p.JSONName = f[5:] - case strings.HasPrefix(f, "enum="): - p.Enum = f[5:] - case f == "proto3": - p.proto3 = true - case f == "oneof": - p.oneof = true - case strings.HasPrefix(f, "def="): - p.HasDefault = true - p.Default = f[4:] // rest of string - if i+1 < len(fields) { - // Commas aren't escaped, and def is always last. - p.Default += "," + strings.Join(fields[i+1:], ",") - break - } - } - } -} - -func logNoSliceEnc(t1, t2 reflect.Type) { - fmt.Fprintf(os.Stderr, "proto: no slice oenc for %T = []%T\n", t1, t2) -} - -var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() - -// Initialize the fields for encoding and decoding. -func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { - p.enc = nil - p.dec = nil - p.size = nil - - switch t1 := typ; t1.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no coders for %v\n", t1) - - // proto3 scalar types - - case reflect.Bool: - p.enc = (*Buffer).enc_proto3_bool - p.dec = (*Buffer).dec_proto3_bool - p.size = size_proto3_bool - case reflect.Int32: - p.enc = (*Buffer).enc_proto3_int32 - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_proto3_int32 - case reflect.Uint32: - p.enc = (*Buffer).enc_proto3_uint32 - p.dec = (*Buffer).dec_proto3_int32 // can reuse - p.size = size_proto3_uint32 - case reflect.Int64, reflect.Uint64: - p.enc = (*Buffer).enc_proto3_int64 - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_proto3_int64 - case reflect.Float32: - p.enc = (*Buffer).enc_proto3_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_proto3_uint32 - case reflect.Float64: - p.enc = (*Buffer).enc_proto3_int64 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_proto3_int64 - case reflect.String: - p.enc = (*Buffer).enc_proto3_string - p.dec = (*Buffer).dec_proto3_string - p.size = size_proto3_string - - case reflect.Ptr: - switch t2 := t1.Elem(); t2.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no encoder function for %v -> %v\n", t1, t2) - break - case reflect.Bool: - p.enc = (*Buffer).enc_bool - p.dec = (*Buffer).dec_bool - p.size = size_bool - case reflect.Int32: - p.enc = (*Buffer).enc_int32 - p.dec = (*Buffer).dec_int32 - p.size = size_int32 - case reflect.Uint32: - p.enc = (*Buffer).enc_uint32 - p.dec = (*Buffer).dec_int32 // can reuse - p.size = size_uint32 - case reflect.Int64, reflect.Uint64: - p.enc = (*Buffer).enc_int64 - p.dec = (*Buffer).dec_int64 - p.size = size_int64 - case reflect.Float32: - p.enc = (*Buffer).enc_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_int32 - p.size = size_uint32 - case reflect.Float64: - p.enc = (*Buffer).enc_int64 // can just treat them as bits - p.dec = (*Buffer).dec_int64 - p.size = size_int64 - case reflect.String: - p.enc = (*Buffer).enc_string - p.dec = (*Buffer).dec_string - p.size = size_string - case reflect.Struct: - p.stype = t1.Elem() - p.isMarshaler = isMarshaler(t1) - p.isUnmarshaler = isUnmarshaler(t1) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_struct_message - p.dec = (*Buffer).dec_struct_message - p.size = size_struct_message - } else { - p.enc = (*Buffer).enc_struct_group - p.dec = (*Buffer).dec_struct_group - p.size = size_struct_group - } - } - - case reflect.Slice: - switch t2 := t1.Elem(); t2.Kind() { - default: - logNoSliceEnc(t1, t2) - break - case reflect.Bool: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_bool - p.size = size_slice_packed_bool - } else { - p.enc = (*Buffer).enc_slice_bool - p.size = size_slice_bool - } - p.dec = (*Buffer).dec_slice_bool - p.packedDec = (*Buffer).dec_slice_packed_bool - case reflect.Int32: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int32 - p.size = size_slice_packed_int32 - } else { - p.enc = (*Buffer).enc_slice_int32 - p.size = size_slice_int32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case reflect.Uint32: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_uint32 - p.size = size_slice_packed_uint32 - } else { - p.enc = (*Buffer).enc_slice_uint32 - p.size = size_slice_uint32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case reflect.Int64, reflect.Uint64: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int64 - p.size = size_slice_packed_int64 - } else { - p.enc = (*Buffer).enc_slice_int64 - p.size = size_slice_int64 - } - p.dec = (*Buffer).dec_slice_int64 - p.packedDec = (*Buffer).dec_slice_packed_int64 - case reflect.Uint8: - p.dec = (*Buffer).dec_slice_byte - if p.proto3 { - p.enc = (*Buffer).enc_proto3_slice_byte - p.size = size_proto3_slice_byte - } else { - p.enc = (*Buffer).enc_slice_byte - p.size = size_slice_byte - } - case reflect.Float32, reflect.Float64: - switch t2.Bits() { - case 32: - // can just treat them as bits - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_uint32 - p.size = size_slice_packed_uint32 - } else { - p.enc = (*Buffer).enc_slice_uint32 - p.size = size_slice_uint32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case 64: - // can just treat them as bits - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int64 - p.size = size_slice_packed_int64 - } else { - p.enc = (*Buffer).enc_slice_int64 - p.size = size_slice_int64 - } - p.dec = (*Buffer).dec_slice_int64 - p.packedDec = (*Buffer).dec_slice_packed_int64 - default: - logNoSliceEnc(t1, t2) - break - } - case reflect.String: - p.enc = (*Buffer).enc_slice_string - p.dec = (*Buffer).dec_slice_string - p.size = size_slice_string - case reflect.Ptr: - switch t3 := t2.Elem(); t3.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T -> %T\n", t1, t2, t3) - break - case reflect.Struct: - p.stype = t2.Elem() - p.isMarshaler = isMarshaler(t2) - p.isUnmarshaler = isUnmarshaler(t2) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_slice_struct_message - p.dec = (*Buffer).dec_slice_struct_message - p.size = size_slice_struct_message - } else { - p.enc = (*Buffer).enc_slice_struct_group - p.dec = (*Buffer).dec_slice_struct_group - p.size = size_slice_struct_group - } - } - case reflect.Slice: - switch t2.Elem().Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no slice elem oenc for %T -> %T -> %T\n", t1, t2, t2.Elem()) - break - case reflect.Uint8: - p.enc = (*Buffer).enc_slice_slice_byte - p.dec = (*Buffer).dec_slice_slice_byte - p.size = size_slice_slice_byte - } - } - - case reflect.Map: - p.enc = (*Buffer).enc_new_map - p.dec = (*Buffer).dec_new_map - p.size = size_new_map - - p.mtype = t1 - p.mkeyprop = &Properties{} - p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) - p.mvalprop = &Properties{} - vtype := p.mtype.Elem() - if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { - // The value type is not a message (*T) or bytes ([]byte), - // so we need encoders for the pointer to this type. - vtype = reflect.PtrTo(vtype) - } - p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) - } - - // precalculate tag code - wire := p.WireType - if p.Packed { - wire = WireBytes - } - x := uint32(p.Tag)<<3 | uint32(wire) - i := 0 - for i = 0; x > 127; i++ { - p.tagbuf[i] = 0x80 | uint8(x&0x7F) - x >>= 7 - } - p.tagbuf[i] = uint8(x) - p.tagcode = p.tagbuf[0 : i+1] - - if p.stype != nil { - if lockGetProp { - p.sprop = GetProperties(p.stype) - } else { - p.sprop = getPropertiesLocked(p.stype) - } - } -} - -var ( - marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() - unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() -) - -// isMarshaler reports whether type t implements Marshaler. -func isMarshaler(t reflect.Type) bool { - // We're checking for (likely) pointer-receiver methods - // so if t is not a pointer, something is very wrong. - // The calls above only invoke isMarshaler on pointer types. - if t.Kind() != reflect.Ptr { - panic("proto: misuse of isMarshaler") - } - return t.Implements(marshalerType) -} - -// isUnmarshaler reports whether type t implements Unmarshaler. -func isUnmarshaler(t reflect.Type) bool { - // We're checking for (likely) pointer-receiver methods - // so if t is not a pointer, something is very wrong. - // The calls above only invoke isUnmarshaler on pointer types. - if t.Kind() != reflect.Ptr { - panic("proto: misuse of isUnmarshaler") - } - return t.Implements(unmarshalerType) -} - -// Init populates the properties from a protocol buffer struct tag. -func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { - p.init(typ, name, tag, f, true) -} - -func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) { - // "bytes,49,opt,def=hello!" - p.Name = name - p.OrigName = name - if f != nil { - p.field = toField(f) - } - if tag == "" { - return - } - p.Parse(tag) - p.setEncAndDec(typ, f, lockGetProp) -} - -var ( - propertiesMu sync.RWMutex - propertiesMap = make(map[reflect.Type]*StructProperties) -) - -// GetProperties returns the list of properties for the type represented by t. -// t must represent a generated struct type of a protocol message. -func GetProperties(t reflect.Type) *StructProperties { - if t.Kind() != reflect.Struct { - panic("proto: type must have kind struct") - } - - // Most calls to GetProperties in a long-running program will be - // retrieving details for types we have seen before. - propertiesMu.RLock() - sprop, ok := propertiesMap[t] - propertiesMu.RUnlock() - if ok { - if collectStats { - stats.Chit++ - } - return sprop - } - - propertiesMu.Lock() - sprop = getPropertiesLocked(t) - propertiesMu.Unlock() - return sprop -} - -// getPropertiesLocked requires that propertiesMu is held. -func getPropertiesLocked(t reflect.Type) *StructProperties { - if prop, ok := propertiesMap[t]; ok { - if collectStats { - stats.Chit++ - } - return prop - } - if collectStats { - stats.Cmiss++ - } - - prop := new(StructProperties) - // in case of recursive protos, fill this in now. - propertiesMap[t] = prop - - // build properties - prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) || - reflect.PtrTo(t).Implements(extendableProtoV1Type) - prop.unrecField = invalidField - prop.Prop = make([]*Properties, t.NumField()) - prop.order = make([]int, t.NumField()) - - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - p := new(Properties) - name := f.Name - p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) - - if f.Name == "XXX_InternalExtensions" { // special case - p.enc = (*Buffer).enc_exts - p.dec = nil // not needed - p.size = size_exts - } else if f.Name == "XXX_extensions" { // special case - p.enc = (*Buffer).enc_map - p.dec = nil // not needed - p.size = size_map - } else if f.Name == "XXX_unrecognized" { // special case - prop.unrecField = toField(&f) - } - oneof := f.Tag.Get("protobuf_oneof") // special case - if oneof != "" { - // Oneof fields don't use the traditional protobuf tag. - p.OrigName = oneof - } - prop.Prop[i] = p - prop.order[i] = i - if debug { - print(i, " ", f.Name, " ", t.String(), " ") - if p.Tag > 0 { - print(p.String()) - } - print("\n") - } - if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && oneof == "" { - fmt.Fprintln(os.Stderr, "proto: no encoder for", f.Name, f.Type.String(), "[GetProperties]") - } - } - - // Re-order prop.order. - sort.Sort(prop) - - type oneofMessage interface { - XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) - } - if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok { - var oots []interface{} - prop.oneofMarshaler, prop.oneofUnmarshaler, prop.oneofSizer, oots = om.XXX_OneofFuncs() - prop.stype = t - - // Interpret oneof metadata. - prop.OneofTypes = make(map[string]*OneofProperties) - for _, oot := range oots { - oop := &OneofProperties{ - Type: reflect.ValueOf(oot).Type(), // *T - Prop: new(Properties), - } - sft := oop.Type.Elem().Field(0) - oop.Prop.Name = sft.Name - oop.Prop.Parse(sft.Tag.Get("protobuf")) - // There will be exactly one interface field that - // this new value is assignable to. - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if f.Type.Kind() != reflect.Interface { - continue - } - if !oop.Type.AssignableTo(f.Type) { - continue - } - oop.Field = i - break - } - prop.OneofTypes[oop.Prop.OrigName] = oop - } - } - - // build required counts - // build tags - reqCount := 0 - prop.decoderOrigNames = make(map[string]int) - for i, p := range prop.Prop { - if strings.HasPrefix(p.Name, "XXX_") { - // Internal fields should not appear in tags/origNames maps. - // They are handled specially when encoding and decoding. - continue - } - if p.Required { - reqCount++ - } - prop.decoderTags.put(p.Tag, i) - prop.decoderOrigNames[p.OrigName] = i - } - prop.reqCount = reqCount - - return prop -} - -// Return the Properties object for the x[0]'th field of the structure. -func propByIndex(t reflect.Type, x []int) *Properties { - if len(x) != 1 { - fmt.Fprintf(os.Stderr, "proto: field index dimension %d (not 1) for type %s\n", len(x), t) - return nil - } - prop := GetProperties(t) - return prop.Prop[x[0]] -} - -// Get the address and type of a pointer to a struct from an interface. -func getbase(pb Message) (t reflect.Type, b structPointer, err error) { - if pb == nil { - err = ErrNil - return - } - // get the reflect type of the pointer to the struct. - t = reflect.TypeOf(pb) - // get the address of the struct. - value := reflect.ValueOf(pb) - b = toStructPointer(value) - return -} - -// A global registry of enum types. -// The generated code will register the generated maps by calling RegisterEnum. - -var enumValueMaps = make(map[string]map[string]int32) - -// RegisterEnum is called from the generated code to install the enum descriptor -// maps into the global table to aid parsing text format protocol buffers. -func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) { - if _, ok := enumValueMaps[typeName]; ok { - panic("proto: duplicate enum registered: " + typeName) - } - enumValueMaps[typeName] = valueMap -} - -// EnumValueMap returns the mapping from names to integers of the -// enum type enumType, or a nil if not found. -func EnumValueMap(enumType string) map[string]int32 { - return enumValueMaps[enumType] -} - -// A registry of all linked message types. -// The string is a fully-qualified proto name ("pkg.Message"). -var ( - protoTypes = make(map[string]reflect.Type) - revProtoTypes = make(map[reflect.Type]string) -) - -// RegisterType is called from generated code and maps from the fully qualified -// proto name to the type (pointer to struct) of the protocol buffer. -func RegisterType(x Message, name string) { - if _, ok := protoTypes[name]; ok { - // TODO: Some day, make this a panic. - log.Printf("proto: duplicate proto type registered: %s", name) - return - } - t := reflect.TypeOf(x) - protoTypes[name] = t - revProtoTypes[t] = name -} - -// MessageName returns the fully-qualified proto name for the given message type. -func MessageName(x Message) string { - type xname interface { - XXX_MessageName() string - } - if m, ok := x.(xname); ok { - return m.XXX_MessageName() - } - return revProtoTypes[reflect.TypeOf(x)] -} - -// MessageType returns the message type (pointer to struct) for a named message. -func MessageType(name string) reflect.Type { return protoTypes[name] } - -// A registry of all linked proto files. -var ( - protoFiles = make(map[string][]byte) // file name => fileDescriptor -) - -// RegisterFile is called from generated code and maps from the -// full file name of a .proto file to its compressed FileDescriptorProto. -func RegisterFile(filename string, fileDescriptor []byte) { - protoFiles[filename] = fileDescriptor -} - -// FileDescriptor returns the compressed FileDescriptorProto for a .proto file. -func FileDescriptor(filename string) []byte { return protoFiles[filename] } diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go deleted file mode 100644 index 965876bf..00000000 --- a/vendor/github.com/golang/protobuf/proto/text.go +++ /dev/null @@ -1,854 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -// Functions for writing the text protocol buffer format. - -import ( - "bufio" - "bytes" - "encoding" - "errors" - "fmt" - "io" - "log" - "math" - "reflect" - "sort" - "strings" -) - -var ( - newline = []byte("\n") - spaces = []byte(" ") - gtNewline = []byte(">\n") - endBraceNewline = []byte("}\n") - backslashN = []byte{'\\', 'n'} - backslashR = []byte{'\\', 'r'} - backslashT = []byte{'\\', 't'} - backslashDQ = []byte{'\\', '"'} - backslashBS = []byte{'\\', '\\'} - posInf = []byte("inf") - negInf = []byte("-inf") - nan = []byte("nan") -) - -type writer interface { - io.Writer - WriteByte(byte) error -} - -// textWriter is an io.Writer that tracks its indentation level. -type textWriter struct { - ind int - complete bool // if the current position is a complete line - compact bool // whether to write out as a one-liner - w writer -} - -func (w *textWriter) WriteString(s string) (n int, err error) { - if !strings.Contains(s, "\n") { - if !w.compact && w.complete { - w.writeIndent() - } - w.complete = false - return io.WriteString(w.w, s) - } - // WriteString is typically called without newlines, so this - // codepath and its copy are rare. We copy to avoid - // duplicating all of Write's logic here. - return w.Write([]byte(s)) -} - -func (w *textWriter) Write(p []byte) (n int, err error) { - newlines := bytes.Count(p, newline) - if newlines == 0 { - if !w.compact && w.complete { - w.writeIndent() - } - n, err = w.w.Write(p) - w.complete = false - return n, err - } - - frags := bytes.SplitN(p, newline, newlines+1) - if w.compact { - for i, frag := range frags { - if i > 0 { - if err := w.w.WriteByte(' '); err != nil { - return n, err - } - n++ - } - nn, err := w.w.Write(frag) - n += nn - if err != nil { - return n, err - } - } - return n, nil - } - - for i, frag := range frags { - if w.complete { - w.writeIndent() - } - nn, err := w.w.Write(frag) - n += nn - if err != nil { - return n, err - } - if i+1 < len(frags) { - if err := w.w.WriteByte('\n'); err != nil { - return n, err - } - n++ - } - } - w.complete = len(frags[len(frags)-1]) == 0 - return n, nil -} - -func (w *textWriter) WriteByte(c byte) error { - if w.compact && c == '\n' { - c = ' ' - } - if !w.compact && w.complete { - w.writeIndent() - } - err := w.w.WriteByte(c) - w.complete = c == '\n' - return err -} - -func (w *textWriter) indent() { w.ind++ } - -func (w *textWriter) unindent() { - if w.ind == 0 { - log.Print("proto: textWriter unindented too far") - return - } - w.ind-- -} - -func writeName(w *textWriter, props *Properties) error { - if _, err := w.WriteString(props.OrigName); err != nil { - return err - } - if props.Wire != "group" { - return w.WriteByte(':') - } - return nil -} - -// raw is the interface satisfied by RawMessage. -type raw interface { - Bytes() []byte -} - -func requiresQuotes(u string) bool { - // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. - for _, ch := range u { - switch { - case ch == '.' || ch == '/' || ch == '_': - continue - case '0' <= ch && ch <= '9': - continue - case 'A' <= ch && ch <= 'Z': - continue - case 'a' <= ch && ch <= 'z': - continue - default: - return true - } - } - return false -} - -// isAny reports whether sv is a google.protobuf.Any message -func isAny(sv reflect.Value) bool { - type wkt interface { - XXX_WellKnownType() string - } - t, ok := sv.Addr().Interface().(wkt) - return ok && t.XXX_WellKnownType() == "Any" -} - -// writeProto3Any writes an expanded google.protobuf.Any message. -// -// It returns (false, nil) if sv value can't be unmarshaled (e.g. because -// required messages are not linked in). -// -// It returns (true, error) when sv was written in expanded format or an error -// was encountered. -func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) { - turl := sv.FieldByName("TypeUrl") - val := sv.FieldByName("Value") - if !turl.IsValid() || !val.IsValid() { - return true, errors.New("proto: invalid google.protobuf.Any message") - } - - b, ok := val.Interface().([]byte) - if !ok { - return true, errors.New("proto: invalid google.protobuf.Any message") - } - - parts := strings.Split(turl.String(), "/") - mt := MessageType(parts[len(parts)-1]) - if mt == nil { - return false, nil - } - m := reflect.New(mt.Elem()) - if err := Unmarshal(b, m.Interface().(Message)); err != nil { - return false, nil - } - w.Write([]byte("[")) - u := turl.String() - if requiresQuotes(u) { - writeString(w, u) - } else { - w.Write([]byte(u)) - } - if w.compact { - w.Write([]byte("]:<")) - } else { - w.Write([]byte("]: <\n")) - w.ind++ - } - if err := tm.writeStruct(w, m.Elem()); err != nil { - return true, err - } - if w.compact { - w.Write([]byte("> ")) - } else { - w.ind-- - w.Write([]byte(">\n")) - } - return true, nil -} - -func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { - if tm.ExpandAny && isAny(sv) { - if canExpand, err := tm.writeProto3Any(w, sv); canExpand { - return err - } - } - st := sv.Type() - sprops := GetProperties(st) - for i := 0; i < sv.NumField(); i++ { - fv := sv.Field(i) - props := sprops.Prop[i] - name := st.Field(i).Name - - if strings.HasPrefix(name, "XXX_") { - // There are two XXX_ fields: - // XXX_unrecognized []byte - // XXX_extensions map[int32]proto.Extension - // The first is handled here; - // the second is handled at the bottom of this function. - if name == "XXX_unrecognized" && !fv.IsNil() { - if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil { - return err - } - } - continue - } - if fv.Kind() == reflect.Ptr && fv.IsNil() { - // Field not filled in. This could be an optional field or - // a required field that wasn't filled in. Either way, there - // isn't anything we can show for it. - continue - } - if fv.Kind() == reflect.Slice && fv.IsNil() { - // Repeated field that is empty, or a bytes field that is unused. - continue - } - - if props.Repeated && fv.Kind() == reflect.Slice { - // Repeated field. - for j := 0; j < fv.Len(); j++ { - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - v := fv.Index(j) - if v.Kind() == reflect.Ptr && v.IsNil() { - // A nil message in a repeated field is not valid, - // but we can handle that more gracefully than panicking. - if _, err := w.Write([]byte("\n")); err != nil { - return err - } - continue - } - if err := tm.writeAny(w, v, props); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - continue - } - if fv.Kind() == reflect.Map { - // Map fields are rendered as a repeated struct with key/value fields. - keys := fv.MapKeys() - sort.Sort(mapKeys(keys)) - for _, key := range keys { - val := fv.MapIndex(key) - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - // open struct - if err := w.WriteByte('<'); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - // key - if _, err := w.WriteString("key:"); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := tm.writeAny(w, key, props.mkeyprop); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - // nil values aren't legal, but we can avoid panicking because of them. - if val.Kind() != reflect.Ptr || !val.IsNil() { - // value - if _, err := w.WriteString("value:"); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := tm.writeAny(w, val, props.mvalprop); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - // close struct - w.unindent() - if err := w.WriteByte('>'); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - continue - } - if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 { - // empty bytes field - continue - } - if fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice { - // proto3 non-repeated scalar field; skip if zero value - if isProto3Zero(fv) { - continue - } - } - - if fv.Kind() == reflect.Interface { - // Check if it is a oneof. - if st.Field(i).Tag.Get("protobuf_oneof") != "" { - // fv is nil, or holds a pointer to generated struct. - // That generated struct has exactly one field, - // which has a protobuf struct tag. - if fv.IsNil() { - continue - } - inner := fv.Elem().Elem() // interface -> *T -> T - tag := inner.Type().Field(0).Tag.Get("protobuf") - props = new(Properties) // Overwrite the outer props var, but not its pointee. - props.Parse(tag) - // Write the value in the oneof, not the oneof itself. - fv = inner.Field(0) - - // Special case to cope with malformed messages gracefully: - // If the value in the oneof is a nil pointer, don't panic - // in writeAny. - if fv.Kind() == reflect.Ptr && fv.IsNil() { - // Use errors.New so writeAny won't render quotes. - msg := errors.New("/* nil */") - fv = reflect.ValueOf(&msg).Elem() - } - } - } - - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if b, ok := fv.Interface().(raw); ok { - if err := writeRaw(w, b.Bytes()); err != nil { - return err - } - continue - } - - // Enums have a String method, so writeAny will work fine. - if err := tm.writeAny(w, fv, props); err != nil { - return err - } - - if err := w.WriteByte('\n'); err != nil { - return err - } - } - - // Extensions (the XXX_extensions field). - pv := sv.Addr() - if _, ok := extendable(pv.Interface()); ok { - if err := tm.writeExtensions(w, pv); err != nil { - return err - } - } - - return nil -} - -// writeRaw writes an uninterpreted raw message. -func writeRaw(w *textWriter, b []byte) error { - if err := w.WriteByte('<'); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - if err := writeUnknownStruct(w, b); err != nil { - return err - } - w.unindent() - if err := w.WriteByte('>'); err != nil { - return err - } - return nil -} - -// writeAny writes an arbitrary field. -func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { - v = reflect.Indirect(v) - - // Floats have special cases. - if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { - x := v.Float() - var b []byte - switch { - case math.IsInf(x, 1): - b = posInf - case math.IsInf(x, -1): - b = negInf - case math.IsNaN(x): - b = nan - } - if b != nil { - _, err := w.Write(b) - return err - } - // Other values are handled below. - } - - // We don't attempt to serialise every possible value type; only those - // that can occur in protocol buffers. - switch v.Kind() { - case reflect.Slice: - // Should only be a []byte; repeated fields are handled in writeStruct. - if err := writeString(w, string(v.Bytes())); err != nil { - return err - } - case reflect.String: - if err := writeString(w, v.String()); err != nil { - return err - } - case reflect.Struct: - // Required/optional group/message. - var bra, ket byte = '<', '>' - if props != nil && props.Wire == "group" { - bra, ket = '{', '}' - } - if err := w.WriteByte(bra); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - if etm, ok := v.Interface().(encoding.TextMarshaler); ok { - text, err := etm.MarshalText() - if err != nil { - return err - } - if _, err = w.Write(text); err != nil { - return err - } - } else if err := tm.writeStruct(w, v); err != nil { - return err - } - w.unindent() - if err := w.WriteByte(ket); err != nil { - return err - } - default: - _, err := fmt.Fprint(w, v.Interface()) - return err - } - return nil -} - -// equivalent to C's isprint. -func isprint(c byte) bool { - return c >= 0x20 && c < 0x7f -} - -// writeString writes a string in the protocol buffer text format. -// It is similar to strconv.Quote except we don't use Go escape sequences, -// we treat the string as a byte sequence, and we use octal escapes. -// These differences are to maintain interoperability with the other -// languages' implementations of the text format. -func writeString(w *textWriter, s string) error { - // use WriteByte here to get any needed indent - if err := w.WriteByte('"'); err != nil { - return err - } - // Loop over the bytes, not the runes. - for i := 0; i < len(s); i++ { - var err error - // Divergence from C++: we don't escape apostrophes. - // There's no need to escape them, and the C++ parser - // copes with a naked apostrophe. - switch c := s[i]; c { - case '\n': - _, err = w.w.Write(backslashN) - case '\r': - _, err = w.w.Write(backslashR) - case '\t': - _, err = w.w.Write(backslashT) - case '"': - _, err = w.w.Write(backslashDQ) - case '\\': - _, err = w.w.Write(backslashBS) - default: - if isprint(c) { - err = w.w.WriteByte(c) - } else { - _, err = fmt.Fprintf(w.w, "\\%03o", c) - } - } - if err != nil { - return err - } - } - return w.WriteByte('"') -} - -func writeUnknownStruct(w *textWriter, data []byte) (err error) { - if !w.compact { - if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil { - return err - } - } - b := NewBuffer(data) - for b.index < len(b.buf) { - x, err := b.DecodeVarint() - if err != nil { - _, err := fmt.Fprintf(w, "/* %v */\n", err) - return err - } - wire, tag := x&7, x>>3 - if wire == WireEndGroup { - w.unindent() - if _, err := w.Write(endBraceNewline); err != nil { - return err - } - continue - } - if _, err := fmt.Fprint(w, tag); err != nil { - return err - } - if wire != WireStartGroup { - if err := w.WriteByte(':'); err != nil { - return err - } - } - if !w.compact || wire == WireStartGroup { - if err := w.WriteByte(' '); err != nil { - return err - } - } - switch wire { - case WireBytes: - buf, e := b.DecodeRawBytes(false) - if e == nil { - _, err = fmt.Fprintf(w, "%q", buf) - } else { - _, err = fmt.Fprintf(w, "/* %v */", e) - } - case WireFixed32: - x, err = b.DecodeFixed32() - err = writeUnknownInt(w, x, err) - case WireFixed64: - x, err = b.DecodeFixed64() - err = writeUnknownInt(w, x, err) - case WireStartGroup: - err = w.WriteByte('{') - w.indent() - case WireVarint: - x, err = b.DecodeVarint() - err = writeUnknownInt(w, x, err) - default: - _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire) - } - if err != nil { - return err - } - if err = w.WriteByte('\n'); err != nil { - return err - } - } - return nil -} - -func writeUnknownInt(w *textWriter, x uint64, err error) error { - if err == nil { - _, err = fmt.Fprint(w, x) - } else { - _, err = fmt.Fprintf(w, "/* %v */", err) - } - return err -} - -type int32Slice []int32 - -func (s int32Slice) Len() int { return len(s) } -func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } -func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// writeExtensions writes all the extensions in pv. -// pv is assumed to be a pointer to a protocol message struct that is extendable. -func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error { - emap := extensionMaps[pv.Type().Elem()] - ep, _ := extendable(pv.Interface()) - - // Order the extensions by ID. - // This isn't strictly necessary, but it will give us - // canonical output, which will also make testing easier. - m, mu := ep.extensionsRead() - if m == nil { - return nil - } - mu.Lock() - ids := make([]int32, 0, len(m)) - for id := range m { - ids = append(ids, id) - } - sort.Sort(int32Slice(ids)) - mu.Unlock() - - for _, extNum := range ids { - ext := m[extNum] - var desc *ExtensionDesc - if emap != nil { - desc = emap[extNum] - } - if desc == nil { - // Unknown extension. - if err := writeUnknownStruct(w, ext.enc); err != nil { - return err - } - continue - } - - pb, err := GetExtension(ep, desc) - if err != nil { - return fmt.Errorf("failed getting extension: %v", err) - } - - // Repeated extensions will appear as a slice. - if !desc.repeated() { - if err := tm.writeExtension(w, desc.Name, pb); err != nil { - return err - } - } else { - v := reflect.ValueOf(pb) - for i := 0; i < v.Len(); i++ { - if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { - return err - } - } - } - } - return nil -} - -func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error { - if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - return nil -} - -func (w *textWriter) writeIndent() { - if !w.complete { - return - } - remain := w.ind * 2 - for remain > 0 { - n := remain - if n > len(spaces) { - n = len(spaces) - } - w.w.Write(spaces[:n]) - remain -= n - } - w.complete = false -} - -// TextMarshaler is a configurable text format marshaler. -type TextMarshaler struct { - Compact bool // use compact text format (one line). - ExpandAny bool // expand google.protobuf.Any messages of known types -} - -// Marshal writes a given protocol buffer in text format. -// The only errors returned are from w. -func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error { - val := reflect.ValueOf(pb) - if pb == nil || val.IsNil() { - w.Write([]byte("")) - return nil - } - var bw *bufio.Writer - ww, ok := w.(writer) - if !ok { - bw = bufio.NewWriter(w) - ww = bw - } - aw := &textWriter{ - w: ww, - complete: true, - compact: tm.Compact, - } - - if etm, ok := pb.(encoding.TextMarshaler); ok { - text, err := etm.MarshalText() - if err != nil { - return err - } - if _, err = aw.Write(text); err != nil { - return err - } - if bw != nil { - return bw.Flush() - } - return nil - } - // Dereference the received pointer so we don't have outer < and >. - v := reflect.Indirect(val) - if err := tm.writeStruct(aw, v); err != nil { - return err - } - if bw != nil { - return bw.Flush() - } - return nil -} - -// Text is the same as Marshal, but returns the string directly. -func (tm *TextMarshaler) Text(pb Message) string { - var buf bytes.Buffer - tm.Marshal(&buf, pb) - return buf.String() -} - -var ( - defaultTextMarshaler = TextMarshaler{} - compactTextMarshaler = TextMarshaler{Compact: true} -) - -// TODO: consider removing some of the Marshal functions below. - -// MarshalText writes a given protocol buffer in text format. -// The only errors returned are from w. -func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) } - -// MarshalTextString is the same as MarshalText, but returns the string directly. -func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) } - -// CompactText writes a given protocol buffer in compact text format (one line). -func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) } - -// CompactTextString is the same as CompactText, but returns the string directly. -func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) } diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go deleted file mode 100644 index 5e14513f..00000000 --- a/vendor/github.com/golang/protobuf/proto/text_parser.go +++ /dev/null @@ -1,895 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -// Functions for parsing the Text protocol buffer format. -// TODO: message sets. - -import ( - "encoding" - "errors" - "fmt" - "reflect" - "strconv" - "strings" - "unicode/utf8" -) - -// Error string emitted when deserializing Any and fields are already set -const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set" - -type ParseError struct { - Message string - Line int // 1-based line number - Offset int // 0-based byte offset from start of input -} - -func (p *ParseError) Error() string { - if p.Line == 1 { - // show offset only for first line - return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message) - } - return fmt.Sprintf("line %d: %v", p.Line, p.Message) -} - -type token struct { - value string - err *ParseError - line int // line number - offset int // byte number from start of input, not start of line - unquoted string // the unquoted version of value, if it was a quoted string -} - -func (t *token) String() string { - if t.err == nil { - return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset) - } - return fmt.Sprintf("parse error: %v", t.err) -} - -type textParser struct { - s string // remaining input - done bool // whether the parsing is finished (success or error) - backed bool // whether back() was called - offset, line int - cur token -} - -func newTextParser(s string) *textParser { - p := new(textParser) - p.s = s - p.line = 1 - p.cur.line = 1 - return p -} - -func (p *textParser) errorf(format string, a ...interface{}) *ParseError { - pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} - p.cur.err = pe - p.done = true - return pe -} - -// Numbers and identifiers are matched by [-+._A-Za-z0-9] -func isIdentOrNumberChar(c byte) bool { - switch { - case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': - return true - case '0' <= c && c <= '9': - return true - } - switch c { - case '-', '+', '.', '_': - return true - } - return false -} - -func isWhitespace(c byte) bool { - switch c { - case ' ', '\t', '\n', '\r': - return true - } - return false -} - -func isQuote(c byte) bool { - switch c { - case '"', '\'': - return true - } - return false -} - -func (p *textParser) skipWhitespace() { - i := 0 - for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { - if p.s[i] == '#' { - // comment; skip to end of line or input - for i < len(p.s) && p.s[i] != '\n' { - i++ - } - if i == len(p.s) { - break - } - } - if p.s[i] == '\n' { - p.line++ - } - i++ - } - p.offset += i - p.s = p.s[i:len(p.s)] - if len(p.s) == 0 { - p.done = true - } -} - -func (p *textParser) advance() { - // Skip whitespace - p.skipWhitespace() - if p.done { - return - } - - // Start of non-whitespace - p.cur.err = nil - p.cur.offset, p.cur.line = p.offset, p.line - p.cur.unquoted = "" - switch p.s[0] { - case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': - // Single symbol - p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] - case '"', '\'': - // Quoted string - i := 1 - for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { - if p.s[i] == '\\' && i+1 < len(p.s) { - // skip escaped char - i++ - } - i++ - } - if i >= len(p.s) || p.s[i] != p.s[0] { - p.errorf("unmatched quote") - return - } - unq, err := unquoteC(p.s[1:i], rune(p.s[0])) - if err != nil { - p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) - return - } - p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] - p.cur.unquoted = unq - default: - i := 0 - for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { - i++ - } - if i == 0 { - p.errorf("unexpected byte %#x", p.s[0]) - return - } - p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] - } - p.offset += len(p.cur.value) -} - -var ( - errBadUTF8 = errors.New("proto: bad UTF-8") - errBadHex = errors.New("proto: bad hexadecimal") -) - -func unquoteC(s string, quote rune) (string, error) { - // This is based on C++'s tokenizer.cc. - // Despite its name, this is *not* parsing C syntax. - // For instance, "\0" is an invalid quoted string. - - // Avoid allocation in trivial cases. - simple := true - for _, r := range s { - if r == '\\' || r == quote { - simple = false - break - } - } - if simple { - return s, nil - } - - buf := make([]byte, 0, 3*len(s)/2) - for len(s) > 0 { - r, n := utf8.DecodeRuneInString(s) - if r == utf8.RuneError && n == 1 { - return "", errBadUTF8 - } - s = s[n:] - if r != '\\' { - if r < utf8.RuneSelf { - buf = append(buf, byte(r)) - } else { - buf = append(buf, string(r)...) - } - continue - } - - ch, tail, err := unescape(s) - if err != nil { - return "", err - } - buf = append(buf, ch...) - s = tail - } - return string(buf), nil -} - -func unescape(s string) (ch string, tail string, err error) { - r, n := utf8.DecodeRuneInString(s) - if r == utf8.RuneError && n == 1 { - return "", "", errBadUTF8 - } - s = s[n:] - switch r { - case 'a': - return "\a", s, nil - case 'b': - return "\b", s, nil - case 'f': - return "\f", s, nil - case 'n': - return "\n", s, nil - case 'r': - return "\r", s, nil - case 't': - return "\t", s, nil - case 'v': - return "\v", s, nil - case '?': - return "?", s, nil // trigraph workaround - case '\'', '"', '\\': - return string(r), s, nil - case '0', '1', '2', '3', '4', '5', '6', '7', 'x', 'X': - if len(s) < 2 { - return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) - } - base := 8 - ss := s[:2] - s = s[2:] - if r == 'x' || r == 'X' { - base = 16 - } else { - ss = string(r) + ss - } - i, err := strconv.ParseUint(ss, base, 8) - if err != nil { - return "", "", err - } - return string([]byte{byte(i)}), s, nil - case 'u', 'U': - n := 4 - if r == 'U' { - n = 8 - } - if len(s) < n { - return "", "", fmt.Errorf(`\%c requires %d digits`, r, n) - } - - bs := make([]byte, n/2) - for i := 0; i < n; i += 2 { - a, ok1 := unhex(s[i]) - b, ok2 := unhex(s[i+1]) - if !ok1 || !ok2 { - return "", "", errBadHex - } - bs[i/2] = a<<4 | b - } - s = s[n:] - return string(bs), s, nil - } - return "", "", fmt.Errorf(`unknown escape \%c`, r) -} - -// Adapted from src/pkg/strconv/quote.go. -func unhex(b byte) (v byte, ok bool) { - switch { - case '0' <= b && b <= '9': - return b - '0', true - case 'a' <= b && b <= 'f': - return b - 'a' + 10, true - case 'A' <= b && b <= 'F': - return b - 'A' + 10, true - } - return 0, false -} - -// Back off the parser by one token. Can only be done between calls to next(). -// It makes the next advance() a no-op. -func (p *textParser) back() { p.backed = true } - -// Advances the parser and returns the new current token. -func (p *textParser) next() *token { - if p.backed || p.done { - p.backed = false - return &p.cur - } - p.advance() - if p.done { - p.cur.value = "" - } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { - // Look for multiple quoted strings separated by whitespace, - // and concatenate them. - cat := p.cur - for { - p.skipWhitespace() - if p.done || !isQuote(p.s[0]) { - break - } - p.advance() - if p.cur.err != nil { - return &p.cur - } - cat.value += " " + p.cur.value - cat.unquoted += p.cur.unquoted - } - p.done = false // parser may have seen EOF, but we want to return cat - p.cur = cat - } - return &p.cur -} - -func (p *textParser) consumeToken(s string) error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != s { - p.back() - return p.errorf("expected %q, found %q", s, tok.value) - } - return nil -} - -// Return a RequiredNotSetError indicating which required field was not set. -func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError { - st := sv.Type() - sprops := GetProperties(st) - for i := 0; i < st.NumField(); i++ { - if !isNil(sv.Field(i)) { - continue - } - - props := sprops.Prop[i] - if props.Required { - return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)} - } - } - return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen -} - -// Returns the index in the struct for the named field, as well as the parsed tag properties. -func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) { - i, ok := sprops.decoderOrigNames[name] - if ok { - return i, sprops.Prop[i], true - } - return -1, nil, false -} - -// Consume a ':' from the input stream (if the next token is a colon), -// returning an error if a colon is needed but not present. -func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != ":" { - // Colon is optional when the field is a group or message. - needColon := true - switch props.Wire { - case "group": - needColon = false - case "bytes": - // A "bytes" field is either a message, a string, or a repeated field; - // those three become *T, *string and []T respectively, so we can check for - // this field being a pointer to a non-string. - if typ.Kind() == reflect.Ptr { - // *T or *string - if typ.Elem().Kind() == reflect.String { - break - } - } else if typ.Kind() == reflect.Slice { - // []T or []*T - if typ.Elem().Kind() != reflect.Ptr { - break - } - } else if typ.Kind() == reflect.String { - // The proto3 exception is for a string field, - // which requires a colon. - break - } - needColon = false - } - if needColon { - return p.errorf("expected ':', found %q", tok.value) - } - p.back() - } - return nil -} - -func (p *textParser) readStruct(sv reflect.Value, terminator string) error { - st := sv.Type() - sprops := GetProperties(st) - reqCount := sprops.reqCount - var reqFieldErr error - fieldSet := make(map[string]bool) - // A struct is a sequence of "name: value", terminated by one of - // '>' or '}', or the end of the input. A name may also be - // "[extension]" or "[type/url]". - // - // The whole struct can also be an expanded Any message, like: - // [type/url] < ... struct contents ... > - for { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == terminator { - break - } - if tok.value == "[" { - // Looks like an extension or an Any. - // - // TODO: Check whether we need to handle - // namespace rooted names (e.g. ".something.Foo"). - extName, err := p.consumeExtName() - if err != nil { - return err - } - - if s := strings.LastIndex(extName, "/"); s >= 0 { - // If it contains a slash, it's an Any type URL. - messageName := extName[s+1:] - mt := MessageType(messageName) - if mt == nil { - return p.errorf("unrecognized message %q in google.protobuf.Any", messageName) - } - tok = p.next() - if tok.err != nil { - return tok.err - } - // consume an optional colon - if tok.value == ":" { - tok = p.next() - if tok.err != nil { - return tok.err - } - } - var terminator string - switch tok.value { - case "<": - terminator = ">" - case "{": - terminator = "}" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - v := reflect.New(mt.Elem()) - if pe := p.readStruct(v.Elem(), terminator); pe != nil { - return pe - } - b, err := Marshal(v.Interface().(Message)) - if err != nil { - return p.errorf("failed to marshal message of type %q: %v", messageName, err) - } - if fieldSet["type_url"] { - return p.errorf(anyRepeatedlyUnpacked, "type_url") - } - if fieldSet["value"] { - return p.errorf(anyRepeatedlyUnpacked, "value") - } - sv.FieldByName("TypeUrl").SetString(extName) - sv.FieldByName("Value").SetBytes(b) - fieldSet["type_url"] = true - fieldSet["value"] = true - continue - } - - var desc *ExtensionDesc - // This could be faster, but it's functional. - // TODO: Do something smarter than a linear scan. - for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { - if d.Name == extName { - desc = d - break - } - } - if desc == nil { - return p.errorf("unrecognized extension %q", extName) - } - - props := &Properties{} - props.Parse(desc.Tag) - - typ := reflect.TypeOf(desc.ExtensionType) - if err := p.checkForColon(props, typ); err != nil { - return err - } - - rep := desc.repeated() - - // Read the extension structure, and set it in - // the value we're constructing. - var ext reflect.Value - if !rep { - ext = reflect.New(typ).Elem() - } else { - ext = reflect.New(typ.Elem()).Elem() - } - if err := p.readAny(ext, props); err != nil { - if _, ok := err.(*RequiredNotSetError); !ok { - return err - } - reqFieldErr = err - } - ep := sv.Addr().Interface().(Message) - if !rep { - SetExtension(ep, desc, ext.Interface()) - } else { - old, err := GetExtension(ep, desc) - var sl reflect.Value - if err == nil { - sl = reflect.ValueOf(old) // existing slice - } else { - sl = reflect.MakeSlice(typ, 0, 1) - } - sl = reflect.Append(sl, ext) - SetExtension(ep, desc, sl.Interface()) - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - continue - } - - // This is a normal, non-extension field. - name := tok.value - var dst reflect.Value - fi, props, ok := structFieldByName(sprops, name) - if ok { - dst = sv.Field(fi) - } else if oop, ok := sprops.OneofTypes[name]; ok { - // It is a oneof. - props = oop.Prop - nv := reflect.New(oop.Type.Elem()) - dst = nv.Elem().Field(0) - field := sv.Field(oop.Field) - if !field.IsNil() { - return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name) - } - field.Set(nv) - } - if !dst.IsValid() { - return p.errorf("unknown field name %q in %v", name, st) - } - - if dst.Kind() == reflect.Map { - // Consume any colon. - if err := p.checkForColon(props, dst.Type()); err != nil { - return err - } - - // Construct the map if it doesn't already exist. - if dst.IsNil() { - dst.Set(reflect.MakeMap(dst.Type())) - } - key := reflect.New(dst.Type().Key()).Elem() - val := reflect.New(dst.Type().Elem()).Elem() - - // The map entry should be this sequence of tokens: - // < key : KEY value : VALUE > - // However, implementations may omit key or value, and technically - // we should support them in any order. See b/28924776 for a time - // this went wrong. - - tok := p.next() - var terminator string - switch tok.value { - case "<": - terminator = ">" - case "{": - terminator = "}" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - for { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == terminator { - break - } - switch tok.value { - case "key": - if err := p.consumeToken(":"); err != nil { - return err - } - if err := p.readAny(key, props.mkeyprop); err != nil { - return err - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - case "value": - if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { - return err - } - if err := p.readAny(val, props.mvalprop); err != nil { - return err - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - default: - p.back() - return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value) - } - } - - dst.SetMapIndex(key, val) - continue - } - - // Check that it's not already set if it's not a repeated field. - if !props.Repeated && fieldSet[name] { - return p.errorf("non-repeated field %q was repeated", name) - } - - if err := p.checkForColon(props, dst.Type()); err != nil { - return err - } - - // Parse into the field. - fieldSet[name] = true - if err := p.readAny(dst, props); err != nil { - if _, ok := err.(*RequiredNotSetError); !ok { - return err - } - reqFieldErr = err - } - if props.Required { - reqCount-- - } - - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - - } - - if reqCount > 0 { - return p.missingRequiredFieldError(sv) - } - return reqFieldErr -} - -// consumeExtName consumes extension name or expanded Any type URL and the -// following ']'. It returns the name or URL consumed. -func (p *textParser) consumeExtName() (string, error) { - tok := p.next() - if tok.err != nil { - return "", tok.err - } - - // If extension name or type url is quoted, it's a single token. - if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { - name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) - if err != nil { - return "", err - } - return name, p.consumeToken("]") - } - - // Consume everything up to "]" - var parts []string - for tok.value != "]" { - parts = append(parts, tok.value) - tok = p.next() - if tok.err != nil { - return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) - } - } - return strings.Join(parts, ""), nil -} - -// consumeOptionalSeparator consumes an optional semicolon or comma. -// It is used in readStruct to provide backward compatibility. -func (p *textParser) consumeOptionalSeparator() error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != ";" && tok.value != "," { - p.back() - } - return nil -} - -func (p *textParser) readAny(v reflect.Value, props *Properties) error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == "" { - return p.errorf("unexpected EOF") - } - - switch fv := v; fv.Kind() { - case reflect.Slice: - at := v.Type() - if at.Elem().Kind() == reflect.Uint8 { - // Special case for []byte - if tok.value[0] != '"' && tok.value[0] != '\'' { - // Deliberately written out here, as the error after - // this switch statement would write "invalid []byte: ...", - // which is not as user-friendly. - return p.errorf("invalid string: %v", tok.value) - } - bytes := []byte(tok.unquoted) - fv.Set(reflect.ValueOf(bytes)) - return nil - } - // Repeated field. - if tok.value == "[" { - // Repeated field with list notation, like [1,2,3]. - for { - fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) - err := p.readAny(fv.Index(fv.Len()-1), props) - if err != nil { - return err - } - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == "]" { - break - } - if tok.value != "," { - return p.errorf("Expected ']' or ',' found %q", tok.value) - } - } - return nil - } - // One value of the repeated field. - p.back() - fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) - return p.readAny(fv.Index(fv.Len()-1), props) - case reflect.Bool: - // true/1/t/True or false/f/0/False. - switch tok.value { - case "true", "1", "t", "True": - fv.SetBool(true) - return nil - case "false", "0", "f", "False": - fv.SetBool(false) - return nil - } - case reflect.Float32, reflect.Float64: - v := tok.value - // Ignore 'f' for compatibility with output generated by C++, but don't - // remove 'f' when the value is "-inf" or "inf". - if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" { - v = v[:len(v)-1] - } - if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil { - fv.SetFloat(f) - return nil - } - case reflect.Int32: - if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { - fv.SetInt(x) - return nil - } - - if len(props.Enum) == 0 { - break - } - m, ok := enumValueMaps[props.Enum] - if !ok { - break - } - x, ok := m[tok.value] - if !ok { - break - } - fv.SetInt(int64(x)) - return nil - case reflect.Int64: - if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { - fv.SetInt(x) - return nil - } - - case reflect.Ptr: - // A basic field (indirected through pointer), or a repeated message/group - p.back() - fv.Set(reflect.New(fv.Type().Elem())) - return p.readAny(fv.Elem(), props) - case reflect.String: - if tok.value[0] == '"' || tok.value[0] == '\'' { - fv.SetString(tok.unquoted) - return nil - } - case reflect.Struct: - var terminator string - switch tok.value { - case "{": - terminator = "}" - case "<": - terminator = ">" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - // TODO: Handle nested messages which implement encoding.TextUnmarshaler. - return p.readStruct(fv, terminator) - case reflect.Uint32: - if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { - fv.SetUint(x) - return nil - } - case reflect.Uint64: - if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { - fv.SetUint(x) - return nil - } - } - return p.errorf("invalid %v: %v", v.Type(), tok.value) -} - -// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb -// before starting to unmarshal, so any existing data in pb is always removed. -// If a required field is not set and no other error occurs, -// UnmarshalText returns *RequiredNotSetError. -func UnmarshalText(s string, pb Message) error { - if um, ok := pb.(encoding.TextUnmarshaler); ok { - err := um.UnmarshalText([]byte(s)) - return err - } - pb.Reset() - v := reflect.ValueOf(pb) - if pe := newTextParser(s).readStruct(v.Elem(), ""); pe != nil { - return pe - } - return nil -} diff --git a/vendor/github.com/hashicorp/go-uuid/.travis.yml b/vendor/github.com/hashicorp/go-uuid/.travis.yml deleted file mode 100644 index 76984907..00000000 --- a/vendor/github.com/hashicorp/go-uuid/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: go - -sudo: false - -go: - - 1.4 - - 1.5 - - 1.6 - - tip - -script: - - go test -bench . -benchmem -v ./... diff --git a/vendor/github.com/hashicorp/go-uuid/LICENSE b/vendor/github.com/hashicorp/go-uuid/LICENSE deleted file mode 100644 index e87a115e..00000000 --- a/vendor/github.com/hashicorp/go-uuid/LICENSE +++ /dev/null @@ -1,363 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. - -1.6. "Executable Form" - - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. - -1.8. "License" - - means this document. - -1.9. "Licensable" - - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. - -1.10. "Modifications" - - means any of the following: - - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. "Patent Claims" of a Contributor - - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. - -1.12. "Secondary License" - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. "Source Code Form" - - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice - - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. - diff --git a/vendor/github.com/hashicorp/go-uuid/README.md b/vendor/github.com/hashicorp/go-uuid/README.md deleted file mode 100644 index fbde8b9a..00000000 --- a/vendor/github.com/hashicorp/go-uuid/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# uuid [![Build Status](https://travis-ci.org/hashicorp/go-uuid.svg?branch=master)](https://travis-ci.org/hashicorp/go-uuid) - -Generates UUID-format strings using high quality, _purely random_ bytes. It is **not** intended to be RFC compliant, merely to use a well-understood string representation of a 128-bit value. It can also parse UUID-format strings into their component bytes. - -Documentation -============= - -The full documentation is available on [Godoc](http://godoc.org/github.com/hashicorp/go-uuid). diff --git a/vendor/github.com/hashicorp/go-uuid/uuid.go b/vendor/github.com/hashicorp/go-uuid/uuid.go deleted file mode 100644 index ff9364c4..00000000 --- a/vendor/github.com/hashicorp/go-uuid/uuid.go +++ /dev/null @@ -1,65 +0,0 @@ -package uuid - -import ( - "crypto/rand" - "encoding/hex" - "fmt" -) - -// GenerateRandomBytes is used to generate random bytes of given size. -func GenerateRandomBytes(size int) ([]byte, error) { - buf := make([]byte, size) - if _, err := rand.Read(buf); err != nil { - return nil, fmt.Errorf("failed to read random bytes: %v", err) - } - return buf, nil -} - -// GenerateUUID is used to generate a random UUID -func GenerateUUID() (string, error) { - buf, err := GenerateRandomBytes(16) - if err != nil { - return "", err - } - return FormatUUID(buf) -} - -func FormatUUID(buf []byte) (string, error) { - if len(buf) != 16 { - return "", fmt.Errorf("wrong length byte slice (%d)", len(buf)) - } - - return fmt.Sprintf("%08x-%04x-%04x-%04x-%12x", - buf[0:4], - buf[4:6], - buf[6:8], - buf[8:10], - buf[10:16]), nil -} - -func ParseUUID(uuid string) ([]byte, error) { - if len(uuid) != 36 { - return nil, fmt.Errorf("uuid string is wrong length") - } - - hyph := []byte("-") - - if uuid[8] != hyph[0] || - uuid[13] != hyph[0] || - uuid[18] != hyph[0] || - uuid[23] != hyph[0] { - return nil, fmt.Errorf("uuid is improperly formatted") - } - - hexStr := uuid[0:8] + uuid[9:13] + uuid[14:18] + uuid[19:23] + uuid[24:36] - - ret, err := hex.DecodeString(hexStr) - if err != nil { - return nil, err - } - if len(ret) != 16 { - return nil, fmt.Errorf("decoded hex is the wrong length") - } - - return ret, nil -} diff --git a/vendor/github.com/jcmturner/gofork/LICENSE b/vendor/github.com/jcmturner/gofork/LICENSE deleted file mode 100644 index 6a66aea5..00000000 --- a/vendor/github.com/jcmturner/gofork/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/jcmturner/gofork/encoding/asn1/README.md b/vendor/github.com/jcmturner/gofork/encoding/asn1/README.md deleted file mode 100644 index 66a2a8cc..00000000 --- a/vendor/github.com/jcmturner/gofork/encoding/asn1/README.md +++ /dev/null @@ -1,5 +0,0 @@ -This is a temporary repository that will be removed when the issues below are fixed in the core golang code. - -## Issues -* [encoding/asn1: cannot marshal into a GeneralString](https://github.com/golang/go/issues/18832) -* [encoding/asn1: cannot marshal into slice of strings and pass stringtype parameter tags to members](https://github.com/golang/go/issues/18834) \ No newline at end of file diff --git a/vendor/github.com/jcmturner/gofork/encoding/asn1/asn1.go b/vendor/github.com/jcmturner/gofork/encoding/asn1/asn1.go deleted file mode 100644 index f1bb7671..00000000 --- a/vendor/github.com/jcmturner/gofork/encoding/asn1/asn1.go +++ /dev/null @@ -1,1003 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package asn1 implements parsing of DER-encoded ASN.1 data structures, -// as defined in ITU-T Rec X.690. -// -// See also ``A Layman's Guide to a Subset of ASN.1, BER, and DER,'' -// http://luca.ntop.org/Teaching/Appunti/asn1.html. -package asn1 - -// ASN.1 is a syntax for specifying abstract objects and BER, DER, PER, XER etc -// are different encoding formats for those objects. Here, we'll be dealing -// with DER, the Distinguished Encoding Rules. DER is used in X.509 because -// it's fast to parse and, unlike BER, has a unique encoding for every object. -// When calculating hashes over objects, it's important that the resulting -// bytes be the same at both ends and DER removes this margin of error. -// -// ASN.1 is very complex and this package doesn't attempt to implement -// everything by any means. - -import ( - "errors" - "fmt" - "math/big" - "reflect" - "strconv" - "time" - "unicode/utf8" -) - -// A StructuralError suggests that the ASN.1 data is valid, but the Go type -// which is receiving it doesn't match. -type StructuralError struct { - Msg string -} - -func (e StructuralError) Error() string { return "asn1: structure error: " + e.Msg } - -// A SyntaxError suggests that the ASN.1 data is invalid. -type SyntaxError struct { - Msg string -} - -func (e SyntaxError) Error() string { return "asn1: syntax error: " + e.Msg } - -// We start by dealing with each of the primitive types in turn. - -// BOOLEAN - -func parseBool(bytes []byte) (ret bool, err error) { - if len(bytes) != 1 { - err = SyntaxError{"invalid boolean"} - return - } - - // DER demands that "If the encoding represents the boolean value TRUE, - // its single contents octet shall have all eight bits set to one." - // Thus only 0 and 255 are valid encoded values. - switch bytes[0] { - case 0: - ret = false - case 0xff: - ret = true - default: - err = SyntaxError{"invalid boolean"} - } - - return -} - -// INTEGER - -// checkInteger returns nil if the given bytes are a valid DER-encoded -// INTEGER and an error otherwise. -func checkInteger(bytes []byte) error { - if len(bytes) == 0 { - return StructuralError{"empty integer"} - } - if len(bytes) == 1 { - return nil - } - if (bytes[0] == 0 && bytes[1]&0x80 == 0) || (bytes[0] == 0xff && bytes[1]&0x80 == 0x80) { - return StructuralError{"integer not minimally-encoded"} - } - return nil -} - -// parseInt64 treats the given bytes as a big-endian, signed integer and -// returns the result. -func parseInt64(bytes []byte) (ret int64, err error) { - err = checkInteger(bytes) - if err != nil { - return - } - if len(bytes) > 8 { - // We'll overflow an int64 in this case. - err = StructuralError{"integer too large"} - return - } - for bytesRead := 0; bytesRead < len(bytes); bytesRead++ { - ret <<= 8 - ret |= int64(bytes[bytesRead]) - } - - // Shift up and down in order to sign extend the result. - ret <<= 64 - uint8(len(bytes))*8 - ret >>= 64 - uint8(len(bytes))*8 - return -} - -// parseInt treats the given bytes as a big-endian, signed integer and returns -// the result. -func parseInt32(bytes []byte) (int32, error) { - if err := checkInteger(bytes); err != nil { - return 0, err - } - ret64, err := parseInt64(bytes) - if err != nil { - return 0, err - } - if ret64 != int64(int32(ret64)) { - return 0, StructuralError{"integer too large"} - } - return int32(ret64), nil -} - -var bigOne = big.NewInt(1) - -// parseBigInt treats the given bytes as a big-endian, signed integer and returns -// the result. -func parseBigInt(bytes []byte) (*big.Int, error) { - if err := checkInteger(bytes); err != nil { - return nil, err - } - ret := new(big.Int) - if len(bytes) > 0 && bytes[0]&0x80 == 0x80 { - // This is a negative number. - notBytes := make([]byte, len(bytes)) - for i := range notBytes { - notBytes[i] = ^bytes[i] - } - ret.SetBytes(notBytes) - ret.Add(ret, bigOne) - ret.Neg(ret) - return ret, nil - } - ret.SetBytes(bytes) - return ret, nil -} - -// BIT STRING - -// BitString is the structure to use when you want an ASN.1 BIT STRING type. A -// bit string is padded up to the nearest byte in memory and the number of -// valid bits is recorded. Padding bits will be zero. -type BitString struct { - Bytes []byte // bits packed into bytes. - BitLength int // length in bits. -} - -// At returns the bit at the given index. If the index is out of range it -// returns false. -func (b BitString) At(i int) int { - if i < 0 || i >= b.BitLength { - return 0 - } - x := i / 8 - y := 7 - uint(i%8) - return int(b.Bytes[x]>>y) & 1 -} - -// RightAlign returns a slice where the padding bits are at the beginning. The -// slice may share memory with the BitString. -func (b BitString) RightAlign() []byte { - shift := uint(8 - (b.BitLength % 8)) - if shift == 8 || len(b.Bytes) == 0 { - return b.Bytes - } - - a := make([]byte, len(b.Bytes)) - a[0] = b.Bytes[0] >> shift - for i := 1; i < len(b.Bytes); i++ { - a[i] = b.Bytes[i-1] << (8 - shift) - a[i] |= b.Bytes[i] >> shift - } - - return a -} - -// parseBitString parses an ASN.1 bit string from the given byte slice and returns it. -func parseBitString(bytes []byte) (ret BitString, err error) { - if len(bytes) == 0 { - err = SyntaxError{"zero length BIT STRING"} - return - } - paddingBits := int(bytes[0]) - if paddingBits > 7 || - len(bytes) == 1 && paddingBits > 0 || - bytes[len(bytes)-1]&((1< 0 { - s += "." - } - s += strconv.Itoa(v) - } - - return s -} - -// parseObjectIdentifier parses an OBJECT IDENTIFIER from the given bytes and -// returns it. An object identifier is a sequence of variable length integers -// that are assigned in a hierarchy. -func parseObjectIdentifier(bytes []byte) (s []int, err error) { - if len(bytes) == 0 { - err = SyntaxError{"zero length OBJECT IDENTIFIER"} - return - } - - // In the worst case, we get two elements from the first byte (which is - // encoded differently) and then every varint is a single byte long. - s = make([]int, len(bytes)+1) - - // The first varint is 40*value1 + value2: - // According to this packing, value1 can take the values 0, 1 and 2 only. - // When value1 = 0 or value1 = 1, then value2 is <= 39. When value1 = 2, - // then there are no restrictions on value2. - v, offset, err := parseBase128Int(bytes, 0) - if err != nil { - return - } - if v < 80 { - s[0] = v / 40 - s[1] = v % 40 - } else { - s[0] = 2 - s[1] = v - 80 - } - - i := 2 - for ; offset < len(bytes); i++ { - v, offset, err = parseBase128Int(bytes, offset) - if err != nil { - return - } - s[i] = v - } - s = s[0:i] - return -} - -// ENUMERATED - -// An Enumerated is represented as a plain int. -type Enumerated int - -// FLAG - -// A Flag accepts any data and is set to true if present. -type Flag bool - -// parseBase128Int parses a base-128 encoded int from the given offset in the -// given byte slice. It returns the value and the new offset. -func parseBase128Int(bytes []byte, initOffset int) (ret, offset int, err error) { - offset = initOffset - for shifted := 0; offset < len(bytes); shifted++ { - if shifted == 4 { - err = StructuralError{"base 128 integer too large"} - return - } - ret <<= 7 - b := bytes[offset] - ret |= int(b & 0x7f) - offset++ - if b&0x80 == 0 { - return - } - } - err = SyntaxError{"truncated base 128 integer"} - return -} - -// UTCTime - -func parseUTCTime(bytes []byte) (ret time.Time, err error) { - s := string(bytes) - - formatStr := "0601021504Z0700" - ret, err = time.Parse(formatStr, s) - if err != nil { - formatStr = "060102150405Z0700" - ret, err = time.Parse(formatStr, s) - } - if err != nil { - return - } - - if serialized := ret.Format(formatStr); serialized != s { - err = fmt.Errorf("asn1: time did not serialize back to the original value and may be invalid: given %q, but serialized as %q", s, serialized) - return - } - - if ret.Year() >= 2050 { - // UTCTime only encodes times prior to 2050. See https://tools.ietf.org/html/rfc5280#section-4.1.2.5.1 - ret = ret.AddDate(-100, 0, 0) - } - - return -} - -// parseGeneralizedTime parses the GeneralizedTime from the given byte slice -// and returns the resulting time. -func parseGeneralizedTime(bytes []byte) (ret time.Time, err error) { - const formatStr = "20060102150405Z0700" - s := string(bytes) - - if ret, err = time.Parse(formatStr, s); err != nil { - return - } - - if serialized := ret.Format(formatStr); serialized != s { - err = fmt.Errorf("asn1: time did not serialize back to the original value and may be invalid: given %q, but serialized as %q", s, serialized) - } - - return -} - -// PrintableString - -// parsePrintableString parses a ASN.1 PrintableString from the given byte -// array and returns it. -func parsePrintableString(bytes []byte) (ret string, err error) { - for _, b := range bytes { - if !isPrintable(b) { - err = SyntaxError{"PrintableString contains invalid character"} - return - } - } - ret = string(bytes) - return -} - -// isPrintable reports whether the given b is in the ASN.1 PrintableString set. -func isPrintable(b byte) bool { - return 'a' <= b && b <= 'z' || - 'A' <= b && b <= 'Z' || - '0' <= b && b <= '9' || - '\'' <= b && b <= ')' || - '+' <= b && b <= '/' || - b == ' ' || - b == ':' || - b == '=' || - b == '?' || - // This is technically not allowed in a PrintableString. - // However, x509 certificates with wildcard strings don't - // always use the correct string type so we permit it. - b == '*' -} - -// IA5String - -// parseIA5String parses a ASN.1 IA5String (ASCII string) from the given -// byte slice and returns it. -func parseIA5String(bytes []byte) (ret string, err error) { - for _, b := range bytes { - if b >= utf8.RuneSelf { - err = SyntaxError{"IA5String contains invalid character"} - return - } - } - ret = string(bytes) - return -} - -// T61String - -// parseT61String parses a ASN.1 T61String (8-bit clean string) from the given -// byte slice and returns it. -func parseT61String(bytes []byte) (ret string, err error) { - return string(bytes), nil -} - -// UTF8String - -// parseUTF8String parses a ASN.1 UTF8String (raw UTF-8) from the given byte -// array and returns it. -func parseUTF8String(bytes []byte) (ret string, err error) { - if !utf8.Valid(bytes) { - return "", errors.New("asn1: invalid UTF-8 string") - } - return string(bytes), nil -} - -// A RawValue represents an undecoded ASN.1 object. -type RawValue struct { - Class, Tag int - IsCompound bool - Bytes []byte - FullBytes []byte // includes the tag and length -} - -// RawContent is used to signal that the undecoded, DER data needs to be -// preserved for a struct. To use it, the first field of the struct must have -// this type. It's an error for any of the other fields to have this type. -type RawContent []byte - -// Tagging - -// parseTagAndLength parses an ASN.1 tag and length pair from the given offset -// into a byte slice. It returns the parsed data and the new offset. SET and -// SET OF (tag 17) are mapped to SEQUENCE and SEQUENCE OF (tag 16) since we -// don't distinguish between ordered and unordered objects in this code. -func parseTagAndLength(bytes []byte, initOffset int) (ret tagAndLength, offset int, err error) { - offset = initOffset - // parseTagAndLength should not be called without at least a single - // byte to read. Thus this check is for robustness: - if offset >= len(bytes) { - err = errors.New("asn1: internal error in parseTagAndLength") - return - } - b := bytes[offset] - offset++ - ret.class = int(b >> 6) - ret.isCompound = b&0x20 == 0x20 - ret.tag = int(b & 0x1f) - - // If the bottom five bits are set, then the tag number is actually base 128 - // encoded afterwards - if ret.tag == 0x1f { - ret.tag, offset, err = parseBase128Int(bytes, offset) - if err != nil { - return - } - // Tags should be encoded in minimal form. - if ret.tag < 0x1f { - err = SyntaxError{"non-minimal tag"} - return - } - } - if offset >= len(bytes) { - err = SyntaxError{"truncated tag or length"} - return - } - b = bytes[offset] - offset++ - if b&0x80 == 0 { - // The length is encoded in the bottom 7 bits. - ret.length = int(b & 0x7f) - } else { - // Bottom 7 bits give the number of length bytes to follow. - numBytes := int(b & 0x7f) - if numBytes == 0 { - err = SyntaxError{"indefinite length found (not DER)"} - return - } - ret.length = 0 - for i := 0; i < numBytes; i++ { - if offset >= len(bytes) { - err = SyntaxError{"truncated tag or length"} - return - } - b = bytes[offset] - offset++ - if ret.length >= 1<<23 { - // We can't shift ret.length up without - // overflowing. - err = StructuralError{"length too large"} - return - } - ret.length <<= 8 - ret.length |= int(b) - if ret.length == 0 { - // DER requires that lengths be minimal. - err = StructuralError{"superfluous leading zeros in length"} - return - } - } - // Short lengths must be encoded in short form. - if ret.length < 0x80 { - err = StructuralError{"non-minimal length"} - return - } - } - - return -} - -// parseSequenceOf is used for SEQUENCE OF and SET OF values. It tries to parse -// a number of ASN.1 values from the given byte slice and returns them as a -// slice of Go values of the given type. -func parseSequenceOf(bytes []byte, sliceType reflect.Type, elemType reflect.Type) (ret reflect.Value, err error) { - expectedTag, compoundType, ok := getUniversalType(elemType) - if !ok { - err = StructuralError{"unknown Go type for slice"} - return - } - - // First we iterate over the input and count the number of elements, - // checking that the types are correct in each case. - numElements := 0 - for offset := 0; offset < len(bytes); { - var t tagAndLength - t, offset, err = parseTagAndLength(bytes, offset) - if err != nil { - return - } - switch t.tag { - case TagIA5String, TagGeneralString, TagT61String, TagUTF8String: - // We pretend that various other string types are - // PRINTABLE STRINGs so that a sequence of them can be - // parsed into a []string. - t.tag = TagPrintableString - case TagGeneralizedTime, TagUTCTime: - // Likewise, both time types are treated the same. - t.tag = TagUTCTime - } - - if t.class != ClassUniversal || t.isCompound != compoundType || t.tag != expectedTag { - err = StructuralError{"sequence tag mismatch"} - return - } - if invalidLength(offset, t.length, len(bytes)) { - err = SyntaxError{"truncated sequence"} - return - } - offset += t.length - numElements++ - } - ret = reflect.MakeSlice(sliceType, numElements, numElements) - params := fieldParameters{} - offset := 0 - for i := 0; i < numElements; i++ { - offset, err = parseField(ret.Index(i), bytes, offset, params) - if err != nil { - return - } - } - return -} - -var ( - bitStringType = reflect.TypeOf(BitString{}) - objectIdentifierType = reflect.TypeOf(ObjectIdentifier{}) - enumeratedType = reflect.TypeOf(Enumerated(0)) - flagType = reflect.TypeOf(Flag(false)) - timeType = reflect.TypeOf(time.Time{}) - rawValueType = reflect.TypeOf(RawValue{}) - rawContentsType = reflect.TypeOf(RawContent(nil)) - bigIntType = reflect.TypeOf(new(big.Int)) -) - -// invalidLength returns true iff offset + length > sliceLength, or if the -// addition would overflow. -func invalidLength(offset, length, sliceLength int) bool { - return offset+length < offset || offset+length > sliceLength -} - -// parseField is the main parsing function. Given a byte slice and an offset -// into the array, it will try to parse a suitable ASN.1 value out and store it -// in the given Value. -func parseField(v reflect.Value, bytes []byte, initOffset int, params fieldParameters) (offset int, err error) { - offset = initOffset - fieldType := v.Type() - - // If we have run out of data, it may be that there are optional elements at the end. - if offset == len(bytes) { - if !setDefaultValue(v, params) { - err = SyntaxError{"sequence truncated"} - } - return - } - - // Deal with raw values. - if fieldType == rawValueType { - var t tagAndLength - t, offset, err = parseTagAndLength(bytes, offset) - if err != nil { - return - } - if invalidLength(offset, t.length, len(bytes)) { - err = SyntaxError{"data truncated"} - return - } - result := RawValue{t.class, t.tag, t.isCompound, bytes[offset : offset+t.length], bytes[initOffset : offset+t.length]} - offset += t.length - v.Set(reflect.ValueOf(result)) - return - } - - // Deal with the ANY type. - if ifaceType := fieldType; ifaceType.Kind() == reflect.Interface && ifaceType.NumMethod() == 0 { - var t tagAndLength - t, offset, err = parseTagAndLength(bytes, offset) - if err != nil { - return - } - if invalidLength(offset, t.length, len(bytes)) { - err = SyntaxError{"data truncated"} - return - } - var result interface{} - if !t.isCompound && t.class == ClassUniversal { - innerBytes := bytes[offset : offset+t.length] - switch t.tag { - case TagPrintableString: - result, err = parsePrintableString(innerBytes) - case TagIA5String: - result, err = parseIA5String(innerBytes) - // jtasn1 addition of following case - case TagGeneralString: - result, err = parseIA5String(innerBytes) - case TagT61String: - result, err = parseT61String(innerBytes) - case TagUTF8String: - result, err = parseUTF8String(innerBytes) - case TagInteger: - result, err = parseInt64(innerBytes) - case TagBitString: - result, err = parseBitString(innerBytes) - case TagOID: - result, err = parseObjectIdentifier(innerBytes) - case TagUTCTime: - result, err = parseUTCTime(innerBytes) - case TagGeneralizedTime: - result, err = parseGeneralizedTime(innerBytes) - case TagOctetString: - result = innerBytes - default: - // If we don't know how to handle the type, we just leave Value as nil. - } - } - offset += t.length - if err != nil { - return - } - if result != nil { - v.Set(reflect.ValueOf(result)) - } - return - } - universalTag, compoundType, ok1 := getUniversalType(fieldType) - if !ok1 { - err = StructuralError{fmt.Sprintf("unknown Go type: %v", fieldType)} - return - } - - t, offset, err := parseTagAndLength(bytes, offset) - if err != nil { - return - } - if params.explicit { - expectedClass := ClassContextSpecific - if params.application { - expectedClass = ClassApplication - } - if offset == len(bytes) { - err = StructuralError{"explicit tag has no child"} - return - } - if t.class == expectedClass && t.tag == *params.tag && (t.length == 0 || t.isCompound) { - if t.length > 0 { - t, offset, err = parseTagAndLength(bytes, offset) - if err != nil { - return - } - } else { - if fieldType != flagType { - err = StructuralError{"zero length explicit tag was not an asn1.Flag"} - return - } - v.SetBool(true) - return - } - } else { - // The tags didn't match, it might be an optional element. - ok := setDefaultValue(v, params) - if ok { - offset = initOffset - } else { - err = StructuralError{"explicitly tagged member didn't match"} - } - return - } - } - - // Special case for strings: all the ASN.1 string types map to the Go - // type string. getUniversalType returns the tag for PrintableString - // when it sees a string, so if we see a different string type on the - // wire, we change the universal type to match. - if universalTag == TagPrintableString { - if t.class == ClassUniversal { - switch t.tag { - case TagIA5String, TagGeneralString, TagT61String, TagUTF8String: - universalTag = t.tag - } - } else if params.stringType != 0 { - universalTag = params.stringType - } - } - - // Special case for time: UTCTime and GeneralizedTime both map to the - // Go type time.Time. - if universalTag == TagUTCTime && t.tag == TagGeneralizedTime && t.class == ClassUniversal { - universalTag = TagGeneralizedTime - } - - if params.set { - universalTag = TagSet - } - - expectedClass := ClassUniversal - expectedTag := universalTag - - if !params.explicit && params.tag != nil { - expectedClass = ClassContextSpecific - expectedTag = *params.tag - } - - if !params.explicit && params.application && params.tag != nil { - expectedClass = ClassApplication - expectedTag = *params.tag - } - - // We have unwrapped any explicit tagging at this point. - if t.class != expectedClass || t.tag != expectedTag || t.isCompound != compoundType { - // Tags don't match. Again, it could be an optional element. - ok := setDefaultValue(v, params) - if ok { - offset = initOffset - } else { - err = StructuralError{fmt.Sprintf("tags don't match (%d vs %+v) %+v %s @%d", expectedTag, t, params, fieldType.Name(), offset)} - } - return - } - if invalidLength(offset, t.length, len(bytes)) { - err = SyntaxError{"data truncated"} - return - } - innerBytes := bytes[offset : offset+t.length] - offset += t.length - - // We deal with the structures defined in this package first. - switch fieldType { - case objectIdentifierType: - newSlice, err1 := parseObjectIdentifier(innerBytes) - v.Set(reflect.MakeSlice(v.Type(), len(newSlice), len(newSlice))) - if err1 == nil { - reflect.Copy(v, reflect.ValueOf(newSlice)) - } - err = err1 - return - case bitStringType: - bs, err1 := parseBitString(innerBytes) - if err1 == nil { - v.Set(reflect.ValueOf(bs)) - } - err = err1 - return - case timeType: - var time time.Time - var err1 error - if universalTag == TagUTCTime { - time, err1 = parseUTCTime(innerBytes) - } else { - time, err1 = parseGeneralizedTime(innerBytes) - } - if err1 == nil { - v.Set(reflect.ValueOf(time)) - } - err = err1 - return - case enumeratedType: - parsedInt, err1 := parseInt32(innerBytes) - if err1 == nil { - v.SetInt(int64(parsedInt)) - } - err = err1 - return - case flagType: - v.SetBool(true) - return - case bigIntType: - parsedInt, err1 := parseBigInt(innerBytes) - if err1 == nil { - v.Set(reflect.ValueOf(parsedInt)) - } - err = err1 - return - } - switch val := v; val.Kind() { - case reflect.Bool: - parsedBool, err1 := parseBool(innerBytes) - if err1 == nil { - val.SetBool(parsedBool) - } - err = err1 - return - case reflect.Int, reflect.Int32, reflect.Int64: - if val.Type().Size() == 4 { - parsedInt, err1 := parseInt32(innerBytes) - if err1 == nil { - val.SetInt(int64(parsedInt)) - } - err = err1 - } else { - parsedInt, err1 := parseInt64(innerBytes) - if err1 == nil { - val.SetInt(parsedInt) - } - err = err1 - } - return - // TODO(dfc) Add support for the remaining integer types - case reflect.Struct: - structType := fieldType - - if structType.NumField() > 0 && - structType.Field(0).Type == rawContentsType { - bytes := bytes[initOffset:offset] - val.Field(0).Set(reflect.ValueOf(RawContent(bytes))) - } - - innerOffset := 0 - for i := 0; i < structType.NumField(); i++ { - field := structType.Field(i) - if i == 0 && field.Type == rawContentsType { - continue - } - innerOffset, err = parseField(val.Field(i), innerBytes, innerOffset, parseFieldParameters(field.Tag.Get("asn1"))) - if err != nil { - return - } - } - // We allow extra bytes at the end of the SEQUENCE because - // adding elements to the end has been used in X.509 as the - // version numbers have increased. - return - case reflect.Slice: - sliceType := fieldType - if sliceType.Elem().Kind() == reflect.Uint8 { - val.Set(reflect.MakeSlice(sliceType, len(innerBytes), len(innerBytes))) - reflect.Copy(val, reflect.ValueOf(innerBytes)) - return - } - newSlice, err1 := parseSequenceOf(innerBytes, sliceType, sliceType.Elem()) - if err1 == nil { - val.Set(newSlice) - } - err = err1 - return - case reflect.String: - var v string - switch universalTag { - case TagPrintableString: - v, err = parsePrintableString(innerBytes) - case TagIA5String: - v, err = parseIA5String(innerBytes) - case TagT61String: - v, err = parseT61String(innerBytes) - case TagUTF8String: - v, err = parseUTF8String(innerBytes) - case TagGeneralString: - // GeneralString is specified in ISO-2022/ECMA-35, - // A brief review suggests that it includes structures - // that allow the encoding to change midstring and - // such. We give up and pass it as an 8-bit string. - v, err = parseT61String(innerBytes) - default: - err = SyntaxError{fmt.Sprintf("internal error: unknown string type %d", universalTag)} - } - if err == nil { - val.SetString(v) - } - return - } - err = StructuralError{"unsupported: " + v.Type().String()} - return -} - -// canHaveDefaultValue reports whether k is a Kind that we will set a default -// value for. (A signed integer, essentially.) -func canHaveDefaultValue(k reflect.Kind) bool { - switch k { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return true - } - - return false -} - -// setDefaultValue is used to install a default value, from a tag string, into -// a Value. It is successful if the field was optional, even if a default value -// wasn't provided or it failed to install it into the Value. -func setDefaultValue(v reflect.Value, params fieldParameters) (ok bool) { - if !params.optional { - return - } - ok = true - if params.defaultValue == nil { - return - } - if canHaveDefaultValue(v.Kind()) { - v.SetInt(*params.defaultValue) - } - return -} - -// Unmarshal parses the DER-encoded ASN.1 data structure b -// and uses the reflect package to fill in an arbitrary value pointed at by val. -// Because Unmarshal uses the reflect package, the structs -// being written to must use upper case field names. -// -// An ASN.1 INTEGER can be written to an int, int32, int64, -// or *big.Int (from the math/big package). -// If the encoded value does not fit in the Go type, -// Unmarshal returns a parse error. -// -// An ASN.1 BIT STRING can be written to a BitString. -// -// An ASN.1 OCTET STRING can be written to a []byte. -// -// An ASN.1 OBJECT IDENTIFIER can be written to an -// ObjectIdentifier. -// -// An ASN.1 ENUMERATED can be written to an Enumerated. -// -// An ASN.1 UTCTIME or GENERALIZEDTIME can be written to a time.Time. -// -// An ASN.1 PrintableString or IA5String can be written to a string. -// -// Any of the above ASN.1 values can be written to an interface{}. -// The value stored in the interface has the corresponding Go type. -// For integers, that type is int64. -// -// An ASN.1 SEQUENCE OF x or SET OF x can be written -// to a slice if an x can be written to the slice's element type. -// -// An ASN.1 SEQUENCE or SET can be written to a struct -// if each of the elements in the sequence can be -// written to the corresponding element in the struct. -// -// The following tags on struct fields have special meaning to Unmarshal: -// -// application specifies that a APPLICATION tag is used -// default:x sets the default value for optional integer fields -// explicit specifies that an additional, explicit tag wraps the implicit one -// optional marks the field as ASN.1 OPTIONAL -// set causes a SET, rather than a SEQUENCE type to be expected -// tag:x specifies the ASN.1 tag number; implies ASN.1 CONTEXT SPECIFIC -// -// If the type of the first field of a structure is RawContent then the raw -// ASN1 contents of the struct will be stored in it. -// -// If the type name of a slice element ends with "SET" then it's treated as if -// the "set" tag was set on it. This can be used with nested slices where a -// struct tag cannot be given. -// -// Other ASN.1 types are not supported; if it encounters them, -// Unmarshal returns a parse error. -func Unmarshal(b []byte, val interface{}) (rest []byte, err error) { - return UnmarshalWithParams(b, val, "") -} - -// UnmarshalWithParams allows field parameters to be specified for the -// top-level element. The form of the params is the same as the field tags. -func UnmarshalWithParams(b []byte, val interface{}, params string) (rest []byte, err error) { - v := reflect.ValueOf(val).Elem() - offset, err := parseField(v, b, 0, parseFieldParameters(params)) - if err != nil { - return nil, err - } - return b[offset:], nil -} diff --git a/vendor/github.com/jcmturner/gofork/encoding/asn1/common.go b/vendor/github.com/jcmturner/gofork/encoding/asn1/common.go deleted file mode 100644 index 7a9da49f..00000000 --- a/vendor/github.com/jcmturner/gofork/encoding/asn1/common.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package asn1 - -import ( - "reflect" - "strconv" - "strings" -) - -// ASN.1 objects have metadata preceding them: -// the tag: the type of the object -// a flag denoting if this object is compound or not -// the class type: the namespace of the tag -// the length of the object, in bytes - -// Here are some standard tags and classes - -// ASN.1 tags represent the type of the following object. -const ( - TagBoolean = 1 - TagInteger = 2 - TagBitString = 3 - TagOctetString = 4 - TagOID = 6 - TagEnum = 10 - TagUTF8String = 12 - TagSequence = 16 - TagSet = 17 - TagPrintableString = 19 - TagT61String = 20 - TagIA5String = 22 - TagUTCTime = 23 - TagGeneralizedTime = 24 - TagGeneralString = 27 -) - -// ASN.1 class types represent the namespace of the tag. -const ( - ClassUniversal = 0 - ClassApplication = 1 - ClassContextSpecific = 2 - ClassPrivate = 3 -) - -type tagAndLength struct { - class, tag, length int - isCompound bool -} - -// ASN.1 has IMPLICIT and EXPLICIT tags, which can be translated as "instead -// of" and "in addition to". When not specified, every primitive type has a -// default tag in the UNIVERSAL class. -// -// For example: a BIT STRING is tagged [UNIVERSAL 3] by default (although ASN.1 -// doesn't actually have a UNIVERSAL keyword). However, by saying [IMPLICIT -// CONTEXT-SPECIFIC 42], that means that the tag is replaced by another. -// -// On the other hand, if it said [EXPLICIT CONTEXT-SPECIFIC 10], then an -// /additional/ tag would wrap the default tag. This explicit tag will have the -// compound flag set. -// -// (This is used in order to remove ambiguity with optional elements.) -// -// You can layer EXPLICIT and IMPLICIT tags to an arbitrary depth, however we -// don't support that here. We support a single layer of EXPLICIT or IMPLICIT -// tagging with tag strings on the fields of a structure. - -// fieldParameters is the parsed representation of tag string from a structure field. -type fieldParameters struct { - optional bool // true iff the field is OPTIONAL - explicit bool // true iff an EXPLICIT tag is in use. - application bool // true iff an APPLICATION tag is in use. - defaultValue *int64 // a default value for INTEGER typed fields (maybe nil). - tag *int // the EXPLICIT or IMPLICIT tag (maybe nil). - stringType int // the string tag to use when marshaling. - timeType int // the time tag to use when marshaling. - set bool // true iff this should be encoded as a SET - omitEmpty bool // true iff this should be omitted if empty when marshaling. - - // Invariants: - // if explicit is set, tag is non-nil. -} - -// Given a tag string with the format specified in the package comment, -// parseFieldParameters will parse it into a fieldParameters structure, -// ignoring unknown parts of the string. -func parseFieldParameters(str string) (ret fieldParameters) { - for _, part := range strings.Split(str, ",") { - switch { - case part == "optional": - ret.optional = true - case part == "explicit": - ret.explicit = true - if ret.tag == nil { - ret.tag = new(int) - } - case part == "generalized": - ret.timeType = TagGeneralizedTime - case part == "utc": - ret.timeType = TagUTCTime - case part == "ia5": - ret.stringType = TagIA5String - // jtasn1 case below added - case part == "generalstring": - ret.stringType = TagGeneralString - case part == "printable": - ret.stringType = TagPrintableString - case part == "utf8": - ret.stringType = TagUTF8String - case strings.HasPrefix(part, "default:"): - i, err := strconv.ParseInt(part[8:], 10, 64) - if err == nil { - ret.defaultValue = new(int64) - *ret.defaultValue = i - } - case strings.HasPrefix(part, "tag:"): - i, err := strconv.Atoi(part[4:]) - if err == nil { - ret.tag = new(int) - *ret.tag = i - } - case part == "set": - ret.set = true - case part == "application": - ret.application = true - if ret.tag == nil { - ret.tag = new(int) - } - case part == "omitempty": - ret.omitEmpty = true - } - } - return -} - -// Given a reflected Go type, getUniversalType returns the default tag number -// and expected compound flag. -func getUniversalType(t reflect.Type) (tagNumber int, isCompound, ok bool) { - switch t { - case objectIdentifierType: - return TagOID, false, true - case bitStringType: - return TagBitString, false, true - case timeType: - return TagUTCTime, false, true - case enumeratedType: - return TagEnum, false, true - case bigIntType: - return TagInteger, false, true - } - switch t.Kind() { - case reflect.Bool: - return TagBoolean, false, true - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return TagInteger, false, true - case reflect.Struct: - return TagSequence, true, true - case reflect.Slice: - if t.Elem().Kind() == reflect.Uint8 { - return TagOctetString, false, true - } - if strings.HasSuffix(t.Name(), "SET") { - return TagSet, true, true - } - return TagSequence, true, true - case reflect.String: - return TagPrintableString, false, true - } - return 0, false, false -} diff --git a/vendor/github.com/jcmturner/gofork/encoding/asn1/marshal.go b/vendor/github.com/jcmturner/gofork/encoding/asn1/marshal.go deleted file mode 100644 index f52eee9d..00000000 --- a/vendor/github.com/jcmturner/gofork/encoding/asn1/marshal.go +++ /dev/null @@ -1,659 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package asn1 - -import ( - "bytes" - "errors" - "fmt" - "io" - "math/big" - "reflect" - "time" - "unicode/utf8" -) - -// A forkableWriter is an in-memory buffer that can be -// 'forked' to create new forkableWriters that bracket the -// original. After -// pre, post := w.fork() -// the overall sequence of bytes represented is logically w+pre+post. -type forkableWriter struct { - *bytes.Buffer - pre, post *forkableWriter -} - -func newForkableWriter() *forkableWriter { - return &forkableWriter{new(bytes.Buffer), nil, nil} -} - -func (f *forkableWriter) fork() (pre, post *forkableWriter) { - if f.pre != nil || f.post != nil { - panic("have already forked") - } - f.pre = newForkableWriter() - f.post = newForkableWriter() - return f.pre, f.post -} - -func (f *forkableWriter) Len() (l int) { - l += f.Buffer.Len() - if f.pre != nil { - l += f.pre.Len() - } - if f.post != nil { - l += f.post.Len() - } - return -} - -func (f *forkableWriter) writeTo(out io.Writer) (n int, err error) { - n, err = out.Write(f.Bytes()) - if err != nil { - return - } - - var nn int - - if f.pre != nil { - nn, err = f.pre.writeTo(out) - n += nn - if err != nil { - return - } - } - - if f.post != nil { - nn, err = f.post.writeTo(out) - n += nn - } - return -} - -func marshalBase128Int(out *forkableWriter, n int64) (err error) { - if n == 0 { - err = out.WriteByte(0) - return - } - - l := 0 - for i := n; i > 0; i >>= 7 { - l++ - } - - for i := l - 1; i >= 0; i-- { - o := byte(n >> uint(i*7)) - o &= 0x7f - if i != 0 { - o |= 0x80 - } - err = out.WriteByte(o) - if err != nil { - return - } - } - - return nil -} - -func marshalInt64(out *forkableWriter, i int64) (err error) { - n := int64Length(i) - - for ; n > 0; n-- { - err = out.WriteByte(byte(i >> uint((n-1)*8))) - if err != nil { - return - } - } - - return nil -} - -func int64Length(i int64) (numBytes int) { - numBytes = 1 - - for i > 127 { - numBytes++ - i >>= 8 - } - - for i < -128 { - numBytes++ - i >>= 8 - } - - return -} - -func marshalBigInt(out *forkableWriter, n *big.Int) (err error) { - if n.Sign() < 0 { - // A negative number has to be converted to two's-complement - // form. So we'll subtract 1 and invert. If the - // most-significant-bit isn't set then we'll need to pad the - // beginning with 0xff in order to keep the number negative. - nMinus1 := new(big.Int).Neg(n) - nMinus1.Sub(nMinus1, bigOne) - bytes := nMinus1.Bytes() - for i := range bytes { - bytes[i] ^= 0xff - } - if len(bytes) == 0 || bytes[0]&0x80 == 0 { - err = out.WriteByte(0xff) - if err != nil { - return - } - } - _, err = out.Write(bytes) - } else if n.Sign() == 0 { - // Zero is written as a single 0 zero rather than no bytes. - err = out.WriteByte(0x00) - } else { - bytes := n.Bytes() - if len(bytes) > 0 && bytes[0]&0x80 != 0 { - // We'll have to pad this with 0x00 in order to stop it - // looking like a negative number. - err = out.WriteByte(0) - if err != nil { - return - } - } - _, err = out.Write(bytes) - } - return -} - -func marshalLength(out *forkableWriter, i int) (err error) { - n := lengthLength(i) - - for ; n > 0; n-- { - err = out.WriteByte(byte(i >> uint((n-1)*8))) - if err != nil { - return - } - } - - return nil -} - -func lengthLength(i int) (numBytes int) { - numBytes = 1 - for i > 255 { - numBytes++ - i >>= 8 - } - return -} - -func marshalTagAndLength(out *forkableWriter, t tagAndLength) (err error) { - b := uint8(t.class) << 6 - if t.isCompound { - b |= 0x20 - } - if t.tag >= 31 { - b |= 0x1f - err = out.WriteByte(b) - if err != nil { - return - } - err = marshalBase128Int(out, int64(t.tag)) - if err != nil { - return - } - } else { - b |= uint8(t.tag) - err = out.WriteByte(b) - if err != nil { - return - } - } - - if t.length >= 128 { - l := lengthLength(t.length) - err = out.WriteByte(0x80 | byte(l)) - if err != nil { - return - } - err = marshalLength(out, t.length) - if err != nil { - return - } - } else { - err = out.WriteByte(byte(t.length)) - if err != nil { - return - } - } - - return nil -} - -func marshalBitString(out *forkableWriter, b BitString) (err error) { - paddingBits := byte((8 - b.BitLength%8) % 8) - err = out.WriteByte(paddingBits) - if err != nil { - return - } - _, err = out.Write(b.Bytes) - return -} - -func marshalObjectIdentifier(out *forkableWriter, oid []int) (err error) { - if len(oid) < 2 || oid[0] > 2 || (oid[0] < 2 && oid[1] >= 40) { - return StructuralError{"invalid object identifier"} - } - - err = marshalBase128Int(out, int64(oid[0]*40+oid[1])) - if err != nil { - return - } - for i := 2; i < len(oid); i++ { - err = marshalBase128Int(out, int64(oid[i])) - if err != nil { - return - } - } - - return -} - -func marshalPrintableString(out *forkableWriter, s string) (err error) { - b := []byte(s) - for _, c := range b { - if !isPrintable(c) { - return StructuralError{"PrintableString contains invalid character"} - } - } - - _, err = out.Write(b) - return -} - -func marshalIA5String(out *forkableWriter, s string) (err error) { - b := []byte(s) - for _, c := range b { - if c > 127 { - return StructuralError{"IA5String contains invalid character"} - } - } - - _, err = out.Write(b) - return -} - -func marshalUTF8String(out *forkableWriter, s string) (err error) { - _, err = out.Write([]byte(s)) - return -} - -func marshalTwoDigits(out *forkableWriter, v int) (err error) { - err = out.WriteByte(byte('0' + (v/10)%10)) - if err != nil { - return - } - return out.WriteByte(byte('0' + v%10)) -} - -func marshalFourDigits(out *forkableWriter, v int) (err error) { - var bytes [4]byte - for i := range bytes { - bytes[3-i] = '0' + byte(v%10) - v /= 10 - } - _, err = out.Write(bytes[:]) - return -} - -func outsideUTCRange(t time.Time) bool { - year := t.Year() - return year < 1950 || year >= 2050 -} - -func marshalUTCTime(out *forkableWriter, t time.Time) (err error) { - year := t.Year() - - switch { - case 1950 <= year && year < 2000: - err = marshalTwoDigits(out, year-1900) - case 2000 <= year && year < 2050: - err = marshalTwoDigits(out, year-2000) - default: - return StructuralError{"cannot represent time as UTCTime"} - } - if err != nil { - return - } - - return marshalTimeCommon(out, t) -} - -func marshalGeneralizedTime(out *forkableWriter, t time.Time) (err error) { - year := t.Year() - if year < 0 || year > 9999 { - return StructuralError{"cannot represent time as GeneralizedTime"} - } - if err = marshalFourDigits(out, year); err != nil { - return - } - - return marshalTimeCommon(out, t) -} - -func marshalTimeCommon(out *forkableWriter, t time.Time) (err error) { - _, month, day := t.Date() - - err = marshalTwoDigits(out, int(month)) - if err != nil { - return - } - - err = marshalTwoDigits(out, day) - if err != nil { - return - } - - hour, min, sec := t.Clock() - - err = marshalTwoDigits(out, hour) - if err != nil { - return - } - - err = marshalTwoDigits(out, min) - if err != nil { - return - } - - err = marshalTwoDigits(out, sec) - if err != nil { - return - } - - _, offset := t.Zone() - - switch { - case offset/60 == 0: - err = out.WriteByte('Z') - return - case offset > 0: - err = out.WriteByte('+') - case offset < 0: - err = out.WriteByte('-') - } - - if err != nil { - return - } - - offsetMinutes := offset / 60 - if offsetMinutes < 0 { - offsetMinutes = -offsetMinutes - } - - err = marshalTwoDigits(out, offsetMinutes/60) - if err != nil { - return - } - - err = marshalTwoDigits(out, offsetMinutes%60) - return -} - -func stripTagAndLength(in []byte) []byte { - _, offset, err := parseTagAndLength(in, 0) - if err != nil { - return in - } - return in[offset:] -} - -func marshalBody(out *forkableWriter, value reflect.Value, params fieldParameters) (err error) { - switch value.Type() { - case flagType: - return nil - case timeType: - t := value.Interface().(time.Time) - if params.timeType == TagGeneralizedTime || outsideUTCRange(t) { - return marshalGeneralizedTime(out, t) - } else { - return marshalUTCTime(out, t) - } - case bitStringType: - return marshalBitString(out, value.Interface().(BitString)) - case objectIdentifierType: - return marshalObjectIdentifier(out, value.Interface().(ObjectIdentifier)) - case bigIntType: - return marshalBigInt(out, value.Interface().(*big.Int)) - } - - switch v := value; v.Kind() { - case reflect.Bool: - if v.Bool() { - return out.WriteByte(255) - } else { - return out.WriteByte(0) - } - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return marshalInt64(out, v.Int()) - case reflect.Struct: - t := v.Type() - - startingField := 0 - - // If the first element of the structure is a non-empty - // RawContents, then we don't bother serializing the rest. - if t.NumField() > 0 && t.Field(0).Type == rawContentsType { - s := v.Field(0) - if s.Len() > 0 { - bytes := make([]byte, s.Len()) - for i := 0; i < s.Len(); i++ { - bytes[i] = uint8(s.Index(i).Uint()) - } - /* The RawContents will contain the tag and - * length fields but we'll also be writing - * those ourselves, so we strip them out of - * bytes */ - _, err = out.Write(stripTagAndLength(bytes)) - return - } else { - startingField = 1 - } - } - - for i := startingField; i < t.NumField(); i++ { - var pre *forkableWriter - pre, out = out.fork() - err = marshalField(pre, v.Field(i), parseFieldParameters(t.Field(i).Tag.Get("asn1"))) - if err != nil { - return - } - } - return - case reflect.Slice: - sliceType := v.Type() - if sliceType.Elem().Kind() == reflect.Uint8 { - bytes := make([]byte, v.Len()) - for i := 0; i < v.Len(); i++ { - bytes[i] = uint8(v.Index(i).Uint()) - } - _, err = out.Write(bytes) - return - } - - // jtasn1 Pass on the tags to the members but need to unset explicit switch and implicit value - //var fp fieldParameters - params.explicit = false - params.tag = nil - for i := 0; i < v.Len(); i++ { - var pre *forkableWriter - pre, out = out.fork() - err = marshalField(pre, v.Index(i), params) - if err != nil { - return - } - } - return - case reflect.String: - switch params.stringType { - case TagIA5String: - return marshalIA5String(out, v.String()) - case TagPrintableString: - return marshalPrintableString(out, v.String()) - default: - return marshalUTF8String(out, v.String()) - } - } - - return StructuralError{"unknown Go type"} -} - -func marshalField(out *forkableWriter, v reflect.Value, params fieldParameters) (err error) { - if !v.IsValid() { - return fmt.Errorf("asn1: cannot marshal nil value") - } - // If the field is an interface{} then recurse into it. - if v.Kind() == reflect.Interface && v.Type().NumMethod() == 0 { - return marshalField(out, v.Elem(), params) - } - - if v.Kind() == reflect.Slice && v.Len() == 0 && params.omitEmpty { - return - } - - if params.optional && params.defaultValue != nil && canHaveDefaultValue(v.Kind()) { - defaultValue := reflect.New(v.Type()).Elem() - defaultValue.SetInt(*params.defaultValue) - - if reflect.DeepEqual(v.Interface(), defaultValue.Interface()) { - return - } - } - - // If no default value is given then the zero value for the type is - // assumed to be the default value. This isn't obviously the correct - // behaviour, but it's what Go has traditionally done. - if params.optional && params.defaultValue == nil { - if reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface()) { - return - } - } - - if v.Type() == rawValueType { - rv := v.Interface().(RawValue) - if len(rv.FullBytes) != 0 { - _, err = out.Write(rv.FullBytes) - } else { - err = marshalTagAndLength(out, tagAndLength{rv.Class, rv.Tag, len(rv.Bytes), rv.IsCompound}) - if err != nil { - return - } - _, err = out.Write(rv.Bytes) - } - return - } - - tag, isCompound, ok := getUniversalType(v.Type()) - if !ok { - err = StructuralError{fmt.Sprintf("unknown Go type: %v", v.Type())} - return - } - class := ClassUniversal - - if params.timeType != 0 && tag != TagUTCTime { - return StructuralError{"explicit time type given to non-time member"} - } - - // jtasn1 updated to allow slices of strings - if params.stringType != 0 && !(tag == TagPrintableString || (v.Kind() == reflect.Slice && tag == 16 && v.Type().Elem().Kind() == reflect.String)) { - return StructuralError{"explicit string type given to non-string member"} - } - - switch tag { - case TagPrintableString: - if params.stringType == 0 { - // This is a string without an explicit string type. We'll use - // a PrintableString if the character set in the string is - // sufficiently limited, otherwise we'll use a UTF8String. - for _, r := range v.String() { - if r >= utf8.RuneSelf || !isPrintable(byte(r)) { - if !utf8.ValidString(v.String()) { - return errors.New("asn1: string not valid UTF-8") - } - tag = TagUTF8String - break - } - } - } else { - tag = params.stringType - } - case TagUTCTime: - if params.timeType == TagGeneralizedTime || outsideUTCRange(v.Interface().(time.Time)) { - tag = TagGeneralizedTime - } - } - - if params.set { - if tag != TagSequence { - return StructuralError{"non sequence tagged as set"} - } - tag = TagSet - } - - tags, body := out.fork() - - err = marshalBody(body, v, params) - if err != nil { - return - } - - bodyLen := body.Len() - - var explicitTag *forkableWriter - if params.explicit { - explicitTag, tags = tags.fork() - } - - if !params.explicit && params.tag != nil { - // implicit tag. - tag = *params.tag - class = ClassContextSpecific - } - - err = marshalTagAndLength(tags, tagAndLength{class, tag, bodyLen, isCompound}) - if err != nil { - return - } - - if params.explicit { - err = marshalTagAndLength(explicitTag, tagAndLength{ - class: ClassContextSpecific, - tag: *params.tag, - length: bodyLen + tags.Len(), - isCompound: true, - }) - } - - return err -} - -// Marshal returns the ASN.1 encoding of val. -// -// In addition to the struct tags recognised by Unmarshal, the following can be -// used: -// -// ia5: causes strings to be marshaled as ASN.1, IA5 strings -// omitempty: causes empty slices to be skipped -// printable: causes strings to be marshaled as ASN.1, PrintableString strings. -// utf8: causes strings to be marshaled as ASN.1, UTF8 strings -func Marshal(val interface{}) ([]byte, error) { - var out bytes.Buffer - v := reflect.ValueOf(val) - f := newForkableWriter() - err := marshalField(f, v, fieldParameters{}) - if err != nil { - return nil, err - } - _, err = f.writeTo(&out) - return out.Bytes(), err -} diff --git a/vendor/github.com/jcmturner/gofork/x/crypto/pbkdf2/pbkdf2.go b/vendor/github.com/jcmturner/gofork/x/crypto/pbkdf2/pbkdf2.go deleted file mode 100644 index 75d41876..00000000 --- a/vendor/github.com/jcmturner/gofork/x/crypto/pbkdf2/pbkdf2.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC -2898 / PKCS #5 v2.0. - -A key derivation function is useful when encrypting data based on a password -or any other not-fully-random data. It uses a pseudorandom function to derive -a secure encryption key based on the password. - -While v2.0 of the standard defines only one pseudorandom function to use, -HMAC-SHA1, the drafted v2.1 specification allows use of all five FIPS Approved -Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To -choose, you can pass the `New` functions from the different SHA packages to -pbkdf2.Key. -*/ -package pbkdf2 - -import ( - "crypto/hmac" - "hash" -) - -// Key derives a key from the password, salt and iteration count, returning a -// []byte of length keylen that can be used as cryptographic key. The key is -// derived based on the method described as PBKDF2 with the HMAC variant using -// the supplied hash function. -// -// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you -// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by -// doing: -// -// dk := pbkdf2.Key([]byte("some password"), salt, 4096, 32, sha1.New) -// -// Remember to get a good random salt. At least 8 bytes is recommended by the -// RFC. -// -// Using a higher iteration count will increase the cost of an exhaustive -// search but will also make derivation proportionally slower. -func Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte { - return Key64(password, salt, int64(iter), int64(keyLen), h) -} - -// Key64 derives a key from the password, salt and iteration count, returning a -// []byte of length keylen that can be used as cryptographic key. Key64 uses -// int64 for the iteration count and key length to allow larger values. -// The key is derived based on the method described as PBKDF2 with the HMAC -// variant using the supplied hash function. -// -// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you -// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by -// doing: -// -// dk := pbkdf2.Key([]byte("some password"), salt, 4096, 32, sha1.New) -// -// Remember to get a good random salt. At least 8 bytes is recommended by the -// RFC. -// -// Using a higher iteration count will increase the cost of an exhaustive -// search but will also make derivation proportionally slower. -func Key64(password, salt []byte, iter, keyLen int64, h func() hash.Hash) []byte { - prf := hmac.New(h, password) - hashLen := int64(prf.Size()) - numBlocks := (keyLen + hashLen - 1) / hashLen - - var buf [4]byte - dk := make([]byte, 0, numBlocks*hashLen) - U := make([]byte, hashLen) - for block := int64(1); block <= numBlocks; block++ { - // N.B.: || means concatenation, ^ means XOR - // for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter - // U_1 = PRF(password, salt || uint(i)) - prf.Reset() - prf.Write(salt) - buf[0] = byte(block >> 24) - buf[1] = byte(block >> 16) - buf[2] = byte(block >> 8) - buf[3] = byte(block) - prf.Write(buf[:4]) - dk = prf.Sum(dk) - T := dk[int64(len(dk))-hashLen:] - copy(U, T) - - // U_n = PRF(password, U_(n-1)) - for n := int64(2); n <= iter; n++ { - prf.Reset() - prf.Write(U) - U = U[:0] - U = prf.Sum(U) - for x := range U { - T[x] ^= U[x] - } - } - } - return dk[:keyLen] -} diff --git a/vendor/github.com/pborman/getopt/AUTHORS b/vendor/github.com/pborman/getopt/AUTHORS deleted file mode 100644 index 2d70b04a..00000000 --- a/vendor/github.com/pborman/getopt/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Paul Borman diff --git a/vendor/github.com/pborman/getopt/CONTRIBUTING.md b/vendor/github.com/pborman/getopt/CONTRIBUTING.md deleted file mode 100644 index 04fdf09f..00000000 --- a/vendor/github.com/pborman/getopt/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -# How to contribute - -We definitely welcome patches and contribution to this project! - -### Legal requirements - -In order to protect both you and ourselves, you will need to sign the -[Contributor License Agreement](https://cla.developers.google.com/clas). - -You may have already signed it for other Google projects. diff --git a/vendor/github.com/pborman/getopt/LICENSE b/vendor/github.com/pborman/getopt/LICENSE deleted file mode 100644 index a8181ec4..00000000 --- a/vendor/github.com/pborman/getopt/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2017 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google, nor the names of other -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/pborman/getopt/README.md b/vendor/github.com/pborman/getopt/README.md deleted file mode 100644 index 2e1cf72b..00000000 --- a/vendor/github.com/pborman/getopt/README.md +++ /dev/null @@ -1,226 +0,0 @@ -# getopt - -Package getopt provides traditional getopt processing for implementing -commands that use traditional command lines. The standard Go flag package -cannot be used to write a program that parses flags the way ls or ssh does, -for example. There are two versions, v1 and v2, both named getopt, that -use the following import paths: - -``` - "github.com/pborman/getopt" // version 1 - "github.com/pborman/getopt/v2" // version 2 -``` - -This README describes version 2 of the package, which has a simplified API. - -## Usage - -Getopt supports functionality found in both the standard BSD getopt as well -as (one of the many versions of) the GNU getopt_long. Being a Go package, -this package makes common usage easy, but still enables more controlled usage -if needed. - -Typical usage: - -``` - Declare flags and have getopt return pointers to the values. - helpFlag := getopt.Bool('?', "display help") - cmdFlag := getopt.StringLong("command", 'c', "default", "the command) - - Declare flags against existing variables. - var { - fileName = "/the/default/path" - timeout = time.Second * 5 - verbose bool - } - func init() { - getopt.Flag(&verbose, 'v', "be verbose") - getopt.FlagLong(&fileName, "path", 0, "the path") - getopt.FlagLong(&timeout, "timeout", 't', "some timeout") - } - - func main() { - Parse the program arguments - getopt.Parse() - Get the remaining positional parameters - args := getopt.Args() - ... -``` - -If you don't want the program to exit on error, use getopt.Getopt: - -``` - err := getopt.Getopt(nil) - if err != nil { - code to handle error - fmt.Fprintln(os.Stderr, err) - } -``` - -## Flag Syntax - -Support is provided for both short (-f) and long (--flag) options. A single -option may have both a short and a long name. Each option may be a flag or a -value. A value takes an argument. - -Declaring no long names causes this package to process arguments like the -traditional BSD getopt. - -Short flags may be combined into a single parameter. For example, "-a -b -c" -may also be expressed "-abc". Long flags must stand on their own "--alpha ---beta" - -Values require an argument. For short options the argument may either be -immediately following the short name or as the next argument. Only one short -value may be combined with short flags in a single argument; the short value -must be after all short flags. For example, if f is a flag and v is a value, -then: - -``` - -vvalue (sets v to "value") - -v value (sets v to "value") - -fvvalue (sets f, and sets v to "value") - -fv value (sets f, and sets v to "value") - -vf value (set v to "f" and value is the first parameter) -``` - -For the long value option val: - -``` - --val value (sets val to "value") - --val=value (sets val to "value") - --valvalue (invalid option "valvalue") -``` - -Values with an optional value only set the value if the value is part of the -same argument. In any event, the option count is increased and the option is -marked as seen. - -``` - -v -f (sets v and f as being seen) - -vvalue -f (sets v to "value" and sets f) - --val -f (sets v and f as being seen) - --val=value -f (sets v to "value" and sets f) -``` - -There is no convience function defined for making the value optional. The -SetOptional method must be called on the actual Option. - -``` - v := String("val", 'v', "", "the optional v") - Lookup("v").SetOptional() - - var s string - FlagLong(&s, "val", 'v', "the optional v).SetOptional() -``` - -Parsing continues until the first non-option or "--" is encountered. - -The short name "-" can be used, but it either is specified as "-" or as part -of a group of options, for example "-f-". If there are no long options -specified then "--f" could also be used. If "-" is not declared as an option -then the single "-" will also terminate the option processing but unlike -"--", the "-" will be part of the remaining arguments. - -## Advanced Usage - -Normally the parsing is performed by calling the Parse function. If it is -important to see the order of the options then the Getopt function should be -used. The standard Parse function does the equivalent of: - -``` -func Parse() { - if err := getopt.Getopt(os.Args, nil); err != nil { - fmt.Fprintln(os.Stderr, err) - s.usage() - os.Exit(1) - } -} -``` - -When calling Getopt it is the responsibility of the caller to print any -errors. - -Normally the default option set, CommandLine, is used. Other option sets may -be created with New. - -After parsing, the sets Args will contain the non-option arguments. If an -error is encountered then Args will begin with argument that caused the -error. - -It is valid to call a set's Parse a second time to amend the current set of -flags or values. As an example: - -``` - var a = getopt.Bool('a', "", "The a flag") - var b = getopt.Bool('b', "", "The a flag") - var cmd = "" - - var opts = getopt.CommandLine - - opts.Parse(os.Args) - if opts.NArgs() > 0 { - cmd = opts.Arg(0) - opts.Parse(opts.Args()) - } -``` - -If called with set to { "prog", "-a", "cmd", "-b", "arg" } then both and and -b would be set, cmd would be set to "cmd", and opts.Args() would return { -"arg" }. - -Unless an option type explicitly prohibits it, an option may appear more than -once in the arguments. The last value provided to the option is the value. - -## Builtin Types - -The Flag and FlagLong functions support most standard Go types. For the -list, see the description of FlagLong below for a list of supported types. - -There are also helper routines to allow single line flag declarations. These -types are: Bool, Counter, Duration, Enum, Int16, Int32, Int64, Int, List, -Signed, String, Uint16, Uint32, Uint64, Uint, and Unsigned. - -Each comes in a short and long flavor, e.g., Bool and BoolLong and include -functions to set the flags on the standard command line or for a specific Set -of flags. - -Except for the Counter, Enum, Signed and Unsigned types, all of these types -can be declared using Flag and FlagLong by passing in a pointer to the -appropriate type. - -## Declaring New Flag Types - -A pointer to any type that implements the Value interface may be passed to -Flag or FlagLong. - -## VALUEHELP - -All non-flag options are created with a "valuehelp" as the last parameter. -Valuehelp should be 0, 1, or 2 strings. The first string, if provided, is -the usage message for the option. If the second string, if provided, is the -name to use for the value when displaying the usage. If not provided the -term "value" is assumed. - -The usage message for the option created with - -``` - StringLong("option", 'o', "defval", "a string of letters") -``` - -is - -``` - -o, -option=value -``` -while the usage message for the option created with - -``` - StringLong("option", 'o', "defval", "a string of letters", "string") -``` - -is - -``` - -o, -option=string -``` diff --git a/vendor/github.com/pborman/getopt/bool.go b/vendor/github.com/pborman/getopt/bool.go deleted file mode 100644 index 37ce019e..00000000 --- a/vendor/github.com/pborman/getopt/bool.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strings" -) - -type boolValue bool - -func (b *boolValue) Set(value string, opt Option) error { - switch strings.ToLower(value) { - case "", "1", "true", "on", "t": - *b = true - case "0", "false", "off", "f": - *b = false - default: - return fmt.Errorf("invalid value for bool %s: %q", opt.Name(), value) - } - return nil -} - -func (b *boolValue) String() string { - if *b { - return "true" - } - return "false" -} - -// Bool creates a flag option that is a bool. Bools normally do not take a -// value however one can be assigned by using the long form of the option: -// -// --option=true -// --o=false -// -// Its value is case insenstive and one of true, false, t, f, on, off, t and 0. -func Bool(name rune, helpvalue ...string) *bool { - return CommandLine.Bool(name, helpvalue...) -} - -func (s *Set) Bool(name rune, helpvalue ...string) *bool { - var p bool - s.BoolVarLong(&p, "", name, helpvalue...) - return &p -} - -func BoolLong(name string, short rune, helpvalue ...string) *bool { - return CommandLine.BoolLong(name, short, helpvalue...) -} - -func (s *Set) BoolLong(name string, short rune, helpvalue ...string) *bool { - var p bool - s.BoolVarLong(&p, name, short, helpvalue...) - return &p -} - -func BoolVar(p *bool, name rune, helpvalue ...string) Option { - return CommandLine.BoolVar(p, name, helpvalue...) -} - -func (s *Set) BoolVar(p *bool, name rune, helpvalue ...string) Option { - return s.BoolVarLong(p, "", name, helpvalue...) -} - -func BoolVarLong(p *bool, name string, short rune, helpvalue ...string) Option { - return CommandLine.BoolVarLong(p, name, short, helpvalue...) -} - -func (s *Set) BoolVarLong(p *bool, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*boolValue)(p), name, short, helpvalue...).SetFlag() -} diff --git a/vendor/github.com/pborman/getopt/counter.go b/vendor/github.com/pborman/getopt/counter.go deleted file mode 100644 index 8b11ec10..00000000 --- a/vendor/github.com/pborman/getopt/counter.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strconv" -) - -type counterValue int - -func (b *counterValue) Set(value string, opt Option) error { - if value == "" { - *b++ - } else { - v, err := strconv.ParseInt(value, 0, strconv.IntSize) - if err != nil { - if e, ok := err.(*strconv.NumError); ok { - switch e.Err { - case strconv.ErrRange: - err = fmt.Errorf("value out of range: %s", value) - case strconv.ErrSyntax: - err = fmt.Errorf("not a valid number: %s", value) - } - } - return err - } - *b = counterValue(v) - } - return nil -} - -func (b *counterValue) String() string { - return strconv.Itoa(int(*b)) -} - -// Counter creates a counting flag stored as an int. Each time the option -// is seen while parsing the value is incremented. The value of the counter -// may be explicitly set by using the long form: -// -// --counter=5 -// --c=5 -// -// Further instances of the option will increment from the set value. -func Counter(name rune, helpvalue ...string) *int { - return CommandLine.Counter(name, helpvalue...) -} - -func (s *Set) Counter(name rune, helpvalue ...string) *int { - var p int - s.CounterVarLong(&p, "", name, helpvalue...) - return &p -} - -func CounterLong(name string, short rune, helpvalue ...string) *int { - return CommandLine.CounterLong(name, short, helpvalue...) -} - -func (s *Set) CounterLong(name string, short rune, helpvalue ...string) *int { - var p int - s.CounterVarLong(&p, name, short, helpvalue...) - return &p -} - -func CounterVar(p *int, name rune, helpvalue ...string) Option { - return CommandLine.CounterVar(p, name, helpvalue...) -} - -func (s *Set) CounterVar(p *int, name rune, helpvalue ...string) Option { - return s.CounterVarLong(p, "", name, helpvalue...) -} - -func CounterVarLong(p *int, name string, short rune, helpvalue ...string) Option { - return CommandLine.CounterVarLong(p, name, short, helpvalue...) -} - -func (s *Set) CounterVarLong(p *int, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*counterValue)(p), name, short, helpvalue...).SetFlag() -} diff --git a/vendor/github.com/pborman/getopt/duration.go b/vendor/github.com/pborman/getopt/duration.go deleted file mode 100644 index 90611133..00000000 --- a/vendor/github.com/pborman/getopt/duration.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2015 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import "time" - -type durationValue time.Duration - -func (d *durationValue) Set(value string, opt Option) error { - v, err := time.ParseDuration(value) - if err != nil { - return err - } - *d = durationValue(v) - return nil -} - -func (d *durationValue) String() string { - return time.Duration(*d).String() -} - -// Duration creates an option that parses its value as a time.Duration. -func Duration(name rune, value time.Duration, helpvalue ...string) *time.Duration { - return CommandLine.Duration(name, value, helpvalue...) -} - -func (s *Set) Duration(name rune, value time.Duration, helpvalue ...string) *time.Duration { - return s.DurationLong("", name, value, helpvalue...) -} - -func DurationLong(name string, short rune, value time.Duration, helpvalue ...string) *time.Duration { - return CommandLine.DurationLong(name, short, value, helpvalue...) -} - -func (s *Set) DurationLong(name string, short rune, value time.Duration, helpvalue ...string) *time.Duration { - s.DurationVarLong(&value, name, short, helpvalue...) - return &value -} - -func DurationVar(p *time.Duration, name rune, helpvalue ...string) Option { - return CommandLine.DurationVar(p, name, helpvalue...) -} - -func (s *Set) DurationVar(p *time.Duration, name rune, helpvalue ...string) Option { - return s.DurationVarLong(p, "", name, helpvalue...) -} - -func DurationVarLong(p *time.Duration, name string, short rune, helpvalue ...string) Option { - return CommandLine.DurationVarLong(p, name, short, helpvalue...) -} - -func (s *Set) DurationVarLong(p *time.Duration, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*durationValue)(p), name, short, helpvalue...) -} diff --git a/vendor/github.com/pborman/getopt/enum.go b/vendor/github.com/pborman/getopt/enum.go deleted file mode 100644 index ee4cf950..00000000 --- a/vendor/github.com/pborman/getopt/enum.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import "errors" - -type enumValue string - -var enumValues = make(map[*enumValue]map[string]struct{}) - -func (s *enumValue) Set(value string, opt Option) error { - es, ok := enumValues[s] - if !ok || es == nil { - return errors.New("this option has no values") - } - if _, ok := es[value]; !ok { - return errors.New("invalid value: " + value) - } - *s = enumValue(value) - return nil -} - -func (s *enumValue) String() string { - return string(*s) -} - -// Enum creates an option that can only be set to one of the enumerated strings -// passed in values. Passing nil or an empty slice results in an option that -// will always fail. -func Enum(name rune, values []string, helpvalue ...string) *string { - return CommandLine.Enum(name, values, helpvalue...) -} - -func (s *Set) Enum(name rune, values []string, helpvalue ...string) *string { - var p string - s.EnumVarLong(&p, "", name, values, helpvalue...) - return &p -} - -func EnumLong(name string, short rune, values []string, helpvalue ...string) *string { - return CommandLine.EnumLong(name, short, values, helpvalue...) -} - -func (s *Set) EnumLong(name string, short rune, values []string, helpvalue ...string) *string { - var p string - s.EnumVarLong(&p, name, short, values, helpvalue...) - return &p -} - -// EnumVar creates an enum option that defaults to the starting value of *p. -// If *p is not found in values then a reset of this option will fail. -func EnumVar(p *string, name rune, values []string, helpvalue ...string) Option { - return CommandLine.EnumVar(p, name, values, helpvalue...) -} - -func (s *Set) EnumVar(p *string, name rune, values []string, helpvalue ...string) Option { - return s.EnumVarLong(p, "", name, values, helpvalue...) -} - -func EnumVarLong(p *string, name string, short rune, values []string, helpvalue ...string) Option { - return CommandLine.EnumVarLong(p, name, short, values, helpvalue...) -} - -func (s *Set) EnumVarLong(p *string, name string, short rune, values []string, helpvalue ...string) Option { - m := make(map[string]struct{}) - for _, v := range values { - m[v] = struct{}{} - } - enumValues[(*enumValue)(p)] = m - return s.VarLong((*enumValue)(p), name, short, helpvalue...) -} diff --git a/vendor/github.com/pborman/getopt/error.go b/vendor/github.com/pborman/getopt/error.go deleted file mode 100644 index 3de8e860..00000000 --- a/vendor/github.com/pborman/getopt/error.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import "fmt" - -// An Error is returned by Getopt when it encounters an error. -type Error struct { - ErrorCode // General reason of failure. - Err error // The actual error. - Parameter string // Parameter passed to option, if any - Name string // Option that cause error, if any -} - -// Error returns the error message, implementing the error interface. -func (i *Error) Error() string { return i.Err.Error() } - -// An ErrorCode indicates what sort of error was encountered. -type ErrorCode int - -const ( - NoError = ErrorCode(iota) - UnknownOption // an invalid option was encountered - MissingParameter // the options parameter is missing - ExtraParameter // a value was set to a long flag - Invalid // attempt to set an invalid value -) - -func (e ErrorCode) String() string { - switch e { - case UnknownOption: - return "unknow option" - case MissingParameter: - return "missing argument" - case ExtraParameter: - return "unxpected value" - case Invalid: - return "error setting value" - } - return "unknown error" -} - -// unknownOption returns an Error indicating an unknown option was -// encountered. -func unknownOption(name interface{}) *Error { - i := &Error{ErrorCode: UnknownOption} - switch n := name.(type) { - case rune: - if n == '-' { - i.Name = "-" - } else { - i.Name = "-" + string(n) - } - case string: - i.Name = "--" + n - } - i.Err = fmt.Errorf("unknown option: %s", i.Name) - return i -} - -// missingArg returns an Error inidicating option o was not passed -// a required paramter. -func missingArg(o Option) *Error { - return &Error{ - ErrorCode: MissingParameter, - Name: o.Name(), - Err: fmt.Errorf("missing parameter for %s", o.Name()), - } -} - -// extraArg returns an Error inidicating option o was passed the -// unexpected paramter value. -func extraArg(o Option, value string) *Error { - return &Error{ - ErrorCode: ExtraParameter, - Name: o.Name(), - Parameter: value, - Err: fmt.Errorf("unexpected parameter passed to %s: %q", o.Name(), value), - } -} - -// setError returns an Error inidicating option o and the specified -// error while setting it to value. -func setError(o Option, value string, err error) *Error { - return &Error{ - ErrorCode: Invalid, - Name: o.Name(), - Parameter: value, - Err: err, - } -} diff --git a/vendor/github.com/pborman/getopt/getopt.go b/vendor/github.com/pborman/getopt/getopt.go deleted file mode 100644 index 54910155..00000000 --- a/vendor/github.com/pborman/getopt/getopt.go +++ /dev/null @@ -1,536 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package getopt (v1) provides traditional getopt processing for implementing -// commands that use traditional command lines. The standard Go flag package -// cannot be used to write a program that parses flags the way ls or ssh does, -// for example. -// -// A new version of this package (v2) (whose package name is also getopt) is -// available as: -// -// "github.com/pborman/getopt/v2" -// -// Getopt supports functionality found in both the standard BSD getopt as well -// as (one of the many versions of) the GNU getopt_long. Being a Go package, -// this package makes common usage easy, but still enables more controlled usage -// if needed. -// -// Typical usage: -// -// // Declare the flags to be used -// helpFlag := getopt.Bool('?', "display help") -// cmdFlag := getopt.StringLong("command", 'c', "", "the command) -// -// func main() { -// // Parse the program arguments -// getopt.Parse() -// // Get the remaining positional parameters -// args := getopt.Args() -// -// If you don't want the program to exit on error, use getopt.Getopt: -// -// err := getopt.Getopt(nil) -// if err != nil { -// // code to handle error -// fmt.Fprintln(os.Stderr, err) -// } -// -// Support is provided for both short (-f) and long (--flag) options. A single -// option may have both a short and a long name. Each option may be a flag or a -// value. A value takes an argument. -// -// Declaring no long names causes this package to process arguments like the -// traditional BSD getopt. -// -// Short flags may be combined into a single parameter. For example, "-a -b -c" -// may also be expressed "-abc". Long flags must stand on their own "--alpha -// --beta" -// -// Values require an argument. For short options the argument may either be -// immediately following the short name or as the next argument. Only one short -// value may be combined with short flags in a single argument; the short value -// must be after all short flags. For example, if f is a flag and v is a value, -// then: -// -// -vvalue (sets v to "value") -// -v value (sets v to "value") -// -fvvalue (sets f, and sets v to "value") -// -fv value (sets f, and sets v to "value") -// -vf value (set v to "f" and value is the first parameter) -// -// For the long value option val: -// -// --val value (sets val to "value") -// --val=value (sets val to "value") -// --valvalue (invalid option "valvalue") -// -// Values with an optional value only set the value if the value is part of the -// same argument. In any event, the option count is increased and the option is -// marked as seen. -// -// -v -f (sets v and f as being seen) -// -vvalue -f (sets v to "value" and sets f) -// --val -f (sets v and f as being seen) -// --val=value -f (sets v to "value" and sets f) -// -// There is no convience function defined for making the value optional. The -// SetOptional method must be called on the actual Option. -// -// v := String("val", 'v', "", "the optional v") -// Lookup("v").SetOptional() -// -// var s string -// StringVar(&s, "val", 'v', "the optional v).SetOptional() -// -// Parsing continues until the first non-option or "--" is encountered. -// -// The short name "-" can be used, but it either is specified as "-" or as part -// of a group of options, for example "-f-". If there are no long options -// specified then "--f" could also be used. If "-" is not declared as an option -// then the single "-" will also terminate the option processing but unlike -// "--", the "-" will be part of the remaining arguments. -// -// Normally the parsing is performed by calling the Parse function. If it is -// important to see the order of the options then the Getopt function should be -// used. The standard Parse function does the equivalent of: -// -// func Parse() { -// if err := getopt.Getopt(os.Args, nil); err != nil { -// fmt.Fprintln(os.Stderr, err) -// s.usage() -// os.Exit(1) -// } -// -// When calling Getopt it is the responsibility of the caller to print any -// errors. -// -// Normally the default option set, CommandLine, is used. Other option sets may -// be created with New. -// -// After parsing, the sets Args will contain the non-option arguments. If an -// error is encountered then Args will begin with argument that caused the -// error. -// -// It is valid to call a set's Parse a second time to amend the current set of -// flags or values. As an example: -// -// var a = getopt.Bool('a', "", "The a flag") -// var b = getopt.Bool('b', "", "The a flag") -// var cmd = "" -// -// var opts = getopt.CommandLine -// -// opts.Parse(os.Args) -// if opts.NArgs() > 0 { -// cmd = opts.Arg(0) -// opts.Parse(opts.Args()) -// } -// -// If called with set to { "prog", "-a", "cmd", "-b", "arg" } then both and and -// b would be set, cmd would be set to "cmd", and opts.Args() would return { -// "arg" }. -// -// Unless an option type explicitly prohibits it, an option may appear more than -// once in the arguments. The last value provided to the option is the value. -// -// SYNTAX -// -// For each option type there are an unfortunately large number of ways, 8, to -// initialize the option. This number is derived from three attributes: -// -// 1) Short or Long name -// 2) Normal vs Var -// 3) Command Line vs Option Set -// -// The first two variations provide 4 signature: -// -// Option(name rune, [value type,] helpvalue... string) -// OptionLong(name string, short rune, [value type,] helpvalue... string) -// OptionVar(p *type, name rune, helpvalue... string) -// OptionVarLong(p *type, name string, short rune, helpvalue... string) -// -// Foo can actually be expressed in terms of FooLong: -// -// func Foo(name rune, value type, helpvalue... string) *type { -// return FooLong("", name, value, helpvalue...) -// } -// -// Normally Foo is used, unless long options are needed. Setting short to 0 -// creates only a long option. -// -// The difference bentween Foo and FooVar is that you pass a pointer, p, to the -// location of the value to FooVar. The default value is simply *p. The -// initial value of *p is the defaut value of the option. -// -// Foo is actually a wrapper around FooVar: -// -// func Foo(name rune, value type, helpvalue... string) *type { -// p := value -// FooVar(&p, name, helpvalue... string) -// return &p -// } -// -// -// The third variation provides a top-level function and a method on a Set: -// -// func Option(...) -// func (s *Set) Option(...) -// -// The top-level function is simply: -// -// func Option(...) *type { -// return CommandLine.Option(...) { -// } -// -// To simplfy documentation, typically only the main top-level function is fully -// documented. The others will have documentation when there is something -// special about them. -// -// VALUEHELP -// -// All non-flag options are created with a "valuehelp" as the last parameter. -// Valuehelp should be 0, 1, or 2 strings. The first string, if provided, is -// the usage message for the option. If the second string, if provided, is the -// name to use for the value when displaying the usage. If not provided the -// term "value" is assumed. -// -// The usage message for the option created with -// -// StringLong("option", 'o', "defval", "a string of letters") -// -// is -// -// -o, -option=value -// -// StringLong("option", 'o', "defval", "a string of letters", "string") -// -// is -// -// -o, -option=string -package getopt - -import ( - "fmt" - "io" - "os" - "path" - "sort" - "strings" -) - -// stderr allows tests to capture output to standard error. -var stderr io.Writer = os.Stderr - -// exit allows tests to capture an os.Exit call -var exit = os.Exit - -// DisplayWidth is used to determine where to split usage long lines. -var DisplayWidth = 80 - -// HelpColumn is the maximum column position that help strings start to display -// at. If the option usage is too long then the help string will be displayed -// on the next line. For example: -// -// -a this is the a flag -// -u, --under=location -// the u flag's usage is quite long -var HelpColumn = 20 - -// PrintUsage prints the usage of the program to w. -func (s *Set) PrintUsage(w io.Writer) { - sort.Sort(s.options) - flags := "" - - // Build up the list of short flag names and also compute - // how to display the option in the longer help listing. - // We also keep track of the longest option usage string - // that is no more than HelpColumn-3 bytes (at which point - // we use two lines to display the help). The three - // is for the leading space and the two spaces before the - // help string. - for _, opt := range s.options { - if opt.name == "" { - opt.name = "value" - } - if opt.uname == "" { - opt.uname = opt.usageName() - } - if opt.flag && opt.short != 0 && opt.short != '-' { - flags += string(opt.short) - } - } - - var opts []string - - // The short option - is special - if s.shortOptions['-'] != nil { - opts = append(opts, "-") - } - - // If we have a bundle of flags, add them to the list - if flags != "" { - opts = append(opts, "-"+flags) - } - - // Now append all the long options and options that require - // values. - for _, opt := range s.options { - if opt.flag { - if opt.short != 0 { - continue - } - flags = "--" + opt.long - } else if opt.short != 0 { - flags = "-" + string(opt.short) + " " + opt.name - } else { - flags = "--" + string(opt.long) + " " + opt.name - } - opts = append(opts, flags) - } - flags = strings.Join(opts, "] [") - if flags != "" { - flags = " [" + flags + "]" - } - if s.parameters != "" { - flags += " " + s.parameters - } - fmt.Fprintf(w, "Usage: %s%s\n", s.program, flags) - s.PrintOptions(w) -} - -// PrintOptions prints the list of options in s to w. -func (s *Set) PrintOptions(w io.Writer) { - sort.Sort(s.options) - max := 4 - for _, opt := range s.options { - if opt.name == "" { - opt.name = "value" - } - if opt.uname == "" { - opt.uname = opt.usageName() - } - if max < len(opt.uname) && len(opt.uname) <= HelpColumn-3 { - max = len(opt.uname) - } - } - // Now print one or more usage lines per option. - for _, opt := range s.options { - if opt.uname != "" { - opt.help = strings.TrimSpace(opt.help) - if len(opt.help) == 0 { - fmt.Fprintf(w, " %s\n", opt.uname) - continue - } - help := strings.Split(opt.help, "\n") - // If they did not put in newlines then we will insert - // them to keep the help messages from wrapping. - if len(help) == 1 { - help = breakup(help[0], DisplayWidth-HelpColumn) - } - if len(opt.uname) <= max { - fmt.Fprintf(w, " %-*s %s\n", max, opt.uname, help[0]) - help = help[1:] - } else { - fmt.Fprintf(w, " %s\n", opt.uname) - } - for _, s := range help { - fmt.Fprintf(w, " %-*s %s\n", max, " ", s) - } - } - } -} - -// breakup breaks s up into strings no longer than max bytes. -func breakup(s string, max int) []string { - var a []string - - for { - // strip leading spaces - for len(s) > 0 && s[0] == ' ' { - s = s[1:] - } - // If the option is no longer than the max just return it - if len(s) <= max { - if len(s) != 0 { - a = append(a, s) - } - return a - } - x := max - for s[x] != ' ' { - // the first word is too long?! - if x == 0 { - x = max - for x < len(s) && s[x] != ' ' { - x++ - } - if x == len(s) { - x-- - } - break - } - x-- - } - for s[x] == ' ' { - x-- - } - a = append(a, s[:x+1]) - s = s[x+1:] - } -} - -// Parse uses Getopt to parse args using the options set for s. The first -// element of args is used to assign the program for s if it is not yet set. On -// error, Parse displays the error message as well as a usage message on -// standard error and then exits the program. -func (s *Set) Parse(args []string) { - if err := s.Getopt(args, nil); err != nil { - fmt.Fprintln(stderr, err) - s.usage() - exit(1) - } -} - -// Parse uses Getopt to parse args using the options set for s. The first -// element of args is used to assign the program for s if it is not yet set. -// Getop calls fn, if not nil, for each option parsed. -// -// Getopt returns nil when all options have been processed (a non-option -// argument was encountered, "--" was encountered, or fn returned false). -// -// On error getopt returns a refernce to an InvalidOption (which implements -// the error interface). -func (s *Set) Getopt(args []string, fn func(Option) bool) (err error) { - s.State = InProgress - defer func() { - if s.State == InProgress { - switch { - case err != nil: - s.State = Failure - case len(s.args) == 0: - s.State = EndOfArguments - default: - s.State = Unknown - } - } - }() - if fn == nil { - fn = func(Option) bool { return true } - } - if len(args) == 0 { - return nil - } - - if s.program == "" { - s.program = path.Base(args[0]) - } - args = args[1:] -Parsing: - for len(args) > 0 { - arg := args[0] - s.args = args - args = args[1:] - - // end of options? - if arg == "" || arg[0] != '-' { - s.State = EndOfOptions - return nil - } - - if arg == "-" { - goto ShortParsing - } - - // explicitly request end of options? - if arg == "--" { - s.args = args - s.State = DashDash - return nil - } - - // Long option processing - if len(s.longOptions) > 0 && arg[1] == '-' { - e := strings.IndexRune(arg, '=') - var value string - if e > 0 { - value = arg[e+1:] - arg = arg[:e] - } - opt := s.longOptions[arg[2:]] - // If we are processing long options then --f is -f - // if f is not defined as a long option. - // This lets you say --f=false - if opt == nil && len(arg[2:]) == 1 { - opt = s.shortOptions[rune(arg[2])] - } - if opt == nil { - return unknownOption(arg[2:]) - } - opt.isLong = true - // If we require an option and did not have an = - // then use the next argument as an option. - if !opt.flag && e < 0 && !opt.optional { - if len(args) == 0 { - return missingArg(opt) - } - value = args[0] - args = args[1:] - } - opt.count++ - - if err := opt.value.Set(value, opt); err != nil { - return setError(opt, value, err) - } - - if !fn(opt) { - s.State = Terminated - return nil - } - continue Parsing - } - - // Short option processing - arg = arg[1:] // strip - - ShortParsing: - for i, c := range arg { - opt := s.shortOptions[c] - if opt == nil { - // In traditional getopt, if - is not registered - // as an option, a lone - is treated as - // if there were a -- in front of it. - if arg == "-" { - s.State = Dash - return nil - } - return unknownOption(c) - } - opt.isLong = false - opt.count++ - var value string - if !opt.flag { - value = arg[1+i:] - if value == "" && !opt.optional { - if len(args) == 0 { - return missingArg(opt) - } - value = args[0] - args = args[1:] - } - } - if err := opt.value.Set(value, opt); err != nil { - return setError(opt, value, err) - } - if !fn(opt) { - s.State = Terminated - return nil - } - if !opt.flag { - continue Parsing - } - } - } - s.args = []string{} - return nil -} diff --git a/vendor/github.com/pborman/getopt/int.go b/vendor/github.com/pborman/getopt/int.go deleted file mode 100644 index 3db5fd6c..00000000 --- a/vendor/github.com/pborman/getopt/int.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strconv" -) - -type intValue int - -func (i *intValue) Set(value string, opt Option) error { - v, err := strconv.ParseInt(value, 0, strconv.IntSize) - if err != nil { - if e, ok := err.(*strconv.NumError); ok { - switch e.Err { - case strconv.ErrRange: - err = fmt.Errorf("value out of range: %s", value) - case strconv.ErrSyntax: - err = fmt.Errorf("not a valid number: %s", value) - } - } - return err - } - *i = intValue(v) - return nil -} - -func (i *intValue) String() string { - return strconv.FormatInt(int64(*i), 10) -} - -// Int creates an option that parses its value as an integer. -func Int(name rune, value int, helpvalue ...string) *int { - return CommandLine.Int(name, value, helpvalue...) -} - -func (s *Set) Int(name rune, value int, helpvalue ...string) *int { - return s.IntLong("", name, value, helpvalue...) -} - -func IntLong(name string, short rune, value int, helpvalue ...string) *int { - return CommandLine.IntLong(name, short, value, helpvalue...) -} - -func (s *Set) IntLong(name string, short rune, value int, helpvalue ...string) *int { - s.IntVarLong(&value, name, short, helpvalue...) - return &value -} - -func IntVar(p *int, name rune, helpvalue ...string) Option { - return CommandLine.IntVar(p, name, helpvalue...) -} - -func (s *Set) IntVar(p *int, name rune, helpvalue ...string) Option { - return s.IntVarLong(p, "", name, helpvalue...) -} - -func IntVarLong(p *int, name string, short rune, helpvalue ...string) Option { - return CommandLine.IntVarLong(p, name, short, helpvalue...) -} - -func (s *Set) IntVarLong(p *int, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*intValue)(p), name, short, helpvalue...) -} diff --git a/vendor/github.com/pborman/getopt/int16.go b/vendor/github.com/pborman/getopt/int16.go deleted file mode 100644 index 2ece51f8..00000000 --- a/vendor/github.com/pborman/getopt/int16.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strconv" -) - -type int16Value int16 - -func (i *int16Value) Set(value string, opt Option) error { - v, err := strconv.ParseInt(value, 0, 16) - if err != nil { - if e, ok := err.(*strconv.NumError); ok { - switch e.Err { - case strconv.ErrRange: - err = fmt.Errorf("value out of range: %s", value) - case strconv.ErrSyntax: - err = fmt.Errorf("not a valid number: %s", value) - } - } - return err - } - *i = int16Value(v) - return nil -} - -func (i *int16Value) String() string { - return strconv.FormatInt(int64(*i), 10) -} - -// Int16 creates an option that parses its value as an int16. -func Int16(name rune, value int16, helpvalue ...string) *int16 { - return CommandLine.Int16(name, value, helpvalue...) -} - -func (s *Set) Int16(name rune, value int16, helpvalue ...string) *int16 { - return s.Int16Long("", name, value, helpvalue...) -} - -func Int16Long(name string, short rune, value int16, helpvalue ...string) *int16 { - return CommandLine.Int16Long(name, short, value, helpvalue...) -} - -func (s *Set) Int16Long(name string, short rune, value int16, helpvalue ...string) *int16 { - s.Int16VarLong(&value, name, short, helpvalue...) - return &value -} - -func Int16Var(p *int16, name rune, helpvalue ...string) Option { - return CommandLine.Int16Var(p, name, helpvalue...) -} - -func (s *Set) Int16Var(p *int16, name rune, helpvalue ...string) Option { - return s.Int16VarLong(p, "", name, helpvalue...) -} - -func Int16VarLong(p *int16, name string, short rune, helpvalue ...string) Option { - return CommandLine.Int16VarLong(p, name, short, helpvalue...) -} - -func (s *Set) Int16VarLong(p *int16, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*int16Value)(p), name, short, helpvalue...) -} diff --git a/vendor/github.com/pborman/getopt/int32.go b/vendor/github.com/pborman/getopt/int32.go deleted file mode 100644 index b8f34150..00000000 --- a/vendor/github.com/pborman/getopt/int32.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strconv" -) - -type int32Value int32 - -func (i *int32Value) Set(value string, opt Option) error { - v, err := strconv.ParseInt(value, 0, 32) - if err != nil { - if e, ok := err.(*strconv.NumError); ok { - switch e.Err { - case strconv.ErrRange: - err = fmt.Errorf("value out of range: %s", value) - case strconv.ErrSyntax: - err = fmt.Errorf("not a valid number: %s", value) - } - } - return err - } - *i = int32Value(v) - return nil -} - -func (i *int32Value) String() string { - return strconv.FormatInt(int64(*i), 10) -} - -// Int32 creates an option that parses its value as an int32. -func Int32(name rune, value int32, helpvalue ...string) *int32 { - return CommandLine.Int32(name, value, helpvalue...) -} - -func (s *Set) Int32(name rune, value int32, helpvalue ...string) *int32 { - return s.Int32Long("", name, value, helpvalue...) -} - -func Int32Long(name string, short rune, value int32, helpvalue ...string) *int32 { - return CommandLine.Int32Long(name, short, value, helpvalue...) -} - -func (s *Set) Int32Long(name string, short rune, value int32, helpvalue ...string) *int32 { - s.Int32VarLong(&value, name, short, helpvalue...) - return &value -} - -func Int32Var(p *int32, name rune, helpvalue ...string) Option { - return CommandLine.Int32Var(p, name, helpvalue...) -} - -func (s *Set) Int32Var(p *int32, name rune, helpvalue ...string) Option { - return s.Int32VarLong(p, "", name, helpvalue...) -} - -func Int32VarLong(p *int32, name string, short rune, helpvalue ...string) Option { - return CommandLine.Int32VarLong(p, name, short, helpvalue...) -} - -func (s *Set) Int32VarLong(p *int32, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*int32Value)(p), name, short, helpvalue...) -} diff --git a/vendor/github.com/pborman/getopt/int64.go b/vendor/github.com/pborman/getopt/int64.go deleted file mode 100644 index d29e6b4c..00000000 --- a/vendor/github.com/pborman/getopt/int64.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strconv" -) - -type int64Value int64 - -func (i *int64Value) Set(value string, opt Option) error { - v, err := strconv.ParseInt(value, 0, 64) - if err != nil { - if e, ok := err.(*strconv.NumError); ok { - switch e.Err { - case strconv.ErrRange: - err = fmt.Errorf("value out of range: %s", value) - case strconv.ErrSyntax: - err = fmt.Errorf("not a valid number: %s", value) - } - } - return err - } - *i = int64Value(v) - return nil -} - -func (i *int64Value) String() string { - return strconv.FormatInt(int64(*i), 10) -} - -// Int64 creates an option that parses its value as an int64. -func Int64(name rune, value int64, helpvalue ...string) *int64 { - return CommandLine.Int64(name, value, helpvalue...) -} - -func (s *Set) Int64(name rune, value int64, helpvalue ...string) *int64 { - return s.Int64Long("", name, value, helpvalue...) -} - -func Int64Long(name string, short rune, value int64, helpvalue ...string) *int64 { - return CommandLine.Int64Long(name, short, value, helpvalue...) -} - -func (s *Set) Int64Long(name string, short rune, value int64, helpvalue ...string) *int64 { - s.Int64VarLong(&value, name, short, helpvalue...) - return &value -} - -func Int64Var(p *int64, name rune, helpvalue ...string) Option { - return CommandLine.Int64Var(p, name, helpvalue...) -} - -func (s *Set) Int64Var(p *int64, name rune, helpvalue ...string) Option { - return s.Int64VarLong(p, "", name, helpvalue...) -} - -func Int64VarLong(p *int64, name string, short rune, helpvalue ...string) Option { - return CommandLine.Int64VarLong(p, name, short, helpvalue...) -} - -func (s *Set) Int64VarLong(p *int64, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*int64Value)(p), name, short, helpvalue...) -} diff --git a/vendor/github.com/pborman/getopt/list.go b/vendor/github.com/pborman/getopt/list.go deleted file mode 100644 index b9d4267c..00000000 --- a/vendor/github.com/pborman/getopt/list.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import "strings" - -type listValue []string - -func (s *listValue) Set(value string, opt Option) error { - a := strings.Split(value, ",") - // If this is the first time we are seen then nil out the - // default value. - if opt.Count() <= 1 { - *s = nil - } - *s = append(*s, a...) - return nil -} - -func (s *listValue) String() string { - return strings.Join([]string(*s), ",") -} - -// List creates an option that returns a slice of strings. The parameters -// passed are converted from a comma seperated value list into a slice. -// Subsequent occurrences append to the list. -func List(name rune, helpvalue ...string) *[]string { - return CommandLine.List(name, helpvalue...) -} - -func (s *Set) List(name rune, helpvalue ...string) *[]string { - p := []string{} - s.ListVar(&p, name, helpvalue...) - return &p -} - -func ListLong(name string, short rune, helpvalue ...string) *[]string { - return CommandLine.ListLong(name, short, helpvalue...) -} - -func (s *Set) ListLong(name string, short rune, helpvalue ...string) *[]string { - p := []string{} - s.ListVarLong(&p, name, short, helpvalue...) - return &p -} - -// ListVar creats a list option and places the values in p. If p is pointing -// to a list of values then those are considered the default values. The first -// time name is seen in the options the list will be set to list specified by -// the parameter to the option. Subsequent instances of the option will append -// to the list. -func ListVar(p *[]string, name rune, helpvalue ...string) Option { - return CommandLine.ListVar(p, name, helpvalue...) -} - -func (s *Set) ListVar(p *[]string, name rune, helpvalue ...string) Option { - return s.ListVarLong(p, "", name, helpvalue...) -} - -func ListVarLong(p *[]string, name string, short rune, helpvalue ...string) Option { - return CommandLine.ListVarLong(p, name, short, helpvalue...) -} - -func (s *Set) ListVarLong(p *[]string, name string, short rune, helpvalue ...string) Option { - opt := s.VarLong((*listValue)(p), name, short, helpvalue...) - return opt -} diff --git a/vendor/github.com/pborman/getopt/option.go b/vendor/github.com/pborman/getopt/option.go deleted file mode 100644 index 17dbe585..00000000 --- a/vendor/github.com/pborman/getopt/option.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strings" -) - -// An Option can be either a Flag or a Value -type Option interface { - // Name returns the name of the option. If the option has been seen - // then the last way it was referenced (short or long) is returned - // otherwise if there is a short name then this will be the short name - // as a string, else it will be the long name. - Name() string - - // IsFlag returns true if Option is a flag. - IsFlag() bool - - // Seen returns true if the flag was seen. - Seen() bool - - // Count returns the number of times the flag was seen. - Count() int - - // String returns the last value the option was set to. - String() string - - // Value returns the Value of the option. - Value() Value - - // SetOptional makes the value optional. The option and value are - // always a single argument. Either --option or --option=value. In - // the former case the value of the option does not change but the Set() - // will return true and the value returned by Count() is incremented. - // The short form is either -o or -ovalue. SetOptional returns - // the Option - SetOptional() Option - - // SetFlag makes the value a flag. Flags are boolean values and - // normally do not taken a value. They are set to true when seen. - // If a value is passed in the long form then it must be on, case - // insenstive, one of "true", "false", "t", "f", "on", "off", "1", "0". - // SetFlag returns the Option - SetFlag() Option - - // Reset resets the state of the option so it appears it has not - // yet been seen, including resetting the value of the option - // to its original default state. - Reset() -} - -type option struct { - short rune // 0 means no short name - long string // "" means no long name - isLong bool // True if they used the long name - flag bool // true if a boolean flag - defval string // default value - optional bool // true if we take an optional value - help string // help message - where string // file where the option was defined - value Value // current value of option - count int // number of times we have seen this option - name string // name of the value (for usage) - uname string // name of the option (for usage) -} - -// usageName returns the name of the option for printing usage lines in one -// of the following forms: -// -// -f -// --flag -// -f, --flag -// -s value -// --set=value -// -s, --set=value -func (o *option) usageName() string { - // Don't print help messages if we have none and there is only one - // way to specify the option. - if o.help == "" && (o.short == 0 || o.long == "") { - return "" - } - n := "" - - switch { - case o.short != 0 && o.long == "": - n = "-" + string(o.short) - case o.short == 0 && o.long != "": - n = " --" + o.long - case o.short != 0 && o.long != "": - n = "-" + string(o.short) + ", --" + o.long - } - - switch { - case o.flag: - return n - case o.optional: - return n + "[=" + o.name + "]" - case o.long != "": - return n + "=" + o.name - } - return n + " " + o.name -} - -// sortName returns the name to sort the option on. -func (o *option) sortName() string { - if o.short != 0 { - return string(o.short) + o.long - } - return o.long[:1] + o.long -} - -func (o *option) Seen() bool { return o.count > 0 } -func (o *option) Count() int { return o.count } -func (o *option) IsFlag() bool { return o.flag } -func (o *option) String() string { return o.value.String() } -func (o *option) SetOptional() Option { o.optional = true; return o } -func (o *option) SetFlag() Option { o.flag = true; return o } - -func (o *option) Value() Value { - if o == nil { - return nil - } - return o.value -} - -func (o *option) Name() string { - if !o.isLong && o.short != 0 { - return "-" + string(o.short) - } - return "--" + o.long -} - -// Reset rests an option so that it appears it has not yet been seen. -func (o *option) Reset() { - o.isLong = false - o.count = 0 - o.value.Set(o.defval, o) -} - -type optionList []*option - -func (ol optionList) Len() int { return len(ol) } -func (ol optionList) Swap(i, j int) { ol[i], ol[j] = ol[j], ol[i] } -func (ol optionList) Less(i, j int) bool { - // first check the short names (or the first letter of the long name) - // If they are not equal (case insensitive) then we have our answer - n1 := ol[i].sortName() - n2 := ol[j].sortName() - l1 := strings.ToLower(n1) - l2 := strings.ToLower(n2) - if l1 < l2 { - return true - } - if l2 < l1 { - return false - } - return n1 < n2 -} - -// AddOption add the option o to set CommandLine if o is not already in set -// CommandLine. -func AddOption(o Option) { - CommandLine.AddOption(o) -} - -// AddOption add the option o to set s if o is not already in set s. -func (s *Set) AddOption(o Option) { - opt := o.(*option) - for _, eopt := range s.options { - if opt == eopt { - return - } - } - if opt.short != 0 { - if oo, ok := s.shortOptions[opt.short]; ok { - fmt.Fprintf(stderr, "%s: -%c already declared at %s\n", opt.where, opt.short, oo.where) - exit(1) - } - s.shortOptions[opt.short] = opt - } - if opt.long != "" { - if oo, ok := s.longOptions[opt.long]; ok { - fmt.Fprintf(stderr, "%s: --%s already declared at %s\n", opt.where, opt.long, oo.where) - exit(1) - } - s.longOptions[opt.long] = opt - } - s.options = append(s.options, opt) -} diff --git a/vendor/github.com/pborman/getopt/set.go b/vendor/github.com/pborman/getopt/set.go deleted file mode 100644 index 64d9ecf3..00000000 --- a/vendor/github.com/pborman/getopt/set.go +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "io" - "os" - "sort" -) - -// A Termination says why Getopt returned. -type State int - -const ( - InProgress = State(iota) // Getopt is still running - Dash // Returned on "-" - DashDash // Returned on "--" - EndOfOptions // End of options reached - EndOfArguments // No more arguments - Terminated // Terminated by callback function - Failure // Terminated due to error - Unknown // Indicates internal error -) - -type Set struct { - State // State of getopt - - // args are the parameters remaining after parsing the optoins. - args []string - - // program is the name of the program for usage and error messages. - // If not set it will automatically be set to the base name of the - // first argument passed to parse. - program string - - // parameters is what is displayed on the usage line after displaying - // the various options. - parameters string - - usage func() // usage should print the programs usage and exit. - - shortOptions map[rune]*option - longOptions map[string]*option - options optionList -} - -// New returns a newly created option set. -func New() *Set { - s := &Set{ - shortOptions: make(map[rune]*option), - longOptions: make(map[string]*option), - parameters: "[parameters ...]", - } - - s.usage = func() { - s.PrintUsage(stderr) - } - return s -} - -// The default set of command-line options. -var CommandLine = New() - -// PrintUsage calls PrintUsage in the default option set. -func PrintUsage(w io.Writer) { CommandLine.PrintUsage(w) } - -// Usage calls the usage function in the default option set. -func Usage() { CommandLine.usage() } - -// Parse calls Parse in the default option set with the command line arguments -// found in os.Args. -func Parse() { CommandLine.Parse(os.Args) } - -// Getops returns the result of calling Getop in the default option set with the -// command line arguments found in os.Args. The fn function, which may be nil, -// is passed to Getopt. -func Getopt(fn func(Option) bool) error { return CommandLine.Getopt(os.Args, fn) } - -// Arg returns the n'th command-line argument. Arg(0) is the first remaining -// argument after options have been processed. -func Arg(n int) string { - if n >= 0 && n < len(CommandLine.args) { - return CommandLine.args[n] - } - return "" -} - -// Arg returns the n'th argument. Arg(0) is the first remaining -// argument after options have been processed. -func (s *Set) Arg(n int) string { - if n >= 0 && n < len(s.args) { - return s.args[n] - } - return "" -} - -// Args returns the non-option command line arguments. -func Args() []string { - return CommandLine.args -} - -// Args returns the non-option arguments. -func (s *Set) Args() []string { - return s.args -} - -// NArgs returns the number of non-option command line arguments. -func NArgs() int { - return len(CommandLine.args) -} - -// NArgs returns the number of non-option arguments. -func (s *Set) NArgs() int { - return len(s.args) -} - -// SetParameters sets the parameters string for printing the command line -// usage. It defaults to "[parameters ...]" -func SetParameters(parameters string) { - CommandLine.parameters = parameters -} - -// SetParameters sets the parameters string for printing the s's usage. -// It defaults to "[parameters ...]" -func (s *Set) SetParameters(parameters string) { - s.parameters = parameters -} - -// SetProgram sets the program name to program. Nomrally it is determined -// from the zeroth command line argument (see os.Args). -func SetProgram(program string) { - CommandLine.program = program -} - -// SetProgram sets s's program name to program. Nomrally it is determined -// from the zeroth argument passed to Getopt or Parse. -func (s *Set) SetProgram(program string) { - s.program = program -} - -// SetUsage sets the function used by Parse to display the commands usage -// on error. It defaults to calling PrintUsage(os.Stderr). -func SetUsage(usage func()) { - CommandLine.usage = usage -} - -// SetUsage sets the function used by Parse to display usage on error. It -// defaults to calling f.PrintUsage(os.Stderr). -func (s *Set) SetUsage(usage func()) { - s.usage = usage -} - -// Lookup returns the Option associated with name. Name should either be -// a rune (the short name) or a string (the long name). -func Lookup(name interface{}) Option { - return CommandLine.Lookup(name) -} - -// Lookup returns the Option associated with name in s. Name should either be -// a rune (the short name) or a string (the long name). -func (s *Set) Lookup(name interface{}) Option { - switch v := name.(type) { - case rune: - return s.shortOptions[v] - case int: - return s.shortOptions[rune(v)] - case string: - return s.longOptions[v] - } - return nil -} - -// IsSet returns true if the Option associated with name was seen while -// parsing the command line arguments. Name should either be a rune (the -// short name) or a string (the long name). -func IsSet(name interface{}) bool { - return CommandLine.IsSet(name) -} - -// IsSet returns true if the Option associated with name was seen while -// parsing s. Name should either be a rune (the short name) or a string (the -// long name). -func (s *Set) IsSet(name interface{}) bool { - if opt := s.Lookup(name); opt != nil { - return opt.Seen() - } - return false -} - -// GetCount returns the number of times the Option associated with name has been -// seen while parsing the command line arguments. Name should either be a rune -// (the short name) or a string (the long name). -func GetCount(name interface{}) int { - return CommandLine.GetCount(name) -} - -// GetCount returns the number of times the Option associated with name has been -// seen while parsing s's arguments. Name should either be a rune (the short -// name) or a string (the long name). -func (s *Set) GetCount(name interface{}) int { - if opt := s.Lookup(name); opt != nil { - return opt.Count() - } - return 0 -} - -// GetValue returns the final value set to the command-line Option with name. -// If the option has not been seen while parsing s then the default value is -// returned. Name should either be a rune (the short name) or a string (the -// long name). -func GetValue(name interface{}) string { - return CommandLine.GetValue(name) -} - -// GetValue returns the final value set to the Option in s associated with name. -// If the option has not been seen while parsing s then the default value is -// returned. Name should either be a rune (the short name) or a string (the -// long name). -func (s *Set) GetValue(name interface{}) string { - if opt := s.Lookup(name); opt != nil { - return opt.String() - } - return "" -} - -// Visit visits the command-line options in lexicographical order, calling fn -// for each. It visits only those options that have been set. -func Visit(fn func(Option)) { CommandLine.Visit(fn) } - -// Visit visits the options in s in lexicographical order, calling fn -// for each. It visits only those options that have been set. -func (s *Set) Visit(fn func(Option)) { - sort.Sort(s.options) - for _, opt := range s.options { - if opt.count > 0 { - fn(opt) - } - } -} - -// VisitAll visits the options in s in lexicographical order, calling fn -// for each. It visits all options, even those not set. -func VisitAll(fn func(Option)) { CommandLine.VisitAll(fn) } - -// VisitAll visits the command-line flags in lexicographical order, calling fn -// for each. It visits all flags, even those not set. -func (s *Set) VisitAll(fn func(Option)) { - sort.Sort(s.options) - for _, opt := range s.options { - fn(opt) - } -} - -// Reset resets all the command line options to the initial state so it -// appears none of them have been seen. -func Reset() { - CommandLine.Reset() -} - -// Reset resets all the options in s to the initial state so it -// appears none of them have been seen. -func (s *Set) Reset() { - for _, opt := range s.options { - opt.Reset() - } -} diff --git a/vendor/github.com/pborman/getopt/signed.go b/vendor/github.com/pborman/getopt/signed.go deleted file mode 100644 index a0e059cd..00000000 --- a/vendor/github.com/pborman/getopt/signed.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strconv" -) - -type signed int64 - -type SignedLimit struct { - Base int // Base for conversion as per strconv.ParseInt - Bits int // Number of bits as per strconv.ParseInt - Min int64 // Minimum allowed value if both Min and Max are not 0 - Max int64 // Maximum allowed value if both Min and Max are not 0 -} - -var signedLimits = make(map[*signed]*SignedLimit) - -func (n *signed) Set(value string, opt Option) error { - l := signedLimits[n] - if l == nil { - return fmt.Errorf("no limits defined for %s", opt.Name()) - } - v, err := strconv.ParseInt(value, l.Base, l.Bits) - if err != nil { - if e, ok := err.(*strconv.NumError); ok { - switch e.Err { - case strconv.ErrRange: - err = fmt.Errorf("value out of range: %s", value) - case strconv.ErrSyntax: - err = fmt.Errorf("not a valid number: %s", value) - } - } - return err - } - if l.Min != 0 || l.Max != 0 { - if v < l.Min { - return fmt.Errorf("value out of range (<%v): %s", l.Min, value) - } - if v > l.Max { - return fmt.Errorf("value out of range (>%v): %s", l.Max, value) - } - } - *n = signed(v) - return nil -} - -func (n *signed) String() string { - l := signedLimits[n] - if l != nil && l.Base != 0 { - return strconv.FormatInt(int64(*n), l.Base) - } - return strconv.FormatInt(int64(*n), 10) -} - -// Signed creates an option that is stored in an int64 and is constrained -// by the limits pointed to by l. The Max and Min values are only used if -// at least one of the values are not 0. If Base is 0, the base is implied by -// the string's prefix: base 16 for "0x", base 8 for "0", and base 10 otherwise. -func Signed(name rune, value int64, l *SignedLimit, helpvalue ...string) *int64 { - return CommandLine.Signed(name, value, l, helpvalue...) -} - -func (s *Set) Signed(name rune, value int64, l *SignedLimit, helpvalue ...string) *int64 { - return s.SignedLong("", name, value, l, helpvalue...) -} - -func SignedLong(name string, short rune, value int64, l *SignedLimit, helpvalue ...string) *int64 { - return CommandLine.SignedLong(name, short, value, l, helpvalue...) -} - -func (s *Set) SignedLong(name string, short rune, value int64, l *SignedLimit, helpvalue ...string) *int64 { - s.SignedVarLong(&value, name, short, l, helpvalue...) - return &value -} - -func SignedVar(p *int64, name rune, l *SignedLimit, helpvalue ...string) Option { - return CommandLine.SignedVar(p, name, l, helpvalue...) -} - -func (s *Set) SignedVar(p *int64, name rune, l *SignedLimit, helpvalue ...string) Option { - return s.SignedVarLong(p, "", name, l, helpvalue...) -} - -func SignedVarLong(p *int64, name string, short rune, l *SignedLimit, helpvalue ...string) Option { - return CommandLine.SignedVarLong(p, name, short, l, helpvalue...) -} - -func (s *Set) SignedVarLong(p *int64, name string, short rune, l *SignedLimit, helpvalue ...string) Option { - opt := s.VarLong((*signed)(p), name, short, helpvalue...) - if l.Base > 36 || l.Base == 1 || l.Base < 0 { - fmt.Fprintf(stderr, "invalid base for %s: %d\n", opt.Name(), l.Base) - exit(1) - } - if l.Bits < 0 || l.Bits > 64 { - fmt.Fprintf(stderr, "invalid bit size for %s: %d\n", opt.Name(), l.Bits) - exit(1) - } - if l.Min > l.Max { - fmt.Fprintf(stderr, "min greater than max for %s\n", opt.Name()) - exit(1) - } - lim := *l - signedLimits[(*signed)(p)] = &lim - return opt -} diff --git a/vendor/github.com/pborman/getopt/string.go b/vendor/github.com/pborman/getopt/string.go deleted file mode 100644 index 11218674..00000000 --- a/vendor/github.com/pborman/getopt/string.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -type stringValue string - -func (s *stringValue) Set(value string, opt Option) error { - *s = stringValue(value) - return nil -} - -func (s *stringValue) String() string { - return string(*s) -} - -// String returns a value option that stores is value as a string. The -// initial value of the string is passed in value. -func String(name rune, value string, helpvalue ...string) *string { - return CommandLine.String(name, value, helpvalue...) -} - -func (s *Set) String(name rune, value string, helpvalue ...string) *string { - p := value - s.StringVarLong(&p, "", name, helpvalue...) - return &p -} - -func StringLong(name string, short rune, value string, helpvalue ...string) *string { - return CommandLine.StringLong(name, short, value, helpvalue...) -} - -func (s *Set) StringLong(name string, short rune, value string, helpvalue ...string) *string { - s.StringVarLong(&value, name, short, helpvalue...) - return &value -} - -func StringVar(p *string, name rune, helpvalue ...string) Option { - return CommandLine.StringVar(p, name, helpvalue...) -} - -func (s *Set) StringVar(p *string, name rune, helpvalue ...string) Option { - return s.VarLong((*stringValue)(p), "", name, helpvalue...) -} - -func StringVarLong(p *string, name string, short rune, helpvalue ...string) Option { - return CommandLine.StringVarLong(p, name, short, helpvalue...) -} - -func (s *Set) StringVarLong(p *string, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*stringValue)(p), name, short, helpvalue...) -} diff --git a/vendor/github.com/pborman/getopt/uint.go b/vendor/github.com/pborman/getopt/uint.go deleted file mode 100644 index bdb82b4c..00000000 --- a/vendor/github.com/pborman/getopt/uint.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strconv" -) - -type uintValue uint - -func (i *uintValue) Set(value string, opt Option) error { - v, err := strconv.ParseUint(value, 0, strconv.IntSize) - if err != nil { - if e, ok := err.(*strconv.NumError); ok { - switch e.Err { - case strconv.ErrRange: - err = fmt.Errorf("value out of range: %s", value) - case strconv.ErrSyntax: - err = fmt.Errorf("not a valid number: %s", value) - } - } - return err - } - *i = uintValue(v) - return nil -} - -func (i *uintValue) String() string { - return strconv.FormatUint(uint64(*i), 10) -} - -// Uint creates an option that parses its value as an unsigned integer. -func Uint(name rune, value uint, helpvalue ...string) *uint { - return CommandLine.Uint(name, value, helpvalue...) -} - -func (s *Set) Uint(name rune, value uint, helpvalue ...string) *uint { - return s.UintLong("", name, value, helpvalue...) -} - -func UintLong(name string, short rune, value uint, helpvalue ...string) *uint { - return CommandLine.UintLong(name, short, value, helpvalue...) -} - -func (s *Set) UintLong(name string, short rune, value uint, helpvalue ...string) *uint { - s.UintVarLong(&value, name, short, helpvalue...) - return &value -} - -func UintVar(p *uint, name rune, helpvalue ...string) Option { - return CommandLine.UintVar(p, name, helpvalue...) -} - -func (s *Set) UintVar(p *uint, name rune, helpvalue ...string) Option { - return s.UintVarLong(p, "", name, helpvalue...) -} - -func UintVarLong(p *uint, name string, short rune, helpvalue ...string) Option { - return CommandLine.UintVarLong(p, name, short, helpvalue...) -} - -func (s *Set) UintVarLong(p *uint, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*uintValue)(p), name, short, helpvalue...) -} diff --git a/vendor/github.com/pborman/getopt/uint16.go b/vendor/github.com/pborman/getopt/uint16.go deleted file mode 100644 index 92013e0c..00000000 --- a/vendor/github.com/pborman/getopt/uint16.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strconv" -) - -type uint16Value uint16 - -func (i *uint16Value) Set(value string, opt Option) error { - v, err := strconv.ParseUint(value, 0, 16) - if err != nil { - if e, ok := err.(*strconv.NumError); ok { - switch e.Err { - case strconv.ErrRange: - err = fmt.Errorf("value out of range: %s", value) - case strconv.ErrSyntax: - err = fmt.Errorf("not a valid number: %s", value) - } - } - return err - } - *i = uint16Value(v) - return nil -} - -func (i *uint16Value) String() string { - return strconv.FormatUint(uint64(*i), 10) -} - -// Uint16 creates an option that parses its value as an uint16. -func Uint16(name rune, value uint16, helpvalue ...string) *uint16 { - return CommandLine.Uint16(name, value, helpvalue...) -} - -func (s *Set) Uint16(name rune, value uint16, helpvalue ...string) *uint16 { - return s.Uint16Long("", name, value, helpvalue...) -} - -func Uint16Long(name string, short rune, value uint16, helpvalue ...string) *uint16 { - return CommandLine.Uint16Long(name, short, value, helpvalue...) -} - -func (s *Set) Uint16Long(name string, short rune, value uint16, helpvalue ...string) *uint16 { - s.Uint16VarLong(&value, name, short, helpvalue...) - return &value -} - -func Uint16Var(p *uint16, name rune, helpvalue ...string) Option { - return CommandLine.Uint16Var(p, name, helpvalue...) -} - -func (s *Set) Uint16Var(p *uint16, name rune, helpvalue ...string) Option { - return s.Uint16VarLong(p, "", name, helpvalue...) -} - -func Uint16VarLong(p *uint16, name string, short rune, helpvalue ...string) Option { - return CommandLine.Uint16VarLong(p, name, short, helpvalue...) -} - -func (s *Set) Uint16VarLong(p *uint16, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*uint16Value)(p), name, short, helpvalue...) -} diff --git a/vendor/github.com/pborman/getopt/uint32.go b/vendor/github.com/pborman/getopt/uint32.go deleted file mode 100644 index abe911db..00000000 --- a/vendor/github.com/pborman/getopt/uint32.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strconv" -) - -type uint32Value uint32 - -func (i *uint32Value) Set(value string, opt Option) error { - v, err := strconv.ParseUint(value, 0, 32) - if err != nil { - if e, ok := err.(*strconv.NumError); ok { - switch e.Err { - case strconv.ErrRange: - err = fmt.Errorf("value out of range: %s", value) - case strconv.ErrSyntax: - err = fmt.Errorf("not a valid number: %s", value) - } - } - return err - } - *i = uint32Value(v) - return nil -} - -func (i *uint32Value) String() string { - return strconv.FormatUint(uint64(*i), 10) -} - -// Uint32 creates an option that parses its value as an uint32. -func Uint32(name rune, value uint32, helpvalue ...string) *uint32 { - return CommandLine.Uint32(name, value, helpvalue...) -} - -func (s *Set) Uint32(name rune, value uint32, helpvalue ...string) *uint32 { - return s.Uint32Long("", name, value, helpvalue...) -} - -func Uint32Long(name string, short rune, value uint32, helpvalue ...string) *uint32 { - return CommandLine.Uint32Long(name, short, value, helpvalue...) -} - -func (s *Set) Uint32Long(name string, short rune, value uint32, helpvalue ...string) *uint32 { - s.Uint32VarLong(&value, name, short, helpvalue...) - return &value -} - -func Uint32Var(p *uint32, name rune, helpvalue ...string) Option { - return CommandLine.Uint32Var(p, name, helpvalue...) -} - -func (s *Set) Uint32Var(p *uint32, name rune, helpvalue ...string) Option { - return s.Uint32VarLong(p, "", name, helpvalue...) -} - -func Uint32VarLong(p *uint32, name string, short rune, helpvalue ...string) Option { - return CommandLine.Uint32VarLong(p, name, short, helpvalue...) -} - -func (s *Set) Uint32VarLong(p *uint32, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*uint32Value)(p), name, short, helpvalue...) -} diff --git a/vendor/github.com/pborman/getopt/uint64.go b/vendor/github.com/pborman/getopt/uint64.go deleted file mode 100644 index 788e97fc..00000000 --- a/vendor/github.com/pborman/getopt/uint64.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strconv" -) - -type uint64Value uint64 - -func (i *uint64Value) Set(value string, opt Option) error { - v, err := strconv.ParseUint(value, 0, 64) - if err != nil { - if e, ok := err.(*strconv.NumError); ok { - switch e.Err { - case strconv.ErrRange: - err = fmt.Errorf("value out of range: %s", value) - case strconv.ErrSyntax: - err = fmt.Errorf("not a valid number: %s", value) - } - } - return err - } - *i = uint64Value(v) - return nil -} - -func (i *uint64Value) String() string { - return strconv.FormatUint(uint64(*i), 10) -} - -// Uint64 creates an option that parses its value as a uint64. -func Uint64(name rune, value uint64, helpvalue ...string) *uint64 { - return CommandLine.Uint64(name, value, helpvalue...) -} - -func (s *Set) Uint64(name rune, value uint64, helpvalue ...string) *uint64 { - return s.Uint64Long("", name, value, helpvalue...) -} - -func Uint64Long(name string, short rune, value uint64, helpvalue ...string) *uint64 { - return CommandLine.Uint64Long(name, short, value, helpvalue...) -} - -func (s *Set) Uint64Long(name string, short rune, value uint64, helpvalue ...string) *uint64 { - s.Uint64VarLong(&value, name, short, helpvalue...) - return &value -} - -func Uint64Var(p *uint64, name rune, helpvalue ...string) Option { - return CommandLine.Uint64Var(p, name, helpvalue...) -} - -func (s *Set) Uint64Var(p *uint64, name rune, helpvalue ...string) Option { - return s.Uint64VarLong(p, "", name, helpvalue...) -} - -func Uint64VarLong(p *uint64, name string, short rune, helpvalue ...string) Option { - return CommandLine.Uint64VarLong(p, name, short, helpvalue...) -} - -func (s *Set) Uint64VarLong(p *uint64, name string, short rune, helpvalue ...string) Option { - return s.VarLong((*uint64Value)(p), name, short, helpvalue...) -} diff --git a/vendor/github.com/pborman/getopt/unsigned.go b/vendor/github.com/pborman/getopt/unsigned.go deleted file mode 100644 index 3ded0e79..00000000 --- a/vendor/github.com/pborman/getopt/unsigned.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "strconv" -) - -type unsigned uint64 - -type UnsignedLimit struct { - Base int // Base for conversion as per strconv.ParseInt - Bits int // Number of bits as per strconv.ParseInt - Min uint64 // Minimum allowed value if both Min and Max are not 0 - Max uint64 // Maximum allowed value if both Min and Max are not 0 -} - -var unsignedLimits = make(map[*unsigned]*UnsignedLimit) - -func (n *unsigned) Set(value string, opt Option) error { - l := unsignedLimits[n] - if l == nil { - return fmt.Errorf("no limits defined for %s", opt.Name()) - } - v, err := strconv.ParseUint(value, l.Base, l.Bits) - if err != nil { - if e, ok := err.(*strconv.NumError); ok { - switch e.Err { - case strconv.ErrRange: - err = fmt.Errorf("value out of range: %s", value) - case strconv.ErrSyntax: - err = fmt.Errorf("not a valid number: %s", value) - } - } - return err - } - if l.Min != 0 || l.Max != 0 { - if v < l.Min { - return fmt.Errorf("value out of range (<%v): %s", l.Min, value) - } - if v > l.Max { - return fmt.Errorf("value out of range (>%v): %s", l.Max, value) - } - } - *n = unsigned(v) - return nil -} - -func (n *unsigned) String() string { - l := unsignedLimits[n] - if l != nil && l.Base != 0 { - return strconv.FormatUint(uint64(*n), l.Base) - } - return strconv.FormatUint(uint64(*n), 10) -} - -// Unsigned creates an option that is stored in a uint64 and is -// constrained by the limits pointed to by l. The Max and Min values are only -// used if at least one of the values are not 0. If Base is 0, the base is -// implied by the string's prefix: base 16 for "0x", base 8 for "0", and base -// 10 otherwise. -func Unsigned(name rune, value uint64, l *UnsignedLimit, helpvalue ...string) *uint64 { - return CommandLine.Unsigned(name, value, l, helpvalue...) -} - -func (s *Set) Unsigned(name rune, value uint64, l *UnsignedLimit, helpvalue ...string) *uint64 { - return s.UnsignedLong("", name, value, l, helpvalue...) -} - -func UnsignedLong(name string, short rune, value uint64, l *UnsignedLimit, helpvalue ...string) *uint64 { - return CommandLine.UnsignedLong(name, short, value, l, helpvalue...) -} - -func (s *Set) UnsignedLong(name string, short rune, value uint64, l *UnsignedLimit, helpvalue ...string) *uint64 { - s.UnsignedVarLong(&value, name, short, l, helpvalue...) - return &value -} - -func UnsignedVar(p *uint64, name rune, l *UnsignedLimit, helpvalue ...string) Option { - return CommandLine.UnsignedVar(p, name, l, helpvalue...) -} - -func (s *Set) UnsignedVar(p *uint64, name rune, l *UnsignedLimit, helpvalue ...string) Option { - return s.UnsignedVarLong(p, "", name, l, helpvalue...) -} - -func UnsignedVarLong(p *uint64, name string, short rune, l *UnsignedLimit, helpvalue ...string) Option { - return CommandLine.UnsignedVarLong(p, name, short, l, helpvalue...) -} - -func (s *Set) UnsignedVarLong(p *uint64, name string, short rune, l *UnsignedLimit, helpvalue ...string) Option { - opt := s.VarLong((*unsigned)(p), name, short, helpvalue...) - if l.Base > 36 || l.Base == 1 || l.Base < 0 { - fmt.Fprintf(stderr, "invalid base for %s: %d\n", opt.Name(), l.Base) - exit(1) - } - if l.Bits < 0 || l.Bits > 64 { - fmt.Fprintf(stderr, "invalid bit size for %s: %d\n", opt.Name(), l.Bits) - exit(1) - } - if l.Min > l.Max { - fmt.Fprintf(stderr, "min greater than max for %s\n", opt.Name()) - exit(1) - } - lim := *l - unsignedLimits[(*unsigned)(p)] = &lim - return opt -} diff --git a/vendor/github.com/pborman/getopt/var.go b/vendor/github.com/pborman/getopt/var.go deleted file mode 100644 index fd816b99..00000000 --- a/vendor/github.com/pborman/getopt/var.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package getopt - -import ( - "fmt" - "runtime" -) - -// Value is the interface to the dynamic value stored in a flag. (The default -// value is represented as a string.) Set is passed the string to set the -// value to as well as the Option that is being processed. -type Value interface { - Set(string, Option) error - String() string -} - -// Var creates an option of the specified name. The type and value of the option -// are represented by the first argument, of type Value, which typically holds a -// user-defined implementation of Value. All options are ultimately created -// as a Var. -func Var(p Value, name rune, helpvalue ...string) Option { - return CommandLine.VarLong(p, "", name, helpvalue...) -} - -func VarLong(p Value, name string, short rune, helpvalue ...string) Option { - return CommandLine.VarLong(p, name, short, helpvalue...) -} - -func (s *Set) Var(p Value, name rune, helpvalue ...string) Option { - return s.VarLong(p, "", name, helpvalue...) -} - -func (s *Set) VarLong(p Value, name string, short rune, helpvalue ...string) Option { - opt := &option{ - short: short, - long: name, - value: p, - defval: p.String(), - } - - switch len(helpvalue) { - case 2: - opt.name = helpvalue[1] - fallthrough - case 1: - opt.help = helpvalue[0] - case 0: - default: - panic("Too many strings for String helpvalue") - } - if _, file, line, ok := runtime.Caller(1); ok { - opt.where = fmt.Sprintf("%s:%d", file, line) - } - if opt.short == 0 && opt.long == "" { - fmt.Fprintf(stderr, opt.where+": no short or long option given") - exit(1) - } - s.AddOption(opt) - return opt -} diff --git a/vendor/github.com/pmezard/go-difflib/LICENSE b/vendor/github.com/pmezard/go-difflib/LICENSE deleted file mode 100644 index c67dad61..00000000 --- a/vendor/github.com/pmezard/go-difflib/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013, Patrick Mezard -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - The names of its contributors may not be used to endorse or promote -products derived from this software without specific prior written -permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go b/vendor/github.com/pmezard/go-difflib/difflib/difflib.go deleted file mode 100644 index 003e99fa..00000000 --- a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go +++ /dev/null @@ -1,772 +0,0 @@ -// Package difflib is a partial port of Python difflib module. -// -// It provides tools to compare sequences of strings and generate textual diffs. -// -// The following class and functions have been ported: -// -// - SequenceMatcher -// -// - unified_diff -// -// - context_diff -// -// Getting unified diffs was the main goal of the port. Keep in mind this code -// is mostly suitable to output text differences in a human friendly way, there -// are no guarantees generated diffs are consumable by patch(1). -package difflib - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strings" -) - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} - -func calculateRatio(matches, length int) float64 { - if length > 0 { - return 2.0 * float64(matches) / float64(length) - } - return 1.0 -} - -type Match struct { - A int - B int - Size int -} - -type OpCode struct { - Tag byte - I1 int - I2 int - J1 int - J2 int -} - -// SequenceMatcher compares sequence of strings. The basic -// algorithm predates, and is a little fancier than, an algorithm -// published in the late 1980's by Ratcliff and Obershelp under the -// hyperbolic name "gestalt pattern matching". The basic idea is to find -// the longest contiguous matching subsequence that contains no "junk" -// elements (R-O doesn't address junk). The same idea is then applied -// recursively to the pieces of the sequences to the left and to the right -// of the matching subsequence. This does not yield minimal edit -// sequences, but does tend to yield matches that "look right" to people. -// -// SequenceMatcher tries to compute a "human-friendly diff" between two -// sequences. Unlike e.g. UNIX(tm) diff, the fundamental notion is the -// longest *contiguous* & junk-free matching subsequence. That's what -// catches peoples' eyes. The Windows(tm) windiff has another interesting -// notion, pairing up elements that appear uniquely in each sequence. -// That, and the method here, appear to yield more intuitive difference -// reports than does diff. This method appears to be the least vulnerable -// to synching up on blocks of "junk lines", though (like blank lines in -// ordinary text files, or maybe "

" lines in HTML files). That may be -// because this is the only method of the 3 that has a *concept* of -// "junk" . -// -// Timing: Basic R-O is cubic time worst case and quadratic time expected -// case. SequenceMatcher is quadratic time for the worst case and has -// expected-case behavior dependent in a complicated way on how many -// elements the sequences have in common; best case time is linear. -type SequenceMatcher struct { - a []string - b []string - b2j map[string][]int - IsJunk func(string) bool - autoJunk bool - bJunk map[string]struct{} - matchingBlocks []Match - fullBCount map[string]int - bPopular map[string]struct{} - opCodes []OpCode -} - -func NewMatcher(a, b []string) *SequenceMatcher { - m := SequenceMatcher{autoJunk: true} - m.SetSeqs(a, b) - return &m -} - -func NewMatcherWithJunk(a, b []string, autoJunk bool, - isJunk func(string) bool) *SequenceMatcher { - - m := SequenceMatcher{IsJunk: isJunk, autoJunk: autoJunk} - m.SetSeqs(a, b) - return &m -} - -// Set two sequences to be compared. -func (m *SequenceMatcher) SetSeqs(a, b []string) { - m.SetSeq1(a) - m.SetSeq2(b) -} - -// Set the first sequence to be compared. The second sequence to be compared is -// not changed. -// -// SequenceMatcher computes and caches detailed information about the second -// sequence, so if you want to compare one sequence S against many sequences, -// use .SetSeq2(s) once and call .SetSeq1(x) repeatedly for each of the other -// sequences. -// -// See also SetSeqs() and SetSeq2(). -func (m *SequenceMatcher) SetSeq1(a []string) { - if &a == &m.a { - return - } - m.a = a - m.matchingBlocks = nil - m.opCodes = nil -} - -// Set the second sequence to be compared. The first sequence to be compared is -// not changed. -func (m *SequenceMatcher) SetSeq2(b []string) { - if &b == &m.b { - return - } - m.b = b - m.matchingBlocks = nil - m.opCodes = nil - m.fullBCount = nil - m.chainB() -} - -func (m *SequenceMatcher) chainB() { - // Populate line -> index mapping - b2j := map[string][]int{} - for i, s := range m.b { - indices := b2j[s] - indices = append(indices, i) - b2j[s] = indices - } - - // Purge junk elements - m.bJunk = map[string]struct{}{} - if m.IsJunk != nil { - junk := m.bJunk - for s, _ := range b2j { - if m.IsJunk(s) { - junk[s] = struct{}{} - } - } - for s, _ := range junk { - delete(b2j, s) - } - } - - // Purge remaining popular elements - popular := map[string]struct{}{} - n := len(m.b) - if m.autoJunk && n >= 200 { - ntest := n/100 + 1 - for s, indices := range b2j { - if len(indices) > ntest { - popular[s] = struct{}{} - } - } - for s, _ := range popular { - delete(b2j, s) - } - } - m.bPopular = popular - m.b2j = b2j -} - -func (m *SequenceMatcher) isBJunk(s string) bool { - _, ok := m.bJunk[s] - return ok -} - -// Find longest matching block in a[alo:ahi] and b[blo:bhi]. -// -// If IsJunk is not defined: -// -// Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where -// alo <= i <= i+k <= ahi -// blo <= j <= j+k <= bhi -// and for all (i',j',k') meeting those conditions, -// k >= k' -// i <= i' -// and if i == i', j <= j' -// -// In other words, of all maximal matching blocks, return one that -// starts earliest in a, and of all those maximal matching blocks that -// start earliest in a, return the one that starts earliest in b. -// -// If IsJunk is defined, first the longest matching block is -// determined as above, but with the additional restriction that no -// junk element appears in the block. Then that block is extended as -// far as possible by matching (only) junk elements on both sides. So -// the resulting block never matches on junk except as identical junk -// happens to be adjacent to an "interesting" match. -// -// If no blocks match, return (alo, blo, 0). -func (m *SequenceMatcher) findLongestMatch(alo, ahi, blo, bhi int) Match { - // CAUTION: stripping common prefix or suffix would be incorrect. - // E.g., - // ab - // acab - // Longest matching block is "ab", but if common prefix is - // stripped, it's "a" (tied with "b"). UNIX(tm) diff does so - // strip, so ends up claiming that ab is changed to acab by - // inserting "ca" in the middle. That's minimal but unintuitive: - // "it's obvious" that someone inserted "ac" at the front. - // Windiff ends up at the same place as diff, but by pairing up - // the unique 'b's and then matching the first two 'a's. - besti, bestj, bestsize := alo, blo, 0 - - // find longest junk-free match - // during an iteration of the loop, j2len[j] = length of longest - // junk-free match ending with a[i-1] and b[j] - j2len := map[int]int{} - for i := alo; i != ahi; i++ { - // look at all instances of a[i] in b; note that because - // b2j has no junk keys, the loop is skipped if a[i] is junk - newj2len := map[int]int{} - for _, j := range m.b2j[m.a[i]] { - // a[i] matches b[j] - if j < blo { - continue - } - if j >= bhi { - break - } - k := j2len[j-1] + 1 - newj2len[j] = k - if k > bestsize { - besti, bestj, bestsize = i-k+1, j-k+1, k - } - } - j2len = newj2len - } - - // Extend the best by non-junk elements on each end. In particular, - // "popular" non-junk elements aren't in b2j, which greatly speeds - // the inner loop above, but also means "the best" match so far - // doesn't contain any junk *or* popular non-junk elements. - for besti > alo && bestj > blo && !m.isBJunk(m.b[bestj-1]) && - m.a[besti-1] == m.b[bestj-1] { - besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 - } - for besti+bestsize < ahi && bestj+bestsize < bhi && - !m.isBJunk(m.b[bestj+bestsize]) && - m.a[besti+bestsize] == m.b[bestj+bestsize] { - bestsize += 1 - } - - // Now that we have a wholly interesting match (albeit possibly - // empty!), we may as well suck up the matching junk on each - // side of it too. Can't think of a good reason not to, and it - // saves post-processing the (possibly considerable) expense of - // figuring out what to do with it. In the case of an empty - // interesting match, this is clearly the right thing to do, - // because no other kind of match is possible in the regions. - for besti > alo && bestj > blo && m.isBJunk(m.b[bestj-1]) && - m.a[besti-1] == m.b[bestj-1] { - besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 - } - for besti+bestsize < ahi && bestj+bestsize < bhi && - m.isBJunk(m.b[bestj+bestsize]) && - m.a[besti+bestsize] == m.b[bestj+bestsize] { - bestsize += 1 - } - - return Match{A: besti, B: bestj, Size: bestsize} -} - -// Return list of triples describing matching subsequences. -// -// Each triple is of the form (i, j, n), and means that -// a[i:i+n] == b[j:j+n]. The triples are monotonically increasing in -// i and in j. It's also guaranteed that if (i, j, n) and (i', j', n') are -// adjacent triples in the list, and the second is not the last triple in the -// list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe -// adjacent equal blocks. -// -// The last triple is a dummy, (len(a), len(b), 0), and is the only -// triple with n==0. -func (m *SequenceMatcher) GetMatchingBlocks() []Match { - if m.matchingBlocks != nil { - return m.matchingBlocks - } - - var matchBlocks func(alo, ahi, blo, bhi int, matched []Match) []Match - matchBlocks = func(alo, ahi, blo, bhi int, matched []Match) []Match { - match := m.findLongestMatch(alo, ahi, blo, bhi) - i, j, k := match.A, match.B, match.Size - if match.Size > 0 { - if alo < i && blo < j { - matched = matchBlocks(alo, i, blo, j, matched) - } - matched = append(matched, match) - if i+k < ahi && j+k < bhi { - matched = matchBlocks(i+k, ahi, j+k, bhi, matched) - } - } - return matched - } - matched := matchBlocks(0, len(m.a), 0, len(m.b), nil) - - // It's possible that we have adjacent equal blocks in the - // matching_blocks list now. - nonAdjacent := []Match{} - i1, j1, k1 := 0, 0, 0 - for _, b := range matched { - // Is this block adjacent to i1, j1, k1? - i2, j2, k2 := b.A, b.B, b.Size - if i1+k1 == i2 && j1+k1 == j2 { - // Yes, so collapse them -- this just increases the length of - // the first block by the length of the second, and the first - // block so lengthened remains the block to compare against. - k1 += k2 - } else { - // Not adjacent. Remember the first block (k1==0 means it's - // the dummy we started with), and make the second block the - // new block to compare against. - if k1 > 0 { - nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) - } - i1, j1, k1 = i2, j2, k2 - } - } - if k1 > 0 { - nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) - } - - nonAdjacent = append(nonAdjacent, Match{len(m.a), len(m.b), 0}) - m.matchingBlocks = nonAdjacent - return m.matchingBlocks -} - -// Return list of 5-tuples describing how to turn a into b. -// -// Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple -// has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the -// tuple preceding it, and likewise for j1 == the previous j2. -// -// The tags are characters, with these meanings: -// -// 'r' (replace): a[i1:i2] should be replaced by b[j1:j2] -// -// 'd' (delete): a[i1:i2] should be deleted, j1==j2 in this case. -// -// 'i' (insert): b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case. -// -// 'e' (equal): a[i1:i2] == b[j1:j2] -func (m *SequenceMatcher) GetOpCodes() []OpCode { - if m.opCodes != nil { - return m.opCodes - } - i, j := 0, 0 - matching := m.GetMatchingBlocks() - opCodes := make([]OpCode, 0, len(matching)) - for _, m := range matching { - // invariant: we've pumped out correct diffs to change - // a[:i] into b[:j], and the next matching block is - // a[ai:ai+size] == b[bj:bj+size]. So we need to pump - // out a diff to change a[i:ai] into b[j:bj], pump out - // the matching block, and move (i,j) beyond the match - ai, bj, size := m.A, m.B, m.Size - tag := byte(0) - if i < ai && j < bj { - tag = 'r' - } else if i < ai { - tag = 'd' - } else if j < bj { - tag = 'i' - } - if tag > 0 { - opCodes = append(opCodes, OpCode{tag, i, ai, j, bj}) - } - i, j = ai+size, bj+size - // the list of matching blocks is terminated by a - // sentinel with size 0 - if size > 0 { - opCodes = append(opCodes, OpCode{'e', ai, i, bj, j}) - } - } - m.opCodes = opCodes - return m.opCodes -} - -// Isolate change clusters by eliminating ranges with no changes. -// -// Return a generator of groups with up to n lines of context. -// Each group is in the same format as returned by GetOpCodes(). -func (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode { - if n < 0 { - n = 3 - } - codes := m.GetOpCodes() - if len(codes) == 0 { - codes = []OpCode{OpCode{'e', 0, 1, 0, 1}} - } - // Fixup leading and trailing groups if they show no changes. - if codes[0].Tag == 'e' { - c := codes[0] - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[0] = OpCode{c.Tag, max(i1, i2-n), i2, max(j1, j2-n), j2} - } - if codes[len(codes)-1].Tag == 'e' { - c := codes[len(codes)-1] - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[len(codes)-1] = OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)} - } - nn := n + n - groups := [][]OpCode{} - group := []OpCode{} - for _, c := range codes { - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - // End the current group and start a new one whenever - // there is a large range with no changes. - if c.Tag == 'e' && i2-i1 > nn { - group = append(group, OpCode{c.Tag, i1, min(i2, i1+n), - j1, min(j2, j1+n)}) - groups = append(groups, group) - group = []OpCode{} - i1, j1 = max(i1, i2-n), max(j1, j2-n) - } - group = append(group, OpCode{c.Tag, i1, i2, j1, j2}) - } - if len(group) > 0 && !(len(group) == 1 && group[0].Tag == 'e') { - groups = append(groups, group) - } - return groups -} - -// Return a measure of the sequences' similarity (float in [0,1]). -// -// Where T is the total number of elements in both sequences, and -// M is the number of matches, this is 2.0*M / T. -// Note that this is 1 if the sequences are identical, and 0 if -// they have nothing in common. -// -// .Ratio() is expensive to compute if you haven't already computed -// .GetMatchingBlocks() or .GetOpCodes(), in which case you may -// want to try .QuickRatio() or .RealQuickRation() first to get an -// upper bound. -func (m *SequenceMatcher) Ratio() float64 { - matches := 0 - for _, m := range m.GetMatchingBlocks() { - matches += m.Size - } - return calculateRatio(matches, len(m.a)+len(m.b)) -} - -// Return an upper bound on ratio() relatively quickly. -// -// This isn't defined beyond that it is an upper bound on .Ratio(), and -// is faster to compute. -func (m *SequenceMatcher) QuickRatio() float64 { - // viewing a and b as multisets, set matches to the cardinality - // of their intersection; this counts the number of matches - // without regard to order, so is clearly an upper bound - if m.fullBCount == nil { - m.fullBCount = map[string]int{} - for _, s := range m.b { - m.fullBCount[s] = m.fullBCount[s] + 1 - } - } - - // avail[x] is the number of times x appears in 'b' less the - // number of times we've seen it in 'a' so far ... kinda - avail := map[string]int{} - matches := 0 - for _, s := range m.a { - n, ok := avail[s] - if !ok { - n = m.fullBCount[s] - } - avail[s] = n - 1 - if n > 0 { - matches += 1 - } - } - return calculateRatio(matches, len(m.a)+len(m.b)) -} - -// Return an upper bound on ratio() very quickly. -// -// This isn't defined beyond that it is an upper bound on .Ratio(), and -// is faster to compute than either .Ratio() or .QuickRatio(). -func (m *SequenceMatcher) RealQuickRatio() float64 { - la, lb := len(m.a), len(m.b) - return calculateRatio(min(la, lb), la+lb) -} - -// Convert range to the "ed" format -func formatRangeUnified(start, stop int) string { - // Per the diff spec at http://www.unix.org/single_unix_specification/ - beginning := start + 1 // lines start numbering with one - length := stop - start - if length == 1 { - return fmt.Sprintf("%d", beginning) - } - if length == 0 { - beginning -= 1 // empty ranges begin at line just before the range - } - return fmt.Sprintf("%d,%d", beginning, length) -} - -// Unified diff parameters -type UnifiedDiff struct { - A []string // First sequence lines - FromFile string // First file name - FromDate string // First file time - B []string // Second sequence lines - ToFile string // Second file name - ToDate string // Second file time - Eol string // Headers end of line, defaults to LF - Context int // Number of context lines -} - -// Compare two sequences of lines; generate the delta as a unified diff. -// -// Unified diffs are a compact way of showing line changes and a few -// lines of context. The number of context lines is set by 'n' which -// defaults to three. -// -// By default, the diff control lines (those with ---, +++, or @@) are -// created with a trailing newline. This is helpful so that inputs -// created from file.readlines() result in diffs that are suitable for -// file.writelines() since both the inputs and outputs have trailing -// newlines. -// -// For inputs that do not have trailing newlines, set the lineterm -// argument to "" so that the output will be uniformly newline free. -// -// The unidiff format normally has a header for filenames and modification -// times. Any or all of these may be specified using strings for -// 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. -// The modification times are normally expressed in the ISO 8601 format. -func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error { - buf := bufio.NewWriter(writer) - defer buf.Flush() - wf := func(format string, args ...interface{}) error { - _, err := buf.WriteString(fmt.Sprintf(format, args...)) - return err - } - ws := func(s string) error { - _, err := buf.WriteString(s) - return err - } - - if len(diff.Eol) == 0 { - diff.Eol = "\n" - } - - started := false - m := NewMatcher(diff.A, diff.B) - for _, g := range m.GetGroupedOpCodes(diff.Context) { - if !started { - started = true - fromDate := "" - if len(diff.FromDate) > 0 { - fromDate = "\t" + diff.FromDate - } - toDate := "" - if len(diff.ToDate) > 0 { - toDate = "\t" + diff.ToDate - } - if diff.FromFile != "" || diff.ToFile != "" { - err := wf("--- %s%s%s", diff.FromFile, fromDate, diff.Eol) - if err != nil { - return err - } - err = wf("+++ %s%s%s", diff.ToFile, toDate, diff.Eol) - if err != nil { - return err - } - } - } - first, last := g[0], g[len(g)-1] - range1 := formatRangeUnified(first.I1, last.I2) - range2 := formatRangeUnified(first.J1, last.J2) - if err := wf("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil { - return err - } - for _, c := range g { - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - if c.Tag == 'e' { - for _, line := range diff.A[i1:i2] { - if err := ws(" " + line); err != nil { - return err - } - } - continue - } - if c.Tag == 'r' || c.Tag == 'd' { - for _, line := range diff.A[i1:i2] { - if err := ws("-" + line); err != nil { - return err - } - } - } - if c.Tag == 'r' || c.Tag == 'i' { - for _, line := range diff.B[j1:j2] { - if err := ws("+" + line); err != nil { - return err - } - } - } - } - } - return nil -} - -// Like WriteUnifiedDiff but returns the diff a string. -func GetUnifiedDiffString(diff UnifiedDiff) (string, error) { - w := &bytes.Buffer{} - err := WriteUnifiedDiff(w, diff) - return string(w.Bytes()), err -} - -// Convert range to the "ed" format. -func formatRangeContext(start, stop int) string { - // Per the diff spec at http://www.unix.org/single_unix_specification/ - beginning := start + 1 // lines start numbering with one - length := stop - start - if length == 0 { - beginning -= 1 // empty ranges begin at line just before the range - } - if length <= 1 { - return fmt.Sprintf("%d", beginning) - } - return fmt.Sprintf("%d,%d", beginning, beginning+length-1) -} - -type ContextDiff UnifiedDiff - -// Compare two sequences of lines; generate the delta as a context diff. -// -// Context diffs are a compact way of showing line changes and a few -// lines of context. The number of context lines is set by diff.Context -// which defaults to three. -// -// By default, the diff control lines (those with *** or ---) are -// created with a trailing newline. -// -// For inputs that do not have trailing newlines, set the diff.Eol -// argument to "" so that the output will be uniformly newline free. -// -// The context diff format normally has a header for filenames and -// modification times. Any or all of these may be specified using -// strings for diff.FromFile, diff.ToFile, diff.FromDate, diff.ToDate. -// The modification times are normally expressed in the ISO 8601 format. -// If not specified, the strings default to blanks. -func WriteContextDiff(writer io.Writer, diff ContextDiff) error { - buf := bufio.NewWriter(writer) - defer buf.Flush() - var diffErr error - wf := func(format string, args ...interface{}) { - _, err := buf.WriteString(fmt.Sprintf(format, args...)) - if diffErr == nil && err != nil { - diffErr = err - } - } - ws := func(s string) { - _, err := buf.WriteString(s) - if diffErr == nil && err != nil { - diffErr = err - } - } - - if len(diff.Eol) == 0 { - diff.Eol = "\n" - } - - prefix := map[byte]string{ - 'i': "+ ", - 'd': "- ", - 'r': "! ", - 'e': " ", - } - - started := false - m := NewMatcher(diff.A, diff.B) - for _, g := range m.GetGroupedOpCodes(diff.Context) { - if !started { - started = true - fromDate := "" - if len(diff.FromDate) > 0 { - fromDate = "\t" + diff.FromDate - } - toDate := "" - if len(diff.ToDate) > 0 { - toDate = "\t" + diff.ToDate - } - if diff.FromFile != "" || diff.ToFile != "" { - wf("*** %s%s%s", diff.FromFile, fromDate, diff.Eol) - wf("--- %s%s%s", diff.ToFile, toDate, diff.Eol) - } - } - - first, last := g[0], g[len(g)-1] - ws("***************" + diff.Eol) - - range1 := formatRangeContext(first.I1, last.I2) - wf("*** %s ****%s", range1, diff.Eol) - for _, c := range g { - if c.Tag == 'r' || c.Tag == 'd' { - for _, cc := range g { - if cc.Tag == 'i' { - continue - } - for _, line := range diff.A[cc.I1:cc.I2] { - ws(prefix[cc.Tag] + line) - } - } - break - } - } - - range2 := formatRangeContext(first.J1, last.J2) - wf("--- %s ----%s", range2, diff.Eol) - for _, c := range g { - if c.Tag == 'r' || c.Tag == 'i' { - for _, cc := range g { - if cc.Tag == 'd' { - continue - } - for _, line := range diff.B[cc.J1:cc.J2] { - ws(prefix[cc.Tag] + line) - } - } - break - } - } - } - return diffErr -} - -// Like WriteContextDiff but returns the diff a string. -func GetContextDiffString(diff ContextDiff) (string, error) { - w := &bytes.Buffer{} - err := WriteContextDiff(w, diff) - return string(w.Bytes()), err -} - -// Split a string on "\n" while preserving them. The output can be used -// as input for UnifiedDiff and ContextDiff structures. -func SplitLines(s string) []string { - lines := strings.SplitAfter(s, "\n") - lines[len(lines)-1] += "\n" - return lines -} diff --git a/vendor/github.com/stretchr/testify/LICENSE b/vendor/github.com/stretchr/testify/LICENSE deleted file mode 100644 index 473b670a..00000000 --- a/vendor/github.com/stretchr/testify/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell - -Please consider promoting this project if you find it useful. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT -OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go b/vendor/github.com/stretchr/testify/assert/assertion_format.go deleted file mode 100644 index 3e172f2c..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go +++ /dev/null @@ -1,405 +0,0 @@ -/* -* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen -* THIS FILE MUST NOT BE EDITED BY HAND - */ - -package assert - -import ( - http "net/http" - url "net/url" - time "time" -) - -// Conditionf uses a Comparison to assert a complex condition. -func Conditionf(t TestingT, comp Comparison, msg string, args ...interface{}) bool { - return Condition(t, comp, append([]interface{}{msg}, args...)...) -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// assert.Containsf(t, "Hello World", "World", "error message %s", "formatted") -// assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") -// assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { - return Contains(t, s, contains, append([]interface{}{msg}, args...)...) -} - -// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. -func DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool { - return DirExists(t, path, append([]interface{}{msg}, args...)...) -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")) -// -// Returns whether the assertion was successful (true) or not (false). -func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool { - return ElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...) -} - -// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// assert.Emptyf(t, obj, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - return Empty(t, object, append([]interface{}{msg}, args...)...) -} - -// Equalf asserts that two objects are equal. -// -// assert.Equalf(t, 123, 123, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - return Equal(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) bool { - return EqualError(t, theError, errString, append([]interface{}{msg}, args...)...) -} - -// EqualValuesf asserts that two objects are equal or convertable to the same types -// and equal. -// -// assert.EqualValuesf(t, uint32(123, "error message %s", "formatted"), int32(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - return EqualValues(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if assert.Errorf(t, err, "error message %s", "formatted") { -// assert.Equal(t, expectedErrorf, err) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func Errorf(t TestingT, err error, msg string, args ...interface{}) bool { - return Error(t, err, append([]interface{}{msg}, args...)...) -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// assert.Exactlyf(t, int32(123, "error message %s", "formatted"), int64(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - return Exactly(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Failf reports a failure through -func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) bool { - return Fail(t, failureMessage, append([]interface{}{msg}, args...)...) -} - -// FailNowf fails test -func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) bool { - return FailNow(t, failureMessage, append([]interface{}{msg}, args...)...) -} - -// Falsef asserts that the specified value is false. -// -// assert.Falsef(t, myBool, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Falsef(t TestingT, value bool, msg string, args ...interface{}) bool { - return False(t, value, append([]interface{}{msg}, args...)...) -} - -// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. -func FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool { - return FileExists(t, path, append([]interface{}{msg}, args...)...) -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// assert.HTTPBodyContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - return HTTPBodyContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// assert.HTTPBodyNotContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - return HTTPBodyNotContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). -func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - return HTTPError(t, handler, method, url, values, append([]interface{}{msg}, args...)...) -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). -func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - return HTTPRedirect(t, handler, method, url, values, append([]interface{}{msg}, args...)...) -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - return HTTPSuccess(t, handler, method, url, values, append([]interface{}{msg}, args...)...) -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// assert.Implementsf(t, (*MyInterface, "error message %s", "formatted")(nil), new(MyObject)) -func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { - return Implements(t, interfaceObject, object, append([]interface{}{msg}, args...)...) -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// assert.InDeltaf(t, math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01) -// -// Returns whether the assertion was successful (true) or not (false). -func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - return InDelta(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - return InDeltaMapValues(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - return InDeltaSlice(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -// -// Returns whether the assertion was successful (true) or not (false). -func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - return InEpsilon(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...) -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - return InEpsilonSlice(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...) -} - -// IsTypef asserts that the specified objects are of the same type. -func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) bool { - return IsType(t, expectedType, object, append([]interface{}{msg}, args...)...) -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { - return JSONEq(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// assert.Lenf(t, mySlice, 3, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) bool { - return Len(t, object, length, append([]interface{}{msg}, args...)...) -} - -// Nilf asserts that the specified object is nil. -// -// assert.Nilf(t, err, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - return Nil(t, object, append([]interface{}{msg}, args...)...) -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if assert.NoErrorf(t, err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool { - return NoError(t, err, append([]interface{}{msg}, args...)...) -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { - return NotContains(t, s, contains, append([]interface{}{msg}, args...)...) -} - -// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if assert.NotEmptyf(t, obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - return NotEmpty(t, object, append([]interface{}{msg}, args...)...) -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - return NotEqual(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// NotNilf asserts that the specified object is not nil. -// -// assert.NotNilf(t, err, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - return NotNil(t, object, append([]interface{}{msg}, args...)...) -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { - return NotPanics(t, f, append([]interface{}{msg}, args...)...) -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// assert.NotRegexpf(t, regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting") -// assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { - return NotRegexp(t, rx, str, append([]interface{}{msg}, args...)...) -} - -// NotSubsetf asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { - return NotSubset(t, list, subset, append([]interface{}{msg}, args...)...) -} - -// NotZerof asserts that i is not the zero value for its type and returns the truth. -func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { - return NotZero(t, i, append([]interface{}{msg}, args...)...) -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { - return Panics(t, f, append([]interface{}{msg}, args...)...) -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { - return PanicsWithValue(t, expected, f, append([]interface{}{msg}, args...)...) -} - -// Regexpf asserts that a specified regexp matches a string. -// -// assert.Regexpf(t, regexp.MustCompile("start", "error message %s", "formatted"), "it's starting") -// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { - return Regexp(t, rx, str, append([]interface{}{msg}, args...)...) -} - -// Subsetf asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// assert.Subsetf(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { - return Subset(t, list, subset, append([]interface{}{msg}, args...)...) -} - -// Truef asserts that the specified value is true. -// -// assert.Truef(t, myBool, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Truef(t TestingT, value bool, msg string, args ...interface{}) bool { - return True(t, value, append([]interface{}{msg}, args...)...) -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { - return WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// Zerof asserts that i is the zero value for its type and returns the truth. -func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { - return Zero(t, i, append([]interface{}{msg}, args...)...) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl deleted file mode 100644 index c5cc66f4..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -{{.CommentFormat}} -func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { - return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/vendor/github.com/stretchr/testify/assert/assertion_forward.go deleted file mode 100644 index 7c4f497b..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go +++ /dev/null @@ -1,798 +0,0 @@ -/* -* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen -* THIS FILE MUST NOT BE EDITED BY HAND - */ - -package assert - -import ( - http "net/http" - url "net/url" - time "time" -) - -// Condition uses a Comparison to assert a complex condition. -func (a *Assertions) Condition(comp Comparison, msgAndArgs ...interface{}) bool { - return Condition(a.t, comp, msgAndArgs...) -} - -// Conditionf uses a Comparison to assert a complex condition. -func (a *Assertions) Conditionf(comp Comparison, msg string, args ...interface{}) bool { - return Conditionf(a.t, comp, msg, args...) -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Contains("Hello World", "World") -// a.Contains(["Hello", "World"], "World") -// a.Contains({"Hello": "World"}, "Hello") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { - return Contains(a.t, s, contains, msgAndArgs...) -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Containsf("Hello World", "World", "error message %s", "formatted") -// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") -// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { - return Containsf(a.t, s, contains, msg, args...) -} - -// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool { - return DirExists(a.t, path, msgAndArgs...) -} - -// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bool { - return DirExistsf(a.t, path, msg, args...) -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2])) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool { - return ElementsMatch(a.t, listA, listB, msgAndArgs...) -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool { - return ElementsMatchf(a.t, listA, listB, msg, args...) -} - -// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// a.Empty(obj) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { - return Empty(a.t, object, msgAndArgs...) -} - -// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// a.Emptyf(obj, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) bool { - return Emptyf(a.t, object, msg, args...) -} - -// Equal asserts that two objects are equal. -// -// a.Equal(123, 123) -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - return Equal(a.t, expected, actual, msgAndArgs...) -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualError(err, expectedErrorString) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) bool { - return EqualError(a.t, theError, errString, msgAndArgs...) -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) bool { - return EqualErrorf(a.t, theError, errString, msg, args...) -} - -// EqualValues asserts that two objects are equal or convertable to the same types -// and equal. -// -// a.EqualValues(uint32(123), int32(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - return EqualValues(a.t, expected, actual, msgAndArgs...) -} - -// EqualValuesf asserts that two objects are equal or convertable to the same types -// and equal. -// -// a.EqualValuesf(uint32(123, "error message %s", "formatted"), int32(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - return EqualValuesf(a.t, expected, actual, msg, args...) -} - -// Equalf asserts that two objects are equal. -// -// a.Equalf(123, 123, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - return Equalf(a.t, expected, actual, msg, args...) -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if a.Error(err) { -// assert.Equal(t, expectedError, err) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Error(err error, msgAndArgs ...interface{}) bool { - return Error(a.t, err, msgAndArgs...) -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if a.Errorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedErrorf, err) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool { - return Errorf(a.t, err, msg, args...) -} - -// Exactly asserts that two objects are equal in value and type. -// -// a.Exactly(int32(123), int64(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - return Exactly(a.t, expected, actual, msgAndArgs...) -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// a.Exactlyf(int32(123, "error message %s", "formatted"), int64(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - return Exactlyf(a.t, expected, actual, msg, args...) -} - -// Fail reports a failure through -func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) bool { - return Fail(a.t, failureMessage, msgAndArgs...) -} - -// FailNow fails test -func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) bool { - return FailNow(a.t, failureMessage, msgAndArgs...) -} - -// FailNowf fails test -func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) bool { - return FailNowf(a.t, failureMessage, msg, args...) -} - -// Failf reports a failure through -func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) bool { - return Failf(a.t, failureMessage, msg, args...) -} - -// False asserts that the specified value is false. -// -// a.False(myBool) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool { - return False(a.t, value, msgAndArgs...) -} - -// Falsef asserts that the specified value is false. -// -// a.Falsef(myBool, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) bool { - return Falsef(a.t, value, msg, args...) -} - -// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool { - return FileExists(a.t, path, msgAndArgs...) -} - -// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) bool { - return FileExistsf(a.t, path, msg, args...) -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContains(myHandler, "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - return HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContainsf(myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - return HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContains(myHandler, "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - return HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContainsf(myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - return HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { - return HTTPError(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). -func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - return HTTPErrorf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { - return HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). -func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - return HTTPRedirectf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { - return HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// a.HTTPSuccessf(myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - return HTTPSuccessf(a.t, handler, method, url, values, msg, args...) -} - -// Implements asserts that an object is implemented by the specified interface. -// -// a.Implements((*MyInterface)(nil), new(MyObject)) -func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { - return Implements(a.t, interfaceObject, object, msgAndArgs...) -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// a.Implementsf((*MyInterface, "error message %s", "formatted")(nil), new(MyObject)) -func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { - return Implementsf(a.t, interfaceObject, object, msg, args...) -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// a.InDelta(math.Pi, (22 / 7.0), 0.01) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - return InDelta(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - return InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - return InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - return InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - return InDeltaSlicef(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// a.InDeltaf(math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - return InDeltaf(a.t, expected, actual, delta, msg, args...) -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - return InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - return InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - return InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...) -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - return InEpsilonf(a.t, expected, actual, epsilon, msg, args...) -} - -// IsType asserts that the specified objects are of the same type. -func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool { - return IsType(a.t, expectedType, object, msgAndArgs...) -} - -// IsTypef asserts that the specified objects are of the same type. -func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) bool { - return IsTypef(a.t, expectedType, object, msg, args...) -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool { - return JSONEq(a.t, expected, actual, msgAndArgs...) -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) bool { - return JSONEqf(a.t, expected, actual, msg, args...) -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// a.Len(mySlice, 3) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool { - return Len(a.t, object, length, msgAndArgs...) -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// a.Lenf(mySlice, 3, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) bool { - return Lenf(a.t, object, length, msg, args...) -} - -// Nil asserts that the specified object is nil. -// -// a.Nil(err) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool { - return Nil(a.t, object, msgAndArgs...) -} - -// Nilf asserts that the specified object is nil. -// -// a.Nilf(err, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) bool { - return Nilf(a.t, object, msg, args...) -} - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoError(err) { -// assert.Equal(t, expectedObj, actualObj) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool { - return NoError(a.t, err, msgAndArgs...) -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoErrorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool { - return NoErrorf(a.t, err, msg, args...) -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContains("Hello World", "Earth") -// a.NotContains(["Hello", "World"], "Earth") -// a.NotContains({"Hello": "World"}, "Earth") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { - return NotContains(a.t, s, contains, msgAndArgs...) -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContainsf("Hello World", "Earth", "error message %s", "formatted") -// a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted") -// a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { - return NotContainsf(a.t, s, contains, msg, args...) -} - -// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if a.NotEmpty(obj) { -// assert.Equal(t, "two", obj[1]) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool { - return NotEmpty(a.t, object, msgAndArgs...) -} - -// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if a.NotEmptyf(obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) bool { - return NotEmptyf(a.t, object, msg, args...) -} - -// NotEqual asserts that the specified values are NOT equal. -// -// a.NotEqual(obj1, obj2) -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - return NotEqual(a.t, expected, actual, msgAndArgs...) -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// a.NotEqualf(obj1, obj2, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - return NotEqualf(a.t, expected, actual, msg, args...) -} - -// NotNil asserts that the specified object is not nil. -// -// a.NotNil(err) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool { - return NotNil(a.t, object, msgAndArgs...) -} - -// NotNilf asserts that the specified object is not nil. -// -// a.NotNilf(err, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) bool { - return NotNilf(a.t, object, msg, args...) -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanics(func(){ RemainCalm() }) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool { - return NotPanics(a.t, f, msgAndArgs...) -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotPanicsf(f PanicTestFunc, msg string, args ...interface{}) bool { - return NotPanicsf(a.t, f, msg, args...) -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// a.NotRegexp(regexp.MustCompile("starts"), "it's starting") -// a.NotRegexp("^start", "it's not starting") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - return NotRegexp(a.t, rx, str, msgAndArgs...) -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// a.NotRegexpf(regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting") -// a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { - return NotRegexpf(a.t, rx, str, msg, args...) -} - -// NotSubset asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// a.NotSubset([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { - return NotSubset(a.t, list, subset, msgAndArgs...) -} - -// NotSubsetf asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// a.NotSubsetf([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { - return NotSubsetf(a.t, list, subset, msg, args...) -} - -// NotZero asserts that i is not the zero value for its type and returns the truth. -func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) bool { - return NotZero(a.t, i, msgAndArgs...) -} - -// NotZerof asserts that i is not the zero value for its type and returns the truth. -func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) bool { - return NotZerof(a.t, i, msg, args...) -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panics(func(){ GoCrazy() }) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool { - return Panics(a.t, f, msgAndArgs...) -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValue("crazy error", func(){ GoCrazy() }) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) PanicsWithValue(expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { - return PanicsWithValue(a.t, expected, f, msgAndArgs...) -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { - return PanicsWithValuef(a.t, expected, f, msg, args...) -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Panicsf(f PanicTestFunc, msg string, args ...interface{}) bool { - return Panicsf(a.t, f, msg, args...) -} - -// Regexp asserts that a specified regexp matches a string. -// -// a.Regexp(regexp.MustCompile("start"), "it's starting") -// a.Regexp("start...$", "it's not starting") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - return Regexp(a.t, rx, str, msgAndArgs...) -} - -// Regexpf asserts that a specified regexp matches a string. -// -// a.Regexpf(regexp.MustCompile("start", "error message %s", "formatted"), "it's starting") -// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { - return Regexpf(a.t, rx, str, msg, args...) -} - -// Subset asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// a.Subset([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { - return Subset(a.t, list, subset, msgAndArgs...) -} - -// Subsetf asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// a.Subsetf([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { - return Subsetf(a.t, list, subset, msg, args...) -} - -// True asserts that the specified value is true. -// -// a.True(myBool) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool { - return True(a.t, value, msgAndArgs...) -} - -// Truef asserts that the specified value is true. -// -// a.Truef(myBool, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Truef(value bool, msg string, args ...interface{}) bool { - return Truef(a.t, value, msg, args...) -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// a.WithinDuration(time.Now(), time.Now(), 10*time.Second) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { - return WithinDuration(a.t, expected, actual, delta, msgAndArgs...) -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { - return WithinDurationf(a.t, expected, actual, delta, msg, args...) -} - -// Zero asserts that i is the zero value for its type and returns the truth. -func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool { - return Zero(a.t, i, msgAndArgs...) -} - -// Zerof asserts that i is the zero value for its type and returns the truth. -func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) bool { - return Zerof(a.t, i, msg, args...) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl deleted file mode 100644 index 99f9acfb..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -{{.CommentWithoutT "a"}} -func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { - return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertions.go b/vendor/github.com/stretchr/testify/assert/assertions.go deleted file mode 100644 index 9d387bc7..00000000 --- a/vendor/github.com/stretchr/testify/assert/assertions.go +++ /dev/null @@ -1,1312 +0,0 @@ -package assert - -import ( - "bufio" - "bytes" - "encoding/json" - "errors" - "fmt" - "math" - "os" - "reflect" - "regexp" - "runtime" - "strings" - "time" - "unicode" - "unicode/utf8" - - "github.com/davecgh/go-spew/spew" - "github.com/pmezard/go-difflib/difflib" -) - -//go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_format.go.tmpl - -// TestingT is an interface wrapper around *testing.T -type TestingT interface { - Errorf(format string, args ...interface{}) -} - -// Comparison a custom function that returns true on success and false on failure -type Comparison func() (success bool) - -/* - Helper functions -*/ - -// ObjectsAreEqual determines if two objects are considered equal. -// -// This function does no assertion of any kind. -func ObjectsAreEqual(expected, actual interface{}) bool { - - if expected == nil || actual == nil { - return expected == actual - } - if exp, ok := expected.([]byte); ok { - act, ok := actual.([]byte) - if !ok { - return false - } else if exp == nil || act == nil { - return exp == nil && act == nil - } - return bytes.Equal(exp, act) - } - return reflect.DeepEqual(expected, actual) - -} - -// ObjectsAreEqualValues gets whether two objects are equal, or if their -// values are equal. -func ObjectsAreEqualValues(expected, actual interface{}) bool { - if ObjectsAreEqual(expected, actual) { - return true - } - - actualType := reflect.TypeOf(actual) - if actualType == nil { - return false - } - expectedValue := reflect.ValueOf(expected) - if expectedValue.IsValid() && expectedValue.Type().ConvertibleTo(actualType) { - // Attempt comparison after type conversion - return reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), actual) - } - - return false -} - -/* CallerInfo is necessary because the assert functions use the testing object -internally, causing it to print the file:line of the assert method, rather than where -the problem actually occurred in calling code.*/ - -// CallerInfo returns an array of strings containing the file and line number -// of each stack frame leading from the current test to the assert call that -// failed. -func CallerInfo() []string { - - pc := uintptr(0) - file := "" - line := 0 - ok := false - name := "" - - callers := []string{} - for i := 0; ; i++ { - pc, file, line, ok = runtime.Caller(i) - if !ok { - // The breaks below failed to terminate the loop, and we ran off the - // end of the call stack. - break - } - - // This is a huge edge case, but it will panic if this is the case, see #180 - if file == "" { - break - } - - f := runtime.FuncForPC(pc) - if f == nil { - break - } - name = f.Name() - - // testing.tRunner is the standard library function that calls - // tests. Subtests are called directly by tRunner, without going through - // the Test/Benchmark/Example function that contains the t.Run calls, so - // with subtests we should break when we hit tRunner, without adding it - // to the list of callers. - if name == "testing.tRunner" { - break - } - - parts := strings.Split(file, "/") - file = parts[len(parts)-1] - if len(parts) > 1 { - dir := parts[len(parts)-2] - if (dir != "assert" && dir != "mock" && dir != "require") || file == "mock_test.go" { - callers = append(callers, fmt.Sprintf("%s:%d", file, line)) - } - } - - // Drop the package - segments := strings.Split(name, ".") - name = segments[len(segments)-1] - if isTest(name, "Test") || - isTest(name, "Benchmark") || - isTest(name, "Example") { - break - } - } - - return callers -} - -// Stolen from the `go test` tool. -// isTest tells whether name looks like a test (or benchmark, according to prefix). -// It is a Test (say) if there is a character after Test that is not a lower-case letter. -// We don't want TesticularCancer. -func isTest(name, prefix string) bool { - if !strings.HasPrefix(name, prefix) { - return false - } - if len(name) == len(prefix) { // "Test" is ok - return true - } - rune, _ := utf8.DecodeRuneInString(name[len(prefix):]) - return !unicode.IsLower(rune) -} - -// getWhitespaceString returns a string that is long enough to overwrite the default -// output from the go testing framework. -func getWhitespaceString() string { - - _, file, line, ok := runtime.Caller(1) - if !ok { - return "" - } - parts := strings.Split(file, "/") - file = parts[len(parts)-1] - - return strings.Repeat(" ", len(fmt.Sprintf("%s:%d: ", file, line))) - -} - -func messageFromMsgAndArgs(msgAndArgs ...interface{}) string { - if len(msgAndArgs) == 0 || msgAndArgs == nil { - return "" - } - if len(msgAndArgs) == 1 { - return msgAndArgs[0].(string) - } - if len(msgAndArgs) > 1 { - return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...) - } - return "" -} - -// Aligns the provided message so that all lines after the first line start at the same location as the first line. -// Assumes that the first line starts at the correct location (after carriage return, tab, label, spacer and tab). -// The longestLabelLen parameter specifies the length of the longest label in the output (required becaues this is the -// basis on which the alignment occurs). -func indentMessageLines(message string, longestLabelLen int) string { - outBuf := new(bytes.Buffer) - - for i, scanner := 0, bufio.NewScanner(strings.NewReader(message)); scanner.Scan(); i++ { - // no need to align first line because it starts at the correct location (after the label) - if i != 0 { - // append alignLen+1 spaces to align with "{{longestLabel}}:" before adding tab - outBuf.WriteString("\n\r\t" + strings.Repeat(" ", longestLabelLen+1) + "\t") - } - outBuf.WriteString(scanner.Text()) - } - - return outBuf.String() -} - -type failNower interface { - FailNow() -} - -// FailNow fails test -func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { - Fail(t, failureMessage, msgAndArgs...) - - // We cannot extend TestingT with FailNow() and - // maintain backwards compatibility, so we fallback - // to panicking when FailNow is not available in - // TestingT. - // See issue #263 - - if t, ok := t.(failNower); ok { - t.FailNow() - } else { - panic("test failed and t is missing `FailNow()`") - } - return false -} - -// Fail reports a failure through -func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { - content := []labeledContent{ - {"Error Trace", strings.Join(CallerInfo(), "\n\r\t\t\t")}, - {"Error", failureMessage}, - } - - // Add test name if the Go version supports it - if n, ok := t.(interface { - Name() string - }); ok { - content = append(content, labeledContent{"Test", n.Name()}) - } - - message := messageFromMsgAndArgs(msgAndArgs...) - if len(message) > 0 { - content = append(content, labeledContent{"Messages", message}) - } - - t.Errorf("%s", "\r"+getWhitespaceString()+labeledOutput(content...)) - - return false -} - -type labeledContent struct { - label string - content string -} - -// labeledOutput returns a string consisting of the provided labeledContent. Each labeled output is appended in the following manner: -// -// \r\t{{label}}:{{align_spaces}}\t{{content}}\n -// -// The initial carriage return is required to undo/erase any padding added by testing.T.Errorf. The "\t{{label}}:" is for the label. -// If a label is shorter than the longest label provided, padding spaces are added to make all the labels match in length. Once this -// alignment is achieved, "\t{{content}}\n" is added for the output. -// -// If the content of the labeledOutput contains line breaks, the subsequent lines are aligned so that they start at the same location as the first line. -func labeledOutput(content ...labeledContent) string { - longestLabel := 0 - for _, v := range content { - if len(v.label) > longestLabel { - longestLabel = len(v.label) - } - } - var output string - for _, v := range content { - output += "\r\t" + v.label + ":" + strings.Repeat(" ", longestLabel-len(v.label)) + "\t" + indentMessageLines(v.content, longestLabel) + "\n" - } - return output -} - -// Implements asserts that an object is implemented by the specified interface. -// -// assert.Implements(t, (*MyInterface)(nil), new(MyObject)) -func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { - interfaceType := reflect.TypeOf(interfaceObject).Elem() - - if object == nil { - return Fail(t, fmt.Sprintf("Cannot check if nil implements %v", interfaceType), msgAndArgs...) - } - if !reflect.TypeOf(object).Implements(interfaceType) { - return Fail(t, fmt.Sprintf("%T must implement %v", object, interfaceType), msgAndArgs...) - } - - return true -} - -// IsType asserts that the specified objects are of the same type. -func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool { - - if !ObjectsAreEqual(reflect.TypeOf(object), reflect.TypeOf(expectedType)) { - return Fail(t, fmt.Sprintf("Object expected to be of type %v, but was %v", reflect.TypeOf(expectedType), reflect.TypeOf(object)), msgAndArgs...) - } - - return true -} - -// Equal asserts that two objects are equal. -// -// assert.Equal(t, 123, 123) -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if err := validateEqualArgs(expected, actual); err != nil { - return Fail(t, fmt.Sprintf("Invalid operation: %#v == %#v (%s)", - expected, actual, err), msgAndArgs...) - } - - if !ObjectsAreEqual(expected, actual) { - diff := diff(expected, actual) - expected, actual = formatUnequalValues(expected, actual) - return Fail(t, fmt.Sprintf("Not equal: \n"+ - "expected: %s\n"+ - "actual : %s%s", expected, actual, diff), msgAndArgs...) - } - - return true - -} - -// formatUnequalValues takes two values of arbitrary types and returns string -// representations appropriate to be presented to the user. -// -// If the values are not of like type, the returned strings will be prefixed -// with the type name, and the value will be enclosed in parenthesis similar -// to a type conversion in the Go grammar. -func formatUnequalValues(expected, actual interface{}) (e string, a string) { - if reflect.TypeOf(expected) != reflect.TypeOf(actual) { - return fmt.Sprintf("%T(%#v)", expected, expected), - fmt.Sprintf("%T(%#v)", actual, actual) - } - - return fmt.Sprintf("%#v", expected), - fmt.Sprintf("%#v", actual) -} - -// EqualValues asserts that two objects are equal or convertable to the same types -// and equal. -// -// assert.EqualValues(t, uint32(123), int32(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - - if !ObjectsAreEqualValues(expected, actual) { - diff := diff(expected, actual) - expected, actual = formatUnequalValues(expected, actual) - return Fail(t, fmt.Sprintf("Not equal: \n"+ - "expected: %s\n"+ - "actual : %s%s", expected, actual, diff), msgAndArgs...) - } - - return true - -} - -// Exactly asserts that two objects are equal in value and type. -// -// assert.Exactly(t, int32(123), int64(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - - aType := reflect.TypeOf(expected) - bType := reflect.TypeOf(actual) - - if aType != bType { - return Fail(t, fmt.Sprintf("Types expected to match exactly\n\r\t%v != %v", aType, bType), msgAndArgs...) - } - - return Equal(t, expected, actual, msgAndArgs...) - -} - -// NotNil asserts that the specified object is not nil. -// -// assert.NotNil(t, err) -// -// Returns whether the assertion was successful (true) or not (false). -func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - if !isNil(object) { - return true - } - return Fail(t, "Expected value not to be nil.", msgAndArgs...) -} - -// isNil checks if a specified object is nil or not, without Failing. -func isNil(object interface{}) bool { - if object == nil { - return true - } - - value := reflect.ValueOf(object) - kind := value.Kind() - if kind >= reflect.Chan && kind <= reflect.Slice && value.IsNil() { - return true - } - - return false -} - -// Nil asserts that the specified object is nil. -// -// assert.Nil(t, err) -// -// Returns whether the assertion was successful (true) or not (false). -func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - if isNil(object) { - return true - } - return Fail(t, fmt.Sprintf("Expected nil, but got: %#v", object), msgAndArgs...) -} - -// isEmpty gets whether the specified object is considered empty or not. -func isEmpty(object interface{}) bool { - - // get nil case out of the way - if object == nil { - return true - } - - objValue := reflect.ValueOf(object) - - switch objValue.Kind() { - // collection types are empty when they have no element - case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice: - return objValue.Len() == 0 - // pointers are empty if nil or if the value they point to is empty - case reflect.Ptr: - if objValue.IsNil() { - return true - } - deref := objValue.Elem().Interface() - return isEmpty(deref) - // for all other types, compare against the zero value - default: - zero := reflect.Zero(objValue.Type()) - return reflect.DeepEqual(object, zero.Interface()) - } -} - -// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// assert.Empty(t, obj) -// -// Returns whether the assertion was successful (true) or not (false). -func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - - pass := isEmpty(object) - if !pass { - Fail(t, fmt.Sprintf("Should be empty, but was %v", object), msgAndArgs...) - } - - return pass - -} - -// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if assert.NotEmpty(t, obj) { -// assert.Equal(t, "two", obj[1]) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - - pass := !isEmpty(object) - if !pass { - Fail(t, fmt.Sprintf("Should NOT be empty, but was %v", object), msgAndArgs...) - } - - return pass - -} - -// getLen try to get length of object. -// return (false, 0) if impossible. -func getLen(x interface{}) (ok bool, length int) { - v := reflect.ValueOf(x) - defer func() { - if e := recover(); e != nil { - ok = false - } - }() - return true, v.Len() -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// assert.Len(t, mySlice, 3) -// -// Returns whether the assertion was successful (true) or not (false). -func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) bool { - ok, l := getLen(object) - if !ok { - return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", object), msgAndArgs...) - } - - if l != length { - return Fail(t, fmt.Sprintf("\"%s\" should have %d item(s), but has %d", object, length, l), msgAndArgs...) - } - return true -} - -// True asserts that the specified value is true. -// -// assert.True(t, myBool) -// -// Returns whether the assertion was successful (true) or not (false). -func True(t TestingT, value bool, msgAndArgs ...interface{}) bool { - - if value != true { - return Fail(t, "Should be true", msgAndArgs...) - } - - return true - -} - -// False asserts that the specified value is false. -// -// assert.False(t, myBool) -// -// Returns whether the assertion was successful (true) or not (false). -func False(t TestingT, value bool, msgAndArgs ...interface{}) bool { - - if value != false { - return Fail(t, "Should be false", msgAndArgs...) - } - - return true - -} - -// NotEqual asserts that the specified values are NOT equal. -// -// assert.NotEqual(t, obj1, obj2) -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if err := validateEqualArgs(expected, actual); err != nil { - return Fail(t, fmt.Sprintf("Invalid operation: %#v != %#v (%s)", - expected, actual, err), msgAndArgs...) - } - - if ObjectsAreEqual(expected, actual) { - return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...) - } - - return true - -} - -// containsElement try loop over the list check if the list includes the element. -// return (false, false) if impossible. -// return (true, false) if element was not found. -// return (true, true) if element was found. -func includeElement(list interface{}, element interface{}) (ok, found bool) { - - listValue := reflect.ValueOf(list) - elementValue := reflect.ValueOf(element) - defer func() { - if e := recover(); e != nil { - ok = false - found = false - } - }() - - if reflect.TypeOf(list).Kind() == reflect.String { - return true, strings.Contains(listValue.String(), elementValue.String()) - } - - if reflect.TypeOf(list).Kind() == reflect.Map { - mapKeys := listValue.MapKeys() - for i := 0; i < len(mapKeys); i++ { - if ObjectsAreEqual(mapKeys[i].Interface(), element) { - return true, true - } - } - return true, false - } - - for i := 0; i < listValue.Len(); i++ { - if ObjectsAreEqual(listValue.Index(i).Interface(), element) { - return true, true - } - } - return true, false - -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// assert.Contains(t, "Hello World", "World") -// assert.Contains(t, ["Hello", "World"], "World") -// assert.Contains(t, {"Hello": "World"}, "Hello") -// -// Returns whether the assertion was successful (true) or not (false). -func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { - - ok, found := includeElement(s, contains) - if !ok { - return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", s), msgAndArgs...) - } - if !found { - return Fail(t, fmt.Sprintf("\"%s\" does not contain \"%s\"", s, contains), msgAndArgs...) - } - - return true - -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// assert.NotContains(t, "Hello World", "Earth") -// assert.NotContains(t, ["Hello", "World"], "Earth") -// assert.NotContains(t, {"Hello": "World"}, "Earth") -// -// Returns whether the assertion was successful (true) or not (false). -func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { - - ok, found := includeElement(s, contains) - if !ok { - return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", s), msgAndArgs...) - } - if found { - return Fail(t, fmt.Sprintf("\"%s\" should not contain \"%s\"", s, contains), msgAndArgs...) - } - - return true - -} - -// Subset asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// assert.Subset(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") -// -// Returns whether the assertion was successful (true) or not (false). -func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { - if subset == nil { - return true // we consider nil to be equal to the nil set - } - - subsetValue := reflect.ValueOf(subset) - defer func() { - if e := recover(); e != nil { - ok = false - } - }() - - listKind := reflect.TypeOf(list).Kind() - subsetKind := reflect.TypeOf(subset).Kind() - - if listKind != reflect.Array && listKind != reflect.Slice { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...) - } - - if subsetKind != reflect.Array && subsetKind != reflect.Slice { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...) - } - - for i := 0; i < subsetValue.Len(); i++ { - element := subsetValue.Index(i).Interface() - ok, found := includeElement(list, element) - if !ok { - return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...) - } - if !found { - return Fail(t, fmt.Sprintf("\"%s\" does not contain \"%s\"", list, element), msgAndArgs...) - } - } - - return true -} - -// NotSubset asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// assert.NotSubset(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") -// -// Returns whether the assertion was successful (true) or not (false). -func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { - if subset == nil { - return Fail(t, fmt.Sprintf("nil is the empty set which is a subset of every set"), msgAndArgs...) - } - - subsetValue := reflect.ValueOf(subset) - defer func() { - if e := recover(); e != nil { - ok = false - } - }() - - listKind := reflect.TypeOf(list).Kind() - subsetKind := reflect.TypeOf(subset).Kind() - - if listKind != reflect.Array && listKind != reflect.Slice { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...) - } - - if subsetKind != reflect.Array && subsetKind != reflect.Slice { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...) - } - - for i := 0; i < subsetValue.Len(); i++ { - element := subsetValue.Index(i).Interface() - ok, found := includeElement(list, element) - if !ok { - return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...) - } - if !found { - return true - } - } - - return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...) -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2])) -// -// Returns whether the assertion was successful (true) or not (false). -func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool) { - if isEmpty(listA) && isEmpty(listB) { - return true - } - - aKind := reflect.TypeOf(listA).Kind() - bKind := reflect.TypeOf(listB).Kind() - - if aKind != reflect.Array && aKind != reflect.Slice { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", listA, aKind), msgAndArgs...) - } - - if bKind != reflect.Array && bKind != reflect.Slice { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", listB, bKind), msgAndArgs...) - } - - aValue := reflect.ValueOf(listA) - bValue := reflect.ValueOf(listB) - - aLen := aValue.Len() - bLen := bValue.Len() - - if aLen != bLen { - return Fail(t, fmt.Sprintf("lengths don't match: %d != %d", aLen, bLen), msgAndArgs...) - } - - // Mark indexes in bValue that we already used - visited := make([]bool, bLen) - for i := 0; i < aLen; i++ { - element := aValue.Index(i).Interface() - found := false - for j := 0; j < bLen; j++ { - if visited[j] { - continue - } - if ObjectsAreEqual(bValue.Index(j).Interface(), element) { - visited[j] = true - found = true - break - } - } - if !found { - return Fail(t, fmt.Sprintf("element %s appears more times in %s than in %s", element, aValue, bValue), msgAndArgs...) - } - } - - return true -} - -// Condition uses a Comparison to assert a complex condition. -func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool { - result := comp() - if !result { - Fail(t, "Condition failed!", msgAndArgs...) - } - return result -} - -// PanicTestFunc defines a func that should be passed to the assert.Panics and assert.NotPanics -// methods, and represents a simple func that takes no arguments, and returns nothing. -type PanicTestFunc func() - -// didPanic returns true if the function passed to it panics. Otherwise, it returns false. -func didPanic(f PanicTestFunc) (bool, interface{}) { - - didPanic := false - var message interface{} - func() { - - defer func() { - if message = recover(); message != nil { - didPanic = true - } - }() - - // call the target function - f() - - }() - - return didPanic, message - -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// assert.Panics(t, func(){ GoCrazy() }) -// -// Returns whether the assertion was successful (true) or not (false). -func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { - - if funcDidPanic, panicValue := didPanic(f); !funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should panic\n\r\tPanic value:\t%v", f, panicValue), msgAndArgs...) - } - - return true -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) -// -// Returns whether the assertion was successful (true) or not (false). -func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { - - funcDidPanic, panicValue := didPanic(f) - if !funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should panic\n\r\tPanic value:\t%v", f, panicValue), msgAndArgs...) - } - if panicValue != expected { - return Fail(t, fmt.Sprintf("func %#v should panic with value:\t%v\n\r\tPanic value:\t%v", f, expected, panicValue), msgAndArgs...) - } - - return true -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// assert.NotPanics(t, func(){ RemainCalm() }) -// -// Returns whether the assertion was successful (true) or not (false). -func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { - - if funcDidPanic, panicValue := didPanic(f); funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should not panic\n\r\tPanic value:\t%v", f, panicValue), msgAndArgs...) - } - - return true -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) -// -// Returns whether the assertion was successful (true) or not (false). -func WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { - - dt := expected.Sub(actual) - if dt < -delta || dt > delta { - return Fail(t, fmt.Sprintf("Max difference between %v and %v allowed is %v, but difference was %v", expected, actual, delta, dt), msgAndArgs...) - } - - return true -} - -func toFloat(x interface{}) (float64, bool) { - var xf float64 - xok := true - - switch xn := x.(type) { - case uint8: - xf = float64(xn) - case uint16: - xf = float64(xn) - case uint32: - xf = float64(xn) - case uint64: - xf = float64(xn) - case int: - xf = float64(xn) - case int8: - xf = float64(xn) - case int16: - xf = float64(xn) - case int32: - xf = float64(xn) - case int64: - xf = float64(xn) - case float32: - xf = float64(xn) - case float64: - xf = float64(xn) - case time.Duration: - xf = float64(xn) - default: - xok = false - } - - return xf, xok -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// assert.InDelta(t, math.Pi, (22 / 7.0), 0.01) -// -// Returns whether the assertion was successful (true) or not (false). -func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - - af, aok := toFloat(expected) - bf, bok := toFloat(actual) - - if !aok || !bok { - return Fail(t, fmt.Sprintf("Parameters must be numerical"), msgAndArgs...) - } - - if math.IsNaN(af) { - return Fail(t, fmt.Sprintf("Expected must not be NaN"), msgAndArgs...) - } - - if math.IsNaN(bf) { - return Fail(t, fmt.Sprintf("Expected %v with delta %v, but was NaN", expected, delta), msgAndArgs...) - } - - dt := af - bf - if dt < -delta || dt > delta { - return Fail(t, fmt.Sprintf("Max difference between %v and %v allowed is %v, but difference was %v", expected, actual, delta, dt), msgAndArgs...) - } - - return true -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if expected == nil || actual == nil || - reflect.TypeOf(actual).Kind() != reflect.Slice || - reflect.TypeOf(expected).Kind() != reflect.Slice { - return Fail(t, fmt.Sprintf("Parameters must be slice"), msgAndArgs...) - } - - actualSlice := reflect.ValueOf(actual) - expectedSlice := reflect.ValueOf(expected) - - for i := 0; i < actualSlice.Len(); i++ { - result := InDelta(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), delta, msgAndArgs...) - if !result { - return result - } - } - - return true -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValues(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if expected == nil || actual == nil || - reflect.TypeOf(actual).Kind() != reflect.Map || - reflect.TypeOf(expected).Kind() != reflect.Map { - return Fail(t, "Arguments must be maps", msgAndArgs...) - } - - expectedMap := reflect.ValueOf(expected) - actualMap := reflect.ValueOf(actual) - - if expectedMap.Len() != actualMap.Len() { - return Fail(t, "Arguments must have the same numbe of keys", msgAndArgs...) - } - - for _, k := range expectedMap.MapKeys() { - ev := expectedMap.MapIndex(k) - av := actualMap.MapIndex(k) - - if !ev.IsValid() { - return Fail(t, fmt.Sprintf("missing key %q in expected map", k), msgAndArgs...) - } - - if !av.IsValid() { - return Fail(t, fmt.Sprintf("missing key %q in actual map", k), msgAndArgs...) - } - - if !InDelta( - t, - ev.Interface(), - av.Interface(), - delta, - msgAndArgs..., - ) { - return false - } - } - - return true -} - -func calcRelativeError(expected, actual interface{}) (float64, error) { - af, aok := toFloat(expected) - if !aok { - return 0, fmt.Errorf("expected value %q cannot be converted to float", expected) - } - if af == 0 { - return 0, fmt.Errorf("expected value must have a value other than zero to calculate the relative error") - } - bf, bok := toFloat(actual) - if !bok { - return 0, fmt.Errorf("actual value %q cannot be converted to float", actual) - } - - return math.Abs(af-bf) / math.Abs(af), nil -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -// -// Returns whether the assertion was successful (true) or not (false). -func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - actualEpsilon, err := calcRelativeError(expected, actual) - if err != nil { - return Fail(t, err.Error(), msgAndArgs...) - } - if actualEpsilon > epsilon { - return Fail(t, fmt.Sprintf("Relative error is too high: %#v (expected)\n"+ - " < %#v (actual)", epsilon, actualEpsilon), msgAndArgs...) - } - - return true -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - if expected == nil || actual == nil || - reflect.TypeOf(actual).Kind() != reflect.Slice || - reflect.TypeOf(expected).Kind() != reflect.Slice { - return Fail(t, fmt.Sprintf("Parameters must be slice"), msgAndArgs...) - } - - actualSlice := reflect.ValueOf(actual) - expectedSlice := reflect.ValueOf(expected) - - for i := 0; i < actualSlice.Len(); i++ { - result := InEpsilon(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), epsilon) - if !result { - return result - } - } - - return true -} - -/* - Errors -*/ - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if assert.NoError(t, err) { -// assert.Equal(t, expectedObj, actualObj) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool { - if err != nil { - return Fail(t, fmt.Sprintf("Received unexpected error:\n%+v", err), msgAndArgs...) - } - - return true -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if assert.Error(t, err) { -// assert.Equal(t, expectedError, err) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func Error(t TestingT, err error, msgAndArgs ...interface{}) bool { - - if err == nil { - return Fail(t, "An error is expected but got nil.", msgAndArgs...) - } - - return true -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// assert.EqualError(t, err, expectedErrorString) -// -// Returns whether the assertion was successful (true) or not (false). -func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) bool { - if !Error(t, theError, msgAndArgs...) { - return false - } - expected := errString - actual := theError.Error() - // don't need to use deep equals here, we know they are both strings - if expected != actual { - return Fail(t, fmt.Sprintf("Error message not equal:\n"+ - "expected: %q\n"+ - "actual : %q", expected, actual), msgAndArgs...) - } - return true -} - -// matchRegexp return true if a specified regexp matches a string. -func matchRegexp(rx interface{}, str interface{}) bool { - - var r *regexp.Regexp - if rr, ok := rx.(*regexp.Regexp); ok { - r = rr - } else { - r = regexp.MustCompile(fmt.Sprint(rx)) - } - - return (r.FindStringIndex(fmt.Sprint(str)) != nil) - -} - -// Regexp asserts that a specified regexp matches a string. -// -// assert.Regexp(t, regexp.MustCompile("start"), "it's starting") -// assert.Regexp(t, "start...$", "it's not starting") -// -// Returns whether the assertion was successful (true) or not (false). -func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - - match := matchRegexp(rx, str) - - if !match { - Fail(t, fmt.Sprintf("Expect \"%v\" to match \"%v\"", str, rx), msgAndArgs...) - } - - return match -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") -// assert.NotRegexp(t, "^start", "it's not starting") -// -// Returns whether the assertion was successful (true) or not (false). -func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - match := matchRegexp(rx, str) - - if match { - Fail(t, fmt.Sprintf("Expect \"%v\" to NOT match \"%v\"", str, rx), msgAndArgs...) - } - - return !match - -} - -// Zero asserts that i is the zero value for its type and returns the truth. -func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { - if i != nil && !reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { - return Fail(t, fmt.Sprintf("Should be zero, but was %v", i), msgAndArgs...) - } - return true -} - -// NotZero asserts that i is not the zero value for its type and returns the truth. -func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { - if i == nil || reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { - return Fail(t, fmt.Sprintf("Should not be zero, but was %v", i), msgAndArgs...) - } - return true -} - -// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. -func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { - info, err := os.Lstat(path) - if err != nil { - if os.IsNotExist(err) { - return Fail(t, fmt.Sprintf("unable to find file %q", path), msgAndArgs...) - } - return Fail(t, fmt.Sprintf("error when running os.Lstat(%q): %s", path, err), msgAndArgs...) - } - if info.IsDir() { - return Fail(t, fmt.Sprintf("%q is a directory", path), msgAndArgs...) - } - return true -} - -// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. -func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { - info, err := os.Lstat(path) - if err != nil { - if os.IsNotExist(err) { - return Fail(t, fmt.Sprintf("unable to find file %q", path), msgAndArgs...) - } - return Fail(t, fmt.Sprintf("error when running os.Lstat(%q): %s", path, err), msgAndArgs...) - } - if !info.IsDir() { - return Fail(t, fmt.Sprintf("%q is a file", path), msgAndArgs...) - } - return true -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -// -// Returns whether the assertion was successful (true) or not (false). -func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool { - var expectedJSONAsInterface, actualJSONAsInterface interface{} - - if err := json.Unmarshal([]byte(expected), &expectedJSONAsInterface); err != nil { - return Fail(t, fmt.Sprintf("Expected value ('%s') is not valid json.\nJSON parsing error: '%s'", expected, err.Error()), msgAndArgs...) - } - - if err := json.Unmarshal([]byte(actual), &actualJSONAsInterface); err != nil { - return Fail(t, fmt.Sprintf("Input ('%s') needs to be valid json.\nJSON parsing error: '%s'", actual, err.Error()), msgAndArgs...) - } - - return Equal(t, expectedJSONAsInterface, actualJSONAsInterface, msgAndArgs...) -} - -func typeAndKind(v interface{}) (reflect.Type, reflect.Kind) { - t := reflect.TypeOf(v) - k := t.Kind() - - if k == reflect.Ptr { - t = t.Elem() - k = t.Kind() - } - return t, k -} - -// diff returns a diff of both values as long as both are of the same type and -// are a struct, map, slice or array. Otherwise it returns an empty string. -func diff(expected interface{}, actual interface{}) string { - if expected == nil || actual == nil { - return "" - } - - et, ek := typeAndKind(expected) - at, _ := typeAndKind(actual) - - if et != at { - return "" - } - - if ek != reflect.Struct && ek != reflect.Map && ek != reflect.Slice && ek != reflect.Array { - return "" - } - - e := spewConfig.Sdump(expected) - a := spewConfig.Sdump(actual) - - diff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{ - A: difflib.SplitLines(e), - B: difflib.SplitLines(a), - FromFile: "Expected", - FromDate: "", - ToFile: "Actual", - ToDate: "", - Context: 1, - }) - - return "\n\nDiff:\n" + diff -} - -// validateEqualArgs checks whether provided arguments can be safely used in the -// Equal/NotEqual functions. -func validateEqualArgs(expected, actual interface{}) error { - if isFunction(expected) || isFunction(actual) { - return errors.New("cannot take func type as argument") - } - return nil -} - -func isFunction(arg interface{}) bool { - if arg == nil { - return false - } - return reflect.TypeOf(arg).Kind() == reflect.Func -} - -var spewConfig = spew.ConfigState{ - Indent: " ", - DisablePointerAddresses: true, - DisableCapacities: true, - SortKeys: true, -} diff --git a/vendor/github.com/stretchr/testify/assert/doc.go b/vendor/github.com/stretchr/testify/assert/doc.go deleted file mode 100644 index c9dccc4d..00000000 --- a/vendor/github.com/stretchr/testify/assert/doc.go +++ /dev/null @@ -1,45 +0,0 @@ -// Package assert provides a set of comprehensive testing tools for use with the normal Go testing system. -// -// Example Usage -// -// The following is a complete example using assert in a standard test function: -// import ( -// "testing" -// "github.com/stretchr/testify/assert" -// ) -// -// func TestSomething(t *testing.T) { -// -// var a string = "Hello" -// var b string = "Hello" -// -// assert.Equal(t, a, b, "The two words should be the same.") -// -// } -// -// if you assert many times, use the format below: -// -// import ( -// "testing" -// "github.com/stretchr/testify/assert" -// ) -// -// func TestSomething(t *testing.T) { -// assert := assert.New(t) -// -// var a string = "Hello" -// var b string = "Hello" -// -// assert.Equal(a, b, "The two words should be the same.") -// } -// -// Assertions -// -// Assertions allow you to easily write test code, and are global funcs in the `assert` package. -// All assertion functions take, as the first argument, the `*testing.T` object provided by the -// testing framework. This allows the assertion funcs to write the failings and other details to -// the correct place. -// -// Every assertion function also takes an optional string message as the final argument, -// allowing custom error messages to be appended to the message the assertion method outputs. -package assert diff --git a/vendor/github.com/stretchr/testify/assert/errors.go b/vendor/github.com/stretchr/testify/assert/errors.go deleted file mode 100644 index ac9dc9d1..00000000 --- a/vendor/github.com/stretchr/testify/assert/errors.go +++ /dev/null @@ -1,10 +0,0 @@ -package assert - -import ( - "errors" -) - -// AnError is an error instance useful for testing. If the code does not care -// about error specifics, and only needs to return the error for example, this -// error should be used to make the test code more readable. -var AnError = errors.New("assert.AnError general error for testing") diff --git a/vendor/github.com/stretchr/testify/assert/forward_assertions.go b/vendor/github.com/stretchr/testify/assert/forward_assertions.go deleted file mode 100644 index 9ad56851..00000000 --- a/vendor/github.com/stretchr/testify/assert/forward_assertions.go +++ /dev/null @@ -1,16 +0,0 @@ -package assert - -// Assertions provides assertion methods around the -// TestingT interface. -type Assertions struct { - t TestingT -} - -// New makes a new Assertions object for the specified TestingT. -func New(t TestingT) *Assertions { - return &Assertions{ - t: t, - } -} - -//go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs diff --git a/vendor/github.com/stretchr/testify/assert/http_assertions.go b/vendor/github.com/stretchr/testify/assert/http_assertions.go deleted file mode 100644 index 3101e78d..00000000 --- a/vendor/github.com/stretchr/testify/assert/http_assertions.go +++ /dev/null @@ -1,127 +0,0 @@ -package assert - -import ( - "fmt" - "net/http" - "net/http/httptest" - "net/url" - "strings" -) - -// httpCode is a helper that returns HTTP code of the response. It returns -1 and -// an error if building a new request fails. -func httpCode(handler http.HandlerFunc, method, url string, values url.Values) (int, error) { - w := httptest.NewRecorder() - req, err := http.NewRequest(method, url+"?"+values.Encode(), nil) - if err != nil { - return -1, err - } - handler(w, req) - return w.Code, nil -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { - code, err := httpCode(handler, method, url, values) - if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) - return false - } - - isSuccessCode := code >= http.StatusOK && code <= http.StatusPartialContent - if !isSuccessCode { - Fail(t, fmt.Sprintf("Expected HTTP success status code for %q but received %d", url+"?"+values.Encode(), code)) - } - - return isSuccessCode -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { - code, err := httpCode(handler, method, url, values) - if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) - return false - } - - isRedirectCode := code >= http.StatusMultipleChoices && code <= http.StatusTemporaryRedirect - if !isRedirectCode { - Fail(t, fmt.Sprintf("Expected HTTP redirect status code for %q but received %d", url+"?"+values.Encode(), code)) - } - - return isRedirectCode -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { - code, err := httpCode(handler, method, url, values) - if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err)) - return false - } - - isErrorCode := code >= http.StatusBadRequest - if !isErrorCode { - Fail(t, fmt.Sprintf("Expected HTTP error status code for %q but received %d", url+"?"+values.Encode(), code)) - } - - return isErrorCode -} - -// HTTPBody is a helper that returns HTTP body of the response. It returns -// empty string if building a new request fails. -func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string { - w := httptest.NewRecorder() - req, err := http.NewRequest(method, url+"?"+values.Encode(), nil) - if err != nil { - return "" - } - handler(w, req) - return w.Body.String() -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// assert.HTTPBodyContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - body := HTTPBody(handler, method, url, values) - - contains := strings.Contains(body, fmt.Sprint(str)) - if !contains { - Fail(t, fmt.Sprintf("Expected response body for \"%s\" to contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body)) - } - - return contains -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// assert.HTTPBodyNotContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - body := HTTPBody(handler, method, url, values) - - contains := strings.Contains(body, fmt.Sprint(str)) - if contains { - Fail(t, fmt.Sprintf("Expected response body for \"%s\" to NOT contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body)) - } - - return !contains -} diff --git a/vendor/github.com/stretchr/testify/require/doc.go b/vendor/github.com/stretchr/testify/require/doc.go deleted file mode 100644 index 169de392..00000000 --- a/vendor/github.com/stretchr/testify/require/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Package require implements the same assertions as the `assert` package but -// stops test execution when a test fails. -// -// Example Usage -// -// The following is a complete example using require in a standard test function: -// import ( -// "testing" -// "github.com/stretchr/testify/require" -// ) -// -// func TestSomething(t *testing.T) { -// -// var a string = "Hello" -// var b string = "Hello" -// -// require.Equal(t, a, b, "The two words should be the same.") -// -// } -// -// Assertions -// -// The `require` package have same global functions as in the `assert` package, -// but instead of returning a boolean result they call `t.FailNow()`. -// -// Every assertion function also takes an optional string message as the final argument, -// allowing custom error messages to be appended to the message the assertion method outputs. -package require diff --git a/vendor/github.com/stretchr/testify/require/forward_requirements.go b/vendor/github.com/stretchr/testify/require/forward_requirements.go deleted file mode 100644 index ac71d405..00000000 --- a/vendor/github.com/stretchr/testify/require/forward_requirements.go +++ /dev/null @@ -1,16 +0,0 @@ -package require - -// Assertions provides assertion methods around the -// TestingT interface. -type Assertions struct { - t TestingT -} - -// New makes a new Assertions object for the specified TestingT. -func New(t TestingT) *Assertions { - return &Assertions{ - t: t, - } -} - -//go:generate go run ../_codegen/main.go -output-package=require -template=require_forward.go.tmpl -include-format-funcs diff --git a/vendor/github.com/stretchr/testify/require/require.go b/vendor/github.com/stretchr/testify/require/require.go deleted file mode 100644 index a21d02f8..00000000 --- a/vendor/github.com/stretchr/testify/require/require.go +++ /dev/null @@ -1,979 +0,0 @@ -/* -* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen -* THIS FILE MUST NOT BE EDITED BY HAND - */ - -package require - -import ( - assert "github.com/stretchr/testify/assert" - http "net/http" - url "net/url" - time "time" -) - -// Condition uses a Comparison to assert a complex condition. -func Condition(t TestingT, comp assert.Comparison, msgAndArgs ...interface{}) { - if !assert.Condition(t, comp, msgAndArgs...) { - t.FailNow() - } -} - -// Conditionf uses a Comparison to assert a complex condition. -func Conditionf(t TestingT, comp assert.Comparison, msg string, args ...interface{}) { - if !assert.Conditionf(t, comp, msg, args...) { - t.FailNow() - } -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// assert.Contains(t, "Hello World", "World") -// assert.Contains(t, ["Hello", "World"], "World") -// assert.Contains(t, {"Hello": "World"}, "Hello") -// -// Returns whether the assertion was successful (true) or not (false). -func Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) { - if !assert.Contains(t, s, contains, msgAndArgs...) { - t.FailNow() - } -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// assert.Containsf(t, "Hello World", "World", "error message %s", "formatted") -// assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") -// assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) { - if !assert.Containsf(t, s, contains, msg, args...) { - t.FailNow() - } -} - -// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. -func DirExists(t TestingT, path string, msgAndArgs ...interface{}) { - if !assert.DirExists(t, path, msgAndArgs...) { - t.FailNow() - } -} - -// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. -func DirExistsf(t TestingT, path string, msg string, args ...interface{}) { - if !assert.DirExistsf(t, path, msg, args...) { - t.FailNow() - } -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2])) -// -// Returns whether the assertion was successful (true) or not (false). -func ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) { - if !assert.ElementsMatch(t, listA, listB, msgAndArgs...) { - t.FailNow() - } -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")) -// -// Returns whether the assertion was successful (true) or not (false). -func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) { - if !assert.ElementsMatchf(t, listA, listB, msg, args...) { - t.FailNow() - } -} - -// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// assert.Empty(t, obj) -// -// Returns whether the assertion was successful (true) or not (false). -func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if !assert.Empty(t, object, msgAndArgs...) { - t.FailNow() - } -} - -// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// assert.Emptyf(t, obj, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) { - if !assert.Emptyf(t, object, msg, args...) { - t.FailNow() - } -} - -// Equal asserts that two objects are equal. -// -// assert.Equal(t, 123, 123) -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equal(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if !assert.Equal(t, expected, actual, msgAndArgs...) { - t.FailNow() - } -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// assert.EqualError(t, err, expectedErrorString) -// -// Returns whether the assertion was successful (true) or not (false). -func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) { - if !assert.EqualError(t, theError, errString, msgAndArgs...) { - t.FailNow() - } -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) { - if !assert.EqualErrorf(t, theError, errString, msg, args...) { - t.FailNow() - } -} - -// EqualValues asserts that two objects are equal or convertable to the same types -// and equal. -// -// assert.EqualValues(t, uint32(123), int32(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if !assert.EqualValues(t, expected, actual, msgAndArgs...) { - t.FailNow() - } -} - -// EqualValuesf asserts that two objects are equal or convertable to the same types -// and equal. -// -// assert.EqualValuesf(t, uint32(123, "error message %s", "formatted"), int32(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if !assert.EqualValuesf(t, expected, actual, msg, args...) { - t.FailNow() - } -} - -// Equalf asserts that two objects are equal. -// -// assert.Equalf(t, 123, 123, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if !assert.Equalf(t, expected, actual, msg, args...) { - t.FailNow() - } -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if assert.Error(t, err) { -// assert.Equal(t, expectedError, err) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func Error(t TestingT, err error, msgAndArgs ...interface{}) { - if !assert.Error(t, err, msgAndArgs...) { - t.FailNow() - } -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if assert.Errorf(t, err, "error message %s", "formatted") { -// assert.Equal(t, expectedErrorf, err) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func Errorf(t TestingT, err error, msg string, args ...interface{}) { - if !assert.Errorf(t, err, msg, args...) { - t.FailNow() - } -} - -// Exactly asserts that two objects are equal in value and type. -// -// assert.Exactly(t, int32(123), int64(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func Exactly(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if !assert.Exactly(t, expected, actual, msgAndArgs...) { - t.FailNow() - } -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// assert.Exactlyf(t, int32(123, "error message %s", "formatted"), int64(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if !assert.Exactlyf(t, expected, actual, msg, args...) { - t.FailNow() - } -} - -// Fail reports a failure through -func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) { - if !assert.Fail(t, failureMessage, msgAndArgs...) { - t.FailNow() - } -} - -// FailNow fails test -func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) { - if !assert.FailNow(t, failureMessage, msgAndArgs...) { - t.FailNow() - } -} - -// FailNowf fails test -func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) { - if !assert.FailNowf(t, failureMessage, msg, args...) { - t.FailNow() - } -} - -// Failf reports a failure through -func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) { - if !assert.Failf(t, failureMessage, msg, args...) { - t.FailNow() - } -} - -// False asserts that the specified value is false. -// -// assert.False(t, myBool) -// -// Returns whether the assertion was successful (true) or not (false). -func False(t TestingT, value bool, msgAndArgs ...interface{}) { - if !assert.False(t, value, msgAndArgs...) { - t.FailNow() - } -} - -// Falsef asserts that the specified value is false. -// -// assert.Falsef(t, myBool, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Falsef(t TestingT, value bool, msg string, args ...interface{}) { - if !assert.Falsef(t, value, msg, args...) { - t.FailNow() - } -} - -// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. -func FileExists(t TestingT, path string, msgAndArgs ...interface{}) { - if !assert.FileExists(t, path, msgAndArgs...) { - t.FailNow() - } -} - -// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. -func FileExistsf(t TestingT, path string, msg string, args ...interface{}) { - if !assert.FileExistsf(t, path, msg, args...) { - t.FailNow() - } -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// assert.HTTPBodyContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - if !assert.HTTPBodyContains(t, handler, method, url, values, str, msgAndArgs...) { - t.FailNow() - } -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// assert.HTTPBodyContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - if !assert.HTTPBodyContainsf(t, handler, method, url, values, str, msg, args...) { - t.FailNow() - } -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// assert.HTTPBodyNotContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - if !assert.HTTPBodyNotContains(t, handler, method, url, values, str, msgAndArgs...) { - t.FailNow() - } -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// assert.HTTPBodyNotContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - if !assert.HTTPBodyNotContainsf(t, handler, method, url, values, str, msg, args...) { - t.FailNow() - } -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if !assert.HTTPError(t, handler, method, url, values, msgAndArgs...) { - t.FailNow() - } -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). -func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if !assert.HTTPErrorf(t, handler, method, url, values, msg, args...) { - t.FailNow() - } -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if !assert.HTTPRedirect(t, handler, method, url, values, msgAndArgs...) { - t.FailNow() - } -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). -func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if !assert.HTTPRedirectf(t, handler, method, url, values, msg, args...) { - t.FailNow() - } -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if !assert.HTTPSuccess(t, handler, method, url, values, msgAndArgs...) { - t.FailNow() - } -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if !assert.HTTPSuccessf(t, handler, method, url, values, msg, args...) { - t.FailNow() - } -} - -// Implements asserts that an object is implemented by the specified interface. -// -// assert.Implements(t, (*MyInterface)(nil), new(MyObject)) -func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) { - if !assert.Implements(t, interfaceObject, object, msgAndArgs...) { - t.FailNow() - } -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// assert.Implementsf(t, (*MyInterface, "error message %s", "formatted")(nil), new(MyObject)) -func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) { - if !assert.Implementsf(t, interfaceObject, object, msg, args...) { - t.FailNow() - } -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// assert.InDelta(t, math.Pi, (22 / 7.0), 0.01) -// -// Returns whether the assertion was successful (true) or not (false). -func InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if !assert.InDelta(t, expected, actual, delta, msgAndArgs...) { - t.FailNow() - } -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValues(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if !assert.InDeltaMapValues(t, expected, actual, delta, msgAndArgs...) { - t.FailNow() - } -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if !assert.InDeltaMapValuesf(t, expected, actual, delta, msg, args...) { - t.FailNow() - } -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func InDeltaSlice(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if !assert.InDeltaSlice(t, expected, actual, delta, msgAndArgs...) { - t.FailNow() - } -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if !assert.InDeltaSlicef(t, expected, actual, delta, msg, args...) { - t.FailNow() - } -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// assert.InDeltaf(t, math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01) -// -// Returns whether the assertion was successful (true) or not (false). -func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if !assert.InDeltaf(t, expected, actual, delta, msg, args...) { - t.FailNow() - } -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -// -// Returns whether the assertion was successful (true) or not (false). -func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - if !assert.InEpsilon(t, expected, actual, epsilon, msgAndArgs...) { - t.FailNow() - } -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - if !assert.InEpsilonSlice(t, expected, actual, epsilon, msgAndArgs...) { - t.FailNow() - } -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - if !assert.InEpsilonSlicef(t, expected, actual, epsilon, msg, args...) { - t.FailNow() - } -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -// -// Returns whether the assertion was successful (true) or not (false). -func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - if !assert.InEpsilonf(t, expected, actual, epsilon, msg, args...) { - t.FailNow() - } -} - -// IsType asserts that the specified objects are of the same type. -func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) { - if !assert.IsType(t, expectedType, object, msgAndArgs...) { - t.FailNow() - } -} - -// IsTypef asserts that the specified objects are of the same type. -func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) { - if !assert.IsTypef(t, expectedType, object, msg, args...) { - t.FailNow() - } -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -// -// Returns whether the assertion was successful (true) or not (false). -func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) { - if !assert.JSONEq(t, expected, actual, msgAndArgs...) { - t.FailNow() - } -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) { - if !assert.JSONEqf(t, expected, actual, msg, args...) { - t.FailNow() - } -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// assert.Len(t, mySlice, 3) -// -// Returns whether the assertion was successful (true) or not (false). -func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) { - if !assert.Len(t, object, length, msgAndArgs...) { - t.FailNow() - } -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// assert.Lenf(t, mySlice, 3, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) { - if !assert.Lenf(t, object, length, msg, args...) { - t.FailNow() - } -} - -// Nil asserts that the specified object is nil. -// -// assert.Nil(t, err) -// -// Returns whether the assertion was successful (true) or not (false). -func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if !assert.Nil(t, object, msgAndArgs...) { - t.FailNow() - } -} - -// Nilf asserts that the specified object is nil. -// -// assert.Nilf(t, err, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) { - if !assert.Nilf(t, object, msg, args...) { - t.FailNow() - } -} - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if assert.NoError(t, err) { -// assert.Equal(t, expectedObj, actualObj) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func NoError(t TestingT, err error, msgAndArgs ...interface{}) { - if !assert.NoError(t, err, msgAndArgs...) { - t.FailNow() - } -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if assert.NoErrorf(t, err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func NoErrorf(t TestingT, err error, msg string, args ...interface{}) { - if !assert.NoErrorf(t, err, msg, args...) { - t.FailNow() - } -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// assert.NotContains(t, "Hello World", "Earth") -// assert.NotContains(t, ["Hello", "World"], "Earth") -// assert.NotContains(t, {"Hello": "World"}, "Earth") -// -// Returns whether the assertion was successful (true) or not (false). -func NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) { - if !assert.NotContains(t, s, contains, msgAndArgs...) { - t.FailNow() - } -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) { - if !assert.NotContainsf(t, s, contains, msg, args...) { - t.FailNow() - } -} - -// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if assert.NotEmpty(t, obj) { -// assert.Equal(t, "two", obj[1]) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if !assert.NotEmpty(t, object, msgAndArgs...) { - t.FailNow() - } -} - -// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if assert.NotEmptyf(t, obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) { - if !assert.NotEmptyf(t, object, msg, args...) { - t.FailNow() - } -} - -// NotEqual asserts that the specified values are NOT equal. -// -// assert.NotEqual(t, obj1, obj2) -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqual(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if !assert.NotEqual(t, expected, actual, msgAndArgs...) { - t.FailNow() - } -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if !assert.NotEqualf(t, expected, actual, msg, args...) { - t.FailNow() - } -} - -// NotNil asserts that the specified object is not nil. -// -// assert.NotNil(t, err) -// -// Returns whether the assertion was successful (true) or not (false). -func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if !assert.NotNil(t, object, msgAndArgs...) { - t.FailNow() - } -} - -// NotNilf asserts that the specified object is not nil. -// -// assert.NotNilf(t, err, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) { - if !assert.NotNilf(t, object, msg, args...) { - t.FailNow() - } -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// assert.NotPanics(t, func(){ RemainCalm() }) -// -// Returns whether the assertion was successful (true) or not (false). -func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if !assert.NotPanics(t, f, msgAndArgs...) { - t.FailNow() - } -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func NotPanicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) { - if !assert.NotPanicsf(t, f, msg, args...) { - t.FailNow() - } -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") -// assert.NotRegexp(t, "^start", "it's not starting") -// -// Returns whether the assertion was successful (true) or not (false). -func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) { - if !assert.NotRegexp(t, rx, str, msgAndArgs...) { - t.FailNow() - } -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// assert.NotRegexpf(t, regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting") -// assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) { - if !assert.NotRegexpf(t, rx, str, msg, args...) { - t.FailNow() - } -} - -// NotSubset asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// assert.NotSubset(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") -// -// Returns whether the assertion was successful (true) or not (false). -func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) { - if !assert.NotSubset(t, list, subset, msgAndArgs...) { - t.FailNow() - } -} - -// NotSubsetf asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) { - if !assert.NotSubsetf(t, list, subset, msg, args...) { - t.FailNow() - } -} - -// NotZero asserts that i is not the zero value for its type and returns the truth. -func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) { - if !assert.NotZero(t, i, msgAndArgs...) { - t.FailNow() - } -} - -// NotZerof asserts that i is not the zero value for its type and returns the truth. -func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) { - if !assert.NotZerof(t, i, msg, args...) { - t.FailNow() - } -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// assert.Panics(t, func(){ GoCrazy() }) -// -// Returns whether the assertion was successful (true) or not (false). -func Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if !assert.Panics(t, f, msgAndArgs...) { - t.FailNow() - } -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) -// -// Returns whether the assertion was successful (true) or not (false). -func PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if !assert.PanicsWithValue(t, expected, f, msgAndArgs...) { - t.FailNow() - } -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) { - if !assert.PanicsWithValuef(t, expected, f, msg, args...) { - t.FailNow() - } -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Panicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) { - if !assert.Panicsf(t, f, msg, args...) { - t.FailNow() - } -} - -// Regexp asserts that a specified regexp matches a string. -// -// assert.Regexp(t, regexp.MustCompile("start"), "it's starting") -// assert.Regexp(t, "start...$", "it's not starting") -// -// Returns whether the assertion was successful (true) or not (false). -func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) { - if !assert.Regexp(t, rx, str, msgAndArgs...) { - t.FailNow() - } -} - -// Regexpf asserts that a specified regexp matches a string. -// -// assert.Regexpf(t, regexp.MustCompile("start", "error message %s", "formatted"), "it's starting") -// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) { - if !assert.Regexpf(t, rx, str, msg, args...) { - t.FailNow() - } -} - -// Subset asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// assert.Subset(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") -// -// Returns whether the assertion was successful (true) or not (false). -func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) { - if !assert.Subset(t, list, subset, msgAndArgs...) { - t.FailNow() - } -} - -// Subsetf asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// assert.Subsetf(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) { - if !assert.Subsetf(t, list, subset, msg, args...) { - t.FailNow() - } -} - -// True asserts that the specified value is true. -// -// assert.True(t, myBool) -// -// Returns whether the assertion was successful (true) or not (false). -func True(t TestingT, value bool, msgAndArgs ...interface{}) { - if !assert.True(t, value, msgAndArgs...) { - t.FailNow() - } -} - -// Truef asserts that the specified value is true. -// -// assert.Truef(t, myBool, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func Truef(t TestingT, value bool, msg string, args ...interface{}) { - if !assert.Truef(t, value, msg, args...) { - t.FailNow() - } -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) -// -// Returns whether the assertion was successful (true) or not (false). -func WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) { - if !assert.WithinDuration(t, expected, actual, delta, msgAndArgs...) { - t.FailNow() - } -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) { - if !assert.WithinDurationf(t, expected, actual, delta, msg, args...) { - t.FailNow() - } -} - -// Zero asserts that i is the zero value for its type and returns the truth. -func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) { - if !assert.Zero(t, i, msgAndArgs...) { - t.FailNow() - } -} - -// Zerof asserts that i is the zero value for its type and returns the truth. -func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) { - if !assert.Zerof(t, i, msg, args...) { - t.FailNow() - } -} diff --git a/vendor/github.com/stretchr/testify/require/require.go.tmpl b/vendor/github.com/stretchr/testify/require/require.go.tmpl deleted file mode 100644 index d2c38f6f..00000000 --- a/vendor/github.com/stretchr/testify/require/require.go.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -{{.Comment}} -func {{.DocInfo.Name}}(t TestingT, {{.Params}}) { - if !assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { - t.FailNow() - } -} diff --git a/vendor/github.com/stretchr/testify/require/require_forward.go b/vendor/github.com/stretchr/testify/require/require_forward.go deleted file mode 100644 index 76940850..00000000 --- a/vendor/github.com/stretchr/testify/require/require_forward.go +++ /dev/null @@ -1,799 +0,0 @@ -/* -* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen -* THIS FILE MUST NOT BE EDITED BY HAND - */ - -package require - -import ( - assert "github.com/stretchr/testify/assert" - http "net/http" - url "net/url" - time "time" -) - -// Condition uses a Comparison to assert a complex condition. -func (a *Assertions) Condition(comp assert.Comparison, msgAndArgs ...interface{}) { - Condition(a.t, comp, msgAndArgs...) -} - -// Conditionf uses a Comparison to assert a complex condition. -func (a *Assertions) Conditionf(comp assert.Comparison, msg string, args ...interface{}) { - Conditionf(a.t, comp, msg, args...) -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Contains("Hello World", "World") -// a.Contains(["Hello", "World"], "World") -// a.Contains({"Hello": "World"}, "Hello") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) { - Contains(a.t, s, contains, msgAndArgs...) -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Containsf("Hello World", "World", "error message %s", "formatted") -// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") -// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) { - Containsf(a.t, s, contains, msg, args...) -} - -// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) { - DirExists(a.t, path, msgAndArgs...) -} - -// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) { - DirExistsf(a.t, path, msg, args...) -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2])) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) { - ElementsMatch(a.t, listA, listB, msgAndArgs...) -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) { - ElementsMatchf(a.t, listA, listB, msg, args...) -} - -// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// a.Empty(obj) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) { - Empty(a.t, object, msgAndArgs...) -} - -// Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// a.Emptyf(obj, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) { - Emptyf(a.t, object, msg, args...) -} - -// Equal asserts that two objects are equal. -// -// a.Equal(123, 123) -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - Equal(a.t, expected, actual, msgAndArgs...) -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualError(err, expectedErrorString) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) { - EqualError(a.t, theError, errString, msgAndArgs...) -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) { - EqualErrorf(a.t, theError, errString, msg, args...) -} - -// EqualValues asserts that two objects are equal or convertable to the same types -// and equal. -// -// a.EqualValues(uint32(123), int32(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - EqualValues(a.t, expected, actual, msgAndArgs...) -} - -// EqualValuesf asserts that two objects are equal or convertable to the same types -// and equal. -// -// a.EqualValuesf(uint32(123, "error message %s", "formatted"), int32(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - EqualValuesf(a.t, expected, actual, msg, args...) -} - -// Equalf asserts that two objects are equal. -// -// a.Equalf(123, 123, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - Equalf(a.t, expected, actual, msg, args...) -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if a.Error(err) { -// assert.Equal(t, expectedError, err) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Error(err error, msgAndArgs ...interface{}) { - Error(a.t, err, msgAndArgs...) -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// if a.Errorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedErrorf, err) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Errorf(err error, msg string, args ...interface{}) { - Errorf(a.t, err, msg, args...) -} - -// Exactly asserts that two objects are equal in value and type. -// -// a.Exactly(int32(123), int64(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - Exactly(a.t, expected, actual, msgAndArgs...) -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// a.Exactlyf(int32(123, "error message %s", "formatted"), int64(123)) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - Exactlyf(a.t, expected, actual, msg, args...) -} - -// Fail reports a failure through -func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) { - Fail(a.t, failureMessage, msgAndArgs...) -} - -// FailNow fails test -func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) { - FailNow(a.t, failureMessage, msgAndArgs...) -} - -// FailNowf fails test -func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) { - FailNowf(a.t, failureMessage, msg, args...) -} - -// Failf reports a failure through -func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) { - Failf(a.t, failureMessage, msg, args...) -} - -// False asserts that the specified value is false. -// -// a.False(myBool) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) False(value bool, msgAndArgs ...interface{}) { - False(a.t, value, msgAndArgs...) -} - -// Falsef asserts that the specified value is false. -// -// a.Falsef(myBool, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) { - Falsef(a.t, value, msg, args...) -} - -// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) { - FileExists(a.t, path, msgAndArgs...) -} - -// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) { - FileExistsf(a.t, path, msg, args...) -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContains(myHandler, "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContainsf(myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContains(myHandler, "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContainsf(myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - HTTPError(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). -func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - HTTPErrorf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false). -func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - HTTPRedirectf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// a.HTTPSuccessf(myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - HTTPSuccessf(a.t, handler, method, url, values, msg, args...) -} - -// Implements asserts that an object is implemented by the specified interface. -// -// a.Implements((*MyInterface)(nil), new(MyObject)) -func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) { - Implements(a.t, interfaceObject, object, msgAndArgs...) -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// a.Implementsf((*MyInterface, "error message %s", "formatted")(nil), new(MyObject)) -func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) { - Implementsf(a.t, interfaceObject, object, msg, args...) -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// a.InDelta(math.Pi, (22 / 7.0), 0.01) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - InDelta(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - InDeltaSlicef(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// a.InDeltaf(math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - InDeltaf(a.t, expected, actual, delta, msg, args...) -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...) -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - InEpsilonf(a.t, expected, actual, epsilon, msg, args...) -} - -// IsType asserts that the specified objects are of the same type. -func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) { - IsType(a.t, expectedType, object, msgAndArgs...) -} - -// IsTypef asserts that the specified objects are of the same type. -func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) { - IsTypef(a.t, expectedType, object, msg, args...) -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) { - JSONEq(a.t, expected, actual, msgAndArgs...) -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) { - JSONEqf(a.t, expected, actual, msg, args...) -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// a.Len(mySlice, 3) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) { - Len(a.t, object, length, msgAndArgs...) -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// a.Lenf(mySlice, 3, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) { - Lenf(a.t, object, length, msg, args...) -} - -// Nil asserts that the specified object is nil. -// -// a.Nil(err) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) { - Nil(a.t, object, msgAndArgs...) -} - -// Nilf asserts that the specified object is nil. -// -// a.Nilf(err, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) { - Nilf(a.t, object, msg, args...) -} - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoError(err) { -// assert.Equal(t, expectedObj, actualObj) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) { - NoError(a.t, err, msgAndArgs...) -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoErrorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) { - NoErrorf(a.t, err, msg, args...) -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContains("Hello World", "Earth") -// a.NotContains(["Hello", "World"], "Earth") -// a.NotContains({"Hello": "World"}, "Earth") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) { - NotContains(a.t, s, contains, msgAndArgs...) -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContainsf("Hello World", "Earth", "error message %s", "formatted") -// a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted") -// a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) { - NotContainsf(a.t, s, contains, msg, args...) -} - -// NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if a.NotEmpty(obj) { -// assert.Equal(t, "two", obj[1]) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) { - NotEmpty(a.t, object, msgAndArgs...) -} - -// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either -// a slice or a channel with len == 0. -// -// if a.NotEmptyf(obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) { - NotEmptyf(a.t, object, msg, args...) -} - -// NotEqual asserts that the specified values are NOT equal. -// -// a.NotEqual(obj1, obj2) -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - NotEqual(a.t, expected, actual, msgAndArgs...) -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// a.NotEqualf(obj1, obj2, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - NotEqualf(a.t, expected, actual, msg, args...) -} - -// NotNil asserts that the specified object is not nil. -// -// a.NotNil(err) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) { - NotNil(a.t, object, msgAndArgs...) -} - -// NotNilf asserts that the specified object is not nil. -// -// a.NotNilf(err, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) { - NotNilf(a.t, object, msg, args...) -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanics(func(){ RemainCalm() }) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotPanics(f assert.PanicTestFunc, msgAndArgs ...interface{}) { - NotPanics(a.t, f, msgAndArgs...) -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotPanicsf(f assert.PanicTestFunc, msg string, args ...interface{}) { - NotPanicsf(a.t, f, msg, args...) -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// a.NotRegexp(regexp.MustCompile("starts"), "it's starting") -// a.NotRegexp("^start", "it's not starting") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) { - NotRegexp(a.t, rx, str, msgAndArgs...) -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// a.NotRegexpf(regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting") -// a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) { - NotRegexpf(a.t, rx, str, msg, args...) -} - -// NotSubset asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// a.NotSubset([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) { - NotSubset(a.t, list, subset, msgAndArgs...) -} - -// NotSubsetf asserts that the specified list(array, slice...) contains not all -// elements given in the specified subset(array, slice...). -// -// a.NotSubsetf([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) { - NotSubsetf(a.t, list, subset, msg, args...) -} - -// NotZero asserts that i is not the zero value for its type and returns the truth. -func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) { - NotZero(a.t, i, msgAndArgs...) -} - -// NotZerof asserts that i is not the zero value for its type and returns the truth. -func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) { - NotZerof(a.t, i, msg, args...) -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panics(func(){ GoCrazy() }) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{}) { - Panics(a.t, f, msgAndArgs...) -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValue("crazy error", func(){ GoCrazy() }) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) PanicsWithValue(expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - PanicsWithValue(a.t, expected, f, msgAndArgs...) -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) PanicsWithValuef(expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) { - PanicsWithValuef(a.t, expected, f, msg, args...) -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Panicsf(f assert.PanicTestFunc, msg string, args ...interface{}) { - Panicsf(a.t, f, msg, args...) -} - -// Regexp asserts that a specified regexp matches a string. -// -// a.Regexp(regexp.MustCompile("start"), "it's starting") -// a.Regexp("start...$", "it's not starting") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) { - Regexp(a.t, rx, str, msgAndArgs...) -} - -// Regexpf asserts that a specified regexp matches a string. -// -// a.Regexpf(regexp.MustCompile("start", "error message %s", "formatted"), "it's starting") -// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) { - Regexpf(a.t, rx, str, msg, args...) -} - -// Subset asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// a.Subset([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) { - Subset(a.t, list, subset, msgAndArgs...) -} - -// Subsetf asserts that the specified list(array, slice...) contains all -// elements given in the specified subset(array, slice...). -// -// a.Subsetf([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) { - Subsetf(a.t, list, subset, msg, args...) -} - -// True asserts that the specified value is true. -// -// a.True(myBool) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) True(value bool, msgAndArgs ...interface{}) { - True(a.t, value, msgAndArgs...) -} - -// Truef asserts that the specified value is true. -// -// a.Truef(myBool, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) Truef(value bool, msg string, args ...interface{}) { - Truef(a.t, value, msg, args...) -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// a.WithinDuration(time.Now(), time.Now(), 10*time.Second) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) { - WithinDuration(a.t, expected, actual, delta, msgAndArgs...) -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) { - WithinDurationf(a.t, expected, actual, delta, msg, args...) -} - -// Zero asserts that i is the zero value for its type and returns the truth. -func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) { - Zero(a.t, i, msgAndArgs...) -} - -// Zerof asserts that i is the zero value for its type and returns the truth. -func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) { - Zerof(a.t, i, msg, args...) -} diff --git a/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl b/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl deleted file mode 100644 index b93569e0..00000000 --- a/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -{{.CommentWithoutT "a"}} -func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) { - {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) -} diff --git a/vendor/github.com/stretchr/testify/require/requirements.go b/vendor/github.com/stretchr/testify/require/requirements.go deleted file mode 100644 index e404f016..00000000 --- a/vendor/github.com/stretchr/testify/require/requirements.go +++ /dev/null @@ -1,9 +0,0 @@ -package require - -// TestingT is an interface wrapper around *testing.T -type TestingT interface { - Errorf(format string, args ...interface{}) - FailNow() -} - -//go:generate go run ../_codegen/main.go -output-package=require -template=require.go.tmpl -include-format-funcs diff --git a/vendor/golang.org/x/crypto/AUTHORS b/vendor/golang.org/x/crypto/AUTHORS deleted file mode 100644 index 2b00ddba..00000000 --- a/vendor/golang.org/x/crypto/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code refers to The Go Authors for copyright purposes. -# The master list of authors is in the main Go distribution, -# visible at https://tip.golang.org/AUTHORS. diff --git a/vendor/golang.org/x/crypto/CONTRIBUTORS b/vendor/golang.org/x/crypto/CONTRIBUTORS deleted file mode 100644 index 1fbd3e97..00000000 --- a/vendor/golang.org/x/crypto/CONTRIBUTORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code was written by the Go contributors. -# The master list of contributors is in the main Go distribution, -# visible at https://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/golang.org/x/crypto/LICENSE b/vendor/golang.org/x/crypto/LICENSE deleted file mode 100644 index 6a66aea5..00000000 --- a/vendor/golang.org/x/crypto/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/crypto/PATENTS b/vendor/golang.org/x/crypto/PATENTS deleted file mode 100644 index 73309904..00000000 --- a/vendor/golang.org/x/crypto/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/crypto/md4/md4.go b/vendor/golang.org/x/crypto/md4/md4.go deleted file mode 100644 index 6d9ba9e5..00000000 --- a/vendor/golang.org/x/crypto/md4/md4.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package md4 implements the MD4 hash algorithm as defined in RFC 1320. -package md4 // import "golang.org/x/crypto/md4" - -import ( - "crypto" - "hash" -) - -func init() { - crypto.RegisterHash(crypto.MD4, New) -} - -// The size of an MD4 checksum in bytes. -const Size = 16 - -// The blocksize of MD4 in bytes. -const BlockSize = 64 - -const ( - _Chunk = 64 - _Init0 = 0x67452301 - _Init1 = 0xEFCDAB89 - _Init2 = 0x98BADCFE - _Init3 = 0x10325476 -) - -// digest represents the partial evaluation of a checksum. -type digest struct { - s [4]uint32 - x [_Chunk]byte - nx int - len uint64 -} - -func (d *digest) Reset() { - d.s[0] = _Init0 - d.s[1] = _Init1 - d.s[2] = _Init2 - d.s[3] = _Init3 - d.nx = 0 - d.len = 0 -} - -// New returns a new hash.Hash computing the MD4 checksum. -func New() hash.Hash { - d := new(digest) - d.Reset() - return d -} - -func (d *digest) Size() int { return Size } - -func (d *digest) BlockSize() int { return BlockSize } - -func (d *digest) Write(p []byte) (nn int, err error) { - nn = len(p) - d.len += uint64(nn) - if d.nx > 0 { - n := len(p) - if n > _Chunk-d.nx { - n = _Chunk - d.nx - } - for i := 0; i < n; i++ { - d.x[d.nx+i] = p[i] - } - d.nx += n - if d.nx == _Chunk { - _Block(d, d.x[0:]) - d.nx = 0 - } - p = p[n:] - } - n := _Block(d, p) - p = p[n:] - if len(p) > 0 { - d.nx = copy(d.x[:], p) - } - return -} - -func (d0 *digest) Sum(in []byte) []byte { - // Make a copy of d0, so that caller can keep writing and summing. - d := new(digest) - *d = *d0 - - // Padding. Add a 1 bit and 0 bits until 56 bytes mod 64. - len := d.len - var tmp [64]byte - tmp[0] = 0x80 - if len%64 < 56 { - d.Write(tmp[0 : 56-len%64]) - } else { - d.Write(tmp[0 : 64+56-len%64]) - } - - // Length in bits. - len <<= 3 - for i := uint(0); i < 8; i++ { - tmp[i] = byte(len >> (8 * i)) - } - d.Write(tmp[0:8]) - - if d.nx != 0 { - panic("d.nx != 0") - } - - for _, s := range d.s { - in = append(in, byte(s>>0)) - in = append(in, byte(s>>8)) - in = append(in, byte(s>>16)) - in = append(in, byte(s>>24)) - } - return in -} diff --git a/vendor/golang.org/x/crypto/md4/md4block.go b/vendor/golang.org/x/crypto/md4/md4block.go deleted file mode 100644 index 3fed475f..00000000 --- a/vendor/golang.org/x/crypto/md4/md4block.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// MD4 block step. -// In its own file so that a faster assembly or C version -// can be substituted easily. - -package md4 - -var shift1 = []uint{3, 7, 11, 19} -var shift2 = []uint{3, 5, 9, 13} -var shift3 = []uint{3, 9, 11, 15} - -var xIndex2 = []uint{0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15} -var xIndex3 = []uint{0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15} - -func _Block(dig *digest, p []byte) int { - a := dig.s[0] - b := dig.s[1] - c := dig.s[2] - d := dig.s[3] - n := 0 - var X [16]uint32 - for len(p) >= _Chunk { - aa, bb, cc, dd := a, b, c, d - - j := 0 - for i := 0; i < 16; i++ { - X[i] = uint32(p[j]) | uint32(p[j+1])<<8 | uint32(p[j+2])<<16 | uint32(p[j+3])<<24 - j += 4 - } - - // If this needs to be made faster in the future, - // the usual trick is to unroll each of these - // loops by a factor of 4; that lets you replace - // the shift[] lookups with constants and, - // with suitable variable renaming in each - // unrolled body, delete the a, b, c, d = d, a, b, c - // (or you can let the optimizer do the renaming). - // - // The index variables are uint so that % by a power - // of two can be optimized easily by a compiler. - - // Round 1. - for i := uint(0); i < 16; i++ { - x := i - s := shift1[i%4] - f := ((c ^ d) & b) ^ d - a += f + X[x] - a = a<>(32-s) - a, b, c, d = d, a, b, c - } - - // Round 2. - for i := uint(0); i < 16; i++ { - x := xIndex2[i] - s := shift2[i%4] - g := (b & c) | (b & d) | (c & d) - a += g + X[x] + 0x5a827999 - a = a<>(32-s) - a, b, c, d = d, a, b, c - } - - // Round 3. - for i := uint(0); i < 16; i++ { - x := xIndex3[i] - s := shift3[i%4] - h := b ^ c ^ d - a += h + X[x] + 0x6ed9eba1 - a = a<>(32-s) - a, b, c, d = d, a, b, c - } - - a += aa - b += bb - c += cc - d += dd - - p = p[_Chunk:] - n += _Chunk - } - - dig.s[0] = a - dig.s[1] = b - dig.s[2] = c - dig.s[3] = d - return n -} diff --git a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go deleted file mode 100644 index 593f6530..00000000 --- a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC -2898 / PKCS #5 v2.0. - -A key derivation function is useful when encrypting data based on a password -or any other not-fully-random data. It uses a pseudorandom function to derive -a secure encryption key based on the password. - -While v2.0 of the standard defines only one pseudorandom function to use, -HMAC-SHA1, the drafted v2.1 specification allows use of all five FIPS Approved -Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To -choose, you can pass the `New` functions from the different SHA packages to -pbkdf2.Key. -*/ -package pbkdf2 // import "golang.org/x/crypto/pbkdf2" - -import ( - "crypto/hmac" - "hash" -) - -// Key derives a key from the password, salt and iteration count, returning a -// []byte of length keylen that can be used as cryptographic key. The key is -// derived based on the method described as PBKDF2 with the HMAC variant using -// the supplied hash function. -// -// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you -// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by -// doing: -// -// dk := pbkdf2.Key([]byte("some password"), salt, 4096, 32, sha1.New) -// -// Remember to get a good random salt. At least 8 bytes is recommended by the -// RFC. -// -// Using a higher iteration count will increase the cost of an exhaustive -// search but will also make derivation proportionally slower. -func Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte { - prf := hmac.New(h, password) - hashLen := prf.Size() - numBlocks := (keyLen + hashLen - 1) / hashLen - - var buf [4]byte - dk := make([]byte, 0, numBlocks*hashLen) - U := make([]byte, hashLen) - for block := 1; block <= numBlocks; block++ { - // N.B.: || means concatenation, ^ means XOR - // for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter - // U_1 = PRF(password, salt || uint(i)) - prf.Reset() - prf.Write(salt) - buf[0] = byte(block >> 24) - buf[1] = byte(block >> 16) - buf[2] = byte(block >> 8) - buf[3] = byte(block) - prf.Write(buf[:4]) - dk = prf.Sum(dk) - T := dk[len(dk)-hashLen:] - copy(U, T) - - // U_n = PRF(password, U_(n-1)) - for n := 2; n <= iter; n++ { - prf.Reset() - prf.Write(U) - U = U[:0] - U = prf.Sum(U) - for x := range U { - T[x] ^= U[x] - } - } - } - return dk[:keyLen] -} diff --git a/vendor/gopkg.in/jcmturner/aescts.v1/.gitignore b/vendor/gopkg.in/jcmturner/aescts.v1/.gitignore deleted file mode 100644 index a1338d68..00000000 --- a/vendor/gopkg.in/jcmturner/aescts.v1/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ diff --git a/vendor/gopkg.in/jcmturner/aescts.v1/LICENSE b/vendor/gopkg.in/jcmturner/aescts.v1/LICENSE deleted file mode 100644 index 8dada3ed..00000000 --- a/vendor/gopkg.in/jcmturner/aescts.v1/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/gopkg.in/jcmturner/aescts.v1/README.md b/vendor/gopkg.in/jcmturner/aescts.v1/README.md deleted file mode 100644 index d1fddf3a..00000000 --- a/vendor/gopkg.in/jcmturner/aescts.v1/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# AES CBC Ciphertext Stealing -[![GoDoc](https://godoc.org/gopkg.in/jcmturner/aescts.v1?status.svg)](https://godoc.org/gopkg.in/jcmturner/aescts.v1) [![Go Report Card](https://goreportcard.com/badge/gopkg.in/jcmturner/aescts.v1)](https://goreportcard.com/report/gopkg.in/jcmturner/aescts.v1) - -Encrypt and decrypt data using AES CBC Ciphertext stealing mode. - -Reference: https://en.wikipedia.org/wiki/Ciphertext_stealing#CBC_ciphertext_stealing - -To get the package, execute: -``` -go get gopkg.in/jcmturner/aescts.v1 -``` -To import this package, add the following line to your code: -```go -import "gopkg.in/jcmturner/aescts.v1" - -``` \ No newline at end of file diff --git a/vendor/gopkg.in/jcmturner/aescts.v1/aescts.go b/vendor/gopkg.in/jcmturner/aescts.v1/aescts.go deleted file mode 100644 index 278713ea..00000000 --- a/vendor/gopkg.in/jcmturner/aescts.v1/aescts.go +++ /dev/null @@ -1,186 +0,0 @@ -// Package aescts provides AES CBC CipherText Stealing encryption and decryption methods -package aescts - -import ( - "crypto/aes" - "crypto/cipher" - "errors" - "fmt" -) - -// Encrypt the message with the key and the initial vector. -// Returns: next iv, ciphertext bytes, error -func Encrypt(key, iv, plaintext []byte) ([]byte, []byte, error) { - l := len(plaintext) - - block, err := aes.NewCipher(key) - if err != nil { - return []byte{}, []byte{}, fmt.Errorf("Error creating cipher: %v", err) - } - mode := cipher.NewCBCEncrypter(block, iv) - - m := make([]byte, len(plaintext)) - copy(m, plaintext) - - /*For consistency, ciphertext stealing is always used for the last two - blocks of the data to be encrypted, as in [RC5]. If the data length - is a multiple of the block size, this is equivalent to plain CBC mode - with the last two ciphertext blocks swapped.*/ - /*The initial vector carried out from one encryption for use in a - subsequent encryption is the next-to-last block of the encryption - output; this is the encrypted form of the last plaintext block.*/ - if l <= aes.BlockSize { - m, _ = zeroPad(m, aes.BlockSize) - mode.CryptBlocks(m, m) - return m, m, nil - } - if l%aes.BlockSize == 0 { - mode.CryptBlocks(m, m) - iv = m[len(m)-aes.BlockSize:] - rb, _ := swapLastTwoBlocks(m, aes.BlockSize) - return iv, rb, nil - } - m, _ = zeroPad(m, aes.BlockSize) - rb, pb, lb, err := tailBlocks(m, aes.BlockSize) - if err != nil { - return []byte{}, []byte{}, fmt.Errorf("Error tailing blocks: %v", err) - } - var ct []byte - if rb != nil { - // Encrpt all but the lats 2 blocks and update the rolling iv - mode.CryptBlocks(rb, rb) - iv = rb[len(rb)-aes.BlockSize:] - mode = cipher.NewCBCEncrypter(block, iv) - ct = append(ct, rb...) - } - mode.CryptBlocks(pb, pb) - mode = cipher.NewCBCEncrypter(block, pb) - mode.CryptBlocks(lb, lb) - // Cipher Text Stealing (CTS) - Ref: https://en.wikipedia.org/wiki/Ciphertext_stealing#CBC_ciphertext_stealing - // Swap the last two cipher blocks - // Truncate the ciphertext to the length of the original plaintext - ct = append(ct, lb...) - ct = append(ct, pb...) - return lb, ct[:l], nil -} - -// Decrypt the ciphertext with the key and the initial vector. -func Decrypt(key, iv, ciphertext []byte) ([]byte, error) { - // Copy the cipher text as golang slices even when passed by value to this method can result in the backing arrays of the calling code value being updated. - ct := make([]byte, len(ciphertext)) - copy(ct, ciphertext) - if len(ct) < aes.BlockSize { - return []byte{}, fmt.Errorf("Ciphertext is not large enough. It is less that one block size. Blocksize:%v; Ciphertext:%v", aes.BlockSize, len(ct)) - } - // Configure the CBC - block, err := aes.NewCipher(key) - if err != nil { - return nil, fmt.Errorf("Error creating cipher: %v", err) - } - var mode cipher.BlockMode - - //If ciphertext is multiple of blocksize we just need to swap back the last two blocks and then do CBC - //If the ciphertext is just one block we can't swap so we just decrypt - if len(ct)%aes.BlockSize == 0 { - if len(ct) > aes.BlockSize { - ct, _ = swapLastTwoBlocks(ct, aes.BlockSize) - } - mode = cipher.NewCBCDecrypter(block, iv) - message := make([]byte, len(ct)) - mode.CryptBlocks(message, ct) - return message[:len(ct)], nil - } - - // Cipher Text Stealing (CTS) using CBC interface. Ref: https://en.wikipedia.org/wiki/Ciphertext_stealing#CBC_ciphertext_stealing - // Get ciphertext of the 2nd to last (penultimate) block (cpb), the last block (clb) and the rest (crb) - crb, cpb, clb, _ := tailBlocks(ct, aes.BlockSize) - v := make([]byte, len(iv), len(iv)) - copy(v, iv) - var message []byte - if crb != nil { - //If there is more than just the last and the penultimate block we decrypt it and the last bloc of this becomes the iv for later - rb := make([]byte, len(crb)) - mode = cipher.NewCBCDecrypter(block, v) - v = crb[len(crb)-aes.BlockSize:] - mode.CryptBlocks(rb, crb) - message = append(message, rb...) - } - - // We need to modify the cipher text - // Decryt the 2nd to last (penultimate) block with a the original iv - pb := make([]byte, aes.BlockSize) - mode = cipher.NewCBCDecrypter(block, iv) - mode.CryptBlocks(pb, cpb) - // number of byte needed to pad - npb := aes.BlockSize - len(ct)%aes.BlockSize - //pad last block using the number of bytes needed from the tail of the plaintext 2nd to last (penultimate) block - clb = append(clb, pb[len(pb)-npb:]...) - - // Now decrypt the last block in the penultimate position (iv will be from the crb, if the is no crb it's zeros) - // iv for the penultimate block decrypted in the last position becomes the modified last block - lb := make([]byte, aes.BlockSize) - mode = cipher.NewCBCDecrypter(block, v) - v = clb - mode.CryptBlocks(lb, clb) - message = append(message, lb...) - - // Now decrypt the penultimate block in the last position (iv will be from the modified last block) - mode = cipher.NewCBCDecrypter(block, v) - mode.CryptBlocks(cpb, cpb) - message = append(message, cpb...) - - // Truncate to the size of the original cipher text - return message[:len(ct)], nil -} - -func tailBlocks(b []byte, c int) ([]byte, []byte, []byte, error) { - if len(b) <= c { - return []byte{}, []byte{}, []byte{}, errors.New("bytes slice is not larger than one block so cannot tail") - } - // Get size of last block - var lbs int - if l := len(b) % aes.BlockSize; l == 0 { - lbs = aes.BlockSize - } else { - lbs = l - } - // Get last block - lb := b[len(b)-lbs:] - // Get 2nd to last (penultimate) block - pb := b[len(b)-lbs-c : len(b)-lbs] - if len(b) > 2*c { - rb := b[:len(b)-lbs-c] - return rb, pb, lb, nil - } - return nil, pb, lb, nil -} - -func swapLastTwoBlocks(b []byte, c int) ([]byte, error) { - rb, pb, lb, err := tailBlocks(b, c) - if err != nil { - return nil, err - } - var out []byte - if rb != nil { - out = append(out, rb...) - } - out = append(out, lb...) - out = append(out, pb...) - return out, nil -} - -// zeroPad pads bytes with zeros to nearest multiple of message size m. -func zeroPad(b []byte, m int) ([]byte, error) { - if m <= 0 { - return nil, errors.New("Invalid message block size when padding") - } - if b == nil || len(b) == 0 { - return nil, errors.New("Data not valid to pad: Zero size") - } - if l := len(b) % m; l != 0 { - n := m - l - z := make([]byte, n) - b = append(b, z...) - } - return b, nil -} diff --git a/vendor/gopkg.in/jcmturner/dnsutils.v1/.gitignore b/vendor/gopkg.in/jcmturner/dnsutils.v1/.gitignore deleted file mode 100644 index a1338d68..00000000 --- a/vendor/gopkg.in/jcmturner/dnsutils.v1/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ diff --git a/vendor/gopkg.in/jcmturner/dnsutils.v1/.travis.yml b/vendor/gopkg.in/jcmturner/dnsutils.v1/.travis.yml deleted file mode 100644 index cab4f7b8..00000000 --- a/vendor/gopkg.in/jcmturner/dnsutils.v1/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: go - -go: - - 1.7.x - - 1.8.x - - 1.9.x - - master - -gobuild_args: -tags=integration -race - -sudo: required - -services: - - docker - -before_install: - - docker pull jcmturner/gokrb5:dns - - docker run -d -h kdc.test.gokrb5 -v /etc/localtime:/etc/localtime:ro -e "TEST_KDC_ADDR=127.0.0.1" -p 53:53 -p 53:53/udp --name dns jcmturner/gokrb5:dns - -before_script: - - sudo sed -i 's/nameserver .*/nameserver 127.0.0.1/g' /etc/resolv.conf - -env: - - DNSUTILS_OVERRIDE_NS="127.0.0.1:53" \ No newline at end of file diff --git a/vendor/gopkg.in/jcmturner/dnsutils.v1/LICENSE b/vendor/gopkg.in/jcmturner/dnsutils.v1/LICENSE deleted file mode 100644 index 261eeb9e..00000000 --- a/vendor/gopkg.in/jcmturner/dnsutils.v1/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/gopkg.in/jcmturner/dnsutils.v1/srv.go b/vendor/gopkg.in/jcmturner/dnsutils.v1/srv.go deleted file mode 100644 index 15ea912d..00000000 --- a/vendor/gopkg.in/jcmturner/dnsutils.v1/srv.go +++ /dev/null @@ -1,95 +0,0 @@ -package dnsutils - -import ( - "math/rand" - "net" - "sort" -) - -// OrderedSRV returns a count of the results and a map keyed on the order they should be used. -// This based on the records' priority and randomised selection based on their relative weighting. -// The function's inputs are the same as those for net.LookupSRV -// To use in the correct order: -// -// count, orderedSRV, err := OrderedSRV(service, proto, name) -// i := 1 -// for i <= count { -// srv := orderedSRV[i] -// // Do something such as dial this SRV. If fails move on the the next or break if it succeeds. -// i += 1 -// } -func OrderedSRV(service, proto, name string) (int, map[int]*net.SRV, error) { - _, addrs, err := net.LookupSRV(service, proto, name) - if err != nil { - return 0, make(map[int]*net.SRV), err - } - index, osrv := orderSRV(addrs) - return index, osrv, nil -} - -func orderSRV(addrs []*net.SRV) (int, map[int]*net.SRV) { - // Initialise the ordered map - var o int - osrv := make(map[int]*net.SRV) - - prioMap := make(map[int][]*net.SRV, 0) - for _, srv := range addrs { - prioMap[int(srv.Priority)] = append(prioMap[int(srv.Priority)], srv) - } - - priorities := make([]int, 0) - for p := range prioMap { - priorities = append(priorities, p) - } - - var count int - sort.Ints(priorities) - for _, p := range priorities { - tos := weightedOrder(prioMap[p]) - for i, s := range tos { - count += 1 - osrv[o+i] = s - } - o += len(tos) - } - return count, osrv -} - -func weightedOrder(srvs []*net.SRV) map[int]*net.SRV { - // Get the total weight - var tw int - for _, s := range srvs { - tw += int(s.Weight) - } - - // Initialise the ordered map - o := 1 - osrv := make(map[int]*net.SRV) - - // Whilst there are still entries to be ordered - l := len(srvs) - for l > 0 { - i := rand.Intn(l) - s := srvs[i] - var rw int - if tw > 0 { - // Greater the weight the more likely this will be zero or less - rw = rand.Intn(tw) - int(s.Weight) - } - if rw <= 0 { - // Put entry in position - osrv[o] = s - if len(srvs) > 1 { - // Remove the entry from the source slice by swapping with the last entry and truncating - srvs[len(srvs)-1], srvs[i] = srvs[i], srvs[len(srvs)-1] - srvs = srvs[:len(srvs)-1] - l = len(srvs) - } else { - l = 0 - } - o += 1 - tw = tw - int(s.Weight) - } - } - return osrv -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/LICENSE b/vendor/gopkg.in/jcmturner/gokrb5.v5/LICENSE deleted file mode 100644 index 8dada3ed..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/asn1tools/tools.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/asn1tools/tools.go deleted file mode 100644 index f27740b9..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/asn1tools/tools.go +++ /dev/null @@ -1,86 +0,0 @@ -// Package asn1tools provides tools for managing ASN1 marshaled data. -package asn1tools - -import ( - "github.com/jcmturner/gofork/encoding/asn1" -) - -// MarshalLengthBytes returns the ASN1 encoded bytes for the length 'l' -// -// There are two forms: short (for lengths between 0 and 127), and long definite (for lengths between 0 and 2^1008 -1). -// -// Short form: One octet. Bit 8 has value "0" and bits 7-1 give the length. -// -// Long form: Two to 127 octets. Bit 8 of first octet has value "1" and bits 7-1 give the number of additional length octets. Second and following octets give the length, base 256, most significant digit first. -func MarshalLengthBytes(l int) []byte { - if l <= 127 { - return []byte{byte(l)} - } - var b []byte - p := 1 - for i := 1; i < 127; { - b = append([]byte{byte((l % (p * 256)) / p)}, b...) - p = p * 256 - l = l - l%p - if l <= 0 { - break - } - } - return append([]byte{byte(128 + len(b))}, b...) -} - -// GetLengthFromASN returns the length of a slice of ASN1 encoded bytes from the ASN1 length header it contains. -func GetLengthFromASN(b []byte) int { - if int(b[1]) <= 127 { - return int(b[1]) - } - // The bytes that indicate the length - lb := b[2 : 2+int(b[1])-128] - base := 1 - l := 0 - for i := len(lb) - 1; i >= 0; i-- { - l += int(lb[i]) * base - base = base * 256 - } - return l -} - -// GetNumberBytesInLengthHeader returns the number of bytes in the ASn1 header that indicate the length. -func GetNumberBytesInLengthHeader(b []byte) int { - if int(b[1]) <= 127 { - return 1 - } - // The bytes that indicate the length - return 1 + int(b[1]) - 128 -} - -// AddASNAppTag adds an ASN1 encoding application tag value to the raw bytes provided. -func AddASNAppTag(b []byte, tag int) []byte { - r := asn1.RawValue{ - Class: asn1.ClassApplication, - IsCompound: true, - Tag: tag, - Bytes: b, - } - ab, _ := asn1.Marshal(r) - return ab -} - -/* -// The Marshal method of golang's asn1 package does not enable you to define wrapping the output in an application tag. -// This method adds that wrapping tag. -func AddASNAppTag(b []byte, tag int) []byte { - // The ASN1 wrapping consists of 2 bytes: - // 1st byte -> Identifier Octet - Application Tag - // 2nd byte -> The length (this will be the size indicated in the input bytes + 2 for the additional bytes we add here. - // Application Tag: - //| Bit: | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | - //| Value: | 0 | 1 | 1 | From the RFC spec 4120 | - //| Explanation | Defined by the ASN1 encoding rules for an application tag | A value of 1 indicates a constructed type | The ASN Application tag value | - // Therefore the value of the byte is an integer = ( Application tag value + 96 ) - //b = append(MarshalLengthBytes(int(b[1])+2), b...) - b = append(MarshalLengthBytes(len(b)), b...) - b = append([]byte{byte(96 + tag)}, b...) - return b -} -*/ diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/ASExchange.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/ASExchange.go deleted file mode 100644 index f74ed4e6..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/ASExchange.go +++ /dev/null @@ -1,154 +0,0 @@ -package client - -import ( - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" - "gopkg.in/jcmturner/gokrb5.v5/iana/errorcode" - "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" - "gopkg.in/jcmturner/gokrb5.v5/iana/patype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/messages" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// ASExchange performs an AS exchange for the client to retrieve a TGT. -func (cl *Client) ASExchange(realm string, ASReq messages.ASReq, referral int) (messages.ASRep, error) { - if ok, err := cl.IsConfigured(); !ok { - return messages.ASRep{}, krberror.Errorf(err, krberror.ConfigError, "AS Exchange cannot be preformed") - } - - b, err := ASReq.Marshal() - if err != nil { - return messages.ASRep{}, krberror.Errorf(err, krberror.EncodingError, "AS Exchange Error: failed marshaling AS_REQ") - } - var ASRep messages.ASRep - - rb, err := cl.SendToKDC(b, realm) - if err != nil { - if e, ok := err.(messages.KRBError); ok { - switch e.ErrorCode { - case errorcode.KDC_ERR_PREAUTH_REQUIRED: - // From now on assume this client will need to do this pre-auth and set the PAData - cl.GoKrb5Conf.AssumePAEncTimestampRequired = true - err = setPAData(cl, e, &ASReq) - if err != nil { - return messages.ASRep{}, krberror.Errorf(err, krberror.KRBMsgError, "AS Exchange Error: failed setting AS_REQ PAData for pre-authentication required") - } - b, err := ASReq.Marshal() - if err != nil { - return messages.ASRep{}, krberror.Errorf(err, krberror.EncodingError, "AS Exchange Error: failed marshaling AS_REQ with PAData") - } - rb, err = cl.SendToKDC(b, realm) - if err != nil { - return messages.ASRep{}, krberror.Errorf(err, krberror.NetworkingError, "AS Exchange Error: failed sending AS_REQ to KDC") - } - case errorcode.KDC_ERR_WRONG_REALM: - // Client referral https://tools.ietf.org/html/rfc6806.html#section-7 - if referral > 5 { - return messages.ASRep{}, krberror.Errorf(err, krberror.KRBMsgError, "maximum number of client referrals exceeded") - } - referral++ - return cl.ASExchange(e.CRealm, ASReq, referral) - } - } else { - return messages.ASRep{}, krberror.Errorf(err, krberror.NetworkingError, "AS Exchange Error: failed sending AS_REQ to KDC") - } - } - err = ASRep.Unmarshal(rb) - if err != nil { - return messages.ASRep{}, krberror.Errorf(err, krberror.EncodingError, "AS Exchange Error: failed to process the AS_REP") - } - if ok, err := ASRep.IsValid(cl.Config, cl.Credentials, ASReq); !ok { - return messages.ASRep{}, krberror.Errorf(err, krberror.KRBMsgError, "AS Exchange Error: AS_REP is not valid or client password/keytab incorrect") - } - return ASRep, nil -} - -func setPAData(cl *Client, krberr messages.KRBError, ASReq *messages.ASReq) error { - if !cl.GoKrb5Conf.DisablePAFXFast { - pa := types.PAData{PADataType: patype.PA_REQ_ENC_PA_REP} - ASReq.PAData = append(ASReq.PAData, pa) - } - if cl.GoKrb5Conf.AssumePAEncTimestampRequired { - paTSb, err := types.GetPAEncTSEncAsnMarshalled() - if err != nil { - return krberror.Errorf(err, krberror.KRBMsgError, "Error creating PAEncTSEnc for Pre-Authentication") - } - var et etype.EType - if krberr.ErrorCode == 0 { - // This is not in response to an error from the KDC. It is preemptive - et, err = crypto.GetEtype(ASReq.ReqBody.EType[0]) // Take the first as preference - if err != nil { - return krberror.Errorf(err, krberror.EncryptingError, "error getting etype for pre-auth encryption") - } - } else { - // Get the etype to use from the PA data in the KRBError e-data - et, err = preAuthEType(krberr) - if err != nil { - return krberror.Errorf(err, krberror.EncryptingError, "error getting etype for pre-auth encryption") - } - } - key, err := cl.Key(et, krberr) - if err != nil { - return krberror.Errorf(err, krberror.EncryptingError, "Error getting key from credentials") - } - paEncTS, err := crypto.GetEncryptedData(paTSb, key, keyusage.AS_REQ_PA_ENC_TIMESTAMP, 1) - if err != nil { - return krberror.Errorf(err, krberror.EncryptingError, "Error encrypting pre-authentication timestamp") - } - pb, err := paEncTS.Marshal() - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error marshaling the PAEncTSEnc encrypted data") - } - pa := types.PAData{ - PADataType: patype.PA_ENC_TIMESTAMP, - PADataValue: pb, - } - ASReq.PAData = append(ASReq.PAData, pa) - } - return nil -} - -func preAuthEType(krberr messages.KRBError) (etype etype.EType, err error) { - //The preferred ordering of the "hint" pre-authentication data that - //affect client key selection is: ETYPE-INFO2, followed by ETYPE-INFO, - //followed by PW-SALT. - //A KDC SHOULD NOT send PA-PW-SALT when issuing a KRB-ERROR message - //that requests additional pre-authentication. Implementation note: - //Some KDC implementations issue an erroneous PA-PW-SALT when issuing a - //KRB-ERROR message that requests additional pre-authentication. - //Therefore, clients SHOULD ignore a PA-PW-SALT accompanying a - //KRB-ERROR message that requests additional pre-authentication. - var etypeID int32 - var pas types.PADataSequence - e := pas.Unmarshal(krberr.EData) - if e != nil { - err = krberror.Errorf(e, krberror.EncodingError, "error unmashalling KRBError data") - return - } - for _, pa := range pas { - switch pa.PADataType { - case patype.PA_ETYPE_INFO2: - info, e := pa.GetETypeInfo2() - if e != nil { - err = krberror.Errorf(e, krberror.EncodingError, "error unmashalling ETYPE-INFO2 data") - return - } - etypeID = info[0].EType - break - case patype.PA_ETYPE_INFO: - info, e := pa.GetETypeInfo() - if e != nil { - err = krberror.Errorf(e, krberror.EncodingError, "error unmashalling ETYPE-INFO data") - return - } - etypeID = info[0].EType - } - } - etype, e = crypto.GetEtype(etypeID) - if e != nil { - err = krberror.Errorf(e, krberror.EncryptingError, "Error creating etype") - return - } - return etype, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/TGSExchange.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/TGSExchange.go deleted file mode 100644 index 633fa70d..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/TGSExchange.go +++ /dev/null @@ -1,101 +0,0 @@ -package client - -import ( - "time" - - "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/messages" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// TGSExchange performs a TGS exchange to retrieve a ticket to the specified SPN. -// The ticket retrieved is added to the client's cache. -func (cl *Client) TGSExchange(spn types.PrincipalName, kdcRealm string, tkt messages.Ticket, sessionKey types.EncryptionKey, renewal bool, referral int) (tgsReq messages.TGSReq, tgsRep messages.TGSRep, err error) { - //// Check what sessions we have for this SPN. - //// Will get the session to the default realm if one does not exist for requested SPN - //sess, err := cl.GetSessionFromPrincipalName(spn) - //if err != nil { - // return tgsReq, tgsRep, err - //} - tgsReq, err = messages.NewTGSReq(cl.Credentials.CName, kdcRealm, cl.Config, tkt, sessionKey, spn, renewal) - if err != nil { - return tgsReq, tgsRep, krberror.Errorf(err, krberror.KRBMsgError, "TGS Exchange Error: failed to generate a new TGS_REQ") - } - b, err := tgsReq.Marshal() - if err != nil { - return tgsReq, tgsRep, krberror.Errorf(err, krberror.EncodingError, "TGS Exchange Error: failed to generate a new TGS_REQ") - } - r, err := cl.SendToKDC(b, kdcRealm) - if err != nil { - return tgsReq, tgsRep, krberror.Errorf(err, krberror.NetworkingError, "TGS Exchange Error: issue sending TGS_REQ to KDC") - } - err = tgsRep.Unmarshal(r) - if err != nil { - return tgsReq, tgsRep, krberror.Errorf(err, krberror.EncodingError, "TGS Exchange Error: failed to process the TGS_REP") - } - err = tgsRep.DecryptEncPart(sessionKey) - if err != nil { - return tgsReq, tgsRep, krberror.Errorf(err, krberror.EncodingError, "TGS Exchange Error: failed to process the TGS_REP") - } - if tgsRep.Ticket.SName.NameType == nametype.KRB_NT_SRV_INST && !tgsRep.Ticket.SName.Equal(spn) { - if referral > 5 { - return tgsReq, tgsRep, krberror.Errorf(err, krberror.KRBMsgError, "maximum number of referrals exceeded") - } - // Server referral https://tools.ietf.org/html/rfc6806.html#section-8 - // The TGS Rep contains a TGT for another domain as the service resides in that domain. - if ok, err := tgsRep.IsValid(cl.Config, tgsReq); !ok { - return tgsReq, tgsRep, krberror.Errorf(err, krberror.EncodingError, "TGS Exchange Error: TGS_REP is not valid") - } - cl.AddSession(tgsRep.Ticket, tgsRep.DecryptedEncPart) - realm := tgsRep.Ticket.SName.NameString[1] - referral++ - return cl.TGSExchange(spn, realm, tgsRep.Ticket, tgsRep.DecryptedEncPart.Key, false, referral) - } - if ok, err := tgsRep.IsValid(cl.Config, tgsReq); !ok { - return tgsReq, tgsRep, krberror.Errorf(err, krberror.EncodingError, "TGS Exchange Error: TGS_REP is not valid") - } - return tgsReq, tgsRep, nil -} - -// GetServiceTicket makes a request to get a service ticket for the SPN specified -// SPN format: / Eg. HTTP/www.example.com -// The ticket will be added to the client's ticket cache -func (cl *Client) GetServiceTicket(spn string) (messages.Ticket, types.EncryptionKey, error) { - var tkt messages.Ticket - var skey types.EncryptionKey - if tkt, skey, ok := cl.GetCachedTicket(spn); ok { - // Already a valid ticket in the cache - return tkt, skey, nil - } - princ := types.NewPrincipalName(nametype.KRB_NT_PRINCIPAL, spn) - sess, err := cl.GetSessionFromPrincipalName(princ) - if err != nil { - return tkt, skey, err - } - // Ensure TGT still valid - if time.Now().UTC().After(sess.EndTime) { - _, err := cl.updateSession(sess) - if err != nil { - return tkt, skey, err - } - // Get the session again as it could have been replaced by the update - sess, err = cl.GetSessionFromPrincipalName(princ) - if err != nil { - return tkt, skey, err - } - } - _, tgsRep, err := cl.TGSExchange(princ, sess.Realm, sess.TGT, sess.SessionKey, false, 0) - if err != nil { - return tkt, skey, err - } - cl.Cache.addEntry( - tgsRep.Ticket, - tgsRep.DecryptedEncPart.AuthTime, - tgsRep.DecryptedEncPart.StartTime, - tgsRep.DecryptedEncPart.EndTime, - tgsRep.DecryptedEncPart.RenewTill, - tgsRep.DecryptedEncPart.Key, - ) - return tgsRep.Ticket, tgsRep.DecryptedEncPart.Key, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/cache.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/cache.go deleted file mode 100644 index 694dec73..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/cache.go +++ /dev/null @@ -1,102 +0,0 @@ -package client - -import ( - "gopkg.in/jcmturner/gokrb5.v5/messages" - "gopkg.in/jcmturner/gokrb5.v5/types" - "strings" - "sync" - "time" -) - -// Cache for client tickets. -type Cache struct { - Entries map[string]CacheEntry - mux sync.RWMutex -} - -// CacheEntry holds details for a client cache entry. -type CacheEntry struct { - Ticket messages.Ticket - AuthTime time.Time - StartTime time.Time - EndTime time.Time - RenewTill time.Time - SessionKey types.EncryptionKey -} - -// NewCache creates a new client ticket cache instance. -func NewCache() *Cache { - return &Cache{ - Entries: map[string]CacheEntry{}, - } -} - -// GetEntry returns a cache entry that matches the SPN. -func (c *Cache) getEntry(spn string) (CacheEntry, bool) { - c.mux.RLock() - defer c.mux.RUnlock() - e, ok := (*c).Entries[spn] - return e, ok -} - -// AddEntry adds a ticket to the cache. -func (c *Cache) addEntry(tkt messages.Ticket, authTime, startTime, endTime, renewTill time.Time, sessionKey types.EncryptionKey) CacheEntry { - spn := strings.Join(tkt.SName.NameString, "/") - c.mux.Lock() - defer c.mux.Unlock() - (*c).Entries[spn] = CacheEntry{ - Ticket: tkt, - AuthTime: authTime, - StartTime: startTime, - EndTime: endTime, - RenewTill: renewTill, - SessionKey: sessionKey, - } - return c.Entries[spn] -} - -// RemoveEntry removes the cache entry for the defined SPN. -func (c *Cache) RemoveEntry(spn string) { - c.mux.Lock() - defer c.mux.Unlock() - delete(c.Entries, spn) -} - -// GetCachedTicket returns a ticket from the cache for the SPN. -// Only a ticket that is currently valid will be returned. -func (cl *Client) GetCachedTicket(spn string) (messages.Ticket, types.EncryptionKey, bool) { - if e, ok := cl.Cache.getEntry(spn); ok { - //If within time window of ticket return it - if time.Now().UTC().After(e.StartTime) && time.Now().UTC().Before(e.EndTime) { - return e.Ticket, e.SessionKey, true - } else if time.Now().UTC().Before(e.RenewTill) { - e, err := cl.renewTicket(e) - if err != nil { - return e.Ticket, e.SessionKey, false - } - return e.Ticket, e.SessionKey, true - } - } - var tkt messages.Ticket - var key types.EncryptionKey - return tkt, key, false -} - -// renewTicket renews a cache entry ticket. -// To renew from outside the client package use GetCachedTicket -func (cl *Client) renewTicket(e CacheEntry) (CacheEntry, error) { - spn := e.Ticket.SName - _, tgsRep, err := cl.TGSExchange(spn, e.Ticket.Realm, e.Ticket, e.SessionKey, true, 0) - if err != nil { - return e, err - } - e = cl.Cache.addEntry( - tgsRep.Ticket, - tgsRep.DecryptedEncPart.AuthTime, - tgsRep.DecryptedEncPart.StartTime, - tgsRep.DecryptedEncPart.EndTime, - tgsRep.DecryptedEncPart.RenewTill, - tgsRep.DecryptedEncPart.Key, - ) - return e, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/client.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/client.go deleted file mode 100644 index bd770c32..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/client.go +++ /dev/null @@ -1,215 +0,0 @@ -// Package client provides a client library and methods for Kerberos 5 authentication. -package client - -import ( - "errors" - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/config" - "gopkg.in/jcmturner/gokrb5.v5/credentials" - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" - "gopkg.in/jcmturner/gokrb5.v5/iana/errorcode" - "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" - "gopkg.in/jcmturner/gokrb5.v5/keytab" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/messages" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// Client side configuration and state. -type Client struct { - Credentials *credentials.Credentials - Config *config.Config - GoKrb5Conf *Config - sessions *sessions - Cache *Cache -} - -// Config struct holds GoKRB5 specific client configurations. -// Set Disable_PA_FX_FAST to true to force this behaviour off. -// Set Assume_PA_ENC_TIMESTAMP_Required to send the PA_ENC_TIMESTAMP pro-actively rather than waiting for a KRB_ERROR response from the KDC indicating it is required. -type Config struct { - DisablePAFXFast bool - AssumePAEncTimestampRequired bool -} - -// NewClientWithPassword creates a new client from a password credential. -// Set the realm to empty string to use the default realm from config. -func NewClientWithPassword(username, realm, password string) Client { - creds := credentials.NewCredentials(username, realm) - return Client{ - Credentials: creds.WithPassword(password), - Config: config.NewConfig(), - GoKrb5Conf: &Config{}, - sessions: &sessions{ - Entries: make(map[string]*session), - }, - Cache: NewCache(), - } -} - -// NewClientWithKeytab creates a new client from a keytab credential. -func NewClientWithKeytab(username, realm string, kt keytab.Keytab) Client { - creds := credentials.NewCredentials(username, realm) - return Client{ - Credentials: creds.WithKeytab(kt), - Config: config.NewConfig(), - GoKrb5Conf: &Config{}, - sessions: &sessions{ - Entries: make(map[string]*session), - }, - Cache: NewCache(), - } -} - -// NewClientFromCCache create a client from a populated client cache. -// -// WARNING: A client created from CCache does not automatically renew TGTs and a failure will occur after the TGT expires. -func NewClientFromCCache(c credentials.CCache) (Client, error) { - cl := Client{ - Credentials: c.GetClientCredentials(), - Config: config.NewConfig(), - GoKrb5Conf: &Config{}, - sessions: &sessions{ - Entries: make(map[string]*session), - }, - Cache: NewCache(), - } - spn := types.PrincipalName{ - NameType: nametype.KRB_NT_SRV_INST, - NameString: []string{"krbtgt", c.DefaultPrincipal.Realm}, - } - cred, ok := c.GetEntry(spn) - if !ok { - return cl, errors.New("TGT not found in CCache") - } - var tgt messages.Ticket - err := tgt.Unmarshal(cred.Ticket) - if err != nil { - return cl, fmt.Errorf("TGT bytes in cache are not valid: %v", err) - } - cl.sessions.Entries[c.DefaultPrincipal.Realm] = &session{ - Realm: c.DefaultPrincipal.Realm, - AuthTime: cred.AuthTime, - EndTime: cred.EndTime, - RenewTill: cred.RenewTill, - TGT: tgt, - SessionKey: cred.Key, - } - for _, cred := range c.GetEntries() { - var tkt messages.Ticket - err = tkt.Unmarshal(cred.Ticket) - if err != nil { - return cl, fmt.Errorf("cache entry ticket bytes are not valid: %v", err) - } - cl.Cache.addEntry( - tkt, - cred.AuthTime, - cred.StartTime, - cred.EndTime, - cred.RenewTill, - cred.Key, - ) - } - return cl, nil -} - -// WithConfig sets the Kerberos configuration for the client. -func (cl *Client) WithConfig(cfg *config.Config) *Client { - cl.Config = cfg - return cl -} - -// WithKeytab adds a keytab to the client -func (cl *Client) WithKeytab(kt keytab.Keytab) *Client { - cl.Credentials.WithKeytab(kt) - return cl -} - -// WithPassword adds a password to the client -func (cl *Client) WithPassword(password string) *Client { - cl.Credentials.WithPassword(password) - return cl -} - -// Key returns a key for the client. Preferably from a keytab and then generated from the password. -// The KRBError would have been returned from the KDC and must be of type KDC_ERR_PREAUTH_REQUIRED. -// If a KRBError is not available pass messages.KRBError{} and a key will be returned from the credentials keytab. -func (cl *Client) Key(etype etype.EType, krberr messages.KRBError) (types.EncryptionKey, error) { - if cl.Credentials.HasKeytab() && etype != nil { - return cl.Credentials.Keytab.GetEncryptionKey(cl.Credentials.CName.NameString, cl.Credentials.Realm, 0, etype.GetETypeID()) - } else if cl.Credentials.HasPassword() { - if krberr.ErrorCode == errorcode.KDC_ERR_PREAUTH_REQUIRED { - var pas types.PADataSequence - err := pas.Unmarshal(krberr.EData) - if err != nil { - return types.EncryptionKey{}, fmt.Errorf("could not get PAData from KRBError to generate key from password: %v", err) - } - key, _, err := crypto.GetKeyFromPassword(cl.Credentials.Password, krberr.CName, krberr.CRealm, etype.GetETypeID(), pas) - return key, err - } - key, _, err := crypto.GetKeyFromPassword(cl.Credentials.Password, cl.Credentials.CName, cl.Credentials.Realm, etype.GetETypeID(), types.PADataSequence{}) - return key, err - } - return types.EncryptionKey{}, errors.New("credential has neither keytab or password to generate key") -} - -// LoadConfig loads the Kerberos configuration for the client from file path specified. -func (cl *Client) LoadConfig(cfgPath string) (*Client, error) { - cfg, err := config.Load(cfgPath) - if err != nil { - return cl, err - } - cl.Config = cfg - return cl, nil -} - -// IsConfigured indicates if the client has the values required set. -func (cl *Client) IsConfigured() (bool, error) { - // Client needs to have either a password, keytab or a session already (later when loading from CCache) - if !cl.Credentials.HasPassword() && !cl.Credentials.HasKeytab() { - sess, err := cl.GetSessionFromRealm(cl.Config.LibDefaults.DefaultRealm) - if err != nil || sess.AuthTime.IsZero() { - return false, errors.New("client has neither a keytab nor a password set and no session") - } - } - if cl.Credentials.Username == "" { - return false, errors.New("client does not have a username") - } - if cl.Config.LibDefaults.DefaultRealm == "" { - return false, errors.New("client krb5 config does not have a default realm") - } - if !cl.Config.LibDefaults.DNSLookupKDC { - for _, r := range cl.Config.Realms { - if r.Realm == cl.Config.LibDefaults.DefaultRealm { - if len(r.KDC) > 0 { - return true, nil - } - return false, errors.New("client krb5 config does not have any defined KDCs for the default realm") - } - } - } - return true, nil -} - -// Login the client with the KDC via an AS exchange. -func (cl *Client) Login() error { - if cl.Credentials.Realm == "" { - cl.Credentials.Realm = cl.Config.LibDefaults.DefaultRealm - } - ASReq, err := messages.NewASReqForTGT(cl.Credentials.Realm, cl.Config, cl.Credentials.CName) - if err != nil { - return krberror.Errorf(err, krberror.KRBMsgError, "error generating new AS_REQ") - } - err = setPAData(cl, messages.KRBError{}, &ASReq) - if err != nil { - return krberror.Errorf(err, krberror.KRBMsgError, "failed setting AS_REQ PAData") - } - ASRep, err := cl.ASExchange(cl.Credentials.Realm, ASReq, 0) - if err != nil { - return err - } - cl.AddSession(ASRep.Ticket, ASRep.DecryptedEncPart) - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/http.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/http.go deleted file mode 100644 index c13afbeb..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/http.go +++ /dev/null @@ -1,46 +0,0 @@ -package client - -import ( - "encoding/base64" - "fmt" - "net/http" - "strings" - - "gopkg.in/jcmturner/gokrb5.v5/credentials" - "gopkg.in/jcmturner/gokrb5.v5/gssapi" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/messages" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// SetSPNEGOHeader gets the service ticket and sets it as the SPNEGO authorization header on HTTP request object. -// To auto generate the SPN from the request object pass a null string "". -func (cl *Client) SetSPNEGOHeader(r *http.Request, spn string) error { - if spn == "" { - spn = "HTTP/" + strings.SplitN(r.Host, ":", 2)[0] - } - tkt, skey, err := cl.GetServiceTicket(spn) - if err != nil { - return fmt.Errorf("could not get service ticket: %v", err) - } - err = SetSPNEGOHeader(*cl.Credentials, tkt, skey, r) - if err != nil { - return err - } - return nil -} - -// SetSPNEGOHeader sets the provided ticket as the SPNEGO authorization header on HTTP request object. -func SetSPNEGOHeader(creds credentials.Credentials, tkt messages.Ticket, sessionKey types.EncryptionKey, r *http.Request) error { - SPNEGOToken, err := gssapi.GetSPNEGOKrbNegTokenInit(creds, tkt, sessionKey) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "could not generate SPNEGO negotiation token") - } - nb, err := SPNEGOToken.Marshal() - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "could not marshal SPNEGO") - } - hs := "Negotiate " + base64.StdEncoding.EncodeToString(nb) - r.Header.Set("Authorization", hs) - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/network.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/network.go deleted file mode 100644 index c330aeb2..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/network.go +++ /dev/null @@ -1,213 +0,0 @@ -package client - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "io" - "net" - "time" - - "gopkg.in/jcmturner/gokrb5.v5/iana/errorcode" - "gopkg.in/jcmturner/gokrb5.v5/messages" -) - -// SendToKDC performs network actions to send data to the KDC. -func (cl *Client) SendToKDC(b []byte, realm string) ([]byte, error) { - var rb []byte - if cl.Config.LibDefaults.UDPPreferenceLimit == 1 { - //1 means we should always use TCP - rb, errtcp := cl.sendKDCTCP(realm, b) - if errtcp != nil { - if e, ok := errtcp.(messages.KRBError); ok { - return rb, e - } - return rb, fmt.Errorf("communication error with KDC via TCP: %v", errtcp) - } - return rb, nil - } - if len(b) <= cl.Config.LibDefaults.UDPPreferenceLimit { - //Try UDP first, TCP second - rb, errudp := cl.sendKDCUDP(realm, b) - if errudp != nil { - if e, ok := errudp.(messages.KRBError); ok && e.ErrorCode != errorcode.KRB_ERR_RESPONSE_TOO_BIG { - // Got a KRBError from KDC - // If this is not a KRB_ERR_RESPONSE_TOO_BIG we will return immediately otherwise will try TCP. - return rb, e - } - // Try TCP - r, errtcp := cl.sendKDCTCP(realm, b) - if errtcp != nil { - if e, ok := errtcp.(messages.KRBError); ok { - // Got a KRBError - return r, e - } - return r, fmt.Errorf("failed to communicate with KDC. Attempts made with UDP (%v) and then TCP (%v)", errudp, errtcp) - } - rb = r - } - return rb, nil - } - //Try TCP first, UDP second - rb, errtcp := cl.sendKDCTCP(realm, b) - if errtcp != nil { - if e, ok := errtcp.(messages.KRBError); ok { - // Got a KRBError from KDC so returning and not trying UDP. - return rb, e - } - rb, errudp := cl.sendKDCUDP(realm, b) - if errudp != nil { - if e, ok := errudp.(messages.KRBError); ok { - // Got a KRBError - return rb, e - } - return rb, fmt.Errorf("failed to communicate with KDC. Attempts made with TCP (%v) and then UDP (%v)", errtcp, errudp) - } - } - return rb, nil -} - -func dialKDCUDP(count int, kdcs map[int]string) (conn *net.UDPConn, err error) { - i := 1 - for i <= count { - udpAddr, e := net.ResolveUDPAddr("udp", kdcs[i]) - if e != nil { - err = fmt.Errorf("error resolving KDC address: %v", e) - return - } - conn, err = net.DialUDP("udp", nil, udpAddr) - if err == nil { - conn.SetDeadline(time.Now().Add(time.Duration(5 * time.Second))) - return - } - i++ - } - err = errors.New("error in getting a UDP connection to any of the KDCs") - return -} - -func dialKDCTCP(count int, kdcs map[int]string) (conn *net.TCPConn, err error) { - i := 1 - for i <= count { - tcpAddr, e := net.ResolveTCPAddr("tcp", kdcs[i]) - if e != nil { - err = fmt.Errorf("error resolving KDC address: %v", e) - return - } - conn, err = net.DialTCP("tcp", nil, tcpAddr) - if err == nil { - conn.SetDeadline(time.Now().Add(time.Duration(5 * time.Second))) - return - } - i++ - } - err = errors.New("error in getting a TCP connection to any of the KDCs") - return -} - -// Send the bytes to the KDC over UDP. -func (cl *Client) sendKDCUDP(realm string, b []byte) ([]byte, error) { - var r []byte - count, kdcs, err := cl.Config.GetKDCs(realm, false) - if err != nil { - return r, err - } - conn, err := dialKDCUDP(count, kdcs) - if err != nil { - return r, err - } - r, err = cl.sendUDP(conn, b) - if err != nil { - return r, err - } - return checkForKRBError(r) -} - -func (cl *Client) sendKDCTCP(realm string, b []byte) ([]byte, error) { - var r []byte - count, kdcs, err := cl.Config.GetKDCs(realm, true) - if err != nil { - return r, err - } - conn, err := dialKDCTCP(count, kdcs) - if err != nil { - return r, err - } - rb, err := cl.sendTCP(conn, b) - if err != nil { - return r, err - } - return checkForKRBError(rb) -} - -// Send the bytes over UDP. -func (cl *Client) sendUDP(conn *net.UDPConn, b []byte) ([]byte, error) { - var r []byte - defer conn.Close() - _, err := conn.Write(b) - if err != nil { - return r, fmt.Errorf("error sending to (%s): %v", conn.RemoteAddr().String(), err) - } - udpbuf := make([]byte, 4096) - n, _, err := conn.ReadFrom(udpbuf) - r = udpbuf[:n] - if err != nil { - return r, fmt.Errorf("sending over UDP failed to %s: %v", conn.RemoteAddr().String(), err) - } - if len(r) < 1 { - return r, fmt.Errorf("no response data from %s", conn.RemoteAddr().String()) - } - return r, nil -} - -// Send the bytes over TCP. -func (cl *Client) sendTCP(conn *net.TCPConn, b []byte) ([]byte, error) { - defer conn.Close() - var r []byte - /* - RFC https://tools.ietf.org/html/rfc4120#section-7.2.2 - Each request (KRB_KDC_REQ) and response (KRB_KDC_REP or KRB_ERROR) - sent over the TCP stream is preceded by the length of the request as - 4 octets in network byte order. The high bit of the length is - reserved for future expansion and MUST currently be set to zero. If - a KDC that does not understand how to interpret a set high bit of the - length encoding receives a request with the high order bit of the - length set, it MUST return a KRB-ERROR message with the error - KRB_ERR_FIELD_TOOLONG and MUST close the TCP stream. - NB: network byte order == big endian - */ - var buf bytes.Buffer - binary.Write(&buf, binary.BigEndian, uint32(len(b))) - b = append(buf.Bytes(), b...) - - _, err := conn.Write(b) - if err != nil { - return r, fmt.Errorf("error sending to KDC (%s): %v", conn.RemoteAddr().String(), err) - } - - sh := make([]byte, 4, 4) - _, err = conn.Read(sh) - if err != nil { - return r, fmt.Errorf("error reading response size header: %v", err) - } - s := binary.BigEndian.Uint32(sh) - - rb := make([]byte, s, s) - _, err = io.ReadFull(conn, rb) - if err != nil { - return r, fmt.Errorf("error reading response: %v", err) - } - if len(rb) < 1 { - return r, fmt.Errorf("no response data from KDC %s", conn.RemoteAddr().String()) - } - return rb, nil -} - -func checkForKRBError(b []byte) ([]byte, error) { - var KRBErr messages.KRBError - if err := KRBErr.Unmarshal(b); err == nil { - return b, KRBErr - } - return b, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/passwd.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/passwd.go deleted file mode 100644 index 7733ab3c..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/passwd.go +++ /dev/null @@ -1,94 +0,0 @@ -package client - -import ( - "fmt" - "net" - - "gopkg.in/jcmturner/gokrb5.v5/kadmin" - "gopkg.in/jcmturner/gokrb5.v5/messages" -) - -// Kpasswd server response codes. -const ( - KRB5_KPASSWD_SUCCESS = 0 - KRB5_KPASSWD_MALFORMED = 1 - KRB5_KPASSWD_HARDERROR = 2 - KRB5_KPASSWD_AUTHERROR = 3 - KRB5_KPASSWD_SOFTERROR = 4 - KRB5_KPASSWD_ACCESSDENIED = 5 - KRB5_KPASSWD_BAD_VERSION = 6 - KRB5_KPASSWD_INITIAL_FLAG_NEEDED = 7 -) - -// ChangePasswd changes the password of the client to the value provided. -func (cl *Client) ChangePasswd(newPasswd string) (bool, error) { - ASReq, err := messages.NewASReqForChgPasswd(cl.Credentials.Realm, cl.Config, cl.Credentials.CName) - if err != nil { - return false, err - } - ASRep, err := cl.ASExchange(cl.Credentials.Realm, ASReq, 0) - if err != nil { - return false, err - } - - msg, key, err := kadmin.ChangePasswdMsg(cl.Credentials.CName, cl.Credentials.Realm, newPasswd, ASRep.Ticket, ASRep.DecryptedEncPart.Key) - if err != nil { - return false, err - } - r, err := cl.sendToKPasswd(msg) - if err != nil { - return false, err - } - err = r.Decrypt(key) - if err != nil { - return false, err - } - if r.ResultCode != KRB5_KPASSWD_SUCCESS { - return false, fmt.Errorf("error response from kdamin: %s", r.Result) - } - return true, nil -} - -func (cl *Client) sendToKPasswd(msg kadmin.Request) (r kadmin.Reply, err error) { - _, kps, err := cl.Config.GetKpasswdServers(cl.Credentials.Realm, true) - if err != nil { - return - } - addr := kps[1] - b, err := msg.Marshal() - if err != nil { - return - } - if len(b) <= cl.Config.LibDefaults.UDPPreferenceLimit { - return cl.sendKPasswdUDP(b, addr) - } - return cl.sendKPasswdTCP(b, addr) -} - -func (cl *Client) sendKPasswdTCP(b []byte, kadmindAddr string) (r kadmin.Reply, err error) { - tcpAddr, err := net.ResolveTCPAddr("tcp", kadmindAddr) - if err != nil { - return - } - conn, err := net.DialTCP("tcp", nil, tcpAddr) - if err != nil { - return - } - rb, err := cl.sendTCP(conn, b) - err = r.Unmarshal(rb) - return -} - -func (cl *Client) sendKPasswdUDP(b []byte, kadmindAddr string) (r kadmin.Reply, err error) { - udpAddr, err := net.ResolveUDPAddr("udp", kadmindAddr) - if err != nil { - return - } - conn, err := net.DialUDP("udp", nil, udpAddr) - if err != nil { - return - } - rb, err := cl.sendUDP(conn, b) - err = r.Unmarshal(rb) - return -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/session.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/client/session.go deleted file mode 100644 index 70def53c..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/client/session.go +++ /dev/null @@ -1,172 +0,0 @@ -package client - -import ( - "fmt" - "sync" - "time" - - "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/messages" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// Sessions keyed on the realm name -type sessions struct { - Entries map[string]*session - mux sync.RWMutex -} - -// Client session struct. -type session struct { - Realm string - AuthTime time.Time - EndTime time.Time - RenewTill time.Time - TGT messages.Ticket - SessionKey types.EncryptionKey - SessionKeyExpiration time.Time - cancel chan bool - mux sync.RWMutex -} - -func (s *session) update(tkt messages.Ticket, dep messages.EncKDCRepPart) { - s.mux.Lock() - defer s.mux.Unlock() - s.AuthTime = dep.AuthTime - s.AuthTime = dep.AuthTime - s.EndTime = dep.EndTime - s.RenewTill = dep.RenewTill - s.TGT = tkt - s.SessionKey = dep.Key - s.SessionKeyExpiration = dep.KeyExpiration -} - -// AddSession adds a session for a realm with a TGT to the client's session cache. -// A goroutine is started to automatically renew the TGT before expiry. -func (cl *Client) AddSession(tkt messages.Ticket, dep messages.EncKDCRepPart) { - cl.sessions.mux.Lock() - defer cl.sessions.mux.Unlock() - s := &session{ - Realm: tkt.SName.NameString[1], - AuthTime: dep.AuthTime, - EndTime: dep.EndTime, - RenewTill: dep.RenewTill, - TGT: tkt, - SessionKey: dep.Key, - SessionKeyExpiration: dep.KeyExpiration, - cancel: make(chan bool, 1), - } - // if a session already exists for this, cancel its auto renew. - if i, ok := cl.sessions.Entries[tkt.SName.NameString[1]]; ok { - i.cancel <- true - } - cl.sessions.Entries[tkt.SName.NameString[1]] = s - cl.enableAutoSessionRenewal(s) -} - -// enableAutoSessionRenewal turns on the automatic renewal for the client's TGT session. -func (cl *Client) enableAutoSessionRenewal(s *session) { - var timer *time.Timer - go func(s *session) { - for { - w := (s.EndTime.Sub(time.Now().UTC()) * 5) / 6 - if w < 0 { - return - } - timer = time.NewTimer(w) - select { - case <-timer.C: - renewal, err := cl.updateSession(s) - if !renewal && err == nil { - // end this goroutine as there will have been a new login and new auto renewal goroutine created. - return - } - case <-s.cancel: - // cancel has been called. Stop the timer and exit. - timer.Stop() - return - } - } - }(s) -} - -// RenewTGT renews the client's TGT session. -func (cl *Client) renewTGT(s *session) error { - spn := types.PrincipalName{ - NameType: nametype.KRB_NT_SRV_INST, - NameString: []string{"krbtgt", s.Realm}, - } - _, tgsRep, err := cl.TGSExchange(spn, s.TGT.Realm, s.TGT, s.SessionKey, true, 0) - if err != nil { - return krberror.Errorf(err, krberror.KRBMsgError, "Error renewing TGT") - } - s.update(tgsRep.Ticket, tgsRep.DecryptedEncPart) - return nil -} - -// updateSession updates either through renewal or creating a new login. -// The boolean indicates if the update was a renewal. -func (cl *Client) updateSession(s *session) (bool, error) { - if time.Now().UTC().Before(s.RenewTill) { - err := cl.renewTGT(s) - return true, err - } - err := cl.Login() - return false, err -} - -func (cl *Client) getSessionFromRemoteRealm(realm string) (*session, error) { - cl.sessions.mux.RLock() - sess, ok := cl.sessions.Entries[cl.Credentials.Realm] - cl.sessions.mux.RUnlock() - if !ok { - return nil, fmt.Errorf("client does not have a session for realm %s, login first", cl.Credentials.Realm) - } - - spn := types.PrincipalName{ - NameType: nametype.KRB_NT_SRV_INST, - NameString: []string{"krbtgt", realm}, - } - - _, tgsRep, err := cl.TGSExchange(spn, cl.Credentials.Realm, sess.TGT, sess.SessionKey, false, 0) - if err != nil { - return nil, err - } - cl.AddSession(tgsRep.Ticket, tgsRep.DecryptedEncPart) - - cl.sessions.mux.RLock() - defer cl.sessions.mux.RUnlock() - return cl.sessions.Entries[realm], nil -} - -// GetSessionFromRealm returns the session for the realm provided. -func (cl *Client) GetSessionFromRealm(realm string) (sess *session, err error) { - cl.sessions.mux.RLock() - s, ok := cl.sessions.Entries[realm] - cl.sessions.mux.RUnlock() - if !ok { - // Try to request TGT from trusted remote Realm - s, err = cl.getSessionFromRemoteRealm(realm) - if err != nil { - return - } - } - // Create another session to return to prevent race condition. - sess = &session{ - Realm: s.Realm, - AuthTime: s.AuthTime, - EndTime: s.EndTime, - RenewTill: s.RenewTill, - TGT: s.TGT, - SessionKey: s.SessionKey, - SessionKeyExpiration: s.SessionKeyExpiration, - } - return -} - -// GetSessionFromPrincipalName returns the session for the realm of the principal provided. -func (cl *Client) GetSessionFromPrincipalName(spn types.PrincipalName) (*session, error) { - realm := cl.Config.ResolveRealm(spn.NameString[len(spn.NameString)-1]) - return cl.GetSessionFromRealm(realm) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/config/hosts.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/config/hosts.go deleted file mode 100644 index bd96bdca..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/config/hosts.go +++ /dev/null @@ -1,134 +0,0 @@ -package config - -import ( - "fmt" - "math/rand" - "net" - "strconv" - "strings" - - "gopkg.in/jcmturner/dnsutils.v1" -) - -// GetKDCs returns the count of KDCs available and a map of KDC host names keyed on preference order. -func (c *Config) GetKDCs(realm string, tcp bool) (int, map[int]string, error) { - kdcs := make(map[int]string) - var count int - - // Use DNS to resolve kerberos SRV records if configured to do so in krb5.conf. - if c.LibDefaults.DNSLookupKDC { - proto := "udp" - if tcp { - proto = "tcp" - } - c, addrs, err := dnsutils.OrderedSRV("kerberos", proto, realm) - if err != nil { - return count, kdcs, err - } - if len(addrs) < 1 { - return count, kdcs, fmt.Errorf("no KDC SRV records found for realm %s", realm) - } - count = c - for k, v := range addrs { - kdcs[k] = strings.TrimRight(v.Target, ".") + ":" + strconv.Itoa(int(v.Port)) - } - } else { - // Get the KDCs from the krb5.conf an order them randomly for preference. - var ks []string - for _, r := range c.Realms { - if r.Realm == realm { - ks = r.KDC - break - } - } - count = len(ks) - if count < 1 { - return count, kdcs, fmt.Errorf("no KDCs defined in configuration for realm %s", realm) - } - kdcs = randServOrder(ks) - } - return count, kdcs, nil -} - -// GetKpasswdServers returns the count of kpasswd servers available and a map of kpasswd host names keyed on preference order. -// https://web.mit.edu/kerberos/krb5-latest/doc/admin/conf_files/krb5_conf.html#realms - see kpasswd_server section -func (c *Config) GetKpasswdServers(realm string, tcp bool) (int, map[int]string, error) { - kdcs := make(map[int]string) - var count int - - // Use DNS to resolve kerberos SRV records if configured to do so in krb5.conf. - if c.LibDefaults.DNSLookupKDC { - proto := "udp" - if tcp { - proto = "tcp" - } - c, addrs, err := dnsutils.OrderedSRV("kpasswd", proto, realm) - if err != nil { - return count, kdcs, err - } - if c < 1 { - c, addrs, err = dnsutils.OrderedSRV("kerberos-adm", proto, realm) - if err != nil { - return count, kdcs, err - } - } - if len(addrs) < 1 { - return count, kdcs, fmt.Errorf("no kpasswd or kadmin SRV records found for realm %s", realm) - } - count = c - for k, v := range addrs { - kdcs[k] = strings.TrimRight(v.Target, ".") + ":" + strconv.Itoa(int(v.Port)) - } - } else { - // Get the KDCs from the krb5.conf an order them randomly for preference. - var ks []string - var ka []string - for _, r := range c.Realms { - if r.Realm == realm { - ks = r.KPasswdServer - ka = r.AdminServer - break - } - } - if len(ks) < 1 { - for _, k := range ka { - h, _, err := net.SplitHostPort(k) - if err != nil { - continue - } - ks = append(ks, h+":464") - } - } - count = len(ks) - if count < 1 { - return count, kdcs, fmt.Errorf("no kpasswd or kadmin defined in configuration for realm %s", realm) - } - kdcs = randServOrder(ks) - } - return count, kdcs, nil -} - -func randServOrder(ks []string) map[int]string { - kdcs := make(map[int]string) - count := len(ks) - i := 1 - if count > 1 { - l := len(ks) - for l > 0 { - ri := rand.Intn(l) - kdcs[i] = ks[ri] - if l > 1 { - // Remove the entry from the source slice by swapping with the last entry and truncating - ks[len(ks)-1], ks[ri] = ks[ri], ks[len(ks)-1] - ks = ks[:len(ks)-1] - l = len(ks) - } else { - l = 0 - } - i++ - } - } else { - kdcs[i] = ks[0] - } - return kdcs -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/config/krb5conf.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/config/krb5conf.go deleted file mode 100644 index 366301ad..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/config/krb5conf.go +++ /dev/null @@ -1,665 +0,0 @@ -// Package config implements KRB5 client and service configuration as described at https://web.mit.edu/kerberos/krb5-latest/doc/admin/conf_files/krb5_conf.html -package config - -import ( - "bufio" - "encoding/hex" - "errors" - "fmt" - "io" - "net" - "os" - "os/user" - "regexp" - "strconv" - "strings" - "time" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" -) - -// Config represents the KRB5 configuration. -type Config struct { - LibDefaults *LibDefaults - Realms []Realm - DomainRealm DomainRealm - //CaPaths - //AppDefaults - //Plugins -} - -// WeakETypeList is a list of encryption types that have been deemed weak. -const WeakETypeList = "des-cbc-crc des-cbc-md4 des-cbc-md5 des-cbc-raw des3-cbc-raw des-hmac-sha1 arcfour-hmac-exp rc4-hmac-exp arcfour-hmac-md5-exp des" - -// NewConfig creates a new config struct instance. -func NewConfig() *Config { - d := make(DomainRealm) - return &Config{ - LibDefaults: newLibDefaults(), - DomainRealm: d, - } -} - -// LibDefaults represents the [libdefaults] section of the configuration. -type LibDefaults struct { - AllowWeakCrypto bool //default false - // ap_req_checksum_type int //unlikely to support this - Canonicalize bool //default false - CCacheType int //default is 4. unlikely to implement older - Clockskew time.Duration //max allowed skew in seconds, default 300 - //Default_ccache_name string // default /tmp/krb5cc_%{uid} //Not implementing as will hold in memory - DefaultClientKeytabName string //default /usr/local/var/krb5/user/%{euid}/client.keytab - DefaultKeytabName string //default /etc/krb5.keytab - DefaultRealm string - DefaultTGSEnctypes []string //default aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4 - DefaultTktEnctypes []string //default aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4 - DefaultTGSEnctypeIDs []int32 //default aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4 - DefaultTktEnctypeIDs []int32 //default aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4 - DNSCanonicalizeHostname bool //default true - DNSLookupKDC bool //default false - DNSLookupRealm bool - ExtraAddresses []net.IP //Not implementing yet - Forwardable bool //default false - IgnoreAcceptorHostname bool //default false - K5LoginAuthoritative bool //default false - K5LoginDirectory string //default user's home directory. Must be owned by the user or root - KDCDefaultOptions asn1.BitString //default 0x00000010 (KDC_OPT_RENEWABLE_OK) - KDCTimeSync int //default 1 - //kdc_req_checksum_type int //unlikely to implement as for very old KDCs - NoAddresses bool //default true - PermittedEnctypes []string //default aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4 - PermittedEnctypeIDs []int32 - //plugin_base_dir string //not supporting plugins - PreferredPreauthTypes []int //default “17, 16, 15, 14”, which forces libkrb5 to attempt to use PKINIT if it is supported - Proxiable bool //default false - RDNS bool //default true - RealmTryDomains int //default -1 - RenewLifetime time.Duration //default 0 - SafeChecksumType int //default 8 - TicketLifetime time.Duration //default 1 day - UDPPreferenceLimit int // 1 means to always use tcp. MIT krb5 has a default value of 1465, and it prevents user setting more than 32700. - VerifyAPReqNofail bool //default false -} - -// Create a new LibDefaults struct. -func newLibDefaults() *LibDefaults { - uid := "0" - var hdir string - usr, _ := user.Current() - if usr != nil { - uid = usr.Uid - hdir = usr.HomeDir - } - opts := asn1.BitString{} - opts.Bytes, _ = hex.DecodeString("00000010") - opts.BitLength = len(opts.Bytes) * 8 - return &LibDefaults{ - CCacheType: 4, - Clockskew: time.Duration(300) * time.Second, - DefaultClientKeytabName: fmt.Sprintf("/usr/local/var/krb5/user/%s/client.keytab", uid), - DefaultKeytabName: "/etc/krb5.keytab", - DefaultTGSEnctypes: []string{"aes256-cts-hmac-sha1-96", "aes128-cts-hmac-sha1-96", "des3-cbc-sha1", "arcfour-hmac-md5", "camellia256-cts-cmac", "camellia128-cts-cmac", "des-cbc-crc", "des-cbc-md5", "des-cbc-md4"}, - DefaultTktEnctypes: []string{"aes256-cts-hmac-sha1-96", "aes128-cts-hmac-sha1-96", "des3-cbc-sha1", "arcfour-hmac-md5", "camellia256-cts-cmac", "camellia128-cts-cmac", "des-cbc-crc", "des-cbc-md5", "des-cbc-md4"}, - DNSCanonicalizeHostname: true, - K5LoginDirectory: hdir, - KDCDefaultOptions: opts, - KDCTimeSync: 1, - NoAddresses: true, - PermittedEnctypes: []string{"aes256-cts-hmac-sha1-96", "aes128-cts-hmac-sha1-96", "des3-cbc-sha1", "arcfour-hmac-md5", "camellia256-cts-cmac", "camellia128-cts-cmac", "des-cbc-crc", "des-cbc-md5", "des-cbc-md4"}, - RDNS: true, - RealmTryDomains: -1, - SafeChecksumType: 8, - TicketLifetime: time.Duration(24) * time.Hour, - UDPPreferenceLimit: 1465, - PreferredPreauthTypes: []int{17, 16, 15, 14}, - } -} - -// Parse the lines of the [libdefaults] section of the configuration into the LibDefaults struct. -func (l *LibDefaults) parseLines(lines []string) error { - for _, line := range lines { - line = strings.TrimSpace(line) - if line == "" { - continue - } - if strings.Contains(line, "v4_") { - return errors.New("v4 configurations are not supported in Realms section") - } - if !strings.Contains(line, "=") { - return fmt.Errorf("libdefaults configuration line invalid: %s", line) - } - - p := strings.Split(line, "=") - key := strings.TrimSpace(strings.ToLower(p[0])) - switch key { - case "allow_weak_crypto": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.AllowWeakCrypto = v - case "canonicalize": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.Canonicalize = v - case "ccache_type": - p[1] = strings.TrimSpace(p[1]) - v, err := strconv.ParseUint(p[1], 10, 32) - if err != nil || v < 0 || v > 4 { - return fmt.Errorf("libdefaults configuration line invalid: %s", line) - } - l.CCacheType = int(v) - case "clockskew": - d, err := parseDuration(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.Clockskew = d - case "default_client_keytab_name": - l.DefaultClientKeytabName = strings.TrimSpace(p[1]) - case "default_keytab_name": - l.DefaultKeytabName = strings.TrimSpace(p[1]) - case "default_realm": - l.DefaultRealm = strings.TrimSpace(p[1]) - case "default_tgs_enctypes": - l.DefaultTGSEnctypes = strings.Fields(p[1]) - case "default_tkt_enctypes": - l.DefaultTktEnctypes = strings.Fields(p[1]) - case "dns_canonicalize_hostname": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.DNSCanonicalizeHostname = v - case "dns_lookup_kdc": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.DNSLookupKDC = v - case "dns_lookup_realm": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.DNSLookupRealm = v - case "extra_addresses": - ipStr := strings.TrimSpace(p[1]) - for _, ip := range strings.Split(ipStr, ",") { - if eip := net.ParseIP(ip); eip != nil { - l.ExtraAddresses = append(l.ExtraAddresses, eip) - } - } - case "forwardable": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.Forwardable = v - case "ignore_acceptor_hostname": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.IgnoreAcceptorHostname = v - case "k5login_authoritative": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.K5LoginAuthoritative = v - case "k5login_directory": - l.K5LoginDirectory = strings.TrimSpace(p[1]) - case "kdc_default_options": - v := strings.TrimSpace(p[1]) - v = strings.Replace(v, "0x", "", -1) - b, err := hex.DecodeString(v) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid: %s", line) - } - l.KDCDefaultOptions.Bytes = b - l.KDCDefaultOptions.BitLength = len(b) * 8 - case "kdc_timesync": - p[1] = strings.TrimSpace(p[1]) - v, err := strconv.ParseInt(p[1], 10, 32) - if err != nil || v < 0 { - return fmt.Errorf("libdefaults configuration line invalid: %s", line) - } - l.KDCTimeSync = int(v) - case "noaddresses": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.NoAddresses = v - case "permitted_enctypes": - l.PermittedEnctypes = strings.Fields(p[1]) - case "preferred_preauth_types": - p[1] = strings.TrimSpace(p[1]) - t := strings.Split(p[1], ",") - var v []int - for _, s := range t { - i, err := strconv.ParseInt(s, 10, 32) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid: %s", line) - } - v = append(v, int(i)) - } - l.PreferredPreauthTypes = v - case "proxiable": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.Proxiable = v - case "rdns": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.RDNS = v - case "realm_try_domains": - p[1] = strings.TrimSpace(p[1]) - v, err := strconv.ParseInt(p[1], 10, 32) - if err != nil || v < -1 { - return fmt.Errorf("libdefaults configuration line invalid: %s", line) - } - l.RealmTryDomains = int(v) - case "renew_lifetime": - d, err := parseDuration(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.RenewLifetime = d - case "safe_checksum_type": - p[1] = strings.TrimSpace(p[1]) - v, err := strconv.ParseInt(p[1], 10, 32) - if err != nil || v < 0 { - return fmt.Errorf("libdefaults configuration line invalid: %s", line) - } - l.SafeChecksumType = int(v) - case "ticket_lifetime": - d, err := parseDuration(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.TicketLifetime = d - case "udp_preference_limit": - p[1] = strings.TrimSpace(p[1]) - v, err := strconv.ParseUint(p[1], 10, 32) - if err != nil || v > 32700 { - return fmt.Errorf("libdefaults configuration line invalid: %s", line) - } - l.UDPPreferenceLimit = int(v) - case "verify_ap_req_nofail": - v, err := parseBoolean(p[1]) - if err != nil { - return fmt.Errorf("libdefaults configuration line invalid. %v: %s", err, line) - } - l.VerifyAPReqNofail = v - default: - //Ignore the line - continue - } - } - l.DefaultTGSEnctypeIDs = parseETypes(l.DefaultTGSEnctypes, l.AllowWeakCrypto) - l.DefaultTktEnctypeIDs = parseETypes(l.DefaultTktEnctypes, l.AllowWeakCrypto) - l.PermittedEnctypeIDs = parseETypes(l.PermittedEnctypes, l.AllowWeakCrypto) - return nil -} - -// Realm represents an entry in the [realms] section of the configuration. -type Realm struct { - Realm string - AdminServer []string - //auth_to_local //Not implementing for now - //auth_to_local_names //Not implementing for now - DefaultDomain string - KDC []string - KPasswdServer []string //default admin_server:464 - MasterKDC []string -} - -// Parse the lines of a [realms] entry into the Realm struct. -func (r *Realm) parseLines(name string, lines []string) error { - r.Realm = name - var adminServerFinal bool - var KDCFinal bool - var kpasswdServerFinal bool - var masterKDCFinal bool - for _, line := range lines { - if strings.TrimSpace(line) == "" { - continue - } - if !strings.Contains(line, "=") { - return fmt.Errorf("realm configuration line invalid: %s", line) - } - - p := strings.Split(line, "=") - key := strings.TrimSpace(strings.ToLower(p[0])) - v := strings.TrimSpace(p[1]) - switch key { - case "admin_server": - appendUntilFinal(&r.AdminServer, v, &adminServerFinal) - case "default_domain": - r.DefaultDomain = v - case "kdc": - if !strings.Contains(v, ":") { - // No port number specified default to 88 - if strings.HasSuffix(v, `*`) { - v = strings.TrimSpace(strings.TrimSuffix(v, `*`)) + ":88*" - } else { - v = strings.TrimSpace(v) + ":88" - } - } - appendUntilFinal(&r.KDC, v, &KDCFinal) - case "kpasswd_server": - appendUntilFinal(&r.KPasswdServer, v, &kpasswdServerFinal) - case "master_kdc": - appendUntilFinal(&r.MasterKDC, v, &masterKDCFinal) - default: - //Ignore the line - continue - } - } - //default for Kpasswd_server = admin_server:464 - if len(r.KPasswdServer) < 1 { - for _, a := range r.AdminServer { - s := strings.Split(a, ":") - r.KPasswdServer = append(r.KPasswdServer, s[0]+":464") - } - } - return nil -} - -// Parse the lines of the [realms] section of the configuration into an slice of Realm structs. -func parseRealms(lines []string) ([]Realm, error) { - var realms []Realm - start := -1 - var name string - for i, l := range lines { - if strings.TrimSpace(l) == "" { - continue - } - if strings.Contains(l, "v4_") { - return nil, errors.New("v4 configurations are not supported in Realms section") - } - if strings.Contains(l, "{") { - if start >= 0 { - // already started a block!!! - return nil, errors.New("invalid Realms section in configuration") - } - start = i - if !strings.Contains(l, "=") { - return nil, fmt.Errorf("realm configuration line invalid: %s", l) - } - p := strings.Split(l, "=") - name = strings.TrimSpace(p[0]) - } - if strings.Contains(l, "}") { - if start < 0 { - // but not started a block!!! - return nil, errors.New("invalid Realms section in configuration") - } - var r Realm - r.parseLines(name, lines[start+1:i]) - realms = append(realms, r) - start = -1 - } - } - return realms, nil -} - -// DomainRealm maps the domains to realms representing the [domain_realm] section of the configuration. -type DomainRealm map[string]string - -// Parse the lines of the [domain_realm] section of the configuration and add to the mapping. -func (d *DomainRealm) parseLines(lines []string) error { - for _, line := range lines { - if strings.TrimSpace(line) == "" { - continue - } - if !strings.Contains(line, "=") { - return fmt.Errorf("realm configuration line invalid: %s", line) - } - p := strings.Split(line, "=") - domain := strings.TrimSpace(strings.ToLower(p[0])) - realm := strings.TrimSpace(strings.ToUpper(p[1])) - d.addMapping(domain, realm) - } - return nil -} - -// Add a domain to realm mapping. -func (d *DomainRealm) addMapping(domain, realm string) { - (*d)[domain] = realm -} - -// Delete a domain to realm mapping. -func (d *DomainRealm) deleteMapping(domain, realm string) { - delete(*d, domain) -} - -// ResolveRealm resolves the kerberos realm for the specified domain name from the domain to realm mapping. -// The most specific mapping is returned. -func (c *Config) ResolveRealm(domainName string) string { - domainName = strings.TrimSuffix(domainName, ".") - - // Try to match the entire hostname first - if r, ok := c.DomainRealm[domainName]; ok { - return r - } - - // Try to match all DNS domain parts - periods := strings.Count(domainName, ".") + 1 - for i := 2; i <= periods; i++ { - z := strings.SplitN(domainName, ".", i) - if r, ok := c.DomainRealm["."+z[len(z)-1]]; ok { - return r - } - } - return c.LibDefaults.DefaultRealm -} - -// Load the KRB5 configuration from the specified file path. -func Load(cfgPath string) (*Config, error) { - fh, err := os.Open(cfgPath) - if err != nil { - return nil, errors.New("configuration file could not be openned: " + cfgPath + " " + err.Error()) - } - defer fh.Close() - scanner := bufio.NewScanner(fh) - return NewConfigFromScanner(scanner) -} - -// NewConfigFromString creates a new Config struct from a string. -func NewConfigFromString(s string) (*Config, error) { - reader := strings.NewReader(s) - return NewConfigFromReader(reader) -} - -// NewConfigFromReader creates a new Config struct from an io.Reader. -func NewConfigFromReader(r io.Reader) (*Config, error) { - scanner := bufio.NewScanner(r) - return NewConfigFromScanner(scanner) -} - -// NewConfigFromScanner creates a new Config struct from a bufio.Scanner. -func NewConfigFromScanner(scanner *bufio.Scanner) (*Config, error) { - c := NewConfig() - sections := make(map[int]string) - var sectionLineNum []int - var lines []string - for scanner.Scan() { - // Skip comments and blank lines - if matched, _ := regexp.MatchString(`^\s*(#|;|\n)`, scanner.Text()); matched { - continue - } - if matched, _ := regexp.MatchString(`^\s*\[libdefaults\]\s*`, scanner.Text()); matched { - sections[len(lines)] = "libdefaults" - sectionLineNum = append(sectionLineNum, len(lines)) - continue - } - if matched, _ := regexp.MatchString(`^\s*\[realms\]\s*`, scanner.Text()); matched { - sections[len(lines)] = "realms" - sectionLineNum = append(sectionLineNum, len(lines)) - continue - } - if matched, _ := regexp.MatchString(`^\s*\[domain_realm\]\s*`, scanner.Text()); matched { - sections[len(lines)] = "domain_realm" - sectionLineNum = append(sectionLineNum, len(lines)) - continue - } - if matched, _ := regexp.MatchString(`^\s*\[.*\]\s*`, scanner.Text()); matched { - sections[len(lines)] = "unknown_section" - sectionLineNum = append(sectionLineNum, len(lines)) - continue - } - lines = append(lines, scanner.Text()) - } - for i, start := range sectionLineNum { - var end int - if i+1 >= len(sectionLineNum) { - end = len(lines) - } else { - end = sectionLineNum[i+1] - } - switch section := sections[start]; section { - case "libdefaults": - err := c.LibDefaults.parseLines(lines[start:end]) - if err != nil { - return nil, fmt.Errorf("error processing libdefaults section: %v", err) - } - case "realms": - realms, err := parseRealms(lines[start:end]) - if err != nil { - return nil, fmt.Errorf("error processing realms section: %v", err) - } - c.Realms = realms - case "domain_realm": - err := c.DomainRealm.parseLines(lines[start:end]) - if err != nil { - return nil, fmt.Errorf("error processing domaain_realm section: %v", err) - } - default: - continue - } - } - return c, nil -} - -// Parse a space delimited list of ETypes into a list of EType numbers optionally filtering out weak ETypes. -func parseETypes(s []string, w bool) []int32 { - var eti []int32 - for _, et := range s { - if !w { - var weak bool - for _, wet := range strings.Fields(WeakETypeList) { - if et == wet { - weak = true - break - } - } - if weak { - continue - } - } - i := etypeID.EtypeSupported(et) - if i != 0 { - eti = append(eti, i) - } - } - return eti -} - -// Parse a time duration string in the configuration to a golang time.Duration. -func parseDuration(s string) (time.Duration, error) { - s = strings.Replace(strings.TrimSpace(s), " ", "", -1) - - // handle Nd[NmNs] - if strings.Contains(s, "d") { - ds := strings.SplitN(s, "d", 2) - dn, err := strconv.ParseUint(ds[0], 10, 32) - if err != nil { - return time.Duration(0), errors.New("invalid time duration") - } - d := time.Duration(dn*24) * time.Hour - if ds[1] != "" { - dp, err := time.ParseDuration(ds[1]) - if err != nil { - return time.Duration(0), errors.New("invalid time duration") - } - d = d + dp - } - return d, nil - } - - // handle Nm[Ns] - d, err := time.ParseDuration(s) - if err == nil { - return d, nil - } - - // handle N - v, err := strconv.ParseUint(s, 10, 32) - if err == nil && v > 0 { - return time.Duration(v) * time.Second, nil - } - - // handle h:m[:s] - if strings.Contains(s, ":") { - t := strings.Split(s, ":") - if 2 > len(t) || len(t) > 3 { - return time.Duration(0), errors.New("invalid time duration value") - } - var i []int - for _, n := range t { - j, err := strconv.ParseInt(n, 10, 16) - if err != nil { - return time.Duration(0), errors.New("invalid time duration value") - } - i = append(i, int(j)) - } - d := time.Duration(i[0])*time.Hour + time.Duration(i[1])*time.Minute - if len(i) == 3 { - d = d + time.Duration(i[2])*time.Second - } - return d, nil - } - return time.Duration(0), errors.New("invalid time duration value") -} - -// Parse possible boolean values to golang bool. -func parseBoolean(s string) (bool, error) { - s = strings.TrimSpace(s) - v, err := strconv.ParseBool(s) - if err == nil { - return v, nil - } - switch strings.ToLower(s) { - case "yes": - return true, nil - case "y": - return true, nil - case "no": - return false, nil - case "n": - return false, nil - } - return false, errors.New("invalid boolean value") -} - -// Parse array of strings but stop if an asterisk is placed at the end of a line. -func appendUntilFinal(s *[]string, value string, final *bool) { - if *final { - return - } - if last := len(value) - 1; last >= 0 && value[last] == '*' { - *final = true - value = value[:len(value)-1] - } - *s = append(*s, value) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/ccache.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/ccache.go deleted file mode 100644 index 3ef5758e..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/ccache.go +++ /dev/null @@ -1,351 +0,0 @@ -package credentials - -import ( - "bytes" - "encoding/binary" - "errors" - "io/ioutil" - "strings" - "time" - "unsafe" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -const ( - headerFieldTagKDCOffset = 1 -) - -// The first byte of the file always has the value 5. -// The value of the second byte contains the version number (1 through 4) -// Versions 1 and 2 of the file format use native byte order for integer representations. -// Versions 3 and 4 always use big-endian byte order -// After the two-byte version indicator, the file has three parts: -// 1) the header (in version 4 only) -// 2) the default principal name -// 3) a sequence of credentials - -// CCache is the file credentials cache as define here: https://web.mit.edu/kerberos/krb5-latest/doc/formats/ccache_file_format.html -type CCache struct { - Version uint8 - Header header - DefaultPrincipal principal - Credentials []credential - Path string -} - -type header struct { - length uint16 - fields []headerField -} - -type headerField struct { - tag uint16 - length uint16 - value []byte -} - -// Credential cache entry principal struct. -type principal struct { - Realm string - PrincipalName types.PrincipalName -} - -type credential struct { - Client principal - Server principal - Key types.EncryptionKey - AuthTime time.Time - StartTime time.Time - EndTime time.Time - RenewTill time.Time - IsSKey bool - TicketFlags asn1.BitString - Addresses []types.HostAddress - AuthData []types.AuthorizationDataEntry - Ticket []byte - SecondTicket []byte -} - -// LoadCCache loads a credential cache file into a CCache type. -func LoadCCache(cpath string) (CCache, error) { - k, err := ioutil.ReadFile(cpath) - if err != nil { - return CCache{}, err - } - c, err := ParseCCache(k) - c.Path = cpath - return c, err -} - -// ParseCCache byte slice of credential cache data into CCache type. -func ParseCCache(b []byte) (c CCache, err error) { - p := 0 - //The first byte of the file always has the value 5 - if int8(b[p]) != 5 { - err = errors.New("Invalid credential cache data. First byte does not equal 5") - return - } - p++ - //Get credential cache version - //The second byte contains the version number (1 to 4) - c.Version = uint8(b[p]) - if c.Version < 1 || c.Version > 4 { - err = errors.New("Invalid credential cache data. Keytab version is not within 1 to 4") - if err != nil { - return - } - } - p++ - //Version 1 or 2 of the file format uses native byte order for integer representations. Versions 3 & 4 always uses big-endian byte order - var endian binary.ByteOrder - endian = binary.BigEndian - if (c.Version == 1 || c.Version == 2) && isNativeEndianLittle() { - endian = binary.LittleEndian - } - if c.Version == 4 { - err = parseHeader(b, &p, &c, &endian) - if err != nil { - return - } - } - c.DefaultPrincipal = parsePrincipal(b, &p, &c, &endian) - for p < len(b) { - cred, e := parseCredential(b, &p, &c, &endian) - if e != nil { - err = e - return - } - c.Credentials = append(c.Credentials, cred) - } - return -} - -func parseHeader(b []byte, p *int, c *CCache, e *binary.ByteOrder) error { - if c.Version != 4 { - return errors.New("Credentials cache version is not 4 so there is no header to parse.") - } - h := header{} - h.length = uint16(readInt16(b, p, e)) - for *p <= int(h.length) { - f := headerField{} - f.tag = uint16(readInt16(b, p, e)) - f.length = uint16(readInt16(b, p, e)) - f.value = b[*p : *p+int(f.length)] - *p += int(f.length) - if !f.valid() { - return errors.New("Invalid credential cache header found") - } - h.fields = append(h.fields, f) - } - c.Header = h - return nil -} - -// Parse the Keytab bytes of a principal into a Keytab entry's principal. -func parsePrincipal(b []byte, p *int, c *CCache, e *binary.ByteOrder) (princ principal) { - if c.Version != 1 { - //Name Type is omitted in version 1 - princ.PrincipalName.NameType = int32(readInt32(b, p, e)) - } - nc := int(readInt32(b, p, e)) - if c.Version == 1 { - //In version 1 the number of components includes the realm. Minus 1 to make consistent with version 2 - nc-- - } - lenRealm := readInt32(b, p, e) - princ.Realm = string(readBytes(b, p, int(lenRealm), e)) - for i := 0; i < int(nc); i++ { - l := readInt32(b, p, e) - princ.PrincipalName.NameString = append(princ.PrincipalName.NameString, string(readBytes(b, p, int(l), e))) - } - return princ -} - -func parseCredential(b []byte, p *int, c *CCache, e *binary.ByteOrder) (cred credential, err error) { - cred.Client = parsePrincipal(b, p, c, e) - cred.Server = parsePrincipal(b, p, c, e) - key := types.EncryptionKey{} - key.KeyType = int32(readInt16(b, p, e)) - if c.Version == 3 { - //repeated twice in version 3 - key.KeyType = int32(readInt16(b, p, e)) - } - key.KeyValue = readData(b, p, e) - cred.Key = key - cred.AuthTime = readTimestamp(b, p, e) - cred.StartTime = readTimestamp(b, p, e) - cred.EndTime = readTimestamp(b, p, e) - cred.RenewTill = readTimestamp(b, p, e) - if ik := readInt8(b, p, e); ik == 0 { - cred.IsSKey = false - } else { - cred.IsSKey = true - } - cred.TicketFlags = types.NewKrbFlags() - cred.TicketFlags.Bytes = readBytes(b, p, 4, e) - l := int(readInt32(b, p, e)) - cred.Addresses = make([]types.HostAddress, l, l) - for i := range cred.Addresses { - cred.Addresses[i] = readAddress(b, p, e) - } - l = int(readInt32(b, p, e)) - cred.AuthData = make([]types.AuthorizationDataEntry, l, l) - for i := range cred.AuthData { - cred.AuthData[i] = readAuthDataEntry(b, p, e) - } - cred.Ticket = readData(b, p, e) - cred.SecondTicket = readData(b, p, e) - return -} - -// GetClientPrincipalName returns a PrincipalName type for the client the credentials cache is for. -func (c *CCache) GetClientPrincipalName() types.PrincipalName { - return c.DefaultPrincipal.PrincipalName -} - -// GetClientRealm returns the reals of the client the credentials cache is for. -func (c *CCache) GetClientRealm() string { - return c.DefaultPrincipal.Realm -} - -// GetClientCredentials returns a Credentials object representing the client of the credentials cache. -func (c *CCache) GetClientCredentials() *Credentials { - return &Credentials{ - Username: c.DefaultPrincipal.PrincipalName.GetPrincipalNameString(), - Realm: c.GetClientRealm(), - CName: c.DefaultPrincipal.PrincipalName, - } -} - -// Contains tests if the cache contains a credential for the provided server PrincipalName -func (c *CCache) Contains(p types.PrincipalName) bool { - for _, cred := range c.Credentials { - if cred.Server.PrincipalName.Equal(p) { - return true - } - } - return false -} - -// GetEntry returns a specific credential for the PrincipalName provided. -func (c *CCache) GetEntry(p types.PrincipalName) (credential, bool) { - var cred credential - var found bool - for i := range c.Credentials { - if c.Credentials[i].Server.PrincipalName.Equal(p) { - cred = c.Credentials[i] - found = true - break - } - } - if !found { - return cred, false - } - return cred, true -} - -// GetEntries filters out configuration entries an returns a slice of credentials. -func (c *CCache) GetEntries() []credential { - var creds []credential - for _, cred := range c.Credentials { - // Filter out configuration entries - if strings.HasPrefix(cred.Server.Realm, "X-CACHECONF") { - continue - } - creds = append(creds, cred) - } - return creds -} - -func (h *headerField) valid() bool { - // At this time there is only one defined header field. - // Its tag value is 1, its length is always 8. - // Its contents are two 32-bit integers giving the seconds and microseconds - // of the time offset of the KDC relative to the client. - // Adding this offset to the current time on the client should give the current time on the KDC, if that offset has not changed since the initial authentication. - - // Done as a switch in case other tag values are added in the future. - switch h.tag { - case headerFieldTagKDCOffset: - if h.length != 8 || len(h.value) != 8 { - return false - } - return true - } - return false -} - -func readData(b []byte, p *int, e *binary.ByteOrder) []byte { - l := readInt32(b, p, e) - return readBytes(b, p, int(l), e) -} - -func readAddress(b []byte, p *int, e *binary.ByteOrder) types.HostAddress { - a := types.HostAddress{} - a.AddrType = int32(readInt16(b, p, e)) - a.Address = readData(b, p, e) - return a -} - -func readAuthDataEntry(b []byte, p *int, e *binary.ByteOrder) types.AuthorizationDataEntry { - a := types.AuthorizationDataEntry{} - a.ADType = int32(readInt16(b, p, e)) - a.ADData = readData(b, p, e) - return a -} - -// Read bytes representing a timestamp. -func readTimestamp(b []byte, p *int, e *binary.ByteOrder) time.Time { - return time.Unix(int64(readInt32(b, p, e)), 0) -} - -// Read bytes representing an eight bit integer. -func readInt8(b []byte, p *int, e *binary.ByteOrder) (i int8) { - buf := bytes.NewBuffer(b[*p : *p+1]) - binary.Read(buf, *e, &i) - *p++ - return -} - -// Read bytes representing a sixteen bit integer. -func readInt16(b []byte, p *int, e *binary.ByteOrder) (i int16) { - buf := bytes.NewBuffer(b[*p : *p+2]) - binary.Read(buf, *e, &i) - *p += 2 - return -} - -// Read bytes representing a thirty two bit integer. -func readInt32(b []byte, p *int, e *binary.ByteOrder) (i int32) { - buf := bytes.NewBuffer(b[*p : *p+4]) - binary.Read(buf, *e, &i) - *p += 4 - return -} - -func readBytes(b []byte, p *int, s int, e *binary.ByteOrder) []byte { - buf := bytes.NewBuffer(b[*p : *p+s]) - r := make([]byte, s) - binary.Read(buf, *e, &r) - *p += s - return r -} - -func isNativeEndianLittle() bool { - var x = 0x012345678 - var p = unsafe.Pointer(&x) - var bp = (*[4]byte)(p) - - var endian bool - if 0x01 == bp[0] { - endian = false - } else if (0x78 & 0xff) == (bp[0] & 0xff) { - endian = true - } else { - // Default to big endian - endian = false - } - return endian -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/credentials.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/credentials.go deleted file mode 100644 index b1b47552..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/credentials/credentials.go +++ /dev/null @@ -1,257 +0,0 @@ -// Package credentials provides credentials management for Kerberos 5 authentication. -package credentials - -import ( - "time" - - "github.com/hashicorp/go-uuid" - "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" - "gopkg.in/jcmturner/gokrb5.v5/keytab" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -const ( - // AttributeKeyADCredentials assigned number for AD credentials. - AttributeKeyADCredentials = 1 -) - -// Credentials struct for a user. -// Contains either a keytab, password or both. -// Keytabs are used over passwords if both are defined. -type Credentials struct { - Username string - displayName string - Realm string - CName types.PrincipalName - Keytab keytab.Keytab - Password string - Attributes map[int]interface{} - ValidUntil time.Time - - authenticated bool - human bool - authTime time.Time - groupMembership map[string]bool - sessionID string -} - -// ADCredentials contains information obtained from the PAC. -type ADCredentials struct { - EffectiveName string - FullName string - UserID int - PrimaryGroupID int - LogOnTime time.Time - LogOffTime time.Time - PasswordLastSet time.Time - GroupMembershipSIDs []string - LogonDomainName string - LogonDomainID string - LogonServer string -} - -// NewCredentials creates a new Credentials instance. -func NewCredentials(username string, realm string) Credentials { - uid, err := uuid.GenerateUUID() - if err != nil { - uid = "00unique-sess-ions-uuid-unavailable0" - } - return Credentials{ - Username: username, - displayName: username, - Realm: realm, - CName: types.NewPrincipalName(nametype.KRB_NT_PRINCIPAL, username), - Keytab: keytab.NewKeytab(), - Attributes: make(map[int]interface{}), - sessionID: uid, - } -} - -// NewCredentialsFromPrincipal creates a new Credentials instance with the user details provides as a PrincipalName type. -func NewCredentialsFromPrincipal(cname types.PrincipalName, realm string) Credentials { - uid, err := uuid.GenerateUUID() - if err != nil { - uid = "00unique-sess-ions-uuid-unavailable0" - } - return Credentials{ - Username: cname.GetPrincipalNameString(), - displayName: cname.GetPrincipalNameString(), - Realm: realm, - CName: cname, - Keytab: keytab.NewKeytab(), - Attributes: make(map[int]interface{}), - groupMembership: make(map[string]bool), - sessionID: uid, - } -} - -// WithKeytab sets the Keytab in the Credentials struct. -func (c *Credentials) WithKeytab(kt keytab.Keytab) *Credentials { - c.Keytab = kt - return c -} - -// WithPassword sets the password in the Credentials struct. -func (c *Credentials) WithPassword(password string) *Credentials { - c.Password = password - return c -} - -// HasKeytab queries if the Credentials has a keytab defined. -func (c *Credentials) HasKeytab() bool { - if len(c.Keytab.Entries) > 0 { - return true - } - return false -} - -// SetValidUntil sets the expiry time of the credentials -func (c *Credentials) SetValidUntil(t time.Time) { - c.ValidUntil = t -} - -// HasPassword queries if the Credentials has a password defined. -func (c *Credentials) HasPassword() bool { - if c.Password != "" { - return true - } - return false -} - -// SetADCredentials adds ADCredentials attributes to the credentials -func (c *Credentials) SetADCredentials(a ADCredentials) { - c.Attributes[AttributeKeyADCredentials] = a - if a.FullName != "" { - c.SetDisplayName(a.FullName) - } - if a.EffectiveName != "" { - c.SetUserName(a.EffectiveName) - } - if a.LogonDomainName != "" { - c.SetDomain(a.LogonDomainName) - } - for i := range a.GroupMembershipSIDs { - c.AddAuthzAttribute(a.GroupMembershipSIDs[i]) - } -} - -// Methods to implement goidentity.Identity interface - -// UserName returns the credential's username. -func (c *Credentials) UserName() string { - return c.Username -} - -// SetUserName sets the username value on the credential. -func (c *Credentials) SetUserName(s string) { - c.Username = s -} - -// Domain returns the credential's domain. -func (c *Credentials) Domain() string { - return c.Realm -} - -// SetDomain sets the domain value on the credential. -func (c *Credentials) SetDomain(s string) { - c.Realm = s -} - -// DisplayName returns the credential's display name. -func (c *Credentials) DisplayName() string { - return c.displayName -} - -// SetDisplayName sets the display name value on the credential. -func (c *Credentials) SetDisplayName(s string) { - c.displayName = s -} - -// Human returns if the credential represents a human or not. -func (c *Credentials) Human() bool { - return c.human -} - -// SetHuman sets the credential as human. -func (c *Credentials) SetHuman(b bool) { - c.human = b -} - -// AuthTime returns the time the credential was authenticated. -func (c *Credentials) AuthTime() time.Time { - return c.authTime -} - -// SetAuthTime sets the time the credential was authenticated. -func (c *Credentials) SetAuthTime(t time.Time) { - c.authTime = t -} - -// AuthzAttributes returns the credentials authorizing attributes. -func (c *Credentials) AuthzAttributes() []string { - s := make([]string, len(c.groupMembership)) - i := 0 - for a := range c.groupMembership { - s[i] = a - i++ - } - return s -} - -// Authenticated indicates if the credential has been successfully authenticated or not. -func (c *Credentials) Authenticated() bool { - return c.authenticated -} - -// SetAuthenticated sets the credential as having been successfully authenticated. -func (c *Credentials) SetAuthenticated(b bool) { - c.authenticated = b -} - -// AddAuthzAttribute adds an authorization attribute to the credential. -func (c *Credentials) AddAuthzAttribute(a string) { - c.groupMembership[a] = true -} - -// RemoveAuthzAttribute removes an authorization attribute from the credential. -func (c *Credentials) RemoveAuthzAttribute(a string) { - if _, ok := c.groupMembership[a]; !ok { - return - } - delete(c.groupMembership, a) -} - -// EnableAuthzAttribute toggles an authorization attribute to an enabled state on the credential. -func (c *Credentials) EnableAuthzAttribute(a string) { - if enabled, ok := c.groupMembership[a]; ok && !enabled { - c.groupMembership[a] = true - } -} - -// DisableAuthzAttribute toggles an authorization attribute to a disabled state on the credential. -func (c *Credentials) DisableAuthzAttribute(a string) { - if enabled, ok := c.groupMembership[a]; ok && enabled { - c.groupMembership[a] = false - } -} - -// Authorized indicates if the credential has the specified authorizing attribute. -func (c *Credentials) Authorized(a string) bool { - if enabled, ok := c.groupMembership[a]; ok && enabled { - return true - } - return false -} - -// SessionID returns the credential's session ID. -func (c *Credentials) SessionID() string { - return c.sessionID -} - -// Expired indicates if the credential has expired. -func (c *Credentials) Expired() bool { - if !c.ValidUntil.IsZero() && time.Now().UTC().After(c.ValidUntil) { - return true - } - return false -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha1-96.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha1-96.go deleted file mode 100644 index 53c4db1d..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha1-96.go +++ /dev/null @@ -1,173 +0,0 @@ -package crypto - -import ( - "crypto/aes" - "crypto/hmac" - "crypto/sha1" - "hash" - - "gopkg.in/jcmturner/gokrb5.v5/crypto/common" - "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961" - "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962" - "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" - "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" -) - -// RFC 3962 -//+--------------------------------------------------------------------+ -//| protocol key format 128- or 256-bit string | -//| | -//| string-to-key function PBKDF2+DK with variable | -//| iteration count (see | -//| above) | -//| | -//| default string-to-key parameters 00 00 10 00 | -//| | -//| key-generation seed length key size | -//| | -//| random-to-key function identity function | -//| | -//| hash function, H SHA-1 | -//| | -//| HMAC output size, h 12 octets (96 bits) | -//| | -//| message block size, m 1 octet | -//| | -//| encryption/decryption functions, AES in CBC-CTS mode | -//| E and D (cipher block size 16 | -//| octets), with next-to- | -//| last block (last block | -//| if only one) as CBC-style | -//| ivec | -//+--------------------------------------------------------------------+ -// -//+--------------------------------------------------------------------+ -//| encryption types | -//+--------------------------------------------------------------------+ -//| type name etype value key size | -//+--------------------------------------------------------------------+ -//| aes128-cts-hmac-sha1-96 17 128 | -//| aes256-cts-hmac-sha1-96 18 256 | -//+--------------------------------------------------------------------+ -// -//+--------------------------------------------------------------------+ -//| checksum types | -//+--------------------------------------------------------------------+ -//| type name sumtype value length | -//+--------------------------------------------------------------------+ -//| hmac-sha1-96-aes128 15 96 | -//| hmac-sha1-96-aes256 16 96 | -//+--------------------------------------------------------------------+ - -// Aes128CtsHmacSha96 implements Kerberos encryption type aes128-cts-hmac-sha1-96 -type Aes128CtsHmacSha96 struct { -} - -// GetETypeID returns the EType ID number. -func (e Aes128CtsHmacSha96) GetETypeID() int32 { - return etypeID.AES128_CTS_HMAC_SHA1_96 -} - -// GetHashID returns the checksum type ID number. -func (e Aes128CtsHmacSha96) GetHashID() int32 { - return chksumtype.HMAC_SHA1_96_AES128 -} - -// GetKeyByteSize returns the number of bytes for key of this etype. -func (e Aes128CtsHmacSha96) GetKeyByteSize() int { - return 128 / 8 -} - -// GetKeySeedBitLength returns the number of bits for the seed for key generation. -func (e Aes128CtsHmacSha96) GetKeySeedBitLength() int { - return e.GetKeyByteSize() * 8 -} - -// GetHashFunc returns the hash function for this etype. -func (e Aes128CtsHmacSha96) GetHashFunc() func() hash.Hash { - return sha1.New -} - -// GetMessageBlockByteSize returns the block size for the etype's messages. -func (e Aes128CtsHmacSha96) GetMessageBlockByteSize() int { - return 1 -} - -// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. -func (e Aes128CtsHmacSha96) GetDefaultStringToKeyParams() string { - return "00001000" -} - -// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. -func (e Aes128CtsHmacSha96) GetConfounderByteSize() int { - return aes.BlockSize -} - -// GetHMACBitLength returns the bit count size of the integrity hash. -func (e Aes128CtsHmacSha96) GetHMACBitLength() int { - return 96 -} - -// GetCypherBlockBitLength returns the bit count size of the cypher block. -func (e Aes128CtsHmacSha96) GetCypherBlockBitLength() int { - return aes.BlockSize * 8 -} - -// StringToKey returns a key derived from the string provided. -func (e Aes128CtsHmacSha96) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { - return rfc3962.StringToKey(secret, salt, s2kparams, e) -} - -// RandomToKey returns a key from the bytes provided. -func (e Aes128CtsHmacSha96) RandomToKey(b []byte) []byte { - return rfc3961.RandomToKey(b) -} - -// EncryptData encrypts the data provided. -func (e Aes128CtsHmacSha96) EncryptData(key, data []byte) ([]byte, []byte, error) { - return rfc3962.EncryptData(key, data, e) -} - -// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. -func (e Aes128CtsHmacSha96) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { - return rfc3962.EncryptMessage(key, message, usage, e) -} - -// DecryptData decrypts the data provided. -func (e Aes128CtsHmacSha96) DecryptData(key, data []byte) ([]byte, error) { - return rfc3962.DecryptData(key, data, e) -} - -// DecryptMessage decrypts the message provided and verifies the integrity of the message. -func (e Aes128CtsHmacSha96) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { - return rfc3962.DecryptMessage(key, ciphertext, usage, e) -} - -// DeriveKey derives a key from the protocol key based on the usage value. -func (e Aes128CtsHmacSha96) DeriveKey(protocolKey, usage []byte) ([]byte, error) { - return rfc3961.DeriveKey(protocolKey, usage, e) -} - -// DeriveRandom generates data needed for key generation. -func (e Aes128CtsHmacSha96) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { - return rfc3961.DeriveRandom(protocolKey, usage, e) -} - -// VerifyIntegrity checks the integrity of the plaintext message. -func (e Aes128CtsHmacSha96) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { - return rfc3961.VerifyIntegrity(protocolKey, ct, pt, usage, e) -} - -// GetChecksumHash returns a keyed checksum hash of the bytes provided. -func (e Aes128CtsHmacSha96) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { - return common.GetHash(data, protocolKey, common.GetUsageKc(usage), e) -} - -// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. -func (e Aes128CtsHmacSha96) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { - c, err := e.GetChecksumHash(protocolKey, data, usage) - if err != nil { - return false - } - return hmac.Equal(chksum, c) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha256-128.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha256-128.go deleted file mode 100644 index a95ee99e..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes128-cts-hmac-sha256-128.go +++ /dev/null @@ -1,135 +0,0 @@ -package crypto - -import ( - "crypto/aes" - "crypto/hmac" - "crypto/sha256" - "hash" - - "gopkg.in/jcmturner/gokrb5.v5/crypto/common" - "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009" - "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" - "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" -) - -// RFC https://tools.ietf.org/html/rfc8009 - -// Aes128CtsHmacSha256128 implements Kerberos encryption type aes128-cts-hmac-sha256-128 -type Aes128CtsHmacSha256128 struct { -} - -// GetETypeID returns the EType ID number. -func (e Aes128CtsHmacSha256128) GetETypeID() int32 { - return etypeID.AES128_CTS_HMAC_SHA256_128 -} - -// GetHashID returns the checksum type ID number. -func (e Aes128CtsHmacSha256128) GetHashID() int32 { - return chksumtype.HMAC_SHA256_128_AES128 -} - -// GetKeyByteSize returns the number of bytes for key of this etype. -func (e Aes128CtsHmacSha256128) GetKeyByteSize() int { - return 128 / 8 -} - -// GetKeySeedBitLength returns the number of bits for the seed for key generation. -func (e Aes128CtsHmacSha256128) GetKeySeedBitLength() int { - return e.GetKeyByteSize() * 8 -} - -// GetHashFunc returns the hash function for this etype. -func (e Aes128CtsHmacSha256128) GetHashFunc() func() hash.Hash { - return sha256.New -} - -// GetMessageBlockByteSize returns the block size for the etype's messages. -func (e Aes128CtsHmacSha256128) GetMessageBlockByteSize() int { - return 1 -} - -// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. -func (e Aes128CtsHmacSha256128) GetDefaultStringToKeyParams() string { - return "00008000" -} - -// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. -func (e Aes128CtsHmacSha256128) GetConfounderByteSize() int { - return aes.BlockSize -} - -// GetHMACBitLength returns the bit count size of the integrity hash. -func (e Aes128CtsHmacSha256128) GetHMACBitLength() int { - return 128 -} - -// GetCypherBlockBitLength returns the bit count size of the cypher block. -func (e Aes128CtsHmacSha256128) GetCypherBlockBitLength() int { - return aes.BlockSize * 8 -} - -// StringToKey returns a key derived from the string provided. -func (e Aes128CtsHmacSha256128) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { - saltp := rfc8009.GetSaltP(salt, "aes128-cts-hmac-sha256-128") - return rfc8009.StringToKey(secret, saltp, s2kparams, e) -} - -// RandomToKey returns a key from the bytes provided. -func (e Aes128CtsHmacSha256128) RandomToKey(b []byte) []byte { - return rfc8009.RandomToKey(b) -} - -// EncryptData encrypts the data provided. -func (e Aes128CtsHmacSha256128) EncryptData(key, data []byte) ([]byte, []byte, error) { - return rfc8009.EncryptData(key, data, e) -} - -// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. -func (e Aes128CtsHmacSha256128) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { - return rfc8009.EncryptMessage(key, message, usage, e) -} - -// DecryptData decrypts the data provided. -func (e Aes128CtsHmacSha256128) DecryptData(key, data []byte) ([]byte, error) { - return rfc8009.DecryptData(key, data, e) -} - -// DecryptMessage decrypts the message provided and verifies the integrity of the message. -func (e Aes128CtsHmacSha256128) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { - return rfc8009.DecryptMessage(key, ciphertext, usage, e) -} - -// DeriveKey derives a key from the protocol key based on the usage value. -func (e Aes128CtsHmacSha256128) DeriveKey(protocolKey, usage []byte) ([]byte, error) { - return rfc8009.DeriveKey(protocolKey, usage, e), nil -} - -// DeriveRandom generates data needed for key generation. -func (e Aes128CtsHmacSha256128) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { - return rfc8009.DeriveRandom(protocolKey, usage, e) -} - -// VerifyIntegrity checks the integrity of the ciphertext message. -// The HMAC is calculated over the cipher state concatenated with the -// AES output, instead of being calculated over the confounder and -// plaintext. This allows the message receiver to verify the -// integrity of the message before decrypting the message. -// Therefore the pt value to this interface method is not use. Pass any []byte. -func (e Aes128CtsHmacSha256128) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { - // We don't need ib just there for the interface - return rfc8009.VerifyIntegrity(protocolKey, ct, usage, e) -} - -// GetChecksumHash returns a keyed checksum hash of the bytes provided. -func (e Aes128CtsHmacSha256128) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { - return common.GetHash(data, protocolKey, common.GetUsageKc(usage), e) -} - -// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. -func (e Aes128CtsHmacSha256128) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { - c, err := e.GetChecksumHash(protocolKey, data, usage) - if err != nil { - return false - } - return hmac.Equal(chksum, c) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha1-96.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha1-96.go deleted file mode 100644 index 14a1ce61..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha1-96.go +++ /dev/null @@ -1,173 +0,0 @@ -package crypto - -import ( - "crypto/aes" - "crypto/hmac" - "crypto/sha1" - "hash" - - "gopkg.in/jcmturner/gokrb5.v5/crypto/common" - "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961" - "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962" - "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" - "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" -) - -// RFC 3962 -//+--------------------------------------------------------------------+ -//| protocol key format 128- or 256-bit string | -//| | -//| string-to-key function PBKDF2+DK with variable | -//| iteration count (see | -//| above) | -//| | -//| default string-to-key parameters 00 00 10 00 | -//| | -//| key-generation seed length key size | -//| | -//| random-to-key function identity function | -//| | -//| hash function, H SHA-1 | -//| | -//| HMAC output size, h 12 octets (96 bits) | -//| | -//| message block size, m 1 octet | -//| | -//| encryption/decryption functions, AES in CBC-CTS mode | -//| E and D (cipher block size 16 | -//| octets), with next-to- | -//| last block (last block | -//| if only one) as CBC-style | -//| ivec | -//+--------------------------------------------------------------------+ -// -//+--------------------------------------------------------------------+ -//| encryption types | -//+--------------------------------------------------------------------+ -//| type name etype value key size | -//+--------------------------------------------------------------------+ -//| aes128-cts-hmac-sha1-96 17 128 | -//| aes256-cts-hmac-sha1-96 18 256 | -//+--------------------------------------------------------------------+ -// -//+--------------------------------------------------------------------+ -//| checksum types | -//+--------------------------------------------------------------------+ -//| type name sumtype value length | -//+--------------------------------------------------------------------+ -//| hmac-sha1-96-aes128 15 96 | -//| hmac-sha1-96-aes256 16 96 | -//+--------------------------------------------------------------------+ - -// Aes256CtsHmacSha96 implements Kerberos encryption type aes256-cts-hmac-sha1-96 -type Aes256CtsHmacSha96 struct { -} - -// GetETypeID returns the EType ID number. -func (e Aes256CtsHmacSha96) GetETypeID() int32 { - return etypeID.AES256_CTS_HMAC_SHA1_96 -} - -// GetHashID returns the checksum type ID number. -func (e Aes256CtsHmacSha96) GetHashID() int32 { - return chksumtype.HMAC_SHA1_96_AES256 -} - -// GetKeyByteSize returns the number of bytes for key of this etype. -func (e Aes256CtsHmacSha96) GetKeyByteSize() int { - return 256 / 8 -} - -// GetKeySeedBitLength returns the number of bits for the seed for key generation. -func (e Aes256CtsHmacSha96) GetKeySeedBitLength() int { - return e.GetKeyByteSize() * 8 -} - -// GetHashFunc returns the hash function for this etype. -func (e Aes256CtsHmacSha96) GetHashFunc() func() hash.Hash { - return sha1.New -} - -// GetMessageBlockByteSize returns the block size for the etype's messages. -func (e Aes256CtsHmacSha96) GetMessageBlockByteSize() int { - return 1 -} - -// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. -func (e Aes256CtsHmacSha96) GetDefaultStringToKeyParams() string { - return "00001000" -} - -// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. -func (e Aes256CtsHmacSha96) GetConfounderByteSize() int { - return aes.BlockSize -} - -// GetHMACBitLength returns the bit count size of the integrity hash. -func (e Aes256CtsHmacSha96) GetHMACBitLength() int { - return 96 -} - -// GetCypherBlockBitLength returns the bit count size of the cypher block. -func (e Aes256CtsHmacSha96) GetCypherBlockBitLength() int { - return aes.BlockSize * 8 -} - -// StringToKey returns a key derived from the string provided. -func (e Aes256CtsHmacSha96) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { - return rfc3962.StringToKey(secret, salt, s2kparams, e) -} - -// RandomToKey returns a key from the bytes provided. -func (e Aes256CtsHmacSha96) RandomToKey(b []byte) []byte { - return rfc3961.RandomToKey(b) -} - -// EncryptData encrypts the data provided. -func (e Aes256CtsHmacSha96) EncryptData(key, data []byte) ([]byte, []byte, error) { - return rfc3962.EncryptData(key, data, e) -} - -// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. -func (e Aes256CtsHmacSha96) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { - return rfc3962.EncryptMessage(key, message, usage, e) -} - -// DecryptData decrypts the data provided. -func (e Aes256CtsHmacSha96) DecryptData(key, data []byte) ([]byte, error) { - return rfc3962.DecryptData(key, data, e) -} - -// DecryptMessage decrypts the message provided and verifies the integrity of the message. -func (e Aes256CtsHmacSha96) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { - return rfc3962.DecryptMessage(key, ciphertext, usage, e) -} - -// DeriveKey derives a key from the protocol key based on the usage value. -func (e Aes256CtsHmacSha96) DeriveKey(protocolKey, usage []byte) ([]byte, error) { - return rfc3961.DeriveKey(protocolKey, usage, e) -} - -// DeriveRandom generates data needed for key generation. -func (e Aes256CtsHmacSha96) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { - return rfc3961.DeriveRandom(protocolKey, usage, e) -} - -// VerifyIntegrity checks the integrity of the plaintext message. -func (e Aes256CtsHmacSha96) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { - return rfc3961.VerifyIntegrity(protocolKey, ct, pt, usage, e) -} - -// GetChecksumHash returns a keyed checksum hash of the bytes provided. -func (e Aes256CtsHmacSha96) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { - return common.GetHash(data, protocolKey, common.GetUsageKc(usage), e) -} - -// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. -func (e Aes256CtsHmacSha96) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { - c, err := e.GetChecksumHash(protocolKey, data, usage) - if err != nil { - return false - } - return hmac.Equal(chksum, c) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha384-192.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha384-192.go deleted file mode 100644 index f073a05f..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/aes256-cts-hmac-sha384-192.go +++ /dev/null @@ -1,135 +0,0 @@ -package crypto - -import ( - "crypto/aes" - "crypto/hmac" - "crypto/sha512" - "hash" - - "gopkg.in/jcmturner/gokrb5.v5/crypto/common" - "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009" - "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" - "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" -) - -// RFC https://tools.ietf.org/html/rfc8009 - -// Aes256CtsHmacSha384192 implements Kerberos encryption type aes256-cts-hmac-sha384-192 -type Aes256CtsHmacSha384192 struct { -} - -// GetETypeID returns the EType ID number. -func (e Aes256CtsHmacSha384192) GetETypeID() int32 { - return etypeID.AES256_CTS_HMAC_SHA384_192 -} - -// GetHashID returns the checksum type ID number. -func (e Aes256CtsHmacSha384192) GetHashID() int32 { - return chksumtype.HMAC_SHA384_192_AES256 -} - -// GetKeyByteSize returns the number of bytes for key of this etype. -func (e Aes256CtsHmacSha384192) GetKeyByteSize() int { - return 192 / 8 -} - -// GetKeySeedBitLength returns the number of bits for the seed for key generation. -func (e Aes256CtsHmacSha384192) GetKeySeedBitLength() int { - return e.GetKeyByteSize() * 8 -} - -// GetHashFunc returns the hash function for this etype. -func (e Aes256CtsHmacSha384192) GetHashFunc() func() hash.Hash { - return sha512.New384 -} - -// GetMessageBlockByteSize returns the block size for the etype's messages. -func (e Aes256CtsHmacSha384192) GetMessageBlockByteSize() int { - return 1 -} - -// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. -func (e Aes256CtsHmacSha384192) GetDefaultStringToKeyParams() string { - return "00008000" -} - -// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. -func (e Aes256CtsHmacSha384192) GetConfounderByteSize() int { - return aes.BlockSize -} - -// GetHMACBitLength returns the bit count size of the integrity hash. -func (e Aes256CtsHmacSha384192) GetHMACBitLength() int { - return 192 -} - -// GetCypherBlockBitLength returns the bit count size of the cypher block. -func (e Aes256CtsHmacSha384192) GetCypherBlockBitLength() int { - return aes.BlockSize * 8 -} - -// StringToKey returns a key derived from the string provided. -func (e Aes256CtsHmacSha384192) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { - saltp := rfc8009.GetSaltP(salt, "aes256-cts-hmac-sha384-192") - return rfc8009.StringToKey(secret, saltp, s2kparams, e) -} - -// RandomToKey returns a key from the bytes provided. -func (e Aes256CtsHmacSha384192) RandomToKey(b []byte) []byte { - return rfc8009.RandomToKey(b) -} - -// EncryptData encrypts the data provided. -func (e Aes256CtsHmacSha384192) EncryptData(key, data []byte) ([]byte, []byte, error) { - return rfc8009.EncryptData(key, data, e) -} - -// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. -func (e Aes256CtsHmacSha384192) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { - return rfc8009.EncryptMessage(key, message, usage, e) -} - -// DecryptData decrypts the data provided. -func (e Aes256CtsHmacSha384192) DecryptData(key, data []byte) ([]byte, error) { - return rfc8009.DecryptData(key, data, e) -} - -// DecryptMessage decrypts the message provided and verifies the integrity of the message. -func (e Aes256CtsHmacSha384192) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { - return rfc8009.DecryptMessage(key, ciphertext, usage, e) -} - -// DeriveKey derives a key from the protocol key based on the usage value. -func (e Aes256CtsHmacSha384192) DeriveKey(protocolKey, usage []byte) ([]byte, error) { - return rfc8009.DeriveKey(protocolKey, usage, e), nil -} - -// DeriveRandom generates data needed for key generation. -func (e Aes256CtsHmacSha384192) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { - return rfc8009.DeriveRandom(protocolKey, usage, e) -} - -// VerifyIntegrity checks the integrity of the ciphertext message. -// The HMAC is calculated over the cipher state concatenated with the -// AES output, instead of being calculated over the confounder and -// plaintext. This allows the message receiver to verify the -// integrity of the message before decrypting the message. -// Therefore the pt value to this interface method is not use. Pass any []byte. -func (e Aes256CtsHmacSha384192) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { - // We don't need ib just there for the interface - return rfc8009.VerifyIntegrity(protocolKey, ct, usage, e) -} - -// GetChecksumHash returns a keyed checksum hash of the bytes provided. -func (e Aes256CtsHmacSha384192) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { - return common.GetHash(data, protocolKey, common.GetUsageKc(usage), e) -} - -// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. -func (e Aes256CtsHmacSha384192) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { - c, err := e.GetChecksumHash(protocolKey, data, usage) - if err != nil { - return false - } - return hmac.Equal(chksum, c) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/common/common.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/common/common.go deleted file mode 100644 index 874f93c0..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/common/common.go +++ /dev/null @@ -1,143 +0,0 @@ -// Package common provides encryption methods common across encryption types -package common - -import ( - "bytes" - "crypto/hmac" - "encoding/binary" - "encoding/hex" - "errors" - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" -) - -// ZeroPad pads bytes with zeros to nearest multiple of message size m. -func ZeroPad(b []byte, m int) ([]byte, error) { - if m <= 0 { - return nil, errors.New("Invalid message block size when padding") - } - if b == nil || len(b) == 0 { - return nil, errors.New("Data not valid to pad: Zero size") - } - if l := len(b) % m; l != 0 { - n := m - l - z := make([]byte, n) - b = append(b, z...) - } - return b, nil -} - -// PKCS7Pad pads bytes according to RFC 2315 to nearest multiple of message size m. -func PKCS7Pad(b []byte, m int) ([]byte, error) { - if m <= 0 { - return nil, errors.New("Invalid message block size when padding") - } - if b == nil || len(b) == 0 { - return nil, errors.New("Data not valid to pad: Zero size") - } - n := m - (len(b) % m) - pb := make([]byte, len(b)+n) - copy(pb, b) - copy(pb[len(b):], bytes.Repeat([]byte{byte(n)}, n)) - return pb, nil -} - -// PKCS7Unpad removes RFC 2315 padding from byes where message size is m. -func PKCS7Unpad(b []byte, m int) ([]byte, error) { - if m <= 0 { - return nil, errors.New("invalid message block size when unpadding") - } - if b == nil || len(b) == 0 { - return nil, errors.New("padded data not valid: Zero size") - } - if len(b)%m != 0 { - return nil, errors.New("padded data not valid: Not multiple of message block size") - } - c := b[len(b)-1] - n := int(c) - if n == 0 || n > len(b) { - return nil, errors.New("padded data not valid: Data may not have been padded") - } - for i := 0; i < n; i++ { - if b[len(b)-n+i] != c { - return nil, errors.New("padded data not valid") - } - } - return b[:len(b)-n], nil -} - -// GetHash generates the keyed hash value according to the etype's hash function. -func GetHash(pt, key []byte, usage []byte, etype etype.EType) ([]byte, error) { - k, err := etype.DeriveKey(key, usage) - if err != nil { - return nil, fmt.Errorf("unable to derive key for checksum: %v", err) - } - mac := hmac.New(etype.GetHashFunc(), k) - p := make([]byte, len(pt)) - copy(p, pt) - mac.Write(p) - return mac.Sum(nil)[:etype.GetHMACBitLength()/8], nil -} - -// GetChecksumHash returns a keyed checksum hash of the bytes provided. -func GetChecksumHash(b, key []byte, usage uint32, etype etype.EType) ([]byte, error) { - return GetHash(b, key, GetUsageKc(usage), etype) -} - -// GetIntegrityHash returns a keyed integrity hash of the bytes provided. -func GetIntegrityHash(b, key []byte, usage uint32, etype etype.EType) ([]byte, error) { - return GetHash(b, key, GetUsageKi(usage), etype) -} - -// VerifyChecksum compares the checksum of the msg bytes is the same as the checksum provided. -func VerifyChecksum(key, chksum, msg []byte, usage uint32, etype etype.EType) bool { - //The ciphertext output is the concatenation of the output of the basic - //encryption function E and a (possibly truncated) HMAC using the - //specified hash function H, both applied to the plaintext with a - //random confounder prefix and sufficient padding to bring it to a - //multiple of the message block size. When the HMAC is computed, the - //key is used in the protocol key form. - expectedMAC, _ := GetChecksumHash(msg, key, usage, etype) - return hmac.Equal(chksum, expectedMAC) -} - -// GetUsageKc returns the checksum key usage value for the usage number un. -// -// RFC 3961: The "well-known constant" used for the DK function is the key usage number, expressed as four octets in big-endian order, followed by one octet indicated below. -// -// Kc = DK(base-key, usage | 0x99); -func GetUsageKc(un uint32) []byte { - return getUsage(un, 0x99) -} - -// GetUsageKe returns the encryption key usage value for the usage number un -// -// RFC 3961: The "well-known constant" used for the DK function is the key usage number, expressed as four octets in big-endian order, followed by one octet indicated below. -// -// Ke = DK(base-key, usage | 0xAA); -func GetUsageKe(un uint32) []byte { - return getUsage(un, 0xAA) -} - -// GetUsageKi returns the integrity key usage value for the usage number un -// -// RFC 3961: The "well-known constant" used for the DK function is the key usage number, expressed as four octets in big-endian order, followed by one octet indicated below. -// -// Ki = DK(base-key, usage | 0x55); -func GetUsageKi(un uint32) []byte { - return getUsage(un, 0x55) -} - -func getUsage(un uint32, o byte) []byte { - var buf bytes.Buffer - binary.Write(&buf, binary.BigEndian, un) - return append(buf.Bytes(), o) -} - -// IterationsToS2Kparams converts the number of iterations as an integer to a string representation. -func IterationsToS2Kparams(i uint32) string { - b := make([]byte, 4, 4) - binary.BigEndian.PutUint32(b, i) - return hex.EncodeToString(b) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/crypto.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/crypto.go deleted file mode 100644 index 3ad5a576..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/crypto.go +++ /dev/null @@ -1,175 +0,0 @@ -// Package crypto implements cryptographic functions for Kerberos 5 implementation. -package crypto - -import ( - "encoding/hex" - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" - "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" - "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" - "gopkg.in/jcmturner/gokrb5.v5/iana/patype" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// GetEtype returns an instances of the required etype struct for the etype ID. -func GetEtype(id int32) (etype.EType, error) { - switch id { - case etypeID.AES128_CTS_HMAC_SHA1_96: - var et Aes128CtsHmacSha96 - return et, nil - case etypeID.AES256_CTS_HMAC_SHA1_96: - var et Aes256CtsHmacSha96 - return et, nil - case etypeID.AES128_CTS_HMAC_SHA256_128: - var et Aes128CtsHmacSha256128 - return et, nil - case etypeID.AES256_CTS_HMAC_SHA384_192: - var et Aes256CtsHmacSha384192 - return et, nil - case etypeID.DES3_CBC_SHA1_KD: - var et Des3CbcSha1Kd - return et, nil - case etypeID.RC4_HMAC: - var et RC4HMAC - return et, nil - default: - return nil, fmt.Errorf("unknown or unsupported EType: %d", id) - } -} - -// GetChksumEtype returns an instances of the required etype struct for the checksum ID. -func GetChksumEtype(id int32) (etype.EType, error) { - switch id { - case chksumtype.HMAC_SHA1_96_AES128: - var et Aes128CtsHmacSha96 - return et, nil - case chksumtype.HMAC_SHA1_96_AES256: - var et Aes256CtsHmacSha96 - return et, nil - case chksumtype.HMAC_SHA256_128_AES128: - var et Aes128CtsHmacSha256128 - return et, nil - case chksumtype.HMAC_SHA384_192_AES256: - var et Aes256CtsHmacSha384192 - return et, nil - case chksumtype.HMAC_SHA1_DES3_KD: - var et Des3CbcSha1Kd - return et, nil - case chksumtype.KERB_CHECKSUM_HMAC_MD5: - var et RC4HMAC - return et, nil - //case chksumtype.KERB_CHECKSUM_HMAC_MD5_UNSIGNED: - // var et RC4HMAC - // return et, nil - default: - return nil, fmt.Errorf("unknown or unsupported checksum type: %d", id) - } -} - -// GetKeyFromPassword generates an encryption key from the principal's password. -func GetKeyFromPassword(passwd string, cname types.PrincipalName, realm string, etypeID int32, pas types.PADataSequence) (types.EncryptionKey, etype.EType, error) { - var key types.EncryptionKey - et, err := GetEtype(etypeID) - if err != nil { - return key, et, fmt.Errorf("error getting encryption type: %v", err) - } - sk2p := et.GetDefaultStringToKeyParams() - var salt string - var paID int32 - for _, pa := range pas { - switch pa.PADataType { - case patype.PA_PW_SALT: - if paID > pa.PADataType { - continue - } - salt = string(pa.PADataValue) - case patype.PA_ETYPE_INFO: - if paID > pa.PADataType { - continue - } - var eti types.ETypeInfo - err := eti.Unmarshal(pa.PADataValue) - if err != nil { - return key, et, fmt.Errorf("error unmashaling PA Data to PA-ETYPE-INFO2: %v", err) - } - if etypeID != eti[0].EType { - et, err = GetEtype(eti[0].EType) - if err != nil { - return key, et, fmt.Errorf("error getting encryption type: %v", err) - } - } - salt = string(eti[0].Salt) - case patype.PA_ETYPE_INFO2: - if paID > pa.PADataType { - continue - } - var et2 types.ETypeInfo2 - err := et2.Unmarshal(pa.PADataValue) - if err != nil { - return key, et, fmt.Errorf("error unmashalling PA Data to PA-ETYPE-INFO2: %v", err) - } - if etypeID != et2[0].EType { - et, err = GetEtype(et2[0].EType) - if err != nil { - return key, et, fmt.Errorf("error getting encryption type: %v", err) - } - } - if len(et2[0].S2KParams) == 4 { - sk2p = hex.EncodeToString(et2[0].S2KParams) - } - salt = et2[0].Salt - } - } - if salt == "" { - salt = cname.GetSalt(realm) - } - k, err := et.StringToKey(passwd, salt, sk2p) - if err != nil { - return key, et, fmt.Errorf("error deriving key from string: %+v", err) - } - key = types.EncryptionKey{ - KeyType: etypeID, - KeyValue: k, - } - return key, et, nil -} - -// GetEncryptedData encrypts the data provided and returns and EncryptedData type. -// Pass a usage value of zero to use the key provided directly rather than deriving one. -func GetEncryptedData(plainBytes []byte, key types.EncryptionKey, usage uint32, kvno int) (types.EncryptedData, error) { - var ed types.EncryptedData - et, err := GetEtype(key.KeyType) - if err != nil { - return ed, fmt.Errorf("error getting etype: %v", err) - } - _, b, err := et.EncryptMessage(key.KeyValue, plainBytes, usage) - if err != nil { - return ed, err - } - - ed = types.EncryptedData{ - EType: key.KeyType, - Cipher: b, - KVNO: kvno, - } - return ed, nil -} - -// DecryptEncPart decrypts the EncryptedData. -func DecryptEncPart(ed types.EncryptedData, key types.EncryptionKey, usage uint32) ([]byte, error) { - return DecryptMessage(ed.Cipher, key, usage) -} - -// DecryptMessage decrypts the ciphertext and verifies the integrity. -func DecryptMessage(ciphertext []byte, key types.EncryptionKey, usage uint32) ([]byte, error) { - et, err := GetEtype(key.KeyType) - if err != nil { - return []byte{}, fmt.Errorf("error decrypting: %v", err) - } - b, err := et.DecryptMessage(key.KeyValue, ciphertext, usage) - if err != nil { - return nil, fmt.Errorf("error decrypting: %v", err) - } - return b, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/des3-cbc-sha1-kd.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/des3-cbc-sha1-kd.go deleted file mode 100644 index e068bbb0..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/des3-cbc-sha1-kd.go +++ /dev/null @@ -1,174 +0,0 @@ -package crypto - -import ( - "crypto/des" - "crypto/hmac" - "crypto/sha1" - "errors" - "hash" - - "gopkg.in/jcmturner/gokrb5.v5/crypto/common" - "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961" - "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" - "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" -) - -//RFC: 3961 Section 6.3 - -/* - des3-cbc-hmac-sha1-kd, hmac-sha1-des3-kd - ------------------------------------------------ - protocol key format 24 bytes, parity in low - bit of each - - key-generation seed 21 bytes - length - - hash function SHA-1 - - HMAC output size 160 bits - - message block size 8 bytes - - default string-to-key empty string - params - - encryption and triple-DES encrypt and - decryption functions decrypt, in outer-CBC - mode (cipher block size - 8 octets) - - key generation functions: - - random-to-key DES3random-to-key (see - below) - - string-to-key DES3string-to-key (see - below) - - The des3-cbc-hmac-sha1-kd encryption type is assigned the value - sixteen (16). The hmac-sha1-des3-kd checksum algorithm is assigned a - checksum type number of twelve (12)*/ - -// Des3CbcSha1Kd implements Kerberos encryption type des3-cbc-hmac-sha1-kd -type Des3CbcSha1Kd struct { -} - -// GetETypeID returns the EType ID number. -func (e Des3CbcSha1Kd) GetETypeID() int32 { - return etypeID.DES3_CBC_SHA1_KD -} - -// GetHashID returns the checksum type ID number. -func (e Des3CbcSha1Kd) GetHashID() int32 { - return chksumtype.HMAC_SHA1_DES3_KD -} - -// GetKeyByteSize returns the number of bytes for key of this etype. -func (e Des3CbcSha1Kd) GetKeyByteSize() int { - return 24 -} - -// GetKeySeedBitLength returns the number of bits for the seed for key generation. -func (e Des3CbcSha1Kd) GetKeySeedBitLength() int { - return 21 * 8 -} - -// GetHashFunc returns the hash function for this etype. -func (e Des3CbcSha1Kd) GetHashFunc() func() hash.Hash { - return sha1.New -} - -// GetMessageBlockByteSize returns the block size for the etype's messages. -func (e Des3CbcSha1Kd) GetMessageBlockByteSize() int { - //For traditional CBC mode with padding, it would be the underlying cipher's block size - return des.BlockSize -} - -// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. -func (e Des3CbcSha1Kd) GetDefaultStringToKeyParams() string { - var s string - return s -} - -// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. -func (e Des3CbcSha1Kd) GetConfounderByteSize() int { - return des.BlockSize -} - -// GetHMACBitLength returns the bit count size of the integrity hash. -func (e Des3CbcSha1Kd) GetHMACBitLength() int { - return e.GetHashFunc()().Size() * 8 -} - -// GetCypherBlockBitLength returns the bit count size of the cypher block. -func (e Des3CbcSha1Kd) GetCypherBlockBitLength() int { - return des.BlockSize * 8 -} - -// StringToKey returns a key derived from the string provided. -func (e Des3CbcSha1Kd) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { - if s2kparams != "" { - return []byte{}, errors.New("s2kparams must be an empty string") - } - return rfc3961.DES3StringToKey(secret, salt, e) -} - -// RandomToKey returns a key from the bytes provided. -func (e Des3CbcSha1Kd) RandomToKey(b []byte) []byte { - return rfc3961.DES3RandomToKey(b) -} - -// DeriveRandom generates data needed for key generation. -func (e Des3CbcSha1Kd) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { - r, err := rfc3961.DeriveRandom(protocolKey, usage, e) - return r, err -} - -// DeriveKey derives a key from the protocol key based on the usage value. -func (e Des3CbcSha1Kd) DeriveKey(protocolKey, usage []byte) ([]byte, error) { - r, err := e.DeriveRandom(protocolKey, usage) - if err != nil { - return nil, err - } - return e.RandomToKey(r), nil -} - -// EncryptData encrypts the data provided. -func (e Des3CbcSha1Kd) EncryptData(key, data []byte) ([]byte, []byte, error) { - return rfc3961.DES3EncryptData(key, data, e) -} - -// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. -func (e Des3CbcSha1Kd) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { - return rfc3961.DES3EncryptMessage(key, message, usage, e) -} - -// DecryptData decrypts the data provided. -func (e Des3CbcSha1Kd) DecryptData(key, data []byte) ([]byte, error) { - return rfc3961.DES3DecryptData(key, data, e) -} - -// DecryptMessage decrypts the message provided and verifies the integrity of the message. -func (e Des3CbcSha1Kd) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { - return rfc3961.DES3DecryptMessage(key, ciphertext, usage, e) -} - -// VerifyIntegrity checks the integrity of the plaintext message. -func (e Des3CbcSha1Kd) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { - return rfc3961.VerifyIntegrity(protocolKey, ct, pt, usage, e) -} - -// GetChecksumHash returns a keyed checksum hash of the bytes provided. -func (e Des3CbcSha1Kd) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { - return common.GetHash(data, protocolKey, common.GetUsageKc(usage), e) -} - -// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. -func (e Des3CbcSha1Kd) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { - c, err := e.GetChecksumHash(protocolKey, data, usage) - if err != nil { - return false - } - return hmac.Equal(chksum, c) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/etype/etype.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/etype/etype.go deleted file mode 100644 index ee7510e2..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/etype/etype.go +++ /dev/null @@ -1,29 +0,0 @@ -// Package etype provides the Kerberos Encryption Type interface -package etype - -import "hash" - -// EType is the interface defining the Encryption Type. -type EType interface { - GetETypeID() int32 - GetHashID() int32 - GetKeyByteSize() int - GetKeySeedBitLength() int // key-generation seed length, k - GetDefaultStringToKeyParams() string // default string-to-key parameters (s2kparams) - StringToKey(string, salt, s2kparams string) ([]byte, error) // string-to-key (UTF-8 string, UTF-8 string, opaque)->(protocol-key) - RandomToKey(b []byte) []byte // random-to-key (bitstring[K])->(protocol-key) - GetHMACBitLength() int // HMAC output size, h - GetMessageBlockByteSize() int // message block size, m - EncryptData(key, data []byte) ([]byte, []byte, error) // E function - encrypt (specific-key, state, octet string)->(state, octet string) - EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) - DecryptData(key, data []byte) ([]byte, error) // D function - DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) - GetCypherBlockBitLength() int // cipher block size, c - GetConfounderByteSize() int // This is the same as the cipher block size but in bytes. - DeriveKey(protocolKey, usage []byte) ([]byte, error) // DK key-derivation (protocol-key, integer)->(specific-key) - DeriveRandom(protocolKey, usage []byte) ([]byte, error) // DR pseudo-random (protocol-key, octet-string)->(octet-string) - VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool - GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) - VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool - GetHashFunc() func() hash.Hash -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rc4-hmac.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rc4-hmac.go deleted file mode 100644 index 741bd284..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rc4-hmac.go +++ /dev/null @@ -1,137 +0,0 @@ -package crypto - -import ( - "bytes" - "crypto/md5" - "hash" - "io" - - "golang.org/x/crypto/md4" - "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961" - "gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757" - "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" - "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" -) - -//http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/sun/security/krb5/internal/crypto/dk/ArcFourCrypto.java#ArcFourCrypto.encrypt%28byte%5B%5D%2Cint%2Cbyte%5B%5D%2Cbyte%5B%5D%2Cbyte%5B%5D%2Cint%2Cint%29 - -// RC4HMAC implements Kerberos encryption type aes256-cts-hmac-sha1-96 -type RC4HMAC struct { -} - -// GetETypeID returns the EType ID number. -func (e RC4HMAC) GetETypeID() int32 { - return etypeID.RC4_HMAC -} - -// GetHashID returns the checksum type ID number. -func (e RC4HMAC) GetHashID() int32 { - return chksumtype.KERB_CHECKSUM_HMAC_MD5 -} - -// GetKeyByteSize returns the number of bytes for key of this etype. -func (e RC4HMAC) GetKeyByteSize() int { - return 16 -} - -// GetKeySeedBitLength returns the number of bits for the seed for key generation. -func (e RC4HMAC) GetKeySeedBitLength() int { - return e.GetKeyByteSize() * 8 -} - -// GetHashFunc returns the hash function for this etype. -func (e RC4HMAC) GetHashFunc() func() hash.Hash { - return md5.New -} - -// GetMessageBlockByteSize returns the block size for the etype's messages. -func (e RC4HMAC) GetMessageBlockByteSize() int { - return 1 -} - -// GetDefaultStringToKeyParams returns the default key derivation parameters in string form. -func (e RC4HMAC) GetDefaultStringToKeyParams() string { - return "" -} - -// GetConfounderByteSize returns the byte count for confounder to be used during cryptographic operations. -func (e RC4HMAC) GetConfounderByteSize() int { - return 8 -} - -// GetHMACBitLength returns the bit count size of the integrity hash. -func (e RC4HMAC) GetHMACBitLength() int { - return md5.Size * 8 -} - -// GetCypherBlockBitLength returns the bit count size of the cypher block. -func (e RC4HMAC) GetCypherBlockBitLength() int { - return 8 // doesn't really apply -} - -// StringToKey returns a key derived from the string provided. -func (e RC4HMAC) StringToKey(secret string, salt string, s2kparams string) ([]byte, error) { - return rfc4757.StringToKey(secret) -} - -// RandomToKey returns a key from the bytes provided. -func (e RC4HMAC) RandomToKey(b []byte) []byte { - r := bytes.NewReader(b) - h := md4.New() - io.Copy(h, r) - return h.Sum(nil) -} - -// EncryptData encrypts the data provided. -func (e RC4HMAC) EncryptData(key, data []byte) ([]byte, []byte, error) { - b, err := rfc4757.EncryptData(key, data, e) - return []byte{}, b, err -} - -// EncryptMessage encrypts the message provided and concatenates it with the integrity hash to create an encrypted message. -func (e RC4HMAC) EncryptMessage(key, message []byte, usage uint32) ([]byte, []byte, error) { - b, err := rfc4757.EncryptMessage(key, message, usage, false, e) - return []byte{}, b, err -} - -// DecryptData decrypts the data provided. -func (e RC4HMAC) DecryptData(key, data []byte) ([]byte, error) { - return rfc4757.DecryptData(key, data, e) -} - -// DecryptMessage decrypts the message provided and verifies the integrity of the message. -func (e RC4HMAC) DecryptMessage(key, ciphertext []byte, usage uint32) ([]byte, error) { - return rfc4757.DecryptMessage(key, ciphertext, usage, false, e) -} - -// DeriveKey derives a key from the protocol key based on the usage value. -func (e RC4HMAC) DeriveKey(protocolKey, usage []byte) ([]byte, error) { - return rfc4757.HMAC(protocolKey, usage), nil -} - -// DeriveRandom generates data needed for key generation. -func (e RC4HMAC) DeriveRandom(protocolKey, usage []byte) ([]byte, error) { - return rfc3961.DeriveRandom(protocolKey, usage, e) -} - -// VerifyIntegrity checks the integrity of the plaintext message. -func (e RC4HMAC) VerifyIntegrity(protocolKey, ct, pt []byte, usage uint32) bool { - return rfc4757.VerifyIntegrity(protocolKey, pt, ct, e) -} - -// GetChecksumHash returns a keyed checksum hash of the bytes provided. -func (e RC4HMAC) GetChecksumHash(protocolKey, data []byte, usage uint32) ([]byte, error) { - return rfc4757.Checksum(protocolKey, usage, data) -} - -// VerifyChecksum compares the checksum of the message bytes is the same as the checksum provided. -func (e RC4HMAC) VerifyChecksum(protocolKey, data, chksum []byte, usage uint32) bool { - checksum, err := rfc4757.Checksum(protocolKey, usage, data) - if err != nil { - return false - } - if !bytes.Equal(checksum, chksum) { - return false - } - return true -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/encryption.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/encryption.go deleted file mode 100644 index d19ed100..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/encryption.go +++ /dev/null @@ -1,125 +0,0 @@ -// Package rfc3961 provides encryption and checksum methods as specified in RFC 3961 -package rfc3961 - -import ( - "crypto/cipher" - "crypto/des" - "crypto/hmac" - "crypto/rand" - "errors" - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/crypto/common" - "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" -) - -// DES3EncryptData encrypts the data provided using DES3 and methods specific to the etype provided. -func DES3EncryptData(key, data []byte, e etype.EType) ([]byte, []byte, error) { - if len(key) != e.GetKeyByteSize() { - return nil, nil, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) - } - data, _ = common.ZeroPad(data, e.GetMessageBlockByteSize()) - - block, err := des.NewTripleDESCipher(key) - if err != nil { - return nil, nil, fmt.Errorf("error creating cipher: %v", err) - } - - //RFC 3961: initial cipher state All bits zero - ivz := make([]byte, des.BlockSize) - - ct := make([]byte, len(data)) - mode := cipher.NewCBCEncrypter(block, ivz) - mode.CryptBlocks(ct, data) - return ct[len(ct)-e.GetMessageBlockByteSize():], ct, nil -} - -// DES3EncryptMessage encrypts the message provided using DES3 and methods specific to the etype provided. -// The encrypted data is concatenated with its integrity hash to create an encrypted message. -func DES3EncryptMessage(key, message []byte, usage uint32, e etype.EType) ([]byte, []byte, error) { - //confounder - c := make([]byte, e.GetConfounderByteSize()) - _, err := rand.Read(c) - if err != nil { - return []byte{}, []byte{}, fmt.Errorf("could not generate random confounder: %v", err) - } - plainBytes := append(c, message...) - plainBytes, _ = common.ZeroPad(plainBytes, e.GetMessageBlockByteSize()) - - // Derive key for encryption from usage - var k []byte - if usage != 0 { - k, err = e.DeriveKey(key, common.GetUsageKe(usage)) - if err != nil { - return []byte{}, []byte{}, fmt.Errorf("error deriving key for encryption: %v", err) - } - } - - iv, b, err := e.EncryptData(k, plainBytes) - if err != nil { - return iv, b, fmt.Errorf("error encrypting data: %v", err) - } - - // Generate and append integrity hash - ih, err := common.GetIntegrityHash(plainBytes, key, usage, e) - if err != nil { - return iv, b, fmt.Errorf("error encrypting data: %v", err) - } - b = append(b, ih...) - return iv, b, nil -} - -// DES3DecryptData decrypts the data provided using DES3 and methods specific to the etype provided. -func DES3DecryptData(key, data []byte, e etype.EType) ([]byte, error) { - if len(key) != e.GetKeyByteSize() { - return []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) - } - - if len(data) < des.BlockSize || len(data)%des.BlockSize != 0 { - return []byte{}, errors.New("ciphertext is not a multiple of the block size") - } - block, err := des.NewTripleDESCipher(key) - if err != nil { - return []byte{}, fmt.Errorf("error creating cipher: %v", err) - } - pt := make([]byte, len(data)) - ivz := make([]byte, des.BlockSize) - mode := cipher.NewCBCDecrypter(block, ivz) - mode.CryptBlocks(pt, data) - return pt, nil -} - -// DES3DecryptMessage decrypts the message provided using DES3 and methods specific to the etype provided. -// The integrity of the message is also verified. -func DES3DecryptMessage(key, ciphertext []byte, usage uint32, e etype.EType) ([]byte, error) { - //Derive the key - k, err := e.DeriveKey(key, common.GetUsageKe(usage)) - if err != nil { - return nil, fmt.Errorf("error deriving key: %v", err) - } - // Strip off the checksum from the end - b, err := e.DecryptData(k, ciphertext[:len(ciphertext)-e.GetHMACBitLength()/8]) - if err != nil { - return nil, fmt.Errorf("error decrypting: %v", err) - } - //Verify checksum - if !e.VerifyIntegrity(key, ciphertext, b, usage) { - return nil, errors.New("error decrypting: integrity verification failed") - } - //Remove the confounder bytes - return b[e.GetConfounderByteSize():], nil -} - -// VerifyIntegrity verifies the integrity of cipertext bytes ct. -func VerifyIntegrity(key, ct, pt []byte, usage uint32, etype etype.EType) bool { - //The ciphertext output is the concatenation of the output of the basic - //encryption function E and a (possibly truncated) HMAC using the - //specified hash function H, both applied to the plaintext with a - //random confounder prefix and sufficient padding to bring it to a - //multiple of the message block size. When the HMAC is computed, the - //key is used in the protocol key form. - h := make([]byte, etype.GetHMACBitLength()/8) - copy(h, ct[len(ct)-etype.GetHMACBitLength()/8:]) - expectedMAC, _ := common.GetIntegrityHash(pt, key, usage, etype) - return hmac.Equal(h, expectedMAC) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/keyDerivation.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/keyDerivation.go deleted file mode 100644 index b9f0dc9e..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/keyDerivation.go +++ /dev/null @@ -1,134 +0,0 @@ -package rfc3961 - -import ( - "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" -) - -const ( - prfconstant = "prf" -) - -// DeriveRandom implements the RFC 3961 defined function: DR(Key, Constant) = k-truncate(E(Key, Constant, initial-cipher-state)). -// -// key: base key or protocol key. Likely to be a key from a keytab file. -// -// usage: a constant. -// -// n: block size in bits (not bytes) - note if you use something like aes.BlockSize this is in bytes. -// -// k: key length / key seed length in bits. Eg. for AES256 this value is 256. -// -// e: the encryption etype function to use. -func DeriveRandom(key, usage []byte, e etype.EType) ([]byte, error) { - n := e.GetCypherBlockBitLength() - k := e.GetKeySeedBitLength() - //Ensure the usage constant is at least the size of the cypher block size. Pass it through the nfold algorithm that will "stretch" it if needs be. - nFoldUsage := Nfold(usage, n) - //k-truncate implemented by creating a byte array the size of k (k is in bits hence /8) - out := make([]byte, k/8) - - /*If the output of E is shorter than k bits, it is fed back into the encryption as many times as necessary. - The construct is as follows (where | indicates concatentation): - - K1 = E(Key, n-fold(Constant), initial-cipher-state) - K2 = E(Key, K1, initial-cipher-state) - K3 = E(Key, K2, initial-cipher-state) - K4 = ... - - DR(Key, Constant) = k-truncate(K1 | K2 | K3 | K4 ...)*/ - _, K, err := e.EncryptData(key, nFoldUsage) - if err != nil { - return out, err - } - for i := copy(out, K); i < len(out); { - _, K, _ = e.EncryptData(key, K) - i = i + copy(out[i:], K) - } - return out, nil -} - -// DeriveKey derives a key from the protocol key based on the usage and the etype's specific methods. -func DeriveKey(protocolKey, usage []byte, e etype.EType) ([]byte, error) { - r, err := e.DeriveRandom(protocolKey, usage) - if err != nil { - return nil, err - } - return e.RandomToKey(r), nil -} - -// RandomToKey returns a key from the bytes provided according to the definition in RFC 3961. -func RandomToKey(b []byte) []byte { - return b -} - -// DES3RandomToKey returns a key from the bytes provided according to the definition in RFC 3961 for DES3 etypes. -func DES3RandomToKey(b []byte) []byte { - r := stretch56Bits(b[:7]) - r2 := stretch56Bits(b[7:14]) - r = append(r, r2...) - r3 := stretch56Bits(b[14:21]) - r = append(r, r3...) - return r -} - -// DES3StringToKey returns a key derived from the string provided according to the definition in RFC 3961 for DES3 etypes. -func DES3StringToKey(secret, salt string, e etype.EType) ([]byte, error) { - s := secret + salt - tkey := e.RandomToKey(Nfold([]byte(s), e.GetKeySeedBitLength())) - return e.DeriveKey(tkey, []byte("kerberos")) -} - -// PseudoRandom function as defined in RFC 3961 -func PseudoRandom(key, b []byte, e etype.EType) ([]byte, error) { - h := e.GetHashFunc()() - h.Write(b) - tmp := h.Sum(nil)[:e.GetMessageBlockByteSize()] - k, err := e.DeriveKey(key, []byte(prfconstant)) - if err != nil { - return []byte{}, err - } - _, prf, err := e.EncryptData(k, tmp) - if err != nil { - return []byte{}, err - } - return prf, nil -} - -func stretch56Bits(b []byte) []byte { - d := make([]byte, len(b), len(b)) - copy(d, b) - var lb byte - for i, v := range d { - bv, nb := calcEvenParity(v) - d[i] = nb - if bv != 0 { - lb = lb | (1 << uint(i+1)) - } else { - lb = lb &^ (1 << uint(i+1)) - } - } - _, lb = calcEvenParity(lb) - d = append(d, lb) - return d -} - -func calcEvenParity(b byte) (uint8, uint8) { - lowestbit := b & 0x01 - // c counter of 1s in the first 7 bits of the byte - var c int - // Iterate over the highest 7 bits (hence p starts at 1 not zero) and count the 1s. - for p := 1; p < 8; p++ { - v := b & (1 << uint(p)) - if v != 0 { - c++ - } - } - if c%2 == 0 { - //Even number of 1s so set parity to 1 - b = b | 1 - } else { - //Odd number of 1s so set parity to 0 - b = b &^ 1 - } - return lowestbit, b -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/nfold.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/nfold.go deleted file mode 100644 index 779d1c6e..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3961/nfold.go +++ /dev/null @@ -1,128 +0,0 @@ -package rfc3961 - -/* -Implementation of the n-fold algorithm as defined in RFC 3961. - -n-fold is an algorithm that takes m input bits and "stretches" them -to form n output bits with equal contribution from each input bit to -the output, as described in [Blumenthal96]: - -We first define a primitive called n-folding, which takes a -variable-length input block and produces a fixed-length output -sequence. The intent is to give each input bit approximately -equal weight in determining the value of each output bit. Note -that whenever we need to treat a string of octets as a number, the -assumed representation is Big-Endian -- Most Significant Byte -first. - -To n-fold a number X, replicate the input value to a length that -is the least common multiple of n and the length of X. Before -each repetition, the input is rotated to the right by 13 bit -positions. The successive n-bit chunks are added together using -1's-complement addition (that is, with end-around carry) to yield -a n-bit result.... -*/ - -/* Credits -This golang implementation of nfold used the following project for help with implementation detail. -Although their source is in java it was helpful as a reference implementation of the RFC. -You can find the source code of their open source project along with license information below. -We acknowledge and are grateful to these developers for their contributions to open source - -Project: Apache Directory (http://http://directory.apache.org/) -https://svn.apache.org/repos/asf/directory/apacheds/tags/1.5.1/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/NFold.java -License: http://www.apache.org/licenses/LICENSE-2.0 -*/ - -// Nfold expands the key to ensure it is not smaller than one cipher block. -// Defined in RFC 3961. -// -// m input bytes that will be "stretched" to the least common multiple of n bits and the bit length of m. -func Nfold(m []byte, n int) []byte { - k := len(m) * 8 - - //Get the lowest common multiple of the two bit sizes - lcm := lcm(n, k) - relicate := lcm / k - var sumBytes []byte - - for i := 0; i < relicate; i++ { - rotation := 13 * i - sumBytes = append(sumBytes, rotateRight(m, rotation)...) - } - - nfold := make([]byte, n/8) - sum := make([]byte, n/8) - for i := 0; i < lcm/n; i++ { - for j := 0; j < n/8; j++ { - sum[j] = sumBytes[j+(i*len(sum))] - } - nfold = onesComplementAddition(nfold, sum) - } - return nfold -} - -func onesComplementAddition(n1, n2 []byte) []byte { - numBits := len(n1) * 8 - out := make([]byte, numBits/8) - carry := 0 - for i := numBits - 1; i > -1; i-- { - n1b := getBit(&n1, i) - n2b := getBit(&n2, i) - s := n1b + n2b + carry - - if s == 0 || s == 1 { - setBit(&out, i, s) - carry = 0 - } else if s == 2 { - carry = 1 - } else if s == 3 { - setBit(&out, i, 1) - carry = 1 - } - } - if carry == 1 { - carryArray := make([]byte, len(n1)) - carryArray[len(carryArray)-1] = 1 - out = onesComplementAddition(out, carryArray) - } - return out -} - -func rotateRight(b []byte, step int) []byte { - out := make([]byte, len(b)) - bitLen := len(b) * 8 - for i := 0; i < bitLen; i++ { - v := getBit(&b, i) - setBit(&out, (i+step)%bitLen, v) - } - return out -} - -func lcm(x, y int) int { - return (x * y) / gcd(x, y) -} - -func gcd(x, y int) int { - for y != 0 { - x, y = y, x%y - } - return x -} - -func getBit(b *[]byte, p int) int { - pByte := p / 8 - pBit := uint(p % 8) - vByte := (*b)[pByte] - vInt := int(vByte >> (8 - (pBit + 1)) & 0x0001) - return vInt -} - -func setBit(b *[]byte, p, v int) { - pByte := p / 8 - pBit := uint(p % 8) - oldByte := (*b)[pByte] - var newByte byte - newByte = byte(v<<(8-(pBit+1))) | oldByte - (*b)[pByte] = newByte -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/encryption.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/encryption.go deleted file mode 100644 index 41736124..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/encryption.go +++ /dev/null @@ -1,89 +0,0 @@ -// Package rfc3962 provides encryption and checksum methods as specified in RFC 3962 -package rfc3962 - -import ( - "crypto/rand" - "errors" - "fmt" - - "gopkg.in/jcmturner/aescts.v1" - "gopkg.in/jcmturner/gokrb5.v5/crypto/common" - "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" -) - -// EncryptData encrypts the data provided using methods specific to the etype provided as defined in RFC 3962. -func EncryptData(key, data []byte, e etype.EType) ([]byte, []byte, error) { - if len(key) != e.GetKeyByteSize() { - return []byte{}, []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) - } - ivz := make([]byte, e.GetCypherBlockBitLength()/8) - return aescts.Encrypt(key, ivz, data) -} - -// EncryptMessage encrypts the message provided using the methods specific to the etype provided as defined in RFC 3962. -// The encrypted data is concatenated with its integrity hash to create an encrypted message. -func EncryptMessage(key, message []byte, usage uint32, e etype.EType) ([]byte, []byte, error) { - if len(key) != e.GetKeyByteSize() { - return []byte{}, []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) - } - //confounder - c := make([]byte, e.GetConfounderByteSize()) - _, err := rand.Read(c) - if err != nil { - return []byte{}, []byte{}, fmt.Errorf("could not generate random confounder: %v", err) - } - plainBytes := append(c, message...) - - // Derive key for encryption from usage - var k []byte - if usage != 0 { - k, err = e.DeriveKey(key, common.GetUsageKe(usage)) - if err != nil { - return []byte{}, []byte{}, fmt.Errorf("error deriving key for encryption: %v", err) - } - } - - // Encrypt the data - iv, b, err := e.EncryptData(k, plainBytes) - if err != nil { - return iv, b, fmt.Errorf("error encrypting data: %v", err) - } - - // Generate and append integrity hash - ih, err := common.GetIntegrityHash(plainBytes, key, usage, e) - if err != nil { - return iv, b, fmt.Errorf("error encrypting data: %v", err) - } - b = append(b, ih...) - return iv, b, nil -} - -// DecryptData decrypts the data provided using the methods specific to the etype provided as defined in RFC 3962. -func DecryptData(key, data []byte, e etype.EType) ([]byte, error) { - if len(key) != e.GetKeyByteSize() { - return []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) - } - ivz := make([]byte, e.GetCypherBlockBitLength()/8) - return aescts.Decrypt(key, ivz, data) -} - -// DecryptMessage decrypts the message provided using the methods specific to the etype provided as defined in RFC 3962. -// The integrity of the message is also verified. -func DecryptMessage(key, ciphertext []byte, usage uint32, e etype.EType) ([]byte, error) { - //Derive the key - k, err := e.DeriveKey(key, common.GetUsageKe(usage)) - if err != nil { - return nil, fmt.Errorf("error deriving key: %v", err) - } - // Strip off the checksum from the end - b, err := e.DecryptData(k, ciphertext[:len(ciphertext)-e.GetHMACBitLength()/8]) - if err != nil { - return nil, err - } - //Verify checksum - if !e.VerifyIntegrity(key, ciphertext, b, usage) { - return nil, errors.New("integrity verification failed") - } - //Remove the confounder bytes - return b[e.GetConfounderByteSize():], nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/keyDerivation.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/keyDerivation.go deleted file mode 100644 index a25d4483..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc3962/keyDerivation.go +++ /dev/null @@ -1,58 +0,0 @@ -package rfc3962 - -import ( - "encoding/binary" - "encoding/hex" - "errors" - - "github.com/jcmturner/gofork/x/crypto/pbkdf2" - "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" -) - -const ( - s2kParamsZero = 4294967296 -) - -// StringToKey returns a key derived from the string provided according to the definition in RFC 3961. -func StringToKey(secret, salt, s2kparams string, e etype.EType) ([]byte, error) { - i, err := S2KparamsToItertions(s2kparams) - if err != nil { - return nil, err - } - return StringToKeyIter(secret, salt, i, e) -} - -// StringToPBKDF2 generates an encryption key from a pass phrase and salt string using the PBKDF2 function from PKCS #5 v2.0 -func StringToPBKDF2(secret, salt string, iterations int64, e etype.EType) []byte { - return pbkdf2.Key64([]byte(secret), []byte(salt), iterations, int64(e.GetKeyByteSize()), e.GetHashFunc()) -} - -// StringToKeyIter returns a key derived from the string provided according to the definition in RFC 3961. -func StringToKeyIter(secret, salt string, iterations int64, e etype.EType) ([]byte, error) { - tkey := e.RandomToKey(StringToPBKDF2(secret, salt, iterations, e)) - return e.DeriveKey(tkey, []byte("kerberos")) -} - -// S2KparamsToItertions converts the string representation of iterations to an integer -func S2KparamsToItertions(s2kparams string) (int64, error) { - //process s2kparams string - //The parameter string is four octets indicating an unsigned - //number in big-endian order. This is the number of iterations to be - //performed. If the value is 00 00 00 00, the number of iterations to - //be performed is 4,294,967,296 (2**32). - var i uint32 - if len(s2kparams) != 8 { - return int64(s2kParamsZero), errors.New("invalid s2kparams length") - } - b, err := hex.DecodeString(s2kparams) - if err != nil { - return int64(s2kParamsZero), errors.New("invalid s2kparams, cannot decode string to bytes") - } - i = binary.BigEndian.Uint32(b) - //buf := bytes.NewBuffer(b) - //err = binary.Read(buf, binary.BigEndian, &i) - if err != nil { - return int64(s2kParamsZero), errors.New("invalid s2kparams, cannot convert to big endian int32") - } - return int64(i), nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/checksum.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/checksum.go deleted file mode 100644 index 45276e95..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/checksum.go +++ /dev/null @@ -1,40 +0,0 @@ -package rfc4757 - -import ( - "bytes" - "crypto/hmac" - "crypto/md5" - "io" -) - -// Checksum returns a hash of the data in accordance with RFC 4757 -func Checksum(key []byte, usage uint32, data []byte) ([]byte, error) { - // Create hashing key - s := append([]byte(`signaturekey`), byte(0x00)) //includes zero octet at end - mac := hmac.New(md5.New, key) - mac.Write(s) - Ksign := mac.Sum(nil) - - // Format data - tb := UsageToMSMsgType(usage) - p := append(tb, data...) - h := md5.New() - rb := bytes.NewReader(p) - _, err := io.Copy(h, rb) - if err != nil { - return []byte{}, err - } - tmp := h.Sum(nil) - - // Generate HMAC - mac = hmac.New(md5.New, Ksign) - mac.Write(tmp) - return mac.Sum(nil), nil -} - -// HMAC returns a keyed MD5 checksum of the data -func HMAC(key []byte, data []byte) []byte { - mac := hmac.New(md5.New, key) - mac.Write(data) - return mac.Sum(nil) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/encryption.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/encryption.go deleted file mode 100644 index 3c8505db..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/encryption.go +++ /dev/null @@ -1,83 +0,0 @@ -// Package rfc4757 provides encryption and checksum methods as specified in RFC 4757 -package rfc4757 - -import ( - "bytes" - "crypto/rand" - "crypto/rc4" - "errors" - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" -) - -// EncryptData encrypts the data provided using methods specific to the etype provided as defined in RFC 4757. -func EncryptData(key, data []byte, e etype.EType) ([]byte, error) { - if len(key) != e.GetKeyByteSize() { - return []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) - } - rc4Cipher, err := rc4.NewCipher(key) - if err != nil { - return []byte{}, fmt.Errorf("error creating RC4 cipher: %v", err) - } - ed := make([]byte, len(data)) - copy(ed, data) - rc4Cipher.XORKeyStream(ed, ed) - rc4Cipher.Reset() - return ed, nil -} - -// DecryptData decrypts the data provided using the methods specific to the etype provided as defined in RFC 4757. -func DecryptData(key, data []byte, e etype.EType) ([]byte, error) { - return EncryptData(key, data, e) -} - -// EncryptMessage encrypts the message provided using the methods specific to the etype provided as defined in RFC 4757. -// The encrypted data is concatenated with its RC4 header containing integrity checksum and confounder to create an encrypted message. -func EncryptMessage(key, data []byte, usage uint32, export bool, e etype.EType) ([]byte, error) { - confounder := make([]byte, e.GetConfounderByteSize()) // size = 8 - _, err := rand.Read(confounder) - if err != nil { - return []byte{}, fmt.Errorf("error generating confounder: %v", err) - } - k1 := key - k2 := HMAC(k1, UsageToMSMsgType(usage)) - toenc := append(confounder, data...) - chksum := HMAC(k2, toenc) - k3 := HMAC(k2, chksum) - - ed, err := EncryptData(k3, toenc, e) - if err != nil { - return []byte{}, fmt.Errorf("error encrypting data: %v", err) - } - - msg := append(chksum, ed...) - return msg, nil -} - -// DecryptMessage decrypts the message provided using the methods specific to the etype provided as defined in RFC 4757. -// The integrity of the message is also verified. -func DecryptMessage(key, data []byte, usage uint32, export bool, e etype.EType) ([]byte, error) { - checksum := data[:e.GetHMACBitLength()/8] - ct := data[e.GetHMACBitLength()/8:] - _, k2, k3 := deriveKeys(key, checksum, usage, export) - - pt, err := DecryptData(k3, ct, e) - if err != nil { - return []byte{}, fmt.Errorf("error decrypting data: %v", err) - } - - if !VerifyIntegrity(k2, pt, data, e) { - return []byte{}, errors.New("integrity checksum incorrect") - } - return pt[e.GetConfounderByteSize():], nil -} - -// VerifyIntegrity checks the integrity checksum of the data matches that calculated from the decrypted data. -func VerifyIntegrity(key, pt, data []byte, e etype.EType) bool { - chksum := HMAC(key, pt) - if bytes.Equal(chksum, data[:e.GetHMACBitLength()/8]) { - return true - } - return false -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/keyDerivation.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/keyDerivation.go deleted file mode 100644 index 5e7ec480..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/keyDerivation.go +++ /dev/null @@ -1,55 +0,0 @@ -package rfc4757 - -import ( - "bytes" - "encoding/hex" - "errors" - "fmt" - "io" - - "golang.org/x/crypto/md4" -) - -// StringToKey returns a key derived from the string provided according to the definition in RFC 4757. -func StringToKey(secret string) ([]byte, error) { - b := make([]byte, len(secret)*2, len(secret)*2) - for i, r := range secret { - u := fmt.Sprintf("%04x", r) - c, err := hex.DecodeString(u) - if err != nil { - return []byte{}, errors.New("character could not be encoded") - } - // Swap round the two bytes to make little endian as we put into byte slice - b[2*i] = c[1] - b[2*i+1] = c[0] - } - r := bytes.NewReader(b) - h := md4.New() - _, err := io.Copy(h, r) - if err != nil { - return []byte{}, err - } - return h.Sum(nil), nil -} - -func deriveKeys(key, checksum []byte, usage uint32, export bool) (k1, k2, k3 []byte) { - //if export { - // L40 := make([]byte, 14, 14) - // copy(L40, []byte(`fortybits`)) - // k1 = HMAC(key, L40) - //} else { - // tb := MessageTypeBytes(usage) - // k1 = HMAC(key, tb) - //} - //k2 = k1[:16] - //if export { - // mask := []byte{0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB} - // copy(k1[7:16], mask) - //} - //k3 = HMAC(k1, checksum) - //return - k1 = key - k2 = HMAC(k1, UsageToMSMsgType(usage)) - k3 = HMAC(k2, checksum) - return -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/msgtype.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/msgtype.go deleted file mode 100644 index 068588d3..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc4757/msgtype.go +++ /dev/null @@ -1,20 +0,0 @@ -package rfc4757 - -import "encoding/binary" - -// UsageToMSMsgType converts Kerberos key usage numbers to Microsoft message type encoded as a little-endian four byte slice. -func UsageToMSMsgType(usage uint32) []byte { - // Translate usage numbers to the Microsoft T numbers - switch usage { - case 3: - usage = 8 - case 9: - usage = 8 - case 23: - usage = 13 - } - // Now convert to bytes - tb := make([]byte, 4) // We force an int32 input so we can't go over 4 bytes - binary.PutUvarint(tb, uint64(usage)) - return tb -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/encryption.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/encryption.go deleted file mode 100644 index caa6098e..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/encryption.go +++ /dev/null @@ -1,128 +0,0 @@ -// Package rfc8009 provides encryption and checksum methods as specified in RFC 8009 -package rfc8009 - -import ( - "crypto/aes" - "crypto/hmac" - "crypto/rand" - "errors" - "fmt" - - "gopkg.in/jcmturner/aescts.v1" - "gopkg.in/jcmturner/gokrb5.v5/crypto/common" - "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" - "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" -) - -// EncryptData encrypts the data provided using methods specific to the etype provided as defined in RFC 8009. -func EncryptData(key, data []byte, e etype.EType) ([]byte, []byte, error) { - kl := e.GetKeyByteSize() - if e.GetETypeID() == etypeID.AES256_CTS_HMAC_SHA384_192 { - kl = 32 - } - if len(key) != kl { - return []byte{}, []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", e.GetKeyByteSize(), len(key)) - } - ivz := make([]byte, aes.BlockSize) - return aescts.Encrypt(key, ivz, data) -} - -// EncryptMessage encrypts the message provided using the methods specific to the etype provided as defined in RFC 8009. -// The encrypted data is concatenated with its integrity hash to create an encrypted message. -func EncryptMessage(key, message []byte, usage uint32, e etype.EType) ([]byte, []byte, error) { - kl := e.GetKeyByteSize() - if e.GetETypeID() == etypeID.AES256_CTS_HMAC_SHA384_192 { - kl = 32 - } - if len(key) != kl { - return []byte{}, []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", kl, len(key)) - } - if len(key) != e.GetKeyByteSize() { - } - //confounder - c := make([]byte, e.GetConfounderByteSize()) - _, err := rand.Read(c) - if err != nil { - return []byte{}, []byte{}, fmt.Errorf("could not generate random confounder: %v", err) - } - plainBytes := append(c, message...) - - // Derive key for encryption from usage - var k []byte - if usage != 0 { - k, err = e.DeriveKey(key, common.GetUsageKe(usage)) - if err != nil { - return []byte{}, []byte{}, fmt.Errorf("error deriving key for encryption: %v", err) - } - } - - // Encrypt the data - iv, b, err := e.EncryptData(k, plainBytes) - if err != nil { - return iv, b, fmt.Errorf("error encrypting data: %v", err) - } - - ivz := make([]byte, e.GetConfounderByteSize()) - ih, err := GetIntegityHash(ivz, b, key, usage, e) - if err != nil { - return iv, b, fmt.Errorf("error encrypting data: %v", err) - } - b = append(b, ih...) - return iv, b, nil -} - -// DecryptData decrypts the data provided using the methods specific to the etype provided as defined in RFC 8009. -func DecryptData(key, data []byte, e etype.EType) ([]byte, error) { - kl := e.GetKeyByteSize() - if e.GetETypeID() == etypeID.AES256_CTS_HMAC_SHA384_192 { - kl = 32 - } - if len(key) != kl { - return []byte{}, fmt.Errorf("incorrect keysize: expected: %v actual: %v", kl, len(key)) - } - ivz := make([]byte, aes.BlockSize) - return aescts.Decrypt(key, ivz, data) -} - -// DecryptMessage decrypts the message provided using the methods specific to the etype provided as defined in RFC 8009. -// The integrity of the message is also verified. -func DecryptMessage(key, ciphertext []byte, usage uint32, e etype.EType) ([]byte, error) { - //Derive the key - k, err := e.DeriveKey(key, common.GetUsageKe(usage)) - if err != nil { - return nil, fmt.Errorf("error deriving key: %v", err) - } - // Strip off the checksum from the end - b, err := e.DecryptData(k, ciphertext[:len(ciphertext)-e.GetHMACBitLength()/8]) - if err != nil { - return nil, err - } - //Verify checksum - if !e.VerifyIntegrity(key, ciphertext, b, usage) { - return nil, errors.New("integrity verification failed") - } - //Remove the confounder bytes - return b[e.GetConfounderByteSize():], nil -} - -// GetIntegityHash returns a keyed integrity hash of the bytes provided as defined in RFC 8009 -func GetIntegityHash(iv, c, key []byte, usage uint32, e etype.EType) ([]byte, error) { - // Generate and append integrity hash - // The HMAC is calculated over the cipher state concatenated with the - // AES output, instead of being calculated over the confounder and - // plaintext. This allows the message receiver to verify the - // integrity of the message before decrypting the message. - // H = HMAC(Ki, IV | C) - ib := append(iv, c...) - return common.GetIntegrityHash(ib, key, usage, e) -} - -// VerifyIntegrity verifies the integrity of cipertext bytes ct. -func VerifyIntegrity(key, ct []byte, usage uint32, etype etype.EType) bool { - h := make([]byte, etype.GetHMACBitLength()/8) - copy(h, ct[len(ct)-etype.GetHMACBitLength()/8:]) - ivz := make([]byte, etype.GetConfounderByteSize()) - ib := append(ivz, ct[:len(ct)-(etype.GetHMACBitLength()/8)]...) - expectedMAC, _ := common.GetIntegrityHash(ib, key, usage, etype) - return hmac.Equal(h, expectedMAC) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/keyDerivation.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/keyDerivation.go deleted file mode 100644 index 74cb903b..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/crypto/rfc8009/keyDerivation.go +++ /dev/null @@ -1,144 +0,0 @@ -package rfc8009 - -import ( - "crypto/hmac" - "encoding/binary" - "encoding/hex" - "errors" - - "golang.org/x/crypto/pbkdf2" - "gopkg.in/jcmturner/gokrb5.v5/crypto/etype" - "gopkg.in/jcmturner/gokrb5.v5/iana/etypeID" -) - -const ( - s2kParamsZero = 32768 -) - -// DeriveRandom for key derivation as defined in RFC 8009 -func DeriveRandom(protocolKey, usage []byte, e etype.EType) ([]byte, error) { - h := e.GetHashFunc()() - return KDF_HMAC_SHA2(protocolKey, []byte("prf"), usage, h.Size(), e), nil -} - -// DeriveKey derives a key from the protocol key based on the usage and the etype's specific methods. -// -// https://tools.ietf.org/html/rfc8009#section-5 -// -// If the enctype is aes128-cts-hmac-sha256-128: -// Kc = KDF-HMAC-SHA2(base-key, usage | 0x99, 128) -// Ke = KDF-HMAC-SHA2(base-key, usage | 0xAA, 128) -// Ki = KDF-HMAC-SHA2(base-key, usage | 0x55, 128) -// -// If the enctype is aes256-cts-hmac-sha384-192: -// Kc = KDF-HMAC-SHA2(base-key, usage | 0x99, 192) -// Ke = KDF-HMAC-SHA2(base-key, usage | 0xAA, 256) -// Ki = KDF-HMAC-SHA2(base-key, usage | 0x55, 192) -func DeriveKey(protocolKey, label []byte, e etype.EType) []byte { - var context []byte - var kl int - // Key length is longer for aes256-cts-hmac-sha384-192 is it is a Ke or from StringToKey (where label is "kerberos") - if e.GetETypeID() == etypeID.AES256_CTS_HMAC_SHA384_192 { - switch label[len(label)-1] { - case 0x73: - // 0x73 is "s" so label could be kerberos meaning StringToKey so now check if the label is "kerberos" - kerblabel := []byte("kerberos") - if len(label) != len(kerblabel) { - break - } - for i, b := range label { - if b != kerblabel[i] { - kl = e.GetKeySeedBitLength() - break - } - } - if kl == 0 { - // This is StringToKey - kl = 256 - } - case 0xAA: - // This is a Ke - kl = 256 - } - } - if kl == 0 { - kl = e.GetKeySeedBitLength() - } - return e.RandomToKey(KDF_HMAC_SHA2(protocolKey, label, context, kl, e)) -} - -// RandomToKey returns a key from the bytes provided according to the definition in RFC 8009. -func RandomToKey(b []byte) []byte { - return b -} - -// StringToKey returns a key derived from the string provided according to the definition in RFC 8009. -func StringToKey(secret, salt, s2kparams string, e etype.EType) ([]byte, error) { - i, err := S2KparamsToItertions(s2kparams) - if err != nil { - return nil, err - } - return StringToKeyIter(secret, salt, int(i), e) -} - -// StringToKeyIter returns a key derived from the string provided according to the definition in RFC 8009. -func StringToKeyIter(secret, salt string, iterations int, e etype.EType) ([]byte, error) { - tkey := e.RandomToKey(StringToPBKDF2(secret, salt, iterations, e)) - return e.DeriveKey(tkey, []byte("kerberos")) -} - -// StringToPBKDF2 generates an encryption key from a pass phrase and salt string using the PBKDF2 function from PKCS #5 v2.0 -func StringToPBKDF2(secret, salt string, iterations int, e etype.EType) []byte { - kl := e.GetKeyByteSize() - if e.GetETypeID() == etypeID.AES256_CTS_HMAC_SHA384_192 { - kl = 32 - } - return pbkdf2.Key([]byte(secret), []byte(salt), iterations, kl, e.GetHashFunc()) -} - -// KDF_HMAC_SHA2 key derivation: https://tools.ietf.org/html/rfc8009#section-3 -func KDF_HMAC_SHA2(protocolKey, label, context []byte, kl int, e etype.EType) []byte { - //k: Length in bits of the key to be outputted, expressed in big-endian binary representation in 4 bytes. - k := make([]byte, 4, 4) - binary.BigEndian.PutUint32(k, uint32(kl)) - - c := make([]byte, 4, 4) - binary.BigEndian.PutUint32(c, uint32(1)) - c = append(c, label...) - c = append(c, byte(uint8(0))) - if len(context) > 0 { - c = append(c, context...) - } - c = append(c, k...) - - mac := hmac.New(e.GetHashFunc(), protocolKey) - mac.Write(c) - return mac.Sum(nil)[:(kl / 8)] -} - -// GetSaltP returns the salt value based on the etype name: https://tools.ietf.org/html/rfc8009#section-4 -func GetSaltP(salt, ename string) string { - b := []byte(ename) - b = append(b, byte(uint8(0))) - b = append(b, []byte(salt)...) - return string(b) -} - -// S2KparamsToItertions converts the string representation of iterations to an integer for RFC 8009. -func S2KparamsToItertions(s2kparams string) (int, error) { - var i uint32 - if len(s2kparams) != 8 { - return s2kParamsZero, errors.New("Invalid s2kparams length") - } - b, err := hex.DecodeString(s2kparams) - if err != nil { - return s2kParamsZero, errors.New("Invalid s2kparams, cannot decode string to bytes") - } - i = binary.BigEndian.Uint32(b) - //buf := bytes.NewBuffer(b) - //err = binary.Read(buf, binary.BigEndian, &i) - if err != nil { - return s2kParamsZero, errors.New("Invalid s2kparams, cannot convert to big endian int32") - } - return int(i), nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/ContextFlags.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/ContextFlags.go deleted file mode 100644 index d5b26948..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/ContextFlags.go +++ /dev/null @@ -1,36 +0,0 @@ -package gssapi - -import "github.com/jcmturner/gofork/encoding/asn1" - -/* -ContextFlags ::= BIT STRING { - delegFlag (0), - mutualFlag (1), - replayFlag (2), - sequenceFlag (3), - anonFlag (4), - confFlag (5), - integFlag (6) -} (SIZE (32)) -*/ - -const ( - delegFlag = 0 - mutualFlag = 1 - replayFlag = 2 - sequenceFlag = 3 - anonFlag = 4 - confFlag = 5 - integFlag = 6 -) - -// ContextFlags flags for GSSAPI -type ContextFlags asn1.BitString - -// NewContextFlags creates a new ContextFlags instance. -func NewContextFlags() ContextFlags { - var c ContextFlags - c.BitLength = 32 - c.Bytes = make([]byte, 4) - return c -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/MechType.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/MechType.go deleted file mode 100644 index 587cdccd..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/MechType.go +++ /dev/null @@ -1,9 +0,0 @@ -package gssapi - -import "github.com/jcmturner/gofork/encoding/asn1" - -// MechTypeOIDKRB5 is the MechType OID for Kerberos 5 -var MechTypeOIDKRB5 = asn1.ObjectIdentifier{1, 2, 840, 113554, 1, 2, 2} - -// MechTypeOIDMSLegacyKRB5 is the MechType OID for MS legacy Kerberos 5 -var MechTypeOIDMSLegacyKRB5 = asn1.ObjectIdentifier{1, 2, 840, 48018, 1, 2, 2} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/NegotiationToken.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/NegotiationToken.go deleted file mode 100644 index f603c47f..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/NegotiationToken.go +++ /dev/null @@ -1,149 +0,0 @@ -package gssapi - -import ( - "errors" - "fmt" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/credentials" - "gopkg.in/jcmturner/gokrb5.v5/messages" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -/* -https://msdn.microsoft.com/en-us/library/ms995330.aspx - -NegotiationToken ::= CHOICE { - negTokenInit [0] NegTokenInit, This is the Negotiation token sent from the client to the server. - negTokenResp [1] NegTokenResp -} - -NegTokenInit ::= SEQUENCE { - mechTypes [0] MechTypeList, - reqFlags [1] ContextFlags OPTIONAL, - -- inherited from RFC 2478 for backward compatibility, - -- RECOMMENDED to be left out - mechToken [2] OCTET STRING OPTIONAL, - mechListMIC [3] OCTET STRING OPTIONAL, - ... -} - -NegTokenResp ::= SEQUENCE { - negState [0] ENUMERATED { - accept-completed (0), - accept-incomplete (1), - reject (2), - request-mic (3) - } OPTIONAL, - -- REQUIRED in the first reply from the target - supportedMech [1] MechType OPTIONAL, - -- present only in the first reply from the target - responseToken [2] OCTET STRING OPTIONAL, - mechListMIC [3] OCTET STRING OPTIONAL, - ... -} -*/ - -// NegTokenInit implements Negotiation Token of type Init -type NegTokenInit struct { - MechTypes []asn1.ObjectIdentifier `asn1:"explicit,tag:0"` - ReqFlags ContextFlags `asn1:"explicit,optional,tag:1"` - MechToken []byte `asn1:"explicit,optional,tag:2"` - MechTokenMIC []byte `asn1:"explicit,optional,tag:3"` -} - -// NegTokenResp implements Negotiation Token of type Resp/Targ -type NegTokenResp struct { - NegState asn1.Enumerated `asn1:"explicit,tag:0"` - SupportedMech asn1.ObjectIdentifier `asn1:"explicit,optional,tag:1"` - ResponseToken []byte `asn1:"explicit,optional,tag:2"` - MechListMIC []byte `asn1:"explicit,optional,tag:3"` -} - -// NegTokenTarg implements Negotiation Token of type Resp/Targ -type NegTokenTarg NegTokenResp - -// UnmarshalNegToken umarshals and returns either a NegTokenInit or a NegTokenResp. -// -// The boolean indicates if the response is a NegTokenInit. -// If error is nil and the boolean is false the response is a NegTokenResp. -func UnmarshalNegToken(b []byte) (bool, interface{}, error) { - var a asn1.RawValue - _, err := asn1.Unmarshal(b, &a) - if err != nil { - return false, nil, fmt.Errorf("error unmarshalling NegotiationToken: %v", err) - } - switch a.Tag { - case 0: - var negToken NegTokenInit - _, err = asn1.Unmarshal(a.Bytes, &negToken) - if err != nil { - return false, nil, fmt.Errorf("error unmarshalling NegotiationToken type %d (Init): %v", a.Tag, err) - } - return true, negToken, nil - case 1: - var negToken NegTokenResp - _, err = asn1.Unmarshal(a.Bytes, &negToken) - if err != nil { - return false, nil, fmt.Errorf("error unmarshalling NegotiationToken type %d (Resp/Targ): %v", a.Tag, err) - } - return false, negToken, nil - default: - return false, nil, errors.New("unknown choice type for NegotiationToken") - } - -} - -// Marshal an Init negotiation token -func (n *NegTokenInit) Marshal() ([]byte, error) { - b, err := asn1.Marshal(*n) - if err != nil { - return nil, err - } - nt := asn1.RawValue{ - Tag: 0, - Class: 2, - IsCompound: true, - Bytes: b, - } - nb, err := asn1.Marshal(nt) - if err != nil { - return nil, err - } - return nb, nil -} - -// Marshal a Resp/Targ negotiation token -func (n *NegTokenResp) Marshal() ([]byte, error) { - b, err := asn1.Marshal(*n) - if err != nil { - return nil, err - } - nt := asn1.RawValue{ - Tag: 1, - Class: 2, - IsCompound: true, - Bytes: b, - } - nb, err := asn1.Marshal(nt) - if err != nil { - return nil, err - } - return nb, nil -} - -// NewNegTokenInitKrb5 creates new Init negotiation token for Kerberos 5 -func NewNegTokenInitKrb5(creds credentials.Credentials, tkt messages.Ticket, sessionKey types.EncryptionKey) (NegTokenInit, error) { - mt, err := NewAPREQMechToken(creds, tkt, sessionKey, []int{GSS_C_INTEG_FLAG, GSS_C_CONF_FLAG}, []int{}) - if err != nil { - return NegTokenInit{}, fmt.Errorf("error getting MechToken; %v", err) - } - mtb, err := mt.Marshal() - if err != nil { - return NegTokenInit{}, fmt.Errorf("error marshalling MechToken; %v", err) - } - return NegTokenInit{ - MechTypes: []asn1.ObjectIdentifier{MechTypeOIDKRB5}, - MechToken: mtb, - }, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/WrapToken.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/WrapToken.go deleted file mode 100644 index 10d6c37c..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/WrapToken.go +++ /dev/null @@ -1,234 +0,0 @@ -package gssapi - -import ( - "bytes" - "encoding/binary" - "encoding/hex" - "errors" - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -/* -From RFC 4121, section 4.2.6.2: - - Use of the GSS_Wrap() call yields a token (referred as the Wrap token - in this document), which consists of a descriptive header, followed - by a body portion that contains either the input user data in - plaintext concatenated with the checksum, or the input user data - encrypted. The GSS_Wrap() token SHALL have the following format: - - Octet no Name Description - -------------------------------------------------------------- - 0..1 TOK_ID Identification field. Tokens emitted by - GSS_Wrap() contain the hex value 05 04 - expressed in big-endian order in this - field. - 2 Flags Attributes field, as described in section - 4.2.2. - 3 Filler Contains the hex value FF. - 4..5 EC Contains the "extra count" field, in big- - endian order as described in section 4.2.3. - 6..7 RRC Contains the "right rotation count" in big- - endian order, as described in section - 4.2.5. - 8..15 SndSeqNum Sequence number field in clear text, - expressed in big-endian order. - 16..last Data Encrypted data for Wrap tokens with - confidentiality, or plaintext data followed - by the checksum for Wrap tokens without - confidentiality, as described in section - 4.2.4. - -Quick notes: - - "EC" or "Extra Count" refers to the length of the cheksum. - - "Flags" (complete details in section 4.2.2) is a set of bits: - - if bit 0 is set, it means the token was sent by the acceptor (generally the kerberized service). - - bit 1 indicates that the token's payload is encrypted - - bit 2 indicates if the message is protected using a subkey defined by the acceptor. - - When computing checksums, EC and RRC MUST be set to 0. - - Wrap Tokens are not ASN.1 encoded. -*/ -const ( - HdrLen = 16 // Length of the Wrap Token's header - FillerByte byte = 0xFF -) - -// WrapToken represents a GSS API Wrap token, as defined in RFC 4121. -// It contains the header fields, the payload and the checksum, and provides -// the logic for converting to/from bytes plus computing and verifying checksums -type WrapToken struct { - // const GSS Token ID: 0x0504 - Flags byte // contains three flags: acceptor, sealed, acceptor subkey - // const Filler: 0xFF - EC uint16 // checksum length. big-endian - RRC uint16 // right rotation count. big-endian - SndSeqNum uint64 // sender's sequence number. big-endian - Payload []byte // your data! :) - CheckSum []byte // authenticated checksum of { payload | header } -} - -// Return the 2 bytes identifying a GSS API Wrap token -func getGssWrapTokenId() *[2]byte { - return &[2]byte{0x05, 0x04} -} - -// Marshal the WrapToken into a byte slice. -// The payload should have been set and the checksum computed, otherwise an error is returned. -func (wt *WrapToken) Marshal() ([]byte, error) { - if wt.CheckSum == nil { - return nil, errors.New("checksum has not been set") - } - if wt.Payload == nil { - return nil, errors.New("payload has not been set") - } - - pldOffset := HdrLen // Offset of the payload in the token - chkSOffset := HdrLen + len(wt.Payload) // Offset of the checksum in the token - - bytes := make([]byte, chkSOffset+int(wt.EC)) - copy(bytes[0:], getGssWrapTokenId()[:]) - bytes[2] = wt.Flags - bytes[3] = FillerByte - binary.BigEndian.PutUint16(bytes[4:6], wt.EC) - binary.BigEndian.PutUint16(bytes[6:8], wt.RRC) - binary.BigEndian.PutUint64(bytes[8:16], wt.SndSeqNum) - copy(bytes[pldOffset:], wt.Payload) - copy(bytes[chkSOffset:], wt.CheckSum) - return bytes, nil -} - -// ComputeAndSetCheckSum uses the passed encryption key and key usage to compute the checksum over the payload and -// the header, and sets the CheckSum field of this WrapToken. -// If the payload has not been set or the checksum has already been set, an error is returned. -func (wt *WrapToken) ComputeAndSetCheckSum(key types.EncryptionKey, keyUsage uint32) error { - if wt.Payload == nil { - return errors.New("payload has not been set") - } - if wt.CheckSum != nil { - return errors.New("checksum has already been computed") - } - chkSum, cErr := wt.ComputeCheckSum(key, keyUsage) - if cErr != nil { - return cErr - } - wt.CheckSum = chkSum - return nil -} - -// ComputeCheckSum computes and returns the checksum of this token, computed using the passed key and key usage. -// Conforms to RFC 4121 in that the checksum will be computed over { body | header }, -// with the EC and RRC flags zeroed out. -// In the context of Kerberos Wrap tokens, mostly keyusage GSSAPI_ACCEPTOR_SEAL (=22) -// and GSSAPI_INITIATOR_SEAL (=24) will be used. -// Note: This will NOT update the struct's Checksum field. -func (wt *WrapToken) ComputeCheckSum(key types.EncryptionKey, keyUsage uint32) ([]byte, error) { - if wt.Payload == nil { - return nil, errors.New("cannot compute checksum with uninitialized payload") - } - // Build a slice containing { payload | header } - checksumMe := make([]byte, HdrLen+len(wt.Payload)) - copy(checksumMe[0:], wt.Payload) - copy(checksumMe[len(wt.Payload):], getChecksumHeader(wt.Flags, wt.SndSeqNum)) - - encType, err := crypto.GetEtype(key.KeyType) - if err != nil { - return nil, err - } - return encType.GetChecksumHash(key.KeyValue, checksumMe, keyUsage) -} - -// Build a header suitable for a checksum computation -func getChecksumHeader(flags byte, senderSeqNum uint64) []byte { - header := make([]byte, 16) - copy(header[0:], []byte{0x05, 0x04, flags, 0xFF, 0x00, 0x00, 0x00, 0x00}) - binary.BigEndian.PutUint64(header[8:], senderSeqNum) - return header -} - -// VerifyCheckSum computes the token's checksum with the provided key and usage, -// and compares it to the checksum present in the token. -// In case of any failure, (false, Err) is returned, with Err an explanatory error. -func (wt *WrapToken) VerifyCheckSum(key types.EncryptionKey, keyUsage uint32) (bool, error) { - computed, cErr := wt.ComputeCheckSum(key, keyUsage) - if cErr != nil { - return false, cErr - } - if !bytes.Equal(computed, wt.CheckSum) { - return false, fmt.Errorf( - "checksum mismatch. Computed: %s, Contained in token: %s", - hex.EncodeToString(computed), hex.EncodeToString(wt.CheckSum)) - } - return true, nil -} - -// Unmarshal bytes into the corresponding WrapToken. -// If expectFromAcceptor is true, we expect the token to have been emitted by the gss acceptor, -// and will check the according flag, returning an error if the token does not match the expectation. -func (wt *WrapToken) Unmarshal(b []byte, expectFromAcceptor bool) error { - // Check if we can read a whole header - if len(b) < 16 { - return errors.New("bytes shorter than header length") - } - // Is the Token ID correct? - if !bytes.Equal(getGssWrapTokenId()[:], b[0:2]) { - return fmt.Errorf("wrong Token ID. Expected %s, was %s", - hex.EncodeToString(getGssWrapTokenId()[:]), - hex.EncodeToString(b[0:2])) - } - // Check the acceptor flag - flags := b[2] - isFromAcceptor := flags&0x01 == 1 - if isFromAcceptor && !expectFromAcceptor { - return errors.New("unexpected acceptor flag is set: not expecting a token from the acceptor") - } - if !isFromAcceptor && expectFromAcceptor { - return errors.New("expected acceptor flag is not set: expecting a token from the acceptor, not the initiator") - } - // Check the filler byte - if b[3] != FillerByte { - return fmt.Errorf("unexpected filler byte: expecting 0xFF, was %s ", hex.EncodeToString(b[3:4])) - } - checksumL := binary.BigEndian.Uint16(b[4:6]) - // Sanity check on the checksum length - if int(checksumL) > len(b)-HdrLen { - return fmt.Errorf("inconsistent checksum length: %d bytes to parse, checksum length is %d", len(b), checksumL) - } - - wt.Flags = flags - wt.EC = checksumL - wt.RRC = binary.BigEndian.Uint16(b[6:8]) - wt.SndSeqNum = binary.BigEndian.Uint64(b[8:16]) - wt.Payload = b[16 : len(b)-int(checksumL)] - wt.CheckSum = b[len(b)-int(checksumL):] - return nil -} - -// NewInitiatorToken builds a new initiator token (acceptor flag will be set to 0) and computes the authenticated checksum. -// Other flags are set to 0, and the RRC and sequence number are initialized to 0. -// Note that in certain circumstances you may need to provide a sequence number that has been defined earlier. -// This is currently not supported. -func NewInitiatorToken(payload []byte, key types.EncryptionKey) (*WrapToken, error) { - encType, err := crypto.GetEtype(key.KeyType) - if err != nil { - return nil, err - } - - token := WrapToken{ - Flags: 0x00, // all zeroed out (this is a token sent by the initiator) - // Checksum size: lenth of output of the HMAC function, in bytes. - EC: uint16(encType.GetHMACBitLength() / 8), - RRC: 0, - SndSeqNum: 0, - Payload: payload, - } - - if err := token.ComputeAndSetCheckSum(key, keyusage.GSSAPI_INITIATOR_SEAL); err != nil { - return nil, err - } - - return &token, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/gssapi.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/gssapi.go deleted file mode 100644 index 137f42e7..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/gssapi.go +++ /dev/null @@ -1,102 +0,0 @@ -// Package gssapi implements Generic Security Services Application Program Interface required for SPNEGO kerberos authentication. -package gssapi - -import ( - "errors" - "fmt" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/asn1tools" - "gopkg.in/jcmturner/gokrb5.v5/credentials" - "gopkg.in/jcmturner/gokrb5.v5/messages" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// SPNEGO_OID is the OID for SPNEGO header type. -var SPNEGO_OID = asn1.ObjectIdentifier{1, 3, 6, 1, 5, 5, 2} - -// SPNEGO header struct -type SPNEGO struct { - Init bool - Resp bool - NegTokenInit NegTokenInit - NegTokenResp NegTokenResp -} - -// Unmarshal SPNEGO negotiation token -func (s *SPNEGO) Unmarshal(b []byte) error { - var r []byte - var err error - if b[0] != byte(161) { - // Not a NegTokenResp/Targ could be a NegTokenInit - var oid asn1.ObjectIdentifier - r, err = asn1.UnmarshalWithParams(b, &oid, fmt.Sprintf("application,explicit,tag:%v", 0)) - if err != nil { - return fmt.Errorf("not a valid SPNEGO token: %v", err) - } - // Check the OID is the SPNEGO OID value - if !oid.Equal(SPNEGO_OID) { - return fmt.Errorf("OID %s does not match SPNEGO OID %s", oid.String(), SPNEGO_OID.String()) - } - } else { - // Could be a NegTokenResp/Targ - r = b - } - - var a asn1.RawValue - _, err = asn1.Unmarshal(r, &a) - if err != nil { - return fmt.Errorf("error unmarshalling SPNEGO: %v", err) - } - switch a.Tag { - case 0: - _, err = asn1.Unmarshal(a.Bytes, &s.NegTokenInit) - if err != nil { - return fmt.Errorf("error unmarshalling NegotiationToken type %d (Init): %v", a.Tag, err) - } - s.Init = true - case 1: - _, err = asn1.Unmarshal(a.Bytes, &s.NegTokenResp) - if err != nil { - return fmt.Errorf("error unmarshalling NegotiationToken type %d (Resp/Targ): %v", a.Tag, err) - } - s.Resp = true - default: - return errors.New("unknown choice type for NegotiationToken") - } - return nil -} - -// Marshal SPNEGO negotiation token -func (s *SPNEGO) Marshal() ([]byte, error) { - var b []byte - if s.Init { - hb, _ := asn1.Marshal(SPNEGO_OID) - tb, err := s.NegTokenInit.Marshal() - if err != nil { - return b, fmt.Errorf("could not marshal NegTokenInit: %v", err) - } - b = append(hb, tb...) - return asn1tools.AddASNAppTag(b, 0), nil - } - if s.Resp { - b, err := s.NegTokenResp.Marshal() - if err != nil { - return b, fmt.Errorf("could not marshal NegTokenResp: %v", err) - } - return b, nil - } - return b, errors.New("SPNEGO cannot be marshalled. It contains neither a NegTokenInit or NegTokenResp") -} - -// GetSPNEGOKrbNegTokenInit returns an SPNEGO struct containing a NegTokenInit. -func GetSPNEGOKrbNegTokenInit(creds credentials.Credentials, tkt messages.Ticket, sessionKey types.EncryptionKey) (SPNEGO, error) { - negTokenInit, err := NewNegTokenInitKrb5(creds, tkt, sessionKey) - if err != nil { - return SPNEGO{}, fmt.Errorf("could not create NegTokenInit: %v", err) - } - return SPNEGO{ - Init: true, - NegTokenInit: negTokenInit, - }, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/krb5Token.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/krb5Token.go deleted file mode 100644 index d5cb61bb..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/gssapi/krb5Token.go +++ /dev/null @@ -1,202 +0,0 @@ -package gssapi - -import ( - "encoding/binary" - "encoding/hex" - "errors" - "fmt" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/asn1tools" - "gopkg.in/jcmturner/gokrb5.v5/credentials" - "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/messages" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// GSSAPI MechToken IDs and flags. -const ( - TOK_ID_KRB_AP_REQ = "0100" - TOK_ID_KRB_AP_REP = "0200" - TOK_ID_KRB_ERROR = "0300" - - GSS_C_DELEG_FLAG = 1 - GSS_C_MUTUAL_FLAG = 2 - GSS_C_REPLAY_FLAG = 4 - GSS_C_SEQUENCE_FLAG = 8 - GSS_C_CONF_FLAG = 16 - GSS_C_INTEG_FLAG = 32 -) - -// MechToken implementation for GSSAPI. -type MechToken struct { - OID asn1.ObjectIdentifier - TokID []byte - APReq messages.APReq - APRep messages.APRep - KRBError messages.KRBError -} - -// Marshal a MechToken into a slice of bytes. -func (m *MechToken) Marshal() ([]byte, error) { - // Create the header - b, _ := asn1.Marshal(m.OID) - b = append(b, m.TokID...) - var tb []byte - var err error - switch hex.EncodeToString(m.TokID) { - case TOK_ID_KRB_AP_REQ: - tb, err = m.APReq.Marshal() - if err != nil { - return []byte{}, fmt.Errorf("error marshalling AP_REQ for MechToken: %v", err) - } - case TOK_ID_KRB_AP_REP: - return []byte{}, errors.New("marshal of AP_REP GSSAPI MechToken not supported by gokrb5") - case TOK_ID_KRB_ERROR: - return []byte{}, errors.New("marshal of KRB_ERROR GSSAPI MechToken not supported by gokrb5") - } - if err != nil { - return []byte{}, fmt.Errorf("error mashalling kerberos message within mech token: %v", err) - } - b = append(b, tb...) - return asn1tools.AddASNAppTag(b, 0), nil -} - -// Unmarshal a MechToken. -func (m *MechToken) Unmarshal(b []byte) error { - var oid asn1.ObjectIdentifier - r, err := asn1.UnmarshalWithParams(b, &oid, fmt.Sprintf("application,explicit,tag:%v", 0)) - if err != nil { - return fmt.Errorf("error unmarshalling MechToken OID: %v", err) - } - m.OID = oid - m.TokID = r[0:2] - switch hex.EncodeToString(m.TokID) { - case TOK_ID_KRB_AP_REQ: - var a messages.APReq - err = a.Unmarshal(r[2:]) - if err != nil { - return fmt.Errorf("error unmarshalling MechToken AP_REQ: %v", err) - } - m.APReq = a - case TOK_ID_KRB_AP_REP: - var a messages.APRep - err = a.Unmarshal(r[2:]) - if err != nil { - return fmt.Errorf("error unmarshalling MechToken AP_REP: %v", err) - } - m.APRep = a - case TOK_ID_KRB_ERROR: - var a messages.KRBError - err = a.Unmarshal(r[2:]) - if err != nil { - return fmt.Errorf("error unmarshalling MechToken KRBError: %v", err) - } - m.KRBError = a - } - return nil -} - -// IsAPReq tests if the MechToken contains an AP_REQ. -func (m *MechToken) IsAPReq() bool { - if hex.EncodeToString(m.TokID) == TOK_ID_KRB_AP_REQ { - return true - } - return false -} - -// IsAPRep tests if the MechToken contains an AP_REP. -func (m *MechToken) IsAPRep() bool { - if hex.EncodeToString(m.TokID) == TOK_ID_KRB_AP_REP { - return true - } - return false -} - -// IsKRBError tests if the MechToken contains an KRB_ERROR. -func (m *MechToken) IsKRBError() bool { - if hex.EncodeToString(m.TokID) == TOK_ID_KRB_ERROR { - return true - } - return false -} - -// NewAPREQMechToken creates new Kerberos AP_REQ MechToken. -func NewAPREQMechToken(creds credentials.Credentials, tkt messages.Ticket, sessionKey types.EncryptionKey, GSSAPIFlags []int, APOptions []int) (MechToken, error) { - var m MechToken - m.OID = MechTypeOIDKRB5 - tb, _ := hex.DecodeString(TOK_ID_KRB_AP_REQ) - m.TokID = tb - - auth, err := NewAuthenticator(creds, GSSAPIFlags) - if err != nil { - return m, err - } - APReq, err := messages.NewAPReq( - tkt, - sessionKey, - auth, - ) - if err != nil { - return m, err - } - for _, o := range APOptions { - types.SetFlag(&APReq.APOptions, o) - } - m.APReq = APReq - return m, nil -} - -// NewAuthenticator creates a new kerberos authenticator for kerberos MechToken -func NewAuthenticator(creds credentials.Credentials, flags []int) (types.Authenticator, error) { - //RFC 4121 Section 4.1.1 - auth, err := types.NewAuthenticator(creds.Realm, creds.CName) - if err != nil { - return auth, krberror.Errorf(err, krberror.KRBMsgError, "error generating new authenticator") - } - auth.Cksum = types.Checksum{ - CksumType: chksumtype.GSSAPI, - Checksum: newAuthenticatorChksum(flags), - } - return auth, nil -} - -// Create new authenticator checksum for kerberos MechToken -func newAuthenticatorChksum(flags []int) []byte { - a := make([]byte, 24) - binary.LittleEndian.PutUint32(a[:4], 16) - for _, i := range flags { - if i == GSS_C_DELEG_FLAG { - x := make([]byte, 28-len(a)) - a = append(a, x...) - } - f := binary.LittleEndian.Uint32(a[20:24]) - f |= uint32(i) - binary.LittleEndian.PutUint32(a[20:24], f) - } - return a -} - -/* -The authenticator checksum field SHALL have the following format: - -Octet Name Description ------------------------------------------------------------------ -0..3 Lgth Number of octets in Bnd field; Represented - in little-endian order; Currently contains - hex value 10 00 00 00 (16). -4..19 Bnd Channel binding information, as described in - section 4.1.1.2. -20..23 Flags Four-octet context-establishment flags in - little-endian order as described in section - 4.1.1.1. -24..25 DlgOpt The delegation option identifier (=1) in - little-endian order [optional]. This field - and the next two fields are present if and - only if GSS_C_DELEG_FLAG is set as described - in section 4.1.1.1. -26..27 Dlgth The length of the Deleg field in little-endian order [optional]. -28..(n-1) Deleg A KRB_CRED message (n = Dlgth + 28) [optional]. -n..last Exts Extensions [optional]. -*/ diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/addrtype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/addrtype/constants.go deleted file mode 100644 index 457b89d7..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/addrtype/constants.go +++ /dev/null @@ -1,15 +0,0 @@ -// Package addrtype provides Address type assigned numbers. -package addrtype - -// Address type IDs. -const ( - IPv4 int32 = 2 - Directional int32 = 3 - ChaosNet int32 = 5 - XNS int32 = 6 - ISO int32 = 7 - DECNETPhaseIV int32 = 12 - AppleTalkDDP int32 = 16 - NetBios int32 = 20 - IPv6 int32 = 24 -) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/adtype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/adtype/constants.go deleted file mode 100644 index e805b746..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/adtype/constants.go +++ /dev/null @@ -1,23 +0,0 @@ -// Package adtype provides Authenticator type assigned numbers. -package adtype - -// Authenticator type IDs. -const ( - ADIfRelevant int32 = 1 - ADIntendedForServer int32 = 2 - ADIntendedForApplicationClass int32 = 3 - ADKDCIssued int32 = 4 - ADAndOr int32 = 5 - ADMandatoryTicketExtensions int32 = 6 - ADInTicketExtensions int32 = 7 - ADMandatoryForKDC int32 = 8 - OSFDCE int32 = 64 - SESAME int32 = 65 - ADOSFDCEPKICertID int32 = 66 - ADAuthenticationStrength int32 = 70 - ADFXFastArmor int32 = 71 - ADFXFastUsed int32 = 72 - ADWin2KPAC int32 = 128 - ADEtypeNegotiation int32 = 129 - //Reserved values 9-63 -) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag/constants.go deleted file mode 100644 index d74cd60e..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag/constants.go +++ /dev/null @@ -1,24 +0,0 @@ -// Package asnAppTag provides ASN1 application tag numbers. -package asnAppTag - -// ASN1 application tag numbers. -const ( - Ticket = 1 - Authenticator = 2 - EncTicketPart = 3 - ASREQ = 10 - TGSREQ = 12 - ASREP = 11 - TGSREP = 13 - APREQ = 14 - APREP = 15 - KRBSafe = 20 - KRBPriv = 21 - KRBCred = 22 - EncASRepPart = 25 - EncTGSRepPart = 26 - EncAPRepPart = 27 - EncKrbPrivPart = 28 - EncKrbCredPart = 29 - KRBError = 30 -) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype/constants.go deleted file mode 100644 index 93db952d..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype/constants.go +++ /dev/null @@ -1,32 +0,0 @@ -// Package chksumtype provides Kerberos 5 checksum type assigned numbers. -package chksumtype - -// Checksum type IDs. -const ( - //RESERVED : 0 - CRC32 int32 = 1 - RSA_MD4 int32 = 2 - RSA_MD4_DES int32 = 3 - DES_MAC int32 = 4 - DES_MAC_K int32 = 5 - RSA_MD4_DES_K int32 = 6 - RSA_MD5 int32 = 7 - RSA_MD5_DES int32 = 8 - RSA_MD5_DES3 int32 = 9 - SHA1_ID10 int32 = 10 - //UNASSIGNED : 11 - HMAC_SHA1_DES3_KD int32 = 12 - HMAC_SHA1_DES3 int32 = 13 - SHA1_ID14 int32 = 14 - HMAC_SHA1_96_AES128 int32 = 15 - HMAC_SHA1_96_AES256 int32 = 16 - CMAC_CAMELLIA128 int32 = 17 - CMAC_CAMELLIA256 int32 = 18 - HMAC_SHA256_128_AES128 int32 = 19 - HMAC_SHA384_192_AES256 int32 = 20 - //UNASSIGNED : 21-32770 - GSSAPI int32 = 32771 - //UNASSIGNED : 32772-2147483647 - KERB_CHECKSUM_HMAC_MD5_UNSIGNED uint32 = 4294967158 // 0xFFFFFF76 documentation says this is -138 but in an unsigned int this is 4294967158 - KERB_CHECKSUM_HMAC_MD5 int32 = -138 -) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/constants.go deleted file mode 100644 index 0b8e916d..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/constants.go +++ /dev/null @@ -1,5 +0,0 @@ -// Package iana provides Kerberos 5 assigned numbers. -package iana - -// PVNO is the Protocol Version Number. -const PVNO = 5 diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/errorcode/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/errorcode/constants.go deleted file mode 100644 index fd756bc5..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/errorcode/constants.go +++ /dev/null @@ -1,155 +0,0 @@ -// Package errorcode provides Kerberos 5 assigned error codes. -package errorcode - -import "fmt" - -// Kerberos error codes. -const ( - KDC_ERR_NONE int32 = 0 //No error - KDC_ERR_NAME_EXP int32 = 1 //Client's entry in database has expired - KDC_ERR_SERVICE_EXP int32 = 2 //Server's entry in database has expired - KDC_ERR_BAD_PVNO int32 = 3 //Requested protocol version number not supported - KDC_ERR_C_OLD_MAST_KVNO int32 = 4 //Client's key encrypted in old master key - KDC_ERR_S_OLD_MAST_KVNO int32 = 5 //Server's key encrypted in old master key - KDC_ERR_C_PRINCIPAL_UNKNOWN int32 = 6 //Client not found in Kerberos database - KDC_ERR_S_PRINCIPAL_UNKNOWN int32 = 7 //Server not found in Kerberos database - KDC_ERR_PRINCIPAL_NOT_UNIQUE int32 = 8 //Multiple principal entries in database - KDC_ERR_NULL_KEY int32 = 9 //The client or server has a null key - KDC_ERR_CANNOT_POSTDATE int32 = 10 //Ticket not eligible for postdating - KDC_ERR_NEVER_VALID int32 = 11 //Requested starttime is later than end time - KDC_ERR_POLICY int32 = 12 //KDC policy rejects request - KDC_ERR_BADOPTION int32 = 13 //KDC cannot accommodate requested option - KDC_ERR_ETYPE_NOSUPP int32 = 14 //KDC has no support for encryption type - KDC_ERR_SUMTYPE_NOSUPP int32 = 15 //KDC has no support for checksum type - KDC_ERR_PADATA_TYPE_NOSUPP int32 = 16 //KDC has no support for padata type - KDC_ERR_TRTYPE_NOSUPP int32 = 17 //KDC has no support for transited type - KDC_ERR_CLIENT_REVOKED int32 = 18 //Clients credentials have been revoked - KDC_ERR_SERVICE_REVOKED int32 = 19 //Credentials for server have been revoked - KDC_ERR_TGT_REVOKED int32 = 20 //TGT has been revoked - KDC_ERR_CLIENT_NOTYET int32 = 21 //Client not yet valid; try again later - KDC_ERR_SERVICE_NOTYET int32 = 22 //Server not yet valid; try again later - KDC_ERR_KEY_EXPIRED int32 = 23 //Password has expired; change password to reset - KDC_ERR_PREAUTH_FAILED int32 = 24 //Pre-authentication information was invalid - KDC_ERR_PREAUTH_REQUIRED int32 = 25 //Additional pre-authentication required - KDC_ERR_SERVER_NOMATCH int32 = 26 //Requested server and ticket don't match - KDC_ERR_MUST_USE_USER2USER int32 = 27 //Server principal valid for user2user only - KDC_ERR_PATH_NOT_ACCEPTED int32 = 28 //KDC Policy rejects transited path - KDC_ERR_SVC_UNAVAILABLE int32 = 29 //A service is not available - KRB_AP_ERR_BAD_INTEGRITY int32 = 31 //Integrity check on decrypted field failed - KRB_AP_ERR_TKT_EXPIRED int32 = 32 //Ticket expired - KRB_AP_ERR_TKT_NYV int32 = 33 //Ticket not yet valid - KRB_AP_ERR_REPEAT int32 = 34 //Request is a replay - KRB_AP_ERR_NOT_US int32 = 35 //The ticket isn't for us - KRB_AP_ERR_BADMATCH int32 = 36 //Ticket and authenticator don't match - KRB_AP_ERR_SKEW int32 = 37 //Clock skew too great - KRB_AP_ERR_BADADDR int32 = 38 //Incorrect net address - KRB_AP_ERR_BADVERSION int32 = 39 //Protocol version mismatch - KRB_AP_ERR_MSG_TYPE int32 = 40 //Invalid msg type - KRB_AP_ERR_MODIFIED int32 = 41 //Message stream modified - KRB_AP_ERR_BADORDER int32 = 42 //Message out of order - KRB_AP_ERR_BADKEYVER int32 = 44 //Specified version of key is not available - KRB_AP_ERR_NOKEY int32 = 45 //Service key not available - KRB_AP_ERR_MUT_FAIL int32 = 46 //Mutual authentication failed - KRB_AP_ERR_BADDIRECTION int32 = 47 //Incorrect message direction - KRB_AP_ERR_METHOD int32 = 48 //Alternative authentication method required - KRB_AP_ERR_BADSEQ int32 = 49 //Incorrect sequence number in message - KRB_AP_ERR_INAPP_CKSUM int32 = 50 //Inappropriate type of checksum in message - KRB_AP_PATH_NOT_ACCEPTED int32 = 51 //Policy rejects transited path - KRB_ERR_RESPONSE_TOO_BIG int32 = 52 //Response too big for UDP; retry with TCP - KRB_ERR_GENERIC int32 = 60 //Generic error (description in e-text) - KRB_ERR_FIELD_TOOLONG int32 = 61 //Field is too long for this implementation - KDC_ERROR_CLIENT_NOT_TRUSTED int32 = 62 //Reserved for PKINIT - KDC_ERROR_KDC_NOT_TRUSTED int32 = 63 //Reserved for PKINIT - KDC_ERROR_INVALID_SIG int32 = 64 //Reserved for PKINIT - KDC_ERR_KEY_TOO_WEAK int32 = 65 //Reserved for PKINIT - KDC_ERR_CERTIFICATE_MISMATCH int32 = 66 //Reserved for PKINIT - KRB_AP_ERR_NO_TGT int32 = 67 //No TGT available to validate USER-TO-USER - KDC_ERR_WRONG_REALM int32 = 68 //Reserved for future use - KRB_AP_ERR_USER_TO_USER_REQUIRED int32 = 69 //Ticket must be for USER-TO-USER - KDC_ERR_CANT_VERIFY_CERTIFICATE int32 = 70 //Reserved for PKINIT - KDC_ERR_INVALID_CERTIFICATE int32 = 71 //Reserved for PKINIT - KDC_ERR_REVOKED_CERTIFICATE int32 = 72 //Reserved for PKINIT - KDC_ERR_REVOCATION_STATUS_UNKNOWN int32 = 73 //Reserved for PKINIT - KDC_ERR_REVOCATION_STATUS_UNAVAILABLE int32 = 74 //Reserved for PKINIT - KDC_ERR_CLIENT_NAME_MISMATCH int32 = 75 //Reserved for PKINIT - KDC_ERR_KDC_NAME_MISMATCH int32 = 76 //Reserved for PKINIT -) - -// Lookup an error code description. -func Lookup(i int32) string { - if s, ok := errorcodeLookup[i]; ok { - return fmt.Sprintf("(%d) %s", i, s) - } - return fmt.Sprintf("Unknown ErrorCode %d", i) -} - -var errorcodeLookup = map[int32]string{ - KDC_ERR_NONE: "KDC_ERR_NONE No error", - KDC_ERR_NAME_EXP: "KDC_ERR_NAME_EXP Client's entry in database has expired", - KDC_ERR_SERVICE_EXP: "KDC_ERR_SERVICE_EXP Server's entry in database has expired", - KDC_ERR_BAD_PVNO: "KDC_ERR_BAD_PVNO Requested protocol version number not supported", - KDC_ERR_C_OLD_MAST_KVNO: "KDC_ERR_C_OLD_MAST_KVNO Client's key encrypted in old master key", - KDC_ERR_S_OLD_MAST_KVNO: "KDC_ERR_S_OLD_MAST_KVNO Server's key encrypted in old master key", - KDC_ERR_C_PRINCIPAL_UNKNOWN: "KDC_ERR_C_PRINCIPAL_UNKNOWN Client not found in Kerberos database", - KDC_ERR_S_PRINCIPAL_UNKNOWN: "KDC_ERR_S_PRINCIPAL_UNKNOWN Server not found in Kerberos database", - KDC_ERR_PRINCIPAL_NOT_UNIQUE: "KDC_ERR_PRINCIPAL_NOT_UNIQUE Multiple principal entries in database", - KDC_ERR_NULL_KEY: "KDC_ERR_NULL_KEY The client or server has a null key", - KDC_ERR_CANNOT_POSTDATE: "KDC_ERR_CANNOT_POSTDATE Ticket not eligible for postdating", - KDC_ERR_NEVER_VALID: "KDC_ERR_NEVER_VALID Requested starttime is later than end time", - KDC_ERR_POLICY: "KDC_ERR_POLICY KDC policy rejects request", - KDC_ERR_BADOPTION: "KDC_ERR_BADOPTION KDC cannot accommodate requested option", - KDC_ERR_ETYPE_NOSUPP: "KDC_ERR_ETYPE_NOSUPP KDC has no support for encryption type", - KDC_ERR_SUMTYPE_NOSUPP: "KDC_ERR_SUMTYPE_NOSUPP KDC has no support for checksum type", - KDC_ERR_PADATA_TYPE_NOSUPP: "KDC_ERR_PADATA_TYPE_NOSUPP KDC has no support for padata type", - KDC_ERR_TRTYPE_NOSUPP: "KDC_ERR_TRTYPE_NOSUPP KDC has no support for transited type", - KDC_ERR_CLIENT_REVOKED: "KDC_ERR_CLIENT_REVOKED Clients credentials have been revoked", - KDC_ERR_SERVICE_REVOKED: "KDC_ERR_SERVICE_REVOKED Credentials for server have been revoked", - KDC_ERR_TGT_REVOKED: "KDC_ERR_TGT_REVOKED TGT has been revoked", - KDC_ERR_CLIENT_NOTYET: "KDC_ERR_CLIENT_NOTYET Client not yet valid; try again later", - KDC_ERR_SERVICE_NOTYET: "KDC_ERR_SERVICE_NOTYET Server not yet valid; try again later", - KDC_ERR_KEY_EXPIRED: "KDC_ERR_KEY_EXPIRED Password has expired; change password to reset", - KDC_ERR_PREAUTH_FAILED: "KDC_ERR_PREAUTH_FAILED Pre-authentication information was invalid", - KDC_ERR_PREAUTH_REQUIRED: "KDC_ERR_PREAUTH_REQUIRED Additional pre-authentication required", - KDC_ERR_SERVER_NOMATCH: "KDC_ERR_SERVER_NOMATCH Requested server and ticket don't match", - KDC_ERR_MUST_USE_USER2USER: "KDC_ERR_MUST_USE_USER2USER Server principal valid for user2user only", - KDC_ERR_PATH_NOT_ACCEPTED: "KDC_ERR_PATH_NOT_ACCEPTED KDC Policy rejects transited path", - KDC_ERR_SVC_UNAVAILABLE: "KDC_ERR_SVC_UNAVAILABLE A service is not available", - KRB_AP_ERR_BAD_INTEGRITY: "KRB_AP_ERR_BAD_INTEGRITY Integrity check on decrypted field failed", - KRB_AP_ERR_TKT_EXPIRED: "KRB_AP_ERR_TKT_EXPIRED Ticket expired", - KRB_AP_ERR_TKT_NYV: "KRB_AP_ERR_TKT_NYV Ticket not yet valid", - KRB_AP_ERR_REPEAT: "KRB_AP_ERR_REPEAT Request is a replay", - KRB_AP_ERR_NOT_US: "KRB_AP_ERR_NOT_US The ticket isn't for us", - KRB_AP_ERR_BADMATCH: "KRB_AP_ERR_BADMATCH Ticket and authenticator don't match", - KRB_AP_ERR_SKEW: "KRB_AP_ERR_SKEW Clock skew too great", - KRB_AP_ERR_BADADDR: "KRB_AP_ERR_BADADDR Incorrect net address", - KRB_AP_ERR_BADVERSION: "KRB_AP_ERR_BADVERSION Protocol version mismatch", - KRB_AP_ERR_MSG_TYPE: "KRB_AP_ERR_MSG_TYPE Invalid msg type", - KRB_AP_ERR_MODIFIED: "KRB_AP_ERR_MODIFIED Message stream modified", - KRB_AP_ERR_BADORDER: "KRB_AP_ERR_BADORDER Message out of order", - KRB_AP_ERR_BADKEYVER: "KRB_AP_ERR_BADKEYVER Specified version of key is not available", - KRB_AP_ERR_NOKEY: "KRB_AP_ERR_NOKEY Service key not available", - KRB_AP_ERR_MUT_FAIL: "KRB_AP_ERR_MUT_FAIL Mutual authentication failed", - KRB_AP_ERR_BADDIRECTION: "KRB_AP_ERR_BADDIRECTION Incorrect message direction", - KRB_AP_ERR_METHOD: "KRB_AP_ERR_METHOD Alternative authentication method required", - KRB_AP_ERR_BADSEQ: "KRB_AP_ERR_BADSEQ Incorrect sequence number in message", - KRB_AP_ERR_INAPP_CKSUM: "KRB_AP_ERR_INAPP_CKSUM Inappropriate type of checksum in message", - KRB_AP_PATH_NOT_ACCEPTED: "KRB_AP_PATH_NOT_ACCEPTED Policy rejects transited path", - KRB_ERR_RESPONSE_TOO_BIG: "KRB_ERR_RESPONSE_TOO_BIG Response too big for UDP; retry with TCP", - KRB_ERR_GENERIC: "KRB_ERR_GENERIC Generic error (description in e-text)", - KRB_ERR_FIELD_TOOLONG: "KRB_ERR_FIELD_TOOLONG Field is too long for this implementation", - KDC_ERROR_CLIENT_NOT_TRUSTED: "KDC_ERROR_CLIENT_NOT_TRUSTED Reserved for PKINIT", - KDC_ERROR_KDC_NOT_TRUSTED: "KDC_ERROR_KDC_NOT_TRUSTED Reserved for PKINIT", - KDC_ERROR_INVALID_SIG: "KDC_ERROR_INVALID_SIG Reserved for PKINIT", - KDC_ERR_KEY_TOO_WEAK: "KDC_ERR_KEY_TOO_WEAK Reserved for PKINIT", - KDC_ERR_CERTIFICATE_MISMATCH: "KDC_ERR_CERTIFICATE_MISMATCH Reserved for PKINIT", - KRB_AP_ERR_NO_TGT: "KRB_AP_ERR_NO_TGT No TGT available to validate USER-TO-USER", - KDC_ERR_WRONG_REALM: "KDC_ERR_WRONG_REALM Reserved for future use", - KRB_AP_ERR_USER_TO_USER_REQUIRED: "KRB_AP_ERR_USER_TO_USER_REQUIRED Ticket must be for USER-TO-USER", - KDC_ERR_CANT_VERIFY_CERTIFICATE: "KDC_ERR_CANT_VERIFY_CERTIFICATE Reserved for PKINIT", - KDC_ERR_INVALID_CERTIFICATE: "KDC_ERR_INVALID_CERTIFICATE Reserved for PKINIT", - KDC_ERR_REVOKED_CERTIFICATE: "KDC_ERR_REVOKED_CERTIFICATE Reserved for PKINIT", - KDC_ERR_REVOCATION_STATUS_UNKNOWN: "KDC_ERR_REVOCATION_STATUS_UNKNOWN Reserved for PKINIT", - KDC_ERR_REVOCATION_STATUS_UNAVAILABLE: "KDC_ERR_REVOCATION_STATUS_UNAVAILABLE Reserved for PKINIT", - KDC_ERR_CLIENT_NAME_MISMATCH: "KDC_ERR_CLIENT_NAME_MISMATCH Reserved for PKINIT", - KDC_ERR_KDC_NAME_MISMATCH: "KDC_ERR_KDC_NAME_MISMATCH Reserved for PKINIT", -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/etypeID/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/etypeID/constants.go deleted file mode 100644 index 65cd72fb..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/etypeID/constants.go +++ /dev/null @@ -1,101 +0,0 @@ -// Package etypeID provides Kerberos 5 encryption type assigned numbers. -package etypeID - -// Kerberos encryption type assigned numbers. -const ( - //RESERVED : 0 - DES_CBC_CRC int32 = 1 - DES_CBC_MD4 int32 = 2 - DES_CBC_MD5 int32 = 3 - DES_CBC_RAW int32 = 4 - DES3_CBC_MD5 int32 = 5 - DES3_CBC_RAW int32 = 6 - DES3_CBC_SHA1 int32 = 7 - DES_HMAC_SHA1 int32 = 8 - DSAWITHSHA1_CMSOID int32 = 9 - MD5WITHRSAENCRYPTION_CMSOID int32 = 10 - SHA1WITHRSAENCRYPTION_CMSOID int32 = 11 - RC2CBC_ENVOID int32 = 12 - RSAENCRYPTION_ENVOID int32 = 13 - RSAES_OAEP_ENV_OID int32 = 14 - DES_EDE3_CBC_ENV_OID int32 = 15 - DES3_CBC_SHA1_KD int32 = 16 - AES128_CTS_HMAC_SHA1_96 int32 = 17 - AES256_CTS_HMAC_SHA1_96 int32 = 18 - AES128_CTS_HMAC_SHA256_128 int32 = 19 - AES256_CTS_HMAC_SHA384_192 int32 = 20 - //UNASSIGNED : 21-22 - RC4_HMAC int32 = 23 - RC4_HMAC_EXP int32 = 24 - CAMELLIA128_CTS_CMAC int32 = 25 - CAMELLIA256_CTS_CMAC int32 = 26 - //UNASSIGNED : 27-64 - SUBKEY_KEYMATERIAL int32 = 65 - //UNASSIGNED : 66-2147483647 -) - -// ETypesByName is a map of EncType names to their assigned EncType number. -var ETypesByName = map[string]int32{ - "des-cbc-crc": DES_CBC_CRC, - "des-cbc-md4": DES_CBC_MD4, - "des-cbc-md5": DES_CBC_MD5, - "des-cbc-raw": DES_CBC_RAW, - "des3-cbc-md5": DES3_CBC_MD5, - "des3-cbc-raw": DES3_CBC_RAW, - "des3-cbc-sha1": DES3_CBC_SHA1, - "des3-hmac-sha1": DES_HMAC_SHA1, - "des3-cbc-sha1-kd": DES3_CBC_SHA1_KD, - "des-hmac-sha1": DES_HMAC_SHA1, - "dsaWithSHA1-CmsOID": DSAWITHSHA1_CMSOID, - "md5WithRSAEncryption-CmsOID": MD5WITHRSAENCRYPTION_CMSOID, - "sha1WithRSAEncryption-CmsOID": SHA1WITHRSAENCRYPTION_CMSOID, - "rc2CBC-EnvOID": RC2CBC_ENVOID, - "rsaEncryption-EnvOID": RSAENCRYPTION_ENVOID, - "rsaES-OAEP-ENV-OID": RSAES_OAEP_ENV_OID, - "des-ede3-cbc-Env-OID": DES_EDE3_CBC_ENV_OID, - "aes128-cts-hmac-sha1-96": AES128_CTS_HMAC_SHA1_96, - "aes128-cts": AES128_CTS_HMAC_SHA1_96, - "aes128-sha1": AES128_CTS_HMAC_SHA1_96, - "aes256-cts-hmac-sha1-96": AES256_CTS_HMAC_SHA1_96, - "aes256-cts": AES128_CTS_HMAC_SHA1_96, - "aes256-sha1": AES128_CTS_HMAC_SHA1_96, - "aes128-cts-hmac-sha256-128": AES128_CTS_HMAC_SHA256_128, - "aes128-sha2": AES128_CTS_HMAC_SHA256_128, - "aes256-cts-hmac-sha384-192": AES256_CTS_HMAC_SHA384_192, - "aes256-sha2": AES256_CTS_HMAC_SHA384_192, - "arcfour-hmac": RC4_HMAC, - "rc4-hmac": RC4_HMAC, - "arcfour-hmac-md5": RC4_HMAC, - "arcfour-hmac-exp": RC4_HMAC_EXP, - "rc4-hmac-exp": RC4_HMAC_EXP, - "arcfour-hmac-md5-exp": RC4_HMAC_EXP, - "camellia128-cts-cmac": CAMELLIA128_CTS_CMAC, - "camellia128-cts": CAMELLIA128_CTS_CMAC, - "camellia256-cts-cmac": CAMELLIA256_CTS_CMAC, - "camellia256-cts": CAMELLIA256_CTS_CMAC, - "subkey-keymaterial": SUBKEY_KEYMATERIAL, -} - -// EtypeSupported resolves the etype name string to the etype ID. -// If zero is returned the etype is not supported by gokrb5. -func EtypeSupported(etype string) int32 { - // Slice of supported enctype IDs - s := []int32{ - AES128_CTS_HMAC_SHA1_96, - AES256_CTS_HMAC_SHA1_96, - AES128_CTS_HMAC_SHA256_128, - AES256_CTS_HMAC_SHA384_192, - DES3_CBC_SHA1_KD, - RC4_HMAC, - } - id := ETypesByName[etype] - if id == 0 { - return id - } - for _, sid := range s { - if id == sid { - return id - } - } - return 0 -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/flags/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/flags/constants.go deleted file mode 100644 index 67a1fa75..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/flags/constants.go +++ /dev/null @@ -1,30 +0,0 @@ -// Package flags provides Kerberos 5 flag assigned numbers. -package flags - -// Flag values for KRB5 messages and tickets. -const ( - Reserved = 0 - Forwardable = 1 - Forwarded = 2 - Proxiable = 3 - Proxy = 4 - AllowPostDate = 5 - MayPostDate = 5 - PostDated = 6 - Invalid = 7 - Renewable = 8 - Initial = 9 - PreAuthent = 10 - HWAuthent = 11 - OptHardwareAuth = 11 - RequestAnonymous = 12 - TransitedPolicyChecked = 12 - OKAsDelegate = 13 - EncPARep = 15 - Canonicalize = 15 - DisableTransitedCheck = 26 - RenewableOK = 27 - EncTktInSkey = 28 - Renew = 30 - Validate = 31 -) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/keyusage/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/keyusage/constants.go deleted file mode 100644 index 5b232d1d..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/keyusage/constants.go +++ /dev/null @@ -1,42 +0,0 @@ -// Package keyusage provides Kerberos 5 key usage assigned numbers. -package keyusage - -// Key usage numbers. -const ( - AS_REQ_PA_ENC_TIMESTAMP = 1 - KDC_REP_TICKET = 2 - AS_REP_ENCPART = 3 - TGS_REQ_KDC_REQ_BODY_AUTHDATA_SESSION_KEY = 4 - TGS_REQ_KDC_REQ_BODY_AUTHDATA_SUB_KEY = 5 - TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR_CHKSUM = 6 - TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR = 7 - TGS_REP_ENCPART_SESSION_KEY = 8 - TGS_REP_ENCPART_AUTHENTICATOR_SUB_KEY = 9 - AP_REQ_AUTHENTICATOR_CHKSUM = 10 - AP_REQ_AUTHENTICATOR = 11 - AP_REP_ENCPART = 12 - KRB_PRIV_ENCPART = 13 - KRB_CRED_ENCPART = 14 - KRB_SAFE_CHKSUM = 15 - KERB_NON_KERB_SALT = 16 - KERB_NON_KERB_CKSUM_SALT = 17 - //18. Reserved for future use in Kerberos and related protocols. - AD_KDC_ISSUED_CHKSUM = 19 - //20-21. Reserved for future use in Kerberos and related protocols. - GSSAPI_ACCEPTOR_SEAL = 22 - GSSAPI_ACCEPTOR_SIGN = 23 - GSSAPI_INITIATOR_SEAL = 24 - GSSAPI_INITIATOR_SIGN = 25 - KEY_USAGE_FAST_REQ_CHKSUM = 50 - KEY_USAGE_FAST_ENC = 51 - KEY_USAGE_FAST_REP = 52 - KEY_USAGE_FAST_FINISHED = 53 - KEY_USAGE_ENC_CHALLENGE_CLIENT = 54 - KEY_USAGE_ENC_CHALLENGE_KDC = 55 - KEY_USAGE_AS_REQ = 56 - //26-511. Reserved for future use in Kerberos and related protocols. - //512-1023. Reserved for uses internal to a Kerberos implementation. - //1024. Encryption for application use in protocols that do not specify key usage values - //1025. Checksums for application use in protocols that do not specify key usage values - //1026-2047. Reserved for application use. -) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/msgtype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/msgtype/constants.go deleted file mode 100644 index ad21810b..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/msgtype/constants.go +++ /dev/null @@ -1,18 +0,0 @@ -// Package msgtype provides Kerberos 5 message type assigned numbers. -package msgtype - -// KRB message type IDs. -const ( - KRB_AS_REQ = 10 //Request for initial authentication - KRB_AS_REP = 11 //Response to KRB_AS_REQ request - KRB_TGS_REQ = 12 //Request for authentication based on TGT - KRB_TGS_REP = 13 //Response to KRB_TGS_REQ request - KRB_AP_REQ = 14 //Application request to server - KRB_AP_REP = 15 //Response to KRB_AP_REQ_MUTUAL - KRB_RESERVED16 = 16 //Reserved for user-to-user krb_tgt_request - KRB_RESERVED17 = 17 //Reserved for user-to-user krb_tgt_reply - KRB_SAFE = 20 // Safe (checksummed) application message - KRB_PRIV = 21 // Private (encrypted) application message - KRB_CRED = 22 //Private (encrypted) message to forward credentials - KRB_ERROR = 30 //Error response -) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/nametype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/nametype/constants.go deleted file mode 100644 index c111a05f..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/nametype/constants.go +++ /dev/null @@ -1,15 +0,0 @@ -// Package nametype provides Kerberos 5 principal name type numbers. -package nametype - -// Kerberos name type IDs. -const ( - KRB_NT_UNKNOWN int32 = 0 //Name type not known - KRB_NT_PRINCIPAL int32 = 1 //Just the name of the principal as in DCE, or for users - KRB_NT_SRV_INST int32 = 2 //Service and other unique instance (krbtgt) - KRB_NT_SRV_HST int32 = 3 //Service with host name as instance (telnet, rcommands) - KRB_NT_SRV_XHST int32 = 4 //Service with host as remaining components - KRB_NT_UID int32 = 5 //Unique ID - KRB_NT_X500_PRINCIPAL int32 = 6 //Encoded X.509 Distinguished name [RFC2253] - KRB_NT_SMTP_NAME int32 = 7 //Name in form of SMTP email name (e.g., user@example.com) - KRB_NT_ENTERPRISE int32 = 10 //Enterprise name; may be mapped to principal name -) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/patype/constants.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/patype/constants.go deleted file mode 100644 index aa04f637..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/iana/patype/constants.go +++ /dev/null @@ -1,77 +0,0 @@ -// Package patype provides Kerberos 5 pre-authentication type assigned numbers. -package patype - -// Kerberos pre-authentication type assigned numbers. -const ( - PA_TGS_REQ int32 = 1 - PA_ENC_TIMESTAMP int32 = 2 - PA_PW_SALT int32 = 3 - //RESERVED : 4 - PA_ENC_UNIX_TIME int32 = 5 - PA_SANDIA_SECUREID int32 = 6 - PA_SESAME int32 = 7 - PA_OSF_DCE int32 = 8 - PA_CYBERSAFE_SECUREID int32 = 9 - PA_AFS3_SALT int32 = 10 - PA_ETYPE_INFO int32 = 11 - PA_SAM_CHALLENGE int32 = 12 - PA_SAM_RESPONSE int32 = 13 - PA_PK_AS_REQ_OLD int32 = 14 - PA_PK_AS_REP_OLD int32 = 15 - PA_PK_AS_REQ int32 = 16 - PA_PK_AS_REP int32 = 17 - PA_PK_OCSP_RESPONSE int32 = 18 - PA_ETYPE_INFO2 int32 = 19 - PA_USE_SPECIFIED_KVNO int32 = 20 - PA_SVR_REFERRAL_INFO int32 = 20 - PA_SAM_REDIRECT int32 = 21 - PA_GET_FROM_TYPED_DATA int32 = 22 - TD_PADATA int32 = 22 - PA_SAM_ETYPE_INFO int32 = 23 - PA_ALT_PRINC int32 = 24 - PA_SERVER_REFERRAL int32 = 25 - //UNASSIGNED : 26-29 - PA_SAM_CHALLENGE2 int32 = 30 - PA_SAM_RESPONSE2 int32 = 31 - //UNASSIGNED : 32-40 - PA_EXTRA_TGT int32 = 41 - //UNASSIGNED : 42-100 - TD_PKINIT_CMS_CERTIFICATES int32 = 101 - TD_KRB_PRINCIPAL int32 = 102 - TD_KRB_REALM int32 = 103 - TD_TRUSTED_CERTIFIERS int32 = 104 - TD_CERTIFICATE_INDEX int32 = 105 - TD_APP_DEFINED_ERROR int32 = 106 - TD_REQ_NONCE int32 = 107 - TD_REQ_SEQ int32 = 108 - TD_DH_PARAMETERS int32 = 109 - //UNASSIGNED : 110 - TD_CMS_DIGEST_ALGORITHMS int32 = 111 - TD_CERT_DIGEST_ALGORITHMS int32 = 112 - //UNASSIGNED : 113-127 - PA_PAC_REQUEST int32 = 128 - PA_FOR_USER int32 = 129 - PA_FOR_X509_USER int32 = 130 - PA_FOR_CHECK_DUPS int32 = 131 - PA_AS_CHECKSUM int32 = 132 - PA_FX_COOKIE int32 = 133 - PA_AUTHENTICATION_SET int32 = 134 - PA_AUTH_SET_SELECTED int32 = 135 - PA_FX_FAST int32 = 136 - PA_FX_ERROR int32 = 137 - PA_ENCRYPTED_CHALLENGE int32 = 138 - //UNASSIGNED : 139-140 - PA_OTP_CHALLENGE int32 = 141 - PA_OTP_REQUEST int32 = 142 - PA_OTP_CONFIRM int32 = 143 - PA_OTP_PIN_CHANGE int32 = 144 - PA_EPAK_AS_REQ int32 = 145 - PA_EPAK_AS_REP int32 = 146 - PA_PKINIT_KX int32 = 147 - PA_PKU2U_NAME int32 = 148 - PA_REQ_ENC_PA_REP int32 = 149 - PA_AS_FRESHNESS int32 = 150 - //UNASSIGNED : 151-164 - PA_SUPPORTED_ETYPES int32 = 165 - PA_EXTENDED_ERROR int32 = 166 -) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/changepasswddata.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/changepasswddata.go deleted file mode 100644 index f48cb388..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/changepasswddata.go +++ /dev/null @@ -1,23 +0,0 @@ -package kadmin - -import ( - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// ChangePasswdData is the payload to a password change message. -type ChangePasswdData struct { - NewPasswd []byte `asn1:"explicit,tag:0"` - TargName types.PrincipalName `asn1:"explicit,optional,tag:1"` - TargRealm string `asn1:"generalstring,optional,explicit,tag:2"` -} - -// Marshal ChangePasswdData into a byte slice. -func (c *ChangePasswdData) Marshal() ([]byte, error) { - b, err := asn1.Marshal(*c) - if err != nil { - return []byte{}, err - } - //b = asn1tools.AddASNAppTag(b, asnAppTag.) - return b, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/message.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/message.go deleted file mode 100644 index 13104a5d..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/message.go +++ /dev/null @@ -1,114 +0,0 @@ -package kadmin - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "math" - - "gopkg.in/jcmturner/gokrb5.v5/messages" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -const ( - verisonHex = "ff80" -) - -// Request message for changing password. -type Request struct { - APREQ messages.APReq - KRBPriv messages.KRBPriv -} - -// Reply message for a password change. -type Reply struct { - MessageLength int - Version int - APREPLength int - APREP messages.APRep - KRBPriv messages.KRBPriv - KRBError messages.KRBError - IsKRBError bool - ResultCode uint16 - Result string -} - -// Marshal a Request into a byte slice. -func (m *Request) Marshal() (b []byte, err error) { - b = []byte{255, 128} // protocol version number: contains the hex constant 0xff80 (big-endian integer). - ab, e := m.APREQ.Marshal() - if e != nil { - err = fmt.Errorf("error marshaling AP_REQ: %v", e) - return - } - if len(ab) > math.MaxUint16 { - err = errors.New("length of AP_REQ greater then max Uint16 size") - return - } - al := make([]byte, 2) - binary.BigEndian.PutUint16(al, uint16(len(ab))) - b = append(b, al...) - b = append(b, ab...) - pb, e := m.KRBPriv.Marshal() - if e != nil { - err = fmt.Errorf("error marshaling KRB_Priv: %v", e) - return - } - b = append(b, pb...) - if len(b)+2 > math.MaxUint16 { - err = errors.New("length of message greater then max Uint16 size") - return - } - ml := make([]byte, 2) - binary.BigEndian.PutUint16(ml, uint16(len(b)+2)) - b = append(ml, b...) - return -} - -// Unmarshal a byte slice into a Reply. -func (m *Reply) Unmarshal(b []byte) error { - m.MessageLength = int(binary.BigEndian.Uint16(b[0:2])) - m.Version = int(binary.BigEndian.Uint16(b[2:4])) - if m.Version != 1 { - return fmt.Errorf("kadmin reply has incorrect protocol version number: %d", m.Version) - } - m.APREPLength = int(binary.BigEndian.Uint16(b[4:6])) - if m.APREPLength != 0 { - err := m.APREP.Unmarshal(b[6 : 6+m.APREPLength]) - if err != nil { - return err - } - err = m.KRBPriv.Unmarshal(b[6+m.APREPLength : m.MessageLength]) - if err != nil { - return err - } - } else { - m.IsKRBError = true - m.KRBError.Unmarshal(b[6:m.MessageLength]) - m.ResultCode, m.Result = parseResponse(m.KRBError.EData) - } - return nil -} - -func parseResponse(b []byte) (c uint16, s string) { - c = binary.BigEndian.Uint16(b[0:2]) - buf := bytes.NewBuffer(b[2:]) - m := make([]byte, len(b)-2) - binary.Read(buf, binary.BigEndian, &m) - s = string(m) - return -} - -// Decrypt the encrypted part of the KRBError within the change password Reply. -func (m *Reply) Decrypt(key types.EncryptionKey) error { - if m.IsKRBError { - return m.KRBError - } - err := m.KRBPriv.DecryptEncPart(key) - if err != nil { - return err - } - m.ResultCode, m.Result = parseResponse(m.KRBPriv.DecryptedEncPart.UserData) - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/passwd.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/passwd.go deleted file mode 100644 index 1b03fd1a..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/kadmin/passwd.go +++ /dev/null @@ -1,68 +0,0 @@ -// Package kadmin provides Kerberos administration capabilities. -package kadmin - -import ( - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/messages" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// ChangePasswdMsg generate a change password request and also return the key needed to decrypt the reply. -func ChangePasswdMsg(cname types.PrincipalName, realm, password string, tkt messages.Ticket, sessionKey types.EncryptionKey) (r Request, k types.EncryptionKey, err error) { - // Create change password data struct and marshal to bytes - chgpasswd := ChangePasswdData{ - NewPasswd: []byte(password), - TargName: cname, - TargRealm: realm, - } - chpwdb, err := chgpasswd.Marshal() - if err != nil { - err = krberror.Errorf(err, krberror.KRBMsgError, "error marshaling change passwd data") - return - } - - // Generate authenticator - auth, err := types.NewAuthenticator(realm, cname) - if err != nil { - err = krberror.Errorf(err, krberror.KRBMsgError, "error generating new authenticator") - return - } - etype, err := crypto.GetEtype(sessionKey.KeyType) - if err != nil { - err = krberror.Errorf(err, krberror.KRBMsgError, "error generating subkey etype") - return - } - err = auth.GenerateSeqNumberAndSubKey(etype.GetETypeID(), etype.GetKeyByteSize()) - if err != nil { - err = krberror.Errorf(err, krberror.KRBMsgError, "error generating subkey") - return - } - k = auth.SubKey - - // Generate AP_REQ - APreq, err := messages.NewAPReq(tkt, sessionKey, auth) - if err != nil { - return - } - - // Form the KRBPriv encpart data - kp := messages.EncKrbPrivPart{ - UserData: chpwdb, - Timestamp: auth.CTime, - Usec: auth.Cusec, - SequenceNumber: auth.SeqNumber, - } - kpriv := messages.NewKRBPriv(kp) - err = kpriv.EncryptEncPart(k) - if err != nil { - err = krberror.Errorf(err, krberror.EncryptingError, "error encrypting change passwd data") - return - } - - r = Request{ - APREQ: APreq, - KRBPriv: kpriv, - } - return -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/keytab/keytab.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/keytab/keytab.go deleted file mode 100644 index c4664588..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/keytab/keytab.go +++ /dev/null @@ -1,369 +0,0 @@ -// Package keytab implements Kerberos keytabs: https://web.mit.edu/kerberos/krb5-devel/doc/formats/keytab_file_format.html. -package keytab - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "io" - "io/ioutil" - "time" - "unsafe" - - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -const ( - keytabFirstByte byte = 05 -) - -// Keytab struct. -type Keytab struct { - Version uint8 - Entries []entry -} - -// Keytab entry struct. -type entry struct { - Principal principal - Timestamp time.Time - KVNO8 uint8 - Key types.EncryptionKey - KVNO uint32 -} - -// Keytab entry principal struct. -type principal struct { - NumComponents int16 - Realm string - Components []string - NameType int32 -} - -// NewKeytab creates new, empty Keytab type. -func NewKeytab() Keytab { - var e []entry - return Keytab{ - Version: 0, - Entries: e, - } -} - -// GetEncryptionKey returns the EncryptionKey from the Keytab for the newest entry with the required kvno, etype and matching principal. -func (kt *Keytab) GetEncryptionKey(nameString []string, realm string, kvno int, etype int32) (types.EncryptionKey, error) { - var key types.EncryptionKey - var t time.Time - for _, k := range kt.Entries { - if k.Principal.Realm == realm && len(k.Principal.Components) == len(nameString) && - k.Key.KeyType == etype && - (k.KVNO == uint32(kvno) || kvno == 0) && - k.Timestamp.After(t) { - - p := true - for i, n := range k.Principal.Components { - if nameString[i] != n { - p = false - break - } - } - if p { - key = k.Key - t = k.Timestamp - } - } - } - if len(key.KeyValue) < 1 { - return key, fmt.Errorf("matching key not found in keytab. Looking for %v realm: %v kvno: %v etype: %v", nameString, realm, kvno, etype) - } - return key, nil -} - -// Create a new Keytab entry. -func newKeytabEntry() entry { - var b []byte - return entry{ - Principal: newPrincipal(), - Timestamp: time.Time{}, - KVNO8: 0, - Key: types.EncryptionKey{ - KeyType: 0, - KeyValue: b, - }, - KVNO: 0, - } -} - -// Create a new principal. -func newPrincipal() principal { - var c []string - return principal{ - NumComponents: 0, - Realm: "", - Components: c, - NameType: 0, - } -} - -// Load a Keytab file into a Keytab type. -func Load(ktPath string) (kt Keytab, err error) { - k, err := ioutil.ReadFile(ktPath) - if err != nil { - return - } - return Parse(k) -} - -// Marshal keytab into byte slice -func (kt Keytab) Marshal() ([]byte, error) { - b := []byte{keytabFirstByte, kt.Version} - for _, e := range kt.Entries { - eb, err := e.marshal(int(kt.Version)) - if err != nil { - return b, err - } - b = append(b, eb...) - } - return b, nil -} - -// Write the keytab bytes to io.Writer. -// Returns the number of bytes written -func (kt Keytab) Write(w io.Writer) (int, error) { - b, err := kt.Marshal() - if err != nil { - return 0, fmt.Errorf("error marshaling keytab: %v", err) - } - return w.Write(b) -} - -// Parse byte slice of Keytab data into Keytab type. -func Parse(b []byte) (kt Keytab, err error) { - //The first byte of the file always has the value 5 - if b[0] != keytabFirstByte { - err = errors.New("invalid keytab data. First byte does not equal 5") - return - } - //Get keytab version - //The 2nd byte contains the version number (1 or 2) - kt.Version = uint8(b[1]) - if kt.Version != 1 && kt.Version != 2 { - err = errors.New("invalid keytab data. Keytab version is neither 1 nor 2") - return - } - //Version 1 of the file format uses native byte order for integer representations. Version 2 always uses big-endian byte order - var endian binary.ByteOrder - endian = binary.BigEndian - if kt.Version == 1 && isNativeEndianLittle() { - endian = binary.LittleEndian - } - /* - After the two-byte version indicator, the file contains a sequence of signed 32-bit record lengths followed by key records or holes. - A positive record length indicates a valid key entry whose size is equal to or less than the record length. - A negative length indicates a zero-filled hole whose size is the inverse of the length. - A length of 0 indicates the end of the file. - */ - // n tracks position in the byte array - n := 2 - l := readInt32(b, &n, &endian) - for l != 0 { - if l < 0 { - //Zero padded so skip over - l = l * -1 - n = n + int(l) - } else { - //fmt.Printf("Bytes for entry: %v\n", b[n:n+int(l)]) - eb := b[n : n+int(l)] - n = n + int(l) - ke := newKeytabEntry() - // p keeps track as to where we are in the byte stream - var p int - parsePrincipal(eb, &p, &kt, &ke, &endian) - ke.Timestamp = readTimestamp(eb, &p, &endian) - ke.KVNO8 = uint8(readInt8(eb, &p, &endian)) - ke.Key.KeyType = int32(readInt16(eb, &p, &endian)) - kl := int(readInt16(eb, &p, &endian)) - ke.Key.KeyValue = readBytes(eb, &p, kl, &endian) - //The 32-bit key version overrides the 8-bit key version. - // To determine if it is present, the implementation must check that at least 4 bytes remain in the record after the other fields are read, - // and that the value of the 32-bit integer contained in those bytes is non-zero. - if len(eb)-p >= 4 { - // The 32-bit key may be present - ke.KVNO = uint32(readInt32(eb, &p, &endian)) - } - if ke.KVNO == 0 { - // Handles if the value from the last 4 bytes was zero and also if there are not the 4 bytes present. Makes sense to put the same value here as KVNO8 - ke.KVNO = uint32(ke.KVNO8) - } - // Add the entry to the keytab - kt.Entries = append(kt.Entries, ke) - } - // Check if there are still 4 bytes left to read - if n > len(b) || len(b[n:]) < 4 { - break - } - // Read the size of the next entry - l = readInt32(b, &n, &endian) - } - return -} - -func (e entry) marshal(v int) ([]byte, error) { - var b []byte - pb, err := e.Principal.marshal(v) - if err != nil { - return b, err - } - b = append(b, pb...) - - var endian binary.ByteOrder - endian = binary.BigEndian - if v == 1 && isNativeEndianLittle() { - endian = binary.LittleEndian - } - - t := make([]byte, 9) - endian.PutUint32(t[0:4], uint32(e.Timestamp.Unix())) - t[4] = byte(e.KVNO8) - endian.PutUint16(t[5:7], uint16(e.Key.KeyType)) - endian.PutUint16(t[7:9], uint16(len(e.Key.KeyValue))) - b = append(b, t...) - - buf := new(bytes.Buffer) - err = binary.Write(buf, endian, e.Key.KeyValue) - if err != nil { - return b, err - } - b = append(b, buf.Bytes()...) - - t = make([]byte, 4) - endian.PutUint32(t, e.KVNO) - b = append(b, t...) - - // Add the length header - t = make([]byte, 4) - endian.PutUint32(t, uint32(len(b))) - b = append(t, b...) - return b, nil -} - -// Parse the Keytab bytes of a principal into a Keytab entry's principal. -func parsePrincipal(b []byte, p *int, kt *Keytab, ke *entry, e *binary.ByteOrder) error { - ke.Principal.NumComponents = readInt16(b, p, e) - if kt.Version == 1 { - //In version 1 the number of components includes the realm. Minus 1 to make consistent with version 2 - ke.Principal.NumComponents-- - } - lenRealm := readInt16(b, p, e) - ke.Principal.Realm = string(readBytes(b, p, int(lenRealm), e)) - for i := 0; i < int(ke.Principal.NumComponents); i++ { - l := readInt16(b, p, e) - ke.Principal.Components = append(ke.Principal.Components, string(readBytes(b, p, int(l), e))) - } - if kt.Version != 1 { - //Name Type is omitted in version 1 - ke.Principal.NameType = readInt32(b, p, e) - } - return nil -} - -func (p principal) marshal(v int) ([]byte, error) { - //var b []byte - b := make([]byte, 2) - var endian binary.ByteOrder - endian = binary.BigEndian - if v == 1 && isNativeEndianLittle() { - endian = binary.LittleEndian - } - endian.PutUint16(b[0:], uint16(p.NumComponents)) - realm, err := marshalString(p.Realm, v) - if err != nil { - return b, err - } - b = append(b, realm...) - for _, c := range p.Components { - cb, err := marshalString(c, v) - if err != nil { - return b, err - } - b = append(b, cb...) - } - if v != 1 { - t := make([]byte, 4) - endian.PutUint32(t, uint32(p.NameType)) - b = append(b, t...) - } - return b, nil -} - -func marshalString(s string, v int) ([]byte, error) { - sb := []byte(s) - b := make([]byte, 2) - var endian binary.ByteOrder - endian = binary.BigEndian - if v == 1 && isNativeEndianLittle() { - endian = binary.LittleEndian - } - endian.PutUint16(b[0:], uint16(len(sb))) - buf := new(bytes.Buffer) - err := binary.Write(buf, endian, sb) - if err != nil { - return b, err - } - b = append(b, buf.Bytes()...) - return b, err -} - -// Read bytes representing a timestamp. -func readTimestamp(b []byte, p *int, e *binary.ByteOrder) time.Time { - return time.Unix(int64(readInt32(b, p, e)), 0) -} - -// Read bytes representing an eight bit integer. -func readInt8(b []byte, p *int, e *binary.ByteOrder) (i int8) { - buf := bytes.NewBuffer(b[*p : *p+1]) - binary.Read(buf, *e, &i) - *p++ - return -} - -// Read bytes representing a sixteen bit integer. -func readInt16(b []byte, p *int, e *binary.ByteOrder) (i int16) { - buf := bytes.NewBuffer(b[*p : *p+2]) - binary.Read(buf, *e, &i) - *p += 2 - return -} - -// Read bytes representing a thirty two bit integer. -func readInt32(b []byte, p *int, e *binary.ByteOrder) (i int32) { - buf := bytes.NewBuffer(b[*p : *p+4]) - binary.Read(buf, *e, &i) - *p += 4 - return -} - -func readBytes(b []byte, p *int, s int, e *binary.ByteOrder) []byte { - buf := bytes.NewBuffer(b[*p : *p+s]) - r := make([]byte, s) - binary.Read(buf, *e, &r) - *p += s - return r -} - -func isNativeEndianLittle() bool { - var x = 0x012345678 - var p = unsafe.Pointer(&x) - var bp = (*[4]byte)(p) - - var endian bool - if 0x01 == bp[0] { - endian = false - } else if (0x78 & 0xff) == (bp[0] & 0xff) { - endian = true - } else { - // Default to big endian - endian = false - } - return endian -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/krberror/error.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/krberror/error.go deleted file mode 100644 index f2334d25..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/krberror/error.go +++ /dev/null @@ -1,73 +0,0 @@ -// Package krberror provides error type and functions for gokrb5. -package krberror - -import ( - "fmt" - "strings" -) - -// Error type descriptions. -const ( - separator = " < " - EncodingError = "Encoding_Error" - NetworkingError = "Networking_Error" - DecryptingError = "Decrypting_Error" - EncryptingError = "Encrypting_Error" - ChksumError = "Checksum_Error" - KRBMsgError = "KRBMessage_Handling_Error" - ConfigError = "Configuration_Error" -) - -// Krberror is an error type for gokrb5 -type Krberror struct { - RootCause string - EText []string -} - -// Error function to implement the error interface. -func (e Krberror) Error() string { - return fmt.Sprintf("[Root cause: %s] ", e.RootCause) + strings.Join(e.EText, separator) -} - -// Add another error statement to the error. -func (e *Krberror) Add(et string, s string) { - e.EText = append([]string{fmt.Sprintf("%s: %s", et, s)}, e.EText...) -} - -// NewKrberror creates a new instance of Krberror. -func NewKrberror(et, s string) Krberror { - return Krberror{ - RootCause: et, - EText: []string{s}, - } -} - -// Errorf appends to or creates a new Krberror. -func Errorf(err error, et, format string, a ...interface{}) Krberror { - if e, ok := err.(Krberror); ok { - if len(a) > 0 { - e.EText = append([]string{fmt.Sprintf("%s: "+format, et, a)}, e.EText...) - return e - } - e.EText = append([]string{fmt.Sprintf("%s: "+format, et)}, e.EText...) - return e - } - if len(a) > 0 { - return NewErrorf(et, format+": %s", a, err) - } - return NewErrorf(et, format+": %s", err) -} - -// NewErrorf creates a new Krberror from a formatted string. -func NewErrorf(et, format string, a ...interface{}) Krberror { - var s string - if len(a) > 0 { - s = fmt.Sprintf("%s: %s", et, fmt.Sprintf(format, a...)) - } else { - s = fmt.Sprintf("%s: %s", et, format) - } - return Krberror{ - RootCause: et, - EText: []string{s}, - } -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APRep.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APRep.go deleted file mode 100644 index a67a9f1c..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APRep.go +++ /dev/null @@ -1,64 +0,0 @@ -package messages - -import ( - "fmt" - "time" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" - "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -/* -AP-REP ::= [APPLICATION 15] SEQUENCE { -pvno [0] INTEGER (5), -msg-type [1] INTEGER (15), -enc-part [2] EncryptedData -- EncAPRepPart -} - -EncAPRepPart ::= [APPLICATION 27] SEQUENCE { - ctime [0] KerberosTime, - cusec [1] Microseconds, - subkey [2] EncryptionKey OPTIONAL, - seq-number [3] UInt32 OPTIONAL -} -*/ - -// APRep implements RFC 4120 KRB_AP_REP: https://tools.ietf.org/html/rfc4120#section-5.5.2. -type APRep struct { - PVNO int `asn1:"explicit,tag:0"` - MsgType int `asn1:"explicit,tag:1"` - EncPart types.EncryptedData `asn1:"explicit,tag:2"` -} - -// EncAPRepPart is the encrypted part of KRB_AP_REP. -type EncAPRepPart struct { - CTime time.Time `asn1:"generalized,explicit,tag:0"` - Cusec int `asn1:"explicit,tag:1"` - Subkey types.EncryptionKey `asn1:"optional,explicit,tag:2"` - SequenceNumber int64 `asn1:"optional,explicit,tag:3"` -} - -// Unmarshal bytes b into the APRep struct. -func (a *APRep) Unmarshal(b []byte) error { - _, err := asn1.UnmarshalWithParams(b, a, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.APREP)) - if err != nil { - return processUnmarshalReplyError(b, err) - } - expectedMsgType := msgtype.KRB_AP_REP - if a.MsgType != expectedMsgType { - return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a KRB_AP_REP. Expected: %v; Actual: %v", expectedMsgType, a.MsgType) - } - return nil -} - -// Unmarshal bytes b into the APRep encrypted part struct. -func (a *EncAPRepPart) Unmarshal(b []byte) error { - _, err := asn1.UnmarshalWithParams(b, a, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.EncAPRepPart)) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "AP_REP unmarshal error") - } - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APReq.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APReq.go deleted file mode 100644 index ff0be67f..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/APReq.go +++ /dev/null @@ -1,157 +0,0 @@ -package messages - -import ( - "fmt" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/asn1tools" - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/iana" - "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" - "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" - "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" - "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -/*AP-REQ ::= [APPLICATION 14] SEQUENCE { -pvno [0] INTEGER (5), -msg-type [1] INTEGER (14), -ap-options [2] APOptions, -ticket [3] Ticket, -authenticator [4] EncryptedData -- Authenticator -} - -APOptions ::= KerberosFlags --- reserved(0), --- use-session-key(1), --- mutual-required(2)*/ - -type marshalAPReq struct { - PVNO int `asn1:"explicit,tag:0"` - MsgType int `asn1:"explicit,tag:1"` - APOptions asn1.BitString `asn1:"explicit,tag:2"` - // Ticket needs to be a raw value as it is wrapped in an APPLICATION tag - Ticket asn1.RawValue `asn1:"explicit,tag:3"` - Authenticator types.EncryptedData `asn1:"explicit,tag:4"` -} - -// APReq implements RFC 4120 KRB_AP_REQ: https://tools.ietf.org/html/rfc4120#section-5.5.1. -type APReq struct { - PVNO int `asn1:"explicit,tag:0"` - MsgType int `asn1:"explicit,tag:1"` - APOptions asn1.BitString `asn1:"explicit,tag:2"` - Ticket Ticket `asn1:"explicit,tag:3"` - Authenticator types.EncryptedData `asn1:"explicit,tag:4"` -} - -// NewAPReq generates a new KRB_AP_REQ struct. -func NewAPReq(tkt Ticket, sessionKey types.EncryptionKey, auth types.Authenticator) (APReq, error) { - var a APReq - ed, err := encryptAuthenticator(auth, sessionKey, tkt) - if err != nil { - return a, krberror.Errorf(err, krberror.KRBMsgError, "Error creating Authenticator for AP_REQ") - } - a = APReq{ - PVNO: iana.PVNO, - MsgType: msgtype.KRB_AP_REQ, - APOptions: types.NewKrbFlags(), - Ticket: tkt, - Authenticator: ed, - } - return a, nil -} - -// Encrypt Authenticator -func encryptAuthenticator(a types.Authenticator, sessionKey types.EncryptionKey, tkt Ticket) (types.EncryptedData, error) { - var ed types.EncryptedData - m, err := a.Marshal() - if err != nil { - return ed, krberror.Errorf(err, krberror.EncodingError, "Marshaling error of EncryptedData form of Authenticator") - } - usage := authenticatorKeyUsage(tkt.SName.NameType) - ed, err = crypto.GetEncryptedData(m, sessionKey, uint32(usage), tkt.EncPart.KVNO) - if err != nil { - return ed, krberror.Errorf(err, krberror.EncryptingError, "Error encrypting Authenticator") - } - return ed, nil -} - -// DecryptAuthenticator decrypts the Authenticator within the AP_REQ. -// sessionKey may simply be the key within the decrypted EncPart of the ticket within the AP_REQ. -func (a *APReq) DecryptAuthenticator(sessionKey types.EncryptionKey) (auth types.Authenticator, err error) { - usage := authenticatorKeyUsage(a.Ticket.SName.NameType) - ab, e := crypto.DecryptEncPart(a.Authenticator, sessionKey, uint32(usage)) - if e != nil { - err = fmt.Errorf("error decrypting authenticator: %v", e) - return - } - e = auth.Unmarshal(ab) - if e != nil { - err = fmt.Errorf("error unmarshaling authenticator") - return - } - return -} - -func authenticatorKeyUsage(nt int32) int { - switch nt { - case nametype.KRB_NT_PRINCIPAL: - return keyusage.AP_REQ_AUTHENTICATOR - case nametype.KRB_NT_SRV_HST: - return keyusage.AP_REQ_AUTHENTICATOR - case nametype.KRB_NT_SRV_INST: - return keyusage.TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR - default: - return keyusage.AP_REQ_AUTHENTICATOR - } -} - -// Unmarshal bytes b into the APReq struct. -func (a *APReq) Unmarshal(b []byte) error { - var m marshalAPReq - _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.APREQ)) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Unmarshal error of AP_REQ") - } - if m.MsgType != msgtype.KRB_AP_REQ { - return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate an AP_REQ. Expected: %v; Actual: %v", msgtype.KRB_AP_REQ, m.MsgType) - } - a.PVNO = m.PVNO - a.MsgType = m.MsgType - a.APOptions = m.APOptions - a.Authenticator = m.Authenticator - a.Ticket, err = UnmarshalTicket(m.Ticket.Bytes) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Unmarshaling error of Ticket within AP_REQ") - } - return nil -} - -// Marshal APReq struct. -func (a *APReq) Marshal() ([]byte, error) { - m := marshalAPReq{ - PVNO: a.PVNO, - MsgType: a.MsgType, - APOptions: a.APOptions, - Authenticator: a.Authenticator, - } - var b []byte - b, err := a.Ticket.Marshal() - if err != nil { - return b, err - } - m.Ticket = asn1.RawValue{ - Class: asn1.ClassContextSpecific, - IsCompound: true, - Tag: 3, - Bytes: b, - } - mk, err := asn1.Marshal(m) - if err != nil { - return mk, krberror.Errorf(err, krberror.EncodingError, "Marshaling error of AP_REQ") - } - mk = asn1tools.AddASNAppTag(mk, asnAppTag.APREQ) - return mk, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCRep.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCRep.go deleted file mode 100644 index 8874f9fd..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCRep.go +++ /dev/null @@ -1,312 +0,0 @@ -package messages - -// Reference: https://www.ietf.org/rfc/rfc4120.txt -// Section: 5.4.2 - -import ( - "fmt" - "time" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/config" - "gopkg.in/jcmturner/gokrb5.v5/credentials" - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" - "gopkg.in/jcmturner/gokrb5.v5/iana/flags" - "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" - "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" - "gopkg.in/jcmturner/gokrb5.v5/iana/patype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -type marshalKDCRep struct { - PVNO int `asn1:"explicit,tag:0"` - MsgType int `asn1:"explicit,tag:1"` - PAData types.PADataSequence `asn1:"explicit,optional,tag:2"` - CRealm string `asn1:"generalstring,explicit,tag:3"` - CName types.PrincipalName `asn1:"explicit,tag:4"` - // Ticket needs to be a raw value as it is wrapped in an APPLICATION tag - Ticket asn1.RawValue `asn1:"explicit,tag:5"` - EncPart types.EncryptedData `asn1:"explicit,tag:6"` -} - -// KDCRepFields represents the KRB_KDC_REP fields. -type KDCRepFields struct { - PVNO int - MsgType int - PAData []types.PAData - CRealm string - CName types.PrincipalName - Ticket Ticket - EncPart types.EncryptedData - DecryptedEncPart EncKDCRepPart -} - -// ASRep implements RFC 4120 KRB_AS_REP: https://tools.ietf.org/html/rfc4120#section-5.4.2. -type ASRep struct { - KDCRepFields -} - -// TGSRep implements RFC 4120 KRB_TGS_REP: https://tools.ietf.org/html/rfc4120#section-5.4.2. -type TGSRep struct { - KDCRepFields -} - -// EncKDCRepPart is the encrypted part of KRB_KDC_REP. -type EncKDCRepPart struct { - Key types.EncryptionKey `asn1:"explicit,tag:0"` - LastReqs []LastReq `asn1:"explicit,tag:1"` - Nonce int `asn1:"explicit,tag:2"` - KeyExpiration time.Time `asn1:"generalized,explicit,optional,tag:3"` - Flags asn1.BitString `asn1:"explicit,tag:4"` - AuthTime time.Time `asn1:"generalized,explicit,tag:5"` - StartTime time.Time `asn1:"generalized,explicit,optional,tag:6"` - EndTime time.Time `asn1:"generalized,explicit,tag:7"` - RenewTill time.Time `asn1:"generalized,explicit,optional,tag:8"` - SRealm string `asn1:"generalstring,explicit,tag:9"` - SName types.PrincipalName `asn1:"explicit,tag:10"` - CAddr []types.HostAddress `asn1:"explicit,optional,tag:11"` - EncPAData types.PADataSequence `asn1:"explicit,optional,tag:12"` -} - -// LastReq part of KRB_KDC_REP. -type LastReq struct { - LRType int32 `asn1:"explicit,tag:0"` - LRValue time.Time `asn1:"generalized,explicit,tag:1"` -} - -// Unmarshal bytes b into the ASRep struct. -func (k *ASRep) Unmarshal(b []byte) error { - var m marshalKDCRep - _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.ASREP)) - if err != nil { - return processUnmarshalReplyError(b, err) - } - if m.MsgType != msgtype.KRB_AS_REP { - return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate an AS_REP. Expected: %v; Actual: %v", msgtype.KRB_AS_REP, m.MsgType) - } - //Process the raw ticket within - tkt, err := UnmarshalTicket(m.Ticket.Bytes) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling Ticket within AS_REP") - } - k.KDCRepFields = KDCRepFields{ - PVNO: m.PVNO, - MsgType: m.MsgType, - PAData: m.PAData, - CRealm: m.CRealm, - CName: m.CName, - Ticket: tkt, - EncPart: m.EncPart, - } - return nil -} - -// Unmarshal bytes b into the TGSRep struct. -func (k *TGSRep) Unmarshal(b []byte) error { - var m marshalKDCRep - _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.TGSREP)) - if err != nil { - return processUnmarshalReplyError(b, err) - } - if m.MsgType != msgtype.KRB_TGS_REP { - return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate an TGS_REP. Expected: %v; Actual: %v", msgtype.KRB_TGS_REP, m.MsgType) - } - //Process the raw ticket within - tkt, err := UnmarshalTicket(m.Ticket.Bytes) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling Ticket within TGS_REP") - } - k.KDCRepFields = KDCRepFields{ - PVNO: m.PVNO, - MsgType: m.MsgType, - PAData: m.PAData, - CRealm: m.CRealm, - CName: m.CName, - Ticket: tkt, - EncPart: m.EncPart, - } - return nil -} - -// Unmarshal bytes b into encrypted part of KRB_KDC_REP. -func (e *EncKDCRepPart) Unmarshal(b []byte) error { - _, err := asn1.UnmarshalWithParams(b, e, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.EncASRepPart)) - if err != nil { - // Try using tag 26 - /* Ref: RFC 4120 - Compatibility note: Some implementations unconditionally send an - encrypted EncTGSRepPart (application tag number 26) in this field - regardless of whether the reply is a AS-REP or a TGS-REP. In the - interest of compatibility, implementors MAY relax the check on the - tag number of the decrypted ENC-PART.*/ - _, err = asn1.UnmarshalWithParams(b, e, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.EncTGSRepPart)) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling encrypted part within KDC_REP") - } - } - return nil -} - -// DecryptEncPart decrypts the encrypted part of an AS_REP. -func (k *ASRep) DecryptEncPart(c *credentials.Credentials) (types.EncryptionKey, error) { - var key types.EncryptionKey - var err error - if c.HasKeytab() { - key, err = c.Keytab.GetEncryptionKey(k.CName.NameString, k.CRealm, k.EncPart.KVNO, k.EncPart.EType) - if err != nil { - return key, krberror.Errorf(err, krberror.DecryptingError, "Error decrypting AS_REP encrypted part") - } - } - if c.HasPassword() { - key, _, err = crypto.GetKeyFromPassword(c.Password, k.CName, k.CRealm, k.EncPart.EType, k.PAData) - if err != nil { - return key, krberror.Errorf(err, krberror.DecryptingError, "Error decrypting AS_REP encrypted part") - } - } - if !c.HasKeytab() && !c.HasPassword() { - return key, krberror.NewErrorf(krberror.DecryptingError, "No secret available in credentials to preform decryption of AS_REP encrypted part") - } - b, err := crypto.DecryptEncPart(k.EncPart, key, keyusage.AS_REP_ENCPART) - if err != nil { - return key, krberror.Errorf(err, krberror.DecryptingError, "Error decrypting AS_REP encrypted part") - } - var denc EncKDCRepPart - err = denc.Unmarshal(b) - if err != nil { - return key, krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling decrypted encpart of AS_REP") - } - k.DecryptedEncPart = denc - return key, nil -} - -// IsValid checks the validity of AS_REP message. -func (k *ASRep) IsValid(cfg *config.Config, creds *credentials.Credentials, asReq ASReq) (bool, error) { - //Ref RFC 4120 Section 3.1.5 - if k.CName.NameType != asReq.ReqBody.CName.NameType || k.CName.NameString == nil { - return false, krberror.NewErrorf(krberror.KRBMsgError, "CName in response does not match what was requested. Requested: %+v; Reply: %+v", asReq.ReqBody.CName, k.CName) - } - for i := range k.CName.NameString { - if k.CName.NameString[i] != asReq.ReqBody.CName.NameString[i] { - return false, krberror.NewErrorf(krberror.KRBMsgError, "CName in response does not match what was requested. Requested: %+v; Reply: %+v", asReq.ReqBody.CName, k.CName) - } - } - if k.CRealm != asReq.ReqBody.Realm { - return false, krberror.NewErrorf(krberror.KRBMsgError, "CRealm in response does not match what was requested. Requested: %s; Reply: %s", asReq.ReqBody.Realm, k.CRealm) - } - key, err := k.DecryptEncPart(creds) - if err != nil { - return false, krberror.Errorf(err, krberror.DecryptingError, "Error decrypting EncPart of AS_REP") - } - if k.DecryptedEncPart.Nonce != asReq.ReqBody.Nonce { - return false, krberror.NewErrorf(krberror.KRBMsgError, "Possible replay attack, nonce in response does not match that in request") - } - if k.DecryptedEncPart.SName.NameType != asReq.ReqBody.SName.NameType || k.DecryptedEncPart.SName.NameString == nil { - return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response does not match what was requested. Requested: %v; Reply: %v", asReq.ReqBody.SName, k.DecryptedEncPart.SName) - } - for i := range k.CName.NameString { - if k.DecryptedEncPart.SName.NameString[i] != asReq.ReqBody.SName.NameString[i] { - return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response does not match what was requested. Requested: %+v; Reply: %+v", asReq.ReqBody.SName, k.DecryptedEncPart.SName) - } - } - if k.DecryptedEncPart.SRealm != asReq.ReqBody.Realm { - return false, krberror.NewErrorf(krberror.KRBMsgError, "SRealm in response does not match what was requested. Requested: %s; Reply: %s", asReq.ReqBody.Realm, k.DecryptedEncPart.SRealm) - } - if len(asReq.ReqBody.Addresses) > 0 { - if !types.HostAddressesEqual(k.DecryptedEncPart.CAddr, asReq.ReqBody.Addresses) { - return false, krberror.NewErrorf(krberror.KRBMsgError, "Addresses listed in the AS_REP does not match those listed in the AS_REQ") - } - } - t := time.Now().UTC() - if t.Sub(k.DecryptedEncPart.AuthTime) > cfg.LibDefaults.Clockskew || k.DecryptedEncPart.AuthTime.Sub(t) > cfg.LibDefaults.Clockskew { - return false, krberror.NewErrorf(krberror.KRBMsgError, "Clock skew with KDC too large. Greater than %v seconds", cfg.LibDefaults.Clockskew.Seconds()) - } - // RFC 6806 https://tools.ietf.org/html/rfc6806.html#section-11 - if asReq.PAData.Contains(patype.PA_REQ_ENC_PA_REP) && types.IsFlagSet(&k.DecryptedEncPart.Flags, flags.EncPARep) { - if len(k.DecryptedEncPart.EncPAData) < 2 || !k.DecryptedEncPart.EncPAData.Contains(patype.PA_FX_FAST) { - return false, krberror.NewErrorf(krberror.KRBMsgError, "KDC did not respond appropriately to FAST negotiation") - } - for _, pa := range k.DecryptedEncPart.EncPAData { - if pa.PADataType == patype.PA_REQ_ENC_PA_REP { - var pafast types.PAReqEncPARep - err := pafast.Unmarshal(pa.PADataValue) - if err != nil { - return false, krberror.Errorf(err, krberror.EncodingError, "KDC FAST negotiation response error, could not unmarshal PA_REQ_ENC_PA_REP") - } - etype, err := crypto.GetChksumEtype(pafast.ChksumType) - if err != nil { - return false, krberror.Errorf(err, krberror.ChksumError, "KDC FAST negotiation response error") - } - ab, _ := asReq.Marshal() - if !etype.VerifyChecksum(key.KeyValue, ab, pafast.Chksum, keyusage.KEY_USAGE_AS_REQ) { - return false, krberror.Errorf(err, krberror.ChksumError, "KDC FAST negotiation response checksum invalid") - } - } - } - } - return true, nil -} - -// DecryptEncPart decrypts the encrypted part of an TGS_REP. -func (k *TGSRep) DecryptEncPart(key types.EncryptionKey) error { - b, err := crypto.DecryptEncPart(k.EncPart, key, keyusage.TGS_REP_ENCPART_SESSION_KEY) - if err != nil { - return krberror.Errorf(err, krberror.DecryptingError, "Error decrypting TGS_REP EncPart") - } - var denc EncKDCRepPart - err = denc.Unmarshal(b) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling encrypted part") - } - k.DecryptedEncPart = denc - return nil -} - -// IsValid checks the validity of the TGS_REP message. -func (k *TGSRep) IsValid(cfg *config.Config, tgsReq TGSReq) (bool, error) { - if k.CName.NameType != tgsReq.ReqBody.CName.NameType || k.CName.NameString == nil { - return false, krberror.NewErrorf(krberror.KRBMsgError, "CName type in response does not match what was requested. Requested: %+v; Reply: %+v", tgsReq.ReqBody.CName, k.CName) - } - for i := range k.CName.NameString { - if k.CName.NameString[i] != tgsReq.ReqBody.CName.NameString[i] { - return false, krberror.NewErrorf(krberror.KRBMsgError, "CName in response does not match what was requested. Requested: %+v; Reply: %+v", tgsReq.ReqBody.CName, k.CName) - } - } - if k.Ticket.Realm != tgsReq.ReqBody.Realm { - return false, krberror.NewErrorf(krberror.KRBMsgError, "Realm in response ticket does not match what was requested. Requested: %s; Reply: %s", tgsReq.ReqBody.Realm, k.Ticket.Realm) - } - if k.DecryptedEncPart.Nonce != tgsReq.ReqBody.Nonce { - return false, krberror.NewErrorf(krberror.KRBMsgError, "Possible replay attack, nonce in response does not match that in request") - } - //if k.Ticket.SName.NameType != tgsReq.ReqBody.SName.NameType || k.Ticket.SName.NameString == nil { - // return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response ticket does not match what was requested. Requested: %v; Reply: %v", tgsReq.ReqBody.SName, k.Ticket.SName) - //} - //for i := range k.Ticket.SName.NameString { - // if k.Ticket.SName.NameString[i] != tgsReq.ReqBody.SName.NameString[i] { - // return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response ticket does not match what was requested. Requested: %+v; Reply: %+v", tgsReq.ReqBody.SName, k.Ticket.SName) - // } - //} - //if k.DecryptedEncPart.SName.NameType != tgsReq.ReqBody.SName.NameType || k.DecryptedEncPart.SName.NameString == nil { - // return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response does not match what was requested. Requested: %v; Reply: %v", tgsReq.ReqBody.SName, k.DecryptedEncPart.SName) - //} - //for i := range k.DecryptedEncPart.SName.NameString { - // if k.DecryptedEncPart.SName.NameString[i] != tgsReq.ReqBody.SName.NameString[i] { - // return false, krberror.NewErrorf(krberror.KRBMsgError, "SName in response does not match what was requested. Requested: %+v; Reply: %+v", tgsReq.ReqBody.SName, k.DecryptedEncPart.SName) - // } - //} - if k.DecryptedEncPart.SRealm != tgsReq.ReqBody.Realm { - return false, krberror.NewErrorf(krberror.KRBMsgError, "SRealm in response does not match what was requested. Requested: %s; Reply: %s", tgsReq.ReqBody.Realm, k.DecryptedEncPart.SRealm) - } - if len(k.DecryptedEncPart.CAddr) > 0 { - if !types.HostAddressesEqual(k.DecryptedEncPart.CAddr, tgsReq.ReqBody.Addresses) { - return false, krberror.NewErrorf(krberror.KRBMsgError, "Addresses listed in the TGS_REP does not match those listed in the TGS_REQ") - } - } - if time.Since(k.DecryptedEncPart.StartTime) > cfg.LibDefaults.Clockskew || k.DecryptedEncPart.StartTime.Sub(time.Now().UTC()) > cfg.LibDefaults.Clockskew { - if time.Since(k.DecryptedEncPart.AuthTime) > cfg.LibDefaults.Clockskew || k.DecryptedEncPart.AuthTime.Sub(time.Now().UTC()) > cfg.LibDefaults.Clockskew { - return false, krberror.NewErrorf(krberror.KRBMsgError, "Clock skew with KDC too large. Greater than %v seconds.", cfg.LibDefaults.Clockskew.Seconds()) - } - } - return true, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCReq.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCReq.go deleted file mode 100644 index be0ff0a0..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KDCReq.go +++ /dev/null @@ -1,402 +0,0 @@ -package messages - -// Reference: https://www.ietf.org/rfc/rfc4120.txt -// Section: 5.4.1 - -import ( - "crypto/rand" - "fmt" - "math" - "math/big" - "time" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/asn1tools" - "gopkg.in/jcmturner/gokrb5.v5/config" - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/iana" - "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" - "gopkg.in/jcmturner/gokrb5.v5/iana/flags" - "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" - "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" - "gopkg.in/jcmturner/gokrb5.v5/iana/nametype" - "gopkg.in/jcmturner/gokrb5.v5/iana/patype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -type marshalKDCReq struct { - PVNO int `asn1:"explicit,tag:1"` - MsgType int `asn1:"explicit,tag:2"` - PAData types.PADataSequence `asn1:"explicit,optional,tag:3"` - ReqBody asn1.RawValue `asn1:"explicit,tag:4"` -} - -// KDCReqFields represents the KRB_KDC_REQ fields. -type KDCReqFields struct { - PVNO int - MsgType int - PAData types.PADataSequence - ReqBody KDCReqBody - Renewal bool -} - -// ASReq implements RFC 4120 KRB_AS_REQ: https://tools.ietf.org/html/rfc4120#section-5.4.1. -type ASReq struct { - KDCReqFields -} - -// TGSReq implements RFC 4120 KRB_TGS_REQ: https://tools.ietf.org/html/rfc4120#section-5.4.1. -type TGSReq struct { - KDCReqFields -} - -type marshalKDCReqBody struct { - KDCOptions asn1.BitString `asn1:"explicit,tag:0"` - CName types.PrincipalName `asn1:"explicit,optional,tag:1"` - Realm string `asn1:"generalstring,explicit,tag:2"` - SName types.PrincipalName `asn1:"explicit,optional,tag:3"` - From time.Time `asn1:"generalized,explicit,optional,tag:4"` - Till time.Time `asn1:"generalized,explicit,tag:5"` - RTime time.Time `asn1:"generalized,explicit,optional,tag:6"` - Nonce int `asn1:"explicit,tag:7"` - EType []int32 `asn1:"explicit,tag:8"` - Addresses []types.HostAddress `asn1:"explicit,optional,tag:9"` - EncAuthData types.EncryptedData `asn1:"explicit,optional,tag:10"` - // Ticket needs to be a raw value as it is wrapped in an APPLICATION tag - AdditionalTickets asn1.RawValue `asn1:"explicit,optional,tag:11"` -} - -// KDCReqBody implements the KRB_KDC_REQ request body. -type KDCReqBody struct { - KDCOptions asn1.BitString `asn1:"explicit,tag:0"` - CName types.PrincipalName `asn1:"explicit,optional,tag:1"` - Realm string `asn1:"generalstring,explicit,tag:2"` - SName types.PrincipalName `asn1:"explicit,optional,tag:3"` - From time.Time `asn1:"generalized,explicit,optional,tag:4"` - Till time.Time `asn1:"generalized,explicit,tag:5"` - RTime time.Time `asn1:"generalized,explicit,optional,tag:6"` - Nonce int `asn1:"explicit,tag:7"` - EType []int32 `asn1:"explicit,tag:8"` - Addresses []types.HostAddress `asn1:"explicit,optional,tag:9"` - EncAuthData types.EncryptedData `asn1:"explicit,optional,tag:10"` - AdditionalTickets []Ticket `asn1:"explicit,optional,tag:11"` -} - -// NewASReqForTGT generates a new KRB_AS_REQ struct for a TGT request. -func NewASReqForTGT(realm string, c *config.Config, cname types.PrincipalName) (ASReq, error) { - sname := types.PrincipalName{ - NameType: nametype.KRB_NT_SRV_INST, - NameString: []string{"krbtgt", realm}, - } - return NewASReq(realm, c, cname, sname) -} - -// NewASReqForChgPasswd generates a new KRB_AS_REQ struct for a change password request. -func NewASReqForChgPasswd(realm string, c *config.Config, cname types.PrincipalName) (ASReq, error) { - sname := types.PrincipalName{ - NameType: nametype.KRB_NT_PRINCIPAL, - NameString: []string{"kadmin", "changepw"}, - } - return NewASReq(realm, c, cname, sname) -} - -// NewASReq generates a new KRB_AS_REQ struct for a given SNAME. -func NewASReq(realm string, c *config.Config, cname, sname types.PrincipalName) (ASReq, error) { - nonce, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt32)) - if err != nil { - return ASReq{}, err - } - t := time.Now().UTC() - // Copy the default options to make this thread safe - kopts := types.NewKrbFlags() - copy(kopts.Bytes, c.LibDefaults.KDCDefaultOptions.Bytes) - kopts.BitLength = c.LibDefaults.KDCDefaultOptions.BitLength - a := ASReq{ - KDCReqFields{ - PVNO: iana.PVNO, - MsgType: msgtype.KRB_AS_REQ, - PAData: types.PADataSequence{}, - ReqBody: KDCReqBody{ - KDCOptions: kopts, - Realm: realm, - CName: cname, - SName: sname, - Till: t.Add(c.LibDefaults.TicketLifetime), - Nonce: int(nonce.Int64()), - EType: c.LibDefaults.DefaultTktEnctypeIDs, - }, - }, - } - if c.LibDefaults.Forwardable { - types.SetFlag(&a.ReqBody.KDCOptions, flags.Forwardable) - } - if c.LibDefaults.Canonicalize { - types.SetFlag(&a.ReqBody.KDCOptions, flags.Canonicalize) - } - if c.LibDefaults.Proxiable { - types.SetFlag(&a.ReqBody.KDCOptions, flags.Proxiable) - } - if c.LibDefaults.RenewLifetime != 0 { - types.SetFlag(&a.ReqBody.KDCOptions, flags.Renewable) - a.ReqBody.RTime = t.Add(c.LibDefaults.RenewLifetime) - a.ReqBody.RTime = t.Add(time.Duration(48) * time.Hour) - } - if !c.LibDefaults.NoAddresses { - ha, err := types.LocalHostAddresses() - if err != nil { - return a, fmt.Errorf("could not get local addresses: %v", err) - } - ha = append(ha, types.HostAddressesFromNetIPs(c.LibDefaults.ExtraAddresses)...) - a.ReqBody.Addresses = ha - } - return a, nil -} - -// NewTGSReq generates a new KRB_TGS_REQ struct. -func NewTGSReq(cname types.PrincipalName, kdcRealm string, c *config.Config, tkt Ticket, sessionKey types.EncryptionKey, spn types.PrincipalName, renewal bool) (TGSReq, error) { - nonce, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt32)) - if err != nil { - return TGSReq{}, err - } - t := time.Now().UTC() - a := TGSReq{ - KDCReqFields{ - PVNO: iana.PVNO, - MsgType: msgtype.KRB_TGS_REQ, - ReqBody: KDCReqBody{ - KDCOptions: types.NewKrbFlags(), - Realm: kdcRealm, - SName: spn, - Till: t.Add(c.LibDefaults.TicketLifetime), - Nonce: int(nonce.Int64()), - EType: c.LibDefaults.DefaultTGSEnctypeIDs, - }, - Renewal: renewal, - }, - } - if c.LibDefaults.Forwardable { - types.SetFlag(&a.ReqBody.KDCOptions, flags.Forwardable) - } - if c.LibDefaults.Canonicalize { - types.SetFlag(&a.ReqBody.KDCOptions, flags.Canonicalize) - } - if c.LibDefaults.Proxiable { - types.SetFlag(&a.ReqBody.KDCOptions, flags.Proxiable) - } - if c.LibDefaults.RenewLifetime > time.Duration(0) { - types.SetFlag(&a.ReqBody.KDCOptions, flags.Renewable) - a.ReqBody.RTime = t.Add(c.LibDefaults.RenewLifetime) - } - if !c.LibDefaults.NoAddresses { - ha, err := types.LocalHostAddresses() - if err != nil { - return a, fmt.Errorf("could not get local addresses: %v", err) - } - ha = append(ha, types.HostAddressesFromNetIPs(c.LibDefaults.ExtraAddresses)...) - a.ReqBody.Addresses = ha - } - if renewal { - types.SetFlag(&a.ReqBody.KDCOptions, flags.Renew) - types.SetFlag(&a.ReqBody.KDCOptions, flags.Renewable) - } - auth, err := types.NewAuthenticator(tkt.Realm, cname) - if err != nil { - return a, krberror.Errorf(err, krberror.KRBMsgError, "error generating new authenticator") - } - // Add the CName to make validation of the reply easier - a.ReqBody.CName = auth.CName - b, err := a.ReqBody.Marshal() - if err != nil { - return a, krberror.Errorf(err, krberror.EncodingError, "error marshaling TGS_REQ body") - } - etype, err := crypto.GetEtype(sessionKey.KeyType) - if err != nil { - return a, krberror.Errorf(err, krberror.EncryptingError, "error getting etype to encrypt authenticator") - } - cb, err := etype.GetChecksumHash(sessionKey.KeyValue, b, keyusage.TGS_REQ_PA_TGS_REQ_AP_REQ_AUTHENTICATOR_CHKSUM) - if err != nil { - return a, krberror.Errorf(err, krberror.ChksumError, "error getting etype checksum hash") - } - auth.Cksum = types.Checksum{ - CksumType: etype.GetHashID(), - Checksum: cb, - } - apReq, err := NewAPReq(tkt, sessionKey, auth) - if err != nil { - return a, krberror.Errorf(err, krberror.KRBMsgError, "error generating new AP_REQ") - } - apb, err := apReq.Marshal() - if err != nil { - return a, krberror.Errorf(err, krberror.EncodingError, "error marshaling AP_REQ for pre-authentication data") - } - a.PAData = types.PADataSequence{ - types.PAData{ - PADataType: patype.PA_TGS_REQ, - PADataValue: apb, - }, - } - return a, nil -} - -// Unmarshal bytes b into the ASReq struct. -func (k *ASReq) Unmarshal(b []byte) error { - var m marshalKDCReq - _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.ASREQ)) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling AS_REQ") - } - expectedMsgType := msgtype.KRB_AS_REQ - if m.MsgType != expectedMsgType { - return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a AS_REQ. Expected: %v; Actual: %v", expectedMsgType, m.MsgType) - } - var reqb KDCReqBody - err = reqb.Unmarshal(m.ReqBody.Bytes) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "error processing AS_REQ body") - } - k.MsgType = m.MsgType - k.PAData = m.PAData - k.PVNO = m.PVNO - k.ReqBody = reqb - return nil -} - -// Unmarshal bytes b into the TGSReq struct. -func (k *TGSReq) Unmarshal(b []byte) error { - var m marshalKDCReq - _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.TGSREQ)) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling TGS_REQ") - } - expectedMsgType := msgtype.KRB_TGS_REQ - if m.MsgType != expectedMsgType { - return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a TGS_REQ. Expected: %v; Actual: %v", expectedMsgType, m.MsgType) - } - var reqb KDCReqBody - err = reqb.Unmarshal(m.ReqBody.Bytes) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error processing TGS_REQ body") - } - k.MsgType = m.MsgType - k.PAData = m.PAData - k.PVNO = m.PVNO - k.ReqBody = reqb - return nil -} - -// Unmarshal bytes b into the KRB_KDC_REQ body struct. -func (k *KDCReqBody) Unmarshal(b []byte) error { - var m marshalKDCReqBody - _, err := asn1.Unmarshal(b, &m) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling KDC_REQ body") - } - k.KDCOptions = m.KDCOptions - if len(k.KDCOptions.Bytes) < 4 { - tb := make([]byte, 4-len(k.KDCOptions.Bytes)) - k.KDCOptions.Bytes = append(tb, k.KDCOptions.Bytes...) - k.KDCOptions.BitLength = len(k.KDCOptions.Bytes) * 8 - } - k.CName = m.CName - k.Realm = m.Realm - k.SName = m.SName - k.From = m.From - k.Till = m.Till - k.RTime = m.RTime - k.Nonce = m.Nonce - k.EType = m.EType - k.Addresses = m.Addresses - k.EncAuthData = m.EncAuthData - if len(m.AdditionalTickets.Bytes) > 0 { - k.AdditionalTickets, err = UnmarshalTicketsSequence(m.AdditionalTickets) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling additional tickets") - } - } - return nil -} - -// Marshal ASReq struct. -func (k *ASReq) Marshal() ([]byte, error) { - m := marshalKDCReq{ - PVNO: k.PVNO, - MsgType: k.MsgType, - PAData: k.PAData, - } - b, err := k.ReqBody.Marshal() - if err != nil { - var mk []byte - return mk, err - } - m.ReqBody = asn1.RawValue{ - Class: asn1.ClassContextSpecific, - IsCompound: true, - Tag: 4, - Bytes: b, - } - mk, err := asn1.Marshal(m) - if err != nil { - return mk, krberror.Errorf(err, krberror.EncodingError, "Error marshaling AS_REQ") - } - mk = asn1tools.AddASNAppTag(mk, asnAppTag.ASREQ) - return mk, nil -} - -// Marshal TGSReq struct. -func (k *TGSReq) Marshal() ([]byte, error) { - m := marshalKDCReq{ - PVNO: k.PVNO, - MsgType: k.MsgType, - PAData: k.PAData, - } - b, err := k.ReqBody.Marshal() - if err != nil { - var mk []byte - return mk, err - } - m.ReqBody = asn1.RawValue{ - Class: asn1.ClassContextSpecific, - IsCompound: true, - Tag: 4, - Bytes: b, - } - mk, err := asn1.Marshal(m) - if err != nil { - return mk, krberror.Errorf(err, krberror.EncodingError, "Error marshaling AS_REQ") - } - mk = asn1tools.AddASNAppTag(mk, asnAppTag.TGSREQ) - return mk, nil -} - -// Marshal KRB_KDC_REQ body struct. -func (k *KDCReqBody) Marshal() ([]byte, error) { - var b []byte - m := marshalKDCReqBody{ - KDCOptions: k.KDCOptions, - CName: k.CName, - Realm: k.Realm, - SName: k.SName, - From: k.From, - Till: k.Till, - RTime: k.RTime, - Nonce: k.Nonce, - EType: k.EType, - Addresses: k.Addresses, - EncAuthData: k.EncAuthData, - } - rawtkts, err := MarshalTicketSequence(k.AdditionalTickets) - if err != nil { - return b, krberror.Errorf(err, krberror.EncodingError, "Error in marshaling KDC request body additional tickets") - } - //The asn1.rawValue needs the tag setting on it for where it is in the KDCReqBody - rawtkts.Tag = 11 - if len(rawtkts.Bytes) > 0 { - m.AdditionalTickets = rawtkts - } - b, err = asn1.Marshal(m) - if err != nil { - return b, krberror.Errorf(err, krberror.EncodingError, "Error in marshaling KDC request body") - } - return b, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBCred.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBCred.go deleted file mode 100644 index 0739d977..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBCred.go +++ /dev/null @@ -1,102 +0,0 @@ -package messages - -import ( - "fmt" - "time" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" - "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" - "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -type marshalKRBCred struct { - PVNO int `asn1:"explicit,tag:0"` - MsgType int `asn1:"explicit,tag:1"` - Tickets asn1.RawValue `asn1:"explicit,tag:2"` - EncPart types.EncryptedData `asn1:"explicit,tag:3"` -} - -// KRBCred implements RFC 4120 KRB_CRED: https://tools.ietf.org/html/rfc4120#section-5.8.1. -type KRBCred struct { - PVNO int - MsgType int - Tickets []Ticket - EncPart types.EncryptedData - DecryptedEncPart EncKrbCredPart -} - -// EncKrbCredPart is the encrypted part of KRB_CRED. -type EncKrbCredPart struct { - TicketInfo []KrbCredInfo `asn1:"explicit,tag:0"` - Nouce int `asn1:"optional,explicit,tag:1"` - Timestamp time.Time `asn1:"generalized,optional,explicit,tag:2"` - Usec int `asn1:"optional,explicit,tag:3"` - SAddress types.HostAddress `asn1:"optional,explicit,tag:4"` - RAddress types.HostAddress `asn1:"optional,explicit,tag:5"` -} - -// KrbCredInfo is the KRB_CRED_INFO part of KRB_CRED. -type KrbCredInfo struct { - Key types.EncryptionKey `asn1:"explicit,tag:0"` - PRealm string `asn1:"generalstring,optional,explicit,tag:1"` - PName types.PrincipalName `asn1:"optional,explicit,tag:2"` - Flags asn1.BitString `asn1:"optional,explicit,tag:3"` - AuthTime time.Time `asn1:"generalized,optional,explicit,tag:4"` - StartTime time.Time `asn1:"generalized,optional,explicit,tag:5"` - EndTime time.Time `asn1:"generalized,optional,explicit,tag:6"` - RenewTill time.Time `asn1:"generalized,optional,explicit,tag:7"` - SRealm string `asn1:"optional,explicit,ia5,tag:8"` - SName types.PrincipalName `asn1:"optional,explicit,tag:9"` - CAddr types.HostAddresses `asn1:"optional,explicit,tag:10"` -} - -// Unmarshal bytes b into the KRBCred struct. -func (k *KRBCred) Unmarshal(b []byte) error { - var m marshalKRBCred - _, err := asn1.UnmarshalWithParams(b, &m, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.KRBCred)) - if err != nil { - return processUnmarshalReplyError(b, err) - } - expectedMsgType := msgtype.KRB_CRED - if m.MsgType != expectedMsgType { - return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a KRB_CRED. Expected: %v; Actual: %v", expectedMsgType, m.MsgType) - } - k.PVNO = m.PVNO - k.MsgType = m.MsgType - k.EncPart = m.EncPart - if len(m.Tickets.Bytes) > 0 { - k.Tickets, err = UnmarshalTicketsSequence(m.Tickets) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling tickets within KRB_CRED") - } - } - return nil -} - -// DecryptEncPart decrypts the encrypted part of a KRB_CRED. -func (k *KRBCred) DecryptEncPart(key types.EncryptionKey) error { - b, err := crypto.DecryptEncPart(k.EncPart, key, keyusage.KRB_CRED_ENCPART) - if err != nil { - return krberror.Errorf(err, krberror.DecryptingError, "Error decrypting KRB_CRED EncPart") - } - var denc EncKrbCredPart - err = denc.Unmarshal(b) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling encrypted part of KRB_CRED") - } - k.DecryptedEncPart = denc - return nil -} - -// Unmarshal bytes b into the encrypted part of KRB_CRED. -func (k *EncKrbCredPart) Unmarshal(b []byte) error { - _, err := asn1.UnmarshalWithParams(b, k, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.EncKrbCredPart)) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "Error unmarshaling EncKrbCredPart") - } - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBError.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBError.go deleted file mode 100644 index 29ec8be0..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBError.go +++ /dev/null @@ -1,83 +0,0 @@ -// Package messages implements Kerberos 5 message types and methods. -package messages - -import ( - "fmt" - "time" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/iana" - "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" - "gopkg.in/jcmturner/gokrb5.v5/iana/errorcode" - "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// KRBError implements RFC 4120 KRB_ERROR: https://tools.ietf.org/html/rfc4120#section-5.9.1. -type KRBError struct { - PVNO int `asn1:"explicit,tag:0"` - MsgType int `asn1:"explicit,tag:1"` - CTime time.Time `asn1:"generalized,optional,explicit,tag:2"` - Cusec int `asn1:"optional,explicit,tag:3"` - STime time.Time `asn1:"generalized,explicit,tag:4"` - Susec int `asn1:"explicit,tag:5"` - ErrorCode int32 `asn1:"explicit,tag:6"` - CRealm string `asn1:"generalstring,optional,explicit,tag:7"` - CName types.PrincipalName `asn1:"optional,explicit,tag:8"` - Realm string `asn1:"generalstring,explicit,tag:9"` - SName types.PrincipalName `asn1:"explicit,tag:10"` - EText string `asn1:"generalstring,optional,explicit,tag:11"` - EData []byte `asn1:"optional,explicit,tag:12"` -} - -// NewKRBError creates a new KRBError. -func NewKRBError(sname types.PrincipalName, realm string, code int32, etext string) KRBError { - t := time.Now().UTC() - return KRBError{ - PVNO: iana.PVNO, - MsgType: msgtype.KRB_ERROR, - STime: t, - Susec: int((t.UnixNano() / int64(time.Microsecond)) - (t.Unix() * 1e6)), - ErrorCode: code, - SName: sname, - Realm: realm, - EText: etext, - } -} - -// Unmarshal bytes b into the KRBError struct. -func (k *KRBError) Unmarshal(b []byte) error { - _, err := asn1.UnmarshalWithParams(b, k, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.KRBError)) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "KRB_ERROR unmarshal error") - } - expectedMsgType := msgtype.KRB_ERROR - if k.MsgType != expectedMsgType { - return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a KRB_ERROR. Expected: %v; Actual: %v", expectedMsgType, k.MsgType) - } - return nil -} - -// Error method implementing error interface on KRBError struct. -func (k KRBError) Error() string { - etxt := fmt.Sprintf("KRB Error: %s", errorcode.Lookup(k.ErrorCode)) - if k.EText != "" { - etxt = fmt.Sprintf("%s - %s", etxt, k.EText) - } - return etxt -} - -func processUnmarshalReplyError(b []byte, err error) error { - switch err.(type) { - case asn1.StructuralError: - var krberr KRBError - tmperr := krberr.Unmarshal(b) - if tmperr != nil { - return krberror.Errorf(err, krberror.EncodingError, "Failed to unmarshal KDC's reply") - } - return krberr - default: - return krberror.Errorf(err, krberror.EncodingError, "Failed to unmarshal KDC's reply") - } -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBPriv.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBPriv.go deleted file mode 100644 index d0a2a171..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBPriv.go +++ /dev/null @@ -1,108 +0,0 @@ -package messages - -import ( - "fmt" - "time" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/asn1tools" - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/iana" - "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" - "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" - "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// KRBPriv implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.7.1. -type KRBPriv struct { - PVNO int `asn1:"explicit,tag:0"` - MsgType int `asn1:"explicit,tag:1"` - EncPart types.EncryptedData `asn1:"explicit,tag:3"` - DecryptedEncPart EncKrbPrivPart `asn1:"optional,omitempty"` // Not part of ASN1 bytes so marked as optional so unmarshalling works -} - -// EncKrbPrivPart is the encrypted part of KRB_PRIV. -type EncKrbPrivPart struct { - UserData []byte `asn1:"explicit,tag:0"` - Timestamp time.Time `asn1:"generalized,optional,explicit,tag:1"` - Usec int `asn1:"optional,explicit,tag:2"` - SequenceNumber int64 `asn1:"optional,explicit,tag:3"` - SAddress types.HostAddress `asn1:"explicit,tag:4"` - RAddress types.HostAddress `asn1:"optional,explicit,tag:5"` -} - -// NewKRBPriv returns a new KRBPriv type. -func NewKRBPriv(part EncKrbPrivPart) KRBPriv { - return KRBPriv{ - PVNO: iana.PVNO, - MsgType: msgtype.KRB_PRIV, - DecryptedEncPart: part, - } -} - -// Unmarshal bytes b into the KRBPriv struct. -func (k *KRBPriv) Unmarshal(b []byte) error { - _, err := asn1.UnmarshalWithParams(b, k, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.KRBPriv)) - if err != nil { - return processUnmarshalReplyError(b, err) - } - expectedMsgType := msgtype.KRB_PRIV - if k.MsgType != expectedMsgType { - return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a KRB_PRIV. Expected: %v; Actual: %v", expectedMsgType, k.MsgType) - } - return nil -} - -// Unmarshal bytes b into the EncKrbPrivPart struct. -func (k *EncKrbPrivPart) Unmarshal(b []byte) error { - _, err := asn1.UnmarshalWithParams(b, k, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.EncKrbPrivPart)) - if err != nil { - return krberror.Errorf(err, krberror.EncodingError, "KRB_PRIV unmarshal error") - } - return nil -} - -// Marshal the KRBPriv. -func (k *KRBPriv) Marshal() ([]byte, error) { - tk := KRBPriv{ - PVNO: k.PVNO, - MsgType: k.MsgType, - EncPart: k.EncPart, - } - b, err := asn1.Marshal(tk) - if err != nil { - return []byte{}, err - } - b = asn1tools.AddASNAppTag(b, asnAppTag.KRBPriv) - return b, nil -} - -// EncryptEncPart encrypts the DecryptedEncPart within the KRBPriv. -// Use to prepare for marshaling. -func (k *KRBPriv) EncryptEncPart(key types.EncryptionKey) error { - b, err := asn1.Marshal(k.DecryptedEncPart) - if err != nil { - return err - } - b = asn1tools.AddASNAppTag(b, asnAppTag.EncKrbPrivPart) - k.EncPart, err = crypto.GetEncryptedData(b, key, keyusage.KRB_PRIV_ENCPART, 1) - if err != nil { - return err - } - return nil -} - -// DecryptEncPart decrypts the encrypted part of the KRBPriv message. -func (k *KRBPriv) DecryptEncPart(key types.EncryptionKey) error { - b, err := crypto.DecryptEncPart(k.EncPart, key, keyusage.KRB_PRIV_ENCPART) - if err != nil { - return fmt.Errorf("error decrypting KRBPriv EncPart: %v", err) - } - err = k.DecryptedEncPart.Unmarshal(b) - if err != nil { - return fmt.Errorf("error unmarshaling encrypted part: %v", err) - } - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBSafe.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBSafe.go deleted file mode 100644 index 47bd4672..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/KRBSafe.go +++ /dev/null @@ -1,61 +0,0 @@ -package messages - -import ( - "fmt" - "time" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" - "gopkg.in/jcmturner/gokrb5.v5/iana/msgtype" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -/* -KRB-SAFE ::= [APPLICATION 20] SEQUENCE { - pvno [0] INTEGER (5), - msg-type [1] INTEGER (20), - safe-body [2] KRB-SAFE-BODY, - cksum [3] Checksum -} - -KRB-SAFE-BODY ::= SEQUENCE { - user-data [0] OCTET STRING, - timestamp [1] KerberosTime OPTIONAL, - usec [2] Microseconds OPTIONAL, - seq-number [3] UInt32 OPTIONAL, - s-address [4] HostAddress, - r-address [5] HostAddress OPTIONAL -} -*/ - -// KRBSafe implements RFC 4120 KRB_SAFE: https://tools.ietf.org/html/rfc4120#section-5.6.1. -type KRBSafe struct { - PVNO int `asn1:"explicit,tag:0"` - MsgType int `asn1:"explicit,tag:1"` - SafeBody KRBSafeBody `asn1:"explicit,tag:2"` - Cksum types.Checksum `asn1:"explicit,tag:3"` -} - -// KRBSafeBody implements the KRB_SAFE_BODY of KRB_SAFE. -type KRBSafeBody struct { - UserData []byte `asn1:"explicit,tag:0"` - Timestamp time.Time `asn1:"generalized,optional,explicit,tag:1"` - Usec int `asn1:"optional,explicit,tag:2"` - SequenceNumber int64 `asn1:"optional,explicit,tag:3"` - SAddress types.HostAddress `asn1:"explicit,tag:4"` - RAddress types.HostAddress `asn1:"optional,explicit,tag:5"` -} - -// Unmarshal bytes b into the KRBSafe struct. -func (s *KRBSafe) Unmarshal(b []byte) error { - _, err := asn1.UnmarshalWithParams(b, s, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.KRBSafe)) - if err != nil { - return processUnmarshalReplyError(b, err) - } - expectedMsgType := msgtype.KRB_SAFE - if s.MsgType != expectedMsgType { - return krberror.NewErrorf(krberror.KRBMsgError, "Message ID does not indicate a KRB_SAFE. Expected: %v; Actual: %v", expectedMsgType, s.MsgType) - } - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/Ticket.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/Ticket.go deleted file mode 100644 index 89faea61..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/messages/Ticket.go +++ /dev/null @@ -1,251 +0,0 @@ -package messages - -import ( - "crypto/rand" - "fmt" - "strings" - "time" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/asn1tools" - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/iana" - "gopkg.in/jcmturner/gokrb5.v5/iana/adtype" - "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" - "gopkg.in/jcmturner/gokrb5.v5/iana/errorcode" - "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" - "gopkg.in/jcmturner/gokrb5.v5/keytab" - "gopkg.in/jcmturner/gokrb5.v5/krberror" - "gopkg.in/jcmturner/gokrb5.v5/pac" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// Reference: https://www.ietf.org/rfc/rfc4120.txt -// Section: 5.3 - -// Ticket implements the Kerberos ticket. -type Ticket struct { - TktVNO int `asn1:"explicit,tag:0"` - Realm string `asn1:"generalstring,explicit,tag:1"` - SName types.PrincipalName `asn1:"explicit,tag:2"` - EncPart types.EncryptedData `asn1:"explicit,tag:3"` - DecryptedEncPart EncTicketPart `asn1:"optional"` // Not part of ASN1 bytes so marked as optional so unmarshalling works -} - -// EncTicketPart is the encrypted part of the Ticket. -type EncTicketPart struct { - Flags asn1.BitString `asn1:"explicit,tag:0"` - Key types.EncryptionKey `asn1:"explicit,tag:1"` - CRealm string `asn1:"generalstring,explicit,tag:2"` - CName types.PrincipalName `asn1:"explicit,tag:3"` - Transited TransitedEncoding `asn1:"explicit,tag:4"` - AuthTime time.Time `asn1:"generalized,explicit,tag:5"` - StartTime time.Time `asn1:"generalized,explicit,optional,tag:6"` - EndTime time.Time `asn1:"generalized,explicit,tag:7"` - RenewTill time.Time `asn1:"generalized,explicit,optional,tag:8"` - CAddr types.HostAddresses `asn1:"explicit,optional,tag:9"` - AuthorizationData types.AuthorizationData `asn1:"explicit,optional,tag:10"` -} - -// TransitedEncoding part of the ticket's encrypted part. -type TransitedEncoding struct { - TRType int32 `asn1:"explicit,tag:0"` - Contents []byte `asn1:"explicit,tag:1"` -} - -// NewTicket creates a new Ticket instance. -func NewTicket(cname types.PrincipalName, crealm string, sname types.PrincipalName, srealm string, flags asn1.BitString, sktab keytab.Keytab, eTypeID int32, kvno int, authTime, startTime, endTime, renewTill time.Time) (Ticket, types.EncryptionKey, error) { - etype, err := crypto.GetEtype(eTypeID) - if err != nil { - return Ticket{}, types.EncryptionKey{}, krberror.Errorf(err, krberror.EncryptingError, "error getting etype for new ticket") - } - ks := etype.GetKeyByteSize() - kv := make([]byte, ks, ks) - rand.Read(kv) - sessionKey := types.EncryptionKey{ - KeyType: eTypeID, - KeyValue: kv, - } - etp := EncTicketPart{ - Flags: flags, - Key: sessionKey, - CRealm: crealm, - CName: cname, - Transited: TransitedEncoding{}, - AuthTime: authTime, - StartTime: startTime, - EndTime: endTime, - RenewTill: renewTill, - } - b, err := asn1.Marshal(etp) - if err != nil { - return Ticket{}, types.EncryptionKey{}, krberror.Errorf(err, krberror.EncodingError, "error marshalling ticket encpart") - } - b = asn1tools.AddASNAppTag(b, asnAppTag.EncTicketPart) - skey, err := sktab.GetEncryptionKey(sname.NameString, srealm, kvno, eTypeID) - if err != nil { - return Ticket{}, types.EncryptionKey{}, krberror.Errorf(err, krberror.EncryptingError, "error getting encryption key for new ticket") - } - ed, err := crypto.GetEncryptedData(b, skey, keyusage.KDC_REP_TICKET, kvno) - if err != nil { - return Ticket{}, types.EncryptionKey{}, krberror.Errorf(err, krberror.EncryptingError, "error encrypting ticket encpart") - } - tkt := Ticket{ - TktVNO: iana.PVNO, - Realm: srealm, - SName: sname, - EncPart: ed, - } - return tkt, sessionKey, nil -} - -// Unmarshal bytes b into a Ticket struct. -func (t *Ticket) Unmarshal(b []byte) error { - _, err := asn1.UnmarshalWithParams(b, t, fmt.Sprintf("application,explicit,tag:%d", asnAppTag.Ticket)) - return err -} - -// Marshal the Ticket. -func (t *Ticket) Marshal() ([]byte, error) { - b, err := asn1.Marshal(*t) - if err != nil { - return nil, err - } - b = asn1tools.AddASNAppTag(b, asnAppTag.Ticket) - return b, nil -} - -// Unmarshal bytes b into the EncTicketPart struct. -func (t *EncTicketPart) Unmarshal(b []byte) error { - _, err := asn1.UnmarshalWithParams(b, t, fmt.Sprintf("application,explicit,tag:%d", asnAppTag.EncTicketPart)) - return err -} - -// UnmarshalTicket returns a ticket from the bytes provided. -func UnmarshalTicket(b []byte) (t Ticket, err error) { - _, err = asn1.UnmarshalWithParams(b, &t, fmt.Sprintf("application,explicit,tag:%d", asnAppTag.Ticket)) - return -} - -// UnmarshalTicketsSequence returns a slice of Tickets from a raw ASN1 value. -func UnmarshalTicketsSequence(in asn1.RawValue) ([]Ticket, error) { - //This is a workaround to a asn1 decoding issue in golang - https://github.com/golang/go/issues/17321. It's not pretty I'm afraid - //We pull out raw values from the larger raw value (that is actually the data of the sequence of raw values) and track our position moving along the data. - b := in.Bytes - // Ignore the head of the asn1 stream (1 byte for tag and those for the length) as this is what tells us its a sequence but we're handling it ourselves - p := 1 + asn1tools.GetNumberBytesInLengthHeader(in.Bytes) - var tkts []Ticket - var raw asn1.RawValue - for p < (len(b)) { - _, err := asn1.UnmarshalWithParams(b[p:], &raw, fmt.Sprintf("application,tag:%d", asnAppTag.Ticket)) - if err != nil { - return nil, fmt.Errorf("unmarshaling sequence of tickets failed geting length of ticket: %v", err) - } - t, err := UnmarshalTicket(b[p:]) - if err != nil { - return nil, fmt.Errorf("unmarshaling sequence of tickets failed: %v", err) - } - p += len(raw.FullBytes) - tkts = append(tkts, t) - } - MarshalTicketSequence(tkts) - return tkts, nil -} - -// MarshalTicketSequence marshals a slice of Tickets returning an ASN1 raw value containing the ticket sequence. -func MarshalTicketSequence(tkts []Ticket) (asn1.RawValue, error) { - raw := asn1.RawValue{ - Class: 2, - IsCompound: true, - } - if len(tkts) < 1 { - // There are no tickets to marshal - return raw, nil - } - var btkts []byte - for i, t := range tkts { - b, err := t.Marshal() - if err != nil { - return raw, fmt.Errorf("error marshaling ticket number %d in seqence of tickets", i+1) - } - btkts = append(btkts, b...) - } - // The ASN1 wrapping consists of 2 bytes: - // 1st byte -> Identifier Octet - In this case an OCTET STRING (ASN TAG - // 2nd byte -> The length (this will be the size indicated in the input bytes + 2 for the additional bytes we add here. - // Application Tag: - //| Byte: | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | - //| Value: | 0 | 1 | 1 | From the RFC spec 4120 | - //| Explanation | Defined by the ASN1 encoding rules for an application tag | A value of 1 indicates a constructed type | The ASN Application tag value | - btkts = append(asn1tools.MarshalLengthBytes(len(btkts)), btkts...) - btkts = append([]byte{byte(32 + asn1.TagSequence)}, btkts...) - raw.Bytes = btkts - // If we need to create the full bytes then identifier octet is "context-specific" = 128 + "constructed" + 32 + the wrapping explicit tag (11) - //fmt.Fprintf(os.Stderr, "mRaw fb: %v\n", raw.FullBytes) - return raw, nil -} - -// DecryptEncPart decrypts the encrypted part of the ticket. -func (t *Ticket) DecryptEncPart(keytab keytab.Keytab, ktprinc string) error { - var upn types.PrincipalName - realm := t.Realm - if ktprinc != "" { - var r string - upn, r = types.ParseSPNString(ktprinc) - if r != "" { - realm = r - } - } else { - upn = t.SName - } - key, err := keytab.GetEncryptionKey(upn.NameString, realm, t.EncPart.KVNO, t.EncPart.EType) - if err != nil { - return NewKRBError(t.SName, t.Realm, errorcode.KRB_AP_ERR_NOKEY, fmt.Sprintf("Could not get key from keytab: %v", err)) - } - b, err := crypto.DecryptEncPart(t.EncPart, key, keyusage.KDC_REP_TICKET) - if err != nil { - return fmt.Errorf("error decrypting Ticket EncPart: %v", err) - } - var denc EncTicketPart - err = denc.Unmarshal(b) - if err != nil { - return fmt.Errorf("error unmarshaling encrypted part: %v", err) - } - t.DecryptedEncPart = denc - return nil -} - -// GetPACType returns a Microsoft PAC that has been extracted from the ticket and processed. -func (t *Ticket) GetPACType(keytab keytab.Keytab, sa string) (bool, pac.PACType, error) { - var isPAC bool - for _, ad := range t.DecryptedEncPart.AuthorizationData { - if ad.ADType == adtype.ADIfRelevant { - var ad2 types.AuthorizationData - err := ad2.Unmarshal(ad.ADData) - if err != nil { - continue - } - if ad2[0].ADType == adtype.ADWin2KPAC { - isPAC = true - var p pac.PACType - err = p.Unmarshal(ad2[0].ADData) - if err != nil { - return isPAC, p, fmt.Errorf("error unmarshaling PAC: %v", err) - } - var upn []string - if sa != "" { - upn = strings.Split(sa, "/") - } else { - upn = t.SName.NameString - } - key, err := keytab.GetEncryptionKey(upn, t.Realm, t.EncPart.KVNO, t.EncPart.EType) - if err != nil { - return isPAC, p, NewKRBError(t.SName, t.Realm, errorcode.KRB_AP_ERR_NOKEY, fmt.Sprintf("Could not get key from keytab: %v", err)) - } - err = p.ProcessPACInfoBuffers(key) - return isPAC, p, err - } - } - } - return isPAC, pac.PACType{}, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/claims_set_metadata.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/claims_set_metadata.go deleted file mode 100644 index d53b63db..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/claims_set_metadata.go +++ /dev/null @@ -1,39 +0,0 @@ -package mstypes - -import ( - "encoding/binary" - - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// ClaimsSetMetadata implements https://msdn.microsoft.com/en-us/library/hh554073.aspx -type ClaimsSetMetadata struct { - ULClaimsSetSize uint32 - ClaimsSet []byte - USCompressionFormat uint32 // Enum see constants below for options - ULUncompressedClaimsSetSize uint32 - USReservedType uint16 - ULReservedFieldSize uint32 - ReservedField []byte -} - -// Compression format assigned numbers. -const ( - CompressionFormatNone = 0 - CompressionFormatLZNT1 = 2 - CompressionFormatXPress = 3 - CompressionFormatXPressHuff = 4 -) - -// ReadClaimsSetMetadata reads a ClaimsSetMetadata from the bytes slice. -func ReadClaimsSetMetadata(b *[]byte, p *int, e *binary.ByteOrder) ClaimsSetMetadata { - var c ClaimsSetMetadata - c.ULClaimsSetSize = ndr.ReadUint32(b, p, e) - c.ClaimsSet = ndr.ReadBytes(b, p, int(c.ULClaimsSetSize), e) - c.USCompressionFormat = ndr.ReadUint32(b, p, e) - c.ULUncompressedClaimsSetSize = ndr.ReadUint32(b, p, e) - c.USReservedType = ndr.ReadUint16(b, p, e) - c.ULReservedFieldSize = ndr.ReadUint32(b, p, e) - c.ReservedField = ndr.ReadBytes(b, p, int(c.ULReservedFieldSize), e) - return c -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/filetime.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/filetime.go deleted file mode 100644 index f67912ad..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/filetime.go +++ /dev/null @@ -1,65 +0,0 @@ -// Package mstypes implements representations of Microsoft types for PAC processing. -package mstypes - -import ( - "encoding/binary" - "time" - - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -/* -FILETIME is a windows data structure. -Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724284%28v=vs.85%29.aspx -It contains two parts that are 32bit integers: - dwLowDateTime - dwHighDateTime -We need to combine these two into one 64bit integer. -This gives the number of 100 nano second period from January 1, 1601, Coordinated Universal Time (UTC) -*/ - -const unixEpochDiff = 116444736000000000 - -// FileTime implements the Microsoft FILETIME type https://msdn.microsoft.com/en-us/library/cc230324.aspx -type FileTime struct { - LowDateTime uint32 - HighDateTime uint32 -} - -// Time return a golang Time type from the FileTime -func (ft FileTime) Time() time.Time { - ns := (ft.MSEpoch() - unixEpochDiff) * 100 - return time.Unix(0, int64(ns)).UTC() -} - -// MSEpoch returns the FileTime as a Microsoft epoch, the number of 100 nano second periods elapsed from January 1, 1601 UTC. -func (ft FileTime) MSEpoch() int64 { - return (int64(ft.HighDateTime) << 32) + int64(ft.LowDateTime) -} - -// Unix returns the FileTime as a Unix time, the number of seconds elapsed since January 1, 1970 UTC. -func (ft FileTime) Unix() int64 { - return (ft.MSEpoch() - unixEpochDiff) / 10000000 -} - -// GetFileTime returns a FileTime type from the provided Golang Time type. -func GetFileTime(t time.Time) FileTime { - ns := t.UnixNano() - fp := (ns / 100) + unixEpochDiff - hd := fp >> 32 - ld := fp - (hd << 32) - return FileTime{ - LowDateTime: uint32(ld), - HighDateTime: uint32(hd), - } -} - -// ReadFileTime reads a FileTime from the bytes slice. -func ReadFileTime(b *[]byte, p *int, e *binary.ByteOrder) FileTime { - l := ndr.ReadUint32(b, p, e) - h := ndr.ReadUint32(b, p, e) - return FileTime{ - LowDateTime: l, - HighDateTime: h, - } -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/group_membership.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/group_membership.go deleted file mode 100644 index 4801c205..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/group_membership.go +++ /dev/null @@ -1,53 +0,0 @@ -package mstypes - -import ( - "encoding/binary" - - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// GroupMembership implements https://msdn.microsoft.com/en-us/library/cc237945.aspx -// RelativeID : A 32-bit unsigned integer that contains the RID of a particular group. -// The possible values for the Attributes flags are identical to those specified in KERB_SID_AND_ATTRIBUTES -type GroupMembership struct { - RelativeID uint32 - Attributes uint32 -} - -// ReadGroupMembership reads a GroupMembership from the bytes slice. -func ReadGroupMembership(b *[]byte, p *int, e *binary.ByteOrder) GroupMembership { - r := ndr.ReadUint32(b, p, e) - a := ndr.ReadUint32(b, p, e) - return GroupMembership{ - RelativeID: r, - Attributes: a, - } -} - -// DomainGroupMembership implements https://msdn.microsoft.com/en-us/library/hh536344.aspx -// DomainId: A SID structure that contains the SID for the domain.This member is used in conjunction with the GroupIds members to create group SIDs for the device. -// GroupCount: A 32-bit unsigned integer that contains the number of groups within the domain to which the account belongs. -// GroupIds: A pointer to a list of GROUP_MEMBERSHIP structures that contain the groups to which the account belongs in the domain. The number of groups in this list MUST be equal to GroupCount. -type DomainGroupMembership struct { - DomainID RPCSID - GroupCount uint32 - GroupIDs []GroupMembership // Size is value of GroupCount -} - -// ReadDomainGroupMembership reads a DomainGroupMembership from the bytes slice. -func ReadDomainGroupMembership(b *[]byte, p *int, e *binary.ByteOrder) (DomainGroupMembership, error) { - d, err := ReadRPCSID(b, p, e) - if err != nil { - return DomainGroupMembership{}, err - } - c := ndr.ReadUint32(b, p, e) - g := make([]GroupMembership, c, c) - for i := range g { - g[i] = ReadGroupMembership(b, p, e) - } - return DomainGroupMembership{ - DomainID: d, - GroupCount: c, - GroupIDs: g, - }, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/kerb_sid_and_attributes.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/kerb_sid_and_attributes.go deleted file mode 100644 index f84c578c..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/kerb_sid_and_attributes.go +++ /dev/null @@ -1,42 +0,0 @@ -package mstypes - -import ( - "encoding/binary" - - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// Attributes of a security group membership and can be combined by using the bitwise OR operation. -// They are used by an access check mechanism to specify whether the membership is to be used in an access check decision. -const ( - SEGroupMandatory = 31 - SEGroupEnabledByDefault = 30 - SEGroupEnabled = 29 - SEGroupOwner = 28 - SEGroupResource = 2 - //All other bits MUST be set to zero and MUST be ignored on receipt. -) - -// KerbSidAndAttributes implements https://msdn.microsoft.com/en-us/library/cc237947.aspx -type KerbSidAndAttributes struct { - SID RPCSID // A pointer to an RPC_SID structure. - Attributes uint32 -} - -// ReadKerbSidAndAttributes reads a KerbSidAndAttribute from the bytes slice. -func ReadKerbSidAndAttributes(b *[]byte, p *int, e *binary.ByteOrder) (KerbSidAndAttributes, error) { - s, err := ReadRPCSID(b, p, e) - if err != nil { - return KerbSidAndAttributes{}, err - } - a := ndr.ReadUint32(b, p, e) - return KerbSidAndAttributes{ - SID: s, - Attributes: a, - }, nil -} - -// SetFlag sets a flag in a uint32 attribute value. -func SetFlag(a *uint32, i uint) { - *a = *a | (1 << (31 - i)) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/rpc_unicode_string.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/rpc_unicode_string.go deleted file mode 100644 index 3c38afe2..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/rpc_unicode_string.go +++ /dev/null @@ -1,36 +0,0 @@ -package mstypes - -import ( - "encoding/binary" - - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// RPCUnicodeString implements https://msdn.microsoft.com/en-us/library/cc230365.aspx -type RPCUnicodeString struct { - Length uint16 // The length, in bytes, of the string pointed to by the Buffer member, not including the terminating null character if any. The length MUST be a multiple of 2. The length SHOULD equal the entire size of the Buffer, in which case there is no terminating null character. Any method that accesses this structure MUST use the Length specified instead of relying on the presence or absence of a null character. - MaximumLength uint16 // The maximum size, in bytes, of the string pointed to by Buffer. The size MUST be a multiple of 2. If not, the size MUST be decremented by 1 prior to use. This value MUST not be less than Length. - BufferPrt uint32 // A pointer to a string buffer. If MaximumLength is greater than zero, the buffer MUST contain a non-null value. - Value string -} - -// ReadRPCUnicodeString reads a RPCUnicodeString from the bytes slice. -func ReadRPCUnicodeString(b *[]byte, p *int, e *binary.ByteOrder) (RPCUnicodeString, error) { - l := ndr.ReadUint16(b, p, e) - ml := ndr.ReadUint16(b, p, e) - if ml < l || l%2 != 0 || ml%2 != 0 { - return RPCUnicodeString{}, ndr.Malformed{EText: "Invalid data for RPC_UNICODE_STRING"} - } - ptr := ndr.ReadUint32(b, p, e) - return RPCUnicodeString{ - Length: l, - MaximumLength: ml, - BufferPrt: ptr, - }, nil -} - -// UnmarshalString populates a golang string into the RPCUnicodeString struct. -func (s *RPCUnicodeString) UnmarshalString(b *[]byte, p *int, e *binary.ByteOrder) (err error) { - s.Value, err = ndr.ReadConformantVaryingString(b, p, e) - return -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/sid.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/sid.go deleted file mode 100644 index 0a62fa19..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/sid.go +++ /dev/null @@ -1,70 +0,0 @@ -package mstypes - -import ( - "encoding/binary" - "encoding/hex" - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// RPCSID implements https://msdn.microsoft.com/en-us/library/cc230364.aspx -type RPCSID struct { - Revision uint8 // An 8-bit unsigned integer that specifies the revision level of the SID. This value MUST be set to 0x01. - SubAuthorityCount uint8 // An 8-bit unsigned integer that specifies the number of elements in the SubAuthority array. The maximum number of elements allowed is 15. - IdentifierAuthority RPCSIDIdentifierAuthority // An RPC_SID_IDENTIFIER_AUTHORITY structure that indicates the authority under which the SID was created. It describes the entity that created the SID. The Identifier Authority value {0,0,0,0,0,5} denotes SIDs created by the NT SID authority. - SubAuthority []uint32 // A variable length array of unsigned 32-bit integers that uniquely identifies a principal relative to the IdentifierAuthority. Its length is determined by SubAuthorityCount. -} - -// RPCSIDIdentifierAuthority implements https://msdn.microsoft.com/en-us/library/cc230372.aspx -type RPCSIDIdentifierAuthority struct { - Value []byte // 6 bytes -} - -// ReadRPCSID reads a RPC_SID from the bytes slice. -func ReadRPCSID(b *[]byte, p *int, e *binary.ByteOrder) (RPCSID, error) { - size := int(ndr.ReadUint32(b, p, e)) // This is part of the NDR encoding rather than the data type. - r := ndr.ReadUint8(b, p) - if r != uint8(1) { - return RPCSID{}, ndr.Malformed{EText: fmt.Sprintf("SID revision value read as %d when it must be 1", r)} - } - c := ndr.ReadUint8(b, p) - a := ReadRPCSIDIdentifierAuthority(b, p, e) - s := make([]uint32, c, c) - if size != len(s) { - return RPCSID{}, ndr.Malformed{EText: fmt.Sprintf("Number of elements (%d) within SID in the byte stream does not equal the SubAuthorityCount (%d)", size, c)} - } - for i := 0; i < len(s); i++ { - s[i] = ndr.ReadUint32(b, p, e) - } - return RPCSID{ - Revision: r, - SubAuthorityCount: c, - IdentifierAuthority: a, - SubAuthority: s, - }, nil -} - -// ReadRPCSIDIdentifierAuthority reads a RPC_SIDIdentifierAuthority from the bytes slice. -func ReadRPCSIDIdentifierAuthority(b *[]byte, p *int, e *binary.ByteOrder) RPCSIDIdentifierAuthority { - return RPCSIDIdentifierAuthority{ - Value: ndr.ReadBytes(b, p, 6, e), - } -} - -// ToString returns the string representation of the RPC_SID. -func (s *RPCSID) ToString() string { - var str string - b := append(make([]byte, 2, 2), s.IdentifierAuthority.Value...) - // For a strange reason this is read big endian: https://msdn.microsoft.com/en-us/library/dd302645.aspx - i := binary.BigEndian.Uint64(b) - if i >= 4294967296 { - str = fmt.Sprintf("S-1-0x%s", hex.EncodeToString(s.IdentifierAuthority.Value)) - } else { - str = fmt.Sprintf("S-1-%d", i) - } - for _, sub := range s.SubAuthority { - str = fmt.Sprintf("%s-%d", str, sub) - } - return str -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/user_session_key.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/user_session_key.go deleted file mode 100644 index f3324c45..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/mstypes/user_session_key.go +++ /dev/null @@ -1,30 +0,0 @@ -package mstypes - -import ( - "encoding/binary" - - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// CypherBlock implements https://msdn.microsoft.com/en-us/library/cc237040.aspx -type CypherBlock struct { - Data []byte // size = 8 -} - -// UserSessionKey implements https://msdn.microsoft.com/en-us/library/cc237080.aspx -type UserSessionKey struct { - Data []CypherBlock // size = 2 -} - -// ReadUserSessionKey reads a UserSessionKey from the bytes slice. -func ReadUserSessionKey(b *[]byte, p *int, e *binary.ByteOrder) UserSessionKey { - cb1 := CypherBlock{ - Data: ndr.ReadBytes(b, p, 8, e), - } - cb2 := CypherBlock{ - Data: ndr.ReadBytes(b, p, 8, e), - } - return UserSessionKey{ - Data: []CypherBlock{cb1, cb2}, - } -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/error.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/error.go deleted file mode 100644 index 0dced225..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/error.go +++ /dev/null @@ -1,13 +0,0 @@ -package ndr - -import "fmt" - -// Malformed implements the error interface for malformed NDR encoding errors. -type Malformed struct { - EText string -} - -// Error implements the error interface on the Malformed struct. -func (e Malformed) Error() string { - return fmt.Sprintf("Malformed NDR steam: %s", e.EText) -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/ndr.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/ndr.go deleted file mode 100644 index 97958f5e..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/ndr/ndr.go +++ /dev/null @@ -1,246 +0,0 @@ -// Package ndr is a partial implementation of NDR encoding: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm -package ndr - -import ( - "bytes" - "encoding/binary" - "fmt" - "math" -) - -/* -Serialization Version 1 -https://msdn.microsoft.com/en-us/library/cc243563.aspx - -Common Header - https://msdn.microsoft.com/en-us/library/cc243890.aspx -8 bytes in total: -- First byte - Version: Must equal 1 -- Second byte - 1st 4 bits: Endianess (0=Big; 1=Little); 2nd 4 bits: Character Encoding (0=ASCII; 1=EBCDIC) -- 3rd - Floating point representation -- 4th - Common Header Length: Must equal 8 -- 5th - 8th - Filler: MUST be set to 0xcccccccc on marshaling, and SHOULD be ignored during unmarshaling. - -Private Header - https://msdn.microsoft.com/en-us/library/cc243919.aspx -8 bytes in total: -- First 4 bytes - Indicates the length of a serialized top-level type in the octet stream. It MUST include the padding length and exclude the header itself. -- Second 4 bytes - Filler: MUST be set to 0 (zero) during marshaling, and SHOULD be ignored during unmarshaling. -*/ - -const ( - protocolVersion = 1 - commonHeaderBytes = 8 - privateHeaderBytes = 8 - bigEndian = 0 - littleEndian = 1 - ascii = 0 - ebcdic = 1 - ieee = 0 - vax = 1 - cray = 2 - ibm = 3 -) - -// CommonHeader implements the NDR common header: https://msdn.microsoft.com/en-us/library/cc243889.aspx -type CommonHeader struct { - Version uint8 - Endianness binary.ByteOrder - CharacterEncoding uint8 - //FloatRepresentation uint8 - HeaderLength uint16 - Filler []byte -} - -// PrivateHeader implements the NDR private header: https://msdn.microsoft.com/en-us/library/cc243919.aspx -type PrivateHeader struct { - ObjectBufferLength uint32 - Filler []byte -} - -// ReadHeaders processes the bytes to return the NDR Common and Private headers. -func ReadHeaders(b *[]byte) (CommonHeader, PrivateHeader, int, error) { - ch, p, err := GetCommonHeader(b) - if err != nil { - return CommonHeader{}, PrivateHeader{}, 0, err - } - ph, err := GetPrivateHeader(b, &p, &ch.Endianness) - if err != nil { - return CommonHeader{}, PrivateHeader{}, 0, err - } - return ch, ph, p, err -} - -// GetCommonHeader processes the bytes to return the NDR Common header. -func GetCommonHeader(b *[]byte) (CommonHeader, int, error) { - //The first 8 bytes comprise the Common RPC Header for type marshalling. - if len(*b) < commonHeaderBytes { - return CommonHeader{}, 0, Malformed{EText: "Not enough bytes."} - } - if (*b)[0] != protocolVersion { - return CommonHeader{}, 0, Malformed{EText: fmt.Sprintf("Stream does not indicate a RPC Type serialization of version %v", protocolVersion)} - } - endian := int((*b)[1] >> 4 & 0xF) - if endian != 0 && endian != 1 { - return CommonHeader{}, 1, Malformed{EText: "Common header does not indicate a valid endianness"} - } - charEncoding := uint8((*b)[1] & 0xF) - if charEncoding != 0 && charEncoding != 1 { - return CommonHeader{}, 1, Malformed{EText: "Common header does not indicate a valid charater encoding"} - } - var bo binary.ByteOrder - switch endian { - case littleEndian: - bo = binary.LittleEndian - case bigEndian: - bo = binary.BigEndian - } - l := bo.Uint16((*b)[2:4]) - if l != commonHeaderBytes { - return CommonHeader{}, 4, Malformed{EText: fmt.Sprintf("Common header does not indicate a valid length: %v instead of %v", uint8((*b)[3]), commonHeaderBytes)} - } - - return CommonHeader{ - Version: uint8((*b)[0]), - Endianness: bo, - CharacterEncoding: charEncoding, - //FloatRepresentation: uint8(b[2]), - HeaderLength: l, - Filler: (*b)[4:8], - }, 8, nil -} - -// GetPrivateHeader processes the bytes to return the NDR Private header. -func GetPrivateHeader(b *[]byte, p *int, bo *binary.ByteOrder) (PrivateHeader, error) { - //The next 8 bytes comprise the RPC type marshalling private header for constructed types. - if len(*b) < (privateHeaderBytes) { - return PrivateHeader{}, Malformed{EText: "Not enough bytes."} - } - var l uint32 - buf := bytes.NewBuffer((*b)[*p : *p+4]) - binary.Read(buf, *bo, &l) - if l%8 != 0 { - return PrivateHeader{}, Malformed{EText: "Object buffer length not a multiple of 8"} - } - *p += 8 - return PrivateHeader{ - ObjectBufferLength: l, - Filler: (*b)[4:8], - }, nil -} - -// ReadUint8 reads bytes representing a thirty two bit integer. -func ReadUint8(b *[]byte, p *int) (i uint8) { - if len((*b)[*p:]) < 1 { - return - } - ensureAlignment(p, 1) - i = uint8((*b)[*p]) - *p++ - return -} - -// ReadUint16 reads bytes representing a thirty two bit integer. -func ReadUint16(b *[]byte, p *int, e *binary.ByteOrder) (i uint16) { - if len((*b)[*p:]) < 2 { - return - } - ensureAlignment(p, 2) - i = (*e).Uint16((*b)[*p : *p+2]) - *p += 2 - return -} - -// ReadUint32 reads bytes representing a thirty two bit integer. -func ReadUint32(b *[]byte, p *int, e *binary.ByteOrder) (i uint32) { - if len((*b)[*p:]) < 4 { - return - } - ensureAlignment(p, 4) - i = (*e).Uint32((*b)[*p : *p+4]) - *p += 4 - return -} - -// ReadUint64 reads bytes representing a thirty two bit integer. -func ReadUint64(b *[]byte, p *int, e *binary.ByteOrder) (i uint64) { - if len((*b)[*p:]) < 8 { - return - } - ensureAlignment(p, 8) - i = (*e).Uint64((*b)[*p : *p+8]) - *p += 8 - return -} - -// ReadBytes reads the number of bytes specified. -func ReadBytes(b *[]byte, p *int, s int, e *binary.ByteOrder) (r []byte) { - if len((*b)[*p:]) < s { - return - } - buf := bytes.NewBuffer((*b)[*p : *p+s]) - r = make([]byte, s) - binary.Read(buf, *e, &r) - *p += s - return r -} - -// ReadBool reads bytes representing a boolean. -func ReadBool(b *[]byte, p *int) bool { - if len((*b)[*p:]) < 1 { - return false - } - if ReadUint8(b, p) != 0 { - return true - } - return false -} - -// ReadIEEEfloat32 reads bytes representing a IEEE formatted 32 bit float. -func ReadIEEEfloat32(b *[]byte, p *int, e *binary.ByteOrder) float32 { - ensureAlignment(p, 4) - return math.Float32frombits(ReadUint32(b, p, e)) -} - -// ReadIEEEfloat64 reads bytes representing a IEEE formatted 64 bit float. -func ReadIEEEfloat64(b *[]byte, p *int, e *binary.ByteOrder) float64 { - ensureAlignment(p, 8) - return math.Float64frombits(ReadUint64(b, p, e)) -} - -// ReadConformantVaryingString reads a Conformant and Varying String from the bytes slice. -// A conformant and varying string is a string in which the maximum number of elements is not known beforehand and therefore is included in the representation of the string. -// NDR represents a conformant and varying string as an ordered sequence of representations of the string elements, preceded by three unsigned long integers. -// The first integer gives the maximum number of elements in the string, including the terminator. -// The second integer gives the offset from the first index of the string to the first index of the actual subset being passed. -// The third integer gives the actual number of elements being passed, including the terminator. -func ReadConformantVaryingString(b *[]byte, p *int, e *binary.ByteOrder) (string, error) { - m := ReadUint32(b, p, e) // Max element count - o := ReadUint32(b, p, e) // Offset - a := ReadUint32(b, p, e) // Actual count - if a > (m-o) || o > m { - return "", Malformed{EText: fmt.Sprintf("Not enough bytes. Max: %d, Offset: %d, Actual: %d", m, o, a)} - } - //Unicode string so each element is 2 bytes - //move position based on the offset - if o > 0 { - *p += int(o * 2) - } - s := make([]rune, a, a) - for i := 0; i < len(s); i++ { - s[i] = rune(ReadUint16(b, p, e)) - } - ensureAlignment(p, 4) - return string(s), nil -} - -// ReadUniDimensionalConformantArrayHeader reads a UniDimensionalConformantArrayHeader from the bytes slice. -func ReadUniDimensionalConformantArrayHeader(b *[]byte, p *int, e *binary.ByteOrder) int { - return int(ReadUint32(b, p, e)) -} - -func ensureAlignment(p *int, byteSize int) { - if byteSize > 0 { - if s := *p % byteSize; s != 0 { - *p += byteSize - s - } - } -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_claims.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_claims.go deleted file mode 100644 index 54d70944..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_claims.go +++ /dev/null @@ -1,38 +0,0 @@ -package pac - -import ( - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/mstypes" - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// ClientClaimsInfo implements https://msdn.microsoft.com/en-us/library/hh536365.aspx -type ClientClaimsInfo struct { - Claims mstypes.ClaimsSetMetadata -} - -// Unmarshal bytes into the ClientClaimsInfo struct -func (k *ClientClaimsInfo) Unmarshal(b []byte) error { - ch, _, p, err := ndr.ReadHeaders(&b) - if err != nil { - return fmt.Errorf("error parsing byte stream headers: %v", err) - } - e := &ch.Endianness - - //The next 4 bytes are an RPC unique pointer referent. We just skip these - p += 4 - - k.Claims = mstypes.ReadClaimsSetMetadata(&b, &p, e) - - //Check that there is only zero padding left - if len(b) >= p { - for _, v := range b[p:] { - if v != 0 { - return ndr.Malformed{EText: "Non-zero padding left over at end of data stream"} - } - } - } - - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_info.go deleted file mode 100644 index fd925db5..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/client_info.go +++ /dev/null @@ -1,45 +0,0 @@ -package pac - -import ( - "encoding/binary" - - "gopkg.in/jcmturner/gokrb5.v5/mstypes" - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// ClientInfo implements https://msdn.microsoft.com/en-us/library/cc237951.aspx -type ClientInfo struct { - ClientID mstypes.FileTime // A FILETIME structure in little-endian format that contains the Kerberos initial ticket-granting ticket TGT authentication time - NameLength uint16 // An unsigned 16-bit integer in little-endian format that specifies the length, in bytes, of the Name field. - Name string // An array of 16-bit Unicode characters in little-endian format that contains the client's account name. -} - -// Unmarshal bytes into the ClientInfo struct -func (k *ClientInfo) Unmarshal(b []byte) error { - //The PAC_CLIENT_INFO structure is a simple structure that is not NDR-encoded. - var p int - var e binary.ByteOrder = binary.LittleEndian - - k.ClientID = mstypes.ReadFileTime(&b, &p, &e) - k.NameLength = ndr.ReadUint16(&b, &p, &e) - if len(b[p:]) < int(k.NameLength) { - return ndr.Malformed{EText: "PAC ClientInfo length truncated"} - } - //Length divided by 2 as each run is 16bits = 2bytes - s := make([]rune, k.NameLength/2, k.NameLength/2) - for i := 0; i < len(s); i++ { - s[i] = rune(ndr.ReadUint16(&b, &p, &e)) - } - k.Name = string(s) - - //Check that there is only zero padding left - if len(b) >= p { - for _, v := range b[p:] { - if v != 0 { - return ndr.Malformed{EText: "Non-zero padding left over at end of data stream"} - } - } - } - - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/credentials_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/credentials_info.go deleted file mode 100644 index ff89d34c..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/credentials_info.go +++ /dev/null @@ -1,132 +0,0 @@ -package pac - -import ( - "encoding/binary" - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" - "gopkg.in/jcmturner/gokrb5.v5/mstypes" - "gopkg.in/jcmturner/gokrb5.v5/ndr" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// https://msdn.microsoft.com/en-us/library/cc237931.aspx - -// CredentialsInfo implements https://msdn.microsoft.com/en-us/library/cc237953.aspx -type CredentialsInfo struct { - Version uint32 // A 32-bit unsigned integer in little-endian format that defines the version. MUST be 0x00000000. - EType uint32 - PACCredentialDataEncrypted []byte // Key usage number for encryption: KERB_NON_KERB_SALT (16) - PACCredentialData CredentialData -} - -// Unmarshal bytes into the CredentialsInfo struct -func (c *CredentialsInfo) Unmarshal(b []byte, k types.EncryptionKey) error { - ch, _, p, err := ndr.ReadHeaders(&b) - if err != nil { - return fmt.Errorf("error parsing byte stream headers: %v", err) - } - e := &ch.Endianness - - //The next 4 bytes are an RPC unique pointer referent. We just skip these - p += 4 - - c.Version = ndr.ReadUint32(&b, &p, e) - c.EType = ndr.ReadUint32(&b, &p, e) - c.PACCredentialDataEncrypted = ndr.ReadBytes(&b, &p, len(b)-p, e) - - err = c.DecryptEncPart(k, e) - if err != nil { - return fmt.Errorf("error decrypting PAC Credentials Data: %v", err) - } - return nil -} - -// DecryptEncPart decrypts the encrypted part of the CredentialsInfo. -func (c *CredentialsInfo) DecryptEncPart(k types.EncryptionKey, e *binary.ByteOrder) error { - if k.KeyType != int32(c.EType) { - return fmt.Errorf("key provided is not the correct type. Type needed: %d, type provided: %d", c.EType, k.KeyType) - } - pt, err := crypto.DecryptMessage(c.PACCredentialDataEncrypted, k, keyusage.KERB_NON_KERB_SALT) - if err != nil { - return err - } - var p int - c.PACCredentialData = ReadPACCredentialData(&pt, &p, e) - return nil -} - -// CredentialData implements https://msdn.microsoft.com/en-us/library/cc237952.aspx -// This structure is encrypted prior to being encoded in any other structures. -// Encryption is performed by first serializing the data structure via Network Data Representation (NDR) encoding, as specified in [MS-RPCE]. -// Once serialized, the data is encrypted using the key and cryptographic system selected through the AS protocol and the KRB_AS_REP message -// Fields (for capturing this information) and cryptographic parameters are specified in PAC_CREDENTIAL_INFO (section 2.6.1). -type CredentialData struct { - CredentialCount uint32 - Credentials []SECPKGSupplementalCred // Size is the value of CredentialCount -} - -// ReadPACCredentialData reads a CredentialData from the byte slice. -func ReadPACCredentialData(b *[]byte, p *int, e *binary.ByteOrder) CredentialData { - c := ndr.ReadUint32(b, p, e) - cr := make([]SECPKGSupplementalCred, c, c) - for i := range cr { - cr[i] = ReadSECPKGSupplementalCred(b, p, e) - } - return CredentialData{ - CredentialCount: c, - Credentials: cr, - } -} - -// SECPKGSupplementalCred implements https://msdn.microsoft.com/en-us/library/cc237956.aspx -type SECPKGSupplementalCred struct { - PackageName mstypes.RPCUnicodeString - CredentialSize uint32 - Credentials []uint8 // Is a ptr. Size is the value of CredentialSize -} - -// ReadSECPKGSupplementalCred reads a SECPKGSupplementalCred from the byte slice. -func ReadSECPKGSupplementalCred(b *[]byte, p *int, e *binary.ByteOrder) SECPKGSupplementalCred { - n, _ := mstypes.ReadRPCUnicodeString(b, p, e) - cs := ndr.ReadUint32(b, p, e) - c := make([]uint8, cs, cs) - for i := range c { - c[i] = ndr.ReadUint8(b, p) - } - return SECPKGSupplementalCred{ - PackageName: n, - CredentialSize: cs, - Credentials: c, - } -} - -// NTLMSupplementalCred implements https://msdn.microsoft.com/en-us/library/cc237949.aspx -type NTLMSupplementalCred struct { - Version uint32 // A 32-bit unsigned integer that defines the credential version.This field MUST be 0x00000000. - Flags uint32 - LMPassword []byte // A 16-element array of unsigned 8-bit integers that define the LM OWF. The LmPassword member MUST be ignored if the L flag is not set in the Flags member. - NTPassword []byte // A 16-element array of unsigned 8-bit integers that define the NT OWF. The LtPassword member MUST be ignored if the N flag is not set in the Flags member. -} - -// ReadNTLMSupplementalCred reads a NTLMSupplementalCred from the byte slice. -func ReadNTLMSupplementalCred(b *[]byte, p *int, e *binary.ByteOrder) NTLMSupplementalCred { - v := ndr.ReadUint32(b, p, e) - f := ndr.ReadUint32(b, p, e) - l := ndr.ReadBytes(b, p, 16, e) - n := ndr.ReadBytes(b, p, 16, e) - return NTLMSupplementalCred{ - Version: v, - Flags: f, - LMPassword: l, - NTPassword: n, - } -} - -const ( - // NTLMSupCredLMOWF indicates that the LM OWF member is present and valid. - NTLMSupCredLMOWF = 31 - // NTLMSupCredNTOWF indicates that the NT OWF member is present and valid. - NTLMSupCredNTOWF = 30 -) diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_claims.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_claims.go deleted file mode 100644 index 3a6699a8..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_claims.go +++ /dev/null @@ -1,38 +0,0 @@ -package pac - -import ( - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/mstypes" - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// DeviceClaimsInfo implements https://msdn.microsoft.com/en-us/library/hh554226.aspx -type DeviceClaimsInfo struct { - Claims mstypes.ClaimsSetMetadata -} - -// Unmarshal bytes into the DeviceClaimsInfo struct -func (k *DeviceClaimsInfo) Unmarshal(b []byte) error { - ch, _, p, err := ndr.ReadHeaders(&b) - if err != nil { - return fmt.Errorf("error parsing byte stream headers: %v", err) - } - e := &ch.Endianness - - //The next 4 bytes are an RPC unique pointer referent. We just skip these - p += 4 - - k.Claims = mstypes.ReadClaimsSetMetadata(&b, &p, e) - - //Check that there is only zero padding left - if len(b) >= p { - for _, v := range b[p:] { - if v != 0 { - return ndr.Malformed{EText: "non-zero padding left over at end of data stream"} - } - } - } - - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_info.go deleted file mode 100644 index 9155525a..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/device_info.go +++ /dev/null @@ -1,93 +0,0 @@ -package pac - -import ( - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/mstypes" - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// DeviceInfo implements https://msdn.microsoft.com/en-us/library/hh536402.aspx -type DeviceInfo struct { - UserID uint32 // A 32-bit unsigned integer that contains the RID of the account. If the UserId member equals 0x00000000, the first group SID in this member is the SID for this account. - PrimaryGroupID uint32 // A 32-bit unsigned integer that contains the RID for the primary group to which this account belongs. - AccountDomainID mstypes.RPCSID // A SID structure that contains the SID for the domain of the account.This member is used in conjunction with the UserId, and GroupIds members to create the user and group SIDs for the client. - AccountGroupCount uint32 // A 32-bit unsigned integer that contains the number of groups within the account domain to which the account belongs - AccountGroupIDs []mstypes.GroupMembership // A pointer to a list of GROUP_MEMBERSHIP (section 2.2.2) structures that contains the groups to which the account belongs in the account domain. The number of groups in this list MUST be equal to GroupCount. - SIDCount uint32 // A 32-bit unsigned integer that contains the total number of SIDs present in the ExtraSids member. - ExtraSIDs []mstypes.KerbSidAndAttributes // A pointer to a list of KERB_SID_AND_ATTRIBUTES structures that contain a list of SIDs corresponding to groups not in domains. If the UserId member equals 0x00000000, the first group SID in this member is the SID for this account. - DomainGroupCount uint32 // A 32-bit unsigned integer that contains the number of domains with groups to which the account belongs. - DomainGroup []mstypes.DomainGroupMembership // A pointer to a list of DOMAIN_GROUP_MEMBERSHIP structures (section 2.2.3) that contains the domains to which the account belongs to a group. The number of sets in this list MUST be equal to DomainCount. -} - -// Unmarshal bytes into the DeviceInfo struct -func (k *DeviceInfo) Unmarshal(b []byte) error { - ch, _, p, err := ndr.ReadHeaders(&b) - if err != nil { - return fmt.Errorf("error parsing byte stream headers: %v", err) - } - e := &ch.Endianness - - //The next 4 bytes are an RPC unique pointer referent. We just skip these - p += 4 - - k.UserID = ndr.ReadUint32(&b, &p, e) - k.PrimaryGroupID = ndr.ReadUint32(&b, &p, e) - k.AccountDomainID, err = mstypes.ReadRPCSID(&b, &p, e) - if err != nil { - return err - } - k.AccountGroupCount = ndr.ReadUint32(&b, &p, e) - if k.AccountGroupCount > 0 { - ag := make([]mstypes.GroupMembership, k.AccountGroupCount, k.AccountGroupCount) - for i := range ag { - ag[i] = mstypes.ReadGroupMembership(&b, &p, e) - } - k.AccountGroupIDs = ag - } - - k.SIDCount = ndr.ReadUint32(&b, &p, e) - if k.SIDCount > 0 { - ac := ndr.ReadUniDimensionalConformantArrayHeader(&b, &p, e) - if ac != int(k.SIDCount) { - return fmt.Errorf("error with size of ExtraSIDs list. expected: %d, Actual: %d", k.SIDCount, ac) - } - es := make([]mstypes.KerbSidAndAttributes, k.SIDCount, k.SIDCount) - attr := make([]uint32, k.SIDCount, k.SIDCount) - ptr := make([]uint32, k.SIDCount, k.SIDCount) - for i := range attr { - ptr[i] = ndr.ReadUint32(&b, &p, e) - attr[i] = ndr.ReadUint32(&b, &p, e) - } - for i := range es { - if ptr[i] != 0 { - s, err := mstypes.ReadRPCSID(&b, &p, e) - es[i] = mstypes.KerbSidAndAttributes{SID: s, Attributes: attr[i]} - if err != nil { - return ndr.Malformed{EText: fmt.Sprintf("could not read ExtraSIDs: %v", err)} - } - } - } - k.ExtraSIDs = es - } - - k.DomainGroupCount = ndr.ReadUint32(&b, &p, e) - if k.DomainGroupCount > 0 { - dg := make([]mstypes.DomainGroupMembership, k.DomainGroupCount, k.DomainGroupCount) - for i := range dg { - dg[i], _ = mstypes.ReadDomainGroupMembership(&b, &p, e) - } - k.DomainGroup = dg - } - - //Check that there is only zero padding left - if len(b) >= p { - for _, v := range b[p:] { - if v != 0 { - return ndr.Malformed{EText: "non-zero padding left over at end of data stream"} - } - } - } - - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/kerb_validation_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/kerb_validation_info.go deleted file mode 100644 index c7916a8e..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/kerb_validation_info.go +++ /dev/null @@ -1,286 +0,0 @@ -// Package pac implements Microsoft Privilege Attribute Certificate (PAC) processing. -package pac - -import ( - "errors" - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/mstypes" - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// KERB_VALIDATION_INFO flags. -const ( - USERFLAG_GUEST = 31 // Authentication was done via the GUEST account; no password was used. - USERFLAG_NO_ENCRYPTION_AVAILABLE = 30 // No encryption is available. - USERFLAG_LAN_MANAGER_KEY = 28 // LAN Manager key was used for authentication. - USERFLAG_SUB_AUTH = 25 // Sub-authentication used; session key came from the sub-authentication package. - USERFLAG_EXTRA_SIDS = 26 // Indicates that the ExtraSids field is populated and contains additional SIDs. - USERFLAG_MACHINE_ACCOUNT = 24 // Indicates that the account is a machine account. - USERFLAG_DC_NTLM2 = 23 // Indicates that the domain controller understands NTLMv2. - USERFLAG_RESOURCE_GROUPIDS = 22 // Indicates that the ResourceGroupIds field is populated. - USERFLAG_PROFILEPATH = 21 // Indicates that ProfilePath is populated. - USERFLAG_NTLM2_NTCHALLENGERESP = 20 // The NTLMv2 response from the NtChallengeResponseFields ([MS-NLMP] section 2.2.1.3) was used for authentication and session key generation. - USERFLAG_LM2_LMCHALLENGERESP = 19 // The LMv2 response from the LmChallengeResponseFields ([MS-NLMP] section 2.2.1.3) was used for authentication and session key generation. - USERFLAG_AUTH_LMCHALLENGERESP_KEY_NTCHALLENGERESP = 18 // The LMv2 response from the LmChallengeResponseFields ([MS-NLMP] section 2.2.1.3) was used for authentication and the NTLMv2 response from the NtChallengeResponseFields ([MS-NLMP] section 2.2.1.3) was used session key generation. -) - -// KerbValidationInfo implement https://msdn.microsoft.com/en-us/library/cc237948.aspx -// The KERB_VALIDATION_INFO structure defines the user's logon and authorization information -// provided by the DC. The KERB_VALIDATION_INFO structure is a subset of the -// NETLOGON_VALIDATION_SAM_INFO4 structure ([MS-NRPC] section 2.2.1.4.13). -// It is a subset due to historical reasons and to the use of the common Active Directory to generate this information. -// The KERB_VALIDATION_INFO structure is marshaled by RPC [MS-RPCE]. -type KerbValidationInfo struct { - LogOnTime mstypes.FileTime - LogOffTime mstypes.FileTime - KickOffTime mstypes.FileTime - PasswordLastSet mstypes.FileTime - PasswordCanChange mstypes.FileTime - PasswordMustChange mstypes.FileTime - EffectiveName mstypes.RPCUnicodeString - FullName mstypes.RPCUnicodeString - LogonScript mstypes.RPCUnicodeString - ProfilePath mstypes.RPCUnicodeString - HomeDirectory mstypes.RPCUnicodeString - HomeDirectoryDrive mstypes.RPCUnicodeString - LogonCount uint16 - BadPasswordCount uint16 - UserID uint32 - PrimaryGroupID uint32 - GroupCount uint32 - pGroupIDs uint32 - GroupIDs []mstypes.GroupMembership - UserFlags uint32 - UserSessionKey mstypes.UserSessionKey - LogonServer mstypes.RPCUnicodeString - LogonDomainName mstypes.RPCUnicodeString - pLogonDomainID uint32 - LogonDomainID mstypes.RPCSID - Reserved1 []uint32 // Has 2 elements - UserAccountControl uint32 - SubAuthStatus uint32 - LastSuccessfulILogon mstypes.FileTime - LastFailedILogon mstypes.FileTime - FailedILogonCount uint32 - Reserved3 uint32 - SIDCount uint32 - pExtraSIDs uint32 - ExtraSIDs []mstypes.KerbSidAndAttributes - pResourceGroupDomainSID uint32 - ResourceGroupDomainSID mstypes.RPCSID - ResourceGroupCount uint32 - pResourceGroupIDs uint32 - ResourceGroupIDs []mstypes.GroupMembership -} - -// Unmarshal bytes into the DeviceInfo struct -func (k *KerbValidationInfo) Unmarshal(b []byte) (err error) { - ch, _, p, err := ndr.ReadHeaders(&b) - if err != nil { - return fmt.Errorf("error parsing byte stream headers: %v", err) - } - e := &ch.Endianness - - //The next 4 bytes are an RPC unique pointer referent. We just skip these - p += 4 - - k.LogOnTime = mstypes.ReadFileTime(&b, &p, e) - k.LogOffTime = mstypes.ReadFileTime(&b, &p, e) - k.KickOffTime = mstypes.ReadFileTime(&b, &p, e) - k.PasswordLastSet = mstypes.ReadFileTime(&b, &p, e) - k.PasswordCanChange = mstypes.ReadFileTime(&b, &p, e) - k.PasswordMustChange = mstypes.ReadFileTime(&b, &p, e) - - if k.EffectiveName, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { - return - } - if k.FullName, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { - return - } - if k.LogonScript, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { - return - } - if k.ProfilePath, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { - return - } - if k.HomeDirectory, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { - return - } - if k.HomeDirectoryDrive, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { - return - } - - k.LogonCount = ndr.ReadUint16(&b, &p, e) - k.BadPasswordCount = ndr.ReadUint16(&b, &p, e) - k.UserID = ndr.ReadUint32(&b, &p, e) - k.PrimaryGroupID = ndr.ReadUint32(&b, &p, e) - k.GroupCount = ndr.ReadUint32(&b, &p, e) - k.pGroupIDs = ndr.ReadUint32(&b, &p, e) - - k.UserFlags = ndr.ReadUint32(&b, &p, e) - k.UserSessionKey = mstypes.ReadUserSessionKey(&b, &p, e) - - if k.LogonServer, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { - return - } - if k.LogonDomainName, err = mstypes.ReadRPCUnicodeString(&b, &p, e); err != nil { - return - } - - k.pLogonDomainID = ndr.ReadUint32(&b, &p, e) - - k.Reserved1 = []uint32{ - ndr.ReadUint32(&b, &p, e), - ndr.ReadUint32(&b, &p, e), - } - - k.UserAccountControl = ndr.ReadUint32(&b, &p, e) - k.SubAuthStatus = ndr.ReadUint32(&b, &p, e) - k.LastSuccessfulILogon = mstypes.ReadFileTime(&b, &p, e) - k.LastFailedILogon = mstypes.ReadFileTime(&b, &p, e) - k.FailedILogonCount = ndr.ReadUint32(&b, &p, e) - k.Reserved3 = ndr.ReadUint32(&b, &p, e) - - k.SIDCount = ndr.ReadUint32(&b, &p, e) - k.pExtraSIDs = ndr.ReadUint32(&b, &p, e) - - k.pResourceGroupDomainSID = ndr.ReadUint32(&b, &p, e) - k.ResourceGroupCount = ndr.ReadUint32(&b, &p, e) - k.pResourceGroupIDs = ndr.ReadUint32(&b, &p, e) - - // Populate pointers - if err = k.EffectiveName.UnmarshalString(&b, &p, e); err != nil { - return - } - if err = k.FullName.UnmarshalString(&b, &p, e); err != nil { - return - } - if err = k.LogonScript.UnmarshalString(&b, &p, e); err != nil { - return - } - if err = k.ProfilePath.UnmarshalString(&b, &p, e); err != nil { - return - } - if err = k.HomeDirectory.UnmarshalString(&b, &p, e); err != nil { - return - } - if err = k.HomeDirectoryDrive.UnmarshalString(&b, &p, e); err != nil { - return - } - - if k.GroupCount > 0 { - ac := ndr.ReadUniDimensionalConformantArrayHeader(&b, &p, e) - if ac != int(k.GroupCount) { - return errors.New("error with size of group list") - } - g := make([]mstypes.GroupMembership, k.GroupCount, k.GroupCount) - for i := range g { - g[i] = mstypes.ReadGroupMembership(&b, &p, e) - } - k.GroupIDs = g - } - - if err = k.LogonServer.UnmarshalString(&b, &p, e); err != nil { - return - } - if err = k.LogonDomainName.UnmarshalString(&b, &p, e); err != nil { - return - } - - if k.pLogonDomainID != 0 { - k.LogonDomainID, err = mstypes.ReadRPCSID(&b, &p, e) - if err != nil { - return fmt.Errorf("error reading LogonDomainID: %v", err) - } - } - - if k.SIDCount > 0 { - ac := ndr.ReadUniDimensionalConformantArrayHeader(&b, &p, e) - if ac != int(k.SIDCount) { - return fmt.Errorf("error with size of ExtraSIDs list. Expected: %d, Actual: %d", k.SIDCount, ac) - } - es := make([]mstypes.KerbSidAndAttributes, k.SIDCount, k.SIDCount) - attr := make([]uint32, k.SIDCount, k.SIDCount) - ptr := make([]uint32, k.SIDCount, k.SIDCount) - for i := range attr { - ptr[i] = ndr.ReadUint32(&b, &p, e) - attr[i] = ndr.ReadUint32(&b, &p, e) - } - for i := range es { - if ptr[i] != 0 { - s, err := mstypes.ReadRPCSID(&b, &p, e) - es[i] = mstypes.KerbSidAndAttributes{SID: s, Attributes: attr[i]} - if err != nil { - return ndr.Malformed{EText: fmt.Sprintf("could not read ExtraSIDs: %v", err)} - } - } - } - k.ExtraSIDs = es - } - - if k.pResourceGroupDomainSID != 0 { - k.ResourceGroupDomainSID, err = mstypes.ReadRPCSID(&b, &p, e) - if err != nil { - return err - } - } - - if k.ResourceGroupCount > 0 { - ac := ndr.ReadUniDimensionalConformantArrayHeader(&b, &p, e) - if ac != int(k.ResourceGroupCount) { - return fmt.Errorf("error with size of ResourceGroup list. Expected: %d, Actual: %d", k.ResourceGroupCount, ac) - } - g := make([]mstypes.GroupMembership, ac, ac) - for i := range g { - g[i] = mstypes.ReadGroupMembership(&b, &p, e) - } - k.ResourceGroupIDs = g - } - - //Check that there is only zero padding left - if len(b) >= p { - for _, v := range b[p:] { - if v != 0 { - return ndr.Malformed{EText: "non-zero padding left over at end of data stream"} - } - } - } - - return nil -} - -// GetGroupMembershipSIDs returns a slice of strings containing the group membership SIDs found in the PAC. -func (k *KerbValidationInfo) GetGroupMembershipSIDs() []string { - var g []string - lSID := k.LogonDomainID.ToString() - for i := range k.GroupIDs { - g = append(g, fmt.Sprintf("%s-%d", lSID, k.GroupIDs[i].RelativeID)) - } - for _, s := range k.ExtraSIDs { - var exists = false - for _, es := range g { - if es == s.SID.ToString() { - exists = true - break - } - } - if !exists { - g = append(g, s.SID.ToString()) - } - } - for _, r := range k.ResourceGroupIDs { - var exists = false - s := fmt.Sprintf("%s-%d", k.ResourceGroupDomainSID.ToString(), r.RelativeID) - for _, es := range g { - if es == s { - exists = true - break - } - } - if !exists { - g = append(g, s) - } - } - return g -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_info_buffer.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_info_buffer.go deleted file mode 100644 index 70cd68f7..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_info_buffer.go +++ /dev/null @@ -1,39 +0,0 @@ -package pac - -import ( - "encoding/binary" - - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -const ( - ulTypeKerbValidationInfo = 1 - ulTypeCredentials = 2 - ulTypePACServerSignatureData = 6 - ulTypePACKDCSignatureData = 7 - ulTypePACClientInfo = 10 - ulTypeS4UDelegationInfo = 11 - ulTypeUPNDNSInfo = 12 - ulTypePACClientClaimsInfo = 13 - ulTypePACDeviceInfo = 14 - ulTypePACDeviceClaimsInfo = 15 -) - -// InfoBuffer implements the PAC Info Buffer: https://msdn.microsoft.com/en-us/library/cc237954.aspx -type InfoBuffer struct { - ULType uint32 // A 32-bit unsigned integer in little-endian format that describes the type of data present in the buffer contained at Offset. - CBBufferSize uint32 // A 32-bit unsigned integer in little-endian format that contains the size, in bytes, of the buffer in the PAC located at Offset. - Offset uint64 // A 64-bit unsigned integer in little-endian format that contains the offset to the beginning of the buffer, in bytes, from the beginning of the PACTYPE structure. The data offset MUST be a multiple of eight. The following sections specify the format of each type of element. -} - -// ReadPACInfoBuffer reads a InfoBuffer from the byte slice. -func ReadPACInfoBuffer(b *[]byte, p *int, e *binary.ByteOrder) InfoBuffer { - u := ndr.ReadUint32(b, p, e) - s := ndr.ReadUint32(b, p, e) - o := ndr.ReadUint64(b, p, e) - return InfoBuffer{ - ULType: u, - CBBufferSize: s, - Offset: o, - } -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_type.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_type.go deleted file mode 100644 index ea2a8ad4..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/pac_type.go +++ /dev/null @@ -1,205 +0,0 @@ -package pac - -import ( - "encoding/binary" - "errors" - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/crypto" - "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" - "gopkg.in/jcmturner/gokrb5.v5/ndr" - "gopkg.in/jcmturner/gokrb5.v5/types" -) - -// PACType implements: https://msdn.microsoft.com/en-us/library/cc237950.aspx -type PACType struct { - CBuffers uint32 - Version uint32 - Buffers []InfoBuffer - Data []byte - KerbValidationInfo *KerbValidationInfo - CredentialsInfo *CredentialsInfo - ServerChecksum *SignatureData - KDCChecksum *SignatureData - ClientInfo *ClientInfo - S4UDelegationInfo *S4UDelegationInfo - UPNDNSInfo *UPNDNSInfo - ClientClaimsInfo *ClientClaimsInfo - DeviceInfo *DeviceInfo - DeviceClaimsInfo *DeviceClaimsInfo - ZeroSigData []byte -} - -// Unmarshal bytes into the PACType struct -func (pac *PACType) Unmarshal(b []byte) error { - var p int - var e binary.ByteOrder = binary.LittleEndian - pac.Data = b - zb := make([]byte, len(b), len(b)) - copy(zb, b) - pac.ZeroSigData = zb - pac.CBuffers = ndr.ReadUint32(&b, &p, &e) - pac.Version = ndr.ReadUint32(&b, &p, &e) - buf := make([]InfoBuffer, pac.CBuffers, pac.CBuffers) - for i := range buf { - buf[i] = ReadPACInfoBuffer(&b, &p, &e) - } - pac.Buffers = buf - return nil -} - -// ProcessPACInfoBuffers processes the PAC Info Buffers. -// https://msdn.microsoft.com/en-us/library/cc237954.aspx -func (pac *PACType) ProcessPACInfoBuffers(key types.EncryptionKey) error { - for _, buf := range pac.Buffers { - p := make([]byte, buf.CBBufferSize, buf.CBBufferSize) - copy(p, pac.Data[int(buf.Offset):int(buf.Offset)+int(buf.CBBufferSize)]) - switch int(buf.ULType) { - case ulTypeKerbValidationInfo: - if pac.KerbValidationInfo != nil { - //Must ignore subsequent buffers of this type - continue - } - var k KerbValidationInfo - err := k.Unmarshal(p) - if err != nil { - return fmt.Errorf("error processing KerbValidationInfo: %v", err) - } - pac.KerbValidationInfo = &k - case ulTypeCredentials: - if pac.CredentialsInfo != nil { - //Must ignore subsequent buffers of this type - continue - } - var k CredentialsInfo - err := k.Unmarshal(p, key) - if err != nil { - return fmt.Errorf("error processing CredentialsInfo: %v", err) - } - pac.CredentialsInfo = &k - case ulTypePACServerSignatureData: - if pac.ServerChecksum != nil { - //Must ignore subsequent buffers of this type - continue - } - var k SignatureData - zb, err := k.Unmarshal(p) - copy(pac.ZeroSigData[int(buf.Offset):int(buf.Offset)+int(buf.CBBufferSize)], zb) - if err != nil { - return fmt.Errorf("error processing ServerChecksum: %v", err) - } - pac.ServerChecksum = &k - case ulTypePACKDCSignatureData: - if pac.KDCChecksum != nil { - //Must ignore subsequent buffers of this type - continue - } - var k SignatureData - zb, err := k.Unmarshal(p) - copy(pac.ZeroSigData[int(buf.Offset):int(buf.Offset)+int(buf.CBBufferSize)], zb) - if err != nil { - return fmt.Errorf("error processing KDCChecksum: %v", err) - } - pac.KDCChecksum = &k - case ulTypePACClientInfo: - if pac.ClientInfo != nil { - //Must ignore subsequent buffers of this type - continue - } - var k ClientInfo - err := k.Unmarshal(p) - if err != nil { - return fmt.Errorf("error processing ClientInfo: %v", err) - } - pac.ClientInfo = &k - case ulTypeS4UDelegationInfo: - if pac.S4UDelegationInfo != nil { - //Must ignore subsequent buffers of this type - continue - } - var k S4UDelegationInfo - err := k.Unmarshal(p) - if err != nil { - return fmt.Errorf("error processing S4U_DelegationInfo: %v", err) - } - pac.S4UDelegationInfo = &k - case ulTypeUPNDNSInfo: - if pac.UPNDNSInfo != nil { - //Must ignore subsequent buffers of this type - continue - } - var k UPNDNSInfo - err := k.Unmarshal(p) - if err != nil { - return fmt.Errorf("error processing UPN_DNSInfo: %v", err) - } - pac.UPNDNSInfo = &k - case ulTypePACClientClaimsInfo: - if pac.ClientClaimsInfo != nil { - //Must ignore subsequent buffers of this type - continue - } - var k ClientClaimsInfo - err := k.Unmarshal(p) - if err != nil { - return fmt.Errorf("error processing ClientClaimsInfo: %v", err) - } - pac.ClientClaimsInfo = &k - case ulTypePACDeviceInfo: - if pac.DeviceInfo != nil { - //Must ignore subsequent buffers of this type - continue - } - var k DeviceInfo - err := k.Unmarshal(p) - if err != nil { - return fmt.Errorf("error processing DeviceInfo: %v", err) - } - pac.DeviceInfo = &k - case ulTypePACDeviceClaimsInfo: - if pac.DeviceClaimsInfo != nil { - //Must ignore subsequent buffers of this type - continue - } - var k DeviceClaimsInfo - err := k.Unmarshal(p) - if err != nil { - return fmt.Errorf("error processing DeviceClaimsInfo: %v", err) - } - pac.DeviceClaimsInfo = &k - } - } - - if ok, err := pac.validate(key); !ok { - return err - } - - return nil -} - -func (pac *PACType) validate(key types.EncryptionKey) (bool, error) { - if pac.KerbValidationInfo == nil { - return false, errors.New("PAC Info Buffers does not contain a KerbValidationInfo") - } - if pac.ServerChecksum == nil { - return false, errors.New("PAC Info Buffers does not contain a ServerChecksum") - } - if pac.KDCChecksum == nil { - return false, errors.New("PAC Info Buffers does not contain a KDCChecksum") - } - if pac.ClientInfo == nil { - return false, errors.New("PAC Info Buffers does not contain a ClientInfo") - } - etype, err := crypto.GetChksumEtype(int32(pac.ServerChecksum.SignatureType)) - if err != nil { - return false, err - } - if ok := etype.VerifyChecksum(key.KeyValue, - pac.ZeroSigData, - pac.ServerChecksum.Signature, - keyusage.KERB_NON_KERB_CKSUM_SALT); !ok { - return false, errors.New("PAC service checksum verification failed") - } - - return true, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/s4u_delegation_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/s4u_delegation_info.go deleted file mode 100644 index e13fea2f..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/s4u_delegation_info.go +++ /dev/null @@ -1,55 +0,0 @@ -package pac - -import ( - "fmt" - - "gopkg.in/jcmturner/gokrb5.v5/mstypes" - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// S4UDelegationInfo implements https://msdn.microsoft.com/en-us/library/cc237944.aspx -type S4UDelegationInfo struct { - S4U2proxyTarget mstypes.RPCUnicodeString // The name of the principal to whom the application can forward the ticket. - TransitedListSize uint32 - S4UTransitedServices []mstypes.RPCUnicodeString // List of all services that have been delegated through by this client and subsequent services or servers.. Size is value of TransitedListSize -} - -// Unmarshal bytes into the S4UDelegationInfo struct -func (k *S4UDelegationInfo) Unmarshal(b []byte) error { - ch, _, p, err := ndr.ReadHeaders(&b) - if err != nil { - return fmt.Errorf("error parsing byte stream headers: %v", err) - } - e := &ch.Endianness - - //The next 4 bytes are an RPC unique pointer referent. We just skip these - p += 4 - - k.S4U2proxyTarget, err = mstypes.ReadRPCUnicodeString(&b, &p, e) - if err != nil { - return err - } - k.TransitedListSize = ndr.ReadUint32(&b, &p, e) - if k.TransitedListSize > 0 { - ts := make([]mstypes.RPCUnicodeString, k.TransitedListSize, k.TransitedListSize) - for i := range ts { - ts[i], err = mstypes.ReadRPCUnicodeString(&b, &p, e) - if err != nil { - return err - } - } - for i := range ts { - ts[i].UnmarshalString(&b, &p, e) - } - k.S4UTransitedServices = ts - } - - //Check that there is only zero padding left - for _, v := range b[p:] { - if v != 0 { - return ndr.Malformed{EText: "non-zero padding left over at end of data stream"} - } - } - - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/signature_data.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/signature_data.go deleted file mode 100644 index 3b588dd7..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/signature_data.go +++ /dev/null @@ -1,74 +0,0 @@ -package pac - -import ( - "encoding/binary" - - "gopkg.in/jcmturner/gokrb5.v5/iana/chksumtype" - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -/* -https://msdn.microsoft.com/en-us/library/cc237955.aspx - -The Key Usage Value MUST be KERB_NON_KERB_CKSUM_SALT (17) [MS-KILE] (section 3.1.5.9). - -Server Signature (SignatureType = 0x00000006) -https://msdn.microsoft.com/en-us/library/cc237957.aspx -The KDC will use the long-term key that the KDC shares with the server, so that the server can verify this signature on receiving a PAC. -The server signature is a keyed hash [RFC4757] of the entire PAC message, with the Signature fields of both PAC_SIGNATURE_DATA structures set to zero. -The key used to protect the ciphertext part of the response is used. -The checksum type corresponds to the key unless the key is DES, in which case the KERB_CHECKSUM_HMAC_MD5 key is used. -The resulting hash value is then placed in the Signature field of the server's PAC_SIGNATURE_DATA structure. - -KDC Signature (SignatureType = 0x00000007) -https://msdn.microsoft.com/en-us/library/dd357117.aspx -The KDC will use KDC (krbtgt) key [RFC4120], so that other KDCs can verify this signature on receiving a PAC. -The KDC signature is a keyed hash [RFC4757] of the Server Signature field in the PAC message. -The cryptographic system that is used to calculate the checksum depends on which system the KDC supports, as defined below: -- Supports RC4-HMAC --> KERB_CHECKSUM_HMAC_MD5 -- Does not support RC4-HMAC and supports AES256 --> HMAC_SHA1_96_AES256 -- Does not support RC4-HMAC or AES256-CTS-HMAC-SHA1-96, and supports AES128-CTS-HMAC-SHA1-96 --> HMAC_SHA1_96_AES128 -- Does not support RC4-HMAC, AES128-CTS-HMAC-SHA1-96 or AES256-CTS-HMAC-SHA1-96 --> None. The checksum operation will fail. -*/ - -// SignatureData implements https://msdn.microsoft.com/en-us/library/cc237955.aspx -type SignatureData struct { - SignatureType uint32 // A 32-bit unsigned integer value in little-endian format that defines the cryptographic system used to calculate the checksum. This MUST be one of the following checksum types: KERB_CHECKSUM_HMAC_MD5 (signature size = 16), HMAC_SHA1_96_AES128 (signature size = 12), HMAC_SHA1_96_AES256 (signature size = 12). - Signature []byte // Size depends on the type. See comment above. - RODCIdentifier uint16 // A 16-bit unsigned integer value in little-endian format that contains the first 16 bits of the key version number ([MS-KILE] section 3.1.5.8) when the KDC is an RODC. When the KDC is not an RODC, this field does not exist. -} - -// Unmarshal bytes into the SignatureData struct -func (k *SignatureData) Unmarshal(b []byte) ([]byte, error) { - var p int - var e binary.ByteOrder = binary.LittleEndian - - k.SignatureType = ndr.ReadUint32(&b, &p, &e) - var c int - switch k.SignatureType { - case chksumtype.KERB_CHECKSUM_HMAC_MD5_UNSIGNED: - c = 16 - case uint32(chksumtype.HMAC_SHA1_96_AES128): - c = 12 - case uint32(chksumtype.HMAC_SHA1_96_AES256): - c = 12 - } - sp := p - k.Signature = ndr.ReadBytes(&b, &p, c, &e) - k.RODCIdentifier = ndr.ReadUint16(&b, &p, &e) - - //Check that there is only zero padding left - for _, v := range b[p:] { - if v != 0 { - return []byte{}, ndr.Malformed{EText: "Non-zero padding left over at end of data stream"} - } - } - - // Create bytes with zeroed signature needed for checksum verification - rb := make([]byte, len(b), len(b)) - copy(rb, b) - z := make([]byte, len(b), len(b)) - copy(rb[sp:sp+c], z) - - return rb, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/upn_dns_info.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/upn_dns_info.go deleted file mode 100644 index 4695ce37..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/pac/upn_dns_info.go +++ /dev/null @@ -1,66 +0,0 @@ -package pac - -import ( - "encoding/binary" - "sort" - - "gopkg.in/jcmturner/gokrb5.v5/ndr" -) - -// UPNDNSInfo implements https://msdn.microsoft.com/en-us/library/dd240468.aspx -type UPNDNSInfo struct { - UPNLength uint16 // An unsigned 16-bit integer in little-endian format that specifies the length, in bytes, of the UPN field. - UPNOffset uint16 // An unsigned 16-bit integer in little-endian format that contains the offset to the beginning of the buffer, in bytes, from the beginning of the UPN_DNS_INFO structure. - DNSDomainNameLength uint16 - DNSDomainNameOffset uint16 - Flags uint32 - UPN string - DNSDomain string -} - -const ( - upnNoUPNAttr = 31 // The user account object does not have the userPrincipalName attribute ([MS-ADA3] section 2.349) set. A UPN constructed by concatenating the user name with the DNS domain name of the account domain is provided. -) - -// Unmarshal bytes into the UPN_DNSInfo struct -func (k *UPNDNSInfo) Unmarshal(b []byte) error { - //The UPN_DNS_INFO structure is a simple structure that is not NDR-encoded. - var p int - var e binary.ByteOrder = binary.LittleEndian - - k.UPNLength = ndr.ReadUint16(&b, &p, &e) - k.UPNOffset = ndr.ReadUint16(&b, &p, &e) - k.DNSDomainNameLength = ndr.ReadUint16(&b, &p, &e) - k.DNSDomainNameOffset = ndr.ReadUint16(&b, &p, &e) - k.Flags = ndr.ReadUint32(&b, &p, &e) - ub := b[k.UPNOffset : k.UPNOffset+k.UPNLength] - db := b[k.DNSDomainNameOffset : k.DNSDomainNameOffset+k.DNSDomainNameLength] - - u := make([]rune, k.UPNLength/2, k.UPNLength/2) - for i := 0; i < len(u); i++ { - q := i * 2 - u[i] = rune(ndr.ReadUint16(&ub, &q, &e)) - } - k.UPN = string(u) - d := make([]rune, k.DNSDomainNameLength/2, k.DNSDomainNameLength/2) - for i := 0; i < len(d); i++ { - q := i * 2 - d[i] = rune(ndr.ReadUint16(&db, &q, &e)) - } - k.DNSDomain = string(d) - - l := []int{ - p, - int(k.UPNOffset + k.UPNLength), - int(k.DNSDomainNameOffset + k.DNSDomainNameLength), - } - sort.Ints(l) - //Check that there is only zero padding left - for _, v := range b[l[2]:] { - if v != 0 { - return ndr.Malformed{EText: "Non-zero padding left over at end of data stream."} - } - } - - return nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Authenticator.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Authenticator.go deleted file mode 100644 index 0395922f..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Authenticator.go +++ /dev/null @@ -1,100 +0,0 @@ -// Package types provides Kerberos 5 data types. -package types - -import ( - "crypto/rand" - "fmt" - "math" - "math/big" - "time" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/asn1tools" - "gopkg.in/jcmturner/gokrb5.v5/iana" - "gopkg.in/jcmturner/gokrb5.v5/iana/asnAppTag" -) - -/*Authenticator ::= [APPLICATION 2] SEQUENCE { -authenticator-vno [0] INTEGER (5), -crealm [1] Realm, -cname [2] PrincipalName, -cksum [3] Checksum OPTIONAL, -cusec [4] Microseconds, -ctime [5] KerberosTime, -subkey [6] EncryptionKey OPTIONAL, -seq-number [7] UInt32 OPTIONAL, -authorization-data [8] AuthorizationData OPTIONAL -} - - cksum - This field contains a checksum of the application data that - accompanies the KRB_AP_REQ, computed using a key usage value of 10 - in normal application exchanges, or 6 when used in the TGS-REQ - PA-TGS-REQ AP-DATA field. - -*/ - -// Authenticator - A record containing information that can be shown to have been recently generated using the session key known only by the client and server. -// https://tools.ietf.org/html/rfc4120#section-5.5.1 -type Authenticator struct { - AVNO int `asn1:"explicit,tag:0"` - CRealm string `asn1:"generalstring,explicit,tag:1"` - CName PrincipalName `asn1:"explicit,tag:2"` - Cksum Checksum `asn1:"explicit,optional,tag:3"` - Cusec int `asn1:"explicit,tag:4"` - CTime time.Time `asn1:"generalized,explicit,tag:5"` - SubKey EncryptionKey `asn1:"explicit,optional,tag:6"` - SeqNumber int64 `asn1:"explicit,optional,tag:7"` - AuthorizationData AuthorizationData `asn1:"explicit,optional,tag:8"` -} - -// NewAuthenticator creates a new Authenticator. -func NewAuthenticator(realm string, cname PrincipalName) (Authenticator, error) { - seq, err := rand.Int(rand.Reader, big.NewInt(math.MaxUint32)) - if err != nil { - return Authenticator{}, err - } - t := time.Now().UTC() - return Authenticator{ - AVNO: iana.PVNO, - CRealm: realm, - CName: cname, - Cksum: Checksum{}, - Cusec: int((t.UnixNano() / int64(time.Microsecond)) - (t.Unix() * 1e6)), - CTime: t, - SeqNumber: seq.Int64(), - }, nil -} - -// GenerateSeqNumberAndSubKey sets the Authenticator's sequence number and subkey. -func (a *Authenticator) GenerateSeqNumberAndSubKey(keyType int32, keySize int) error { - seq, err := rand.Int(rand.Reader, big.NewInt(math.MaxUint32)) - if err != nil { - return err - } - a.SeqNumber = seq.Int64() - //Generate subkey value - sk := make([]byte, keySize, keySize) - rand.Read(sk) - a.SubKey = EncryptionKey{ - KeyType: keyType, - KeyValue: sk, - } - return nil -} - -// Unmarshal bytes into the Authenticator. -func (a *Authenticator) Unmarshal(b []byte) error { - _, err := asn1.UnmarshalWithParams(b, a, fmt.Sprintf("application,explicit,tag:%v", asnAppTag.Authenticator)) - return err -} - -// Marshal the Authenticator. -func (a *Authenticator) Marshal() ([]byte, error) { - b, err := asn1.Marshal(*a) - if err != nil { - return nil, err - } - b = asn1tools.AddASNAppTag(b, asnAppTag.Authenticator) - return b, nil -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/AuthorizationData.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/AuthorizationData.go deleted file mode 100644 index c9448008..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/AuthorizationData.go +++ /dev/null @@ -1,123 +0,0 @@ -package types - -import ( - "github.com/jcmturner/gofork/encoding/asn1" -) - -// Reference: https://www.ietf.org/rfc/rfc4120.txt -// Section: 5.2.6 - -/* -AuthorizationData - --- NOTE: AuthorizationData is always used as an OPTIONAL field and --- should not be empty. -AuthorizationData ::= SEQUENCE OF SEQUENCE { -ad-type [0] Int32, -ad-data [1] OCTET STRING -} - -ad-data -This field contains authorization data to be interpreted according -to the value of the corresponding ad-type field. - -ad-type - This field specifies the format for the ad-data subfield. All -negative values are reserved for local use. Non-negative values -are reserved for registered use. - -Each sequence of type and data is referred to as an authorization -element. Elements MAY be application specific; however, there is a -common set of recursive elements that should be understood by all -implementations. These elements contain other elements embedded -within them, and the interpretation of the encapsulating element -determines which of the embedded elements must be interpreted, and -which may be ignored. - -These common authorization data elements are recursively defined, -meaning that the ad-data for these types will itself contain a -sequence of authorization data whose interpretation is affected by -the encapsulating element. Depending on the meaning of the -encapsulating element, the encapsulated elements may be ignored, -might be interpreted as issued directly by the KDC, or might be -stored in a separate plaintext part of the ticket. The types of the -encapsulating elements are specified as part of the Kerberos -specification because the behavior based on these values should be -understood across implementations, whereas other elements need only -be understood by the applications that they affect. - -Authorization data elements are considered critical if present in a -ticket or authenticator. If an unknown authorization data element -type is received by a server either in an AP-REQ or in a ticket -contained in an AP-REQ, then, unless it is encapsulated in a known -authorization data element amending the criticality of the elements -it contains, authentication MUST fail. Authorization data is -intended to restrict the use of a ticket. If the service cannot -determine whether the restriction applies to that service, then a -security weakness may result if the ticket can be used for that -service. Authorization elements that are optional can be enclosed in -an AD-IF-RELEVANT element. - -In the definitions that follow, the value of the ad-type for the -element will be specified as the least significant part of the -subsection number, and the value of the ad-data will be as shown in -the ASN.1 structure that follows the subsection heading. - - Contents of ad-data ad-type - - DER encoding of AD-IF-RELEVANT 1 - - DER encoding of AD-KDCIssued 4 - - DER encoding of AD-AND-OR 5 - - DER encoding of AD-MANDATORY-FOR-KDC 8 - -*/ - -// AuthorizationData implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6 -type AuthorizationData []AuthorizationDataEntry - -// AuthorizationDataEntry implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6 -type AuthorizationDataEntry struct { - ADType int32 `asn1:"explicit,tag:0"` - ADData []byte `asn1:"explicit,tag:1"` -} - -// ADIfRelevant implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.1 -type ADIfRelevant AuthorizationData - -// ADKDCIssued implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.2 -type ADKDCIssued struct { - ADChecksum Checksum `asn1:"explicit,tag:0"` - IRealm string `asn1:"optional,generalstring,explicit,tag:1"` - Isname PrincipalName `asn1:"optional,explicit,tag:2"` - Elements AuthorizationData `asn1:"explicit,tag:3"` -} - -// ADAndOr implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.3 -type ADAndOr struct { - ConditionCount int32 `asn1:"explicit,tag:0"` - Elements AuthorizationData `asn1:"explicit,tag:1"` -} - -// ADMandatoryForKDC implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.6.4 -type ADMandatoryForKDC AuthorizationData - -// Unmarshal bytes into the ADKDCIssued. -func (a *ADKDCIssued) Unmarshal(b []byte) error { - _, err := asn1.Unmarshal(b, a) - return err -} - -// Unmarshal bytes into the AuthorizationData. -func (a *AuthorizationData) Unmarshal(b []byte) error { - _, err := asn1.Unmarshal(b, a) - return err -} - -// Unmarshal bytes into the AuthorizationDataEntry. -func (a *AuthorizationDataEntry) Unmarshal(b []byte) error { - _, err := asn1.Unmarshal(b, a) - return err -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Cryptosystem.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Cryptosystem.go deleted file mode 100644 index 7e8b4ab2..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/Cryptosystem.go +++ /dev/null @@ -1,55 +0,0 @@ -package types - -import ( - "github.com/jcmturner/gofork/encoding/asn1" -) - -// Reference: https://www.ietf.org/rfc/rfc4120.txt -// Section: 5.2.9 - -// EncryptedData implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.9 -type EncryptedData struct { - EType int32 `asn1:"explicit,tag:0"` - KVNO int `asn1:"explicit,optional,tag:1"` - Cipher []byte `asn1:"explicit,tag:2"` -} - -// EncryptionKey implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.9 -// AKA KeyBlock -type EncryptionKey struct { - KeyType int32 `asn1:"explicit,tag:0"` - KeyValue []byte `asn1:"explicit,tag:1"` -} - -// Checksum implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.9 -type Checksum struct { - CksumType int32 `asn1:"explicit,tag:0"` - Checksum []byte `asn1:"explicit,tag:1"` -} - -// Unmarshal bytes into the EncryptedData. -func (a *EncryptedData) Unmarshal(b []byte) error { - _, err := asn1.Unmarshal(b, a) - return err -} - -// Marshal the EncryptedData. -func (a *EncryptedData) Marshal() ([]byte, error) { - edb, err := asn1.Marshal(*a) - if err != nil { - return edb, err - } - return edb, nil -} - -// Unmarshal bytes into the EncryptionKey. -func (a *EncryptionKey) Unmarshal(b []byte) error { - _, err := asn1.Unmarshal(b, a) - return err -} - -// Unmarshal bytes into the Checksum. -func (a *Checksum) Unmarshal(b []byte) error { - _, err := asn1.Unmarshal(b, a) - return err -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/HostAddress.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/HostAddress.go deleted file mode 100644 index 3ec0d3f5..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/HostAddress.go +++ /dev/null @@ -1,206 +0,0 @@ -package types - -// Reference: https://www.ietf.org/rfc/rfc4120.txt -// Section: 5.2.5 - -import ( - "bytes" - "fmt" - "net" - - "github.com/jcmturner/gofork/encoding/asn1" - "gopkg.in/jcmturner/gokrb5.v5/iana/addrtype" -) - -/* -HostAddress and HostAddresses - -HostAddress ::= SEQUENCE { - addr-type [0] Int32, - address [1] OCTET STRING -} - --- NOTE: HostAddresses is always used as an OPTIONAL field and --- should not be empty. -HostAddresses -- NOTE: subtly different from rfc1510, - -- but has a value mapping and encodes the same - ::= SEQUENCE OF HostAddress - -The host address encodings consist of two fields: - -addr-type - This field specifies the type of address that follows. Pre- - defined values for this field are specified in Section 7.5.3. - -address - This field encodes a single address of type addr-type. -*/ - -// HostAddresses implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.5 -type HostAddresses []HostAddress - -// HostAddress implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.2.5 -type HostAddress struct { - AddrType int32 `asn1:"explicit,tag:0"` - Address []byte `asn1:"explicit,tag:1"` -} - -// GetHostAddress returns a HostAddress struct from a string in the format : -func GetHostAddress(s string) (HostAddress, error) { - var h HostAddress - cAddr, _, err := net.SplitHostPort(s) - if err != nil { - return h, fmt.Errorf("invalid format of client address: %v", err) - } - ip := net.ParseIP(cAddr) - hb, err := ip.MarshalText() - if err != nil { - return h, fmt.Errorf("could not marshal client's address into bytes: %v", err) - } - var ht int32 - if ip.To4() != nil { - ht = addrtype.IPv4 - } else if ip.To16() != nil { - ht = addrtype.IPv6 - } else { - return h, fmt.Errorf("could not determine client's address types: %v", err) - } - h = HostAddress{ - AddrType: ht, - Address: hb, - } - return h, nil -} - -// GetAddress returns a string representation of the HostAddress. -func (h *HostAddress) GetAddress() (string, error) { - var b []byte - _, err := asn1.Unmarshal(h.Address, &b) - return string(b), err -} - -// LocalHostAddresses returns a HostAddresses struct for the local machines interface IP addresses. -func LocalHostAddresses() (ha HostAddresses, err error) { - ifs, err := net.Interfaces() - if err != nil { - return - } - for _, iface := range ifs { - if iface.Flags&net.FlagLoopback != 0 || iface.Flags&net.FlagUp == 0 { - // Interface is either loopback of not up - continue - } - addrs, err := iface.Addrs() - if err != nil { - continue - } - for _, addr := range addrs { - var ip net.IP - switch v := addr.(type) { - case *net.IPNet: - ip = v.IP - case *net.IPAddr: - ip = v.IP - } - var a HostAddress - if ip.To16() == nil { - //neither IPv4 or IPv6 - continue - } - if ip.To4() != nil { - //Is IPv4 - a.AddrType = addrtype.IPv4 - a.Address = ip.To4() - } else { - a.AddrType = addrtype.IPv6 - a.Address = ip.To16() - } - ha = append(ha, a) - } - } - return ha, nil -} - -// HostAddressesFromNetIPs returns a HostAddresses type from a slice of net.IP -func HostAddressesFromNetIPs(ips []net.IP) (ha HostAddresses) { - for _, ip := range ips { - ha = append(ha, HostAddressFromNetIP(ip)) - } - return ha -} - -// HostAddressFromNetIP returns a HostAddress type from a net.IP -func HostAddressFromNetIP(ip net.IP) HostAddress { - if ip.To4() != nil { - //Is IPv4 - return HostAddress{ - AddrType: addrtype.IPv4, - Address: ip.To4(), - } - } - return HostAddress{ - AddrType: addrtype.IPv6, - Address: ip.To16(), - } -} - -// HostAddressesEqual tests if two HostAddress slices are equal. -func HostAddressesEqual(h, a []HostAddress) bool { - if len(h) != len(a) { - return false - } - for _, e := range a { - var found bool - for _, i := range h { - if e.Equal(i) { - found = true - break - } - } - if !found { - return false - } - } - return true -} - -// HostAddressesContains tests if a HostAddress is contained in a HostAddress slice. -func HostAddressesContains(h []HostAddress, a HostAddress) bool { - for _, e := range h { - if e.Equal(a) { - return true - } - } - return false -} - -// Equal tests if the HostAddress is equal to another HostAddress provided. -func (h *HostAddress) Equal(a HostAddress) bool { - if h.AddrType != a.AddrType { - return false - } - return bytes.Equal(h.Address, a.Address) -} - -// Contains tests if a HostAddress is contained within the HostAddresses struct. -func (h *HostAddresses) Contains(a HostAddress) bool { - for _, e := range *h { - if e.Equal(a) { - return true - } - } - return false -} - -// Equal tests if a HostAddress slice is equal to the HostAddresses struct. -func (h *HostAddresses) Equal(a []HostAddress) bool { - if len(*h) != len(a) { - return false - } - for _, e := range a { - if !h.Contains(e) { - return false - } - } - return true -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/KerberosFlags.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/KerberosFlags.go deleted file mode 100644 index 06c3a170..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/KerberosFlags.go +++ /dev/null @@ -1,124 +0,0 @@ -package types - -// Reference: https://www.ietf.org/rfc/rfc4120.txt -// Section: 5.2.8 - -import ( - "github.com/jcmturner/gofork/encoding/asn1" -) - -/* -KerberosFlags - -For several message types, a specific constrained bit string type, -KerberosFlags, is used. - -KerberosFlags ::= BIT STRING (SIZE (32..MAX)) --- minimum number of bits shall be sent, --- but no fewer than 32 - -Compatibility note: The following paragraphs describe a change from -the RFC 1510 description of bit strings that would result in -incompatility in the case of an implementation that strictly -conformed to ASN.1 DER and RFC 1510. - -ASN.1 bit strings have multiple uses. The simplest use of a bit -string is to contain a vector of bits, with no particular meaning -attached to individual bits. This vector of bits is not necessarily -a multiple of eight bits long. The use in Kerberos of a bit string -as a compact boolean vector wherein each element has a distinct -meaning poses some problems. The natural notation for a compact -boolean vector is the ASN.1 "NamedBit" notation, and the DER require -that encodings of a bit string using "NamedBit" notation exclude any -trailing zero bits. This truncation is easy to neglect, especially -given C language implementations that naturally choose to store -boolean vectors as 32-bit integers. - -For example, if the notation for KDCOptions were to include the -"NamedBit" notation, as in RFC 1510, and a KDCOptions value to be -encoded had only the "forwardable" (bit number one) bit set, the DER -encoding MUST include only two bits: the first reserved bit -("reserved", bit number zero, value zero) and the one-valued bit (bit -number one) for "forwardable". - -Most existing implementations of Kerberos unconditionally send 32 -bits on the wire when encoding bit strings used as boolean vectors. -This behavior violates the ASN.1 syntax used for flag values in RFC -1510, but it occurs on such a widely installed base that the protocol -description is being modified to accommodate it. - -Consequently, this document removes the "NamedBit" notations for -individual bits, relegating them to comments. The size constraint on -the KerberosFlags type requires that at least 32 bits be encoded at -all times, though a lenient implementation MAY choose to accept fewer -than 32 bits and to treat the missing bits as set to zero. - -Currently, no uses of KerberosFlags specify more than 32 bits' worth -of flags, although future revisions of this document may do so. When -more than 32 bits are to be transmitted in a KerberosFlags value, -future revisions to this document will likely specify that the -smallest number of bits needed to encode the highest-numbered one- -valued bit should be sent. This is somewhat similar to the DER -encoding of a bit string that is declared with the "NamedBit" -notation. -*/ - -// NewKrbFlags returns an ASN1 BitString struct of the right size for KrbFlags. -func NewKrbFlags() asn1.BitString { - f := asn1.BitString{} - f.Bytes = make([]byte, 4) - f.BitLength = len(f.Bytes) * 8 - return f -} - -// SetFlags sets the flags of an ASN1 BitString. -func SetFlags(f *asn1.BitString, j []int) { - for _, i := range j { - SetFlag(f, i) - } -} - -// SetFlag sets a flag in an ASN1 BitString. -func SetFlag(f *asn1.BitString, i int) { - for l := len(f.Bytes); l < 4; l++ { - (*f).Bytes = append((*f).Bytes, byte(0)) - (*f).BitLength = len((*f).Bytes) * 8 - } - //Which byte? - b := int(i / 8) - //Which bit in byte - p := uint(7 - (i - 8*b)) - (*f).Bytes[b] = (*f).Bytes[b] | (1 << p) -} - -// UnsetFlags unsets flags in an ASN1 BitString. -func UnsetFlags(f *asn1.BitString, j []int) { - for _, i := range j { - UnsetFlag(f, i) - } -} - -// UnsetFlag unsets a flag in an ASN1 BitString. -func UnsetFlag(f *asn1.BitString, i int) { - for l := len(f.Bytes); l < 4; l++ { - (*f).Bytes = append((*f).Bytes, byte(0)) - (*f).BitLength = len((*f).Bytes) * 8 - } - //Which byte? - b := int(i / 8) - //Which bit in byte - p := uint(7 - (i - 8*b)) - (*f).Bytes[b] = (*f).Bytes[b] &^ (1 << p) -} - -// IsFlagSet tests if a flag is set in the ASN1 BitString. -func IsFlagSet(f *asn1.BitString, i int) bool { - //Which byte? - b := int(i / 8) - //Which bit in byte - p := uint(7 - (i - 8*b)) - if (*f).Bytes[b]&(1</@ -// a PrincipalName type will be returned with the name type set to KRB_NT_PRINCIPAL(1) -// and the realm will be returned as a string. If the "@" suffix -// is not included in the SPN then the value of realm string returned will be "" -func ParseSPNString(spn string) (pn PrincipalName, realm string) { - if strings.Contains(spn, "@") { - s := strings.Split(spn, "@") - realm = s[len(s)-1] - spn = strings.TrimSuffix(spn, "@"+realm) - } - pn = NewPrincipalName(nametype.KRB_NT_PRINCIPAL, spn) - return -} diff --git a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/TypedData.go b/vendor/gopkg.in/jcmturner/gokrb5.v5/types/TypedData.go deleted file mode 100644 index 19e9f496..00000000 --- a/vendor/gopkg.in/jcmturner/gokrb5.v5/types/TypedData.go +++ /dev/null @@ -1,18 +0,0 @@ -package types - -import "github.com/jcmturner/gofork/encoding/asn1" - -// TypedData implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.9.1 -type TypedData struct { - DataType int32 `asn1:"explicit,tag:0"` - DataValue []byte `asn1:"optional,explicit,tag:1"` -} - -// TypedDataSequence implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.9.1 -type TypedDataSequence []TypedData - -// Unmarshal bytes into the TypedDataSequence. -func (a *TypedDataSequence) Unmarshal(b []byte) error { - _, err := asn1.Unmarshal(b, a) - return err -} From f2ccfa66adad8606c005ed8544a9ab446f14a21e Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 1 Aug 2018 16:54:07 +0200 Subject: [PATCH 040/159] Move rpc and protocol into an internal package --- .travis.yml | 2 +- Makefile | 10 +++++----- client.go | 4 ++-- content_summary.go | 4 ++-- file_reader.go | 4 ++-- file_writer.go | 4 ++-- file_writer_test.go | 2 +- .../hadoop_common/GenericRefreshProtocol.pb.go | 0 .../hadoop_common/GenericRefreshProtocol.proto | 0 .../hadoop_common/GetUserMappingsProtocol.pb.go | 0 .../hadoop_common/GetUserMappingsProtocol.proto | 0 .../protocol}/hadoop_common/HAServiceProtocol.pb.go | 0 .../protocol}/hadoop_common/HAServiceProtocol.proto | 0 .../protocol}/hadoop_common/IpcConnectionContext.pb.go | 0 .../protocol}/hadoop_common/IpcConnectionContext.proto | 0 .../protocol}/hadoop_common/ProtobufRpcEngine.pb.go | 0 .../protocol}/hadoop_common/ProtobufRpcEngine.proto | 0 .../protocol}/hadoop_common/ProtocolInfo.pb.go | 0 .../protocol}/hadoop_common/ProtocolInfo.proto | 0 .../RefreshAuthorizationPolicyProtocol.pb.go | 0 .../RefreshAuthorizationPolicyProtocol.proto | 0 .../hadoop_common/RefreshCallQueueProtocol.pb.go | 0 .../hadoop_common/RefreshCallQueueProtocol.proto | 0 .../hadoop_common/RefreshUserMappingsProtocol.pb.go | 0 .../hadoop_common/RefreshUserMappingsProtocol.proto | 0 .../protocol}/hadoop_common/RpcHeader.pb.go | 0 .../protocol}/hadoop_common/RpcHeader.proto | 0 .../protocol}/hadoop_common/Security.pb.go | 0 .../protocol}/hadoop_common/Security.proto | 0 .../protocol}/hadoop_common/TraceAdmin.pb.go | 0 .../protocol}/hadoop_common/TraceAdmin.proto | 0 .../protocol}/hadoop_common/ZKFCProtocol.pb.go | 0 .../protocol}/hadoop_common/ZKFCProtocol.proto | 0 .../protocol}/hadoop_hdfs/ClientDatanodeProtocol.pb.go | 2 +- .../protocol}/hadoop_hdfs/ClientDatanodeProtocol.proto | 0 .../protocol}/hadoop_hdfs/ClientNamenodeProtocol.pb.go | 2 +- .../protocol}/hadoop_hdfs/ClientNamenodeProtocol.proto | 0 .../hadoop_hdfs/ReconfigurationProtocol.pb.go | 0 .../hadoop_hdfs/ReconfigurationProtocol.proto | 0 {protocol => internal/protocol}/hadoop_hdfs/acl.pb.go | 0 {protocol => internal/protocol}/hadoop_hdfs/acl.proto | 0 .../protocol}/hadoop_hdfs/datatransfer.pb.go | 2 +- .../protocol}/hadoop_hdfs/datatransfer.proto | 0 .../protocol}/hadoop_hdfs/encryption.pb.go | 0 .../protocol}/hadoop_hdfs/encryption.proto | 0 .../protocol}/hadoop_hdfs/erasurecoding.pb.go | 0 .../protocol}/hadoop_hdfs/erasurecoding.proto | 0 {protocol => internal/protocol}/hadoop_hdfs/hdfs.pb.go | 2 +- {protocol => internal/protocol}/hadoop_hdfs/hdfs.proto | 0 .../protocol}/hadoop_hdfs/inotify.pb.go | 0 .../protocol}/hadoop_hdfs/inotify.proto | 0 .../protocol}/hadoop_hdfs/xattr.pb.go | 0 .../protocol}/hadoop_hdfs/xattr.proto | 0 {rpc => internal/rpc}/block_read_stream.go | 2 +- {rpc => internal/rpc}/block_reader.go | 2 +- {rpc => internal/rpc}/block_write_stream.go | 2 +- {rpc => internal/rpc}/block_writer.go | 2 +- {rpc => internal/rpc}/block_writer_test.go | 0 {rpc => internal/rpc}/checksum_reader.go | 2 +- {rpc => internal/rpc}/datanode_failover.go | 0 {rpc => internal/rpc}/datanode_failover_test.go | 0 {rpc => internal/rpc}/kerberos.go | 2 +- {rpc => internal/rpc}/kerberos_test.go | 0 {rpc => internal/rpc}/namenode.go | 2 +- {rpc => internal/rpc}/rpc.go | 2 +- mkdir.go | 4 ++-- perms.go | 4 ++-- remove.go | 4 ++-- rename.go | 4 ++-- stat.go | 4 ++-- stat_fs.go | 4 ++-- 71 files changed, 39 insertions(+), 39 deletions(-) rename {protocol => internal/protocol}/hadoop_common/GenericRefreshProtocol.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/GenericRefreshProtocol.proto (100%) rename {protocol => internal/protocol}/hadoop_common/GetUserMappingsProtocol.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/GetUserMappingsProtocol.proto (100%) rename {protocol => internal/protocol}/hadoop_common/HAServiceProtocol.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/HAServiceProtocol.proto (100%) rename {protocol => internal/protocol}/hadoop_common/IpcConnectionContext.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/IpcConnectionContext.proto (100%) rename {protocol => internal/protocol}/hadoop_common/ProtobufRpcEngine.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/ProtobufRpcEngine.proto (100%) rename {protocol => internal/protocol}/hadoop_common/ProtocolInfo.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/ProtocolInfo.proto (100%) rename {protocol => internal/protocol}/hadoop_common/RefreshAuthorizationPolicyProtocol.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/RefreshAuthorizationPolicyProtocol.proto (100%) rename {protocol => internal/protocol}/hadoop_common/RefreshCallQueueProtocol.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/RefreshCallQueueProtocol.proto (100%) rename {protocol => internal/protocol}/hadoop_common/RefreshUserMappingsProtocol.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/RefreshUserMappingsProtocol.proto (100%) rename {protocol => internal/protocol}/hadoop_common/RpcHeader.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/RpcHeader.proto (100%) rename {protocol => internal/protocol}/hadoop_common/Security.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/Security.proto (100%) rename {protocol => internal/protocol}/hadoop_common/TraceAdmin.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/TraceAdmin.proto (100%) rename {protocol => internal/protocol}/hadoop_common/ZKFCProtocol.pb.go (100%) rename {protocol => internal/protocol}/hadoop_common/ZKFCProtocol.proto (100%) rename {protocol => internal/protocol}/hadoop_hdfs/ClientDatanodeProtocol.pb.go (99%) rename {protocol => internal/protocol}/hadoop_hdfs/ClientDatanodeProtocol.proto (100%) rename {protocol => internal/protocol}/hadoop_hdfs/ClientNamenodeProtocol.pb.go (99%) rename {protocol => internal/protocol}/hadoop_hdfs/ClientNamenodeProtocol.proto (100%) rename {protocol => internal/protocol}/hadoop_hdfs/ReconfigurationProtocol.pb.go (100%) rename {protocol => internal/protocol}/hadoop_hdfs/ReconfigurationProtocol.proto (100%) rename {protocol => internal/protocol}/hadoop_hdfs/acl.pb.go (100%) rename {protocol => internal/protocol}/hadoop_hdfs/acl.proto (100%) rename {protocol => internal/protocol}/hadoop_hdfs/datatransfer.pb.go (99%) rename {protocol => internal/protocol}/hadoop_hdfs/datatransfer.proto (100%) rename {protocol => internal/protocol}/hadoop_hdfs/encryption.pb.go (100%) rename {protocol => internal/protocol}/hadoop_hdfs/encryption.proto (100%) rename {protocol => internal/protocol}/hadoop_hdfs/erasurecoding.pb.go (100%) rename {protocol => internal/protocol}/hadoop_hdfs/erasurecoding.proto (100%) rename {protocol => internal/protocol}/hadoop_hdfs/hdfs.pb.go (99%) rename {protocol => internal/protocol}/hadoop_hdfs/hdfs.proto (100%) rename {protocol => internal/protocol}/hadoop_hdfs/inotify.pb.go (100%) rename {protocol => internal/protocol}/hadoop_hdfs/inotify.proto (100%) rename {protocol => internal/protocol}/hadoop_hdfs/xattr.pb.go (100%) rename {protocol => internal/protocol}/hadoop_hdfs/xattr.proto (100%) rename {rpc => internal/rpc}/block_read_stream.go (98%) rename {rpc => internal/rpc}/block_reader.go (99%) rename {rpc => internal/rpc}/block_write_stream.go (99%) rename {rpc => internal/rpc}/block_writer.go (99%) rename {rpc => internal/rpc}/block_writer_test.go (100%) rename {rpc => internal/rpc}/checksum_reader.go (98%) rename {rpc => internal/rpc}/datanode_failover.go (100%) rename {rpc => internal/rpc}/datanode_failover_test.go (100%) rename {rpc => internal/rpc}/kerberos.go (98%) rename {rpc => internal/rpc}/kerberos_test.go (100%) rename {rpc => internal/rpc}/namenode.go (99%) rename {rpc => internal/rpc}/rpc.go (98%) diff --git a/.travis.yml b/.travis.yml index de65cb28..c93eb1f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ install: - ./travis-setup.sh $PLATFORM before_script: - export HADOOP_CONF_DIR="/etc/hadoop/conf" -- find protocol -name *.pb.go | xargs touch # so make doesn't try to regen protobuf files +- find internal/protocol -name *.pb.go | xargs touch # so make doesn't try to regen protobuf files script: make test before_deploy: make release deploy: diff --git a/Makefile b/Makefile index 4ab8ad3b..8cbfac71 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ -HADOOP_COMMON_PROTOS = $(shell find protocol/hadoop_common -name '*.proto') -HADOOP_HDFS_PROTOS = $(shell find protocol/hadoop_hdfs -name '*.proto') +HADOOP_COMMON_PROTOS = $(shell find internal/protocol/hadoop_common -name '*.proto') +HADOOP_HDFS_PROTOS = $(shell find internal/protocol/hadoop_hdfs -name '*.proto') GENERATED_PROTOS = $(shell echo "$(HADOOP_HDFS_PROTOS) $(HADOOP_COMMON_PROTOS)" | sed 's/\.proto/\.pb\.go/g') SOURCES = $(shell find . -name '*.go') $(GENERATED_PROTOS) # Protobuf needs one of these for every 'import "foo.proto"' in .protoc files. -PROTO_MAPPING = MSecurity.proto=github.com/colinmarc/hdfs/protocol/hadoop_common +PROTO_MAPPING = MSecurity.proto=github.com/colinmarc/hdfs/internal/protocol/hadoop_common TRAVIS_TAG ?= $(shell git rev-parse HEAD) ARCH = $(shell go env GOOS)-$(shell go env GOARCH) @@ -13,8 +13,8 @@ RELEASE_NAME = gohdfs-$(TRAVIS_TAG)-$(ARCH) all: hdfs %.pb.go: $(HADOOP_HDFS_PROTOS) $(HADOOP_COMMON_PROTOS) - protoc --go_out='$(PROTO_MAPPING):protocol/hadoop_common' -Iprotocol/hadoop_common -Iprotocol/hadoop_hdfs $(HADOOP_COMMON_PROTOS) - protoc --go_out='$(PROTO_MAPPING):protocol/hadoop_hdfs' -Iprotocol/hadoop_common -Iprotocol/hadoop_hdfs $(HADOOP_HDFS_PROTOS) + protoc --go_out='$(PROTO_MAPPING):internal/protocol/hadoop_common' -Iinternal/protocol/hadoop_common -Iinternal/protocol/hadoop_hdfs $(HADOOP_COMMON_PROTOS) + protoc --go_out='$(PROTO_MAPPING):internal/protocol/hadoop_hdfs' -Iinternal/protocol/hadoop_common -Iinternal/protocol/hadoop_hdfs $(HADOOP_HDFS_PROTOS) clean-protos: find . -name *.pb.go | xargs rm diff --git a/client.go b/client.go index 690648b3..bbe80a86 100644 --- a/client.go +++ b/client.go @@ -10,8 +10,8 @@ import ( "os/user" "strings" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/internal/rpc" krb "gopkg.in/jcmturner/gokrb5.v5/client" ) diff --git a/content_summary.go b/content_summary.go index dd436d73..262916a8 100644 --- a/content_summary.go +++ b/content_summary.go @@ -3,8 +3,8 @@ package hdfs import ( "os" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) diff --git a/file_reader.go b/file_reader.go index 592022d2..3db4b7b5 100644 --- a/file_reader.go +++ b/file_reader.go @@ -8,8 +8,8 @@ import ( "os" "time" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) diff --git a/file_writer.go b/file_writer.go index aa685871..4bbe9ebb 100644 --- a/file_writer.go +++ b/file_writer.go @@ -5,8 +5,8 @@ import ( "os" "time" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) diff --git a/file_writer_test.go b/file_writer_test.go index 6968cb66..181ac0e8 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/colinmarc/hdfs/rpc" + "github.com/colinmarc/hdfs/internal/rpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/protocol/hadoop_common/GenericRefreshProtocol.pb.go b/internal/protocol/hadoop_common/GenericRefreshProtocol.pb.go similarity index 100% rename from protocol/hadoop_common/GenericRefreshProtocol.pb.go rename to internal/protocol/hadoop_common/GenericRefreshProtocol.pb.go diff --git a/protocol/hadoop_common/GenericRefreshProtocol.proto b/internal/protocol/hadoop_common/GenericRefreshProtocol.proto similarity index 100% rename from protocol/hadoop_common/GenericRefreshProtocol.proto rename to internal/protocol/hadoop_common/GenericRefreshProtocol.proto diff --git a/protocol/hadoop_common/GetUserMappingsProtocol.pb.go b/internal/protocol/hadoop_common/GetUserMappingsProtocol.pb.go similarity index 100% rename from protocol/hadoop_common/GetUserMappingsProtocol.pb.go rename to internal/protocol/hadoop_common/GetUserMappingsProtocol.pb.go diff --git a/protocol/hadoop_common/GetUserMappingsProtocol.proto b/internal/protocol/hadoop_common/GetUserMappingsProtocol.proto similarity index 100% rename from protocol/hadoop_common/GetUserMappingsProtocol.proto rename to internal/protocol/hadoop_common/GetUserMappingsProtocol.proto diff --git a/protocol/hadoop_common/HAServiceProtocol.pb.go b/internal/protocol/hadoop_common/HAServiceProtocol.pb.go similarity index 100% rename from protocol/hadoop_common/HAServiceProtocol.pb.go rename to internal/protocol/hadoop_common/HAServiceProtocol.pb.go diff --git a/protocol/hadoop_common/HAServiceProtocol.proto b/internal/protocol/hadoop_common/HAServiceProtocol.proto similarity index 100% rename from protocol/hadoop_common/HAServiceProtocol.proto rename to internal/protocol/hadoop_common/HAServiceProtocol.proto diff --git a/protocol/hadoop_common/IpcConnectionContext.pb.go b/internal/protocol/hadoop_common/IpcConnectionContext.pb.go similarity index 100% rename from protocol/hadoop_common/IpcConnectionContext.pb.go rename to internal/protocol/hadoop_common/IpcConnectionContext.pb.go diff --git a/protocol/hadoop_common/IpcConnectionContext.proto b/internal/protocol/hadoop_common/IpcConnectionContext.proto similarity index 100% rename from protocol/hadoop_common/IpcConnectionContext.proto rename to internal/protocol/hadoop_common/IpcConnectionContext.proto diff --git a/protocol/hadoop_common/ProtobufRpcEngine.pb.go b/internal/protocol/hadoop_common/ProtobufRpcEngine.pb.go similarity index 100% rename from protocol/hadoop_common/ProtobufRpcEngine.pb.go rename to internal/protocol/hadoop_common/ProtobufRpcEngine.pb.go diff --git a/protocol/hadoop_common/ProtobufRpcEngine.proto b/internal/protocol/hadoop_common/ProtobufRpcEngine.proto similarity index 100% rename from protocol/hadoop_common/ProtobufRpcEngine.proto rename to internal/protocol/hadoop_common/ProtobufRpcEngine.proto diff --git a/protocol/hadoop_common/ProtocolInfo.pb.go b/internal/protocol/hadoop_common/ProtocolInfo.pb.go similarity index 100% rename from protocol/hadoop_common/ProtocolInfo.pb.go rename to internal/protocol/hadoop_common/ProtocolInfo.pb.go diff --git a/protocol/hadoop_common/ProtocolInfo.proto b/internal/protocol/hadoop_common/ProtocolInfo.proto similarity index 100% rename from protocol/hadoop_common/ProtocolInfo.proto rename to internal/protocol/hadoop_common/ProtocolInfo.proto diff --git a/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.pb.go b/internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.pb.go similarity index 100% rename from protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.pb.go rename to internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.pb.go diff --git a/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.proto b/internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.proto similarity index 100% rename from protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.proto rename to internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.proto diff --git a/protocol/hadoop_common/RefreshCallQueueProtocol.pb.go b/internal/protocol/hadoop_common/RefreshCallQueueProtocol.pb.go similarity index 100% rename from protocol/hadoop_common/RefreshCallQueueProtocol.pb.go rename to internal/protocol/hadoop_common/RefreshCallQueueProtocol.pb.go diff --git a/protocol/hadoop_common/RefreshCallQueueProtocol.proto b/internal/protocol/hadoop_common/RefreshCallQueueProtocol.proto similarity index 100% rename from protocol/hadoop_common/RefreshCallQueueProtocol.proto rename to internal/protocol/hadoop_common/RefreshCallQueueProtocol.proto diff --git a/protocol/hadoop_common/RefreshUserMappingsProtocol.pb.go b/internal/protocol/hadoop_common/RefreshUserMappingsProtocol.pb.go similarity index 100% rename from protocol/hadoop_common/RefreshUserMappingsProtocol.pb.go rename to internal/protocol/hadoop_common/RefreshUserMappingsProtocol.pb.go diff --git a/protocol/hadoop_common/RefreshUserMappingsProtocol.proto b/internal/protocol/hadoop_common/RefreshUserMappingsProtocol.proto similarity index 100% rename from protocol/hadoop_common/RefreshUserMappingsProtocol.proto rename to internal/protocol/hadoop_common/RefreshUserMappingsProtocol.proto diff --git a/protocol/hadoop_common/RpcHeader.pb.go b/internal/protocol/hadoop_common/RpcHeader.pb.go similarity index 100% rename from protocol/hadoop_common/RpcHeader.pb.go rename to internal/protocol/hadoop_common/RpcHeader.pb.go diff --git a/protocol/hadoop_common/RpcHeader.proto b/internal/protocol/hadoop_common/RpcHeader.proto similarity index 100% rename from protocol/hadoop_common/RpcHeader.proto rename to internal/protocol/hadoop_common/RpcHeader.proto diff --git a/protocol/hadoop_common/Security.pb.go b/internal/protocol/hadoop_common/Security.pb.go similarity index 100% rename from protocol/hadoop_common/Security.pb.go rename to internal/protocol/hadoop_common/Security.pb.go diff --git a/protocol/hadoop_common/Security.proto b/internal/protocol/hadoop_common/Security.proto similarity index 100% rename from protocol/hadoop_common/Security.proto rename to internal/protocol/hadoop_common/Security.proto diff --git a/protocol/hadoop_common/TraceAdmin.pb.go b/internal/protocol/hadoop_common/TraceAdmin.pb.go similarity index 100% rename from protocol/hadoop_common/TraceAdmin.pb.go rename to internal/protocol/hadoop_common/TraceAdmin.pb.go diff --git a/protocol/hadoop_common/TraceAdmin.proto b/internal/protocol/hadoop_common/TraceAdmin.proto similarity index 100% rename from protocol/hadoop_common/TraceAdmin.proto rename to internal/protocol/hadoop_common/TraceAdmin.proto diff --git a/protocol/hadoop_common/ZKFCProtocol.pb.go b/internal/protocol/hadoop_common/ZKFCProtocol.pb.go similarity index 100% rename from protocol/hadoop_common/ZKFCProtocol.pb.go rename to internal/protocol/hadoop_common/ZKFCProtocol.pb.go diff --git a/protocol/hadoop_common/ZKFCProtocol.proto b/internal/protocol/hadoop_common/ZKFCProtocol.proto similarity index 100% rename from protocol/hadoop_common/ZKFCProtocol.proto rename to internal/protocol/hadoop_common/ZKFCProtocol.proto diff --git a/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go b/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go similarity index 99% rename from protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go rename to internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go index 113b0d70..4383a1f6 100644 --- a/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go +++ b/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go @@ -6,7 +6,7 @@ package hadoop_hdfs import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hadoop_common "github.com/colinmarc/hdfs/protocol/hadoop_common" +import hadoop_common "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/protocol/hadoop_hdfs/ClientDatanodeProtocol.proto b/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.proto similarity index 100% rename from protocol/hadoop_hdfs/ClientDatanodeProtocol.proto rename to internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.proto diff --git a/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go b/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go similarity index 99% rename from protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go rename to internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go index 032e9fe4..c3f97db6 100644 --- a/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go +++ b/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go @@ -6,7 +6,7 @@ package hadoop_hdfs import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import _ "github.com/colinmarc/hdfs/protocol/hadoop_common" +import _ "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/protocol/hadoop_hdfs/ClientNamenodeProtocol.proto b/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.proto similarity index 100% rename from protocol/hadoop_hdfs/ClientNamenodeProtocol.proto rename to internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.proto diff --git a/protocol/hadoop_hdfs/ReconfigurationProtocol.pb.go b/internal/protocol/hadoop_hdfs/ReconfigurationProtocol.pb.go similarity index 100% rename from protocol/hadoop_hdfs/ReconfigurationProtocol.pb.go rename to internal/protocol/hadoop_hdfs/ReconfigurationProtocol.pb.go diff --git a/protocol/hadoop_hdfs/ReconfigurationProtocol.proto b/internal/protocol/hadoop_hdfs/ReconfigurationProtocol.proto similarity index 100% rename from protocol/hadoop_hdfs/ReconfigurationProtocol.proto rename to internal/protocol/hadoop_hdfs/ReconfigurationProtocol.proto diff --git a/protocol/hadoop_hdfs/acl.pb.go b/internal/protocol/hadoop_hdfs/acl.pb.go similarity index 100% rename from protocol/hadoop_hdfs/acl.pb.go rename to internal/protocol/hadoop_hdfs/acl.pb.go diff --git a/protocol/hadoop_hdfs/acl.proto b/internal/protocol/hadoop_hdfs/acl.proto similarity index 100% rename from protocol/hadoop_hdfs/acl.proto rename to internal/protocol/hadoop_hdfs/acl.proto diff --git a/protocol/hadoop_hdfs/datatransfer.pb.go b/internal/protocol/hadoop_hdfs/datatransfer.pb.go similarity index 99% rename from protocol/hadoop_hdfs/datatransfer.pb.go rename to internal/protocol/hadoop_hdfs/datatransfer.pb.go index 00784625..7df1d588 100644 --- a/protocol/hadoop_hdfs/datatransfer.pb.go +++ b/internal/protocol/hadoop_hdfs/datatransfer.pb.go @@ -6,7 +6,7 @@ package hadoop_hdfs import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hadoop_common "github.com/colinmarc/hdfs/protocol/hadoop_common" +import hadoop_common "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/protocol/hadoop_hdfs/datatransfer.proto b/internal/protocol/hadoop_hdfs/datatransfer.proto similarity index 100% rename from protocol/hadoop_hdfs/datatransfer.proto rename to internal/protocol/hadoop_hdfs/datatransfer.proto diff --git a/protocol/hadoop_hdfs/encryption.pb.go b/internal/protocol/hadoop_hdfs/encryption.pb.go similarity index 100% rename from protocol/hadoop_hdfs/encryption.pb.go rename to internal/protocol/hadoop_hdfs/encryption.pb.go diff --git a/protocol/hadoop_hdfs/encryption.proto b/internal/protocol/hadoop_hdfs/encryption.proto similarity index 100% rename from protocol/hadoop_hdfs/encryption.proto rename to internal/protocol/hadoop_hdfs/encryption.proto diff --git a/protocol/hadoop_hdfs/erasurecoding.pb.go b/internal/protocol/hadoop_hdfs/erasurecoding.pb.go similarity index 100% rename from protocol/hadoop_hdfs/erasurecoding.pb.go rename to internal/protocol/hadoop_hdfs/erasurecoding.pb.go diff --git a/protocol/hadoop_hdfs/erasurecoding.proto b/internal/protocol/hadoop_hdfs/erasurecoding.proto similarity index 100% rename from protocol/hadoop_hdfs/erasurecoding.proto rename to internal/protocol/hadoop_hdfs/erasurecoding.proto diff --git a/protocol/hadoop_hdfs/hdfs.pb.go b/internal/protocol/hadoop_hdfs/hdfs.pb.go similarity index 99% rename from protocol/hadoop_hdfs/hdfs.pb.go rename to internal/protocol/hadoop_hdfs/hdfs.pb.go index 109720fb..d481bf46 100644 --- a/protocol/hadoop_hdfs/hdfs.pb.go +++ b/internal/protocol/hadoop_hdfs/hdfs.pb.go @@ -6,7 +6,7 @@ package hadoop_hdfs import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hadoop_common "github.com/colinmarc/hdfs/protocol/hadoop_common" +import hadoop_common "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/protocol/hadoop_hdfs/hdfs.proto b/internal/protocol/hadoop_hdfs/hdfs.proto similarity index 100% rename from protocol/hadoop_hdfs/hdfs.proto rename to internal/protocol/hadoop_hdfs/hdfs.proto diff --git a/protocol/hadoop_hdfs/inotify.pb.go b/internal/protocol/hadoop_hdfs/inotify.pb.go similarity index 100% rename from protocol/hadoop_hdfs/inotify.pb.go rename to internal/protocol/hadoop_hdfs/inotify.pb.go diff --git a/protocol/hadoop_hdfs/inotify.proto b/internal/protocol/hadoop_hdfs/inotify.proto similarity index 100% rename from protocol/hadoop_hdfs/inotify.proto rename to internal/protocol/hadoop_hdfs/inotify.proto diff --git a/protocol/hadoop_hdfs/xattr.pb.go b/internal/protocol/hadoop_hdfs/xattr.pb.go similarity index 100% rename from protocol/hadoop_hdfs/xattr.pb.go rename to internal/protocol/hadoop_hdfs/xattr.pb.go diff --git a/protocol/hadoop_hdfs/xattr.proto b/internal/protocol/hadoop_hdfs/xattr.proto similarity index 100% rename from protocol/hadoop_hdfs/xattr.proto rename to internal/protocol/hadoop_hdfs/xattr.proto diff --git a/rpc/block_read_stream.go b/internal/rpc/block_read_stream.go similarity index 98% rename from rpc/block_read_stream.go rename to internal/rpc/block_read_stream.go index 26ccc4ee..07073c30 100644 --- a/rpc/block_read_stream.go +++ b/internal/rpc/block_read_stream.go @@ -8,7 +8,7 @@ import ( "io" "math" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/rpc/block_reader.go b/internal/rpc/block_reader.go similarity index 99% rename from rpc/block_reader.go rename to internal/rpc/block_reader.go index 70f66579..166a7093 100644 --- a/rpc/block_reader.go +++ b/internal/rpc/block_reader.go @@ -10,7 +10,7 @@ import ( "net" "time" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/rpc/block_write_stream.go b/internal/rpc/block_write_stream.go similarity index 99% rename from rpc/block_write_stream.go rename to internal/rpc/block_write_stream.go index 20ae16c1..afa35ced 100644 --- a/rpc/block_write_stream.go +++ b/internal/rpc/block_write_stream.go @@ -10,7 +10,7 @@ import ( "io" "math" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/rpc/block_writer.go b/internal/rpc/block_writer.go similarity index 99% rename from rpc/block_writer.go rename to internal/rpc/block_writer.go index 18fbb1a3..955d7f86 100644 --- a/rpc/block_writer.go +++ b/internal/rpc/block_writer.go @@ -8,7 +8,7 @@ import ( "net" "time" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/rpc/block_writer_test.go b/internal/rpc/block_writer_test.go similarity index 100% rename from rpc/block_writer_test.go rename to internal/rpc/block_writer_test.go diff --git a/rpc/checksum_reader.go b/internal/rpc/checksum_reader.go similarity index 98% rename from rpc/checksum_reader.go rename to internal/rpc/checksum_reader.go index ac7d1a57..f27bca70 100644 --- a/rpc/checksum_reader.go +++ b/internal/rpc/checksum_reader.go @@ -7,7 +7,7 @@ import ( "net" "time" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" ) // ChecksumReader provides an interface for reading the "MD5CRC32" checksums of diff --git a/rpc/datanode_failover.go b/internal/rpc/datanode_failover.go similarity index 100% rename from rpc/datanode_failover.go rename to internal/rpc/datanode_failover.go diff --git a/rpc/datanode_failover_test.go b/internal/rpc/datanode_failover_test.go similarity index 100% rename from rpc/datanode_failover_test.go rename to internal/rpc/datanode_failover_test.go diff --git a/rpc/kerberos.go b/internal/rpc/kerberos.go similarity index 98% rename from rpc/kerberos.go rename to internal/rpc/kerberos.go index f8e2cf97..53dc369b 100644 --- a/rpc/kerberos.go +++ b/internal/rpc/kerberos.go @@ -6,7 +6,7 @@ import ( "net" "regexp" - hadoop "github.com/colinmarc/hdfs/protocol/hadoop_common" + hadoop "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" "gopkg.in/jcmturner/gokrb5.v5/gssapi" "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" krbtypes "gopkg.in/jcmturner/gokrb5.v5/types" diff --git a/rpc/kerberos_test.go b/internal/rpc/kerberos_test.go similarity index 100% rename from rpc/kerberos_test.go rename to internal/rpc/kerberos_test.go diff --git a/rpc/namenode.go b/internal/rpc/namenode.go similarity index 99% rename from rpc/namenode.go rename to internal/rpc/namenode.go index a66c23e4..2e08387f 100644 --- a/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -8,7 +8,7 @@ import ( "sync" "time" - hadoop "github.com/colinmarc/hdfs/protocol/hadoop_common" + hadoop "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" "github.com/golang/protobuf/proto" krb "gopkg.in/jcmturner/gokrb5.v5/client" ) diff --git a/rpc/rpc.go b/internal/rpc/rpc.go similarity index 98% rename from rpc/rpc.go rename to internal/rpc/rpc.go index ad52d5a3..6f914243 100644 --- a/rpc/rpc.go +++ b/internal/rpc/rpc.go @@ -10,7 +10,7 @@ import ( "math/rand" "time" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/mkdir.go b/mkdir.go index 436a8b30..164dc9b8 100644 --- a/mkdir.go +++ b/mkdir.go @@ -4,8 +4,8 @@ import ( "os" "path" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) diff --git a/perms.go b/perms.go index f3b36ac3..e731cc14 100644 --- a/perms.go +++ b/perms.go @@ -4,8 +4,8 @@ import ( "os" "time" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) diff --git a/remove.go b/remove.go index c6f87b3f..819357af 100644 --- a/remove.go +++ b/remove.go @@ -4,8 +4,8 @@ import ( "errors" "os" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) diff --git a/rename.go b/rename.go index eb42b404..876038d3 100644 --- a/rename.go +++ b/rename.go @@ -3,8 +3,8 @@ package hdfs import ( "os" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) diff --git a/stat.go b/stat.go index 21760986..2d15246c 100644 --- a/stat.go +++ b/stat.go @@ -5,8 +5,8 @@ import ( "path" "time" - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) diff --git a/stat_fs.go b/stat_fs.go index 4226ed30..00ac6913 100644 --- a/stat_fs.go +++ b/stat_fs.go @@ -1,8 +1,8 @@ package hdfs import ( - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" + hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/internal/rpc" ) // FsInfo provides information about HDFS From fab4ef4f0f6fd1d9aef113ee99013239f314713d Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 1 Aug 2018 16:56:42 +0200 Subject: [PATCH 041/159] Add an alias for NamenodeError, to export it from (now internal) rpc This is probably the single useful type from rpc to users. --- exceptions.go | 7 ++++++- file_writer_test.go | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/exceptions.go b/exceptions.go index d896a17b..1c7160b0 100644 --- a/exceptions.go +++ b/exceptions.go @@ -1,6 +1,11 @@ package hdfs -import "os" +import ( + "github.com/colinmarc/hdfs/internal/rpc" + "os" +) + +type NamenodeError = rpc.NamenodeError const ( fileNotFoundException = "java.io.FileNotFoundException" diff --git a/file_writer_test.go b/file_writer_test.go index 181ac0e8..487fa981 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -10,7 +10,6 @@ import ( "testing" "time" - "github.com/colinmarc/hdfs/internal/rpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -368,7 +367,7 @@ func TestFileAppendRepeatedly(t *testing.T) { // This represents a bug in the HDFS append implementation, as far as I can tell, // and is safe to skip. if pathErr, ok := err.(*os.PathError); ok { - if nnErr, ok := pathErr.Err.(*rpc.NamenodeError); ok && nnErr.Exception == abcException { + if nnErr, ok := pathErr.Err.(*NamenodeError); ok && nnErr.Exception == abcException { t.Log("Ignoring AlreadyBeingCreatedException from append") continue } From 618c9dab0134ac748901f92beca3f15aceb174bd Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 1 Aug 2018 17:33:15 +0200 Subject: [PATCH 042/159] Delete everything deprecated --- client.go | 94 +++++++------------------ cmd/hdfs/ls.go | 2 +- cmd/hdfs/paths.go | 22 +++--- file_reader.go | 2 +- file_writer.go | 14 ++-- internal/rpc/block_reader.go | 14 ---- internal/rpc/block_writer.go | 14 ---- internal/rpc/checksum_reader.go | 10 --- internal/rpc/kerberos.go | 2 +- internal/rpc/namenode.go | 119 ++++++++++---------------------- 10 files changed, 78 insertions(+), 215 deletions(-) diff --git a/client.go b/client.go index bbe80a86..d49d67d1 100644 --- a/client.go +++ b/client.go @@ -65,12 +65,6 @@ type ClientOptions struct { // multi-namenode setup (for example: 'nn/_HOST'). It is required if // KerberosClient is provided. KerberosServicePrincipleName string - // Namenode optionally specifies an existing NamenodeConnection to wrap. This - // is useful if you needed to create the namenode net.Conn manually for - // whatever reason. - // - // Deprecated: use NamenodeDialFunc instead. - Namenode *rpc.NamenodeConnection } // ClientOptionsFromConf attempts to load any relevant configuration options @@ -127,40 +121,29 @@ func ClientOptionsFromConf(conf HadoopConf) (ClientOptions, error) { // the client could not be created. func NewClient(options ClientOptions) (*Client, error) { var err error - if options.Namenode == nil { - if options.KerberosClient != nil && options.KerberosClient.Credentials == nil { - return nil, errors.New("kerberos enabled, but kerberos client is missing credentials") - } - - if options.KerberosClient != nil && options.KerberosServicePrincipleName == "" { - return nil, errors.New("kerberos enabled, but kerberos namenode SPN is not provided") - } - - if options.User == "" { - if options.KerberosClient != nil { - creds := options.KerberosClient.Credentials - options.User = creds.Username + "@" + creds.Realm - } else { - return nil, errors.New("user not specified") - } - } - - options.Namenode, err = rpc.NewNamenodeConnectionWithOptions( - rpc.NamenodeConnectionOptions{ - Addresses: options.Addresses, - User: options.User, - DialFunc: options.NamenodeDialFunc, - KerberosClient: options.KerberosClient, - KerberosServicePrincipleName: options.KerberosServicePrincipleName, - }, - ) - - if err != nil { - return nil, err - } + if options.KerberosClient != nil && options.KerberosClient.Credentials == nil { + return nil, errors.New("kerberos enabled, but kerberos client is missing credentials") } - return &Client{namenode: options.Namenode, options: options}, nil + if options.KerberosClient != nil && options.KerberosServicePrincipleName == "" { + return nil, errors.New("kerberos enabled, but kerberos namenode SPN is not provided") + } + + namenode, err := rpc.NewNamenodeConnection( + rpc.NamenodeConnectionOptions{ + Addresses: options.Addresses, + User: options.User, + DialFunc: options.NamenodeDialFunc, + KerberosClient: options.KerberosClient, + KerberosServicePrincipleName: options.KerberosServicePrincipleName, + }, + ) + + if err != nil { + return nil, err + } + + return &Client{namenode: namenode, options: options}, nil } // New returns a connected Client, or an error if it can't connect. The user @@ -189,24 +172,10 @@ func New(address string) (*Client, error) { return NewClient(options) } -// NewForUser returns a connected Client with the user specified, or an error if -// it can't connect. -// -// Deprecated: Use NewClient with ClientOptions instead. -func NewForUser(address string, user string) (*Client, error) { - return NewClient(ClientOptions{ - Addresses: []string{address}, - User: user, - }) -} - -// NewForConnection returns Client with the specified, underlying rpc.NamenodeConnection. -// You can use rpc.WrapNamenodeConnection to wrap your own net.Conn. -// -// Deprecated: Use NewClient with ClientOptions instead. -func NewForConnection(namenode *rpc.NamenodeConnection) *Client { - client, _ := NewClient(ClientOptions{Namenode: namenode}) - return client +// User returns the user that the Client is acting under. This is either the +// current system user or the kerberos principal. +func (c *Client) User() string { + return c.namenode.User } // ReadFile reads the file named by filename and returns the contents. @@ -278,16 +247,3 @@ func (c *Client) fetchDefaults() (*hdfs.FsServerDefaultsProto, error) { func (c *Client) Close() error { return c.namenode.Close() } - -// Username returns the current system user if it is not set. -// -// Deprecated: just use user.Current. Previous versions of this function would -// check the env variable HADOOP_USER_NAME; this functionality was removed. -func Username() (string, error) { - currentUser, err := user.Current() - if err != nil { - return "", err - } - - return currentUser.Username, nil -} diff --git a/cmd/hdfs/ls.go b/cmd/hdfs/ls.go index 69a7dfbc..2f28459d 100644 --- a/cmd/hdfs/ls.go +++ b/cmd/hdfs/ls.go @@ -20,7 +20,7 @@ func ls(paths []string, long, all, humanReadable bool) { } if len(paths) == 0 { - paths = []string{userDir()} + paths = []string{userDir(client)} } files := make([]string, 0, len(paths)) diff --git a/cmd/hdfs/paths.go b/cmd/hdfs/paths.go index 5a918c46..aafa9397 100644 --- a/cmd/hdfs/paths.go +++ b/cmd/hdfs/paths.go @@ -13,16 +13,10 @@ import ( var ( errMultipleNamenodeUrls = errors.New("Multiple namenode URLs specified") - rootPath = userDir() ) -func userDir() string { - currentUser, err := hdfs.Username() - if err != nil || currentUser == "" { - return "/" - } - - return path.Join("/user", currentUser) +func userDir(client *hdfs.Client) string { + return path.Join("/user", client.User()) } // normalizePaths parses the hosts out of HDFS URLs, and turns relative paths @@ -46,12 +40,7 @@ func normalizePaths(paths []string) ([]string, string, error) { namenode = url.Host } - p := path.Clean(url.Path) - if !path.IsAbs(url.Path) { - p = path.Join(rootPath, p) - } - - cleanPaths = append(cleanPaths, p) + cleanPaths = append(cleanPaths, path.Clean(url.Path)) } return cleanPaths, namenode, nil @@ -146,8 +135,13 @@ func expandGlobs(client *hdfs.Client, globbedPath string) ([]string, error) { func expandPaths(client *hdfs.Client, paths []string) ([]string, error) { var res []string + home := userDir(client) for _, p := range paths { + if !path.IsAbs(p) { + p = path.Join(home, p) + } + if hasGlob(p) { expanded, err := expandGlobs(client, p) if err != nil { diff --git a/file_reader.go b/file_reader.go index 3db4b7b5..80a67c13 100644 --- a/file_reader.go +++ b/file_reader.go @@ -402,7 +402,7 @@ func (f *FileReader) getNewBlockReader() error { if start <= off && off < end { f.blockReader = &rpc.BlockReader{ - ClientName: f.client.namenode.ClientName(), + ClientName: f.client.namenode.ClientName, Block: block, Offset: int64(off - start), UseDatanodeHostname: f.client.options.UseDatanodeHostname, diff --git a/file_writer.go b/file_writer.go index 4bbe9ebb..64b40c6b 100644 --- a/file_writer.go +++ b/file_writer.go @@ -55,7 +55,7 @@ func (c *Client) CreateFile(name string, replication int, blockSize int64, perm createReq := &hdfs.CreateRequestProto{ Src: proto.String(name), Masked: &hdfs.FsPermissionProto{Perm: proto.Uint32(uint32(perm))}, - ClientName: proto.String(c.namenode.ClientName()), + ClientName: proto.String(c.namenode.ClientName), CreateFlag: proto.Uint32(1), CreateParent: proto.Bool(false), Replication: proto.Uint32(uint32(replication)), @@ -92,7 +92,7 @@ func (c *Client) Append(name string) (*FileWriter, error) { appendReq := &hdfs.AppendRequestProto{ Src: proto.String(name), - ClientName: proto.String(c.namenode.ClientName()), + ClientName: proto.String(c.namenode.ClientName), } appendResp := &hdfs.AppendResponseProto{} @@ -120,7 +120,7 @@ func (c *Client) Append(name string) (*FileWriter, error) { } f.blockWriter = &rpc.BlockWriter{ - ClientName: f.client.namenode.ClientName(), + ClientName: f.client.namenode.ClientName, Block: block, BlockSize: f.blockSize, Offset: int64(block.B.GetNumBytes()), @@ -231,7 +231,7 @@ func (f *FileWriter) Close() error { completeReq := &hdfs.CompleteRequestProto{ Src: proto.String(f.name), - ClientName: proto.String(f.client.namenode.ClientName()), + ClientName: proto.String(f.client.namenode.ClientName), Last: lastBlock, } completeResp := &hdfs.CompleteResponseProto{} @@ -259,7 +259,7 @@ func (f *FileWriter) startNewBlock() error { addBlockReq := &hdfs.AddBlockRequestProto{ Src: proto.String(f.name), - ClientName: proto.String(f.client.namenode.ClientName()), + ClientName: proto.String(f.client.namenode.ClientName), Previous: previous, } addBlockResp := &hdfs.AddBlockResponseProto{} @@ -274,7 +274,7 @@ func (f *FileWriter) startNewBlock() error { } f.blockWriter = &rpc.BlockWriter{ - ClientName: f.client.namenode.ClientName(), + ClientName: f.client.namenode.ClientName, Block: addBlockResp.GetBlock(), BlockSize: f.blockSize, UseDatanodeHostname: f.client.options.UseDatanodeHostname, @@ -295,7 +295,7 @@ func (f *FileWriter) finalizeBlock() error { lastBlock.NumBytes = proto.Uint64(uint64(f.blockWriter.Offset)) updateReq := &hdfs.UpdateBlockForPipelineRequestProto{ Block: lastBlock, - ClientName: proto.String(f.client.namenode.ClientName()), + ClientName: proto.String(f.client.namenode.ClientName), } updateResp := &hdfs.UpdateBlockForPipelineResponseProto{} diff --git a/internal/rpc/block_reader.go b/internal/rpc/block_reader.go index 166a7093..8ed45772 100644 --- a/internal/rpc/block_reader.go +++ b/internal/rpc/block_reader.go @@ -39,20 +39,6 @@ type BlockReader struct { closed bool } -// NewBlockReader returns a new BlockReader, given the block information and -// security token from the namenode. It will connect (lazily) to one of the -// provided datanode locations based on which datanodes have seen failures. -// -// Deprecated: this method does not do any required initialization, and does -// not allow you to set fields such as UseDatanodeHostname. -func NewBlockReader(block *hdfs.LocatedBlockProto, offset int64, clientName string) *BlockReader { - return &BlockReader{ - ClientName: clientName, - Block: block, - Offset: offset, - } -} - // SetDeadline sets the deadline for future Read calls. A zero value for t // means Read will not time out. func (br *BlockReader) SetDeadline(t time.Time) error { diff --git a/internal/rpc/block_writer.go b/internal/rpc/block_writer.go index 955d7f86..abbf90b9 100644 --- a/internal/rpc/block_writer.go +++ b/internal/rpc/block_writer.go @@ -44,20 +44,6 @@ type BlockWriter struct { closed bool } -// NewBlockWriter returns a BlockWriter for the given block. It will lazily -// set up a replication pipeline, and connect to the "best" datanode based on -// any previously seen failures. -// -// Deprecated: this method does not do any required initialization, and does -// not allow you to set fields such as UseDatanodeHostname. -func NewBlockWriter(block *hdfs.LocatedBlockProto, namenode *NamenodeConnection, blockSize int64) *BlockWriter { - return &BlockWriter{ - ClientName: namenode.ClientName(), - Block: block, - BlockSize: blockSize, - } -} - // SetDeadline sets the deadline for future Write, Flush, and Close calls. A // zero value for t means those calls will not time out. func (bw *BlockWriter) SetDeadline(t time.Time) error { diff --git a/internal/rpc/checksum_reader.go b/internal/rpc/checksum_reader.go index f27bca70..163ee466 100644 --- a/internal/rpc/checksum_reader.go +++ b/internal/rpc/checksum_reader.go @@ -27,16 +27,6 @@ type ChecksumReader struct { datanodes *datanodeFailover } -// NewChecksumReader creates a new ChecksumReader for the given block. -// -// Deprecated: this method does not do any required initialization, and does -// not allow you to set fields such as UseDatanodeHostname. -func NewChecksumReader(block *hdfs.LocatedBlockProto) *ChecksumReader { - return &ChecksumReader{ - Block: block, - } -} - // SetDeadline sets the deadline for future ReadChecksum calls. A zero value // for t means Read will not time out. func (cr *ChecksumReader) SetDeadline(t time.Time) error { diff --git a/internal/rpc/kerberos.go b/internal/rpc/kerberos.go index 53dc369b..b77b383a 100644 --- a/internal/rpc/kerberos.go +++ b/internal/rpc/kerberos.go @@ -102,7 +102,7 @@ func (c *NamenodeConnection) doKerberosHandshake() error { } func (c *NamenodeConnection) writeSaslRequest(req *hadoop.RpcSaslProto) error { - packet, err := makeRPCPacket(newRPCRequestHeader(saslRpcCallId, c.clientId), req) + packet, err := makeRPCPacket(newRPCRequestHeader(saslRpcCallId, c.ClientID), req) if err != nil { return err } diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index 2e08387f..ebce9291 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -28,13 +28,15 @@ const backoffDuration = time.Second * 5 // NamenodeConnection represents an open connection to a namenode. type NamenodeConnection struct { - clientId []byte - clientName string + ClientID []byte + ClientName string + User string + currentRequestID int32 - user string kerberosClient *krb.Client kerberosServicePrincipleName string + kerberosRealm string dialFunc func(ctx context.Context, network, addr string) (net.Conn, error) conn net.Conn @@ -49,7 +51,9 @@ type NamenodeConnection struct { type NamenodeConnectionOptions struct { // Addresses specifies the namenode(s) to connect to. Addresses []string - // User specifies which HDFS user the client will act as. + // User specifies which HDFS user the client will act as. It is required + // unless kerberos authentication is enabled, in which case it will be + // determined from the provided credentials if empty. User string // DialFunc is used to connect to the datanodes. If nil, then // (&net.Dialer{}).DialContext is used. @@ -67,66 +71,45 @@ type NamenodeConnectionOptions struct { KerberosServicePrincipleName string } -// NamenodeError represents an interepreted error from the Namenode, including -// the error code and the java backtrace. -type NamenodeError struct { - Method string - Message string - Code int - Exception string -} - -// Desc returns the long form of the error code, as defined in the -// RpcErrorCodeProto in RpcHeader.proto -func (err *NamenodeError) Desc() string { - return hadoop.RpcResponseHeaderProto_RpcErrorCodeProto_name[int32(err.Code)] -} - -func (err *NamenodeError) Error() string { - s := fmt.Sprintf("%s call failed with %s", err.Method, err.Desc()) - if err.Exception != "" { - s += fmt.Sprintf(" (%s)", err.Exception) - } - - return s -} - type namenodeHost struct { address string lastError error lastErrorAt time.Time } -// NewNamenodeConnection creates a new connection to a namenode and performs an -// initial handshake. -// -// You probably want to use hdfs.New instead, which provides a higher-level -// interface. -func NewNamenodeConnection(address string, user string) (*NamenodeConnection, error) { - return NewNamenodeConnectionWithOptions(NamenodeConnectionOptions{ - Addresses: []string{address}, - User: user, - }) -} - // NewNamenodeConnectionWithOptions creates a new connection to a namenode with // the given options and performs an initial handshake. -func NewNamenodeConnectionWithOptions(options NamenodeConnectionOptions) (*NamenodeConnection, error) { +func NewNamenodeConnection(options NamenodeConnectionOptions) (*NamenodeConnection, error) { // Build the list of hosts to be used for failover. hostList := make([]*namenodeHost, len(options.Addresses)) for i, addr := range options.Addresses { hostList[i] = &namenodeHost{address: addr} } + var user, realm string + user = options.User + if user == "" { + if options.KerberosClient != nil { + creds := options.KerberosClient.Credentials + user = creds.Username + realm = creds.Realm + } else { + return nil, errors.New("user not specified") + } + } + // The ClientID is reused here both in the RPC headers (which requires a // "globally unique" ID) and as the "client name" in various requests. clientId := newClientID() c := &NamenodeConnection{ - clientId: clientId, - clientName: "go-hdfs-" + string(clientId), + ClientID: clientId, + ClientName: "go-hdfs-" + string(clientId), + User: user, + kerberosClient: options.KerberosClient, kerberosServicePrincipleName: options.KerberosServicePrincipleName, - user: options.User, + kerberosRealm: realm, + dialFunc: options.DialFunc, hostList: hostList, } @@ -139,40 +122,12 @@ func NewNamenodeConnectionWithOptions(options NamenodeConnectionOptions) (*Namen return c, nil } -// WrapNamenodeConnection wraps an existing net.Conn to a Namenode, and preforms -// an initial handshake. -// -// Deprecated: use the DialFunc option in NamenodeConnectionOptions or the -// higher-level hdfs.NewClient. -func WrapNamenodeConnection(conn net.Conn, user string) (*NamenodeConnection, error) { - // The ClientID is reused here both in the RPC headers (which requires a - // "globally unique" ID) and as the "client name" in various requests. - clientId := newClientID() - c := &NamenodeConnection{ - clientId: clientId, - clientName: "go-hdfs-" + string(clientId), - user: user, - conn: conn, - host: &namenodeHost{}, - hostList: make([]*namenodeHost, 0), - } - - err := c.doNamenodeHandshake() - if err != nil { - conn.Close() - return nil, fmt.Errorf("namenode handshake failed: %s", err) - } - - return c, nil -} - func (c *NamenodeConnection) resolveConnection() error { if c.conn != nil { return nil } var err error - if c.host != nil { err = c.host.lastError } @@ -218,14 +173,6 @@ func (c *NamenodeConnection) markFailure(err error) { c.host.lastErrorAt = time.Now() } -// ClientName provides a unique identifier for this client, which is required -// for various RPC calls. Confusingly, it's separate from clientID, which is -// used in the RPC header; to make things simpler, it reuses the random bytes -// from that, but adds a prefix to make it human-readable. -func (c *NamenodeConnection) ClientName() string { - return c.clientName -} - // Execute performs an rpc call. It does this by sending req over the wire and // unmarshaling the result into resp. func (c *NamenodeConnection) Execute(method string, req proto.Message, resp proto.Message) error { @@ -276,7 +223,7 @@ func (c *NamenodeConnection) Execute(method string, req proto.Message, resp prot // | varint length + Request | // +-----------------------------------------------------------+ func (c *NamenodeConnection) writeRequest(method string, req proto.Message) error { - rrh := newRPCRequestHeader(c.currentRequestID, c.clientId) + rrh := newRPCRequestHeader(c.currentRequestID, c.ClientID) rh := newRequestHeader(method) reqBytes, err := makeRPCPacket(rrh, rh, req) @@ -364,8 +311,8 @@ func (c *NamenodeConnection) doNamenodeHandshake() error { c.currentRequestID = 0 } - rrh := newRPCRequestHeader(handshakeCallID, c.clientId) - cc := newConnectionContext(c.user) + rrh := newRPCRequestHeader(handshakeCallID, c.ClientID) + cc := newConnectionContext(c.User, c.kerberosRealm) packet, err := makeRPCPacket(rrh, cc) if err != nil { return err @@ -400,7 +347,11 @@ func newRequestHeader(methodName string) *hadoop.RequestHeaderProto { } } -func newConnectionContext(user string) *hadoop.IpcConnectionContextProto { +func newConnectionContext(user, kerberosRealm string) *hadoop.IpcConnectionContextProto { + if kerberosRealm != "" { + user = user + "@" + kerberosRealm + } + return &hadoop.IpcConnectionContextProto{ UserInfo: &hadoop.UserInformationProto{ EffectiveUser: proto.String(user), From 7ed2427fbe669d67399635aa3b9841ab5e31cf55 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 1 Aug 2018 18:14:45 +0200 Subject: [PATCH 043/159] Improve errors, add hdfs.Error NamenodeError implements hdfs.Error, rather than being exported. --- content_summary.go | 7 +------ error.go | 40 ++++++++++++++++++++++++++++++++++++ exceptions.go | 24 ---------------------- file_reader.go | 8 ++------ file_writer.go | 21 +++++-------------- file_writer_test.go | 2 +- internal/rpc/error.go | 44 ++++++++++++++++++++++++++++++++++++++++ internal/rpc/namenode.go | 10 ++++----- mkdir.go | 9 +++----- perms.go | 19 +++-------------- remove.go | 7 +------ rename.go | 8 ++------ stat.go | 7 +------ stat_fs.go | 4 ---- 14 files changed, 108 insertions(+), 102 deletions(-) create mode 100644 error.go delete mode 100644 exceptions.go create mode 100644 internal/rpc/error.go diff --git a/content_summary.go b/content_summary.go index 262916a8..aec6cd97 100644 --- a/content_summary.go +++ b/content_summary.go @@ -4,7 +4,6 @@ import ( "os" hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) @@ -22,7 +21,7 @@ type ContentSummary struct { func (c *Client) GetContentSummary(name string) (*ContentSummary, error) { cs, err := c.getContentSummary(name) if err != nil { - err = &os.PathError{"content summary", name, err} + err = &os.PathError{"content summary", name, interpretException(err)} } return cs, err @@ -34,10 +33,6 @@ func (c *Client) getContentSummary(name string) (*ContentSummary, error) { err := c.namenode.Execute("getContentSummary", req, resp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - return nil, err } diff --git a/error.go b/error.go new file mode 100644 index 00000000..3aa23d48 --- /dev/null +++ b/error.go @@ -0,0 +1,40 @@ +package hdfs + +import ( + "os" +) + +const ( + fileNotFoundException = "java.io.FileNotFoundException" + permissionDeniedException = "org.apache.hadoop.security.AccessControlException" +) + +// Error represents a remote java exception from an HDFS namenode or datanode. +type Error interface { + // Method returns the RPC method that encountered an error. + Method() string + // Desc returns the long form of the error code (for example ERROR_CHECKSUM). + Desc() string + // Exception returns the java exception class name (for example + // java.io.FileNotFoundException). + Exception() string + // Message returns the full error message, complete with java exception + // traceback. + Message() string +} + +func interpretException(err error) error { + var exception string + if remoteErr, ok := err.(Error); ok { + exception = remoteErr.Exception() + } + + switch exception { + case fileNotFoundException: + return os.ErrNotExist + case permissionDeniedException: + return os.ErrPermission + default: + return err + } +} diff --git a/exceptions.go b/exceptions.go deleted file mode 100644 index 1c7160b0..00000000 --- a/exceptions.go +++ /dev/null @@ -1,24 +0,0 @@ -package hdfs - -import ( - "github.com/colinmarc/hdfs/internal/rpc" - "os" -) - -type NamenodeError = rpc.NamenodeError - -const ( - fileNotFoundException = "java.io.FileNotFoundException" - permissionDeniedException = "org.apache.hadoop.security.AccessControlException" -) - -func interpretException(exception string, err error) error { - switch exception { - case fileNotFoundException: - return os.ErrNotExist - case permissionDeniedException: - return os.ErrPermission - default: - return err - } -} diff --git a/file_reader.go b/file_reader.go index 80a67c13..2492966a 100644 --- a/file_reader.go +++ b/file_reader.go @@ -35,7 +35,7 @@ type FileReader struct { func (c *Client) Open(name string) (*FileReader, error) { info, err := c.getFileInfo(name) if err != nil { - return nil, &os.PathError{"open", name, err} + return nil, &os.PathError{"open", name, interpretException(err)} } return &FileReader{ @@ -281,7 +281,7 @@ func (f *FileReader) Readdir(n int) ([]os.FileInfo, error) { for { batch, remaining, err := f.readdir() if err != nil { - return nil, &os.PathError{"readdir", f.name, err} + return nil, &os.PathError{"readdir", f.name, interpretException(err)} } if len(batch) > 0 { @@ -318,10 +318,6 @@ func (f *FileReader) readdir() ([]os.FileInfo, int, error) { err := f.client.namenode.Execute("getListing", req, resp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - return nil, 0, err } else if resp.GetDirList() == nil { return nil, 0, os.ErrNotExist diff --git a/file_writer.go b/file_writer.go index 64b40c6b..8b9d508f 100644 --- a/file_writer.go +++ b/file_writer.go @@ -31,6 +31,7 @@ type FileWriter struct { // been written. func (c *Client) Create(name string) (*FileWriter, error) { _, err := c.getFileInfo(name) + err = interpretException(err) if err == nil { return nil, &os.PathError{"create", name, os.ErrExist} } else if !os.IsNotExist(err) { @@ -65,11 +66,7 @@ func (c *Client) CreateFile(name string, replication int, blockSize int64, perm err := c.namenode.Execute("create", createReq, createResp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - - return nil, &os.PathError{"create", name, err} + return nil, &os.PathError{"create", name, interpretException(err)} } return &FileWriter{ @@ -87,7 +84,7 @@ func (c *Client) CreateFile(name string, replication int, blockSize int64, perm func (c *Client) Append(name string) (*FileWriter, error) { _, err := c.getFileInfo(name) if err != nil { - return nil, &os.PathError{"append", name, err} + return nil, &os.PathError{"append", name, interpretException(err)} } appendReq := &hdfs.AppendRequestProto{ @@ -98,11 +95,7 @@ func (c *Client) Append(name string) (*FileWriter, error) { err = c.namenode.Execute("append", appendReq, appendResp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - - return nil, &os.PathError{"append", name, err} + return nil, &os.PathError{"append", name, interpretException(err)} } f := &FileWriter{ @@ -266,11 +259,7 @@ func (f *FileWriter) startNewBlock() error { err := f.client.namenode.Execute("addBlock", addBlockReq, addBlockResp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - - return &os.PathError{"create", f.name, err} + return &os.PathError{"create", f.name, interpretException(err)} } f.blockWriter = &rpc.BlockWriter{ diff --git a/file_writer_test.go b/file_writer_test.go index 487fa981..f03a9c66 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -367,7 +367,7 @@ func TestFileAppendRepeatedly(t *testing.T) { // This represents a bug in the HDFS append implementation, as far as I can tell, // and is safe to skip. if pathErr, ok := err.(*os.PathError); ok { - if nnErr, ok := pathErr.Err.(*NamenodeError); ok && nnErr.Exception == abcException { + if nnErr, ok := pathErr.Err.(Error); ok && nnErr.Exception() == abcException { t.Log("Ignoring AlreadyBeingCreatedException from append") continue } diff --git a/internal/rpc/error.go b/internal/rpc/error.go new file mode 100644 index 00000000..60bb4499 --- /dev/null +++ b/internal/rpc/error.go @@ -0,0 +1,44 @@ +package rpc + +import ( + "fmt" + + hadoop "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" +) + +// NamenodeError represents an interepreted error from the Namenode, including +// the error code and the java backtrace. It implements hdfs.Error. +type NamenodeError struct { + method string + code int + exception string + message string +} + +func (err *NamenodeError) Method() string { + return err.method +} + +func (err *NamenodeError) Desc() string { + return hadoop.RpcResponseHeaderProto_RpcErrorCodeProto_name[int32(err.code)] +} + +func (err *NamenodeError) Exception() string { + return err.exception +} + +func (err *NamenodeError) Message() string { + return err.message +} + +func (err *NamenodeError) Error() string { + s := fmt.Sprintf("%s call failed with %s", err.method, err.Desc()) + if err.exception != "" { + s += fmt.Sprintf(" (%s)", err.exception) + } + + return s +} + +type DatanodeError struct { +} diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index ebce9291..ec5d9e90 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -196,7 +196,7 @@ func (c *NamenodeConnection) Execute(method string, req proto.Message, resp prot err = c.readResponse(method, resp) if err != nil { // Only retry on a standby exception. - if nerr, ok := err.(*NamenodeError); ok && nerr.Exception == standbyExceptionClass { + if nerr, ok := err.(*NamenodeError); ok && nerr.exception == standbyExceptionClass { c.markFailure(err) continue } @@ -252,10 +252,10 @@ func (c *NamenodeConnection) readResponse(method string, resp proto.Message) err return errors.New("unexpected sequence number") } else if rrh.GetStatus() != hadoop.RpcResponseHeaderProto_SUCCESS { return &NamenodeError{ - Method: method, - Message: rrh.GetErrorMsg(), - Code: int(rrh.GetErrorDetail()), - Exception: rrh.GetExceptionClassName(), + method: method, + message: rrh.GetErrorMsg(), + code: int(rrh.GetErrorDetail()), + exception: rrh.GetExceptionClassName(), } } diff --git a/mkdir.go b/mkdir.go index 164dc9b8..91b6dae6 100644 --- a/mkdir.go +++ b/mkdir.go @@ -5,7 +5,6 @@ import ( "path" hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) @@ -26,10 +25,12 @@ func (c *Client) mkdir(dirname string, perm os.FileMode, createParent bool) erro dirname = path.Clean(dirname) info, err := c.getFileInfo(dirname) + err = interpretException(err) if err == nil { if createParent && info.IsDir() { return nil } + return &os.PathError{"mkdir", dirname, os.ErrExist} } else if !os.IsNotExist(err) { return &os.PathError{"mkdir", dirname, err} @@ -44,11 +45,7 @@ func (c *Client) mkdir(dirname string, perm os.FileMode, createParent bool) erro err = c.namenode.Execute("mkdirs", req, resp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - - return &os.PathError{"mkdir", dirname, err} + return &os.PathError{"mkdir", dirname, interpretException(err)} } return nil diff --git a/perms.go b/perms.go index e731cc14..4240e2a2 100644 --- a/perms.go +++ b/perms.go @@ -5,7 +5,6 @@ import ( "time" hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) @@ -19,11 +18,7 @@ func (c *Client) Chmod(name string, perm os.FileMode) error { err := c.namenode.Execute("setPermission", req, resp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - - return &os.PathError{"chmod", name, err} + return &os.PathError{"chmod", name, interpretException(err)} } return nil @@ -44,11 +39,7 @@ func (c *Client) Chown(name string, user, group string) error { err := c.namenode.Execute("setOwner", req, resp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - - return &os.PathError{"chown", name, err} + return &os.PathError{"chown", name, interpretException(err)} } return nil @@ -65,11 +56,7 @@ func (c *Client) Chtimes(name string, atime time.Time, mtime time.Time) error { err := c.namenode.Execute("setTimes", req, resp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - - return &os.PathError{"chtimes", name, err} + return &os.PathError{"chtimes", name, interpretException(err)} } return nil diff --git a/remove.go b/remove.go index 819357af..0d6ae4bd 100644 --- a/remove.go +++ b/remove.go @@ -5,7 +5,6 @@ import ( "os" hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) @@ -24,11 +23,7 @@ func (c *Client) Remove(name string) error { err = c.namenode.Execute("delete", req, resp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - - return &os.PathError{"remove", name, err} + return &os.PathError{"remove", name, interpretException(err)} } else if resp.Result == nil { return &os.PathError{ "remove", diff --git a/rename.go b/rename.go index 876038d3..b1d2ed9f 100644 --- a/rename.go +++ b/rename.go @@ -4,13 +4,13 @@ import ( "os" hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) // Rename renames (moves) a file. func (c *Client) Rename(oldpath, newpath string) error { _, err := c.getFileInfo(newpath) + err = interpretException(err) if err != nil && !os.IsNotExist(err) { return &os.PathError{"rename", newpath, err} } @@ -24,11 +24,7 @@ func (c *Client) Rename(oldpath, newpath string) error { err = c.namenode.Execute("rename2", req, resp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - - return &os.PathError{"rename", oldpath, err} + return &os.PathError{"rename", oldpath, interpretException(err)} } return nil diff --git a/stat.go b/stat.go index 2d15246c..a34fc72f 100644 --- a/stat.go +++ b/stat.go @@ -6,7 +6,6 @@ import ( "time" hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/internal/rpc" "github.com/golang/protobuf/proto" ) @@ -21,7 +20,7 @@ type FileInfo struct { func (c *Client) Stat(name string) (os.FileInfo, error) { fi, err := c.getFileInfo(name) if err != nil { - err = &os.PathError{"stat", name, err} + err = &os.PathError{"stat", name, interpretException(err)} } return fi, err @@ -33,10 +32,6 @@ func (c *Client) getFileInfo(name string) (os.FileInfo, error) { err := c.namenode.Execute("getFileInfo", req, resp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - return nil, err } diff --git a/stat_fs.go b/stat_fs.go index 00ac6913..baf864de 100644 --- a/stat_fs.go +++ b/stat_fs.go @@ -2,7 +2,6 @@ package hdfs import ( hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/internal/rpc" ) // FsInfo provides information about HDFS @@ -24,9 +23,6 @@ func (c *Client) StatFs() (FsInfo, error) { err := c.namenode.Execute("getFsStats", req, resp) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } return FsInfo{}, err } From 59eb6f6f1efdece0e3e72cd02dd0150d8144505d Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 4 Aug 2018 22:44:18 +0200 Subject: [PATCH 044/159] Move conf.go into its own package, hadoopconf Tweak some interfaces along the way. Also, add some code to ignore logical cluster names. Fixes #127. --- client.go | 35 +++-- client_test.go | 18 ++- cmd/hdfs/complete.go | 2 +- cmd/hdfs/main.go | 12 +- conf.go | 91 ------------ hadoopconf/hadoopconf.go | 132 ++++++++++++++++++ conf_test.go => hadoopconf/hadoopconf_test.go | 22 ++- .../testdata/conf}/core-site.xml | 4 +- .../testdata}/conf/hdfs-site.xml | 6 +- .../testdata}/conf2/core-site.xml | 0 10 files changed, 188 insertions(+), 134 deletions(-) delete mode 100644 conf.go create mode 100644 hadoopconf/hadoopconf.go rename conf_test.go => hadoopconf/hadoopconf_test.go (64%) rename {testdata/conf3 => hadoopconf/testdata/conf}/core-site.xml (91%) rename {testdata => hadoopconf/testdata}/conf/hdfs-site.xml (87%) rename {testdata => hadoopconf/testdata}/conf2/core-site.xml (100%) diff --git a/client.go b/client.go index d49d67d1..0bdbe69a 100644 --- a/client.go +++ b/client.go @@ -12,6 +12,8 @@ import ( hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/internal/rpc" + + "github.com/colinmarc/hdfs/hadoopconf" krb "gopkg.in/jcmturner/gokrb5.v5/client" ) @@ -92,14 +94,13 @@ type ClientOptions struct { // actually configured, you should check for whether KerberosClient is set in // the resulting ClientOptions before proceeding: // -// options, _ := ClientOptionsFromConf(conf) +// options := ClientOptionsFromConf(conf) // if options.KerberosClient != nil { // // Replace with a valid credentialed client. // options.KerberosClient = getKerberosClient() // } -func ClientOptionsFromConf(conf HadoopConf) (ClientOptions, error) { - namenodes, err := conf.Namenodes() - options := ClientOptions{Addresses: namenodes} +func ClientOptionsFromConf(conf hadoopconf.HadoopConf) ClientOptions { + options := ClientOptions{Addresses: conf.Namenodes()} options.UseDatanodeHostname = (conf["dfs.client.use.datanode.hostname"] == "true") @@ -114,7 +115,7 @@ func ClientOptionsFromConf(conf HadoopConf) (ClientOptions, error) { options.KerberosServicePrincipleName = strings.Split(conf["dfs.namenode.kerberos.principal"], "@")[0] } - return options, err + return options } // NewClient returns a connected Client for the given options, or an error if @@ -146,19 +147,25 @@ func NewClient(options ClientOptions) (*Client, error) { return &Client{namenode: namenode, options: options}, nil } -// New returns a connected Client, or an error if it can't connect. The user -// will be the current system user. Any relevantoptions (including the -// address(es) of the namenode(s), if an empty string is passed) will be loaded -// from the Hadoop configuration present at HADOOP_CONF_DIR. Note, however, -// that New will not attempt any Kerberos authentication; use NewClient if you -// need that. +// New returns Client connected to the namenode(s) specified by address, or an +// error if it can't connect. Multiple namenodes can be specified by separating +// them with commas, for example "nn1:9000,nn2:9000". +// +// The user will be the current system user. Any other relevant options +// (including the address(es) of the namenode(s), if an empty string is passed) +// will be loaded from the Hadoop configuration present at HADOOP_CONF_DIR or +// HADOOP_HOME, as specified by hadoopconf.LoadFromEnvironment and +// ClientOptionsFromConf. +// +// Note, however, that New will not attempt any Kerberos authentication; use +// NewClient if you need that. func New(address string) (*Client, error) { - conf := LoadHadoopConf("") - options, err := ClientOptionsFromConf(conf) + conf, err := hadoopconf.LoadFromEnvironment() if err != nil { - options = ClientOptions{} + return nil, err } + options := ClientOptionsFromConf(conf) if address != "" { options.Addresses = strings.Split(address, ",") } diff --git a/client_test.go b/client_test.go index 41a69b76..38781f99 100644 --- a/client_test.go +++ b/client_test.go @@ -8,6 +8,7 @@ import ( "path/filepath" "testing" + "github.com/colinmarc/hdfs/hadoopconf" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" krb "gopkg.in/jcmturner/gokrb5.v5/client" @@ -35,10 +36,14 @@ func getClientForUser(t *testing.T, username string) *Client { return c } - conf := LoadHadoopConf("") - options, _ := ClientOptionsFromConf(conf) + conf, err := hadoopconf.LoadFromEnvironment() + if err != nil || conf == nil { + t.Fatal("Couldn't load ambient config", err) + } + + options := ClientOptionsFromConf(conf) if options.Addresses == nil { - t.Fatal("No hadoop configuration found at HADOOP_CONF_DIR") + t.Fatal("Missing namenode addresses in ambient config") } if options.KerberosClient != nil { @@ -139,12 +144,13 @@ func assertPathError(t *testing.T, err error, op, path string, wrappedErr error) } func TestNewWithMultipleNodes(t *testing.T) { - conf := LoadHadoopConf("") - nns, err := conf.Namenodes() + conf, err := hadoopconf.LoadFromEnvironment() if err != nil { - t.Fatal("No hadoop configuration found at HADOOP_CONF_DIR") + t.Fatal("Couldn't load ambient config", err) } + nns := conf.Namenodes() + nns = append([]string{"localhost:100"}, nns...) _, err = NewClient(ClientOptions{Addresses: nns, User: "gohdfs1"}) assert.Nil(t, err) diff --git a/cmd/hdfs/complete.go b/cmd/hdfs/complete.go index e00a51be..0fe94b94 100644 --- a/cmd/hdfs/complete.go +++ b/cmd/hdfs/complete.go @@ -66,7 +66,7 @@ func completePath(fragment string) { fullPath := paths[0] if fullPath == "" { - fullPath = userDir() + "/" + fullPath = userDir(client) + "/" } else if hasGlob(fullPath) { return } diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go index ba5c7a5b..fa22320d 100755 --- a/cmd/hdfs/main.go +++ b/cmd/hdfs/main.go @@ -9,6 +9,7 @@ import ( "time" "github.com/colinmarc/hdfs" + "github.com/colinmarc/hdfs/hadoopconf" "github.com/pborman/getopt" ) @@ -181,10 +182,12 @@ func getClient(namenode string) (*hdfs.Client, error) { namenode = os.Getenv("HADOOP_NAMENODE") } - // Ignore errors here, since we don't care if the conf doesn't exist if the - // namenode was specified. - conf := hdfs.LoadHadoopConf("") - options, _ := hdfs.ClientOptionsFromConf(conf) + conf, err := hadoopconf.LoadFromEnvironment() + if err != nil { + return nil, fmt.Errorf("Problem loading configuration: %s", err) + } + + options := hdfs.ClientOptionsFromConf(conf) if namenode != "" { options.Addresses = []string{namenode} } @@ -193,7 +196,6 @@ func getClient(namenode string) (*hdfs.Client, error) { return nil, errors.New("Couldn't find a namenode to connect to. You should specify hdfs://: in your paths. Alternatively, set HADOOP_NAMENODE or HADOOP_CONF_DIR in your environment.") } - var err error if options.KerberosClient != nil { options.KerberosClient, err = getKerberosClient() if err != nil { diff --git a/conf.go b/conf.go deleted file mode 100644 index 8eb59ffb..00000000 --- a/conf.go +++ /dev/null @@ -1,91 +0,0 @@ -package hdfs - -import ( - "encoding/xml" - "errors" - "io/ioutil" - "net/url" - "os" - "path/filepath" - "sort" - "strings" -) - -// Property is the struct representation of hadoop configuration -// key value pair. -type Property struct { - Name string `xml:"name"` - Value string `xml:"value"` -} - -type propertyList struct { - Property []Property `xml:"property"` -} - -// HadoopConf represents a map of all the key value configutation -// pairs found in a user's hadoop configuration files. -type HadoopConf map[string]string - -var errNoNamenodesInConf = errors.New("no namenode address(es) in configuration") - -// LoadHadoopConf returns a HadoopConf object representing configuration from -// the specified path, or finds the correct path in the environment. If -// path or the env variable HADOOP_CONF_DIR is specified, it should point -// directly to the directory where the xml files are. If neither is specified, -// ${HADOOP_HOME}/conf will be used. -func LoadHadoopConf(path string) HadoopConf { - if path == "" { - path = os.Getenv("HADOOP_CONF_DIR") - if path == "" { - path = filepath.Join(os.Getenv("HADOOP_HOME"), "conf") - } - } - - hadoopConf := make(HadoopConf) - for _, file := range []string{"core-site.xml", "hdfs-site.xml"} { - pList := propertyList{} - f, err := ioutil.ReadFile(filepath.Join(path, file)) - if err != nil { - continue - } - - err = xml.Unmarshal(f, &pList) - if err != nil { - continue - } - - for _, prop := range pList.Property { - hadoopConf[prop.Name] = prop.Value - } - } - - return hadoopConf -} - -// Namenodes returns the namenode hosts present in the configuration. The -// returned slice will be sorted and deduped. The values are loaded from -// fs.defaultFS (or the deprecated fs.default.name), or fields beginning with -// dfs.namenode.rpc-address. -func (conf HadoopConf) Namenodes() ([]string, error) { - nns := make(map[string]bool) - for key, value := range conf { - if strings.Contains(key, "fs.default") { - nnUrl, _ := url.Parse(value) - nns[nnUrl.Host] = true - } else if strings.HasPrefix(key, "dfs.namenode.rpc-address") { - nns[value] = true - } - } - - if len(nns) == 0 { - return nil, errNoNamenodesInConf - } - - keys := make([]string, 0, len(nns)) - for k, _ := range nns { - keys = append(keys, k) - } - - sort.Strings(keys) - return keys, nil -} diff --git a/hadoopconf/hadoopconf.go b/hadoopconf/hadoopconf.go new file mode 100644 index 00000000..f9a6fc2b --- /dev/null +++ b/hadoopconf/hadoopconf.go @@ -0,0 +1,132 @@ +// Package hadoopconf provides utilities for reading and parsing Hadoop's xml +// configuration files. +package hadoopconf + +import ( + "encoding/xml" + "fmt" + "io/ioutil" + "net/url" + "os" + "path/filepath" + "sort" + "strings" +) + +type property struct { + Name string `xml:"name"` + Value string `xml:"value"` +} + +type propertyList struct { + Property []property `xml:"property"` +} + +var confFiles = []string{"core-site.xml", "hdfs-site.xml", "mapred-site.xml"} + +// HadoopConf represents a map of all the key value configutation +// pairs found in a user's hadoop configuration files. +type HadoopConf map[string]string + +// LoadFromEnvironment tries to locate the Hadoop configuration files based on +// the environment, and returns a HadoopConf object representing the parsed +// configuration. If the HADOOP_CONF_DIR environment variable is specified, it +// uses that, or if HADOOP_HOME is specified, it uses $HADOOP_HOME/conf. +// +// If no configuration can be found, it returns a nil map. If the configuration +// files exist but there was an error opening or parsing them, that is returned +// as well. +func LoadFromEnvironment() (HadoopConf, error) { + hadoopConfDir := os.Getenv("HADOOP_CONF_DIR") + if hadoopConfDir != "" { + if conf, err := Load(hadoopConfDir); conf != nil || err != nil { + return conf, err + } + } + + hadoopHome := os.Getenv("HADOOP_HOME") + if hadoopHome != "" { + if conf, err := Load(filepath.Join(hadoopHome, "conf")); conf != nil || err != nil { + return conf, err + } + } + + return nil, nil +} + +// Load returns a HadoopConf object representing configuration from the +// specified path. It will parse core-site.xml, hdfs-site.xml, and +// mapred-site.xml. +// +// If no configuration files could be found, Load returns a nil map. If the +// configuration files exist but there was an error opening or parsing them, +// that is returned as well. +func Load(path string) (HadoopConf, error) { + var conf HadoopConf + + for _, file := range confFiles { + pList := propertyList{} + f, err := ioutil.ReadFile(filepath.Join(path, file)) + if os.IsNotExist(err) { + continue + } else if err != nil { + return conf, err + } + + err = xml.Unmarshal(f, &pList) + if err != nil { + return conf, fmt.Errorf("%s: %s", path, err) + } + + if conf == nil { + conf = make(HadoopConf) + } + + for _, prop := range pList.Property { + conf[prop.Name] = prop.Value + } + } + + return conf, nil +} + +// Namenodes returns the namenode hosts present in the configuration. The +// returned slice will be sorted and deduped. The values are loaded from +// fs.defaultFS (or the deprecated fs.default.name), or fields beginning with +// dfs.namenode.rpc-address. +// +// To handle 'logical' clusters Namenodes will not return any cluster names +// found in dfs.ha.namenodes. properties. +// +// If no namenode addresses can befound, Namenodes returns a nil slice. +func (conf HadoopConf) Namenodes() []string { + nns := make(map[string]bool) + var clusterNames []string + + for key, value := range conf { + if strings.Contains(key, "fs.default") { + nnUrl, _ := url.Parse(value) + nns[nnUrl.Host] = true + } else if strings.HasPrefix(key, "dfs.namenode.rpc-address.") { + nns[value] = true + } else if strings.HasPrefix(key, "dfs.ha.namenodes.") { + clusterNames = append(clusterNames, key[len("dfs.ha.namenodes."):]) + } + } + + for _, cn := range clusterNames { + delete(nns, cn) + } + + if len(nns) == 0 { + return nil + } + + keys := make([]string, 0, len(nns)) + for k, _ := range nns { + keys = append(keys, k) + } + + sort.Strings(keys) + return keys +} diff --git a/conf_test.go b/hadoopconf/hadoopconf_test.go similarity index 64% rename from conf_test.go rename to hadoopconf/hadoopconf_test.go index f474f338..abf81356 100644 --- a/conf_test.go +++ b/hadoopconf/hadoopconf_test.go @@ -1,4 +1,4 @@ -package hdfs +package hadoopconf import ( "os" @@ -15,23 +15,21 @@ func TestConfFallback(t *testing.T) { confNamenodes := []string{"namenode1:8020", "namenode2:8020"} conf2Namenodes := []string{"namenode3:8020"} - conf3Namenodes := []string{"namenode4:8020"} - conf := LoadHadoopConf("testdata/conf3") - nns, err := conf.Namenodes() - assert.Nil(t, err) - assert.EqualValues(t, conf3Namenodes, nns, "loading via specified path (testdata/conf3)") + conf, err := LoadFromEnvironment() + assert.NoError(t, err) - conf = LoadHadoopConf("") - nns, err = conf.Namenodes() - assert.Nil(t, err) + nns := conf.Namenodes() + assert.NoError(t, err) assert.EqualValues(t, conf2Namenodes, nns, "loading via HADOOP_CONF_DIR (testdata/conf2)") os.Unsetenv("HADOOP_CONF_DIR") - conf = LoadHadoopConf("") - nns, err = conf.Namenodes() - assert.Nil(t, err) + conf, err = LoadFromEnvironment() + assert.NoError(t, err) + + nns = conf.Namenodes() + assert.NoError(t, err) assert.EqualValues(t, confNamenodes, nns, "loading via HADOOP_HOME (testdata/conf)") os.Setenv("HADOOP_HOME", oldHome) diff --git a/testdata/conf3/core-site.xml b/hadoopconf/testdata/conf/core-site.xml similarity index 91% rename from testdata/conf3/core-site.xml rename to hadoopconf/testdata/conf/core-site.xml index e08634a0..712d5db8 100644 --- a/testdata/conf3/core-site.xml +++ b/hadoopconf/testdata/conf/core-site.xml @@ -18,7 +18,7 @@ - fs.default.name - hdfs://namenode4:8020 + fs.defaultFS + hdfs://mycluster diff --git a/testdata/conf/hdfs-site.xml b/hadoopconf/testdata/conf/hdfs-site.xml similarity index 87% rename from testdata/conf/hdfs-site.xml rename to hadoopconf/testdata/conf/hdfs-site.xml index 2839ab89..e12b4fb5 100644 --- a/testdata/conf/hdfs-site.xml +++ b/hadoopconf/testdata/conf/hdfs-site.xml @@ -24,15 +24,15 @@ true - dfs.ha.namenodes.tests + dfs.ha.namenodes.mycluster nn1,nn2 - dfs.namenode.rpc-address.tests.nn1 + dfs.namenode.rpc-address.mycluster.nn1 namenode1:8020 - dfs.namenode.rpc-address.tests.nn2 + dfs.namenode.rpc-address.mycluster.nn2 namenode2:8020 diff --git a/testdata/conf2/core-site.xml b/hadoopconf/testdata/conf2/core-site.xml similarity index 100% rename from testdata/conf2/core-site.xml rename to hadoopconf/testdata/conf2/core-site.xml From 9851b069583a15c1b6ea4020879f6d027561332d Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sun, 5 Aug 2018 23:23:56 +0200 Subject: [PATCH 045/159] Actually bump things to v2 --- Makefile | 2 +- client.go | 7 +++---- client_test.go | 2 +- cmd/hdfs/cat.go | 2 +- cmd/hdfs/df.go | 2 +- cmd/hdfs/du.go | 2 +- cmd/hdfs/ls.go | 2 +- cmd/hdfs/main.go | 4 ++-- cmd/hdfs/mv.go | 2 +- cmd/hdfs/paths.go | 2 +- cmd/hdfs/put.go | 2 +- content_summary.go | 2 +- file_reader.go | 4 ++-- file_writer.go | 4 ++-- go.mod | 2 +- internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go | 2 +- internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go | 2 +- internal/protocol/hadoop_hdfs/datatransfer.pb.go | 2 +- internal/protocol/hadoop_hdfs/hdfs.pb.go | 2 +- internal/rpc/block_read_stream.go | 2 +- internal/rpc/block_reader.go | 2 +- internal/rpc/block_write_stream.go | 2 +- internal/rpc/block_writer.go | 2 +- internal/rpc/checksum_reader.go | 2 +- internal/rpc/error.go | 2 +- internal/rpc/kerberos.go | 2 +- internal/rpc/namenode.go | 2 +- internal/rpc/rpc.go | 2 +- mkdir.go | 2 +- perms.go | 2 +- remove.go | 2 +- rename.go | 2 +- stat.go | 2 +- stat_fs.go | 2 +- 34 files changed, 39 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index 8cbfac71..027eecd3 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ GENERATED_PROTOS = $(shell echo "$(HADOOP_HDFS_PROTOS) $(HADOOP_COMMON_PROTOS)" SOURCES = $(shell find . -name '*.go') $(GENERATED_PROTOS) # Protobuf needs one of these for every 'import "foo.proto"' in .protoc files. -PROTO_MAPPING = MSecurity.proto=github.com/colinmarc/hdfs/internal/protocol/hadoop_common +PROTO_MAPPING = MSecurity.proto=github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common TRAVIS_TAG ?= $(shell git rev-parse HEAD) ARCH = $(shell go env GOOS)-$(shell go env GOARCH) diff --git a/client.go b/client.go index 0bdbe69a..f90f0bb9 100644 --- a/client.go +++ b/client.go @@ -10,10 +10,9 @@ import ( "os/user" "strings" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/internal/rpc" - - "github.com/colinmarc/hdfs/hadoopconf" + "github.com/colinmarc/hdfs/v2/hadoopconf" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/v2/internal/rpc" krb "gopkg.in/jcmturner/gokrb5.v5/client" ) diff --git a/client_test.go b/client_test.go index 38781f99..80010112 100644 --- a/client_test.go +++ b/client_test.go @@ -8,7 +8,7 @@ import ( "path/filepath" "testing" - "github.com/colinmarc/hdfs/hadoopconf" + "github.com/colinmarc/hdfs/v2/hadoopconf" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" krb "gopkg.in/jcmturner/gokrb5.v5/client" diff --git a/cmd/hdfs/cat.go b/cmd/hdfs/cat.go index 7285bf97..e694418c 100644 --- a/cmd/hdfs/cat.go +++ b/cmd/hdfs/cat.go @@ -7,7 +7,7 @@ import ( "io" "os" - "github.com/colinmarc/hdfs" + "github.com/colinmarc/hdfs/v2" ) const tailSearchSize int64 = 16384 diff --git a/cmd/hdfs/df.go b/cmd/hdfs/df.go index c2fe3926..80831c37 100755 --- a/cmd/hdfs/df.go +++ b/cmd/hdfs/df.go @@ -5,7 +5,7 @@ import ( "os" "text/tabwriter" - "github.com/colinmarc/hdfs" + "github.com/colinmarc/hdfs/v2" ) func df(humanReadable bool) { diff --git a/cmd/hdfs/du.go b/cmd/hdfs/du.go index 0f0e5c67..6a35ccd5 100644 --- a/cmd/hdfs/du.go +++ b/cmd/hdfs/du.go @@ -7,7 +7,7 @@ import ( "path" "text/tabwriter" - "github.com/colinmarc/hdfs" + "github.com/colinmarc/hdfs/v2" ) func du(args []string, summarize, humanReadable bool) { diff --git a/cmd/hdfs/ls.go b/cmd/hdfs/ls.go index 2f28459d..289c97c6 100644 --- a/cmd/hdfs/ls.go +++ b/cmd/hdfs/ls.go @@ -10,7 +10,7 @@ import ( "text/tabwriter" "time" - "github.com/colinmarc/hdfs" + "github.com/colinmarc/hdfs/v2" ) func ls(paths []string, long, all, humanReadable bool) { diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go index fa22320d..5bb76496 100755 --- a/cmd/hdfs/main.go +++ b/cmd/hdfs/main.go @@ -8,8 +8,8 @@ import ( "os/user" "time" - "github.com/colinmarc/hdfs" - "github.com/colinmarc/hdfs/hadoopconf" + "github.com/colinmarc/hdfs/v2" + "github.com/colinmarc/hdfs/v2/hadoopconf" "github.com/pborman/getopt" ) diff --git a/cmd/hdfs/mv.go b/cmd/hdfs/mv.go index 162abf87..dda4e70c 100644 --- a/cmd/hdfs/mv.go +++ b/cmd/hdfs/mv.go @@ -4,7 +4,7 @@ import ( "os" "path" - "github.com/colinmarc/hdfs" + "github.com/colinmarc/hdfs/v2" ) func mv(paths []string, force, treatDestAsFile bool) { diff --git a/cmd/hdfs/paths.go b/cmd/hdfs/paths.go index aafa9397..02d02c3e 100644 --- a/cmd/hdfs/paths.go +++ b/cmd/hdfs/paths.go @@ -8,7 +8,7 @@ import ( "regexp" "strings" - "github.com/colinmarc/hdfs" + "github.com/colinmarc/hdfs/v2" ) var ( diff --git a/cmd/hdfs/put.go b/cmd/hdfs/put.go index 12933af8..f37e5595 100644 --- a/cmd/hdfs/put.go +++ b/cmd/hdfs/put.go @@ -7,7 +7,7 @@ import ( "path" "path/filepath" - "github.com/colinmarc/hdfs" + "github.com/colinmarc/hdfs/v2" ) func put(args []string) { diff --git a/content_summary.go b/content_summary.go index aec6cd97..286efec0 100644 --- a/content_summary.go +++ b/content_summary.go @@ -3,7 +3,7 @@ package hdfs import ( "os" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/file_reader.go b/file_reader.go index 2492966a..df6c1ee9 100644 --- a/file_reader.go +++ b/file_reader.go @@ -8,8 +8,8 @@ import ( "os" "time" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/internal/rpc" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/v2/internal/rpc" "github.com/golang/protobuf/proto" ) diff --git a/file_writer.go b/file_writer.go index 8b9d508f..b7d0c462 100644 --- a/file_writer.go +++ b/file_writer.go @@ -5,8 +5,8 @@ import ( "os" "time" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/internal/rpc" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/v2/internal/rpc" "github.com/golang/protobuf/proto" ) diff --git a/go.mod b/go.mod index 2a326da9..c32fcbd0 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/colinmarc/hdfs +module github.com/colinmarc/hdfs/v2 require ( github.com/davecgh/go-spew v1.1.0 // indirect diff --git a/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go b/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go index 4383a1f6..6cd853ce 100644 --- a/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go +++ b/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go @@ -6,7 +6,7 @@ package hadoop_hdfs import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hadoop_common "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" +import hadoop_common "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go b/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go index c3f97db6..9d8a6000 100644 --- a/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go +++ b/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go @@ -6,7 +6,7 @@ package hadoop_hdfs import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import _ "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" +import _ "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/internal/protocol/hadoop_hdfs/datatransfer.pb.go b/internal/protocol/hadoop_hdfs/datatransfer.pb.go index 7df1d588..dc30b060 100644 --- a/internal/protocol/hadoop_hdfs/datatransfer.pb.go +++ b/internal/protocol/hadoop_hdfs/datatransfer.pb.go @@ -6,7 +6,7 @@ package hadoop_hdfs import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hadoop_common "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" +import hadoop_common "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/internal/protocol/hadoop_hdfs/hdfs.pb.go b/internal/protocol/hadoop_hdfs/hdfs.pb.go index d481bf46..478d6e3f 100644 --- a/internal/protocol/hadoop_hdfs/hdfs.pb.go +++ b/internal/protocol/hadoop_hdfs/hdfs.pb.go @@ -6,7 +6,7 @@ package hadoop_hdfs import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hadoop_common "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" +import hadoop_common "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/internal/rpc/block_read_stream.go b/internal/rpc/block_read_stream.go index 07073c30..37183f5b 100644 --- a/internal/rpc/block_read_stream.go +++ b/internal/rpc/block_read_stream.go @@ -8,7 +8,7 @@ import ( "io" "math" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/internal/rpc/block_reader.go b/internal/rpc/block_reader.go index 8ed45772..37f0ad85 100644 --- a/internal/rpc/block_reader.go +++ b/internal/rpc/block_reader.go @@ -10,7 +10,7 @@ import ( "net" "time" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/internal/rpc/block_write_stream.go b/internal/rpc/block_write_stream.go index afa35ced..fabe3194 100644 --- a/internal/rpc/block_write_stream.go +++ b/internal/rpc/block_write_stream.go @@ -10,7 +10,7 @@ import ( "io" "math" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/internal/rpc/block_writer.go b/internal/rpc/block_writer.go index abbf90b9..588c079a 100644 --- a/internal/rpc/block_writer.go +++ b/internal/rpc/block_writer.go @@ -8,7 +8,7 @@ import ( "net" "time" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/internal/rpc/checksum_reader.go b/internal/rpc/checksum_reader.go index 163ee466..777a189d 100644 --- a/internal/rpc/checksum_reader.go +++ b/internal/rpc/checksum_reader.go @@ -7,7 +7,7 @@ import ( "net" "time" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" ) // ChecksumReader provides an interface for reading the "MD5CRC32" checksums of diff --git a/internal/rpc/error.go b/internal/rpc/error.go index 60bb4499..32df4949 100644 --- a/internal/rpc/error.go +++ b/internal/rpc/error.go @@ -3,7 +3,7 @@ package rpc import ( "fmt" - hadoop "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" + hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" ) // NamenodeError represents an interepreted error from the Namenode, including diff --git a/internal/rpc/kerberos.go b/internal/rpc/kerberos.go index b77b383a..d3575922 100644 --- a/internal/rpc/kerberos.go +++ b/internal/rpc/kerberos.go @@ -6,7 +6,7 @@ import ( "net" "regexp" - hadoop "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" + hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" "gopkg.in/jcmturner/gokrb5.v5/gssapi" "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" krbtypes "gopkg.in/jcmturner/gokrb5.v5/types" diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index ec5d9e90..9af3be3b 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -8,7 +8,7 @@ import ( "sync" "time" - hadoop "github.com/colinmarc/hdfs/internal/protocol/hadoop_common" + hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" "github.com/golang/protobuf/proto" krb "gopkg.in/jcmturner/gokrb5.v5/client" ) diff --git a/internal/rpc/rpc.go b/internal/rpc/rpc.go index 6f914243..3734c87c 100644 --- a/internal/rpc/rpc.go +++ b/internal/rpc/rpc.go @@ -10,7 +10,7 @@ import ( "math/rand" "time" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/mkdir.go b/mkdir.go index 91b6dae6..846960b8 100644 --- a/mkdir.go +++ b/mkdir.go @@ -4,7 +4,7 @@ import ( "os" "path" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/perms.go b/perms.go index 4240e2a2..70309f9a 100644 --- a/perms.go +++ b/perms.go @@ -4,7 +4,7 @@ import ( "os" "time" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/remove.go b/remove.go index 0d6ae4bd..af96d4a6 100644 --- a/remove.go +++ b/remove.go @@ -4,7 +4,7 @@ import ( "errors" "os" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/rename.go b/rename.go index b1d2ed9f..e40cd317 100644 --- a/rename.go +++ b/rename.go @@ -3,7 +3,7 @@ package hdfs import ( "os" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/stat.go b/stat.go index a34fc72f..c44c9fe8 100644 --- a/stat.go +++ b/stat.go @@ -5,7 +5,7 @@ import ( "path" "time" - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) diff --git a/stat_fs.go b/stat_fs.go index baf864de..075f2bd6 100644 --- a/stat_fs.go +++ b/stat_fs.go @@ -1,7 +1,7 @@ package hdfs import ( - hdfs "github.com/colinmarc/hdfs/internal/protocol/hadoop_hdfs" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" ) // FsInfo provides information about HDFS From f87e1d64bc48c85b07cab32d23c97788e885b31b Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sun, 5 Aug 2018 23:31:00 +0200 Subject: [PATCH 046/159] Explicitly enable module support in travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index c93eb1f2..d15a44bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,8 @@ env: - PLATFORM=cdh5 - PLATFORM=cdh5 KERBEROS=true - PLATFORM=hdp2 +before_install: +- export GO111MODULE=on # Travis installs into $GOPATH/src, which disables module support by default. install: - git clone https://github.com/sstephenson/bats $HOME/bats - mkdir -p $HOME/bats/build From fd1e410ff7bf76b870f625dc0aa3eb4e44f5bc50 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sun, 5 Aug 2018 23:48:18 +0200 Subject: [PATCH 047/159] No one knows how to install go packages now, least of all me --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index 11b64647..52039a6e 100644 --- a/README.md +++ b/README.md @@ -71,13 +71,6 @@ Since it doesn't have to wait for the JVM to start up, it's also a lot faster Best of all, it comes with bash tab completion for paths! -Installing the library ----------------------- - -To install the library, once you have Go [all set up][2]: - - $ go get -u github.com/colinmarc/hdfs - Installing the commandline client --------------------------------- From c5e93df697d823976844a79ec9a70e51105b4639 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 7 Aug 2018 15:54:20 +0200 Subject: [PATCH 048/159] Fix some globbing edge cases - Handle globbing nonexistent paths (ls /nonexistent*) - Correctly print a newline after files - Slightly reduce number of stat calls Fixes https://github.com/colinmarc/hdfs/issues/57#issuecomment-293101465 --- cmd/hdfs/ls.go | 2 +- cmd/hdfs/paths.go | 31 +++++++++++++++++-------------- cmd/hdfs/test/glob.bats | 31 +++++++++++++++++++++++++++++-- 3 files changed, 47 insertions(+), 17 deletions(-) diff --git a/cmd/hdfs/ls.go b/cmd/hdfs/ls.go index 289c97c6..824d54f6 100644 --- a/cmd/hdfs/ls.go +++ b/cmd/hdfs/ls.go @@ -57,7 +57,7 @@ func ls(paths []string, long, all, humanReadable bool) { } for i, dir := range dirs { - if i > 0 { + if i > 0 || len(files) > 0 { fmt.Println() } diff --git a/cmd/hdfs/paths.go b/cmd/hdfs/paths.go index 02d02c3e..bc09d0f4 100644 --- a/cmd/hdfs/paths.go +++ b/cmd/hdfs/paths.go @@ -73,7 +73,7 @@ func hasGlob(fragment string) bool { } // expandGlobs recursively expands globs in a filepath. It assumes the paths -// are already cleaned and normalize (ie, absolute). +// are already cleaned and normalized (ie, absolute). func expandGlobs(client *hdfs.Client, globbedPath string) ([]string, error) { parts := strings.Split(globbedPath, "/")[1:] var res []string @@ -108,24 +108,24 @@ func expandGlobs(client *hdfs.Client, globbedPath string) ([]string, error) { continue } - if !hasGlob(next) { - _, err := client.Stat(path.Join(base, fi.Name(), next)) - if err != nil && !os.IsNotExist(err) { - return nil, err - } else if os.IsNotExist(err) { - continue - } - } - newPath := path.Join(base, fi.Name(), next, remainder) if hasGlob(newPath) { - children, err := expandGlobs(client, newPath) - if err != nil { + if fi.IsDir() { + children, err := expandGlobs(client, newPath) + if err != nil { + return nil, err + } + + res = append(res, children...) + } + } else { + _, err := client.Stat(newPath) + if os.IsNotExist(err) { + continue + } else if err != nil { return nil, err } - res = append(res, children...) - } else { res = append(res, newPath) } } @@ -146,6 +146,9 @@ func expandPaths(client *hdfs.Client, paths []string) ([]string, error) { expanded, err := expandGlobs(client, p) if err != nil { return nil, err + } else if len(expanded) == 0 { + // Fake a PathError for consistency. + return nil, &os.PathError{"stat", p, os.ErrNotExist} } res = append(res, expanded...) diff --git a/cmd/hdfs/test/glob.bats b/cmd/hdfs/test/glob.bats index ed2a1239..e4ee94b7 100644 --- a/cmd/hdfs/test/glob.bats +++ b/cmd/hdfs/test/glob.bats @@ -6,6 +6,7 @@ setup() { $HDFS mkdir -p /_test_cmd/glob/dir1/dir/ $HDFS mkdir -p /_test_cmd/glob/dir2/dir/ $HDFS mkdir -p /_test_cmd/glob/dir3/ + $HDFS touch /_test_cmd/glob/dir1/foo $HDFS touch /_test_cmd/glob/dir1/dir/a $HDFS touch /_test_cmd/glob/dir1/dir/b $HDFS touch /_test_cmd/glob/dir1/dir/c @@ -30,6 +31,8 @@ OUT run $HDFS ls /_test_cmd/glob/*/* assert_success assert_output < Date: Mon, 19 Nov 2018 17:10:07 +0100 Subject: [PATCH 049/159] Make Client.Remove non-recursive; add RemoveAll Remove is currently recursive, but this doesn't match the documentation or the stdlib os implementation. This adds RemoveAll and adjusts the implementation of Remove to match the stdlib exactly. This is functionally a (dangerous) breaking change, but won't result in compilation errors. --- client_test.go | 6 ++-- cmd/hdfs/rm.go | 2 +- error.go | 8 +++-- remove.go | 20 ++++++++++-- remove_test.go | 84 +++++++++++++++++++++++++++++++++++++++++++++++--- 5 files changed, 108 insertions(+), 12 deletions(-) diff --git a/client_test.go b/client_test.go index 80010112..f67815b3 100644 --- a/client_test.go +++ b/client_test.go @@ -90,7 +90,7 @@ func touch(t *testing.T, path string) { func touchMask(t *testing.T, path string, mask os.FileMode) { c := getClient(t) - err := c.Remove(path) + err := c.RemoveAll(path) if err != nil && !os.IsNotExist(err) { t.Fatal(err) } @@ -115,7 +115,7 @@ func mkdirp(t *testing.T, path string) { func mkdirpMask(t *testing.T, path string, mask os.FileMode) { c := getClient(t) - err := c.Remove(path) + err := c.RemoveAll(path) if err != nil && !os.IsNotExist(err) { t.Fatal(err) } @@ -129,7 +129,7 @@ func mkdirpMask(t *testing.T, path string, mask os.FileMode) { func baleet(t *testing.T, path string) { c := getClient(t) - err := c.Remove(path) + err := c.RemoveAll(path) if err != nil && !os.IsNotExist(err) { t.Fatal(err) } diff --git a/cmd/hdfs/rm.go b/cmd/hdfs/rm.go index 18a8d6d5..1f5ca2d2 100644 --- a/cmd/hdfs/rm.go +++ b/cmd/hdfs/rm.go @@ -34,7 +34,7 @@ func rm(paths []string, recursive bool, force bool) { continue } - err = client.Remove(p) + err = client.RemoveAll(p) if err != nil { fatal(err) } diff --git a/error.go b/error.go index 3aa23d48..056f2775 100644 --- a/error.go +++ b/error.go @@ -2,11 +2,13 @@ package hdfs import ( "os" + "syscall" ) const ( - fileNotFoundException = "java.io.FileNotFoundException" - permissionDeniedException = "org.apache.hadoop.security.AccessControlException" + fileNotFoundException = "java.io.FileNotFoundException" + permissionDeniedException = "org.apache.hadoop.security.AccessControlException" + pathIsNotEmptyDirException = "org.apache.hadoop.fs.PathIsNotEmptyDirectoryException" ) // Error represents a remote java exception from an HDFS namenode or datanode. @@ -34,6 +36,8 @@ func interpretException(err error) error { return os.ErrNotExist case permissionDeniedException: return os.ErrPermission + case pathIsNotEmptyDirException: + return syscall.ENOTEMPTY default: return err } diff --git a/remove.go b/remove.go index af96d4a6..2833d0c4 100644 --- a/remove.go +++ b/remove.go @@ -8,8 +8,24 @@ import ( "github.com/golang/protobuf/proto" ) -// Remove removes the named file or directory. +// Remove removes the named file or (empty) directory. func (c *Client) Remove(name string) error { + return delete(c, name, false) +} + +// RemoveAll removes path and any children it contains. It removes everything it +// can but returns the first error it encounters. If the path does not exist, +// RemoveAll returns nil (no error). +func (c *Client) RemoveAll(name string) error { + err := delete(c, name, true) + if os.IsNotExist(err) { + return nil + } + + return err +} + +func delete(c *Client, name string, recursive bool) error { _, err := c.getFileInfo(name) if err != nil { return &os.PathError{"remove", name, err} @@ -17,7 +33,7 @@ func (c *Client) Remove(name string) error { req := &hdfs.DeleteRequestProto{ Src: proto.String(name), - Recursive: proto.Bool(true), + Recursive: proto.Bool(recursive), } resp := &hdfs.DeleteResponseProto{} diff --git a/remove_test.go b/remove_test.go index 55effa3a..d0ef6dd9 100644 --- a/remove_test.go +++ b/remove_test.go @@ -2,13 +2,29 @@ package hdfs import ( "os" + "syscall" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -func TestRemove(t *testing.T) { +func TestRemoveFile(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/todelete") + mkdirp(t, "/_test/todelete") + touch(t, "/_test/todelete/deleteme") + + err := client.Remove("/_test/todelete/deleteme") + require.NoError(t, err) + + fi, err := client.Stat("/_test/todelete/deleteme") + assert.Nil(t, fi) + assertPathError(t, err, "stat", "/_test/todelete/deleteme", os.ErrNotExist) +} + +func TestRemoveEmptyDir(t *testing.T) { client := getClient(t) baleet(t, "/_test/todelete") @@ -22,9 +38,22 @@ func TestRemove(t *testing.T) { assertPathError(t, err, "stat", "/_test/todelete", os.ErrNotExist) } -func TestRemoveNotExistent(t *testing.T) { +func TestRemoveNonEmptyDir(t *testing.T) { client := getClient(t) + baleet(t, "/_test/todelete") + mkdirp(t, "/_test/todelete") + touch(t, "/_test/todelete/dummy") + + err := client.Remove("/_test/todelete") + assertPathError(t, err, "remove", "/_test/todelete", syscall.ENOTEMPTY) + fi, err := client.Stat("/_test/todelete/dummy") + require.NoError(t, err) + assert.NotNil(t, fi) +} + +func TestRemoveNonexistent(t *testing.T) { + client := getClient(t) baleet(t, "/_test/nonexistent") err := client.Remove("/_test/nonexistent") @@ -32,11 +61,58 @@ func TestRemoveNotExistent(t *testing.T) { } func TestRemoveWithoutPermission(t *testing.T) { - client2 := getClientForUser(t, "gohdfs2") + client := getClientForUser(t, "gohdfs2") + + mkdirp(t, "/_test/accessdenied") + touch(t, "/_test/accessdenied/foo") + + err := client.Remove("/_test/accessdenied/foo") + assertPathError(t, err, "remove", "/_test/accessdenied/foo", os.ErrPermission) +} + +func TestRemoveAllEmptyDir(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/todelete") + mkdirp(t, "/_test/todelete") + + err := client.RemoveAll("/_test/todelete") + require.NoError(t, err) + + fi, err := client.Stat("/_test/todelete") + assert.Nil(t, fi) + assertPathError(t, err, "stat", "/_test/todelete", os.ErrNotExist) +} + +func TestRemoveAllNonEmptyDir(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/todelete") + mkdirp(t, "/_test/todelete") + touch(t, "/_test/todelete/dummy") + + err := client.RemoveAll("/_test/todelete") + require.NoError(t, err) + + fi, err := client.Stat("/_test/todelete") + assert.Nil(t, fi) + assertPathError(t, err, "stat", "/_test/todelete", os.ErrNotExist) +} + +func TestRemoveAllNonexistent(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/nonexistent") + err := client.RemoveAll("/_test/nonexistent") + require.NoError(t, err) +} + +func TestRemoveAllWithoutPermission(t *testing.T) { + client := getClientForUser(t, "gohdfs2") mkdirp(t, "/_test/accessdenied") touch(t, "/_test/accessdenied/foo") - err := client2.Remove("/_test/accessdenied/foo") + err := client.RemoveAll("/_test/accessdenied/foo") assertPathError(t, err, "remove", "/_test/accessdenied/foo", os.ErrPermission) } From aa9e4840c5789a65d2fd9c35d5475b01360dc7bf Mon Sep 17 00:00:00 2001 From: efiguti Date: Tue, 2 Jul 2019 20:01:12 +0300 Subject: [PATCH 050/159] Add support for file already Exists exception --- error.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/error.go b/error.go index 056f2775..d3ade37c 100644 --- a/error.go +++ b/error.go @@ -9,6 +9,7 @@ const ( fileNotFoundException = "java.io.FileNotFoundException" permissionDeniedException = "org.apache.hadoop.security.AccessControlException" pathIsNotEmptyDirException = "org.apache.hadoop.fs.PathIsNotEmptyDirectoryException" + FileAlreadyExistsException = "org.apache.hadoop.fs.FileAlreadyExistsException" ) // Error represents a remote java exception from an HDFS namenode or datanode. @@ -38,6 +39,8 @@ func interpretException(err error) error { return os.ErrPermission case pathIsNotEmptyDirException: return syscall.ENOTEMPTY + case FileAlreadyExistsException: + return os.ErrExist default: return err } From 5f79eb3c31ee3742a95e551919d15fb6b07f3370 Mon Sep 17 00:00:00 2001 From: Plamen Stoev Date: Mon, 21 Oct 2019 09:45:26 +0300 Subject: [PATCH 051/159] Upgrade gokrb to v7.3.0 (#4) * hdfs/kerberos: Upgrade to v7.3.0 * hdfs/kerberos: Bump krb library to v7.3.0 --- client.go | 2 +- client_test.go | 10 +++++----- cmd/hdfs/kerberos.go | 10 +++++----- go.mod | 6 ++++-- go.sum | 15 ++++++++------- internal/rpc/kerberos.go | 19 ++++++++++--------- internal/rpc/namenode.go | 6 +++--- 7 files changed, 36 insertions(+), 32 deletions(-) diff --git a/client.go b/client.go index f90f0bb9..599429f0 100644 --- a/client.go +++ b/client.go @@ -13,7 +13,7 @@ import ( "github.com/colinmarc/hdfs/v2/hadoopconf" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/v2/internal/rpc" - krb "gopkg.in/jcmturner/gokrb5.v5/client" + krb "gopkg.in/jcmturner/gokrb5.v7/client" ) // A Client represents a connection to an HDFS cluster diff --git a/client_test.go b/client_test.go index f67815b3..3966f0f4 100644 --- a/client_test.go +++ b/client_test.go @@ -11,9 +11,9 @@ import ( "github.com/colinmarc/hdfs/v2/hadoopconf" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - krb "gopkg.in/jcmturner/gokrb5.v5/client" - "gopkg.in/jcmturner/gokrb5.v5/config" - "gopkg.in/jcmturner/gokrb5.v5/credentials" + krb "gopkg.in/jcmturner/gokrb5.v7/client" + "gopkg.in/jcmturner/gokrb5.v7/config" + "gopkg.in/jcmturner/gokrb5.v7/credentials" ) var cachedClients = make(map[string]*Client) @@ -75,12 +75,12 @@ func getKerberosClient(t *testing.T, username string) *krb.Client { t.Skipf("Couldn't load keytab for user %s: %s", username, err) } - client, err := krb.NewClientFromCCache(ccache) + client, err := krb.NewClientFromCCache(ccache, cfg) if err != nil { t.Fatal("Couldn't initialize krb client:", err) } - return client.WithConfig(cfg) + return client } func touch(t *testing.T, path string) { diff --git a/cmd/hdfs/kerberos.go b/cmd/hdfs/kerberos.go index be3c8a05..6bbcb545 100644 --- a/cmd/hdfs/kerberos.go +++ b/cmd/hdfs/kerberos.go @@ -6,9 +6,9 @@ import ( "os/user" "strings" - krb "gopkg.in/jcmturner/gokrb5.v5/client" - "gopkg.in/jcmturner/gokrb5.v5/config" - "gopkg.in/jcmturner/gokrb5.v5/credentials" + krb "gopkg.in/jcmturner/gokrb5.v7/client" + "gopkg.in/jcmturner/gokrb5.v7/config" + "gopkg.in/jcmturner/gokrb5.v7/credentials" ) // TODO: Write a kerberos_windows.go and move this to kerberos_unix.go. This @@ -48,10 +48,10 @@ func getKerberosClient() (*krb.Client, error) { return nil, err } - client, err := krb.NewClientFromCCache(ccache) + client, err := krb.NewClientFromCCache(ccache, cfg) if err != nil { return nil, err } - return client.WithConfig(cfg), nil + return client, nil } diff --git a/go.mod b/go.mod index c32fcbd0..b91a51dc 100644 --- a/go.mod +++ b/go.mod @@ -9,8 +9,10 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/testify v1.2.2 golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb // indirect + golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect - gopkg.in/jcmturner/gokrb5.v5 v5.3.0 - gopkg.in/jcmturner/rpc.v0 v0.0.2 // indirect + gopkg.in/jcmturner/goidentity.v3 v3.0.0 // indirect + gopkg.in/jcmturner/gokrb5.v7 v7.3.0 + gopkg.in/jcmturner/rpc.v1 v1.1.0 // indirect ) diff --git a/go.sum b/go.sum index d59752cb..4a0f8abf 100644 --- a/go.sum +++ b/go.sum @@ -10,18 +10,19 @@ github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117 h1:7822vZ646Atgxkp3 github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb h1:Ah9YqXLj6fEgeKqcmBuLCbAsrF3ScD7dJ/bYM0C6tXI= golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= -gopkg.in/jcmturner/gokrb5.v5 v5.2.0 h1:O5C+1x6Aem8UTPbMB6wwy/5KH8/4QMb4wAZcUjggqt4= -gopkg.in/jcmturner/gokrb5.v5 v5.2.0/go.mod h1:oQz8Wc5GsctOTgCVyKad1Vw4TCWz5G6gfIQr88RPv4k= -gopkg.in/jcmturner/gokrb5.v5 v5.3.0 h1:RS1MYApX27Hx1Xw7NECs7XxGxxrm69/4OmaRuX9kwec= -gopkg.in/jcmturner/gokrb5.v5 v5.3.0/go.mod h1:oQz8Wc5GsctOTgCVyKad1Vw4TCWz5G6gfIQr88RPv4k= -gopkg.in/jcmturner/rpc.v0 v0.0.2 h1:wBTgrbL1qmLBUPsYVCqdJiI5aJgQhexmK+JkTHPUNJI= -gopkg.in/jcmturner/rpc.v0 v0.0.2/go.mod h1:NzMq6cRzR9lipgw7WxRBHNx5N8SifBuaCQsOT1kWY/E= +gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI= +gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= +gopkg.in/jcmturner/gokrb5.v7 v7.3.0 h1:0709Jtq/6QXEuWRfAm260XqlpcwL1vxtO1tUE2qK8Z4= +gopkg.in/jcmturner/gokrb5.v7 v7.3.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU= +gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= diff --git a/internal/rpc/kerberos.go b/internal/rpc/kerberos.go index d3575922..6147067c 100644 --- a/internal/rpc/kerberos.go +++ b/internal/rpc/kerberos.go @@ -7,9 +7,10 @@ import ( "regexp" hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" - "gopkg.in/jcmturner/gokrb5.v5/gssapi" - "gopkg.in/jcmturner/gokrb5.v5/iana/keyusage" - krbtypes "gopkg.in/jcmturner/gokrb5.v5/types" + "gopkg.in/jcmturner/gokrb5.v7/gssapi" + "gopkg.in/jcmturner/gokrb5.v7/iana/keyusage" + "gopkg.in/jcmturner/gokrb5.v7/spnego" + krbtypes "gopkg.in/jcmturner/gokrb5.v7/types" ) const saslRpcCallId = -33 @@ -49,7 +50,7 @@ func (c *NamenodeConnection) doKerberosHandshake() error { err = c.writeSaslRequest(&hadoop.RpcSaslProto{ State: hadoop.RpcSaslProto_INITIATE.Enum(), - Token: token.MechToken, + Token: token.MechTokenBytes, Auths: []*hadoop.RpcSaslProto_SaslAuth{mechanism}, }) @@ -69,7 +70,7 @@ func (c *NamenodeConnection) doKerberosHandshake() error { return err } - _, err = nnToken.VerifyCheckSum(sessionKey, keyusage.GSSAPI_ACCEPTOR_SEAL) + _, err = nnToken.Verify(sessionKey, keyusage.GSSAPI_ACCEPTOR_SEAL) if err != nil { return fmt.Errorf("invalid server token: %s", err) } @@ -77,7 +78,7 @@ func (c *NamenodeConnection) doKerberosHandshake() error { // Sign the payload and send it back to the namenode. // TODO: Make sure we can support what is required based on what's in the // payload. - signed, err := gssapi.NewInitiatorToken(nnToken.Payload, sessionKey) + signed, err := gssapi.NewInitiatorWrapToken(nnToken.Payload, sessionKey) if err != nil { return err } @@ -125,16 +126,16 @@ func (c *NamenodeConnection) readSaslResponse(expectedState hadoop.RpcSaslProto_ // getKerberosTicket returns an initial kerberos negotiation token and the // paired session key, along with an error if any occured. -func (c *NamenodeConnection) getKerberosTicket() (gssapi.NegTokenInit, krbtypes.EncryptionKey, error) { +func (c *NamenodeConnection) getKerberosTicket() (spnego.NegTokenInit, krbtypes.EncryptionKey, error) { host, _, _ := net.SplitHostPort(c.host.address) spn := replaceSPNHostWildcard(c.kerberosServicePrincipleName, host) ticket, key, err := c.kerberosClient.GetServiceTicket(spn) if err != nil { - return gssapi.NegTokenInit{}, key, err + return spnego.NegTokenInit{}, key, err } - token, err := gssapi.NewNegTokenInitKrb5(*c.kerberosClient.Credentials, ticket, key) + token, err := spnego.NewNegTokenInitKRB5(c.kerberosClient, ticket, key) return token, key, err } diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index 9af3be3b..aeaa6272 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -10,7 +10,7 @@ import ( hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" "github.com/golang/protobuf/proto" - krb "gopkg.in/jcmturner/gokrb5.v5/client" + krb "gopkg.in/jcmturner/gokrb5.v7/client" ) const ( @@ -91,8 +91,8 @@ func NewNamenodeConnection(options NamenodeConnectionOptions) (*NamenodeConnecti if user == "" { if options.KerberosClient != nil { creds := options.KerberosClient.Credentials - user = creds.Username - realm = creds.Realm + user = creds.UserName() + realm = creds.Realm() } else { return nil, errors.New("user not specified") } From 9c1382db382c9f6af44741c917a2f2e20c1fc952 Mon Sep 17 00:00:00 2001 From: Parth Chandra Date: Wed, 2 Oct 2019 14:25:30 -0700 Subject: [PATCH 052/159] Fix internal/rpc.readPrefixedMessage to read message length correctly --- internal/rpc/rpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/rpc.go b/internal/rpc/rpc.go index 3734c87c..7d00490c 100644 --- a/internal/rpc/rpc.go +++ b/internal/rpc/rpc.go @@ -111,7 +111,7 @@ func makePrefixedMessage(msg proto.Message) ([]byte, error) { func readPrefixedMessage(r io.Reader, msg proto.Message) error { varintBytes := make([]byte, binary.MaxVarintLen32) - _, err := io.ReadAtLeast(r, varintBytes, 1) + _, err := io.ReadAtLeast(r, varintBytes, binary.MaxVarintLen32) if err != nil { return err } From 6eb2669717c875cfe7578ef25b65f557e3a689af Mon Sep 17 00:00:00 2001 From: Aaron Delaney Date: Tue, 19 Nov 2019 20:00:18 +0000 Subject: [PATCH 053/159] Add essential snapshots features --- snapshot.go | 72 ++++++++++++++++++++++++++++++ snapshot_test.go | 113 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 snapshot.go create mode 100644 snapshot_test.go diff --git a/snapshot.go b/snapshot.go new file mode 100644 index 00000000..a251c389 --- /dev/null +++ b/snapshot.go @@ -0,0 +1,72 @@ +package hdfs + +import ( + hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/rpc" +) + +func (c *Client) AllowSnapshots(dir string) error { + allowSnapshotReq := &hdfs.AllowSnapshotRequestProto{SnapshotRoot: &dir} + allowSnapshotRes := &hdfs.AllowSnapshotResponseProto{} + + err := c.namenode.Execute("allowSnapshot", allowSnapshotReq, allowSnapshotRes) + if err != nil { + if nnErr, ok := err.(*rpc.NamenodeError); ok { + err = interpretException(nnErr.Exception, err) + } + return err + } + + return nil +} + +func (c *Client) DisallowSnapshots(dir string) error { + disallowSnapshotReq := &hdfs.DisallowSnapshotRequestProto{SnapshotRoot: &dir} + disallowSnapshotRes := &hdfs.DisallowSnapshotResponseProto{} + + err := c.namenode.Execute("disallowSnapshot", disallowSnapshotReq, disallowSnapshotRes) + if err != nil { + if nnErr, ok := err.(*rpc.NamenodeError); ok { + err = interpretException(nnErr.Exception, err) + } + return err + } + + return nil +} + +func (c *Client) CreateSnapshot(dir, name string) (string, error) { + allowSnapshotReq := &hdfs.CreateSnapshotRequestProto{ + SnapshotRoot: &dir, + SnapshotName: &name, + } + allowSnapshotRes := &hdfs.CreateSnapshotResponseProto{} + + err := c.namenode.Execute("createSnapshot", allowSnapshotReq, allowSnapshotRes) + if err != nil { + if nnErr, ok := err.(*rpc.NamenodeError); ok { + err = interpretException(nnErr.Exception, err) + } + return "", err + } + + return allowSnapshotRes.GetSnapshotPath(), nil +} + +func (c *Client) DeleteSnapshot(dir, name string) error { + allowSnapshotReq := &hdfs.DeleteSnapshotRequestProto{ + SnapshotRoot: &dir, + SnapshotName: &name, + } + allowSnapshotRes := &hdfs.DeleteSnapshotResponseProto{} + + err := c.namenode.Execute("deleteSnapshot", allowSnapshotReq, allowSnapshotRes) + if err != nil { + if nnErr, ok := err.(*rpc.NamenodeError); ok { + err = interpretException(nnErr.Exception, err) + } + return err + } + + return nil +} diff --git a/snapshot_test.go b/snapshot_test.go new file mode 100644 index 00000000..c831f0a5 --- /dev/null +++ b/snapshot_test.go @@ -0,0 +1,113 @@ +package hdfs + +import ( + "io/ioutil" + "os" + "path" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func writeAndVerifyTestFile(t *testing.T, snapshotDir, filepath string) { + c := getClient(t) + + baleet(t, filepath) + mkdirp(t, snapshotDir) + + f, err := c.CreateFile(filepath, 1, 1048576, 0744) + require.NoError(t, err) + + // fill the file a bit + b := make([]byte, 128) + for i := 0; i < 128; i++ { + b[i] = 'a' + } + + _, err = f.Write(b) + require.NoError(t, err) + f.Close() + + nf, err := c.Open(filepath) + require.NoError(t, err) + + br, err := ioutil.ReadAll(nf) + require.NoError(t, err) + nf.Close() + + assert.Equal(t, b, br) +} + +func baleetSnapshot(t *testing.T, dir, snapshot string) { + c := getClient(t) + c.DeleteSnapshot(dir, snapshot) +} + +func TestAllowSnapshot(t *testing.T) { + c := getClient(t) + baleetSnapshot(t, "/_test/allowsnaps", "snap") + mkdirp(t, "/_test/allowsnaps") + err := c.AllowSnapshots("/_test/allowsnaps") + require.NoError(t, err) + path, err := c.CreateSnapshot("/_test/allowsnaps", "snap") + require.NoError(t, err) + assert.Equal(t, "/_test/allowsnaps/.snapshot/snap", path) +} + +func TestDisallowSnapshot(t *testing.T) { + c := getClient(t) + baleetSnapshot(t, "/_test/allowsnaps", "snap") + mkdirp(t, "/_test/allowsnaps") + err := c.DisallowSnapshots("/_test/allowsnaps") + require.NoError(t, err) + _, err = c.CreateSnapshot("/_test/allowsnaps", "snap") + require.Error(t, err) +} + +func TestSnapshot(t *testing.T) { + const name = "TestSnapshot" + const dir = "/_test/snapshot" + const filename = "file_to_restore.txt" + const filepath = "/_test/snapshot/file_to_restore.txt" + + c := getClient(t) + baleetSnapshot(t, dir, name) + + writeAndVerifyTestFile(t, dir, filepath) + + err := c.AllowSnapshots(dir) + require.NoError(t, err) + + snapshotPath, err := c.CreateSnapshot(dir, name) + require.NoError(t, err) + + err = c.Remove(filepath) + require.NoError(t, err) + + _, err = c.Stat(filepath) + assertPathError(t, err, "stat", filepath, os.ErrNotExist) + + st, err := c.Stat(path.Join(snapshotPath, filename)) + require.NoError(t, err) + assert.Equal(t, int64(128), st.Size()) +} + +func TestDeleteSnapshot(t *testing.T) { + c := getClient(t) + baleetSnapshot(t, "/_test/deletesnaps", "snap") + mkdirp(t, "/_test/deletesnaps") + err := c.AllowSnapshots("/_test/deletesnaps") + require.NoError(t, err) + path, err := c.CreateSnapshot("/_test/deletesnaps", "snap") + require.NoError(t, err) + + fs, err := c.Stat(path) + assert.True(t, fs.IsDir()) + + err = c.DeleteSnapshot("/_test/deletesnaps", "snap") + require.NoError(t, err) + + _, err = c.Stat(path) + assertPathError(t, err, "stat", path, os.ErrNotExist) +} From 70d48ab11720b7fe2dcc3969aeac59d4d00da33b Mon Sep 17 00:00:00 2001 From: Aaron Delaney Date: Wed, 20 Nov 2019 17:18:27 +0000 Subject: [PATCH 054/159] Document snapshot client functions --- snapshot.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/snapshot.go b/snapshot.go index a251c389..beab61f4 100644 --- a/snapshot.go +++ b/snapshot.go @@ -5,6 +5,11 @@ import ( "github.com/colinmarc/hdfs/rpc" ) +// AllowSnapshots marks a directory as available for snapshots. +// This is required to make a snapshot of a directory as snapshottable +// directories work as a whitelist. +// +// This requires superuser privileges. func (c *Client) AllowSnapshots(dir string) error { allowSnapshotReq := &hdfs.AllowSnapshotRequestProto{SnapshotRoot: &dir} allowSnapshotRes := &hdfs.AllowSnapshotResponseProto{} @@ -20,6 +25,9 @@ func (c *Client) AllowSnapshots(dir string) error { return nil } +// DisallowSnapshots marks a directory as unavailable for snapshots. +// +// This requires superuser privileges. func (c *Client) DisallowSnapshots(dir string) error { disallowSnapshotReq := &hdfs.DisallowSnapshotRequestProto{SnapshotRoot: &dir} disallowSnapshotRes := &hdfs.DisallowSnapshotResponseProto{} @@ -35,6 +43,10 @@ func (c *Client) DisallowSnapshots(dir string) error { return nil } +// CreateSnapshots creates a snapshot of a given directory and name, and +// returns the path containing the snapshot. Snapshot names must be unique. +// +// This requires superuser privileges. func (c *Client) CreateSnapshot(dir, name string) (string, error) { allowSnapshotReq := &hdfs.CreateSnapshotRequestProto{ SnapshotRoot: &dir, @@ -53,6 +65,9 @@ func (c *Client) CreateSnapshot(dir, name string) (string, error) { return allowSnapshotRes.GetSnapshotPath(), nil } +// CreateSnapshots deletes a snapshot with a given directory and name. +// +// This requires superuser privileges. func (c *Client) DeleteSnapshot(dir, name string) error { allowSnapshotReq := &hdfs.DeleteSnapshotRequestProto{ SnapshotRoot: &dir, From 82d518e7c149b0a089a74aff4fc02872b1d336df Mon Sep 17 00:00:00 2001 From: Aaron Delaney Date: Wed, 20 Nov 2019 17:10:04 +0000 Subject: [PATCH 055/159] Port snapshot changes to v2 --- snapshot.go | 24 +++++------------------- snapshot_test.go | 12 ++++++------ 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/snapshot.go b/snapshot.go index beab61f4..d01a2320 100644 --- a/snapshot.go +++ b/snapshot.go @@ -1,8 +1,7 @@ package hdfs import ( - hdfs "github.com/colinmarc/hdfs/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/rpc" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" ) // AllowSnapshots marks a directory as available for snapshots. @@ -16,10 +15,7 @@ func (c *Client) AllowSnapshots(dir string) error { err := c.namenode.Execute("allowSnapshot", allowSnapshotReq, allowSnapshotRes) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - return err + return interpretException(err) } return nil @@ -34,10 +30,7 @@ func (c *Client) DisallowSnapshots(dir string) error { err := c.namenode.Execute("disallowSnapshot", disallowSnapshotReq, disallowSnapshotRes) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - return err + return interpretException(err) } return nil @@ -56,10 +49,7 @@ func (c *Client) CreateSnapshot(dir, name string) (string, error) { err := c.namenode.Execute("createSnapshot", allowSnapshotReq, allowSnapshotRes) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - return "", err + return "", interpretException(err) } return allowSnapshotRes.GetSnapshotPath(), nil @@ -77,11 +67,7 @@ func (c *Client) DeleteSnapshot(dir, name string) error { err := c.namenode.Execute("deleteSnapshot", allowSnapshotReq, allowSnapshotRes) if err != nil { - if nnErr, ok := err.(*rpc.NamenodeError); ok { - err = interpretException(nnErr.Exception, err) - } - return err + return interpretException(err) } - return nil } diff --git a/snapshot_test.go b/snapshot_test.go index c831f0a5..53074554 100644 --- a/snapshot_test.go +++ b/snapshot_test.go @@ -11,7 +11,7 @@ import ( ) func writeAndVerifyTestFile(t *testing.T, snapshotDir, filepath string) { - c := getClient(t) + c := getClientForSuperUser(t) baleet(t, filepath) mkdirp(t, snapshotDir) @@ -40,12 +40,12 @@ func writeAndVerifyTestFile(t *testing.T, snapshotDir, filepath string) { } func baleetSnapshot(t *testing.T, dir, snapshot string) { - c := getClient(t) + c := getClientForSuperUser(t) c.DeleteSnapshot(dir, snapshot) } func TestAllowSnapshot(t *testing.T) { - c := getClient(t) + c := getClientForSuperUser(t) baleetSnapshot(t, "/_test/allowsnaps", "snap") mkdirp(t, "/_test/allowsnaps") err := c.AllowSnapshots("/_test/allowsnaps") @@ -56,7 +56,7 @@ func TestAllowSnapshot(t *testing.T) { } func TestDisallowSnapshot(t *testing.T) { - c := getClient(t) + c := getClientForSuperUser(t) baleetSnapshot(t, "/_test/allowsnaps", "snap") mkdirp(t, "/_test/allowsnaps") err := c.DisallowSnapshots("/_test/allowsnaps") @@ -71,7 +71,7 @@ func TestSnapshot(t *testing.T) { const filename = "file_to_restore.txt" const filepath = "/_test/snapshot/file_to_restore.txt" - c := getClient(t) + c := getClientForSuperUser(t) baleetSnapshot(t, dir, name) writeAndVerifyTestFile(t, dir, filepath) @@ -94,7 +94,7 @@ func TestSnapshot(t *testing.T) { } func TestDeleteSnapshot(t *testing.T) { - c := getClient(t) + c := getClientForSuperUser(t) baleetSnapshot(t, "/_test/deletesnaps", "snap") mkdirp(t, "/_test/deletesnaps") err := c.AllowSnapshots("/_test/deletesnaps") From 367b3398269363830440a6e3f32834c22c493e16 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 23 Nov 2019 14:00:05 -0500 Subject: [PATCH 056/159] Nitpick comment --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index 599429f0..db90aaad 100644 --- a/client.go +++ b/client.go @@ -16,7 +16,7 @@ import ( krb "gopkg.in/jcmturner/gokrb5.v7/client" ) -// A Client represents a connection to an HDFS cluster +// Client represents a connection to an HDFS cluster. type Client struct { namenode *rpc.NamenodeConnection defaults *hdfs.FsServerDefaultsProto From afdcd1a74a6f942f038c9ba6a4da2681b9469a4d Mon Sep 17 00:00:00 2001 From: Evgeniy Firsov Date: Wed, 12 Sep 2018 14:27:52 -0700 Subject: [PATCH 057/159] Send heart beats to datanode Reviewed By: ot Signed-off-by: Evgeniy Firsov --- internal/rpc/block_write_stream.go | 110 ++++++++++++++++++++++------- 1 file changed, 85 insertions(+), 25 deletions(-) diff --git a/internal/rpc/block_write_stream.go b/internal/rpc/block_write_stream.go index fabe3194..397b3a4a 100644 --- a/internal/rpc/block_write_stream.go +++ b/internal/rpc/block_write_stream.go @@ -9,6 +9,8 @@ import ( "hash/crc32" "io" "math" + "sync" + "time" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" @@ -18,8 +20,32 @@ const ( outboundPacketSize = 65536 outboundChunkSize = 512 maxPacketsInQueue = 5 + heartbeatSeqno = -1 + heartbeatInterval = 30 * time.Second ) +// heartbeatPacket is sent every 30 seconds to keep the stream alive. It's +// always the same. +var heartbeatPacket []byte + +func init() { + b, err := proto.Marshal(&hdfs.PacketHeaderProto{ + OffsetInBlock: proto.Int64(0), + Seqno: proto.Int64(heartbeatSeqno), + LastPacketInBlock: proto.Bool(false), + DataLen: proto.Int32(0), + }) + + if err != nil { + panic(err) + } + + header := make([]byte, 6) + binary.BigEndian.PutUint32(header, 4) + binary.BigEndian.PutUint16(header[4:], uint16(len(b))) + heartbeatPacket = append(header, b...) +} + // blockWriteStream writes data out to a datanode, and reads acks back. type blockWriteStream struct { block *hdfs.LocatedBlockProto @@ -35,6 +61,9 @@ type blockWriteStream struct { ackError error acksDone chan struct{} lastPacketSeqno int + + heartbeats chan struct{} + writeLock sync.Mutex } type outboundPacket struct { @@ -59,13 +88,17 @@ var ErrInvalidSeqno = errors.New("invalid ack sequence number") func newBlockWriteStream(conn io.ReadWriter, offset int64) *blockWriteStream { s := &blockWriteStream{ - conn: conn, - offset: offset, - seqno: 1, - packets: make(chan outboundPacket, maxPacketsInQueue), - acksDone: make(chan struct{}), + conn: conn, + offset: offset, + seqno: 1, + packets: make(chan outboundPacket, maxPacketsInQueue), + acksDone: make(chan struct{}), + heartbeats: make(chan struct{}), } + // Send idle heartbeats every 30 seconds. + go s.writeHeartbeats() + // Ack packets in the background. go func() { s.ackPackets() @@ -111,12 +144,14 @@ func (s *blockWriteStream) finish() error { } s.closed = true + // Stop sending heartbeats. + close(s.heartbeats) + if err := s.getAckError(); err != nil { return err } - err := s.flush(true) - if err != nil { + if err := s.flush(true); err != nil { return err } @@ -129,13 +164,14 @@ func (s *blockWriteStream) finish() error { data: []byte{}, } s.packets <- lastPacket - err = s.writePacket(lastPacket) + + err := s.writePacket(lastPacket) if err != nil { return err } - close(s.packets) // Wait for the ack loop to finish. + close(s.packets) <-s.acksDone // Check one more time for any ack errors. @@ -150,9 +186,8 @@ func (s *blockWriteStream) finish() error { // the datanode. We keep around a reference to the packet, in case the ack // fails, and we need to send it again later. func (s *blockWriteStream) flush(force bool) error { - if err := s.getAckError(); err != nil { - return err - } + s.writeLock.Lock() + defer s.writeLock.Unlock() for s.buf.Len() > 0 && (force || s.buf.Len() >= outboundPacketSize) { packet := s.makePacket() @@ -217,6 +252,7 @@ func (s *blockWriteStream) makePacket() outboundPacket { func (s *blockWriteStream) ackPackets() { reader := bufio.NewReader(s.conn) +Acks: for { p, ok := <-s.packets if !ok { @@ -224,26 +260,34 @@ func (s *blockWriteStream) ackPackets() { return } - // If we fail to read the ack at all, that counts as a failure from the - // first datanode (the one we're connected to). - ack := &hdfs.PipelineAckProto{} - err := readPrefixedMessage(reader, ack) - if err != nil { - s.ackError = err - break - } + var seqno int + for { + // If we fail to read the ack at all, that counts as a failure from the + // first datanode (the one we're connected to). + ack := &hdfs.PipelineAckProto{} + err := readPrefixedMessage(reader, ack) + if err != nil { + s.ackError = err + break Acks + } + + seqno = int(ack.GetSeqno()) + + for i, status := range ack.GetReply() { + if status != hdfs.Status_SUCCESS { + s.ackError = ackError{status: status, seqno: seqno, pipelineIndex: i} + break Acks + } + } - seqno := int(ack.GetSeqno()) - for i, status := range ack.GetReply() { - if status != hdfs.Status_SUCCESS { - s.ackError = ackError{status: status, seqno: seqno, pipelineIndex: i} + if seqno != heartbeatSeqno { break } } if seqno != p.seqno { s.ackError = ErrInvalidSeqno - break + break Acks } } @@ -315,3 +359,19 @@ func (s *blockWriteStream) writePacket(p outboundPacket) error { return nil } + +func (s *blockWriteStream) writeHeartbeats() { + ticker := time.NewTicker(heartbeatInterval) + defer ticker.Stop() + + for { + select { + case <-ticker.C: + s.writeLock.Lock() + s.conn.Write(heartbeatPacket) + s.writeLock.Unlock() + case <-s.heartbeats: + return + } + } +} From 2cd12a5d5c4a7fd38a8d87dc47167cf33cdb197b Mon Sep 17 00:00:00 2001 From: Evgeniy Firsov Date: Wed, 26 Sep 2018 12:08:58 -0700 Subject: [PATCH 058/159] Test case for datanode heartbeats Signed-off-by: Evgeniy Firsov --- file_writer_test.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/file_writer_test.go b/file_writer_test.go index f03a9c66..222eb378 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -42,6 +42,36 @@ func TestFileWrite(t *testing.T) { assert.Equal(t, "foobar", string(bytes)) } +func TestFileWriteAfterIdleTime(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/create/1.txt") + mkdirp(t, "/_test/create") + writer, err := client.Create("/_test/create/1.txt") + require.NoError(t, err) + + n, err := writer.Write([]byte("foo")) + require.NoError(t, err) + assert.Equal(t, 3, n) + + //Check that write after idle time doesn't fail + time.Sleep(90 * time.Second) + + n, err = writer.Write([]byte("bar")) + require.NoError(t, err) + assert.Equal(t, 3, n) + + err = writer.Close() + require.NoError(t, err) + + reader, err := client.Open("/_test/create/1.txt") + require.NoError(t, err) + + bytes, err := ioutil.ReadAll(reader) + require.NoError(t, err) + assert.Equal(t, "foobar", string(bytes)) +} + func TestFileBigWrite(t *testing.T) { client := getClient(t) From 208151029aaaea9a1aefb58996d22ff29fa8d3d3 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 23 Nov 2019 15:49:08 -0500 Subject: [PATCH 059/159] Add go version to go.mod --- go.mod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go.mod b/go.mod index b91a51dc..b548297d 100644 --- a/go.mod +++ b/go.mod @@ -16,3 +16,5 @@ require ( gopkg.in/jcmturner/gokrb5.v7 v7.3.0 gopkg.in/jcmturner/rpc.v1 v1.1.0 // indirect ) + +go 1.13 From 3374ccbb26db51ae92860c2ccab9822523be5b13 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 23 Nov 2019 16:00:47 -0500 Subject: [PATCH 060/159] Run travis under go 1.13 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d15a44bd..528265ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ sudo: required language: go go_import_path: github.com/colinmarc/hdfs -go: 1.11beta2 +go: 1.x env: - PLATFORM=cdh5 - PLATFORM=cdh5 KERBEROS=true From 31ab7e594a14df7e7ffdcbcd8ce00aa1e08f7210 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 23 Nov 2019 15:53:19 -0500 Subject: [PATCH 061/159] Test under CDH6 --- .travis.yml | 3 +- travis-setup-cdh6.sh | 160 +++++++++++++++++++++++++++++++++++++++++++ travis-setup.sh | 3 + 3 files changed, 165 insertions(+), 1 deletion(-) create mode 100755 travis-setup-cdh6.sh diff --git a/.travis.yml b/.travis.yml index 528265ee..aa059ca2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,8 @@ go_import_path: github.com/colinmarc/hdfs go: 1.x env: - PLATFORM=cdh5 -- PLATFORM=cdh5 KERBEROS=true +- PLATFORM=cdh6 +- PLATFORM=cdh6 KERBEROS=true - PLATFORM=hdp2 before_install: - export GO111MODULE=on # Travis installs into $GOPATH/src, which disables module support by default. diff --git a/travis-setup-cdh6.sh b/travis-setup-cdh6.sh new file mode 100755 index 00000000..83e41e13 --- /dev/null +++ b/travis-setup-cdh6.sh @@ -0,0 +1,160 @@ +#!/bin/sh + +set -e + +KERBEROS=${KERBEROS-"false"} + +UBUNTU_CODENAME=$(lsb_release -cs) +UBUNTU_VERSION=$(lsb_release -rs | sed s/\\.//) +CDH_VERSION=6.3.2 + +sudo tee /etc/apt/sources.list.d/cdh.list < + + fs.defaultFS + hdfs://localhost:9000 + + + hadoop.security.authentication + $CONF_AUTHENTICATION + + + hadoop.security.authorization + $KERBEROS + + + dfs.namenode.keytab.file + /tmp/nn.keytab + + + dfs.namenode.kerberos.principal + nn/localhost@$KERBEROS_REALM + + + dfs.web.authentication.kerberos.principal + nn/localhost@$KERBEROS_REALM + + + dfs.datanode.keytab.file + /tmp/dn.keytab + + + dfs.datanode.kerberos.principal + dn/localhost@$KERBEROS_REALM + + +EOF + +sudo tee /etc/hadoop/conf.gohdfs/hdfs-site.xml < + + dfs.namenode.name.dir + /opt/hdfs/name + + + dfs.datanode.data.dir + /opt/hdfs/data + + + dfs.permissions.superusergroup + hadoop + + + dfs.safemode.extension + 0 + + + dfs.safemode.min.datanodes + 1 + + + dfs.block.access.token.enable + $KERBEROS + + + ignore.secure.ports.for.testing + true + + +EOF + +sudo update-alternatives --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.gohdfs 99 +sudo apt-get install -y --allow-unauthenticated hadoop-hdfs-namenode hadoop-hdfs-datanode + +sudo mkdir -p /opt/hdfs/data /opt/hdfs/name +sudo chown -R hdfs:hdfs /opt/hdfs +sudo -u hdfs hdfs namenode -format -nonInteractive + +sudo adduser travis hadoop + +sudo service hadoop-hdfs-datanode restart +sudo service hadoop-hdfs-namenode restart + +hdfs dfsadmin -safemode wait diff --git a/travis-setup.sh b/travis-setup.sh index 037e399f..0ba6b4bd 100755 --- a/travis-setup.sh +++ b/travis-setup.sh @@ -7,6 +7,9 @@ case $1 in cdh5) ./travis-setup-cdh5.sh ;; + cdh6) + ./travis-setup-cdh6.sh + ;; hdp2) ./travis-setup-hdp2.sh ;; From 574b0baf2980ba941d8fe50eb3aa374d68076073 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 23 Nov 2019 17:18:26 -0500 Subject: [PATCH 062/159] Periodically renew file leases --- client.go | 4 +++- internal/rpc/namenode.go | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index db90aaad..324740cf 100644 --- a/client.go +++ b/client.go @@ -16,7 +16,9 @@ import ( krb "gopkg.in/jcmturner/gokrb5.v7/client" ) -// Client represents a connection to an HDFS cluster. +// Client represents a connection to an HDFS cluster. A Client will +// automatically maintain leases for any open files, preventing other clients +// from modifying them, until Close is called. type Client struct { namenode *rpc.NamenodeConnection defaults *hdfs.FsServerDefaultsProto diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index aeaa6272..35af0893 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -9,6 +9,7 @@ import ( "time" hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" krb "gopkg.in/jcmturner/gokrb5.v7/client" ) @@ -24,7 +25,10 @@ const ( standbyExceptionClass = "org.apache.hadoop.ipc.StandbyException" ) -const backoffDuration = time.Second * 5 +const ( + backoffDuration = 5 * time.Second + leaseRenewInterval = 1 * time.Second +) // NamenodeConnection represents an open connection to a namenode. type NamenodeConnection struct { @@ -44,6 +48,7 @@ type NamenodeConnection struct { hostList []*namenodeHost reqLock sync.Mutex + done chan struct{} } // NamenodeConnectionOptions represents the configurable options available @@ -112,6 +117,8 @@ func NewNamenodeConnection(options NamenodeConnectionOptions) (*NamenodeConnecti dialFunc: options.DialFunc, hostList: hostList, + + done: make(chan struct{}), } err := c.resolveConnection() @@ -119,6 +126,9 @@ func NewNamenodeConnection(options NamenodeConnectionOptions) (*NamenodeConnecti return nil, err } + // Periodically renew any file leases. + go c.renewLeases() + return c, nil } @@ -210,6 +220,10 @@ func (c *NamenodeConnection) Execute(method string, req proto.Message, resp prot return nil } +// addLease increases the lease counter on the namenode. As long as the lease +// counter is greater than zero, all leases will automatically be renewed every +// + // RPC definitions // A request packet: @@ -322,11 +336,32 @@ func (c *NamenodeConnection) doNamenodeHandshake() error { return err } +// renewLeases periodically renews all leases for the connection. +func (c *NamenodeConnection) renewLeases() { + ticker := time.NewTicker(leaseRenewInterval) + defer ticker.Stop() + + select { + case <-ticker.C: + req := &hdfs.RenewLeaseRequestProto{ClientName: proto.String(c.ClientName)} + resp := &hdfs.RenewLeaseResponseProto{} + + // Ignore any errors. + c.Execute("renewLease", req, resp) + case <-c.done: + return + } +} + // Close terminates all underlying socket connections to remote server. func (c *NamenodeConnection) Close() error { + c.reqLock.Lock() + if c.conn != nil { return c.conn.Close() } + + close(c.done) return nil } From 322c0859d203d114dff56799683b142ee0ab4391 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 23 Nov 2019 17:28:58 -0500 Subject: [PATCH 063/159] Alias HdfsFileStatusProto into the top-level package This allows consumers of the package to use Sys() correctly. --- stat.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stat.go b/stat.go index c44c9fe8..50e5277d 100644 --- a/stat.go +++ b/stat.go @@ -13,9 +13,11 @@ import ( // directory in HDFS. type FileInfo struct { name string - status *hdfs.HdfsFileStatusProto + status *FileStatus } +type FileStatus = hdfs.HdfsFileStatusProto + // Stat returns an os.FileInfo describing the named file or directory. func (c *Client) Stat(name string) (os.FileInfo, error) { fi, err := c.getFileInfo(name) From 264fe947eb85980510fe4fbc77cb7d468641f975 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 23 Nov 2019 18:48:56 -0500 Subject: [PATCH 064/159] Ignore transient AlreadyBeingCreatedExceptions, causing flaky tests --- file_writer_test.go | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/file_writer_test.go b/file_writer_test.go index 222eb378..30acec3e 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -16,6 +16,22 @@ import ( const abcException = "org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException" +func appendIgnoreABC(t *testing.T, client *Client, path string) (*FileWriter, error) { + fw, err := client.Append(path) + + // This represents a bug in the HDFS append implementation, as far as I can + // tell. + if pathErr, ok := err.(*os.PathError); ok { + if nnErr, ok := pathErr.Err.(Error); ok && nnErr.Exception() == abcException { + t.Log("Ignoring AlreadyBeingCreatedException from append once") + + return client.Append(path) + } + } + + return fw, err +} + func TestFileWrite(t *testing.T) { client := getClient(t) @@ -281,7 +297,7 @@ func TestFileAppend(t *testing.T) { err = writer.Close() require.NoError(t, err) - writer, err = client.Append("/_test/append/1.txt") + writer, err = appendIgnoreABC(t, client, "/_test/append/1.txt") require.NoError(t, err) n, err = writer.Write([]byte("foo")) @@ -310,7 +326,7 @@ func TestFileAppendEmptyFile(t *testing.T) { err := client.CreateEmptyFile("/_test/append/2.txt") require.NoError(t, err) - writer, err := client.Append("/_test/append/2.txt") + writer, err := appendIgnoreABC(t, client, "/_test/append/2.txt") require.NoError(t, err) n, err := writer.Write([]byte("foo")) @@ -350,7 +366,7 @@ func TestFileAppendLastBlockFull(t *testing.T) { err = writer.Close() require.NoError(t, err) - writer, err = client.Append("/_test/append/3.txt") + writer, err = appendIgnoreABC(t, client, "/_test/append/3.txt") require.NoError(t, err) n, err := writer.Write([]byte("\nfoo")) @@ -392,17 +408,7 @@ func TestFileAppendRepeatedly(t *testing.T) { expected := "foo" for i := 0; i < 20; i++ { - writer, err = client.Append("/_test/append/4.txt") - - // This represents a bug in the HDFS append implementation, as far as I can tell, - // and is safe to skip. - if pathErr, ok := err.(*os.PathError); ok { - if nnErr, ok := pathErr.Err.(Error); ok && nnErr.Exception() == abcException { - t.Log("Ignoring AlreadyBeingCreatedException from append") - continue - } - } - + writer, err = appendIgnoreABC(t, client, "/_test/append/4.txt") require.NoError(t, err) s := strings.Repeat("b", rand.Intn(1024)) + "\n" From 1c841f74546121d97e81896cca0bf1f630e91697 Mon Sep 17 00:00:00 2001 From: Daisuke Taniwaki Date: Tue, 19 Feb 2019 16:44:39 +0900 Subject: [PATCH 065/159] Implement SASL-wrapped RPC This supports encrypted or signed RPC communication with the namenode, and brings us one step closer to full KRB support. --- .travis.yml | 6 ++- internal/rpc/challenge.go | 66 +++++++++++++++++++++++++++ internal/rpc/kerberos.go | 65 +++++++++++++++++++++------ internal/rpc/namenode.go | 78 +++++--------------------------- internal/rpc/sasl_transport.go | 82 ++++++++++++++++++++++++++++++++++ internal/rpc/transport.go | 76 +++++++++++++++++++++++++++++++ travis-setup-cdh5.sh | 4 ++ travis-setup-cdh6.sh | 4 ++ 8 files changed, 299 insertions(+), 82 deletions(-) create mode 100644 internal/rpc/challenge.go create mode 100644 internal/rpc/sasl_transport.go create mode 100644 internal/rpc/transport.go diff --git a/.travis.yml b/.travis.yml index aa059ca2..94d3cb3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,12 @@ language: go go_import_path: github.com/colinmarc/hdfs go: 1.x env: +- PLATFORM=hdp2 - PLATFORM=cdh5 - PLATFORM=cdh6 -- PLATFORM=cdh6 KERBEROS=true -- PLATFORM=hdp2 +- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=authentication +- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=integrity +- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=privacy before_install: - export GO111MODULE=on # Travis installs into $GOPATH/src, which disables module support by default. install: diff --git a/internal/rpc/challenge.go b/internal/rpc/challenge.go new file mode 100644 index 00000000..5cf3d483 --- /dev/null +++ b/internal/rpc/challenge.go @@ -0,0 +1,66 @@ +package rpc + +import ( + "fmt" + "regexp" + "strings" + + hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" +) + +const ( + // qopAuthenication is how the namenode refers to authentication mode, which + // only establishes mutual authentication without encryption (the default). + qopAuthentication = "auth" + // qopIntegrity is how the namenode refers to integrity mode, which, in + // in addition to authentication, verifies the signature of RPC messages. + qopIntegrity = "auth-int" + // qopPrivacy is how the namenode refers to privacy mode, which, in addition + // to authentication and integrity, provides full end-to-end encryption for + // RPC messages. + qopPrivacy = "auth-conf" +) + +var challengeRegexp = regexp.MustCompile(",?([a-zA-Z0-9]+)=(\"([^\"]+)\"|([^,]+)),?") + +type tokenChallenge struct { + realm string + nonce string + qop string + charset string + cipher []string + algorithm string +} + +// parseChallenge returns a tokenChallenge parsed from a challenge response from +// the namenode. +func parseChallenge(auth *hadoop.RpcSaslProto_SaslAuth) (*tokenChallenge, error) { + tokenChallenge := tokenChallenge{} + + matched := challengeRegexp.FindAllSubmatch(auth.Challenge, -1) + if matched == nil { + return nil, fmt.Errorf("invalid token challenge: %s", auth.Challenge) + } + + for _, m := range matched { + key := string(m[1]) + val := string(m[3]) + switch key { + case "realm": + tokenChallenge.realm = val + case "nonce": + tokenChallenge.nonce = val + case "qop": + tokenChallenge.qop = val + case "charset": + tokenChallenge.charset = val + case "cipher": + tokenChallenge.cipher = strings.Split(val, ",") + case "algorithm": + tokenChallenge.algorithm = val + default: + } + } + + return &tokenChallenge, nil +} diff --git a/internal/rpc/kerberos.go b/internal/rpc/kerberos.go index 6147067c..2244fa15 100644 --- a/internal/rpc/kerberos.go +++ b/internal/rpc/kerberos.go @@ -21,24 +21,31 @@ var ( ) func (c *NamenodeConnection) doKerberosHandshake() error { - // All SASL requests/responses use this sequence number. - c.currentRequestID = saslRpcCallId - // Start negotiation, and get the list of supported mechanisms in reply. - c.writeSaslRequest(&hadoop.RpcSaslProto{State: hadoop.RpcSaslProto_NEGOTIATE.Enum()}) + err := c.writeSaslRequest(&hadoop.RpcSaslProto{ + State: hadoop.RpcSaslProto_NEGOTIATE.Enum(), + }) + if err != nil { + return err + } + resp, err := c.readSaslResponse(hadoop.RpcSaslProto_NEGOTIATE) if err != nil { return err } - var mechanism *hadoop.RpcSaslProto_SaslAuth + var krbAuth, tokenAuth *hadoop.RpcSaslProto_SaslAuth for _, m := range resp.GetAuths() { - if *m.Method == "KERBEROS" { - mechanism = m + switch *m.Method { + case "KERBEROS": + krbAuth = m + case "TOKEN": + tokenAuth = m + default: } } - if mechanism == nil { + if krbAuth == nil { return errKerberosNotSupported } @@ -48,12 +55,34 @@ func (c *NamenodeConnection) doKerberosHandshake() error { return err } + if tokenAuth != nil { + challenge, err := parseChallenge(tokenAuth) + if err != nil { + return err + } + + switch challenge.qop { + case qopPrivacy, qopIntegrity: + // Switch to SASL RPC handler + c.transport = &saslTransport{ + basicTransport: basicTransport{ + clientID: c.ClientID, + }, + sessionKey: sessionKey, + privacy: challenge.qop == qopPrivacy, + } + case qopAuthentication: + // No special transport is required. + default: + return errors.New("unexpected QOP in challenge") + } + } + err = c.writeSaslRequest(&hadoop.RpcSaslProto{ State: hadoop.RpcSaslProto_INITIATE.Enum(), Token: token.MechTokenBytes, - Auths: []*hadoop.RpcSaslProto_SaslAuth{mechanism}, + Auths: []*hadoop.RpcSaslProto_SaslAuth{krbAuth}, }) - if err != nil { return err } @@ -92,7 +121,6 @@ func (c *NamenodeConnection) doKerberosHandshake() error { State: hadoop.RpcSaslProto_RESPONSE.Enum(), Token: signedBytes, }) - if err != nil { return err } @@ -103,7 +131,8 @@ func (c *NamenodeConnection) doKerberosHandshake() error { } func (c *NamenodeConnection) writeSaslRequest(req *hadoop.RpcSaslProto) error { - packet, err := makeRPCPacket(newRPCRequestHeader(saslRpcCallId, c.ClientID), req) + rrh := newRPCRequestHeader(saslRpcCallId, c.ClientID) + packet, err := makeRPCPacket(rrh, req) if err != nil { return err } @@ -113,10 +142,20 @@ func (c *NamenodeConnection) writeSaslRequest(req *hadoop.RpcSaslProto) error { } func (c *NamenodeConnection) readSaslResponse(expectedState hadoop.RpcSaslProto_SaslState) (*hadoop.RpcSaslProto, error) { + rrh := &hadoop.RpcResponseHeaderProto{} resp := &hadoop.RpcSaslProto{} - err := c.readResponse("sasl", resp) + err := readRPCPacket(c.conn, rrh, resp) if err != nil { return nil, err + } else if int32(rrh.GetCallId()) != saslRpcCallId { + return nil, errors.New("unexpected sequence number") + } else if rrh.GetStatus() != hadoop.RpcResponseHeaderProto_SUCCESS { + return nil, &NamenodeError{ + method: "sasl", + message: rrh.GetErrorMsg(), + code: int(rrh.GetErrorDetail()), + exception: rrh.GetExceptionClassName(), + } } else if resp.GetState() != expectedState { return nil, fmt.Errorf("unexpected SASL state: %s", resp.GetState().String()) } diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index 35af0893..c36e1cde 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -42,10 +42,11 @@ type NamenodeConnection struct { kerberosServicePrincipleName string kerberosRealm string - dialFunc func(ctx context.Context, network, addr string) (net.Conn, error) - conn net.Conn - host *namenodeHost - hostList []*namenodeHost + dialFunc func(ctx context.Context, network, addr string) (net.Conn, error) + conn net.Conn + host *namenodeHost + hostList []*namenodeHost + transport transport reqLock sync.Mutex done chan struct{} @@ -115,8 +116,9 @@ func NewNamenodeConnection(options NamenodeConnectionOptions) (*NamenodeConnecti kerberosServicePrincipleName: options.KerberosServicePrincipleName, kerberosRealm: realm, - dialFunc: options.DialFunc, - hostList: hostList, + dialFunc: options.DialFunc, + hostList: hostList, + transport: &basicTransport{clientID: clientId}, done: make(chan struct{}), } @@ -190,6 +192,7 @@ func (c *NamenodeConnection) Execute(method string, req proto.Message, resp prot defer c.reqLock.Unlock() c.currentRequestID++ + requestID := c.currentRequestID for { err := c.resolveConnection() @@ -197,13 +200,13 @@ func (c *NamenodeConnection) Execute(method string, req proto.Message, resp prot return err } - err = c.writeRequest(method, req) + err = c.transport.writeRequest(c.conn, method, requestID, req) if err != nil { c.markFailure(err) continue } - err = c.readResponse(method, resp) + err = c.transport.readResponse(c.conn, method, requestID, resp) if err != nil { // Only retry on a standby exception. if nerr, ok := err.(*NamenodeError); ok && nerr.exception == standbyExceptionClass { @@ -220,62 +223,6 @@ func (c *NamenodeConnection) Execute(method string, req proto.Message, resp prot return nil } -// addLease increases the lease counter on the namenode. As long as the lease -// counter is greater than zero, all leases will automatically be renewed every -// - -// RPC definitions - -// A request packet: -// +-----------------------------------------------------------+ -// | uint32 length of the next three parts | -// +-----------------------------------------------------------+ -// | varint length + RpcRequestHeaderProto | -// +-----------------------------------------------------------+ -// | varint length + RequestHeaderProto | -// +-----------------------------------------------------------+ -// | varint length + Request | -// +-----------------------------------------------------------+ -func (c *NamenodeConnection) writeRequest(method string, req proto.Message) error { - rrh := newRPCRequestHeader(c.currentRequestID, c.ClientID) - rh := newRequestHeader(method) - - reqBytes, err := makeRPCPacket(rrh, rh, req) - if err != nil { - return err - } - - _, err = c.conn.Write(reqBytes) - return err -} - -// A response from the namenode: -// +-----------------------------------------------------------+ -// | uint32 length of the next two parts | -// +-----------------------------------------------------------+ -// | varint length + RpcResponseHeaderProto | -// +-----------------------------------------------------------+ -// | varint length + Response | -// +-----------------------------------------------------------+ -func (c *NamenodeConnection) readResponse(method string, resp proto.Message) error { - rrh := &hadoop.RpcResponseHeaderProto{} - err := readRPCPacket(c.conn, rrh, resp) - if err != nil { - return err - } else if int32(rrh.GetCallId()) != c.currentRequestID { - return errors.New("unexpected sequence number") - } else if rrh.GetStatus() != hadoop.RpcResponseHeaderProto_SUCCESS { - return &NamenodeError{ - method: method, - message: rrh.GetErrorMsg(), - code: int(rrh.GetErrorDetail()), - exception: rrh.GetExceptionClassName(), - } - } - - return nil -} - // A handshake packet: // +-----------------------------------------------------------+ // | Header, 4 bytes ("hrpc") | @@ -320,9 +267,6 @@ func (c *NamenodeConnection) doNamenodeHandshake() error { if err != nil { return fmt.Errorf("SASL handshake: %s", err) } - - // Reset the sequence number here, since we set it to -33 for the SASL bits. - c.currentRequestID = 0 } rrh := newRPCRequestHeader(handshakeCallID, c.ClientID) diff --git a/internal/rpc/sasl_transport.go b/internal/rpc/sasl_transport.go new file mode 100644 index 00000000..d1c7c90b --- /dev/null +++ b/internal/rpc/sasl_transport.go @@ -0,0 +1,82 @@ +package rpc + +import ( + "bytes" + "fmt" + "io" + + hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" + "github.com/golang/protobuf/proto" + "gopkg.in/jcmturner/gokrb5.v7/crypto" + "gopkg.in/jcmturner/gokrb5.v7/gssapi" + "gopkg.in/jcmturner/gokrb5.v7/iana/keyusage" + krbtypes "gopkg.in/jcmturner/gokrb5.v7/types" +) + +// saslTransport implements encrypted or signed RPC. +type saslTransport struct { + basicTransport + + // sessionKey is the encryption key used to decrypt and encrypt the payload. + sessionKey krbtypes.EncryptionKey + // privacy indicates full message encryption + privacy bool +} + +// readResponse reads a SASL-wrapped RPC response. +func (t *saslTransport) readResponse(r io.Reader, method string, requestID int32, resp proto.Message) error { + // First, read the sasl payload as a standard rpc response. + sasl := hadoop.RpcSaslProto{} + err := t.basicTransport.readResponse(r, method, saslRpcCallId, &sasl) + if err != nil { + return err + } else if sasl.GetState() != hadoop.RpcSaslProto_WRAP { + return fmt.Errorf("unexpected SASL state: %s", sasl.GetState().String()) + } + + // The SaslProto contains the actual payload. + var wrapToken gssapi.WrapToken + err = wrapToken.Unmarshal(sasl.GetToken(), true) + if err != nil { + return err + } + + rrh := &hadoop.RpcResponseHeaderProto{} + + if t.privacy { + // Decrypt the blob, which then looks like a normal RPC response. + decrypted, err := crypto.DecryptMessage(wrapToken.Payload, t.sessionKey, keyusage.GSSAPI_ACCEPTOR_SEAL) + if err != nil { + return err + } + + err = readRPCPacket(bytes.NewReader(decrypted), rrh, resp) + if err != nil { + return err + } + } else { + // Verify the checksum; the blob is just a normal RPC response. + _, err = wrapToken.Verify(t.sessionKey, keyusage.GSSAPI_ACCEPTOR_SEAL) + if err != nil { + return fmt.Errorf("unverifiable message from namenode: %s", err) + } + + err = readRPCPacket(bytes.NewReader(wrapToken.Payload), rrh, resp) + if err != nil { + return err + } + } + + if int32(rrh.GetCallId()) != requestID { + return errUnexpectedSequenceNumber + } else if rrh.GetStatus() != hadoop.RpcResponseHeaderProto_SUCCESS { + return &NamenodeError{ + method: method, + message: rrh.GetErrorMsg(), + code: int(rrh.GetErrorDetail()), + exception: rrh.GetExceptionClassName(), + } + } + + return nil +} diff --git a/internal/rpc/transport.go b/internal/rpc/transport.go new file mode 100644 index 00000000..1600a1c6 --- /dev/null +++ b/internal/rpc/transport.go @@ -0,0 +1,76 @@ +package rpc + +import ( + "errors" + "io" + + hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" + "github.com/golang/protobuf/proto" +) + +var errUnexpectedSequenceNumber = errors.New("unexpected sequence number") + +type transport interface { + writeRequest(w io.Writer, method string, requestID int32, req proto.Message) error + readResponse(r io.Reader, method string, requestID int32, resp proto.Message) error +} + +// basicTransport implements plain RPC. +type basicTransport struct { + // clientID is the client ID of this writer. + clientID []byte +} + +// writeRequest writes an RPC message. +// +// A request packet: +// +-----------------------------------------------------------+ +// | uint32 length of the next three parts | +// +-----------------------------------------------------------+ +// | varint length + RpcRequestHeaderProto | +// +-----------------------------------------------------------+ +// | varint length + RequestHeaderProto | +// +-----------------------------------------------------------+ +// | varint length + Request | +// +-----------------------------------------------------------+ +func (t *basicTransport) writeRequest(w io.Writer, method string, requestID int32, req proto.Message) error { + rrh := newRPCRequestHeader(requestID, t.clientID) + rh := newRequestHeader(method) + + reqBytes, err := makeRPCPacket(rrh, rh, req) + if err != nil { + return err + } + + _, err = w.Write(reqBytes) + return err +} + +// ReadResponse reads a response message. +// +// A response from the namenode: +// +-----------------------------------------------------------+ +// | uint32 length of the next two parts | +// +-----------------------------------------------------------+ +// | varint length + RpcResponseHeaderProto | +// +-----------------------------------------------------------+ +// | varint length + Response | +// +-----------------------------------------------------------+ +func (t *basicTransport) readResponse(r io.Reader, method string, requestID int32, resp proto.Message) error { + rrh := &hadoop.RpcResponseHeaderProto{} + err := readRPCPacket(r, rrh, resp) + if err != nil { + return err + } else if int32(rrh.GetCallId()) != requestID { + return errUnexpectedSequenceNumber + } else if rrh.GetStatus() != hadoop.RpcResponseHeaderProto_SUCCESS { + return &NamenodeError{ + method: method, + message: rrh.GetErrorMsg(), + code: int(rrh.GetErrorDetail()), + exception: rrh.GetExceptionClassName(), + } + } + + return nil +} diff --git a/travis-setup-cdh5.sh b/travis-setup-cdh5.sh index 1739f571..defde3d3 100755 --- a/travis-setup-cdh5.sh +++ b/travis-setup-cdh5.sh @@ -107,6 +107,10 @@ sudo tee /etc/hadoop/conf.gohdfs/core-site.xml <dfs.datanode.kerberos.principal dn/localhost@$KERBEROS_REALM + + hadoop.rpc.protection + $RPC_PROTECTION + EOF diff --git a/travis-setup-cdh6.sh b/travis-setup-cdh6.sh index 83e41e13..2ad9b2db 100755 --- a/travis-setup-cdh6.sh +++ b/travis-setup-cdh6.sh @@ -109,6 +109,10 @@ sudo tee /etc/hadoop/conf.gohdfs/core-site.xml <dfs.datanode.kerberos.principal dn/localhost@$KERBEROS_REALM + + hadoop.rpc.protection + $RPC_PROTECTION + EOF From 7eabc3a9c0e7e8a08f8d03a161cdb3309e04c299 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 23 Nov 2019 19:35:04 -0500 Subject: [PATCH 066/159] Add a new API key for github releases --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 94d3cb3e..634af91e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ deploy: skip_cleanup: true provider: releases api_key: - secure: HgyYfxoZfsZhDNeeL4Myi85aeyei80hQL29VhQKqkFrcoKL4V4+fJo7uG5XfKLCU0nQrRA98EtQO6w8AD+ULn/Ez8DA/RHey3Ny5GzX2ZaQ35KiuM71jPcvggxh8e2EJ14txxm7TAnqCxP7p5sJggiU0xj2w3vDUUJp5Q+vP3WE= + secure: MhNMuDo2ptwA3pXVJfIppskC0/Tg2pyoBcK/A1MAh8ifRrcw3HA2HjOgOj8HxE136aWLW90vnO1rpPRS60lyQikKyJtn2bg0/Earyz40bdQIxpxjeGyzS2yGdyuORivAoBqRMNXDBeMYjwIB/D/BkBJFRjk+VKn6hy6XgalbHcA= file: gohdfs-*.tar.gz file_glob: true on: From 1cf907da71b60951ec9d18dfd04d10c6a66bd197 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 12:07:34 -0500 Subject: [PATCH 067/159] Fix some obvious bugs in lease renewal --- file_writer_test.go | 7 ++++--- internal/rpc/namenode.go | 25 +++++++++++++++---------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/file_writer_test.go b/file_writer_test.go index 30acec3e..b22778b5 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -58,11 +58,12 @@ func TestFileWrite(t *testing.T) { assert.Equal(t, "foobar", string(bytes)) } -func TestFileWriteAfterIdleTime(t *testing.T) { +func TestFileWriteLeaseRenewal(t *testing.T) { client := getClient(t) baleet(t, "/_test/create/1.txt") mkdirp(t, "/_test/create") + writer, err := client.Create("/_test/create/1.txt") require.NoError(t, err) @@ -70,8 +71,8 @@ func TestFileWriteAfterIdleTime(t *testing.T) { require.NoError(t, err) assert.Equal(t, 3, n) - //Check that write after idle time doesn't fail - time.Sleep(90 * time.Second) + // Sleep long enough for the lease to expire. + time.Sleep(95 * time.Second) n, err = writer.Write([]byte("bar")) require.NoError(t, err) diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index c36e1cde..c5767f2a 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -285,27 +285,32 @@ func (c *NamenodeConnection) renewLeases() { ticker := time.NewTicker(leaseRenewInterval) defer ticker.Stop() - select { - case <-ticker.C: - req := &hdfs.RenewLeaseRequestProto{ClientName: proto.String(c.ClientName)} - resp := &hdfs.RenewLeaseResponseProto{} - - // Ignore any errors. - c.Execute("renewLease", req, resp) - case <-c.done: - return + for { + select { + case <-ticker.C: + req := &hdfs.RenewLeaseRequestProto{ClientName: proto.String(c.ClientName)} + resp := &hdfs.RenewLeaseResponseProto{} + + // Ignore any errors. + c.Execute("renewLease", req, resp) + case <-c.done: + return + } } } // Close terminates all underlying socket connections to remote server. func (c *NamenodeConnection) Close() error { + close(c.done) + + // Ensure that we're not concurrently renewing leases. c.reqLock.Lock() + defer c.reqLock.Unlock() if c.conn != nil { return c.conn.Close() } - close(c.done) return nil } From 644c0e60821aa5d6c5bde9cd59ab24062340719e Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 12:10:05 -0500 Subject: [PATCH 068/159] More strenuously ignore ABCs --- file_writer_test.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/file_writer_test.go b/file_writer_test.go index b22778b5..64a1e573 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -17,19 +17,20 @@ import ( const abcException = "org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException" func appendIgnoreABC(t *testing.T, client *Client, path string) (*FileWriter, error) { - fw, err := client.Append(path) - // This represents a bug in the HDFS append implementation, as far as I can // tell. - if pathErr, ok := err.(*os.PathError); ok { - if nnErr, ok := pathErr.Err.(Error); ok && nnErr.Exception() == abcException { - t.Log("Ignoring AlreadyBeingCreatedException from append once") - - return client.Append(path) + for { + fw, err := client.Append(path) + + if pathErr, ok := err.(*os.PathError); ok { + if nnErr, ok := pathErr.Err.(Error); ok && nnErr.Exception() == abcException { + t.Log("Ignoring AlreadyBeingCreatedException from append") + continue + } } - } - return fw, err + return fw, err + } } func TestFileWrite(t *testing.T) { From 8a5ea9dc2b3343b0f142916f6930a58a2e4f0a05 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 12:26:02 -0500 Subject: [PATCH 069/159] Ignore ABCs in two other places --- file_writer_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file_writer_test.go b/file_writer_test.go index 64a1e573..821a33c5 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -481,7 +481,7 @@ func TestFileAppendDeadline(t *testing.T) { err = writer.Close() require.NoError(t, err) - writer, err = client.Append("/_test/append/5.txt") + writer, err = appendIgnoreABC(t, client, "/_test/append/5.txt") require.NoError(t, err) writer.SetDeadline(time.Now().Add(100 * time.Millisecond)) @@ -513,7 +513,7 @@ func TestFileAppendDeadlineBefore(t *testing.T) { err = writer.Close() require.NoError(t, err) - writer, err = client.Append("/_test/append/6.txt") + writer, err = appendIgnoreABC(t, client, "/_test/append/6.txt") require.NoError(t, err) writer.SetDeadline(time.Now()) From 7eef8470801a8bcaf0501e2a39b41de494d9d99f Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 12:30:19 -0500 Subject: [PATCH 070/159] Save the go build cache on travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 634af91e..0ed004f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,3 +36,5 @@ deploy: condition: $PLATFORM = hdp2 cache: - "$HOME/bats" +- "$HOME/.cache/go-build" +- "s$HOME/gopath/pkg/mod" From 13aa9393bb9244d3a47ebbf95a49d5f70998a787 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 12:45:06 -0500 Subject: [PATCH 071/159] Remove mention of touch -am from help text Those flags are not implemented. --- cmd/hdfs/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go index 5bb76496..dc7f0b47 100755 --- a/cmd/hdfs/main.go +++ b/cmd/hdfs/main.go @@ -25,7 +25,7 @@ Valid commands: rm [-rf] FILE... mv [-nT] SOURCE... DEST mkdir [-p] FILE... - touch [-amc] FILE... + touch [-c] FILE... chmod [-R] OCTAL-MODE FILE... chown [-R] OWNER[:GROUP] FILE... cat SOURCE... From 386fc6e2d054aeb6948f14d34b5ae388a8a1a002 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 12:51:37 -0500 Subject: [PATCH 072/159] Maybe fix travis caching by unquoting paths --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0ed004f0..b01b18e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,6 @@ deploy: all_branches: true condition: $PLATFORM = hdp2 cache: -- "$HOME/bats" -- "$HOME/.cache/go-build" -- "s$HOME/gopath/pkg/mod" +- $HOME/bats +- $HOME/.cache/go-build +- $GOPATH/pkg/mod From a57e46aa588ccbfe8f8a2f7df92f67047ee01ca9 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 12:59:51 -0500 Subject: [PATCH 073/159] Travis expects cache/directories --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b01b18e2..da341e6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,7 @@ deploy: all_branches: true condition: $PLATFORM = hdp2 cache: -- $HOME/bats -- $HOME/.cache/go-build -- $GOPATH/pkg/mod + directories: + - $HOME/bats + - $HOME/.cache/go-build + - $GOPATH/pkg/mod From 8a5b8b0feeaf8b7e8cad8a64c7edb68324f59130 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 13:08:51 -0500 Subject: [PATCH 074/159] Test travis caching From d0c08b56d7856bfacaeb61e6ef6531f30f3c9ef2 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 13:17:53 -0500 Subject: [PATCH 075/159] Don't clone bats if the directory exists (from travis cache) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index da341e6f..0202133b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ env: before_install: - export GO111MODULE=on # Travis installs into $GOPATH/src, which disables module support by default. install: -- git clone https://github.com/sstephenson/bats $HOME/bats +- test -d $HOME/bats || git clone https://github.com/sstephenson/bats $HOME/bats - mkdir -p $HOME/bats/build - "$HOME/bats/install.sh $HOME/bats/build" - export PATH="$PATH:$HOME/bats/build/bin" From 20ffffb61256caaf3996a7819d8a73142ade1297 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 13:29:52 -0500 Subject: [PATCH 076/159] Test on hdp 3.1 instead of 2.6 --- .travis.yml | 2 +- travis-setup-hdp2.sh => travis-setup-hdp3.sh | 2 +- travis-setup.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename travis-setup-hdp2.sh => travis-setup-hdp3.sh (92%) diff --git a/.travis.yml b/.travis.yml index 0202133b..0c97146d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: go go_import_path: github.com/colinmarc/hdfs go: 1.x env: -- PLATFORM=hdp2 +- PLATFORM=hdp3 - PLATFORM=cdh5 - PLATFORM=cdh6 - PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=authentication diff --git a/travis-setup-hdp2.sh b/travis-setup-hdp3.sh similarity index 92% rename from travis-setup-hdp2.sh rename to travis-setup-hdp3.sh index 9d8680f9..212a343f 100755 --- a/travis-setup-hdp2.sh +++ b/travis-setup-hdp3.sh @@ -5,7 +5,7 @@ set -e UBUNTU_VERSION=$(lsb_release -r | awk '{print substr($2,0,2)}') sudo tee /etc/apt/sources.list.d/hdp.list < Date: Wed, 27 Nov 2019 13:33:51 -0500 Subject: [PATCH 077/159] Don't cache bats --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0c97146d..9bfa7177 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ env: before_install: - export GO111MODULE=on # Travis installs into $GOPATH/src, which disables module support by default. install: -- test -d $HOME/bats || git clone https://github.com/sstephenson/bats $HOME/bats +- git clone https://github.com/sstephenson/bats $HOME/bats - mkdir -p $HOME/bats/build - "$HOME/bats/install.sh $HOME/bats/build" - export PATH="$PATH:$HOME/bats/build/bin" @@ -36,6 +36,5 @@ deploy: condition: $PLATFORM = hdp2 cache: directories: - - $HOME/bats - $HOME/.cache/go-build - $GOPATH/pkg/mod From 5fb6101c5cc55d2ef563d2fb9d0612f94b06782c Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 13:36:45 -0500 Subject: [PATCH 078/159] Skip 95s test --- file_writer_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/file_writer_test.go b/file_writer_test.go index 821a33c5..b338233d 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -60,6 +60,8 @@ func TestFileWrite(t *testing.T) { } func TestFileWriteLeaseRenewal(t *testing.T) { + t.Skip() + client := getClient(t) baleet(t, "/_test/create/1.txt") From 62c925d23a631cb4a541b560aa67916545031f43 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 13:38:42 -0500 Subject: [PATCH 079/159] Typo --- travis-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis-setup.sh b/travis-setup.sh index f1d6a390..6dffa501 100755 --- a/travis-setup.sh +++ b/travis-setup.sh @@ -10,7 +10,7 @@ case $1 in cdh6) ./travis-setup-cdh6.sh ;; - hdp2) + hdp3) ./travis-setup-hdp3.sh ;; *) From 9d62fe0f4342583bccf4c68588203aef53a7e350 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 27 Nov 2019 13:57:12 -0500 Subject: [PATCH 080/159] Revert "Test on hdp 3.1 instead of 2.6" This reverts commit 20ffffb61256caaf3996a7819d8a73142ade1297. --- .travis.yml | 2 +- travis-setup-hdp3.sh => travis-setup-hdp2.sh | 2 +- travis-setup.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename travis-setup-hdp3.sh => travis-setup-hdp2.sh (92%) diff --git a/.travis.yml b/.travis.yml index 9bfa7177..1bf5636b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: go go_import_path: github.com/colinmarc/hdfs go: 1.x env: -- PLATFORM=hdp3 +- PLATFORM=hdp2 - PLATFORM=cdh5 - PLATFORM=cdh6 - PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=authentication diff --git a/travis-setup-hdp3.sh b/travis-setup-hdp2.sh similarity index 92% rename from travis-setup-hdp3.sh rename to travis-setup-hdp2.sh index 212a343f..9d8680f9 100755 --- a/travis-setup-hdp3.sh +++ b/travis-setup-hdp2.sh @@ -5,7 +5,7 @@ set -e UBUNTU_VERSION=$(lsb_release -r | awk '{print substr($2,0,2)}') sudo tee /etc/apt/sources.list.d/hdp.list < Date: Wed, 27 Nov 2019 13:59:06 -0500 Subject: [PATCH 081/159] Add test timeout --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 027eecd3..dfcf08af 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ hdfs: clean $(SOURCES) go build -ldflags "-X main.version=$(TRAVIS_TAG)" ./cmd/hdfs test: hdfs - go test -v -race ./... + go test -v -race -timeout 30s ./... bats ./cmd/hdfs/test/*.bats clean: From cd715bff28aefb46a4e1e24c03c49f9a874818eb Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 6 Jun 2020 00:15:36 +1200 Subject: [PATCH 082/159] Don't swallow errors from BlockReader.Close --- file_reader.go | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/file_reader.go b/file_reader.go index df6c1ee9..99c918f3 100644 --- a/file_reader.go +++ b/file_reader.go @@ -187,14 +187,14 @@ func (f *FileReader) Read(b []byte) (int, error) { } } - if f.blockReader == nil { - err := f.getNewBlockReader() - if err != nil { - return 0, err + for { + if f.blockReader == nil { + err := f.getNewBlockReader() + if err != nil { + return 0, err + } } - } - for { n, err := f.blockReader.Read(b) f.offset += int64(n) @@ -204,9 +204,12 @@ func (f *FileReader) Read(b []byte) (int, error) { return n, err } else if n > 0 { return n, nil - } else { - f.blockReader.Close() - f.getNewBlockReader() + } + + err = f.blockReader.Close() + f.blockReader = nil + if err != nil { + return n, err } } } From 02306caa39a10af7b6301120630a72ecde20f69f Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 11 Jul 2020 13:56:25 +1200 Subject: [PATCH 083/159] Skip flakey append tests when they flake --- file_writer_test.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/file_writer_test.go b/file_writer_test.go index b338233d..222e7fdf 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -18,14 +18,22 @@ const abcException = "org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedExcepti func appendIgnoreABC(t *testing.T, client *Client, path string) (*FileWriter, error) { // This represents a bug in the HDFS append implementation, as far as I can - // tell. + // tell. Try a few times again, then skip the test. + retries := 0 for { fw, err := client.Append(path) if pathErr, ok := err.(*os.PathError); ok { if nnErr, ok := pathErr.Err.(Error); ok && nnErr.Exception() == abcException { t.Log("Ignoring AlreadyBeingCreatedException from append") - continue + + if retries < 3 { + retries += 1 + continue + } else { + t.Skip("skipping Append test because of repeated AlreadyBeingCreatedException") + return fw, nil + } } } From 035b2ab41a0b00a1889a6eff845d9b888cf04856 Mon Sep 17 00:00:00 2001 From: starsz Date: Thu, 11 Jun 2020 11:01:20 +0800 Subject: [PATCH 084/159] Return Close errors from CopyToRemote and CopyToLocal --- client.go | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/client.go b/client.go index 324740cf..a865b181 100644 --- a/client.go +++ b/client.go @@ -200,20 +200,25 @@ func (c *Client) ReadFile(filename string) ([]byte, error) { // CopyToLocal copies the HDFS file specified by src to the local file at dst. // If dst already exists, it will be overwritten. func (c *Client) CopyToLocal(src string, dst string) error { - remote, err := c.Open(src) + local, err := os.Create(dst) if err != nil { return err } - defer remote.Close() - local, err := os.Create(dst) + defer local.Close() + + remote, err := c.Open(src) if err != nil { return err } - defer local.Close() _, err = io.Copy(local, remote) - return err + if err != nil { + remote.Close() + return err + } + + return remote.Close() } // CopyToRemote copies the local file specified by src to the HDFS file at dst. @@ -228,10 +233,14 @@ func (c *Client) CopyToRemote(src string, dst string) error { if err != nil { return err } - defer remote.Close() _, err = io.Copy(remote, local) - return err + if err != nil { + remote.Close() + return err + } + + return remote.Close() } func (c *Client) fetchDefaults() (*hdfs.FsServerDefaultsProto, error) { From 15f6da0033bd0247df209c306cac9ab6747ca175 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 15 Jul 2020 16:55:34 +1200 Subject: [PATCH 085/159] Add some tests for edgy Read behavior --- file_reader_test.go | 61 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/file_reader_test.go b/file_reader_test.go index fa5646db..0b8b6f23 100644 --- a/file_reader_test.go +++ b/file_reader_test.go @@ -2,12 +2,14 @@ package hdfs import ( "bytes" + "context" "encoding/hex" "fmt" "hash/crc32" "io" "io/ioutil" "math/rand" + "net" "os" "testing" "time" @@ -28,6 +30,14 @@ const ( testChecksum = "27c076e4987344253650d3335a5d08ce" ) +type randomReadConn struct { + net.Conn +} + +func (r *randomReadConn) Read(b []byte) (int, error) { + return r.Conn.Read(b[0:rand.Intn(len(b)+1)]) +} + func TestFileRead(t *testing.T) { client := getClient(t) @@ -90,6 +100,38 @@ func TestFileBigReadWeirdSizes(t *testing.T) { assert.EqualValues(t, copied, 1257276) } +func TestFileBigReadWeirdSizesMisalignment(t *testing.T) { + client := getClient(t) + dial := client.options.DatanodeDialFunc + if dial == nil { + dial = (&net.Dialer{}).DialContext + } + + client.options.DatanodeDialFunc = func(ctx context.Context, network, address string) (net.Conn, error) { + conn, err := dial(ctx, network, address) + if err != nil { + return nil, err + } + + return &randomReadConn{conn}, nil + } + + file, err := client.Open("/_test/mobydick.txt") + require.NoError(t, err) + + hash := crc32.NewIEEE() + copied := 0 + var n int64 + for err == nil { + n, err = io.CopyN(hash, file, int64(rand.Intn(1000))) + copied += int(n) + } + + assert.EqualValues(t, io.EOF, err) + assert.EqualValues(t, 0x199d1ae6, hash.Sum32()) + assert.EqualValues(t, copied, 1257276) +} + func TestFileBigReadN(t *testing.T) { client := getClient(t) @@ -150,7 +192,24 @@ func TestFileReadAtEOF(t *testing.T) { buf := make([]byte, 10) _, err = file.ReadAt(buf, 1) - assert.Equal(t, err, io.EOF) + assert.Equal(t, append([]byte{'a', 'r', '\n'}, make([]byte, 7)...), buf) + assert.Equal(t, io.EOF, err) +} + +func TestFileReadOversizedBuffer(t *testing.T) { + client := getClient(t) + + file, err := client.Open("/_test/foo.txt") + require.NoError(t, err) + + buf := make([]byte, 1025) + n, err := file.Read(buf) + + assert.Equal(t, 4, n) + assert.Equal(t, append([]byte{'b', 'a', 'r', '\n'}, make([]byte, 1025-4)...), buf) + if err != io.EOF { + assert.NoError(t, err) + } } func TestFileSeek(t *testing.T) { From 1596ee1307eb423a2ed092713f1368157d67ce86 Mon Sep 17 00:00:00 2001 From: Matthew Topol Date: Wed, 1 Jul 2020 12:42:01 -0400 Subject: [PATCH 086/159] Add support for wire encryption when talking to the datanodes This implements the hadoop version of DIGEST-MD5 SASL data protection, loosely based on RFC 2831. Authentication/encryption using rc4 is supported, but not 3des. Closes #236, fixes #145. --- .travis.yml | 7 +- client.go | 101 +++++++- cmd/hdfs/test/helper.bash | 4 + file_reader.go | 28 ++- file_reader_test.go | 8 +- file_writer.go | 30 ++- fixtures.sh | 4 + internal/rpc/challenge.go | 66 ------ internal/rpc/kerberos.go | 14 +- internal/rpc/rpc.go | 100 +------- internal/sasl/challenge.go | 62 +++++ internal/sasl/sasl.go | 1 + internal/transfer/aes_conn.go | 65 +++++ .../{rpc => transfer}/block_read_stream.go | 6 +- internal/{rpc => transfer}/block_reader.go | 2 +- .../{rpc => transfer}/block_write_stream.go | 21 +- internal/{rpc => transfer}/block_writer.go | 2 +- .../{rpc => transfer}/block_writer_test.go | 2 +- internal/{rpc => transfer}/checksum_reader.go | 5 +- .../{rpc => transfer}/datanode_failover.go | 2 +- .../datanode_failover_test.go | 2 +- internal/transfer/digest_md5.go | 223 ++++++++++++++++++ internal/transfer/digest_md5_integrity.go | 160 +++++++++++++ internal/transfer/digest_md5_privacy.go | 160 +++++++++++++ internal/transfer/digest_md5_test.go | 206 ++++++++++++++++ internal/transfer/sasl_dialer.go | 214 +++++++++++++++++ internal/transfer/transfer.go | 98 ++++++++ travis-setup-cdh5.sh | 86 ------- travis-setup-cdh6.sh | 32 +++ 29 files changed, 1415 insertions(+), 296 deletions(-) delete mode 100644 internal/rpc/challenge.go create mode 100644 internal/sasl/challenge.go create mode 100644 internal/sasl/sasl.go create mode 100644 internal/transfer/aes_conn.go rename internal/{rpc => transfer}/block_read_stream.go (98%) rename internal/{rpc => transfer}/block_reader.go (99%) rename internal/{rpc => transfer}/block_write_stream.go (98%) rename internal/{rpc => transfer}/block_writer.go (99%) rename internal/{rpc => transfer}/block_writer_test.go (97%) rename internal/{rpc => transfer}/checksum_reader.go (96%) rename internal/{rpc => transfer}/datanode_failover.go (98%) rename internal/{rpc => transfer}/datanode_failover_test.go (97%) create mode 100644 internal/transfer/digest_md5.go create mode 100644 internal/transfer/digest_md5_integrity.go create mode 100644 internal/transfer/digest_md5_privacy.go create mode 100644 internal/transfer/digest_md5_test.go create mode 100644 internal/transfer/sasl_dialer.go create mode 100644 internal/transfer/transfer.go diff --git a/.travis.yml b/.travis.yml index 1bf5636b..578fbfbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,10 @@ env: - PLATFORM=hdp2 - PLATFORM=cdh5 - PLATFORM=cdh6 -- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=authentication -- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=integrity -- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=privacy +- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=authentication DATA_TRANSFER_PROTECTION=authentication +- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=integrity DATA_TRANSFER_PROTECTION=integrity +- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=privacy DATA_TRANSFER_PROTECTION=privacy +- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=privacy DATA_TRANSFER_PROTECTION=privacy AES=true before_install: - export GO111MODULE=on # Travis installs into $GOPATH/src, which disables module support by default. install: diff --git a/client.go b/client.go index a865b181..70fd97b8 100644 --- a/client.go +++ b/client.go @@ -8,12 +8,24 @@ import ( "net" "os" "os/user" + "sort" "strings" + krb "gopkg.in/jcmturner/gokrb5.v7/client" + "github.com/colinmarc/hdfs/v2/hadoopconf" + hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/v2/internal/rpc" - krb "gopkg.in/jcmturner/gokrb5.v7/client" + "github.com/colinmarc/hdfs/v2/internal/transfer" +) + +type dialContext func(ctx context.Context, network, addr string) (net.Conn, error) + +const ( + DataTransferProtectionAuthentication = "authentication" + DataTransferProtectionIntegrity = "integrity" + DataTransferProtectionPrivacy = "privacy" ) // Client represents a connection to an HDFS cluster. A Client will @@ -21,8 +33,10 @@ import ( // from modifying them, until Close is called. type Client struct { namenode *rpc.NamenodeConnection - defaults *hdfs.FsServerDefaultsProto options ClientOptions + + defaults *hdfs.FsServerDefaultsProto + encryptionKey *hdfs.DataEncryptionKeyProto } // ClientOptions represents the configurable options for a client. @@ -68,6 +82,16 @@ type ClientOptions struct { // multi-namenode setup (for example: 'nn/_HOST'). It is required if // KerberosClient is provided. KerberosServicePrincipleName string + // DataTransferProtection specifies whether or not authentication, data + // signature integrity checks, and wire encryption is required when + // communicating the the datanodes. A value of "authentication" implies + // just authentication, a value of "integrity" implies both authentication + // and integrity checks, and a value of "privacy" implies all three. The + // Client may negotiate a higher level of protection if it is requested + // by the datanode; for example, if the datanode and namenode hdfs-site.xml + // has dfs.encrypt.data.transfer enabled, this setting is ignored and + // a level of "privacy" is used. + DataTransferProtection string } // ClientOptionsFromConf attempts to load any relevant configuration options @@ -91,6 +115,10 @@ type ClientOptions struct { // // (everything after the first '@') chopped off. // KerberosServicePrincipleName string // +// // Determined by dfs.data.transfer.protection or dfs.encrypt.data.transfer +// // (in the latter case, it is set to 'privacy'). +// DataTransferProtection string +// // Because of the way Kerberos can be forced by the Hadoop configuration but not // actually configured, you should check for whether KerberosClient is set in // the resulting ClientOptions before proceeding: @@ -116,6 +144,28 @@ func ClientOptionsFromConf(conf hadoopconf.HadoopConf) ClientOptions { options.KerberosServicePrincipleName = strings.Split(conf["dfs.namenode.kerberos.principal"], "@")[0] } + // Note that we take the highest setting, rather than allowing a range of + // alternatives. 'authentication', 'integrity', and 'privacy' are + // alphabetical for our convenience. + dataTransferProt := strings.Split( + strings.ToLower(conf["dfs.data.transfer.protection"]), ",") + sort.Strings(dataTransferProt) + + for _, val := range dataTransferProt { + switch val { + case "privacy": + options.DataTransferProtection = "privacy" + case "integrity": + options.DataTransferProtection = "integrity" + case "authentication": + options.DataTransferProtection = "authentication" + } + } + + if strings.ToLower(conf["dfs.encrypt.data.transfer"]) == "true" { + options.DataTransferProtection = "privacy" + } + return options } @@ -260,6 +310,53 @@ func (c *Client) fetchDefaults() (*hdfs.FsServerDefaultsProto, error) { return c.defaults, nil } +func (c *Client) fetchDataEncryptionKey() (*hdfs.DataEncryptionKeyProto, error) { + if c.encryptionKey != nil { + return c.encryptionKey, nil + } + + req := &hdfs.GetDataEncryptionKeyRequestProto{} + resp := &hdfs.GetDataEncryptionKeyResponseProto{} + + err := c.namenode.Execute("getDataEncryptionKey", req, resp) + if err != nil { + return nil, err + } + + c.encryptionKey = resp.GetDataEncryptionKey() + return c.encryptionKey, nil +} + +func (c *Client) wrapDatanodeDial(dc dialContext, token *hadoop.TokenProto) (dialContext, error) { + wrap := false + if c.options.DataTransferProtection != "" { + wrap = true + } else { + defaults, err := c.fetchDefaults() + if err != nil { + return nil, err + } + + wrap = defaults.GetEncryptDataTransfer() + } + + if wrap { + key, err := c.fetchDataEncryptionKey() + if err != nil { + return nil, err + } + + return (&transfer.SaslDialer{ + DialFunc: dc, + Key: key, + Token: token, + EnforceQop: c.options.DataTransferProtection, + }).DialContext, nil + } + + return dc, nil +} + // Close terminates all underlying socket connections to remote server. func (c *Client) Close() error { return c.namenode.Close() diff --git a/cmd/hdfs/test/helper.bash b/cmd/hdfs/test/helper.bash index eaa85b82..1c8406d8 100644 --- a/cmd/hdfs/test/helper.bash +++ b/cmd/hdfs/test/helper.bash @@ -4,6 +4,10 @@ export HADOOP_FS=${HADOOP_FS-"hadoop fs"} export ROOT_TEST_DIR="$BATS_TEST_DIRNAME/../../.." export HDFS="$ROOT_TEST_DIR/hdfs" +# jdk11 is missing some APIs that the older jars here rely on +# so point at openjdk8 for now +export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 + # stolen from https://github.com/sstephenson/rbenv/blob/master/test/test_helper.bash flunk() { diff --git a/file_reader.go b/file_reader.go index 99c918f3..589af44c 100644 --- a/file_reader.go +++ b/file_reader.go @@ -9,7 +9,7 @@ import ( "time" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/v2/internal/rpc" + "github.com/colinmarc/hdfs/v2/internal/transfer" "github.com/golang/protobuf/proto" ) @@ -22,7 +22,7 @@ type FileReader struct { info os.FileInfo blocks []*hdfs.LocatedBlockProto - blockReader *rpc.BlockReader + blockReader *transfer.BlockReader deadline time.Time offset int64 @@ -97,14 +97,21 @@ func (f *FileReader) Checksum() ([]byte, error) { paddedLength := 32 totalLength := 0 checksum := md5.New() + for _, block := range f.blocks { - cr := &rpc.ChecksumReader{ + d, err := f.client.wrapDatanodeDial(f.client.options.DatanodeDialFunc, + block.GetBlockToken()) + if err != nil { + return nil, err + } + + cr := &transfer.ChecksumReader{ Block: block, UseDatanodeHostname: f.client.options.UseDatanodeHostname, - DialFunc: f.client.options.DatanodeDialFunc, + DialFunc: d, } - err := cr.SetDeadline(f.deadline) + err = cr.SetDeadline(f.deadline) if err != nil { return nil, err } @@ -400,12 +407,19 @@ func (f *FileReader) getNewBlockReader() error { end := start + block.GetB().GetNumBytes() if start <= off && off < end { - f.blockReader = &rpc.BlockReader{ + dialFunc, err := f.client.wrapDatanodeDial( + f.client.options.DatanodeDialFunc, + block.GetBlockToken()) + if err != nil { + return err + } + + f.blockReader = &transfer.BlockReader{ ClientName: f.client.namenode.ClientName, Block: block, Offset: int64(off - start), UseDatanodeHostname: f.client.options.UseDatanodeHostname, - DialFunc: f.client.options.DatanodeDialFunc, + DialFunc: dialFunc, } return f.SetDeadline(f.deadline) diff --git a/file_reader_test.go b/file_reader_test.go index 0b8b6f23..3f435d96 100644 --- a/file_reader_test.go +++ b/file_reader_test.go @@ -164,7 +164,7 @@ func TestFileReadAt(t *testing.T) { off := 0 for off < len(buf) { n, err := file.ReadAt(buf[off:], int64(testStrOff+off)) - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, n > 0) off += n } @@ -175,7 +175,7 @@ func TestFileReadAt(t *testing.T) { off = 0 for off < len(buf) { n, err := file.ReadAt(buf[off:], int64(testStr2Off+off)) - assert.NoError(t, err) + require.NoError(t, err) assert.True(t, n > 0) off += n } @@ -362,11 +362,11 @@ func TestFileReadDeadline(t *testing.T) { file, err := client.Open("/_test/foo.txt") require.NoError(t, err) - file.SetDeadline(time.Now().Add(100 * time.Millisecond)) + file.SetDeadline(time.Now().Add(200 * time.Millisecond)) _, err = file.Read([]byte{0, 0}) assert.NoError(t, err) - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) _, err = file.Read([]byte{0, 0}) assert.NotNil(t, err) } diff --git a/file_writer.go b/file_writer.go index b7d0c462..b5518312 100644 --- a/file_writer.go +++ b/file_writer.go @@ -6,7 +6,7 @@ import ( "time" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/colinmarc/hdfs/v2/internal/rpc" + "github.com/colinmarc/hdfs/v2/internal/transfer" "github.com/golang/protobuf/proto" ) @@ -19,7 +19,7 @@ type FileWriter struct { replication int blockSize int64 - blockWriter *rpc.BlockWriter + blockWriter *transfer.BlockWriter deadline time.Time closed bool } @@ -112,14 +112,21 @@ func (c *Client) Append(name string) (*FileWriter, error) { return f, nil } - f.blockWriter = &rpc.BlockWriter{ + dialFunc, err := f.client.wrapDatanodeDial( + f.client.options.DatanodeDialFunc, + block.GetBlockToken()) + if err != nil { + return nil, err + } + + f.blockWriter = &transfer.BlockWriter{ ClientName: f.client.namenode.ClientName, Block: block, BlockSize: f.blockSize, Offset: int64(block.B.GetNumBytes()), Append: true, UseDatanodeHostname: f.client.options.UseDatanodeHostname, - DialFunc: f.client.options.DatanodeDialFunc, + DialFunc: dialFunc, } err = f.blockWriter.SetDeadline(f.deadline) @@ -176,7 +183,7 @@ func (f *FileWriter) Write(b []byte) (int, error) { for off < len(b) { n, err := f.blockWriter.Write(b[off:]) off += n - if err == rpc.ErrEndOfBlock { + if err == transfer.ErrEndOfBlock { err = f.startNewBlock() } @@ -262,12 +269,19 @@ func (f *FileWriter) startNewBlock() error { return &os.PathError{"create", f.name, interpretException(err)} } - f.blockWriter = &rpc.BlockWriter{ + block := addBlockResp.GetBlock() + dialFunc, err := f.client.wrapDatanodeDial( + f.client.options.DatanodeDialFunc, block.GetBlockToken()) + if err != nil { + return err + } + + f.blockWriter = &transfer.BlockWriter{ ClientName: f.client.namenode.ClientName, - Block: addBlockResp.GetBlock(), + Block: block, BlockSize: f.blockSize, UseDatanodeHostname: f.client.options.UseDatanodeHostname, - DialFunc: f.client.options.DatanodeDialFunc, + DialFunc: dialFunc, } return f.blockWriter.SetDeadline(f.deadline) diff --git a/fixtures.sh b/fixtures.sh index 6ff221bc..064c51ab 100755 --- a/fixtures.sh +++ b/fixtures.sh @@ -1,5 +1,9 @@ set -e +# jdk11 is missing some APIs that the older jars here rely on +# so point at openjdk8 for now +export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 + HADOOP_FS=${HADOOP_FS-"hadoop fs"} $HADOOP_FS -mkdir -p "/_test" $HADOOP_FS -chmod 777 "/_test" diff --git a/internal/rpc/challenge.go b/internal/rpc/challenge.go deleted file mode 100644 index 5cf3d483..00000000 --- a/internal/rpc/challenge.go +++ /dev/null @@ -1,66 +0,0 @@ -package rpc - -import ( - "fmt" - "regexp" - "strings" - - hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" -) - -const ( - // qopAuthenication is how the namenode refers to authentication mode, which - // only establishes mutual authentication without encryption (the default). - qopAuthentication = "auth" - // qopIntegrity is how the namenode refers to integrity mode, which, in - // in addition to authentication, verifies the signature of RPC messages. - qopIntegrity = "auth-int" - // qopPrivacy is how the namenode refers to privacy mode, which, in addition - // to authentication and integrity, provides full end-to-end encryption for - // RPC messages. - qopPrivacy = "auth-conf" -) - -var challengeRegexp = regexp.MustCompile(",?([a-zA-Z0-9]+)=(\"([^\"]+)\"|([^,]+)),?") - -type tokenChallenge struct { - realm string - nonce string - qop string - charset string - cipher []string - algorithm string -} - -// parseChallenge returns a tokenChallenge parsed from a challenge response from -// the namenode. -func parseChallenge(auth *hadoop.RpcSaslProto_SaslAuth) (*tokenChallenge, error) { - tokenChallenge := tokenChallenge{} - - matched := challengeRegexp.FindAllSubmatch(auth.Challenge, -1) - if matched == nil { - return nil, fmt.Errorf("invalid token challenge: %s", auth.Challenge) - } - - for _, m := range matched { - key := string(m[1]) - val := string(m[3]) - switch key { - case "realm": - tokenChallenge.realm = val - case "nonce": - tokenChallenge.nonce = val - case "qop": - tokenChallenge.qop = val - case "charset": - tokenChallenge.charset = val - case "cipher": - tokenChallenge.cipher = strings.Split(val, ",") - case "algorithm": - tokenChallenge.algorithm = val - default: - } - } - - return &tokenChallenge, nil -} diff --git a/internal/rpc/kerberos.go b/internal/rpc/kerberos.go index 2244fa15..d41f9a49 100644 --- a/internal/rpc/kerberos.go +++ b/internal/rpc/kerberos.go @@ -6,11 +6,13 @@ import ( "net" "regexp" - hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" "gopkg.in/jcmturner/gokrb5.v7/gssapi" "gopkg.in/jcmturner/gokrb5.v7/iana/keyusage" "gopkg.in/jcmturner/gokrb5.v7/spnego" krbtypes "gopkg.in/jcmturner/gokrb5.v7/types" + + hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" + "github.com/colinmarc/hdfs/v2/internal/sasl" ) const saslRpcCallId = -33 @@ -56,22 +58,22 @@ func (c *NamenodeConnection) doKerberosHandshake() error { } if tokenAuth != nil { - challenge, err := parseChallenge(tokenAuth) + challenge, err := sasl.ParseChallenge(tokenAuth.Challenge) if err != nil { return err } - switch challenge.qop { - case qopPrivacy, qopIntegrity: + switch challenge.Qop { + case sasl.QopPrivacy, sasl.QopIntegrity: // Switch to SASL RPC handler c.transport = &saslTransport{ basicTransport: basicTransport{ clientID: c.ClientID, }, sessionKey: sessionKey, - privacy: challenge.qop == qopPrivacy, + privacy: challenge.Qop == sasl.QopPrivacy, } - case qopAuthentication: + case sasl.QopAuthentication: // No special transport is required. default: return errors.New("unexpected QOP in challenge") diff --git a/internal/rpc/rpc.go b/internal/rpc/rpc.go index 7d00490c..2cbe36e3 100644 --- a/internal/rpc/rpc.go +++ b/internal/rpc/rpc.go @@ -5,22 +5,13 @@ package rpc import ( "encoding/binary" "errors" - "fmt" "io" "math/rand" "time" - hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" ) -const ( - dataTransferVersion = 0x1c - writeBlockOp = 0x50 - readBlockOp = 0x51 - checksumBlockOp = 0x55 -) - var errMalformedRPCMessage = errors.New("malformed RPC message") // Used for client ID generation, below. @@ -37,6 +28,17 @@ func newClientID() []byte { return id } +func makePrefixedMessage(msg proto.Message) ([]byte, error) { + msgBytes, err := proto.Marshal(msg) + if err != nil { + return nil, err + } + + lengthBytes := make([]byte, 10) + n := binary.PutUvarint(lengthBytes, uint64(len(msgBytes))) + return append(lengthBytes[:n], msgBytes...), nil +} + func makeRPCPacket(msgs ...proto.Message) ([]byte, error) { packet := make([]byte, 4, 128) @@ -97,83 +99,3 @@ func readRPCPacket(r io.Reader, msgs ...proto.Message) error { return nil } - -func makePrefixedMessage(msg proto.Message) ([]byte, error) { - msgBytes, err := proto.Marshal(msg) - if err != nil { - return nil, err - } - - lengthBytes := make([]byte, 10) - n := binary.PutUvarint(lengthBytes, uint64(len(msgBytes))) - return append(lengthBytes[:n], msgBytes...), nil -} - -func readPrefixedMessage(r io.Reader, msg proto.Message) error { - varintBytes := make([]byte, binary.MaxVarintLen32) - _, err := io.ReadAtLeast(r, varintBytes, binary.MaxVarintLen32) - if err != nil { - return err - } - - respLength, varintLength := binary.Uvarint(varintBytes) - if varintLength < 1 { - return io.ErrUnexpectedEOF - } - - // We may have grabbed too many bytes when reading the varint. - respBytes := make([]byte, respLength) - extraLength := copy(respBytes, varintBytes[varintLength:]) - _, err = io.ReadFull(r, respBytes[extraLength:]) - if err != nil { - return err - } - - return proto.Unmarshal(respBytes, msg) -} - -// A op request to a datanode: -// +-----------------------------------------------------------+ -// | Data Transfer Protocol Version, int16 | -// +-----------------------------------------------------------+ -// | Op code, 1 byte | -// +-----------------------------------------------------------+ -// | varint length + OpReadBlockProto | -// +-----------------------------------------------------------+ -func writeBlockOpRequest(w io.Writer, op uint8, msg proto.Message) error { - header := []byte{0x00, dataTransferVersion, op} - msgBytes, err := makePrefixedMessage(msg) - if err != nil { - return err - } - - req := append(header, msgBytes...) - _, err = w.Write(req) - if err != nil { - return err - } - - return nil -} - -// The initial response from a datanode, in the case of reads and writes: -// +-----------------------------------------------------------+ -// | varint length + BlockOpResponseProto | -// +-----------------------------------------------------------+ -func readBlockOpResponse(r io.Reader) (*hdfs.BlockOpResponseProto, error) { - resp := &hdfs.BlockOpResponseProto{} - err := readPrefixedMessage(r, resp) - - return resp, err -} - -func getDatanodeAddress(datanode *hdfs.DatanodeIDProto, useHostname bool) string { - var host string - if useHostname { - host = datanode.GetHostName() - } else { - host = datanode.GetIpAddr() - } - - return fmt.Sprintf("%s:%d", host, datanode.GetXferPort()) -} diff --git a/internal/sasl/challenge.go b/internal/sasl/challenge.go new file mode 100644 index 00000000..8ed02f9e --- /dev/null +++ b/internal/sasl/challenge.go @@ -0,0 +1,62 @@ +package sasl + +import ( + "fmt" + "regexp" + "strings" +) + +const ( + // QopAuthenication is how the namenode refers to authentication mode, which + // only establishes mutual authentication without encryption (the default). + QopAuthentication = "auth" + // QopIntegrity is how the namenode refers to integrity mode, which, in + // in addition to authentication, verifies the signature of RPC messages. + QopIntegrity = "auth-int" + // QopPrivacy is how the namenode refers to privacy mode, which, in addition + // to authentication and integrity, provides full end-to-end encryption for + // RPC messages. + QopPrivacy = "auth-conf" +) + +var challengeRegexp = regexp.MustCompile(",?([a-zA-Z0-9]+)=(\"([^\"]+)\"|([^,]+)),?") + +type Challenge struct { + Realm string + Nonce string + Qop string + Charset string + Cipher []string + Algorithm string +} + +func ParseChallenge(challenge []byte) (*Challenge, error) { + ch := Challenge{} + + matched := challengeRegexp.FindAllSubmatch(challenge, -1) + if matched == nil { + return nil, fmt.Errorf("invalid token challenge: %s", challenge) + } + + for _, m := range matched { + key := string(m[1]) + val := string(m[3]) + switch key { + case "realm": + ch.Realm = val + case "nonce": + ch.Nonce = val + case "qop": + ch.Qop = val + case "charset": + ch.Charset = val + case "cipher": + ch.Cipher = strings.Split(val, ",") + case "algorithm": + ch.Algorithm = val + default: + } + } + + return &ch, nil +} diff --git a/internal/sasl/sasl.go b/internal/sasl/sasl.go new file mode 100644 index 00000000..0bd291b7 --- /dev/null +++ b/internal/sasl/sasl.go @@ -0,0 +1 @@ +package sasl diff --git a/internal/transfer/aes_conn.go b/internal/transfer/aes_conn.go new file mode 100644 index 00000000..cc752ad0 --- /dev/null +++ b/internal/transfer/aes_conn.go @@ -0,0 +1,65 @@ +package transfer + +import ( + "crypto/aes" + "crypto/cipher" + "net" + "time" +) + +type aesConn struct { + conn net.Conn + + encStream cipher.StreamWriter + decStream cipher.StreamReader +} + +func newAesConn(conn net.Conn, inKey, outKey, inIv, outIv []byte) (net.Conn, error) { + c := &aesConn{conn: conn} + + encBlock, err := aes.NewCipher(inKey) + if err != nil { + return nil, err + } + + decBlock, err := aes.NewCipher(outKey) + if err != nil { + return nil, err + } + + c.encStream = cipher.StreamWriter{S: cipher.NewCTR(encBlock, inIv), W: conn} + c.decStream = cipher.StreamReader{S: cipher.NewCTR(decBlock, outIv), R: conn} + return c, nil +} + +func (d *aesConn) Close() error { + return d.conn.Close() +} + +func (d *aesConn) LocalAddr() net.Addr { + return d.conn.LocalAddr() +} + +func (d *aesConn) RemoteAddr() net.Addr { + return d.conn.RemoteAddr() +} + +func (d *aesConn) SetDeadline(t time.Time) error { + return d.conn.SetDeadline(t) +} + +func (d *aesConn) SetReadDeadline(t time.Time) error { + return d.conn.SetReadDeadline(t) +} + +func (d *aesConn) SetWriteDeadline(t time.Time) error { + return d.conn.SetWriteDeadline(t) +} + +func (d *aesConn) Write(b []byte) (n int, err error) { + return d.encStream.Write(b) +} + +func (d *aesConn) Read(b []byte) (n int, err error) { + return d.decStream.Read(b) +} diff --git a/internal/rpc/block_read_stream.go b/internal/transfer/block_read_stream.go similarity index 98% rename from internal/rpc/block_read_stream.go rename to internal/transfer/block_read_stream.go index 37183f5b..f716293e 100644 --- a/internal/rpc/block_read_stream.go +++ b/internal/transfer/block_read_stream.go @@ -1,4 +1,4 @@ -package rpc +package transfer import ( "bytes" @@ -101,8 +101,8 @@ func (s *blockReadStream) Read(b []byte) (int, error) { for i := 0; i < chunksToRead; i++ { chunkOff := i * s.chunkSize chunkEnd := chunkOff + s.chunkSize - if chunkEnd >= len(b) { - chunkEnd = len(b) + if chunkEnd >= n { + chunkEnd = n } err := s.validateChecksum(b[chunkOff:chunkEnd]) diff --git a/internal/rpc/block_reader.go b/internal/transfer/block_reader.go similarity index 99% rename from internal/rpc/block_reader.go rename to internal/transfer/block_reader.go index 37f0ad85..0d5b7032 100644 --- a/internal/rpc/block_reader.go +++ b/internal/transfer/block_reader.go @@ -1,4 +1,4 @@ -package rpc +package transfer import ( "context" diff --git a/internal/rpc/block_write_stream.go b/internal/transfer/block_write_stream.go similarity index 98% rename from internal/rpc/block_write_stream.go rename to internal/transfer/block_write_stream.go index 397b3a4a..9c9d208c 100644 --- a/internal/rpc/block_write_stream.go +++ b/internal/transfer/block_write_stream.go @@ -1,4 +1,4 @@ -package rpc +package transfer import ( "bufio" @@ -330,33 +330,26 @@ func (s *blockWriteStream) writePacket(p outboundPacket) error { DataLen: proto.Int32(int32(len(p.data))), } - header := make([]byte, 6) + // Don't ask me why this doesn't include the header proto... + totalLength := len(p.data) + len(p.checksums) + 4 + + header := make([]byte, 6, 6+totalLength) infoBytes, err := proto.Marshal(headerInfo) if err != nil { return err } - // Don't ask me why this doesn't include the header proto... - totalLength := len(p.data) + len(p.checksums) + 4 binary.BigEndian.PutUint32(header, uint32(totalLength)) binary.BigEndian.PutUint16(header[4:], uint16(len(infoBytes))) header = append(header, infoBytes...) + header = append(header, p.checksums...) + header = append(header, p.data...) _, err = s.conn.Write(header) if err != nil { return err } - _, err = s.conn.Write(p.checksums) - if err != nil { - return err - } - - _, err = s.conn.Write(p.data) - if err != nil { - return err - } - return nil } diff --git a/internal/rpc/block_writer.go b/internal/transfer/block_writer.go similarity index 99% rename from internal/rpc/block_writer.go rename to internal/transfer/block_writer.go index 588c079a..f57ed4fb 100644 --- a/internal/rpc/block_writer.go +++ b/internal/transfer/block_writer.go @@ -1,4 +1,4 @@ -package rpc +package transfer import ( "context" diff --git a/internal/rpc/block_writer_test.go b/internal/transfer/block_writer_test.go similarity index 97% rename from internal/rpc/block_writer_test.go rename to internal/transfer/block_writer_test.go index 8b128915..29b21d22 100644 --- a/internal/rpc/block_writer_test.go +++ b/internal/transfer/block_writer_test.go @@ -1,4 +1,4 @@ -package rpc +package transfer import ( "testing" diff --git a/internal/rpc/checksum_reader.go b/internal/transfer/checksum_reader.go similarity index 96% rename from internal/rpc/checksum_reader.go rename to internal/transfer/checksum_reader.go index 777a189d..391acc20 100644 --- a/internal/rpc/checksum_reader.go +++ b/internal/transfer/checksum_reader.go @@ -1,4 +1,4 @@ -package rpc +package transfer import ( "context" @@ -19,8 +19,7 @@ type ChecksumReader struct { // UseDatanodeHostname specifies whether the datanodes should be connected to // via their hostnames (if true) or IP addresses (if false). UseDatanodeHostname bool - // DialFunc is used to connect to the datanodes. If nil, then - // (&net.Dialer{}).DialContext is used. + // DialFunc is used to connect to the datanodes. If nil, then (&net.Dialer{}).DialContext is used DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) deadline time.Time diff --git a/internal/rpc/datanode_failover.go b/internal/transfer/datanode_failover.go similarity index 98% rename from internal/rpc/datanode_failover.go rename to internal/transfer/datanode_failover.go index 73115573..6380526b 100644 --- a/internal/rpc/datanode_failover.go +++ b/internal/transfer/datanode_failover.go @@ -1,4 +1,4 @@ -package rpc +package transfer import ( "sync" diff --git a/internal/rpc/datanode_failover_test.go b/internal/transfer/datanode_failover_test.go similarity index 97% rename from internal/rpc/datanode_failover_test.go rename to internal/transfer/datanode_failover_test.go index afcf65f5..83a293a8 100644 --- a/internal/rpc/datanode_failover_test.go +++ b/internal/transfer/datanode_failover_test.go @@ -1,4 +1,4 @@ -package rpc +package transfer import ( "testing" diff --git a/internal/transfer/digest_md5.go b/internal/transfer/digest_md5.go new file mode 100644 index 00000000..2aad236b --- /dev/null +++ b/internal/transfer/digest_md5.go @@ -0,0 +1,223 @@ +package transfer + +import ( + "crypto/md5" + "crypto/rand" + "encoding/base64" + "encoding/hex" + "errors" + "fmt" + "net" + "strings" + + "github.com/colinmarc/hdfs/v2/internal/sasl" +) + +const ( + saslIntegrityPrefixLength = 4 + macDataLen = 4 + macHMACLen = 10 + macMsgTypeLen = 2 + macSeqNumLen = 4 +) + +var macMsgType = [2]byte{0x00, 0x01} + +type digestMD5Conn interface { + net.Conn + decode(input []byte) ([]byte, error) +} + +// digestMD5Handshake represents the negotiation state in a token-digestmd5 +// authentication flow. +type digestMD5Handshake struct { + authID []byte + passwd string + hostname string + service string + + token *sasl.Challenge + + cnonce string + cipher string +} + +// challengeStep1 implements step one of RFC 2831. +func (d *digestMD5Handshake) challengeStep1(challenge []byte) ([]byte, error) { + var err error + d.token, err = sasl.ParseChallenge(challenge) + if err != nil { + return nil, err + } + + d.cnonce, err = genCnonce() + if err != nil { + return nil, err + } + + d.cipher = chooseCipher(d.token.Cipher) + rspdigest := d.compute(true) + + ret := fmt.Sprintf(`username="%s", realm="%s", nonce="%s", cnonce="%s", nc=%08x, qop=%s, digest-uri="%s/%s", response=%s, charset=utf-8`, + d.authID, d.token.Realm, d.token.Nonce, d.cnonce, 1, d.token.Qop, d.service, d.hostname, rspdigest) + + if d.cipher != "" { + ret += ", cipher=" + d.cipher + } + + return []byte(ret), nil +} + +// challengeStep2 implements step two of RFC 2831. +func (d *digestMD5Handshake) challengeStep2(challenge []byte) error { + rspauth := strings.Split(string(challenge), "=") + + if rspauth[0] != "rspauth" { + return fmt.Errorf("rspauth not in '%s'", string(challenge)) + } + + if rspauth[1] != d.compute(false) { + return errors.New("rspauth did not match digest") + } + + return nil +} + +// compute implements the computation of md5 digest authentication per RFC 2831. +// The response value computation is defined as: +// +// HEX(KD(HEX(H(A1)), +// { nonce-value, ":", nc-value, ":", cnonce-value, ":", qop-value, +// ":", HEX(H(A2)) })) +// A1 = { H({ username-value, ":", realm-value, ":", passwd }), +// ":", nonce-value, ":", cnonce-value } +// +// If "qop" is "auth": +// +// A2 = { "AUTHENTICATE:", digest-uri-value } +// +// If "qop" is "auth-int" or "auth-conf": +// +// A2 = { "AUTHENTICATE:", digest-uri-value, +// ":00000000000000000000000000000000" } +// +// Where: +// +// - { a, b, ... } is the concatenation of the octet strings a, b, ... +// - H(s) is the 16 octet MD5 Hash [RFC1321] of the octet string s +// - KD(k, s) is H({k, ":", s}) +// - HEX(n) is the representation of the 16 octet MD5 hash n as a string of +// 32 hex digits (with alphabetic characters in lower case) +func (d *digestMD5Handshake) compute(initial bool) string { + x := hex.EncodeToString(h(d.a1())) + y := strings.Join([]string{ + d.token.Nonce, + fmt.Sprintf("%08x", 1), + d.cnonce, + d.token.Qop, + hex.EncodeToString(h(d.a2(initial))), + }, ":") + return hex.EncodeToString(kd(x, y)) +} + +func (d *digestMD5Handshake) a1() string { + x := h(strings.Join([]string{string(d.authID), d.token.Realm, d.passwd}, ":")) + return strings.Join([]string{string(x[:]), d.token.Nonce, d.cnonce}, ":") + +} + +func (d *digestMD5Handshake) a2(initial bool) string { + digestURI := d.service + "/" + d.hostname + var a2 string + + // When validating the server's response-auth, we need to leave out the + // 'AUTHENTICATE:' prefix. + if initial { + a2 = strings.Join([]string{"AUTHENTICATE", digestURI}, ":") + } else { + a2 = ":" + digestURI + } + + if d.token.Qop == sasl.QopPrivacy || d.token.Qop == sasl.QopIntegrity { + a2 = a2 + ":00000000000000000000000000000000" + } + + return a2 +} + +// Defined this way for testing. +var genCnonce = func() (string, error) { + ret := make([]byte, 12) + if _, err := rand.Read(ret); err != nil { + return "", err + } + return base64.StdEncoding.EncodeToString(ret), nil +} + +func h(s string) []byte { + hash := md5.Sum([]byte(s)) + return hash[:] +} + +func kd(k, s string) []byte { + return h(k + ":" + s) +} + +func generateIntegrityKeys(a1 string) ([]byte, []byte) { + clientIntMagicStr := []byte("Digest session key to client-to-server signing key magic constant") + serverIntMagicStr := []byte("Digest session key to server-to-client signing key magic constant") + + sum := h(a1) + kic := md5.Sum(append(sum[:], clientIntMagicStr...)) + kis := md5.Sum(append(sum[:], serverIntMagicStr...)) + + return kic[:], kis[:] +} + +func generatePrivacyKeys(a1 string, cipher string) ([]byte, []byte) { + sum := h(a1) + var n int + switch cipher { + case "rc4-40": + n = 5 + case "rc4-56": + n = 7 + default: + n = md5.Size + } + + kcc := md5.Sum(append(sum[:n], + []byte("Digest H(A1) to client-to-server sealing key magic constant")...)) + kcs := md5.Sum(append(sum[:n], + []byte("Digest H(A1) to server-to-client sealing key magic constant")...)) + + return kcc[:], kcs[:] +} + +func chooseCipher(options []string) string { + s := make(map[string]bool) + for _, c := range options { + s[c] = true + } + + // TODO: Support 3DES + + switch { + case s["rc4"]: + return "rc4" + case s["rc4-56"]: + return "rc4-56" + case s["rc4-40"]: + return "rc4-40" + default: + return "" + } +} + +func lenEncodeBytes(seqnum int) (out [4]byte) { + out[0] = byte((seqnum >> 24) & 0xFF) + out[1] = byte((seqnum >> 16) & 0xFF) + out[2] = byte((seqnum >> 8) & 0xFF) + out[3] = byte(seqnum & 0xFF) + return +} diff --git a/internal/transfer/digest_md5_integrity.go b/internal/transfer/digest_md5_integrity.go new file mode 100644 index 00000000..201b172d --- /dev/null +++ b/internal/transfer/digest_md5_integrity.go @@ -0,0 +1,160 @@ +package transfer + +import ( + "bytes" + "crypto/hmac" + "crypto/md5" + "encoding/binary" + "errors" + "fmt" + "hash" + "io" + "net" + "syscall" + "time" +) + +// digestMD5IntegrityConn returns a net.Conn wrapper that peforms md5-digest +// integrity checks on data passing over it. +type digestMD5IntegrityConn struct { + conn net.Conn + readDeadline time.Time + + readBuf bytes.Buffer + writeBuf bytes.Buffer + + sendSeqNum int + readSeqNum int + + encodeMAC hash.Hash + decodeMAC hash.Hash +} + +func newDigestMD5IntegrityConn(conn net.Conn, kic, kis []byte) digestMD5Conn { + return &digestMD5IntegrityConn{ + conn: conn, + encodeMAC: hmac.New(md5.New, kic), + decodeMAC: hmac.New(md5.New, kis), + } +} + +func (d *digestMD5IntegrityConn) Close() error { + return d.conn.Close() +} + +func (d *digestMD5IntegrityConn) LocalAddr() net.Addr { + return d.conn.LocalAddr() +} + +func (d *digestMD5IntegrityConn) RemoteAddr() net.Addr { + return d.conn.RemoteAddr() +} + +func (d *digestMD5IntegrityConn) SetDeadline(t time.Time) error { + d.readDeadline = t + return d.conn.SetDeadline(t) +} + +func (d *digestMD5IntegrityConn) SetReadDeadline(t time.Time) error { + d.readDeadline = t + return d.conn.SetReadDeadline(t) +} + +func (d *digestMD5IntegrityConn) SetWriteDeadline(t time.Time) error { + return d.conn.SetWriteDeadline(t) +} + +func (d *digestMD5IntegrityConn) Write(b []byte) (n int, err error) { + inputLen := len(b) + seqBuf := lenEncodeBytes(d.sendSeqNum) + outputLen := macDataLen + inputLen + macHMACLen + macMsgTypeLen + macSeqNumLen + + d.writeBuf.Reset() + d.writeBuf.Grow(outputLen) + + binary.Write(&d.writeBuf, binary.BigEndian, int32(outputLen-macDataLen)) + d.writeBuf.Write(b) + + hmac := msgHMAC(d.encodeMAC, seqBuf, b) + d.writeBuf.Write(hmac) + d.writeBuf.Write(macMsgType[:]) + binary.Write(&d.writeBuf, binary.BigEndian, int32(d.sendSeqNum)) + + d.sendSeqNum++ + wr, err := d.writeBuf.WriteTo(d.conn) + return int(wr), err +} + +// Read will decode the underlying bytes and then copy them from our +// buffer into the provided byte slice +func (d *digestMD5IntegrityConn) Read(b []byte) (int, error) { + if !d.readDeadline.IsZero() && d.readDeadline.Before(time.Now()) { + return 0, syscall.ETIMEDOUT + } + + n, err := d.readBuf.Read(b) + if len(b) == n || (err != nil && err != io.EOF) { + return n, err + } + + var sz int32 + err = binary.Read(d.conn, binary.BigEndian, &sz) + if err != nil { + return n, err + } + + d.readBuf.Reset() + d.readBuf.Grow(int(sz)) + _, err = io.CopyN(&d.readBuf, d.conn, int64(sz)) + if err != nil { + return n, err + } + + decoded, err := d.decode(d.readBuf.Bytes()) + if err != nil { + return n, err + } + + d.readBuf.Truncate(len(decoded)) + return d.readBuf.Read(b[n:]) +} + +// decode will decode a message from the server and perform the integrity +// protection check, removing the verification and mac data in what is returned +// the slice returned is an alias to the buffer and must be either used or +// copied to a new slice before calling decode again +func (d *digestMD5IntegrityConn) decode(input []byte) ([]byte, error) { + inputLen := len(input) + if inputLen < saslIntegrityPrefixLength { + return nil, fmt.Errorf("Input length smaller than the integrity prefix") + } + + seqBuf := lenEncodeBytes(d.readSeqNum) + + dataLen := inputLen - macHMACLen - macMsgTypeLen - macSeqNumLen + hmac := msgHMAC(d.decodeMAC, seqBuf, input[:dataLen]) + + seqNumStart := inputLen - macSeqNumLen + msgTypeStart := seqNumStart - macMsgTypeLen + origHashStart := msgTypeStart - macHMACLen + + if !bytes.Equal(hmac, input[origHashStart:origHashStart+macHMACLen]) || + !bytes.Equal(macMsgType[:], input[msgTypeStart:msgTypeStart+macMsgTypeLen]) || + !bytes.Equal(seqBuf[:], input[seqNumStart:seqNumStart+macSeqNumLen]) { + return nil, errors.New("HMAC Integrity Check failed") + } + + d.readSeqNum++ + return input[:dataLen], nil +} + +// msgHMAC implements the HMAC wrapper per the RFC: +// +// HMAC(ki, {seqnum, msg})[0..9]. +func msgHMAC(mac hash.Hash, seq [4]byte, msg []byte) []byte { + mac.Reset() + mac.Write(seq[:]) + mac.Write(msg) + + return mac.Sum(nil)[:10] +} diff --git a/internal/transfer/digest_md5_privacy.go b/internal/transfer/digest_md5_privacy.go new file mode 100644 index 00000000..5267f555 --- /dev/null +++ b/internal/transfer/digest_md5_privacy.go @@ -0,0 +1,160 @@ +package transfer + +import ( + "bytes" + "crypto/hmac" + "crypto/md5" + "crypto/rc4" + "encoding/binary" + "errors" + "hash" + "io" + "net" + "syscall" + "time" +) + +type digestMD5PrivacyConn struct { + conn net.Conn + readDeadline time.Time + + sendSeqNum int + readSeqNum int + + decodeMAC hash.Hash + encodeMAC hash.Hash + + decryptor *rc4.Cipher + encryptor *rc4.Cipher + + readBuf bytes.Buffer + writeBuf bytes.Buffer +} + +// digestMD5PrivacyConn returns a net.Conn wrapper that peforms md5-digest +// encryption on data passing over it. +func newDigestMD5PrivacyConn(conn net.Conn, kic, kis, kcc, kcs []byte) digestMD5Conn { + encryptor, _ := rc4.NewCipher(kcc) + decryptor, _ := rc4.NewCipher(kcs) + + return &digestMD5PrivacyConn{ + conn: conn, + encryptor: encryptor, + decryptor: decryptor, + decodeMAC: hmac.New(md5.New, kis), + encodeMAC: hmac.New(md5.New, kic), + } +} + +func (d *digestMD5PrivacyConn) Close() error { + return d.conn.Close() +} + +func (d *digestMD5PrivacyConn) LocalAddr() net.Addr { + return d.conn.LocalAddr() +} + +func (d *digestMD5PrivacyConn) RemoteAddr() net.Addr { + return d.conn.RemoteAddr() +} + +func (d *digestMD5PrivacyConn) SetDeadline(t time.Time) error { + d.readDeadline = t + return d.conn.SetDeadline(t) +} + +func (d *digestMD5PrivacyConn) SetReadDeadline(t time.Time) error { + d.readDeadline = t + return d.conn.SetReadDeadline(t) +} + +func (d *digestMD5PrivacyConn) SetWriteDeadline(t time.Time) error { + return d.conn.SetWriteDeadline(t) +} + +func (d *digestMD5PrivacyConn) Read(b []byte) (int, error) { + if !d.readDeadline.IsZero() && d.readDeadline.Before(time.Now()) { + return 0, syscall.ETIMEDOUT + } + + n, err := d.readBuf.Read(b) + if len(b) == n || (err != nil && err != io.EOF) { + return n, err + } + + var sz int32 + err = binary.Read(d.conn, binary.BigEndian, &sz) + if err != nil { + return 0, err + } + + d.readBuf.Reset() + d.readBuf.Grow(int(sz)) + _, err = io.CopyN(&d.readBuf, d.conn, int64(sz)) + if err != nil { + return n, err + } + + decoded, err := d.decode(d.readBuf.Bytes()) + if err != nil { + return n, err + } + + d.readBuf.Truncate(len(decoded)) + return d.readBuf.Read(b[n:]) +} + +func (d *digestMD5PrivacyConn) decode(input []byte) (out []byte, err error) { + inputLen := len(input) + if inputLen < saslIntegrityPrefixLength { + return nil, errors.New("invalid response from datanode: bad response length") + } + + seqNumStart := inputLen - macSeqNumLen + msgTypeStart := seqNumStart - macMsgTypeLen + + encryptedLen := inputLen - macMsgTypeLen - macSeqNumLen + d.decryptor.XORKeyStream(input[:encryptedLen], input[:encryptedLen]) + + origHash := input[encryptedLen-macHMACLen : encryptedLen] + encryptedLen -= macHMACLen + + seqBuf := lenEncodeBytes(d.readSeqNum) + hmac := msgHMAC(d.decodeMAC, seqBuf, input[:encryptedLen]) + + msgType := input[msgTypeStart : msgTypeStart+macMsgTypeLen] + seqNum := input[seqNumStart : seqNumStart+macSeqNumLen] + + if !bytes.Equal(hmac, origHash) || !bytes.Equal(macMsgType[:], msgType) || !bytes.Equal(seqNum, seqBuf[:]) { + return nil, errors.New("invalid response from datanode: HMAC check failed") + } + + d.readSeqNum++ + return input[:encryptedLen], nil +} + +func (d *digestMD5PrivacyConn) Write(b []byte) (int, error) { + inputLen := len(b) + seqBuf := lenEncodeBytes(d.sendSeqNum) + + encryptedLen := inputLen + macHMACLen + outputLen := macDataLen + encryptedLen + macMsgTypeLen + macSeqNumLen + d.writeBuf.Reset() + d.writeBuf.Grow(outputLen) + + finalLength := encryptedLen + macMsgTypeLen + macSeqNumLen + binary.Write(&d.writeBuf, binary.BigEndian, int32(finalLength)) + d.writeBuf.Write(b) + + hmac := msgHMAC(d.encodeMAC, seqBuf, b) + d.writeBuf.Write(hmac) + + toEncrypt := d.writeBuf.Bytes()[macDataLen:] + d.encryptor.XORKeyStream(toEncrypt, toEncrypt) + d.writeBuf.Write(macMsgType[:]) + binary.Write(&d.writeBuf, binary.BigEndian, int32(d.sendSeqNum)) + + d.sendSeqNum++ + n, err := d.writeBuf.WriteTo(d.conn) + return int(n), err +} diff --git a/internal/transfer/digest_md5_test.go b/internal/transfer/digest_md5_test.go new file mode 100644 index 00000000..3ae744fd --- /dev/null +++ b/internal/transfer/digest_md5_test.go @@ -0,0 +1,206 @@ +package transfer + +import ( + "bytes" + "encoding/binary" + "net" + "testing" + "time" + + "github.com/golang/protobuf/proto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/v2/internal/sasl" +) + +func getTestDigest() *digestMD5Handshake { + return &digestMD5Handshake{ + passwd: "secret", + authID: []byte("chris"), + hostname: "elwood.innosoft.com", + service: "imap", + } +} + +func TestMD5DigestResponse(t *testing.T) { + dgst := getTestDigest() + + origGenCnonce := genCnonce + genCnonce = func() (string, error) { + return "OA6MHXh6VqTrRk", nil + } + defer func() { + genCnonce = origGenCnonce + }() + + // example pulled from page 19 of RFC 2831 + challenge := `realm="elwood.innosoft.com", nonce="OA6MG9tEQGm2hh", qop="auth", algorithm=md5-sess, charset=utf-8, cipher="rc4"` + ret, err := dgst.challengeStep1([]byte(challenge)) + require.NoError(t, err) + assert.Equal(t, []byte(`username="chris", realm="elwood.innosoft.com", nonce="OA6MG9tEQGm2hh", cnonce="OA6MHXh6VqTrRk", nc=00000001, qop=auth, digest-uri="imap/elwood.innosoft.com", response=d388dad90d4bbd760a152321f2143af7, charset=utf-8, cipher=rc4`), ret) + assert.Equal(t, "rc4", dgst.cipher) +} + +func TestMD5DigestRspAuth(t *testing.T) { + dgst := getTestDigest() + + // setup state as it would be after the first challenge + dgst.token = &sasl.Challenge{ + Algorithm: "md5-sess", + Charset: "utf-8", + Nonce: "OA6MG9tEQGm2hh", + Qop: sasl.QopAuthentication, + Realm: "elwood.innosoft.com", + } + dgst.cnonce = "OA6MHXh6VqTrRk" + + // evaluate the rspauth as per the example in RFC 2831 + err := dgst.challengeStep2([]byte("rspauth=ea40f60335c427b5527b84dbabcdfffd")) + assert.NoError(t, err) +} + +func TestDigestMD5Conn(t *testing.T) { + // This was captured from a test connection. + key := &hdfs.DataEncryptionKeyProto{} + key.EncryptionKey = []byte{ + 0x4d, 0xed, 0xaa, 0xd4, 0xf0, 0xf8, 0xec, 0x7d, + 0xfd, 0xf7, 0x76, 0xaf, 0xbc, 0x93, 0xba, 0x8e, + 0xd1, 0xc3, 0xb3, 0xb7} + key.Nonce = []byte{0x79, 0x0c, 0xc3, 0xa6, 0x31, 0x7f, 0x5b, 0xd7} + key.KeyId = proto.Uint32(388373981) + key.BlockPoolId = proto.String("BP-529865118-10.129.176.136-1582635112897") + + empty := "" + blockKind := "HDFS_BLOCK_TOKEN" + token := &hadoop.TokenProto{} + token.Kind = &blockKind + token.Service = &empty + + origGenCnonce := genCnonce + genCnonce = func() (string, error) { + return "dqNZ/hGooPsuK3iWPeDFeQ==", nil + } + defer func() { + genCnonce = origGenCnonce + }() + + server, client := net.Pipe() + serverDone := make(chan struct{}) + go func() { + defer server.Close() + defer close(serverDone) + + // The handshake starts by first passing 0xDEADBEEF to the server, along + // with an empty message. We have to read as much as possible, since the + // code writes everything in one go, and net.Pipe is unbuffered. + b := make([]byte, 1024) + server.SetReadDeadline(time.Now().Add(100 * time.Millisecond)) + _, err := server.Read(b) + require.NoError(t, err) + + d := binary.BigEndian.Uint32(b[:4]) + assert.Equal(t, uint32(0xDEADBEEF), d) + + server.SetReadDeadline(time.Now().Add(100 * time.Millisecond)) + msg := &hdfs.DataTransferEncryptorMessageProto{} + err = readPrefixedMessage(bytes.NewReader(b[4:]), msg) + require.NoError(t, err) + assert.Equal(t, hdfs.DataTransferEncryptorMessageProto_SUCCESS.Enum(), msg.Status) + + // the server then responds with the initial challenge + resp := &hdfs.DataTransferEncryptorMessageProto{} + resp.Status = hdfs.DataTransferEncryptorMessageProto_SUCCESS.Enum() + resp.Payload = []byte(`username="388373981 BP-529865118-10.129.176.136-1582635112897 eQzDpjF/W9c=", realm="0", nonce="8iQSCAmYohP0K4dBX4Z2cxYC4CFJjfVp3aATEHNN", qop="auth-conf", cipher="rc4"`) + data, err := makePrefixedMessage(resp) + require.NoError(t, err) + + server.SetWriteDeadline(time.Now().Add(100 * time.Millisecond)) + _, err = server.Write(data) + require.NoError(t, err) + + server.SetReadDeadline(time.Now().Add(100 * time.Millisecond)) + msg = &hdfs.DataTransferEncryptorMessageProto{} + err = readPrefixedMessage(server, msg) + require.NoError(t, err) + + // our client should respond appropriately with the correct challenge response + assert.Equal(t, `username="388373981 BP-529865118-10.129.176.136-1582635112897 eQzDpjF/W9c=", realm="0", nonce="8iQSCAmYohP0K4dBX4Z2cxYC4CFJjfVp3aATEHNN", cnonce="dqNZ/hGooPsuK3iWPeDFeQ==", nc=00000001, qop=auth-conf, digest-uri="hdfs/0", response=c4669d46e21197923d3e98e53e6dd543, charset=utf-8, cipher=rc4`, + string(msg.Payload)) + + // finally the server responds with a rspauth and the cipher information + msg.Status = hdfs.DataTransferEncryptorMessageProto_SUCCESS.Enum() + msg.Payload = []byte("rspauth=830abc648a95a91e9ff1d594cdbca222") + opt := &hdfs.CipherOptionProto{} + opt.Suite = hdfs.CipherSuiteProto_AES_CTR_NOPADDING.Enum() + // these are the encoded cipher keys, InKey and OutKey will need to be + // decoded by the client before they can be used + opt.InKey = []byte{ + 0xbb, 0x5e, 0xcf, 0x32, 0x55, 0xe7, 0x59, 0x5b, + 0xe5, 0xf9, 0xd7, 0xd2, 0x1e, 0x29, 0xb8, 0xeb, + 0x04, 0x93, 0x8b, 0x74, 0x58, 0xbd, 0x77, 0x79, + 0x8f, 0xfd, 0xf2, 0xe3, 0xb9, 0xbd, 0x70, 0xa7, + 0x3b, 0xbc, 0xf4, 0xa2, 0xf3, 0xa1, 0x8a, 0x51, + 0x83, 0x3e, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00} + opt.InIv = []byte{ + 0xc9, 0x50, 0x0c, 0xa0, 0xcc, 0x10, 0x13, 0x37, + 0x06, 0x21, 0x1e, 0x76, 0xf8, 0x64, 0xea, 0x37, + } + opt.OutKey = []byte{ + 0x63, 0x50, 0x62, 0xfe, 0x18, 0xed, 0xb9, 0xf6, + 0x27, 0x92, 0x45, 0x6f, 0xa6, 0xdc, 0x9c, 0x6e, + 0x71, 0x5e, 0x4a, 0xcb, 0x92, 0x97, 0xa4, 0xcb, + 0xa1, 0x56, 0xe3, 0x4f, 0x25, 0x5d, 0xfb, 0xd1, + 0x65, 0x81, 0x12, 0xe5, 0xd9, 0xe0, 0x12, 0x33, + 0x53, 0xef, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + } + opt.OutIv = []byte{ + 0xe2, 0xcb, 0xcd, 0xe2, 0x03, 0x20, 0x8e, 0x37, + 0x74, 0x02, 0x11, 0x66, 0x66, 0x9c, 0xd9, 0xa0, + } + msg.CipherOption = []*hdfs.CipherOptionProto{opt} + + data, _ = makePrefixedMessage(msg) + _, err = server.Write(data) + require.NoError(t, err) + + actualInKey := []byte{ + 0xe6, 0xfb, 0x59, 0xb1, 0x7e, 0xd7, 0xdf, 0x11, + 0x3a, 0xf3, 0xac, 0x62, 0xef, 0xc0, 0x86, 0x3d, + 0x92, 0x74, 0x7d, 0xd9, 0x3f, 0xae, 0xbc, 0x62, + 0xf2, 0xb5, 0x68, 0x7b, 0x10, 0x6f, 0xa3, 0x53, + } + actualInIv := opt.OutIv + actualOutKey := []byte{ + 0x7b, 0x91, 0xb6, 0x66, 0x60, 0xab, 0xff, 0x8c, + 0x80, 0x48, 0xe2, 0x0c, 0xef, 0x24, 0x0c, 0xc9, + 0x0b, 0xc5, 0xd7, 0x92, 0x14, 0x9c, 0x6f, 0xea, + 0xb9, 0x12, 0x1a, 0x48, 0xc4, 0x85, 0x5f, 0x43, + } + actualOutIv := opt.InIv + + wrapped, _ := newAesConn(server, actualInKey, actualOutKey, actualInIv, actualOutIv) + + // Receive an encrypted value. + wrapped.SetReadDeadline(time.Now().Add(100 * time.Millisecond)) + b = make([]byte, 4) + _, err = wrapped.Read(b) + require.NoError(t, err) + assert.Equal(t, b, []byte{0xDE, 0xAD, 0xBE, 0xEF}) + }() + + wrapped, err := (&SaslDialer{Token: token, Key: key}).wrapDatanodeConn(client) + require.NoError(t, err) + defer wrapped.Close() + + require.NoError(t, err) + + // Send an encrypted value. + n, err := wrapped.Write([]byte{0xDE, 0xAD, 0xBE, 0xEF}) + assert.NoError(t, err) + assert.Equal(t, 4, n) + + <-serverDone +} diff --git a/internal/transfer/sasl_dialer.go b/internal/transfer/sasl_dialer.go new file mode 100644 index 00000000..cb3fcac4 --- /dev/null +++ b/internal/transfer/sasl_dialer.go @@ -0,0 +1,214 @@ +package transfer + +import ( + "bytes" + "context" + "encoding/base64" + "errors" + "fmt" + "math" + "net" + + "github.com/golang/protobuf/proto" + + hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" + "github.com/colinmarc/hdfs/v2/internal/sasl" +) + +const ( + authMethod = "TOKEN" + authMechanism = "DIGEST-MD5" + authServer = "0" + authProtocol = "hdfs" +) + +// SaslDialer dials using the underlying DialFunc, then negotiates +// authentication with the datanode. The resulting Conn implements whatever +// data protection level is specified by the server, whether it be wire +// encryption or integrity checks. +type SaslDialer struct { + DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) + Key *hdfs.DataEncryptionKeyProto + Token *hadoop.TokenProto + EnforceQop string +} + +func (d *SaslDialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { + if d.DialFunc == nil { + d.DialFunc = (&net.Dialer{}).DialContext + } + + conn, err := d.DialFunc(ctx, network, addr) + if err != nil { + return nil, err + } + + return d.wrapDatanodeConn(conn) +} + +// wrapDatanodeConn performs a shortened SASL negotiation with the datanode, +// then returns a wrapped connection or any error encountered. In the case of +// a protection setting of 'authentication', the bare connection is returned. +func (d *SaslDialer) wrapDatanodeConn(conn net.Conn) (net.Conn, error) { + auth := &hadoop.RpcSaslProto_SaslAuth{} + auth.Method = proto.String(authMethod) + auth.Mechanism = proto.String(authMechanism) + auth.ServerId = proto.String(authServer) + auth.Protocol = proto.String(authProtocol) + + ourToken := &hadoop.TokenProto{} + ourToken.Kind = d.Token.Kind + ourToken.Password = d.Token.Password[:] + ourToken.Service = d.Token.Service + ourToken.Identifier = d.Token.GetIdentifier() + + // If the server defaults have EncryptDataTransfer set but the encryption + // key is empty, the namenode doesn't want us to encrypt the block token. + if d.Key != nil && len(d.Key.Nonce) > 0 { + buf := new(bytes.Buffer) + + nonceBase64Len := int(math.Ceil(4 * (float64(len(d.Key.GetNonce())) / 3))) + buf.Grow(6 + nonceBase64Len + len(d.Key.GetBlockPoolId())) + buf.WriteString( + fmt.Sprintf("%d %s %s", + d.Key.GetKeyId(), + d.Key.GetBlockPoolId(), + base64.StdEncoding.EncodeToString(d.Key.Nonce))) + + ourToken.Identifier = buf.Bytes() + ourToken.Password = d.Key.EncryptionKey + } else { + ourToken.Identifier = make([]byte, + base64.StdEncoding.EncodedLen(len(d.Token.GetIdentifier()))) + base64.StdEncoding.Encode(ourToken.Identifier, d.Token.GetIdentifier()) + } + + dgst := digestMD5Handshake{ + authID: ourToken.Identifier, + passwd: base64.StdEncoding.EncodeToString(ourToken.Password), + hostname: auth.GetServerId(), + service: auth.GetProtocol(), + } + + // Begin the handshake with 0xDEADBEEF and an empty message. + msg := &hdfs.DataTransferEncryptorMessageProto{} + msg.Status = hdfs.DataTransferEncryptorMessageProto_SUCCESS.Enum() + data, err := makePrefixedMessage(msg) + if err != nil { + return nil, err + } + + data = append([]byte{0xDE, 0xAD, 0xBE, 0xEF}, data...) + _, err = conn.Write(data) + if err != nil { + return nil, err + } + + // The response includes a challenge. Compute it and send it back. + resp := &hdfs.DataTransferEncryptorMessageProto{} + err = readPrefixedMessage(conn, msg) + if err != nil { + return nil, err + } + + challengeResponse, err := dgst.challengeStep1(msg.Payload) + if err != nil { + return nil, err + } + + // Use the server's QOP unless one was specified in the local configuration. + privacy := false + integrity := false + switch dgst.token.Qop { + case sasl.QopPrivacy: + privacy = true + integrity = true + case sasl.QopIntegrity: + if d.EnforceQop == "privacy" { + return nil, errors.New("negotiating data protection: invalid qop: 'integrity'") + } + + privacy = false + integrity = true + default: + if d.EnforceQop == "privacy" || d.EnforceQop == "integrity" { + return nil, fmt.Errorf("negotiating data protection: invalid qop: %s", dgst.token.Qop) + } + } + + msg = &hdfs.DataTransferEncryptorMessageProto{} + msg.Status = hdfs.DataTransferEncryptorMessageProto_SUCCESS.Enum() + msg.Payload = []byte(challengeResponse) + + if privacy { + // Indicate to the server that we want AES. + opt := &hdfs.CipherOptionProto{} + opt.Suite = hdfs.CipherSuiteProto_AES_CTR_NOPADDING.Enum() + msg.CipherOption = append(msg.CipherOption, opt) + } + + data, err = makePrefixedMessage(msg) + if err != nil { + return nil, err + } + + _, err = conn.Write(data) + if err != nil { + return nil, err + } + + // Read another response from the server. + err = readPrefixedMessage(conn, resp) + if err != nil { + return nil, err + } + + err = dgst.challengeStep2(resp.Payload) + if err != nil { + return nil, err + } + + // Authentication done; we can return the bare connection if we don't need + // to do anything else. + if !privacy && !integrity { + return conn, nil + } + + kic, kis := generateIntegrityKeys(dgst.a1()) + + var wrapped digestMD5Conn + if privacy { + if dgst.cipher == "" { + return nil, fmt.Errorf("no available cipher among choices: %v", dgst.token.Cipher) + } + + kcc, kcs := generatePrivacyKeys(dgst.a1(), dgst.cipher) + wrapped = newDigestMD5PrivacyConn(conn, kic, kis, kcc, kcs) + } else { + wrapped = newDigestMD5IntegrityConn(conn, kic, kis) + } + + // If we're going to encrypt, we use the above wrapped connection just for + // finishing the handshake. + if len(resp.GetCipherOption()) > 0 { + cipher := resp.GetCipherOption()[0] + var outKey []byte + + decoded, err := wrapped.decode(cipher.InKey) + if err != nil { + return nil, err + } + + inKey := make([]byte, len(decoded)) + copy(inKey, decoded) + + if outKey, err = wrapped.decode(cipher.OutKey); err != nil { + return nil, err + } + + return newAesConn(conn, inKey, outKey, cipher.InIv, cipher.OutIv) + } + + return wrapped, nil +} diff --git a/internal/transfer/transfer.go b/internal/transfer/transfer.go new file mode 100644 index 00000000..d6f30952 --- /dev/null +++ b/internal/transfer/transfer.go @@ -0,0 +1,98 @@ +// Package transfer implements wire transfer with the datanodes. +package transfer + +import ( + "encoding/binary" + "fmt" + "io" + + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" + "github.com/golang/protobuf/proto" +) + +const ( + dataTransferVersion = 0x1c + writeBlockOp = 0x50 + readBlockOp = 0x51 + checksumBlockOp = 0x55 +) + +func makePrefixedMessage(msg proto.Message) ([]byte, error) { + msgBytes, err := proto.Marshal(msg) + if err != nil { + return nil, err + } + + lengthBytes := make([]byte, binary.MaxVarintLen32) + n := binary.PutUvarint(lengthBytes, uint64(len(msgBytes))) + return append(lengthBytes[:n], msgBytes...), nil +} + +func readPrefixedMessage(r io.Reader, msg proto.Message) error { + varintBytes := make([]byte, binary.MaxVarintLen32) + _, err := io.ReadAtLeast(r, varintBytes, binary.MaxVarintLen32) + if err != nil { + return err + } + + respLength, varintLength := binary.Uvarint(varintBytes) + if varintLength < 1 { + return io.ErrUnexpectedEOF + } + + // We may have grabbed too many bytes when reading the varint. + respBytes := make([]byte, respLength) + extraLength := copy(respBytes, varintBytes[varintLength:]) + _, err = io.ReadFull(r, respBytes[extraLength:]) + if err != nil { + return err + } + + return proto.Unmarshal(respBytes, msg) +} + +// A op request to a datanode: +// +-----------------------------------------------------------+ +// | Data Transfer Protocol Version, int16 | +// +-----------------------------------------------------------+ +// | Op code, 1 byte | +// +-----------------------------------------------------------+ +// | varint length + OpReadBlockProto | +// +-----------------------------------------------------------+ +func writeBlockOpRequest(w io.Writer, op uint8, msg proto.Message) error { + header := []byte{0x00, dataTransferVersion, op} + msgBytes, err := makePrefixedMessage(msg) + if err != nil { + return err + } + + req := append(header, msgBytes...) + _, err = w.Write(req) + if err != nil { + return err + } + + return nil +} + +// The initial response from a datanode, in the case of reads and writes: +// +-----------------------------------------------------------+ +// | varint length + BlockOpResponseProto | +// +-----------------------------------------------------------+ +func readBlockOpResponse(r io.Reader) (*hdfs.BlockOpResponseProto, error) { + resp := &hdfs.BlockOpResponseProto{} + err := readPrefixedMessage(r, resp) + + return resp, err +} + +func getDatanodeAddress(datanode *hdfs.DatanodeIDProto, useHostname bool) string { + var host string + if useHostname { + host = datanode.GetHostName() + } else { + host = datanode.GetIpAddr() + } + + return fmt.Sprintf("%s:%d", host, datanode.GetXferPort()) +} diff --git a/travis-setup-cdh5.sh b/travis-setup-cdh5.sh index defde3d3..a735b739 100755 --- a/travis-setup-cdh5.sh +++ b/travis-setup-cdh5.sh @@ -2,8 +2,6 @@ set -e -KERBEROS=${KERBEROS-"false"} - UBUNTU_CODENAME=$(lsb_release -c | awk '{print $2}') sudo tee /etc/apt/sources.list.d/cdh.list <hadoop.security.authentication $CONF_AUTHENTICATION - - hadoop.security.authorization - $KERBEROS - - - dfs.namenode.keytab.file - /tmp/nn.keytab - - - dfs.namenode.kerberos.principal - nn/localhost@$KERBEROS_REALM - - - dfs.web.authentication.kerberos.principal - nn/localhost@$KERBEROS_REALM - - - dfs.datanode.keytab.file - /tmp/dn.keytab - - - dfs.datanode.kerberos.principal - dn/localhost@$KERBEROS_REALM - - - hadoop.rpc.protection - $RPC_PROTECTION - EOF @@ -136,10 +54,6 @@ sudo tee /etc/hadoop/conf.gohdfs/hdfs-site.xml <dfs.safemode.min.datanodes 1 - - dfs.block.access.token.enable - $KERBEROS - ignore.secure.ports.for.testing true diff --git a/travis-setup-cdh6.sh b/travis-setup-cdh6.sh index 2ad9b2db..55365024 100755 --- a/travis-setup-cdh6.sh +++ b/travis-setup-cdh6.sh @@ -3,6 +3,17 @@ set -e KERBEROS=${KERBEROS-"false"} +AES=${AES-"false"} +if [ "$DATA_TRANSFER_PROTECTION" = "privacy" ]; then + KERBEROS="true" + ENCRYPT_DATA_TRANSFER="true" + ENCRYPT_DATA_TRANSFER_ALG="rc4" + if [ "$AES" = "true" ]; then + ENCRYPT_DATA_TRANSFER_CIPHER="AES/CTR/NoPadding" + fi +else + ENCRYPT_DATA_TRANSFER="false" +fi UBUNTU_CODENAME=$(lsb_release -cs) UBUNTU_VERSION=$(lsb_release -rs | sed s/\\.//) @@ -146,6 +157,22 @@ sudo tee /etc/hadoop/conf.gohdfs/hdfs-site.xml <ignore.secure.ports.for.testing true + + dfs.data.transfer.protection + $DATA_TRANSFER_PROTECTION + + + dfs.encrypt.data.transfer + $ENCRYPT_DATA_TRANSFER + + + dfs.encrypt.data.transfer.algorithm + $ENCRYPT_DATA_TRANSFER_ALG + + + dfs.encrypt.data.transfer.cipher.suites + $ENCRYPT_DATA_TRANSFER_CIPHER + EOF @@ -158,6 +185,11 @@ sudo -u hdfs hdfs namenode -format -nonInteractive sudo adduser travis hadoop +if [ $ENCRYPT_DATA_TRANSFER = "true" ]; then + sudo apt-get install -y --allow-unauthenticated hadoop-kms hadoop-kms-server + sudo service hadoop-kms-server restart +fi + sudo service hadoop-hdfs-datanode restart sudo service hadoop-hdfs-namenode restart From 7dba08248002d73cb14dfa7b848f6b08471ef03d Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 18 Jul 2020 01:09:38 +1000 Subject: [PATCH 087/159] Add support for extended filesystem attributes ("XAttrs") --- error.go | 4 +- xattr.go | 171 +++++++++++++++++++++++++++++++ xattr_test.go | 272 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 445 insertions(+), 2 deletions(-) create mode 100644 xattr.go create mode 100644 xattr_test.go diff --git a/error.go b/error.go index d3ade37c..da919d10 100644 --- a/error.go +++ b/error.go @@ -9,7 +9,7 @@ const ( fileNotFoundException = "java.io.FileNotFoundException" permissionDeniedException = "org.apache.hadoop.security.AccessControlException" pathIsNotEmptyDirException = "org.apache.hadoop.fs.PathIsNotEmptyDirectoryException" - FileAlreadyExistsException = "org.apache.hadoop.fs.FileAlreadyExistsException" + fileAlreadyExistsException = "org.apache.hadoop.fs.fileAlreadyExistsException" ) // Error represents a remote java exception from an HDFS namenode or datanode. @@ -39,7 +39,7 @@ func interpretException(err error) error { return os.ErrPermission case pathIsNotEmptyDirException: return syscall.ENOTEMPTY - case FileAlreadyExistsException: + case fileAlreadyExistsException: return os.ErrExist default: return err diff --git a/xattr.go b/xattr.go new file mode 100644 index 00000000..29e6fdd5 --- /dev/null +++ b/xattr.go @@ -0,0 +1,171 @@ +package hdfs + +import ( + "errors" + "fmt" + "os" + "strings" + + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" + "github.com/golang/protobuf/proto" +) + +var errXAttrKeysNotFound = errors.New("one or more keys not found") + +const createAndReplace = 3 + +// ListXAttrs returns a list of all extended attributes for the given path. +// The returned keys will be in the form +func (c *Client) ListXAttrs(name string) (map[string]string, error) { + req := &hdfs.ListXAttrsRequestProto{Src: proto.String(name)} + resp := &hdfs.ListXAttrsResponseProto{} + + err := c.namenode.Execute("listXAttrs", req, resp) + if err != nil { + return nil, &os.PathError{"list xattrs", name, interpretException(err)} + } + + return xattrMap(resp.GetXAttrs()), nil +} + +// GetXAttrs returns the extended attributes for the given path and list of +// keys. The keys should be prefixed by namespace, e.g. user.foo or trusted.bar. +func (c *Client) GetXAttrs(name string, keys ...string) (map[string]string, error) { + if len(keys) == 0 { + return make(map[string]string), nil + } + + req := &hdfs.GetXAttrsRequestProto{Src: proto.String(name)} + for _, key := range keys { + ns, rest, err := splitKey(key) + if err != nil { + return nil, &os.PathError{"get xattrs", name, err} + } + + req.XAttrs = append(req.XAttrs, &hdfs.XAttrProto{ + Namespace: ns, + Name: proto.String(rest), + }) + } + resp := &hdfs.GetXAttrsResponseProto{} + + err := c.namenode.Execute("getXAttrs", req, resp) + if err != nil { + if isKeyNotFound(err) { + return nil, &os.PathError{"get xattrs", name, errXAttrKeysNotFound} + } + + return nil, &os.PathError{"get xattrs", name, interpretException(err)} + } + + return xattrMap(resp.GetXAttrs()), nil +} + +// SetXAttr sets an extended attribute for the given path and key. If the +// attribute doesn't exist, it will be created. +func (c *Client) SetXAttr(name, key, value string) error { + resp := &hdfs.SetXAttrResponseProto{} + + ns, rest, err := splitKey(key) + if err != nil { + return &os.PathError{"set xattr", name, err} + } + + req := &hdfs.SetXAttrRequestProto{ + Src: proto.String(name), + XAttr: &hdfs.XAttrProto{ + Namespace: ns.Enum(), + Name: proto.String(rest), + Value: []byte(value), + }, + Flag: proto.Uint32(createAndReplace), + } + + err = c.namenode.Execute("setXAttr", req, resp) + if err != nil { + return &os.PathError{"set xattr", name, interpretException(err)} + } + + return nil +} + +// RemoveXAttr unsets an extended attribute for the given path and key. It +// returns an error if the attribute doesn't already exist. +func (c *Client) RemoveXAttr(name, key string) error { + ns, rest, err := splitKey(key) + if err != nil { + return &os.PathError{"remove xattr", name, err} + } + + req := &hdfs.RemoveXAttrRequestProto{ + Src: proto.String(name), + XAttr: &hdfs.XAttrProto{ + Namespace: ns, + Name: proto.String(rest), + }, + } + resp := &hdfs.RemoveXAttrResponseProto{} + + err = c.namenode.Execute("removeXAttr", req, resp) + if err != nil { + if isKeyNotFound(err) { + return &os.PathError{"remove xattr", name, errXAttrKeysNotFound} + } + + return &os.PathError{"remove xattr", name, interpretException(err)} + } + + return nil +} + +func splitKey(key string) (*hdfs.XAttrProto_XAttrNamespaceProto, string, error) { + parts := strings.SplitN(key, ".", 2) + if len(parts) < 2 { + return nil, "", fmt.Errorf("invalid key: '%s'", key) + } + + var ns hdfs.XAttrProto_XAttrNamespaceProto + switch strings.ToLower(parts[0]) { + case "user": + ns = hdfs.XAttrProto_USER + case "trusted": + ns = hdfs.XAttrProto_TRUSTED + case "system": + ns = hdfs.XAttrProto_SYSTEM + case "security": + ns = hdfs.XAttrProto_SECURITY + case "raw": + ns = hdfs.XAttrProto_RAW + default: + return nil, "", fmt.Errorf("invalid key namespace: '%s'", parts[0]) + } + + return ns.Enum(), parts[1], nil +} + +func xattrMap(attrs []*hdfs.XAttrProto) map[string]string { + m := make(map[string]string) + for _, xattr := range attrs { + key := fmt.Sprintf("%s.%s", + strings.ToLower(xattr.GetNamespace().String()), xattr.GetName()) + m[key] = string(xattr.GetValue()) + } + + return m +} + +func isKeyNotFound(err error) bool { + if remoteErr, ok := err.(Error); ok { + if strings.HasPrefix(remoteErr.Message(), + "At least one of the attributes provided was not found") { + return true + } + + if strings.HasPrefix(remoteErr.Message(), + "No matching attributes found for remove operation") { + return true + } + } + + return false +} diff --git a/xattr_test.go b/xattr_test.go new file mode 100644 index 00000000..f1b4c446 --- /dev/null +++ b/xattr_test.go @@ -0,0 +1,272 @@ +package hdfs + +import ( + "os" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestListXAttrs(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/xattributes") + touch(t, "/_test/xattributes") + + err := client.SetXAttr("/_test/xattributes", "user.foo", "baz") + require.NoError(t, err) + + err = client.SetXAttr("/_test/xattributes", "user.bar", "qux") + require.NoError(t, err) + + xattrs, err := client.ListXAttrs("/_test/xattributes") + require.NoError(t, err) + + assert.Equal(t, 2, len(xattrs)) + assert.Equal(t, "baz", xattrs["user.foo"]) + assert.Equal(t, "qux", xattrs["user.bar"]) +} + +func TestListXAttrsNonexistent(t *testing.T) { + client := getClient(t) + + xattrs, err := client.ListXAttrs("/_test/nonexistent") + assertPathError(t, err, "list xattrs", "/_test/nonexistent", os.ErrNotExist) + assert.Nil(t, xattrs) +} + +func TestListXAttrsEmpty(t *testing.T) { + client := getClient(t) + + touch(t, "/_test/emptyfile") + + xattrs, err := client.ListXAttrs("/_test/emptyfile") + require.NoError(t, err) + assert.Equal(t, 0, len(xattrs)) +} + +func TestListXAttrsDir(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/xattributesdir") + mkdirp(t, "/_test/xattributesdir") + + err := client.SetXAttr("/_test/xattributes", "user.foo", "baz") + require.NoError(t, err) + + err = client.SetXAttr("/_test/xattributes", "user.bar", "qux") + require.NoError(t, err) + + xattrs, err := client.ListXAttrs("/_test/xattributes") + require.NoError(t, err) + + assert.Equal(t, 2, len(xattrs)) + assert.Equal(t, "baz", xattrs["user.foo"]) + assert.Equal(t, "qux", xattrs["user.bar"]) +} + +func TestListXAttrsWithoutPermission(t *testing.T) { + client2 := getClientForUser(t, "gohdfs2") + + baleet(t, "/_test/accessdenied") + mkdirpMask(t, "/_test/accessdenied", 0700) + + _, err := client2.ListXAttrs("/_test/accessdenied") + assertPathError(t, err, "list xattrs", "/_test/accessdenied", os.ErrPermission) +} + +func TestGetXAttrs(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/xattributes") + touch(t, "/_test/xattributes") + + err := client.SetXAttr("/_test/xattributes", "user.foo", "baz") + require.NoError(t, err) + + err = client.SetXAttr("/_test/xattributes", "user.bar", "qux") + require.NoError(t, err) + + xattrs, err := client.GetXAttrs("/_test/xattributes", "user.foo", "user.bar") + require.NoError(t, err) + + assert.Equal(t, 2, len(xattrs)) + assert.Equal(t, "baz", xattrs["user.foo"]) + assert.Equal(t, "qux", xattrs["user.bar"]) +} + +func TestGetXAttrsNonexistent(t *testing.T) { + client := getClient(t) + + xattrs, err := client.GetXAttrs("/_test/nonexistent", "user.foo") + assertPathError(t, err, "get xattrs", "/_test/nonexistent", os.ErrNotExist) + assert.Nil(t, xattrs) +} + +func TestGetXAttrsEmpty(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/xattributes") + touch(t, "/_test/xattributes") + + xattrs, err := client.GetXAttrs("/_test/xattributes") + require.NoError(t, err) + assert.Equal(t, 0, len(xattrs)) +} + +func TestGetXAttrsNoKeys(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/xattributes") + touch(t, "/_test/xattributes") + + err := client.SetXAttr("/_test/xattributes", "user.foo", "bar") + require.NoError(t, err) + + xattrs, err := client.GetXAttrs("/_test/xattributes") + require.NoError(t, err) + assert.Equal(t, 0, len(xattrs)) +} + +func TestGetXAttrsNonexistentKeys(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/xattributes") + touch(t, "/_test/xattributes") + + err := client.SetXAttr("/_test/xattributes", "user.foo", "bar") + require.NoError(t, err) + + xattrs, err := client.GetXAttrs("/_test/xattributes", "user.baz") + assertPathError(t, err, "get xattrs", "/_test/xattributes", errXAttrKeysNotFound) + assert.Nil(t, xattrs) +} + +func TestGetXAttrsWithoutPermission(t *testing.T) { + client2 := getClientForUser(t, "gohdfs2") + + baleet(t, "/_test/accessdenied") + mkdirpMask(t, "/_test/accessdenied", 0700) + + _, err := client2.GetXAttrs("/_test/accessdenied", "user.foo") + assertPathError(t, err, "get xattrs", "/_test/accessdenied", os.ErrPermission) +} + +func TestGetXAttrsTrusted(t *testing.T) { + client := getClient(t) + + xattrs, err := client.GetXAttrs("/_test/xattributes", "trusted.foo") + assertPathError(t, err, "get xattrs", "/_test/xattributes", os.ErrPermission) + assert.Nil(t, xattrs) +} + +func TestSetXAttrNonexistent(t *testing.T) { + client := getClient(t) + + err := client.SetXAttr("/_test/nonexistent", "user.foo", "baz") + assertPathError(t, err, "set xattr", "/_test/nonexistent", os.ErrNotExist) +} + +func TestSetXAttrWithoutPermission(t *testing.T) { + client2 := getClientForUser(t, "gohdfs2") + + baleet(t, "/_test/accessdenied") + mkdirpMask(t, "/_test/accessdenied", 0700) + + err := client2.SetXAttr("/_test/accessdenied", "user.foo", "baz") + assertPathError(t, err, "set xattr", "/_test/accessdenied", os.ErrPermission) +} + +func TestSetXAttrsTrusted(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/xattributes") + touch(t, "/_test/xattributes") + + err := client.SetXAttr("/_test/xattributes", "trusted.foo", "alert") + assertPathError(t, err, "set xattr", "/_test/xattributes", os.ErrPermission) +} + +func TestRemoveXAttrs(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/xattributes") + touch(t, "/_test/xattributes") + + err := client.SetXAttr("/_test/xattributes", "user.foo", "baz") + require.NoError(t, err) + + err = client.SetXAttr("/_test/xattributes", "user.bar", "qux") + require.NoError(t, err) + + xattrs, err := client.ListXAttrs("/_test/xattributes") + require.NoError(t, err) + + assert.Equal(t, 2, len(xattrs)) + assert.Equal(t, "baz", xattrs["user.foo"]) + assert.Equal(t, "qux", xattrs["user.bar"]) + + err = client.RemoveXAttr("/_test/xattributes", "user.bar") + require.NoError(t, err) + + xattrs, err = client.ListXAttrs("/_test/xattributes") + require.NoError(t, err) + + assert.Equal(t, 1, len(xattrs)) + assert.Equal(t, "baz", xattrs["user.foo"]) +} + +func TestRemoveXAttrsNonexistent(t *testing.T) { + client := getClient(t) + + err := client.RemoveXAttr("/_test/nonexistent", "user.foo") + assertPathError(t, err, "remove xattr", "/_test/nonexistent", os.ErrNotExist) +} + +func TestRemoveXAttrsEmpty(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/xattributes") + touch(t, "/_test/xattributes") + + err := client.RemoveXAttr("/_test/xattributes", "user.foo") + assertPathError(t, err, "remove xattr", "/_test/xattributes", errXAttrKeysNotFound) +} + +func TestRemoveXAttrsNoMatchingKey(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/xattributes") + touch(t, "/_test/xattributes") + + err := client.SetXAttr("/_test/xattributes", "user.foo", "baz") + require.NoError(t, err) + + err = client.RemoveXAttr("/_test/xattributes", "user.bar") + assertPathError(t, err, "remove xattr", "/_test/xattributes", errXAttrKeysNotFound) +} + +func TestRemoveXAttrsWithoutPermission(t *testing.T) { + client := getClient(t) + client2 := getClientForUser(t, "gohdfs2") + + baleet(t, "/_test/accessdenied") + mkdirpMask(t, "/_test/accessdenied", 0700) + + err := client.SetXAttr("/_test/xattributes", "user.foo", "baz") + require.NoError(t, err) + + err = client2.RemoveXAttr("/_test/accessdenied", "user.foo") + assertPathError(t, err, "remove xattr", "/_test/accessdenied", os.ErrPermission) +} + +func TestRemoveXAttrsTrusted(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/xattributes") + touch(t, "/_test/xattributes") + + err := client.RemoveXAttr("/_test/xattributes", "trusted.foo") + assertPathError(t, err, "remove xattr", "/_test/xattributes", os.ErrPermission) +} From 83490d5155e7e31b068e26457c44fe0ebbeb61c0 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 18 Jul 2020 01:31:40 +1000 Subject: [PATCH 088/159] Skip an XAttr test that doesn't work under HDP2 The issue seems to be external to this library. --- xattr_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xattr_test.go b/xattr_test.go index f1b4c446..5217134f 100644 --- a/xattr_test.go +++ b/xattr_test.go @@ -67,10 +67,13 @@ func TestListXAttrsDir(t *testing.T) { } func TestListXAttrsWithoutPermission(t *testing.T) { + // HDP 2.6.x doesn't seem to throw an error for this one. + t.Skip() + client2 := getClientForUser(t, "gohdfs2") baleet(t, "/_test/accessdenied") - mkdirpMask(t, "/_test/accessdenied", 0700) + touchMask(t, "/_test/accessdenied", 0700) _, err := client2.ListXAttrs("/_test/accessdenied") assertPathError(t, err, "list xattrs", "/_test/accessdenied", os.ErrPermission) From 661bf19dd391793326887ed43e1cae3272bc9338 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 18 Jul 2020 06:12:49 +0300 Subject: [PATCH 089/159] Handle an edge case or two in readPrefixedMessage --- internal/rpc/rpc.go | 6 +++--- internal/transfer/digest_md5_test.go | 15 ++++++++------- internal/transfer/transfer.go | 23 ++++++++++++++++++----- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/internal/rpc/rpc.go b/internal/rpc/rpc.go index 2cbe36e3..2ea8eed5 100644 --- a/internal/rpc/rpc.go +++ b/internal/rpc/rpc.go @@ -12,7 +12,7 @@ import ( "github.com/golang/protobuf/proto" ) -var errMalformedRPCMessage = errors.New("malformed RPC message") +var errInvalidResponse = errors.New("invalid response from namenode") // Used for client ID generation, below. const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" @@ -79,7 +79,7 @@ func readRPCPacket(r io.Reader, msgs ...proto.Message) error { msgLength, n := binary.Uvarint(packet) if n <= 0 || msgLength > uint64(len(packet)) { - return errMalformedRPCMessage + return errInvalidResponse } packet = packet[n:] @@ -94,7 +94,7 @@ func readRPCPacket(r io.Reader, msgs ...proto.Message) error { } if len(packet) > 0 { - return errMalformedRPCMessage + return errInvalidResponse } return nil diff --git a/internal/transfer/digest_md5_test.go b/internal/transfer/digest_md5_test.go index 3ae744fd..93f75d08 100644 --- a/internal/transfer/digest_md5_test.go +++ b/internal/transfer/digest_md5_test.go @@ -1,7 +1,6 @@ package transfer import ( - "bytes" "encoding/binary" "net" "testing" @@ -104,11 +103,13 @@ func TestDigestMD5Conn(t *testing.T) { d := binary.BigEndian.Uint32(b[:4]) assert.Equal(t, uint32(0xDEADBEEF), d) - server.SetReadDeadline(time.Now().Add(100 * time.Millisecond)) - msg := &hdfs.DataTransferEncryptorMessageProto{} - err = readPrefixedMessage(bytes.NewReader(b[4:]), msg) - require.NoError(t, err) - assert.Equal(t, hdfs.DataTransferEncryptorMessageProto_SUCCESS.Enum(), msg.Status) + // In practice, this chokes since the client sends an empty message with + // the handshake initialization. + // server.SetReadDeadline(time.Now().Add(100 * time.Millisecond)) + // msg := &hdfs.DataTransferEncryptorMessageProto{} + // err = readPrefixedMessage(bytes.NewReader(b[4:]), msg) + // require.NoError(t, err) + // assert.Equal(t, hdfs.DataTransferEncryptorMessageProto_SUCCESS.Enum(), msg.Status) // the server then responds with the initial challenge resp := &hdfs.DataTransferEncryptorMessageProto{} @@ -122,7 +123,7 @@ func TestDigestMD5Conn(t *testing.T) { require.NoError(t, err) server.SetReadDeadline(time.Now().Add(100 * time.Millisecond)) - msg = &hdfs.DataTransferEncryptorMessageProto{} + msg := &hdfs.DataTransferEncryptorMessageProto{} err = readPrefixedMessage(server, msg) require.NoError(t, err) diff --git a/internal/transfer/transfer.go b/internal/transfer/transfer.go index d6f30952..a29bb4f5 100644 --- a/internal/transfer/transfer.go +++ b/internal/transfer/transfer.go @@ -3,6 +3,7 @@ package transfer import ( "encoding/binary" + "errors" "fmt" "io" @@ -17,6 +18,8 @@ const ( checksumBlockOp = 0x55 ) +var errInvalidResponse = errors.New("invalid response from datanode") + func makePrefixedMessage(msg proto.Message) ([]byte, error) { msgBytes, err := proto.Marshal(msg) if err != nil { @@ -30,21 +33,31 @@ func makePrefixedMessage(msg proto.Message) ([]byte, error) { func readPrefixedMessage(r io.Reader, msg proto.Message) error { varintBytes := make([]byte, binary.MaxVarintLen32) - _, err := io.ReadAtLeast(r, varintBytes, binary.MaxVarintLen32) - if err != nil { + n, err := io.ReadAtLeast(r, varintBytes, binary.MaxVarintLen32) + if err == io.EOF { + return io.ErrUnexpectedEOF + } else if err != nil { return err } respLength, varintLength := binary.Uvarint(varintBytes) - if varintLength < 1 { - return io.ErrUnexpectedEOF + + // The latter case happens if the datanode sent us an empty message, and + // it we read too many bytes from the conn (i.e., we read bytes from the + // next message). Since we can't put them back in the pipe, this is + // irreperable. We could avoid this by reading one byte at a time until we + // have a varint, but in practice this shouldn't happen anyway. + if varintLength < 1 || varintLength+int(respLength) < n { + return errInvalidResponse } // We may have grabbed too many bytes when reading the varint. respBytes := make([]byte, respLength) extraLength := copy(respBytes, varintBytes[varintLength:]) _, err = io.ReadFull(r, respBytes[extraLength:]) - if err != nil { + if err == io.EOF { + return io.ErrUnexpectedEOF + } else if err != nil { return err } From 1f2d345fdaaa23bc1bf546427e831893d1149fd7 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 18 Jul 2020 15:58:32 +0200 Subject: [PATCH 090/159] Convert key id for sasl negotiation to int32 before presenting The namenode gives us a uint32, but the datanode expects an int32. Because hadoop. --- internal/transfer/sasl_dialer.go | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/internal/transfer/sasl_dialer.go b/internal/transfer/sasl_dialer.go index cb3fcac4..d4fc553f 100644 --- a/internal/transfer/sasl_dialer.go +++ b/internal/transfer/sasl_dialer.go @@ -1,12 +1,10 @@ package transfer import ( - "bytes" "context" "encoding/base64" "errors" "fmt" - "math" "net" "github.com/golang/protobuf/proto" @@ -66,17 +64,14 @@ func (d *SaslDialer) wrapDatanodeConn(conn net.Conn) (net.Conn, error) { // If the server defaults have EncryptDataTransfer set but the encryption // key is empty, the namenode doesn't want us to encrypt the block token. if d.Key != nil && len(d.Key.Nonce) > 0 { - buf := new(bytes.Buffer) - - nonceBase64Len := int(math.Ceil(4 * (float64(len(d.Key.GetNonce())) / 3))) - buf.Grow(6 + nonceBase64Len + len(d.Key.GetBlockPoolId())) - buf.WriteString( - fmt.Sprintf("%d %s %s", - d.Key.GetKeyId(), - d.Key.GetBlockPoolId(), - base64.StdEncoding.EncodeToString(d.Key.Nonce))) - - ourToken.Identifier = buf.Bytes() + // Amusingly, this is unsigned in the proto struct but is expected + // to be signed here. + keyId := int32(d.Key.GetKeyId()) + + ourToken.Identifier = []byte(fmt.Sprintf("%d %s %s", + keyId, + d.Key.GetBlockPoolId(), + base64.StdEncoding.EncodeToString(d.Key.Nonce))) ourToken.Password = d.Key.EncryptionKey } else { ourToken.Identifier = make([]byte, From f6c88c16a4a415c3968ec2db051f1db72d61c3f0 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 18 Jul 2020 15:59:23 +0200 Subject: [PATCH 091/159] cat hdfs logs after failed test runs --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 578fbfbb..b2f2a49f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,7 @@ before_script: - export HADOOP_CONF_DIR="/etc/hadoop/conf" - find internal/protocol -name *.pb.go | xargs touch # so make doesn't try to regen protobuf files script: make test +after_failure: find /var/log/hadoop-hdfs | xargs cat before_deploy: make release deploy: skip_cleanup: true From c76e3b4fa6ae93f6b91095a992d3ea7f6ed12ac8 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 18 Jul 2020 16:00:37 +0200 Subject: [PATCH 092/159] Shorten comment --- fixtures.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fixtures.sh b/fixtures.sh index 064c51ab..cde6ff82 100755 --- a/fixtures.sh +++ b/fixtures.sh @@ -1,7 +1,6 @@ set -e -# jdk11 is missing some APIs that the older jars here rely on -# so point at openjdk8 for now +# Hadoop still requires java8. export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 HADOOP_FS=${HADOOP_FS-"hadoop fs"} From 413b170cab021a5b3a4d161339de52828c750570 Mon Sep 17 00:00:00 2001 From: kimtree Date: Tue, 28 Jul 2020 21:01:44 +0900 Subject: [PATCH 093/159] Upgrade gokrb to v8.4.1 --- client.go | 3 +- client_test.go | 8 +++--- cmd/hdfs/kerberos.go | 8 +++--- go.mod | 13 ++------- go.sum | 52 ++++++++++++++++++++++------------ internal/rpc/kerberos.go | 9 +++--- internal/rpc/namenode.go | 2 +- internal/rpc/sasl_transport.go | 8 +++--- 8 files changed, 54 insertions(+), 49 deletions(-) diff --git a/client.go b/client.go index 70fd97b8..e05abef7 100644 --- a/client.go +++ b/client.go @@ -11,13 +11,12 @@ import ( "sort" "strings" - krb "gopkg.in/jcmturner/gokrb5.v7/client" - "github.com/colinmarc/hdfs/v2/hadoopconf" hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/v2/internal/rpc" "github.com/colinmarc/hdfs/v2/internal/transfer" + krb "github.com/jcmturner/gokrb5/v8/client" ) type dialContext func(ctx context.Context, network, addr string) (net.Conn, error) diff --git a/client_test.go b/client_test.go index 3966f0f4..060ec63b 100644 --- a/client_test.go +++ b/client_test.go @@ -9,11 +9,11 @@ import ( "testing" "github.com/colinmarc/hdfs/v2/hadoopconf" + krb "github.com/jcmturner/gokrb5/v8/client" + "github.com/jcmturner/gokrb5/v8/config" + "github.com/jcmturner/gokrb5/v8/credentials" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - krb "gopkg.in/jcmturner/gokrb5.v7/client" - "gopkg.in/jcmturner/gokrb5.v7/config" - "gopkg.in/jcmturner/gokrb5.v7/credentials" ) var cachedClients = make(map[string]*Client) @@ -75,7 +75,7 @@ func getKerberosClient(t *testing.T, username string) *krb.Client { t.Skipf("Couldn't load keytab for user %s: %s", username, err) } - client, err := krb.NewClientFromCCache(ccache, cfg) + client, err := krb.NewFromCCache(ccache, cfg) if err != nil { t.Fatal("Couldn't initialize krb client:", err) } diff --git a/cmd/hdfs/kerberos.go b/cmd/hdfs/kerberos.go index 6bbcb545..438890a3 100644 --- a/cmd/hdfs/kerberos.go +++ b/cmd/hdfs/kerberos.go @@ -6,9 +6,9 @@ import ( "os/user" "strings" - krb "gopkg.in/jcmturner/gokrb5.v7/client" - "gopkg.in/jcmturner/gokrb5.v7/config" - "gopkg.in/jcmturner/gokrb5.v7/credentials" + krb "github.com/jcmturner/gokrb5/v8/client" + "github.com/jcmturner/gokrb5/v8/config" + "github.com/jcmturner/gokrb5/v8/credentials" ) // TODO: Write a kerberos_windows.go and move this to kerberos_unix.go. This @@ -48,7 +48,7 @@ func getKerberosClient() (*krb.Client, error) { return nil, err } - client, err := krb.NewClientFromCCache(ccache, cfg) + client, err := krb.NewFromCCache(ccache, cfg) if err != nil { return nil, err } diff --git a/go.mod b/go.mod index b548297d..f23d433b 100644 --- a/go.mod +++ b/go.mod @@ -1,20 +1,11 @@ module github.com/colinmarc/hdfs/v2 require ( - github.com/davecgh/go-spew v1.1.0 // indirect github.com/golang/protobuf v1.1.0 - github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036 // indirect - github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.1 github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117 - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.2.2 - golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb // indirect + github.com/stretchr/testify v1.4.0 golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect - gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect - gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect - gopkg.in/jcmturner/goidentity.v3 v3.0.0 // indirect - gopkg.in/jcmturner/gokrb5.v7 v7.3.0 - gopkg.in/jcmturner/rpc.v1 v1.1.0 // indirect ) go 1.13 diff --git a/go.sum b/go.sum index 4a0f8abf..26098810 100644 --- a/go.sum +++ b/go.sum @@ -2,27 +2,43 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/protobuf v1.1.0 h1:0iH4Ffd/meGoXqF2lSAhZHt8X+cPgkfn/cb6Cce5Vpc= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036 h1:d8T6WIONl4rMCPcQ/eY3uSz3+e4/GaoflKjXrWMex1U= -github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930 h1:v4CYlQ+HeysPHsr2QFiEO60gKqnvn1xwvuKhhAhuEkk= -github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYbQ= +github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= +github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= +github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= +github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= +github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= +github.com/jcmturner/gokrb5/v8 v8.4.1 h1:IGSJfqBzMS6TA0oJ7DxXdyzPK563QHa8T2IqER2ggyQ= +github.com/jcmturner/gokrb5/v8 v8.4.1/go.mod h1:T1hnNppQsBtxW0tCHMHTkAt8n/sABdzZgZdoFrZaZNM= +github.com/jcmturner/rpc/v2 v2.0.2 h1:gMB4IwRXYsWw4Bc6o/az2HJgFUA1ffSh90i26ZJ6Xl0= +github.com/jcmturner/rpc/v2 v2.0.2/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117 h1:7822vZ646Atgxkp3tqrSufChvAAYgIy+iFEGpQntwlI= github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb h1:Ah9YqXLj6fEgeKqcmBuLCbAsrF3ScD7dJ/bYM0C6tXI= -golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg= +golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= -gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= -gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= -gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= -gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI= -gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= -gopkg.in/jcmturner/gokrb5.v7 v7.3.0 h1:0709Jtq/6QXEuWRfAm260XqlpcwL1vxtO1tUE2qK8Z4= -gopkg.in/jcmturner/gokrb5.v7 v7.3.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= -gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU= -gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/rpc/kerberos.go b/internal/rpc/kerberos.go index d41f9a49..f1ea1a12 100644 --- a/internal/rpc/kerberos.go +++ b/internal/rpc/kerberos.go @@ -6,13 +6,12 @@ import ( "net" "regexp" - "gopkg.in/jcmturner/gokrb5.v7/gssapi" - "gopkg.in/jcmturner/gokrb5.v7/iana/keyusage" - "gopkg.in/jcmturner/gokrb5.v7/spnego" - krbtypes "gopkg.in/jcmturner/gokrb5.v7/types" - hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" "github.com/colinmarc/hdfs/v2/internal/sasl" + "github.com/jcmturner/gokrb5/v8/gssapi" + "github.com/jcmturner/gokrb5/v8/iana/keyusage" + "github.com/jcmturner/gokrb5/v8/spnego" + krbtypes "github.com/jcmturner/gokrb5/v8/types" ) const saslRpcCallId = -33 diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index c5767f2a..708d92d4 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -11,7 +11,7 @@ import ( hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/golang/protobuf/proto" - krb "gopkg.in/jcmturner/gokrb5.v7/client" + krb "github.com/jcmturner/gokrb5/v8/client" ) const ( diff --git a/internal/rpc/sasl_transport.go b/internal/rpc/sasl_transport.go index d1c7c90b..560037a0 100644 --- a/internal/rpc/sasl_transport.go +++ b/internal/rpc/sasl_transport.go @@ -7,10 +7,10 @@ import ( hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" "github.com/golang/protobuf/proto" - "gopkg.in/jcmturner/gokrb5.v7/crypto" - "gopkg.in/jcmturner/gokrb5.v7/gssapi" - "gopkg.in/jcmturner/gokrb5.v7/iana/keyusage" - krbtypes "gopkg.in/jcmturner/gokrb5.v7/types" + "github.com/jcmturner/gokrb5/v8/crypto" + "github.com/jcmturner/gokrb5/v8/gssapi" + "github.com/jcmturner/gokrb5/v8/iana/keyusage" + krbtypes "github.com/jcmturner/gokrb5/v8/types" ) // saslTransport implements encrypted or signed RPC. From 9a6156e161288c956ce1d890cda9e6c97c67d065 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 29 Jul 2020 22:47:08 +0200 Subject: [PATCH 094/159] Accept multiple QOPs in SASL challenges --- internal/rpc/kerberos.go | 5 +++-- internal/sasl/challenge.go | 9 +++++++-- internal/transfer/digest_md5.go | 6 +++--- internal/transfer/digest_md5_test.go | 2 +- internal/transfer/sasl_dialer.go | 2 +- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/internal/rpc/kerberos.go b/internal/rpc/kerberos.go index f1ea1a12..d505536b 100644 --- a/internal/rpc/kerberos.go +++ b/internal/rpc/kerberos.go @@ -62,7 +62,8 @@ func (c *NamenodeConnection) doKerberosHandshake() error { return err } - switch challenge.Qop { + qop := challenge.Qop[0] + switch qop { case sasl.QopPrivacy, sasl.QopIntegrity: // Switch to SASL RPC handler c.transport = &saslTransport{ @@ -70,7 +71,7 @@ func (c *NamenodeConnection) doKerberosHandshake() error { clientID: c.ClientID, }, sessionKey: sessionKey, - privacy: challenge.Qop == sasl.QopPrivacy, + privacy: qop == sasl.QopPrivacy, } case sasl.QopAuthentication: // No special transport is required. diff --git a/internal/sasl/challenge.go b/internal/sasl/challenge.go index 8ed02f9e..3dd4fea2 100644 --- a/internal/sasl/challenge.go +++ b/internal/sasl/challenge.go @@ -1,6 +1,7 @@ package sasl import ( + "errors" "fmt" "regexp" "strings" @@ -24,7 +25,7 @@ var challengeRegexp = regexp.MustCompile(",?([a-zA-Z0-9]+)=(\"([^\"]+)\"|([^,]+) type Challenge struct { Realm string Nonce string - Qop string + Qop []string Charset string Cipher []string Algorithm string @@ -47,7 +48,7 @@ func ParseChallenge(challenge []byte) (*Challenge, error) { case "nonce": ch.Nonce = val case "qop": - ch.Qop = val + ch.Qop = strings.Split(val, ",") case "charset": ch.Charset = val case "cipher": @@ -58,5 +59,9 @@ func ParseChallenge(challenge []byte) (*Challenge, error) { } } + if len(ch.Qop) == 0 { + return nil, errors.New("invalid token challenge: no selected QOP") + } + return &ch, nil } diff --git a/internal/transfer/digest_md5.go b/internal/transfer/digest_md5.go index 2aad236b..c7b6b220 100644 --- a/internal/transfer/digest_md5.go +++ b/internal/transfer/digest_md5.go @@ -59,7 +59,7 @@ func (d *digestMD5Handshake) challengeStep1(challenge []byte) ([]byte, error) { rspdigest := d.compute(true) ret := fmt.Sprintf(`username="%s", realm="%s", nonce="%s", cnonce="%s", nc=%08x, qop=%s, digest-uri="%s/%s", response=%s, charset=utf-8`, - d.authID, d.token.Realm, d.token.Nonce, d.cnonce, 1, d.token.Qop, d.service, d.hostname, rspdigest) + d.authID, d.token.Realm, d.token.Nonce, d.cnonce, 1, d.token.Qop[0], d.service, d.hostname, rspdigest) if d.cipher != "" { ret += ", cipher=" + d.cipher @@ -114,7 +114,7 @@ func (d *digestMD5Handshake) compute(initial bool) string { d.token.Nonce, fmt.Sprintf("%08x", 1), d.cnonce, - d.token.Qop, + d.token.Qop[0], hex.EncodeToString(h(d.a2(initial))), }, ":") return hex.EncodeToString(kd(x, y)) @@ -138,7 +138,7 @@ func (d *digestMD5Handshake) a2(initial bool) string { a2 = ":" + digestURI } - if d.token.Qop == sasl.QopPrivacy || d.token.Qop == sasl.QopIntegrity { + if d.token.Qop[0] == sasl.QopPrivacy || d.token.Qop[0] == sasl.QopIntegrity { a2 = a2 + ":00000000000000000000000000000000" } diff --git a/internal/transfer/digest_md5_test.go b/internal/transfer/digest_md5_test.go index 93f75d08..a67d5fa4 100644 --- a/internal/transfer/digest_md5_test.go +++ b/internal/transfer/digest_md5_test.go @@ -51,7 +51,7 @@ func TestMD5DigestRspAuth(t *testing.T) { Algorithm: "md5-sess", Charset: "utf-8", Nonce: "OA6MG9tEQGm2hh", - Qop: sasl.QopAuthentication, + Qop: []string{sasl.QopAuthentication}, Realm: "elwood.innosoft.com", } dgst.cnonce = "OA6MHXh6VqTrRk" diff --git a/internal/transfer/sasl_dialer.go b/internal/transfer/sasl_dialer.go index d4fc553f..152a1872 100644 --- a/internal/transfer/sasl_dialer.go +++ b/internal/transfer/sasl_dialer.go @@ -115,7 +115,7 @@ func (d *SaslDialer) wrapDatanodeConn(conn net.Conn) (net.Conn, error) { // Use the server's QOP unless one was specified in the local configuration. privacy := false integrity := false - switch dgst.token.Qop { + switch dgst.token.Qop[0] { case sasl.QopPrivacy: privacy = true integrity = true From 9d3a88fd23f3e2d739bd8e890979d372129f9586 Mon Sep 17 00:00:00 2001 From: kimtree Date: Thu, 10 Sep 2020 16:45:28 +0900 Subject: [PATCH 095/159] Fixes typo --- client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index e05abef7..5ef73652 100644 --- a/client.go +++ b/client.go @@ -64,14 +64,14 @@ type ClientOptions struct { // datanodes via hostname (which is useful in multi-homed setups) or IP // address, which may be required if DNS isn't available. UseDatanodeHostname bool - // NamenodeDialFunc is used to connect to the datanodes. If nil, then + // NamenodeDialFunc is used to connect to the namenodes. If nil, then // (&net.Dialer{}).DialContext is used. NamenodeDialFunc func(ctx context.Context, network, addr string) (net.Conn, error) // DatanodeDialFunc is used to connect to the datanodes. If nil, then // (&net.Dialer{}).DialContext is used. DatanodeDialFunc func(ctx context.Context, network, addr string) (net.Conn, error) // KerberosClient is used to connect to kerberized HDFS clusters. If provided, - // the client will always mutually athenticate when connecting to the + // the client will always mutually authenticate when connecting to the // namenode(s). KerberosClient *krb.Client // KerberosServicePrincipleName specifies the Service Principle Name From 8ec027601b665d03409342e3c942319b7f6ccebd Mon Sep 17 00:00:00 2001 From: vasayxtx Date: Wed, 28 Oct 2020 18:24:16 +0300 Subject: [PATCH 096/159] Fix typo in comments --- internal/rpc/namenode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index 708d92d4..db9d63f9 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -61,7 +61,7 @@ type NamenodeConnectionOptions struct { // unless kerberos authentication is enabled, in which case it will be // determined from the provided credentials if empty. User string - // DialFunc is used to connect to the datanodes. If nil, then + // DialFunc is used to connect to the namenodes. If nil, then // (&net.Dialer{}).DialContext is used. DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) // KerberosClient is used to connect to kerberized HDFS clusters. If provided, From c670274b9f63a12c3b08f5011b54e2bffb4fca46 Mon Sep 17 00:00:00 2001 From: vasayxtx Date: Wed, 28 Oct 2020 18:09:04 +0300 Subject: [PATCH 097/159] Allow to get an unique name of the client --- client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client.go b/client.go index 5ef73652..2da7ebed 100644 --- a/client.go +++ b/client.go @@ -235,6 +235,12 @@ func (c *Client) User() string { return c.namenode.User } +// Name returns the unique name that the Client uses in communication +// with namenodes and datanodes. +func (c *Client) Name() string { + return c.namenode.ClientName +} + // ReadFile reads the file named by filename and returns the contents. func (c *Client) ReadFile(filename string) ([]byte, error) { f, err := c.Open(filename) From b2bcdb85539bbe670509010e11ae8bd32b2db26f Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 30 Dec 2020 12:02:08 +0100 Subject: [PATCH 098/159] Uppercase exception name --- error.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/error.go b/error.go index da919d10..c0a4c89c 100644 --- a/error.go +++ b/error.go @@ -9,7 +9,7 @@ const ( fileNotFoundException = "java.io.FileNotFoundException" permissionDeniedException = "org.apache.hadoop.security.AccessControlException" pathIsNotEmptyDirException = "org.apache.hadoop.fs.PathIsNotEmptyDirectoryException" - fileAlreadyExistsException = "org.apache.hadoop.fs.fileAlreadyExistsException" + fileAlreadyExistsException = "org.apache.hadoop.fs.FileAlreadyExistsException" ) // Error represents a remote java exception from an HDFS namenode or datanode. From f2f512db170db82ad41590c4ba3b7718b13317d2 Mon Sep 17 00:00:00 2001 From: vasayxtx Date: Sun, 15 Nov 2020 17:52:52 +0300 Subject: [PATCH 099/159] Process AlreadyBeingCreatedException HDFS error as os.ErrExist on Create() --- error.go | 17 +++++++++++++---- file_writer.go | 2 +- file_writer_test.go | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/error.go b/error.go index c0a4c89c..0faadcf2 100644 --- a/error.go +++ b/error.go @@ -6,10 +6,11 @@ import ( ) const ( - fileNotFoundException = "java.io.FileNotFoundException" - permissionDeniedException = "org.apache.hadoop.security.AccessControlException" - pathIsNotEmptyDirException = "org.apache.hadoop.fs.PathIsNotEmptyDirectoryException" - fileAlreadyExistsException = "org.apache.hadoop.fs.FileAlreadyExistsException" + fileNotFoundException = "java.io.FileNotFoundException" + permissionDeniedException = "org.apache.hadoop.security.AccessControlException" + pathIsNotEmptyDirException = "org.apache.hadoop.fs.PathIsNotEmptyDirectoryException" + fileAlreadyExistsException = "org.apache.hadoop.fs.FileAlreadyExistsException" + alreadyBeingCreatedException = "org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException" ) // Error represents a remote java exception from an HDFS namenode or datanode. @@ -26,6 +27,14 @@ type Error interface { Message() string } +func interpretCreateException(err error) error { + if remoteErr, ok := err.(Error); ok && remoteErr.Exception() == alreadyBeingCreatedException { + return os.ErrExist + } + + return interpretException(err) +} + func interpretException(err error) error { var exception string if remoteErr, ok := err.(Error); ok { diff --git a/file_writer.go b/file_writer.go index b5518312..6b609f4a 100644 --- a/file_writer.go +++ b/file_writer.go @@ -66,7 +66,7 @@ func (c *Client) CreateFile(name string, replication int, blockSize int64, perm err := c.namenode.Execute("create", createReq, createResp) if err != nil { - return nil, &os.PathError{"create", name, interpretException(err)} + return nil, &os.PathError{"create", name, interpretCreateException(err)} } return &FileWriter{ diff --git a/file_writer_test.go b/file_writer_test.go index 222e7fdf..b55f5f1d 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "math/rand" "os" + "path/filepath" "strings" "testing" "time" @@ -270,6 +271,40 @@ func TestCreateEmptyFile(t *testing.T) { assertPathError(t, err, "create", "/_test/emptyfile", os.ErrExist) } +func TestCreateFileAlreadyExistsException(t *testing.T) { + const filePath = "/_test/create/already_exists.txt" + + baleet(t, "/_test/create/being_created_file") + mkdirp(t, filepath.Dir(filePath)) + + client := getClient(t) + + f, err := client.CreateFile(filePath, 1, 1048576, 0755) + require.NoError(t, err) + require.NoError(t, f.Close()) + + _, err = client.CreateFile(filePath, 1, 1048576, 0755) + assertPathError(t, err, "create", filePath, os.ErrExist) // org.apache.hadoop.fs.FileAlreadyExistsException is received from HDFS +} + +func TestCreateFileAlreadyBeingCreatedException(t *testing.T) { + const filePath = "/_test/create/being_created.txt" + + baleet(t, "/_test/create/being_created_file") + mkdirp(t, filepath.Dir(filePath)) + + client := getClient(t) + + f, err := client.CreateFile(filePath, 1, 1048576, 0755) + require.NoError(t, err) + defer func() { + require.NoError(t, f.Close()) + }() + + _, err = client.CreateFile(filePath, 1, 1048576, 0755) + assertPathError(t, err, "create", filePath, os.ErrExist) // org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException is received from HDFS +} + func TestCreateEmptyFileWithoutParent(t *testing.T) { client := getClient(t) From f1a0ae264e1ab04f229ed4e9b8740203476a3bd2 Mon Sep 17 00:00:00 2001 From: kimtree Date: Tue, 2 Mar 2021 23:10:42 +0900 Subject: [PATCH 100/159] Add a feature to sort among qop values --- internal/sasl/challenge.go | 28 +++++++++++++++++++++++++++- internal/sasl/challenge_test.go | 18 ++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 internal/sasl/challenge_test.go diff --git a/internal/sasl/challenge.go b/internal/sasl/challenge.go index 3dd4fea2..cc3f1d40 100644 --- a/internal/sasl/challenge.go +++ b/internal/sasl/challenge.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "regexp" + "sort" "strings" ) @@ -20,12 +21,36 @@ const ( QopPrivacy = "auth-conf" ) +var qopPriority = map[string]int{ + QopPrivacy: 2, + QopIntegrity: 1, + QopAuthentication: 0, +} + +type Qops []string + +func (q Qops) Len() int { return len(q) } +func (q Qops) Less(i, j int) bool { + p1, ok := qopPriority[q[i]] + if !ok { + p1 = -1 + } + + p2, ok := qopPriority[q[j]] + if !ok { + p2 = -1 + } + + return p1 > p2 +} +func (q Qops) Swap(i, j int) { q[i], q[j] = q[j], q[i] } + var challengeRegexp = regexp.MustCompile(",?([a-zA-Z0-9]+)=(\"([^\"]+)\"|([^,]+)),?") type Challenge struct { Realm string Nonce string - Qop []string + Qop Qops Charset string Cipher []string Algorithm string @@ -49,6 +74,7 @@ func ParseChallenge(challenge []byte) (*Challenge, error) { ch.Nonce = val case "qop": ch.Qop = strings.Split(val, ",") + sort.Sort(ch.Qop) case "charset": ch.Charset = val case "cipher": diff --git a/internal/sasl/challenge_test.go b/internal/sasl/challenge_test.go new file mode 100644 index 00000000..0945c63f --- /dev/null +++ b/internal/sasl/challenge_test.go @@ -0,0 +1,18 @@ +package sasl + +import ( + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestSortQops(t *testing.T) { + allQops := Qops{QopAuthentication, QopIntegrity, QopPrivacy} + sort.Sort(allQops) + assert.Equal(t, Qops{QopPrivacy, QopIntegrity, QopAuthentication}, allQops) + + includeInvalidQops := Qops{QopAuthentication, QopPrivacy, "invalid"} + sort.Sort(includeInvalidQops) + assert.Equal(t, Qops{QopPrivacy, QopAuthentication, "invalid"}, includeInvalidQops) +} From 5574f534442a102a6af32aa8ec4a6ebc81315328 Mon Sep 17 00:00:00 2001 From: dotzero Date: Thu, 19 Aug 2021 15:36:13 +0300 Subject: [PATCH 101/159] Allow to put multiple nodes in cli --- cmd/hdfs/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go index dc7f0b47..b9106b81 100755 --- a/cmd/hdfs/main.go +++ b/cmd/hdfs/main.go @@ -6,6 +6,7 @@ import ( "net" "os" "os/user" + "strings" "time" "github.com/colinmarc/hdfs/v2" @@ -189,7 +190,7 @@ func getClient(namenode string) (*hdfs.Client, error) { options := hdfs.ClientOptionsFromConf(conf) if namenode != "" { - options.Addresses = []string{namenode} + options.Addresses = strings.Split(namenode, ",") } if options.Addresses == nil { From 4e989ad8ae789c64ccc38178129e2c238ede8f13 Mon Sep 17 00:00:00 2001 From: Mikhail Faraponov <11322032+moredure@users.noreply.github.com> Date: Mon, 18 Oct 2021 13:45:56 +0300 Subject: [PATCH 102/159] Update block_write_stream.go --- internal/transfer/block_write_stream.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/transfer/block_write_stream.go b/internal/transfer/block_write_stream.go index 9c9d208c..24c6e993 100644 --- a/internal/transfer/block_write_stream.go +++ b/internal/transfer/block_write_stream.go @@ -55,7 +55,7 @@ type blockWriteStream struct { offset int64 closed bool - packets chan outboundPacket + packets chan int seqno int ackError error @@ -163,7 +163,7 @@ func (s *blockWriteStream) finish() error { checksums: []byte{}, data: []byte{}, } - s.packets <- lastPacket + s.packets <- lastPacket.seqno err := s.writePacket(lastPacket) if err != nil { @@ -191,7 +191,7 @@ func (s *blockWriteStream) flush(force bool) error { for s.buf.Len() > 0 && (force || s.buf.Len() >= outboundPacketSize) { packet := s.makePacket() - s.packets <- packet + s.packets <- packet.seqno s.offset += int64(len(packet.data)) s.seqno++ @@ -285,7 +285,7 @@ Acks: } } - if seqno != p.seqno { + if seqno != p { s.ackError = ErrInvalidSeqno break Acks } From 9fdb16eb505127ec6736aa9734c553fd2bb71972 Mon Sep 17 00:00:00 2001 From: Mikhail Faraponov <11322032+moredure@users.noreply.github.com> Date: Mon, 18 Oct 2021 13:53:50 +0300 Subject: [PATCH 103/159] Update block_write_stream.go --- internal/transfer/block_write_stream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/transfer/block_write_stream.go b/internal/transfer/block_write_stream.go index 24c6e993..977c27fb 100644 --- a/internal/transfer/block_write_stream.go +++ b/internal/transfer/block_write_stream.go @@ -91,7 +91,7 @@ func newBlockWriteStream(conn io.ReadWriter, offset int64) *blockWriteStream { conn: conn, offset: offset, seqno: 1, - packets: make(chan outboundPacket, maxPacketsInQueue), + packets: make(chan int, maxPacketsInQueue), acksDone: make(chan struct{}), heartbeats: make(chan struct{}), } From 635417ec54027aa2fd31a5f22a29a2c285528107 Mon Sep 17 00:00:00 2001 From: Mikhail Faraponov <11322032+moredure@users.noreply.github.com> Date: Mon, 18 Oct 2021 14:05:53 +0300 Subject: [PATCH 104/159] Update block_write_stream.go --- internal/transfer/block_write_stream.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/transfer/block_write_stream.go b/internal/transfer/block_write_stream.go index 9c9d208c..4d2f6cf2 100644 --- a/internal/transfer/block_write_stream.go +++ b/internal/transfer/block_write_stream.go @@ -225,13 +225,9 @@ func (s *blockWriteStream) makePacket() outboundPacket { offset: s.offset, last: false, checksums: make([]byte, numChunks*4), - data: make([]byte, packetLength), + data: s.buf.Next(packetLength), } - // TODO: we shouldn't actually need this extra copy. We should also be able - // to "reuse" packets. - io.ReadFull(&s.buf, packet.data) - // Fill in the checksum for each chunk of data. for i := 0; i < numChunks; i++ { chunkOff := i * outboundChunkSize From 92f3a0976b59a1f880613ee64c31252958fa0727 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 2 Feb 2022 00:36:03 +0100 Subject: [PATCH 105/159] Migrate from travis to github actions --- .github/scripts/fixtures.sh | 7 ++ .github/scripts/install-bats.sh | 7 ++ .../scripts/install-hdfs.sh | 73 ++++++++---------- .github/workflows/tests.yml | 77 +++++++++++++++++++ .travis.yml | 42 ---------- Makefile | 6 +- cmd/hdfs/test/helper.bash | 7 +- fixtures.sh | 11 --- travis-setup-cdh5.sh | 76 ------------------ travis-setup-hdp2.sh | 51 ------------ travis-setup.sh | 22 ------ 11 files changed, 128 insertions(+), 251 deletions(-) create mode 100755 .github/scripts/fixtures.sh create mode 100755 .github/scripts/install-bats.sh rename travis-setup-cdh6.sh => .github/scripts/install-hdfs.sh (72%) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml delete mode 100755 fixtures.sh delete mode 100755 travis-setup-cdh5.sh delete mode 100755 travis-setup-hdp2.sh delete mode 100755 travis-setup.sh diff --git a/.github/scripts/fixtures.sh b/.github/scripts/fixtures.sh new file mode 100755 index 00000000..428b29d1 --- /dev/null +++ b/.github/scripts/fixtures.sh @@ -0,0 +1,7 @@ +set -e + +hadoop fs -mkdir -p "/_test" +hadoop fs -chmod 777 "/_test" + +hadoop fs -put ./testdata/foo.txt "/_test/foo.txt" +hadoop fs -Ddfs.block.size=1048576 -put ./testdata/mobydick.txt "/_test/mobydick.txt" diff --git a/.github/scripts/install-bats.sh b/.github/scripts/install-bats.sh new file mode 100755 index 00000000..d6eac80c --- /dev/null +++ b/.github/scripts/install-bats.sh @@ -0,0 +1,7 @@ +set -e + +git clone https://github.com/sstephenson/bats +mkdir -p bats/build +bats/install.sh bats/build + +echo "$(pwd)/bats/build/bin" >> $GITHUB_PATH \ No newline at end of file diff --git a/travis-setup-cdh6.sh b/.github/scripts/install-hdfs.sh similarity index 72% rename from travis-setup-cdh6.sh rename to .github/scripts/install-hdfs.sh index 55365024..189587e0 100755 --- a/travis-setup-cdh6.sh +++ b/.github/scripts/install-hdfs.sh @@ -15,32 +15,15 @@ else ENCRYPT_DATA_TRANSFER="false" fi -UBUNTU_CODENAME=$(lsb_release -cs) -UBUNTU_VERSION=$(lsb_release -rs | sed s/\\.//) -CDH_VERSION=6.3.2 - -sudo tee /etc/apt/sources.list.d/cdh.list < fs.defaultFS @@ -127,15 +119,15 @@ sudo tee /etc/hadoop/conf.gohdfs/core-site.xml < EOF -sudo tee /etc/hadoop/conf.gohdfs/hdfs-site.xml < dfs.namenode.name.dir - /opt/hdfs/name + /tmp/hdfs/name dfs.datanode.data.dir - /opt/hdfs/data + /tmp/hdfs/data dfs.permissions.superusergroup @@ -176,21 +168,20 @@ sudo tee /etc/hadoop/conf.gohdfs/hdfs-site.xml < EOF -sudo update-alternatives --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.gohdfs 99 -sudo apt-get install -y --allow-unauthenticated hadoop-hdfs-namenode hadoop-hdfs-datanode +$HADOOP_ROOT/bin/hdfs namenode -format +sudo groupadd hadoop +sudo useradd -G hadoop gh -sudo mkdir -p /opt/hdfs/data /opt/hdfs/name -sudo chown -R hdfs:hdfs /opt/hdfs -sudo -u hdfs hdfs namenode -format -nonInteractive +echo "Starting namenode..." +$HADOOP_ROOT/bin/hdfs namenode > /tmp/hdfs/namenode.log 2>&1 & -sudo adduser travis hadoop +echo "Starting datanode..." +$HADOOP_ROOT/bin/hdfs datanode > /tmp/hdfs/datanode.log 2>&1 & -if [ $ENCRYPT_DATA_TRANSFER = "true" ]; then - sudo apt-get install -y --allow-unauthenticated hadoop-kms hadoop-kms-server - sudo service hadoop-kms-server restart -fi +sleep 5 -sudo service hadoop-hdfs-datanode restart -sudo service hadoop-hdfs-namenode restart +echo "Waiting for cluster to exit safe mode..." +$HADOOP_ROOT/bin/hdfs dfsadmin -safemode wait -hdfs dfsadmin -safemode wait +echo "HADOOP_CONF_DIR=$(pwd)/$HADOOP_ROOT/etc/hadoop" >> $GITHUB_ENV +echo "$(pwd)/$HADOOP_ROOT/bin" >> $GITHUB_PATH \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..c7d59b14 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,77 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + + workflow_dispatch: + +jobs: + + test: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - hadoop_version: 2.10.1 + - hadoop_version: 3.3.1 + - hadoop_version: 3.3.1 + kerberos: true + rpc_protection: authentication + transfer_protection: authentication + - hadoop_version: 3.3.1 + kerberos: true + rpc_protection: integrity + transfer_protection: integrity + - hadoop_version: 3.3.1 + kerberos: true + rpc_protection: privacy + transfer_protection: privacy + - hadoop_version: 3.3.1 + kerberos: true + rpc_protection: privacy + transfer_protection: privacy + aes: true + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: 1.17 + + # This step installs downloads hadoop and starts a local cluster with one + # namenode and one datanode. It adds the hadoop binaries to GITHUB_PATH + # and HADOOP_CONF_DIR to GITHUB_ENV. + - name: install-hdfs.sh + run: ./.github/scripts/install-hdfs.sh + env: + HADOOP_VERSION: ${{ matrix.hadoop_version }} + KERBEROS: ${{ matrix.kerberos }} + RPC_PROTECTION: ${{ matrix.rpc_protection }} + TRANSFER_PROTECTION: ${{ matrix.transfer_protection }} + AES: ${{ matrix.aes }} + + # Similarly, this step adds the bats binary to GITHUB_PATH. + - name: install-bats.sh + run: ./.github/scripts/install-bats.sh + + - name: fixtures.sh + run: ./.github/scripts/fixtures.sh + + # Touching the generated proto files ensures that make will not try to + # regenerate them. + - name: make + run: find -name '*.pb.go' -exec touch {} \; && make + + - name: make test + run: | + make test + + - name: cat namenode.log + if: always() + run: cat /tmp/hdfs/namenode.log + + - name: cat datanode.log + if: always() + run: cat /tmp/hdfs/datanode.log diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b2f2a49f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -sudo: required -language: go -go_import_path: github.com/colinmarc/hdfs -go: 1.x -env: -- PLATFORM=hdp2 -- PLATFORM=cdh5 -- PLATFORM=cdh6 -- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=authentication DATA_TRANSFER_PROTECTION=authentication -- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=integrity DATA_TRANSFER_PROTECTION=integrity -- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=privacy DATA_TRANSFER_PROTECTION=privacy -- PLATFORM=cdh6 KERBEROS=true RPC_PROTECTION=privacy DATA_TRANSFER_PROTECTION=privacy AES=true -before_install: -- export GO111MODULE=on # Travis installs into $GOPATH/src, which disables module support by default. -install: -- git clone https://github.com/sstephenson/bats $HOME/bats -- mkdir -p $HOME/bats/build -- "$HOME/bats/install.sh $HOME/bats/build" -- export PATH="$PATH:$HOME/bats/build/bin" -- ./travis-setup.sh $PLATFORM -before_script: -- export HADOOP_CONF_DIR="/etc/hadoop/conf" -- find internal/protocol -name *.pb.go | xargs touch # so make doesn't try to regen protobuf files -script: make test -after_failure: find /var/log/hadoop-hdfs | xargs cat -before_deploy: make release -deploy: - skip_cleanup: true - provider: releases - api_key: - secure: MhNMuDo2ptwA3pXVJfIppskC0/Tg2pyoBcK/A1MAh8ifRrcw3HA2HjOgOj8HxE136aWLW90vnO1rpPRS60lyQikKyJtn2bg0/Earyz40bdQIxpxjeGyzS2yGdyuORivAoBqRMNXDBeMYjwIB/D/BkBJFRjk+VKn6hy6XgalbHcA= - file: gohdfs-*.tar.gz - file_glob: true - on: - repo: colinmarc/hdfs - tags: true - all_branches: true - condition: $PLATFORM = hdp2 -cache: - directories: - - $HOME/.cache/go-build - - $GOPATH/pkg/mod diff --git a/Makefile b/Makefile index dfcf08af..d003288e 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,9 @@ SOURCES = $(shell find . -name '*.go') $(GENERATED_PROTOS) # Protobuf needs one of these for every 'import "foo.proto"' in .protoc files. PROTO_MAPPING = MSecurity.proto=github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common -TRAVIS_TAG ?= $(shell git rev-parse HEAD) +TAG ?= $(shell git rev-parse HEAD) ARCH = $(shell go env GOOS)-$(shell go env GOARCH) -RELEASE_NAME = gohdfs-$(TRAVIS_TAG)-$(ARCH) +RELEASE_NAME = gohdfs-$(TAG)-$(ARCH) all: hdfs @@ -20,7 +20,7 @@ clean-protos: find . -name *.pb.go | xargs rm hdfs: clean $(SOURCES) - go build -ldflags "-X main.version=$(TRAVIS_TAG)" ./cmd/hdfs + go build -ldflags "-X main.version=$(TAG)" ./cmd/hdfs test: hdfs go test -v -race -timeout 30s ./... diff --git a/cmd/hdfs/test/helper.bash b/cmd/hdfs/test/helper.bash index 1c8406d8..37a45241 100644 --- a/cmd/hdfs/test/helper.bash +++ b/cmd/hdfs/test/helper.bash @@ -4,11 +4,8 @@ export HADOOP_FS=${HADOOP_FS-"hadoop fs"} export ROOT_TEST_DIR="$BATS_TEST_DIRNAME/../../.." export HDFS="$ROOT_TEST_DIR/hdfs" -# jdk11 is missing some APIs that the older jars here rely on -# so point at openjdk8 for now -export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 - -# stolen from https://github.com/sstephenson/rbenv/blob/master/test/test_helper.bash +# This is mostly stolen from: +# https://github.com/sstephenson/rbenv/blob/master/test/test_helper.bash flunk() { if [ "$#" -eq 0 ]; then cat - diff --git a/fixtures.sh b/fixtures.sh deleted file mode 100755 index cde6ff82..00000000 --- a/fixtures.sh +++ /dev/null @@ -1,11 +0,0 @@ -set -e - -# Hadoop still requires java8. -export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 - -HADOOP_FS=${HADOOP_FS-"hadoop fs"} -$HADOOP_FS -mkdir -p "/_test" -$HADOOP_FS -chmod 777 "/_test" - -$HADOOP_FS -put ./testdata/foo.txt "/_test/foo.txt" -$HADOOP_FS -Ddfs.block.size=1048576 -put ./testdata/mobydick.txt "/_test/mobydick.txt" diff --git a/travis-setup-cdh5.sh b/travis-setup-cdh5.sh deleted file mode 100755 index a735b739..00000000 --- a/travis-setup-cdh5.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh - -set -e - -UBUNTU_CODENAME=$(lsb_release -c | awk '{print $2}') - -sudo tee /etc/apt/sources.list.d/cdh.list < - - fs.defaultFS - hdfs://localhost:9000 - - - hadoop.security.authentication - $CONF_AUTHENTICATION - - -EOF - -sudo tee /etc/hadoop/conf.gohdfs/hdfs-site.xml < - - dfs.namenode.name.dir - /opt/hdfs/name - - - dfs.datanode.data.dir - /opt/hdfs/data - - - dfs.permissions.superusergroup - hadoop - - - dfs.safemode.extension - 0 - - - dfs.safemode.min.datanodes - 1 - - - ignore.secure.ports.for.testing - true - - -EOF - -sudo update-alternatives --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.gohdfs 99 -sudo apt-get install -y --allow-unauthenticated hadoop-hdfs-namenode hadoop-hdfs-datanode - -sudo mkdir -p /opt/hdfs/data /opt/hdfs/name -sudo chown -R hdfs:hdfs /opt/hdfs -sudo -u hdfs hdfs namenode -format -nonInteractive - -sudo adduser travis hadoop - -sudo service hadoop-hdfs-datanode restart -sudo service hadoop-hdfs-namenode restart - -hdfs dfsadmin -safemode wait diff --git a/travis-setup-hdp2.sh b/travis-setup-hdp2.sh deleted file mode 100755 index 9d8680f9..00000000 --- a/travis-setup-hdp2.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -set -e - -UBUNTU_VERSION=$(lsb_release -r | awk '{print substr($2,0,2)}') - -sudo tee /etc/apt/sources.list.d/hdp.list < - - fs.defaultFS - hdfs://localhost:9000 - - -EOF - -sudo tee /etc/hadoop/conf/hdfs-site.xml < - - dfs.namenode.name.dir - /opt/hdfs/name - - - dfs.datanode.data.dir - /opt/hdfs/data - - - dfs.permissions.superusergroup - hadoop - - -EOF - -sudo apt-get install -y --allow-unauthenticated hadoop hadoop-hdfs - -sudo mkdir -p /opt/hdfs/data /opt/hdfs/name -sudo chown -R hdfs:hdfs /opt/hdfs -sudo -u hdfs hdfs namenode -format -nonInteractive - -sudo adduser travis hadoop - -sudo /usr/hdp/current/hadoop-hdfs-datanode/../hadoop/sbin/hadoop-daemon.sh start datanode -sudo /usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh start namenode - -hdfs dfsadmin -safemode wait diff --git a/travis-setup.sh b/travis-setup.sh deleted file mode 100755 index 0ba6b4bd..00000000 --- a/travis-setup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -set -e -cd $(dirname $0) - -case $1 in - cdh5) - ./travis-setup-cdh5.sh - ;; - cdh6) - ./travis-setup-cdh6.sh - ;; - hdp2) - ./travis-setup-hdp2.sh - ;; - *) - echo "Uknown platform: $PLATFORM" - exit 1 - ;; -esac - -./fixtures.sh From 0f85cc13bc558003b22d62baf6ee306c86dd6f81 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 12:46:34 +0100 Subject: [PATCH 106/159] Update the badge to show the test status from github actions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 52039a6e..890f08db 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ HDFS for Go =========== -[![GoDoc](https://godoc.org/github.com/colinmarc/hdfs/web?status.svg)](https://godoc.org/github.com/colinmarc/hdfs) [![build](https://travis-ci.org/colinmarc/hdfs.svg?branch=master)](https://travis-ci.org/colinmarc/hdfs) +[![GoDoc](https://godoc.org/github.com/colinmarc/hdfs/web?status.svg)](https://godoc.org/github.com/colinmarc/hdfs) [![build](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml/badge.svg?branch=feature-1)](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml) This is a native golang client for hdfs. It connects directly to the namenode using the protocol buffers API. From 4dc94c6eb68823d9e5ec1f23d384b5d3bcee50a7 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 13:17:36 +0100 Subject: [PATCH 107/159] Skip SASL negotiation with datanodes in one special case When data.transfer.protection is set but not dfs.encrypt.data.transfer, hadoop expects us to check if the datanode is running on a privileged port. If it is, then no SASL negatiation should take place. Don't ask me why. --- client.go | 18 ++++++++++++++---- internal/transfer/sasl_dialer.go | 19 +++++++++++++++---- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/client.go b/client.go index 2da7ebed..a2723831 100644 --- a/client.go +++ b/client.go @@ -91,6 +91,12 @@ type ClientOptions struct { // has dfs.encrypt.data.transfer enabled, this setting is ignored and // a level of "privacy" is used. DataTransferProtection string + // skipSaslForPrivilegedDatanodePorts implements a strange edge case present + // in the official java client. If data.transfer.protection is set but not + // dfs.encrypt.data.transfer, and the datanode is running on a privileged + // port, the client connects without doing a SASL handshake. This field is + // only set by ClientOptionsFromConf. + skipSaslForPrivilegedDatanodePorts bool } // ClientOptionsFromConf attempts to load any relevant configuration options @@ -163,6 +169,9 @@ func ClientOptionsFromConf(conf hadoopconf.HadoopConf) ClientOptions { if strings.ToLower(conf["dfs.encrypt.data.transfer"]) == "true" { options.DataTransferProtection = "privacy" + } else { + // See the comment for this property above. + options.skipSaslForPrivilegedDatanodePorts = true } return options @@ -352,10 +361,11 @@ func (c *Client) wrapDatanodeDial(dc dialContext, token *hadoop.TokenProto) (dia } return (&transfer.SaslDialer{ - DialFunc: dc, - Key: key, - Token: token, - EnforceQop: c.options.DataTransferProtection, + DialFunc: dc, + Key: key, + Token: token, + EnforceQop: c.options.DataTransferProtection, + SkipSaslOnPrivilegedPorts: c.options.skipSaslForPrivilegedDatanodePorts, }).DialContext, nil } diff --git a/internal/transfer/sasl_dialer.go b/internal/transfer/sasl_dialer.go index 152a1872..9d7ee001 100644 --- a/internal/transfer/sasl_dialer.go +++ b/internal/transfer/sasl_dialer.go @@ -26,10 +26,11 @@ const ( // data protection level is specified by the server, whether it be wire // encryption or integrity checks. type SaslDialer struct { - DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) - Key *hdfs.DataEncryptionKeyProto - Token *hadoop.TokenProto - EnforceQop string + DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) + Key *hdfs.DataEncryptionKeyProto + Token *hadoop.TokenProto + EnforceQop string + SkipSaslOnPrivilegedPorts bool } func (d *SaslDialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { @@ -42,6 +43,16 @@ func (d *SaslDialer) DialContext(ctx context.Context, network, addr string) (net return nil, err } + // If the port is privileged, and a certain combination of configuration + // variables are set, hadoop expects us to skip SASL negotiation. See the + // documentation for ClientOptions in the top-level package for more detail. + if d.SkipSaslOnPrivilegedPorts { + if addr, ok := conn.RemoteAddr().(*net.TCPAddr); ok && addr.Port < 1024 { + return conn, nil + } + + } + return d.wrapDatanodeConn(conn) } From 19e9639f12c882075cc2665cde964b11cf54f350 Mon Sep 17 00:00:00 2001 From: sunzhaochang Date: Fri, 13 Aug 2021 20:55:08 +0800 Subject: [PATCH 108/159] Check that closing a file after writing actually succeeds Hadoop returns a boolean with no context. Fixes #271. --- file_writer.go | 3 +++ hadoopconf/hadoopconf.go | 2 +- internal/transfer/block_write_stream.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/file_writer.go b/file_writer.go index 6b609f4a..a773732b 100644 --- a/file_writer.go +++ b/file_writer.go @@ -1,6 +1,7 @@ package hdfs import ( + "errors" "io" "os" "time" @@ -239,6 +240,8 @@ func (f *FileWriter) Close() error { err := f.client.namenode.Execute("complete", completeReq, completeResp) if err != nil { return &os.PathError{"create", f.name, err} + } else if !completeResp.GetResult() { + return &os.PathError{"create", f.name, errors.New("failed to close file")} } return nil diff --git a/hadoopconf/hadoopconf.go b/hadoopconf/hadoopconf.go index f9a6fc2b..9bc6db16 100644 --- a/hadoopconf/hadoopconf.go +++ b/hadoopconf/hadoopconf.go @@ -123,7 +123,7 @@ func (conf HadoopConf) Namenodes() []string { } keys := make([]string, 0, len(nns)) - for k, _ := range nns { + for k := range nns { keys = append(keys, k) } diff --git a/internal/transfer/block_write_stream.go b/internal/transfer/block_write_stream.go index 0f47cb0e..752caeb9 100644 --- a/internal/transfer/block_write_stream.go +++ b/internal/transfer/block_write_stream.go @@ -290,7 +290,7 @@ Acks: // Once we've seen an error, just keep reading packets off the channel (but // not off the socket) until the writing thread figures it out. If we don't, // the upstream thread could deadlock waiting for the channel to have space. - for _ = range s.packets { + for range s.packets { } } From 65f451654ba5fcc930aa9acdb5826affd19fc7eb Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 14:05:57 +0100 Subject: [PATCH 109/159] Revert "Check that closing a file after writing actually succeeds" This reverts commit 19e9639f12c882075cc2665cde964b11cf54f350. --- file_writer.go | 3 --- hadoopconf/hadoopconf.go | 2 +- internal/transfer/block_write_stream.go | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/file_writer.go b/file_writer.go index a773732b..6b609f4a 100644 --- a/file_writer.go +++ b/file_writer.go @@ -1,7 +1,6 @@ package hdfs import ( - "errors" "io" "os" "time" @@ -240,8 +239,6 @@ func (f *FileWriter) Close() error { err := f.client.namenode.Execute("complete", completeReq, completeResp) if err != nil { return &os.PathError{"create", f.name, err} - } else if !completeResp.GetResult() { - return &os.PathError{"create", f.name, errors.New("failed to close file")} } return nil diff --git a/hadoopconf/hadoopconf.go b/hadoopconf/hadoopconf.go index 9bc6db16..f9a6fc2b 100644 --- a/hadoopconf/hadoopconf.go +++ b/hadoopconf/hadoopconf.go @@ -123,7 +123,7 @@ func (conf HadoopConf) Namenodes() []string { } keys := make([]string, 0, len(nns)) - for k := range nns { + for k, _ := range nns { keys = append(keys, k) } diff --git a/internal/transfer/block_write_stream.go b/internal/transfer/block_write_stream.go index 752caeb9..0f47cb0e 100644 --- a/internal/transfer/block_write_stream.go +++ b/internal/transfer/block_write_stream.go @@ -290,7 +290,7 @@ Acks: // Once we've seen an error, just keep reading packets off the channel (but // not off the socket) until the writing thread figures it out. If we don't, // the upstream thread could deadlock waiting for the channel to have space. - for range s.packets { + for _ = range s.packets { } } From 49f60589210b23cc4904af076d299874b8c2ecfa Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 14:14:52 +0100 Subject: [PATCH 110/159] Update some dependencies --- go.mod | 24 +++++++++++++++++++----- go.sum | 31 +++++++++++++++++-------------- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index f23d433b..62207a4d 100644 --- a/go.mod +++ b/go.mod @@ -2,10 +2,24 @@ module github.com/colinmarc/hdfs/v2 require ( github.com/golang/protobuf v1.1.0 - github.com/jcmturner/gokrb5/v8 v8.4.1 - github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117 - github.com/stretchr/testify v1.4.0 - golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect + github.com/jcmturner/gokrb5/v8 v8.4.2 + github.com/pborman/getopt v1.1.0 + github.com/stretchr/testify v1.7.0 ) -go 1.13 +require ( + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/hashicorp/go-uuid v1.0.2 // indirect + github.com/jcmturner/aescts/v2 v2.0.0 // indirect + github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect + github.com/jcmturner/gofork v1.0.0 // indirect + github.com/jcmturner/goidentity/v6 v6.0.1 // indirect + github.com/jcmturner/rpc/v2 v2.0.3 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 // indirect + golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect +) + +go 1.17 diff --git a/go.sum b/go.sum index 26098810..196f9111 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/golang/protobuf v1.1.0 h1:0iH4Ffd/meGoXqF2lSAhZHt8X+cPgkfn/cb6Cce5Vpc github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= -github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYbQ= -github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= @@ -16,29 +16,32 @@ github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= -github.com/jcmturner/gokrb5/v8 v8.4.1 h1:IGSJfqBzMS6TA0oJ7DxXdyzPK563QHa8T2IqER2ggyQ= -github.com/jcmturner/gokrb5/v8 v8.4.1/go.mod h1:T1hnNppQsBtxW0tCHMHTkAt8n/sABdzZgZdoFrZaZNM= -github.com/jcmturner/rpc/v2 v2.0.2 h1:gMB4IwRXYsWw4Bc6o/az2HJgFUA1ffSh90i26ZJ6Xl0= -github.com/jcmturner/rpc/v2 v2.0.2/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= -github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117 h1:7822vZ646Atgxkp3tqrSufChvAAYgIy+iFEGpQntwlI= -github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= +github.com/jcmturner/gokrb5/v8 v8.4.2 h1:6ZIM6b/JJN0X8UM43ZOM6Z4SJzla+a/u7scXFJzodkA= +github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= +github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= +github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/pborman/getopt v1.1.0 h1:eJ3aFZroQqq0bWmraivjQNt6Dmm5M0h2JcDW38/Azb0= +github.com/pborman/getopt v1.1.0/go.mod h1:FxXoW1Re00sQG/+KIkuSqRL/LwQgSkv7uyac+STFsbk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg= -golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 h1:umElSU9WZirRdgu2yFHY0ayQkEnKiOC1TtM3fWXFnoU= +golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 999e5322347d181f857eb9966a2f0c32a7c83b43 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 15:33:51 +0100 Subject: [PATCH 111/159] Run tests on all branches --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c7d59b14..eba45cdc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,6 @@ name: Tests on: push: - branches: [ master ] pull_request: branches: [ master ] From c67abc15ff977efec63cd84ea31aad4fa55439ac Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 15:32:26 +0100 Subject: [PATCH 112/159] Update and regenerate protobuf files --- Makefile | 5 +- content_summary.go | 2 +- file_reader.go | 2 +- file_writer.go | 2 +- go.mod | 3 +- go.sum | 12 +- .../GenericRefreshProtocol.pb.go | 381 +- .../GenericRefreshProtocol.proto | 3 +- .../GetUserMappingsProtocol.pb.go | 276 +- .../GetUserMappingsProtocol.proto | 3 +- .../hadoop_common/HAServiceProtocol.pb.go | 1025 +- .../hadoop_common/HAServiceProtocol.proto | 23 +- .../hadoop_common/IpcConnectionContext.pb.go | 365 +- .../hadoop_common/IpcConnectionContext.proto | 3 +- .../hadoop_common/ProtobufRpcEngine.pb.go | 215 +- .../hadoop_common/ProtobufRpcEngine.proto | 3 +- .../protocol/hadoop_common/ProtocolInfo.pb.go | 587 +- .../protocol/hadoop_common/ProtocolInfo.proto | 3 +- .../RefreshAuthorizationPolicyProtocol.pb.go | 261 +- .../RefreshAuthorizationPolicyProtocol.proto | 3 +- .../RefreshCallQueueProtocol.pb.go | 258 +- .../RefreshCallQueueProtocol.proto | 3 +- .../RefreshUserMappingsProtocol.pb.go | 382 +- .../RefreshUserMappingsProtocol.proto | 3 +- .../protocol/hadoop_common/RpcHeader.pb.go | 1243 +- .../protocol/hadoop_common/RpcHeader.proto | 5 +- .../protocol/hadoop_common/Security.pb.go | 780 +- .../protocol/hadoop_common/Security.proto | 14 +- .../protocol/hadoop_common/TraceAdmin.pb.go | 709 +- .../protocol/hadoop_common/TraceAdmin.proto | 3 +- .../protocol/hadoop_common/ZKFCProtocol.pb.go | 384 +- .../protocol/hadoop_common/ZKFCProtocol.proto | 3 +- .../hadoop_hdfs/AliasMapProtocol.pb.go | 725 + .../hadoop_hdfs/AliasMapProtocol.proto | 69 + .../hadoop_hdfs/ClientDatanodeProtocol.pb.go | 2193 ++- .../hadoop_hdfs/ClientDatanodeProtocol.proto | 101 +- .../hadoop_hdfs/ClientNamenodeProtocol.pb.go | 15084 +++++++++++++--- .../hadoop_hdfs/ClientNamenodeProtocol.proto | 166 +- internal/protocol/hadoop_hdfs/HAZKInfo.pb.go | 211 + internal/protocol/hadoop_hdfs/HAZKInfo.proto | 37 + .../protocol/hadoop_hdfs/HdfsServer.pb.go | 1883 ++ .../protocol/hadoop_hdfs/HdfsServer.proto | 220 + .../hadoop_hdfs/InterDatanodeProtocol.pb.go | 476 + .../hadoop_hdfs/InterDatanodeProtocol.proto | 92 + .../hadoop_hdfs/ReconfigurationProtocol.pb.go | 944 +- .../hadoop_hdfs/ReconfigurationProtocol.proto | 3 +- internal/protocol/hadoop_hdfs/acl.pb.go | 1386 +- internal/protocol/hadoop_hdfs/acl.proto | 10 +- .../protocol/hadoop_hdfs/datatransfer.pb.go | 3342 +++- .../protocol/hadoop_hdfs/datatransfer.proto | 23 +- internal/protocol/hadoop_hdfs/editlog.pb.go | 257 + internal/protocol/hadoop_hdfs/editlog.proto | 36 + .../protocol/hadoop_hdfs/encryption.pb.go | 1198 +- .../protocol/hadoop_hdfs/encryption.proto | 44 +- .../protocol/hadoop_hdfs/erasurecoding.pb.go | 1597 +- .../protocol/hadoop_hdfs/erasurecoding.proto | 64 +- internal/protocol/hadoop_hdfs/hdfs.pb.go | 7176 ++++++-- internal/protocol/hadoop_hdfs/hdfs.proto | 225 +- internal/protocol/hadoop_hdfs/inotify.pb.go | 1395 +- internal/protocol/hadoop_hdfs/inotify.proto | 5 +- internal/protocol/hadoop_hdfs/untitled | 0 internal/protocol/hadoop_hdfs/xattr.pb.go | 897 +- internal/protocol/hadoop_hdfs/xattr.proto | 3 +- internal/rpc/namenode.go | 2 +- internal/rpc/rpc.go | 2 +- internal/rpc/sasl_transport.go | 2 +- internal/rpc/transport.go | 2 +- internal/transfer/block_read_stream.go | 2 +- internal/transfer/block_reader.go | 2 +- internal/transfer/block_write_stream.go | 2 +- internal/transfer/block_writer.go | 2 +- internal/transfer/checksum_reader.go | 2 +- internal/transfer/digest_md5_test.go | 2 +- internal/transfer/sasl_dialer.go | 2 +- internal/transfer/transfer.go | 2 +- mkdir.go | 2 +- perms.go | 2 +- remove.go | 2 +- rename.go | 2 +- stat.go | 2 +- xattr.go | 2 +- 81 files changed, 38672 insertions(+), 8190 deletions(-) create mode 100644 internal/protocol/hadoop_hdfs/AliasMapProtocol.pb.go create mode 100644 internal/protocol/hadoop_hdfs/AliasMapProtocol.proto create mode 100644 internal/protocol/hadoop_hdfs/HAZKInfo.pb.go create mode 100644 internal/protocol/hadoop_hdfs/HAZKInfo.proto create mode 100644 internal/protocol/hadoop_hdfs/HdfsServer.pb.go create mode 100644 internal/protocol/hadoop_hdfs/HdfsServer.proto create mode 100644 internal/protocol/hadoop_hdfs/InterDatanodeProtocol.pb.go create mode 100644 internal/protocol/hadoop_hdfs/InterDatanodeProtocol.proto create mode 100644 internal/protocol/hadoop_hdfs/editlog.pb.go create mode 100644 internal/protocol/hadoop_hdfs/editlog.proto create mode 100644 internal/protocol/hadoop_hdfs/untitled diff --git a/Makefile b/Makefile index d003288e..7b8113c3 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,9 @@ RELEASE_NAME = gohdfs-$(TAG)-$(ARCH) all: hdfs %.pb.go: $(HADOOP_HDFS_PROTOS) $(HADOOP_COMMON_PROTOS) - protoc --go_out='$(PROTO_MAPPING):internal/protocol/hadoop_common' -Iinternal/protocol/hadoop_common -Iinternal/protocol/hadoop_hdfs $(HADOOP_COMMON_PROTOS) - protoc --go_out='$(PROTO_MAPPING):internal/protocol/hadoop_hdfs' -Iinternal/protocol/hadoop_common -Iinternal/protocol/hadoop_hdfs $(HADOOP_HDFS_PROTOS) + echo $(HADOOP_COMMON_PROTOS) + protoc --go_out=internal/protocol/hadoop_common --go_opt=paths=source_relative -Iinternal/protocol/hadoop_common -Iinternal/protocol/hadoop_hdfs $(HADOOP_COMMON_PROTOS) + protoc --go_out=internal/protocol/hadoop_hdfs --go_opt=paths=source_relative -Iinternal/protocol/hadoop_common -Iinternal/protocol/hadoop_hdfs $(HADOOP_HDFS_PROTOS) clean-protos: find . -name *.pb.go | xargs rm diff --git a/content_summary.go b/content_summary.go index 286efec0..d96f25d6 100644 --- a/content_summary.go +++ b/content_summary.go @@ -4,7 +4,7 @@ import ( "os" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // ContentSummary represents a set of information about a file or directory in diff --git a/file_reader.go b/file_reader.go index 589af44c..d902095e 100644 --- a/file_reader.go +++ b/file_reader.go @@ -10,7 +10,7 @@ import ( hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/v2/internal/transfer" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // A FileReader represents an existing file or directory in HDFS. It implements diff --git a/file_writer.go b/file_writer.go index 6b609f4a..d12db58a 100644 --- a/file_writer.go +++ b/file_writer.go @@ -7,7 +7,7 @@ import ( hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/v2/internal/transfer" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // A FileWriter represents a writer for an open file in HDFS. It implements diff --git a/go.mod b/go.mod index 62207a4d..461445d2 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/colinmarc/hdfs/v2 require ( - github.com/golang/protobuf v1.1.0 github.com/jcmturner/gokrb5/v8 v8.4.2 github.com/pborman/getopt v1.1.0 github.com/stretchr/testify v1.7.0 + google.golang.org/protobuf v1.27.1 ) require ( @@ -18,7 +18,6 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 // indirect golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect ) diff --git a/go.sum b/go.sum index 196f9111..7c2a2f0c 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,8 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/golang/protobuf v1.1.0 h1:0iH4Ffd/meGoXqF2lSAhZHt8X+cPgkfn/cb6Cce5Vpc= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= @@ -35,11 +36,14 @@ golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/protocol/hadoop_common/GenericRefreshProtocol.pb.go b/internal/protocol/hadoop_common/GenericRefreshProtocol.pb.go index 35eadf66..688840c1 100644 --- a/internal/protocol/hadoop_common/GenericRefreshProtocol.pb.go +++ b/internal/protocol/hadoop_common/GenericRefreshProtocol.pb.go @@ -1,127 +1,352 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: GenericRefreshProtocol.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // Refresh request. type GenericRefreshRequestProto struct { - Identifier *string `protobuf:"bytes,1,opt,name=identifier" json:"identifier,omitempty"` - Args []string `protobuf:"bytes,2,rep,name=args" json:"args,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Identifier *string `protobuf:"bytes,1,opt,name=identifier" json:"identifier,omitempty"` + Args []string `protobuf:"bytes,2,rep,name=args" json:"args,omitempty"` +} + +func (x *GenericRefreshRequestProto) Reset() { + *x = GenericRefreshRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_GenericRefreshProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GenericRefreshRequestProto) Reset() { *m = GenericRefreshRequestProto{} } -func (m *GenericRefreshRequestProto) String() string { return proto.CompactTextString(m) } -func (*GenericRefreshRequestProto) ProtoMessage() {} -func (*GenericRefreshRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } +func (x *GenericRefreshRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenericRefreshRequestProto) ProtoMessage() {} -func (m *GenericRefreshRequestProto) GetIdentifier() string { - if m != nil && m.Identifier != nil { - return *m.Identifier +func (x *GenericRefreshRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_GenericRefreshProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenericRefreshRequestProto.ProtoReflect.Descriptor instead. +func (*GenericRefreshRequestProto) Descriptor() ([]byte, []int) { + return file_GenericRefreshProtocol_proto_rawDescGZIP(), []int{0} +} + +func (x *GenericRefreshRequestProto) GetIdentifier() string { + if x != nil && x.Identifier != nil { + return *x.Identifier } return "" } -func (m *GenericRefreshRequestProto) GetArgs() []string { - if m != nil { - return m.Args +func (x *GenericRefreshRequestProto) GetArgs() []string { + if x != nil { + return x.Args } return nil } -// * +//* // A single response from a refresh handler. type GenericRefreshResponseProto struct { - ExitStatus *int32 `protobuf:"varint,1,opt,name=exitStatus" json:"exitStatus,omitempty"` - UserMessage *string `protobuf:"bytes,2,opt,name=userMessage" json:"userMessage,omitempty"` - SenderName *string `protobuf:"bytes,3,opt,name=senderName" json:"senderName,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExitStatus *int32 `protobuf:"varint,1,opt,name=exitStatus" json:"exitStatus,omitempty"` // unix exit status to return + UserMessage *string `protobuf:"bytes,2,opt,name=userMessage" json:"userMessage,omitempty"` // to be displayed to the user + SenderName *string `protobuf:"bytes,3,opt,name=senderName" json:"senderName,omitempty"` // which handler sent this message +} + +func (x *GenericRefreshResponseProto) Reset() { + *x = GenericRefreshResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_GenericRefreshProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GenericRefreshResponseProto) Reset() { *m = GenericRefreshResponseProto{} } -func (m *GenericRefreshResponseProto) String() string { return proto.CompactTextString(m) } -func (*GenericRefreshResponseProto) ProtoMessage() {} -func (*GenericRefreshResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} } +func (x *GenericRefreshResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *GenericRefreshResponseProto) GetExitStatus() int32 { - if m != nil && m.ExitStatus != nil { - return *m.ExitStatus +func (*GenericRefreshResponseProto) ProtoMessage() {} + +func (x *GenericRefreshResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_GenericRefreshProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenericRefreshResponseProto.ProtoReflect.Descriptor instead. +func (*GenericRefreshResponseProto) Descriptor() ([]byte, []int) { + return file_GenericRefreshProtocol_proto_rawDescGZIP(), []int{1} +} + +func (x *GenericRefreshResponseProto) GetExitStatus() int32 { + if x != nil && x.ExitStatus != nil { + return *x.ExitStatus } return 0 } -func (m *GenericRefreshResponseProto) GetUserMessage() string { - if m != nil && m.UserMessage != nil { - return *m.UserMessage +func (x *GenericRefreshResponseProto) GetUserMessage() string { + if x != nil && x.UserMessage != nil { + return *x.UserMessage } return "" } -func (m *GenericRefreshResponseProto) GetSenderName() string { - if m != nil && m.SenderName != nil { - return *m.SenderName +func (x *GenericRefreshResponseProto) GetSenderName() string { + if x != nil && x.SenderName != nil { + return *x.SenderName } return "" } -// * +//* // Collection of responses from zero or more handlers. type GenericRefreshResponseCollectionProto struct { - Responses []*GenericRefreshResponseProto `protobuf:"bytes,1,rep,name=responses" json:"responses,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*GenericRefreshResponseProto `protobuf:"bytes,1,rep,name=responses" json:"responses,omitempty"` +} + +func (x *GenericRefreshResponseCollectionProto) Reset() { + *x = GenericRefreshResponseCollectionProto{} + if protoimpl.UnsafeEnabled { + mi := &file_GenericRefreshProtocol_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenericRefreshResponseCollectionProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenericRefreshResponseCollectionProto) ProtoMessage() {} + +func (x *GenericRefreshResponseCollectionProto) ProtoReflect() protoreflect.Message { + mi := &file_GenericRefreshProtocol_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GenericRefreshResponseCollectionProto) Reset() { *m = GenericRefreshResponseCollectionProto{} } -func (m *GenericRefreshResponseCollectionProto) String() string { return proto.CompactTextString(m) } -func (*GenericRefreshResponseCollectionProto) ProtoMessage() {} +// Deprecated: Use GenericRefreshResponseCollectionProto.ProtoReflect.Descriptor instead. func (*GenericRefreshResponseCollectionProto) Descriptor() ([]byte, []int) { - return fileDescriptor3, []int{2} + return file_GenericRefreshProtocol_proto_rawDescGZIP(), []int{2} } -func (m *GenericRefreshResponseCollectionProto) GetResponses() []*GenericRefreshResponseProto { - if m != nil { - return m.Responses +func (x *GenericRefreshResponseCollectionProto) GetResponses() []*GenericRefreshResponseProto { + if x != nil { + return x.Responses } return nil } -func init() { - proto.RegisterType((*GenericRefreshRequestProto)(nil), "hadoop.common.GenericRefreshRequestProto") - proto.RegisterType((*GenericRefreshResponseProto)(nil), "hadoop.common.GenericRefreshResponseProto") - proto.RegisterType((*GenericRefreshResponseCollectionProto)(nil), "hadoop.common.GenericRefreshResponseCollectionProto") -} - -func init() { proto.RegisterFile("GenericRefreshProtocol.proto", fileDescriptor3) } - -var fileDescriptor3 = []byte{ - // 293 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x4a, 0xc3, 0x40, - 0x10, 0xc6, 0xd9, 0x56, 0x91, 0x4e, 0xf1, 0xb2, 0xa7, 0xd0, 0xaa, 0x94, 0x80, 0x10, 0x3d, 0xe4, - 0x50, 0x7c, 0x01, 0xeb, 0x41, 0x2f, 0x4a, 0xd9, 0x3e, 0xc1, 0xb2, 0x99, 0x26, 0x2b, 0xc9, 0x6e, - 0xba, 0xb3, 0x11, 0x6f, 0x5e, 0x05, 0x5f, 0xc2, 0x47, 0x95, 0x24, 0x6a, 0xd2, 0x52, 0xff, 0x9c, - 0x76, 0xf8, 0x66, 0xe7, 0x9b, 0xdf, 0x0c, 0x03, 0x27, 0xb7, 0x68, 0xd0, 0x69, 0x25, 0x70, 0xed, - 0x90, 0xb2, 0xa5, 0xb3, 0xde, 0x2a, 0x9b, 0xc7, 0x65, 0x1d, 0xf0, 0xe3, 0x4c, 0x26, 0xd6, 0x96, - 0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0xef, 0x8c, 0x7d, 0x04, 0x00, 0x00, 0xff, 0xff, 0x5c, 0x01, 0x5c, - 0x07, 0x44, 0x02, 0x00, 0x00, +var File_GenericRefreshProtocol_proto protoreflect.FileDescriptor + +var file_GenericRefreshProtocol_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x50, 0x0a, + 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x61, + 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, + 0x7f, 0x0a, 0x1b, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, + 0x0a, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, + 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x22, 0x71, 0x0a, 0x25, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x48, 0x0a, 0x09, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x73, 0x32, 0x8b, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x12, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x42, 0x7f, 0x0a, 0x1b, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x69, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x42, 0x1c, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3c, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, + 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0xa0, + 0x01, 0x01, +} + +var ( + file_GenericRefreshProtocol_proto_rawDescOnce sync.Once + file_GenericRefreshProtocol_proto_rawDescData = file_GenericRefreshProtocol_proto_rawDesc +) + +func file_GenericRefreshProtocol_proto_rawDescGZIP() []byte { + file_GenericRefreshProtocol_proto_rawDescOnce.Do(func() { + file_GenericRefreshProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_GenericRefreshProtocol_proto_rawDescData) + }) + return file_GenericRefreshProtocol_proto_rawDescData +} + +var file_GenericRefreshProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_GenericRefreshProtocol_proto_goTypes = []interface{}{ + (*GenericRefreshRequestProto)(nil), // 0: hadoop.common.GenericRefreshRequestProto + (*GenericRefreshResponseProto)(nil), // 1: hadoop.common.GenericRefreshResponseProto + (*GenericRefreshResponseCollectionProto)(nil), // 2: hadoop.common.GenericRefreshResponseCollectionProto +} +var file_GenericRefreshProtocol_proto_depIdxs = []int32{ + 1, // 0: hadoop.common.GenericRefreshResponseCollectionProto.responses:type_name -> hadoop.common.GenericRefreshResponseProto + 0, // 1: hadoop.common.GenericRefreshProtocolService.refresh:input_type -> hadoop.common.GenericRefreshRequestProto + 2, // 2: hadoop.common.GenericRefreshProtocolService.refresh:output_type -> hadoop.common.GenericRefreshResponseCollectionProto + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_GenericRefreshProtocol_proto_init() } +func file_GenericRefreshProtocol_proto_init() { + if File_GenericRefreshProtocol_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_GenericRefreshProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenericRefreshRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_GenericRefreshProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenericRefreshResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_GenericRefreshProtocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenericRefreshResponseCollectionProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_GenericRefreshProtocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_GenericRefreshProtocol_proto_goTypes, + DependencyIndexes: file_GenericRefreshProtocol_proto_depIdxs, + MessageInfos: file_GenericRefreshProtocol_proto_msgTypes, + }.Build() + File_GenericRefreshProtocol_proto = out.File + file_GenericRefreshProtocol_proto_rawDesc = nil + file_GenericRefreshProtocol_proto_goTypes = nil + file_GenericRefreshProtocol_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/GenericRefreshProtocol.proto b/internal/protocol/hadoop_common/GenericRefreshProtocol.proto index fe465490..409f46f0 100644 --- a/internal/protocol/hadoop_common/GenericRefreshProtocol.proto +++ b/internal/protocol/hadoop_common/GenericRefreshProtocol.proto @@ -21,11 +21,12 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.ipc.proto"; option java_outer_classname = "GenericRefreshProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; /** diff --git a/internal/protocol/hadoop_common/GetUserMappingsProtocol.pb.go b/internal/protocol/hadoop_common/GetUserMappingsProtocol.pb.go index 5358c0e5..54eb086d 100644 --- a/internal/protocol/hadoop_common/GetUserMappingsProtocol.pb.go +++ b/internal/protocol/hadoop_common/GetUserMappingsProtocol.pb.go @@ -1,76 +1,252 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: GetUserMappingsProtocol.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // Get groups for user request. type GetGroupsForUserRequestProto struct { - User *string `protobuf:"bytes,1,req,name=user" json:"user,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *string `protobuf:"bytes,1,req,name=user" json:"user,omitempty"` +} + +func (x *GetGroupsForUserRequestProto) Reset() { + *x = GetGroupsForUserRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_GetUserMappingsProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupsForUserRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupsForUserRequestProto) ProtoMessage() {} + +func (x *GetGroupsForUserRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_GetUserMappingsProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetGroupsForUserRequestProto) Reset() { *m = GetGroupsForUserRequestProto{} } -func (m *GetGroupsForUserRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetGroupsForUserRequestProto) ProtoMessage() {} -func (*GetGroupsForUserRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor10, []int{0} } +// Deprecated: Use GetGroupsForUserRequestProto.ProtoReflect.Descriptor instead. +func (*GetGroupsForUserRequestProto) Descriptor() ([]byte, []int) { + return file_GetUserMappingsProtocol_proto_rawDescGZIP(), []int{0} +} -func (m *GetGroupsForUserRequestProto) GetUser() string { - if m != nil && m.User != nil { - return *m.User +func (x *GetGroupsForUserRequestProto) GetUser() string { + if x != nil && x.User != nil { + return *x.User } return "" } -// * +//* // Response for get groups. type GetGroupsForUserResponseProto struct { - Groups []string `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Groups []string `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"` } -func (m *GetGroupsForUserResponseProto) Reset() { *m = GetGroupsForUserResponseProto{} } -func (m *GetGroupsForUserResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetGroupsForUserResponseProto) ProtoMessage() {} -func (*GetGroupsForUserResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor10, []int{1} } +func (x *GetGroupsForUserResponseProto) Reset() { + *x = GetGroupsForUserResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_GetUserMappingsProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupsForUserResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *GetGroupsForUserResponseProto) GetGroups() []string { - if m != nil { - return m.Groups +func (*GetGroupsForUserResponseProto) ProtoMessage() {} + +func (x *GetGroupsForUserResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_GetUserMappingsProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupsForUserResponseProto.ProtoReflect.Descriptor instead. +func (*GetGroupsForUserResponseProto) Descriptor() ([]byte, []int) { + return file_GetUserMappingsProtocol_proto_rawDescGZIP(), []int{1} +} + +func (x *GetGroupsForUserResponseProto) GetGroups() []string { + if x != nil { + return x.Groups } return nil } -func init() { - proto.RegisterType((*GetGroupsForUserRequestProto)(nil), "hadoop.common.GetGroupsForUserRequestProto") - proto.RegisterType((*GetGroupsForUserResponseProto)(nil), "hadoop.common.GetGroupsForUserResponseProto") -} - -func init() { proto.RegisterFile("GetUserMappingsProtocol.proto", fileDescriptor10) } - -var fileDescriptor10 = []byte{ - // 213 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x75, 0x4f, 0x2d, 0x09, - 0x2d, 0x4e, 0x2d, 0xf2, 0x4d, 0x2c, 0x28, 0xc8, 0xcc, 0x4b, 0x2f, 0x0e, 0x28, 0xca, 0x2f, 0xc9, - 0x4f, 0xce, 0xcf, 0xd1, 0x2b, 0x00, 0x31, 0x84, 0x78, 0x33, 0x12, 0x53, 0xf2, 0xf3, 0x0b, 0xf4, - 0x92, 0xf3, 0x73, 0x73, 0xf3, 0xf3, 0x94, 0x8c, 0xb8, 0x64, 0xdc, 0x53, 0x4b, 0xdc, 0x8b, 0xf2, - 0x4b, 0x0b, 0x8a, 0xdd, 0xf2, 0x8b, 0x40, 0x1a, 0x83, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, 0xc0, - 0xfa, 0x84, 0x84, 0xb8, 0x58, 0x4a, 0x8b, 0x53, 0x8b, 0x24, 0x18, 0x15, 0x98, 0x34, 0x38, 0x83, - 0xc0, 0x6c, 0x25, 0x73, 0xb0, 0x1d, 0x68, 0x7a, 0x8a, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x21, 0x9a, - 0xc4, 0xb8, 0xd8, 0xd2, 0xc1, 0xb2, 0x12, 0x8c, 0x0a, 0xcc, 0x1a, 0x9c, 0x41, 0x50, 0x9e, 0x51, - 0x3f, 0x23, 0x97, 0x1c, 0x0e, 0xd7, 0x05, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x0a, 0xe5, 0x72, - 0x09, 0xa4, 0xa3, 0x99, 0x2d, 0xa4, 0xad, 0x87, 0xe2, 0x66, 0x3d, 0x7c, 0x0e, 0x96, 0xd2, 0x21, - 0xa8, 0x18, 0xc9, 0xa5, 0x4e, 0x2e, 0x5c, 0xb2, 0xf9, 0x45, 0xe9, 0x7a, 0x89, 0x05, 0x89, 0xc9, - 0x19, 0xa9, 0x30, 0x9d, 0x25, 0xf9, 0xf9, 0x39, 0xc5, 0x90, 0xe0, 0x72, 0xc2, 0x15, 0x9a, 0x60, - 0xba, 0xb8, 0x83, 0x91, 0x71, 0x01, 0x23, 0x23, 0x20, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x38, 0xcc, - 0x6f, 0x73, 0x01, 0x00, 0x00, +var File_GetUserMappingsProtocol_proto protoreflect.FileDescriptor + +var file_GetUserMappingsProtocol_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0d, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x32, + 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, + 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x22, 0x37, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, + 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x32, 0x8f, 0x01, 0x0a, 0x1e, + 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, + 0x0a, 0x10, 0x67, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x82, 0x01, + 0x0a, 0x1d, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, + 0x1d, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3c, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, + 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0xa0, + 0x01, 0x01, +} + +var ( + file_GetUserMappingsProtocol_proto_rawDescOnce sync.Once + file_GetUserMappingsProtocol_proto_rawDescData = file_GetUserMappingsProtocol_proto_rawDesc +) + +func file_GetUserMappingsProtocol_proto_rawDescGZIP() []byte { + file_GetUserMappingsProtocol_proto_rawDescOnce.Do(func() { + file_GetUserMappingsProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_GetUserMappingsProtocol_proto_rawDescData) + }) + return file_GetUserMappingsProtocol_proto_rawDescData +} + +var file_GetUserMappingsProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_GetUserMappingsProtocol_proto_goTypes = []interface{}{ + (*GetGroupsForUserRequestProto)(nil), // 0: hadoop.common.GetGroupsForUserRequestProto + (*GetGroupsForUserResponseProto)(nil), // 1: hadoop.common.GetGroupsForUserResponseProto +} +var file_GetUserMappingsProtocol_proto_depIdxs = []int32{ + 0, // 0: hadoop.common.GetUserMappingsProtocolService.getGroupsForUser:input_type -> hadoop.common.GetGroupsForUserRequestProto + 1, // 1: hadoop.common.GetUserMappingsProtocolService.getGroupsForUser:output_type -> hadoop.common.GetGroupsForUserResponseProto + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_GetUserMappingsProtocol_proto_init() } +func file_GetUserMappingsProtocol_proto_init() { + if File_GetUserMappingsProtocol_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_GetUserMappingsProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGroupsForUserRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_GetUserMappingsProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGroupsForUserResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_GetUserMappingsProtocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_GetUserMappingsProtocol_proto_goTypes, + DependencyIndexes: file_GetUserMappingsProtocol_proto_depIdxs, + MessageInfos: file_GetUserMappingsProtocol_proto_msgTypes, + }.Build() + File_GetUserMappingsProtocol_proto = out.File + file_GetUserMappingsProtocol_proto_rawDesc = nil + file_GetUserMappingsProtocol_proto_goTypes = nil + file_GetUserMappingsProtocol_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/GetUserMappingsProtocol.proto b/internal/protocol/hadoop_common/GetUserMappingsProtocol.proto index 51552b87..7250aee9 100644 --- a/internal/protocol/hadoop_common/GetUserMappingsProtocol.proto +++ b/internal/protocol/hadoop_common/GetUserMappingsProtocol.proto @@ -21,11 +21,12 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.tools.proto"; option java_outer_classname = "GetUserMappingsProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; /** diff --git a/internal/protocol/hadoop_common/HAServiceProtocol.pb.go b/internal/protocol/hadoop_common/HAServiceProtocol.pb.go index cc855ccc..51bdc225 100644 --- a/internal/protocol/hadoop_common/HAServiceProtocol.pb.go +++ b/internal/protocol/hadoop_common/HAServiceProtocol.pb.go @@ -1,16 +1,46 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: HAServiceProtocol.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type HAServiceStateProto int32 @@ -18,36 +48,61 @@ const ( HAServiceStateProto_INITIALIZING HAServiceStateProto = 0 HAServiceStateProto_ACTIVE HAServiceStateProto = 1 HAServiceStateProto_STANDBY HAServiceStateProto = 2 + HAServiceStateProto_OBSERVER HAServiceStateProto = 3 ) -var HAServiceStateProto_name = map[int32]string{ - 0: "INITIALIZING", - 1: "ACTIVE", - 2: "STANDBY", -} -var HAServiceStateProto_value = map[string]int32{ - "INITIALIZING": 0, - "ACTIVE": 1, - "STANDBY": 2, -} +// Enum value maps for HAServiceStateProto. +var ( + HAServiceStateProto_name = map[int32]string{ + 0: "INITIALIZING", + 1: "ACTIVE", + 2: "STANDBY", + 3: "OBSERVER", + } + HAServiceStateProto_value = map[string]int32{ + "INITIALIZING": 0, + "ACTIVE": 1, + "STANDBY": 2, + "OBSERVER": 3, + } +) func (x HAServiceStateProto) Enum() *HAServiceStateProto { p := new(HAServiceStateProto) *p = x return p } + func (x HAServiceStateProto) String() string { - return proto.EnumName(HAServiceStateProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HAServiceStateProto) Descriptor() protoreflect.EnumDescriptor { + return file_HAServiceProtocol_proto_enumTypes[0].Descriptor() +} + +func (HAServiceStateProto) Type() protoreflect.EnumType { + return &file_HAServiceProtocol_proto_enumTypes[0] } -func (x *HAServiceStateProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(HAServiceStateProto_value, data, "HAServiceStateProto") + +func (x HAServiceStateProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *HAServiceStateProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = HAServiceStateProto(value) + *x = HAServiceStateProto(num) return nil } -func (HAServiceStateProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor11, []int{0} } + +// Deprecated: Use HAServiceStateProto.Descriptor instead. +func (HAServiceStateProto) EnumDescriptor() ([]byte, []int) { + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{0} +} type HARequestSource int32 @@ -57,239 +112,881 @@ const ( HARequestSource_REQUEST_BY_ZKFC HARequestSource = 2 ) -var HARequestSource_name = map[int32]string{ - 0: "REQUEST_BY_USER", - 1: "REQUEST_BY_USER_FORCED", - 2: "REQUEST_BY_ZKFC", -} -var HARequestSource_value = map[string]int32{ - "REQUEST_BY_USER": 0, - "REQUEST_BY_USER_FORCED": 1, - "REQUEST_BY_ZKFC": 2, -} +// Enum value maps for HARequestSource. +var ( + HARequestSource_name = map[int32]string{ + 0: "REQUEST_BY_USER", + 1: "REQUEST_BY_USER_FORCED", + 2: "REQUEST_BY_ZKFC", + } + HARequestSource_value = map[string]int32{ + "REQUEST_BY_USER": 0, + "REQUEST_BY_USER_FORCED": 1, + "REQUEST_BY_ZKFC": 2, + } +) func (x HARequestSource) Enum() *HARequestSource { p := new(HARequestSource) *p = x return p } + func (x HARequestSource) String() string { - return proto.EnumName(HARequestSource_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (x *HARequestSource) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(HARequestSource_value, data, "HARequestSource") + +func (HARequestSource) Descriptor() protoreflect.EnumDescriptor { + return file_HAServiceProtocol_proto_enumTypes[1].Descriptor() +} + +func (HARequestSource) Type() protoreflect.EnumType { + return &file_HAServiceProtocol_proto_enumTypes[1] +} + +func (x HARequestSource) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *HARequestSource) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = HARequestSource(value) + *x = HARequestSource(num) return nil } -func (HARequestSource) EnumDescriptor() ([]byte, []int) { return fileDescriptor11, []int{1} } + +// Deprecated: Use HARequestSource.Descriptor instead. +func (HARequestSource) EnumDescriptor() ([]byte, []int) { + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{1} +} type HAStateChangeRequestInfoProto struct { - ReqSource *HARequestSource `protobuf:"varint,1,req,name=reqSource,enum=hadoop.common.HARequestSource" json:"reqSource,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReqSource *HARequestSource `protobuf:"varint,1,req,name=reqSource,enum=hadoop.common.HARequestSource" json:"reqSource,omitempty"` +} + +func (x *HAStateChangeRequestInfoProto) Reset() { + *x = HAStateChangeRequestInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HAServiceProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HAStateChangeRequestInfoProto) Reset() { *m = HAStateChangeRequestInfoProto{} } -func (m *HAStateChangeRequestInfoProto) String() string { return proto.CompactTextString(m) } -func (*HAStateChangeRequestInfoProto) ProtoMessage() {} -func (*HAStateChangeRequestInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{0} } +func (x *HAStateChangeRequestInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HAStateChangeRequestInfoProto) ProtoMessage() {} -func (m *HAStateChangeRequestInfoProto) GetReqSource() HARequestSource { - if m != nil && m.ReqSource != nil { - return *m.ReqSource +func (x *HAStateChangeRequestInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_HAServiceProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HAStateChangeRequestInfoProto.ProtoReflect.Descriptor instead. +func (*HAStateChangeRequestInfoProto) Descriptor() ([]byte, []int) { + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{0} +} + +func (x *HAStateChangeRequestInfoProto) GetReqSource() HARequestSource { + if x != nil && x.ReqSource != nil { + return *x.ReqSource } return HARequestSource_REQUEST_BY_USER } -// * +//* // void request type MonitorHealthRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MonitorHealthRequestProto) Reset() { + *x = MonitorHealthRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HAServiceProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *MonitorHealthRequestProto) Reset() { *m = MonitorHealthRequestProto{} } -func (m *MonitorHealthRequestProto) String() string { return proto.CompactTextString(m) } -func (*MonitorHealthRequestProto) ProtoMessage() {} -func (*MonitorHealthRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{1} } +func (x *MonitorHealthRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -// * +func (*MonitorHealthRequestProto) ProtoMessage() {} + +func (x *MonitorHealthRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_HAServiceProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MonitorHealthRequestProto.ProtoReflect.Descriptor instead. +func (*MonitorHealthRequestProto) Descriptor() ([]byte, []int) { + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{1} +} + +//* // void response type MonitorHealthResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MonitorHealthResponseProto) Reset() { + *x = MonitorHealthResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HAServiceProtocol_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MonitorHealthResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MonitorHealthResponseProto) ProtoMessage() {} + +func (x *MonitorHealthResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_HAServiceProtocol_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *MonitorHealthResponseProto) Reset() { *m = MonitorHealthResponseProto{} } -func (m *MonitorHealthResponseProto) String() string { return proto.CompactTextString(m) } -func (*MonitorHealthResponseProto) ProtoMessage() {} -func (*MonitorHealthResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{2} } +// Deprecated: Use MonitorHealthResponseProto.ProtoReflect.Descriptor instead. +func (*MonitorHealthResponseProto) Descriptor() ([]byte, []int) { + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{2} +} -// * +//* // void request type TransitionToActiveRequestProto struct { - ReqInfo *HAStateChangeRequestInfoProto `protobuf:"bytes,1,req,name=reqInfo" json:"reqInfo,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReqInfo *HAStateChangeRequestInfoProto `protobuf:"bytes,1,req,name=reqInfo" json:"reqInfo,omitempty"` +} + +func (x *TransitionToActiveRequestProto) Reset() { + *x = TransitionToActiveRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HAServiceProtocol_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TransitionToActiveRequestProto) Reset() { *m = TransitionToActiveRequestProto{} } -func (m *TransitionToActiveRequestProto) String() string { return proto.CompactTextString(m) } -func (*TransitionToActiveRequestProto) ProtoMessage() {} -func (*TransitionToActiveRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{3} } +func (x *TransitionToActiveRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *TransitionToActiveRequestProto) GetReqInfo() *HAStateChangeRequestInfoProto { - if m != nil { - return m.ReqInfo +func (*TransitionToActiveRequestProto) ProtoMessage() {} + +func (x *TransitionToActiveRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_HAServiceProtocol_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransitionToActiveRequestProto.ProtoReflect.Descriptor instead. +func (*TransitionToActiveRequestProto) Descriptor() ([]byte, []int) { + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{3} +} + +func (x *TransitionToActiveRequestProto) GetReqInfo() *HAStateChangeRequestInfoProto { + if x != nil { + return x.ReqInfo } return nil } -// * +//* // void response type TransitionToActiveResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TransitionToActiveResponseProto) Reset() { + *x = TransitionToActiveResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HAServiceProtocol_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransitionToActiveResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransitionToActiveResponseProto) ProtoMessage() {} + +func (x *TransitionToActiveResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_HAServiceProtocol_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *TransitionToActiveResponseProto) Reset() { *m = TransitionToActiveResponseProto{} } -func (m *TransitionToActiveResponseProto) String() string { return proto.CompactTextString(m) } -func (*TransitionToActiveResponseProto) ProtoMessage() {} +// Deprecated: Use TransitionToActiveResponseProto.ProtoReflect.Descriptor instead. func (*TransitionToActiveResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor11, []int{4} + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{4} } -// * +//* // void request type TransitionToStandbyRequestProto struct { - ReqInfo *HAStateChangeRequestInfoProto `protobuf:"bytes,1,req,name=reqInfo" json:"reqInfo,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReqInfo *HAStateChangeRequestInfoProto `protobuf:"bytes,1,req,name=reqInfo" json:"reqInfo,omitempty"` +} + +func (x *TransitionToStandbyRequestProto) Reset() { + *x = TransitionToStandbyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HAServiceProtocol_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransitionToStandbyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TransitionToStandbyRequestProto) Reset() { *m = TransitionToStandbyRequestProto{} } -func (m *TransitionToStandbyRequestProto) String() string { return proto.CompactTextString(m) } -func (*TransitionToStandbyRequestProto) ProtoMessage() {} +func (*TransitionToStandbyRequestProto) ProtoMessage() {} + +func (x *TransitionToStandbyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_HAServiceProtocol_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransitionToStandbyRequestProto.ProtoReflect.Descriptor instead. func (*TransitionToStandbyRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor11, []int{5} + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{5} } -func (m *TransitionToStandbyRequestProto) GetReqInfo() *HAStateChangeRequestInfoProto { - if m != nil { - return m.ReqInfo +func (x *TransitionToStandbyRequestProto) GetReqInfo() *HAStateChangeRequestInfoProto { + if x != nil { + return x.ReqInfo } return nil } -// * +//* // void response type TransitionToStandbyResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *TransitionToStandbyResponseProto) Reset() { *m = TransitionToStandbyResponseProto{} } -func (m *TransitionToStandbyResponseProto) String() string { return proto.CompactTextString(m) } -func (*TransitionToStandbyResponseProto) ProtoMessage() {} +func (x *TransitionToStandbyResponseProto) Reset() { + *x = TransitionToStandbyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HAServiceProtocol_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransitionToStandbyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransitionToStandbyResponseProto) ProtoMessage() {} + +func (x *TransitionToStandbyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_HAServiceProtocol_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransitionToStandbyResponseProto.ProtoReflect.Descriptor instead. func (*TransitionToStandbyResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor11, []int{6} + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{6} +} + +//* +// void request +type TransitionToObserverRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReqInfo *HAStateChangeRequestInfoProto `protobuf:"bytes,1,req,name=reqInfo" json:"reqInfo,omitempty"` +} + +func (x *TransitionToObserverRequestProto) Reset() { + *x = TransitionToObserverRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HAServiceProtocol_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransitionToObserverRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransitionToObserverRequestProto) ProtoMessage() {} + +func (x *TransitionToObserverRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_HAServiceProtocol_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransitionToObserverRequestProto.ProtoReflect.Descriptor instead. +func (*TransitionToObserverRequestProto) Descriptor() ([]byte, []int) { + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{7} +} + +func (x *TransitionToObserverRequestProto) GetReqInfo() *HAStateChangeRequestInfoProto { + if x != nil { + return x.ReqInfo + } + return nil +} + +//* +// void response +type TransitionToObserverResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TransitionToObserverResponseProto) Reset() { + *x = TransitionToObserverResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HAServiceProtocol_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransitionToObserverResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -// * +func (*TransitionToObserverResponseProto) ProtoMessage() {} + +func (x *TransitionToObserverResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_HAServiceProtocol_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransitionToObserverResponseProto.ProtoReflect.Descriptor instead. +func (*TransitionToObserverResponseProto) Descriptor() ([]byte, []int) { + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{8} +} + +//* // void request type GetServiceStatusRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *GetServiceStatusRequestProto) Reset() { *m = GetServiceStatusRequestProto{} } -func (m *GetServiceStatusRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetServiceStatusRequestProto) ProtoMessage() {} -func (*GetServiceStatusRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{7} } +func (x *GetServiceStatusRequestProto) Reset() { + *x = GetServiceStatusRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HAServiceProtocol_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetServiceStatusRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetServiceStatusRequestProto) ProtoMessage() {} + +func (x *GetServiceStatusRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_HAServiceProtocol_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} -// * +// Deprecated: Use GetServiceStatusRequestProto.ProtoReflect.Descriptor instead. +func (*GetServiceStatusRequestProto) Descriptor() ([]byte, []int) { + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{9} +} + +//* // Returns the state of the service type GetServiceStatusResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + State *HAServiceStateProto `protobuf:"varint,1,req,name=state,enum=hadoop.common.HAServiceStateProto" json:"state,omitempty"` // If state is STANDBY, indicate whether it is // ready to become active. ReadyToBecomeActive *bool `protobuf:"varint,2,opt,name=readyToBecomeActive" json:"readyToBecomeActive,omitempty"` // If not ready to become active, a textual explanation of why not - NotReadyReason *string `protobuf:"bytes,3,opt,name=notReadyReason" json:"notReadyReason,omitempty"` - XXX_unrecognized []byte `json:"-"` + NotReadyReason *string `protobuf:"bytes,3,opt,name=notReadyReason" json:"notReadyReason,omitempty"` } -func (m *GetServiceStatusResponseProto) Reset() { *m = GetServiceStatusResponseProto{} } -func (m *GetServiceStatusResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetServiceStatusResponseProto) ProtoMessage() {} -func (*GetServiceStatusResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{8} } +func (x *GetServiceStatusResponseProto) Reset() { + *x = GetServiceStatusResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HAServiceProtocol_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetServiceStatusResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetServiceStatusResponseProto) ProtoMessage() {} -func (m *GetServiceStatusResponseProto) GetState() HAServiceStateProto { - if m != nil && m.State != nil { - return *m.State +func (x *GetServiceStatusResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_HAServiceProtocol_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetServiceStatusResponseProto.ProtoReflect.Descriptor instead. +func (*GetServiceStatusResponseProto) Descriptor() ([]byte, []int) { + return file_HAServiceProtocol_proto_rawDescGZIP(), []int{10} +} + +func (x *GetServiceStatusResponseProto) GetState() HAServiceStateProto { + if x != nil && x.State != nil { + return *x.State } return HAServiceStateProto_INITIALIZING } -func (m *GetServiceStatusResponseProto) GetReadyToBecomeActive() bool { - if m != nil && m.ReadyToBecomeActive != nil { - return *m.ReadyToBecomeActive +func (x *GetServiceStatusResponseProto) GetReadyToBecomeActive() bool { + if x != nil && x.ReadyToBecomeActive != nil { + return *x.ReadyToBecomeActive } return false } -func (m *GetServiceStatusResponseProto) GetNotReadyReason() string { - if m != nil && m.NotReadyReason != nil { - return *m.NotReadyReason +func (x *GetServiceStatusResponseProto) GetNotReadyReason() string { + if x != nil && x.NotReadyReason != nil { + return *x.NotReadyReason } return "" } -func init() { - proto.RegisterType((*HAStateChangeRequestInfoProto)(nil), "hadoop.common.HAStateChangeRequestInfoProto") - proto.RegisterType((*MonitorHealthRequestProto)(nil), "hadoop.common.MonitorHealthRequestProto") - proto.RegisterType((*MonitorHealthResponseProto)(nil), "hadoop.common.MonitorHealthResponseProto") - proto.RegisterType((*TransitionToActiveRequestProto)(nil), "hadoop.common.TransitionToActiveRequestProto") - proto.RegisterType((*TransitionToActiveResponseProto)(nil), "hadoop.common.TransitionToActiveResponseProto") - proto.RegisterType((*TransitionToStandbyRequestProto)(nil), "hadoop.common.TransitionToStandbyRequestProto") - proto.RegisterType((*TransitionToStandbyResponseProto)(nil), "hadoop.common.TransitionToStandbyResponseProto") - proto.RegisterType((*GetServiceStatusRequestProto)(nil), "hadoop.common.GetServiceStatusRequestProto") - proto.RegisterType((*GetServiceStatusResponseProto)(nil), "hadoop.common.GetServiceStatusResponseProto") - proto.RegisterEnum("hadoop.common.HAServiceStateProto", HAServiceStateProto_name, HAServiceStateProto_value) - proto.RegisterEnum("hadoop.common.HARequestSource", HARequestSource_name, HARequestSource_value) -} - -func init() { proto.RegisterFile("HAServiceProtocol.proto", fileDescriptor11) } - -var fileDescriptor11 = []byte{ - // 529 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xdd, 0x6e, 0xd3, 0x30, - 0x14, 0x9e, 0x3b, 0xc1, 0xd8, 0x19, 0xdb, 0x22, 0x57, 0x82, 0x12, 0xb6, 0x52, 0x72, 0x81, 0xca, - 0x18, 0x01, 0xf5, 0x0a, 0x09, 0x2e, 0x48, 0xbb, 0x74, 0x8d, 0x80, 0x02, 0x4e, 0x06, 0xda, 0x24, - 0x54, 0x99, 0xd4, 0x34, 0x91, 0x16, 0xbb, 0x4d, 0xdc, 0x4a, 0x7b, 0x03, 0x1e, 0x83, 0x77, 0xe0, - 0x75, 0x78, 0x18, 0x94, 0x26, 0xd3, 0xd2, 0x24, 0x84, 0xdd, 0xec, 0x2a, 0x89, 0xfd, 0xfd, 0xc5, - 0xe7, 0x1c, 0xc3, 0xfd, 0x81, 0x61, 0xb3, 0x70, 0xe1, 0xbb, 0xec, 0x53, 0x28, 0xa4, 0x70, 0xc5, - 0xb9, 0x3e, 0x8d, 0x5f, 0xf0, 0xb6, 0x47, 0xc7, 0x42, 0x4c, 0x75, 0x57, 0x04, 0x81, 0xe0, 0xda, - 0x37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xcb, 0x89, 0x54, - 0x4d, 0x80, 0x7a, 0xf8, 0x5f, 0x70, 0xc6, 0xae, 0xfb, 0x1a, 0x54, 0x11, 0x4e, 0x74, 0x3a, 0xa5, - 0xae, 0xc7, 0x2e, 0x99, 0x1e, 0x4d, 0xae, 0xcc, 0x6e, 0xf1, 0x2e, 0x5d, 0x3e, 0xa3, 0x9f, 0x08, - 0xfd, 0x42, 0xe8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, 0xd8, 0x57, 0xbf, 0x6b, 0x05, 0x00, - 0x00, +var File_HAServiceProtocol_proto protoreflect.FileDescriptor + +var file_HAServiceProtocol_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x48, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x1d, 0x48, 0x41, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x71, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x41, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, + 0x71, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x6f, 0x6e, 0x69, 0x74, + 0x6f, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x68, 0x0a, 0x1e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x46, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x49, 0x6e, 0x66, 0x6f, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x41, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x72, 0x65, 0x71, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x21, 0x0a, 0x1f, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x69, 0x0a, 0x1f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x53, + 0x74, 0x61, 0x6e, 0x64, 0x62, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x46, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x41, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x07, 0x72, 0x65, 0x71, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x22, 0x0a, 0x20, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x62, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, + 0x0a, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x46, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x41, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x07, 0x72, 0x65, 0x71, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x23, 0x0a, 0x21, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x1e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xb3, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x38, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, + 0x32, 0x22, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x48, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x72, + 0x65, 0x61, 0x64, 0x79, 0x54, 0x6f, 0x42, 0x65, 0x63, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, + 0x6f, 0x42, 0x65, 0x63, 0x6f, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x26, 0x0a, + 0x0e, 0x6e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2a, 0x4e, 0x0a, 0x13, 0x48, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x0c, + 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0a, + 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, + 0x41, 0x4e, 0x44, 0x42, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x42, 0x53, 0x45, 0x52, + 0x56, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x57, 0x0a, 0x0f, 0x48, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x51, 0x55, + 0x45, 0x53, 0x54, 0x5f, 0x42, 0x59, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x00, 0x12, 0x1a, 0x0a, + 0x16, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x42, 0x59, 0x5f, 0x55, 0x53, 0x45, 0x52, + 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x51, + 0x55, 0x45, 0x53, 0x54, 0x5f, 0x42, 0x59, 0x5f, 0x5a, 0x4b, 0x46, 0x43, 0x10, 0x02, 0x32, 0xd7, + 0x04, 0x0a, 0x18, 0x48, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x6d, + 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x28, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x6e, + 0x69, 0x74, 0x6f, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x73, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x76, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x62, 0x79, 0x12, 0x2e, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x62, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x62, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x79, + 0x0a, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x6f, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x6d, 0x0a, 0x10, 0x67, 0x65, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x79, 0x0a, 0x1a, 0x6f, 0x72, 0x67, 0x2e, + 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x17, 0x48, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, + 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, + 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0xa0, 0x01, 0x01, +} + +var ( + file_HAServiceProtocol_proto_rawDescOnce sync.Once + file_HAServiceProtocol_proto_rawDescData = file_HAServiceProtocol_proto_rawDesc +) + +func file_HAServiceProtocol_proto_rawDescGZIP() []byte { + file_HAServiceProtocol_proto_rawDescOnce.Do(func() { + file_HAServiceProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_HAServiceProtocol_proto_rawDescData) + }) + return file_HAServiceProtocol_proto_rawDescData +} + +var file_HAServiceProtocol_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_HAServiceProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_HAServiceProtocol_proto_goTypes = []interface{}{ + (HAServiceStateProto)(0), // 0: hadoop.common.HAServiceStateProto + (HARequestSource)(0), // 1: hadoop.common.HARequestSource + (*HAStateChangeRequestInfoProto)(nil), // 2: hadoop.common.HAStateChangeRequestInfoProto + (*MonitorHealthRequestProto)(nil), // 3: hadoop.common.MonitorHealthRequestProto + (*MonitorHealthResponseProto)(nil), // 4: hadoop.common.MonitorHealthResponseProto + (*TransitionToActiveRequestProto)(nil), // 5: hadoop.common.TransitionToActiveRequestProto + (*TransitionToActiveResponseProto)(nil), // 6: hadoop.common.TransitionToActiveResponseProto + (*TransitionToStandbyRequestProto)(nil), // 7: hadoop.common.TransitionToStandbyRequestProto + (*TransitionToStandbyResponseProto)(nil), // 8: hadoop.common.TransitionToStandbyResponseProto + (*TransitionToObserverRequestProto)(nil), // 9: hadoop.common.TransitionToObserverRequestProto + (*TransitionToObserverResponseProto)(nil), // 10: hadoop.common.TransitionToObserverResponseProto + (*GetServiceStatusRequestProto)(nil), // 11: hadoop.common.GetServiceStatusRequestProto + (*GetServiceStatusResponseProto)(nil), // 12: hadoop.common.GetServiceStatusResponseProto +} +var file_HAServiceProtocol_proto_depIdxs = []int32{ + 1, // 0: hadoop.common.HAStateChangeRequestInfoProto.reqSource:type_name -> hadoop.common.HARequestSource + 2, // 1: hadoop.common.TransitionToActiveRequestProto.reqInfo:type_name -> hadoop.common.HAStateChangeRequestInfoProto + 2, // 2: hadoop.common.TransitionToStandbyRequestProto.reqInfo:type_name -> hadoop.common.HAStateChangeRequestInfoProto + 2, // 3: hadoop.common.TransitionToObserverRequestProto.reqInfo:type_name -> hadoop.common.HAStateChangeRequestInfoProto + 0, // 4: hadoop.common.GetServiceStatusResponseProto.state:type_name -> hadoop.common.HAServiceStateProto + 3, // 5: hadoop.common.HAServiceProtocolService.monitorHealth:input_type -> hadoop.common.MonitorHealthRequestProto + 5, // 6: hadoop.common.HAServiceProtocolService.transitionToActive:input_type -> hadoop.common.TransitionToActiveRequestProto + 7, // 7: hadoop.common.HAServiceProtocolService.transitionToStandby:input_type -> hadoop.common.TransitionToStandbyRequestProto + 9, // 8: hadoop.common.HAServiceProtocolService.transitionToObserver:input_type -> hadoop.common.TransitionToObserverRequestProto + 11, // 9: hadoop.common.HAServiceProtocolService.getServiceStatus:input_type -> hadoop.common.GetServiceStatusRequestProto + 4, // 10: hadoop.common.HAServiceProtocolService.monitorHealth:output_type -> hadoop.common.MonitorHealthResponseProto + 6, // 11: hadoop.common.HAServiceProtocolService.transitionToActive:output_type -> hadoop.common.TransitionToActiveResponseProto + 8, // 12: hadoop.common.HAServiceProtocolService.transitionToStandby:output_type -> hadoop.common.TransitionToStandbyResponseProto + 10, // 13: hadoop.common.HAServiceProtocolService.transitionToObserver:output_type -> hadoop.common.TransitionToObserverResponseProto + 12, // 14: hadoop.common.HAServiceProtocolService.getServiceStatus:output_type -> hadoop.common.GetServiceStatusResponseProto + 10, // [10:15] is the sub-list for method output_type + 5, // [5:10] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_HAServiceProtocol_proto_init() } +func file_HAServiceProtocol_proto_init() { + if File_HAServiceProtocol_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_HAServiceProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HAStateChangeRequestInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HAServiceProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MonitorHealthRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HAServiceProtocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MonitorHealthResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HAServiceProtocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransitionToActiveRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HAServiceProtocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransitionToActiveResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HAServiceProtocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransitionToStandbyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HAServiceProtocol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransitionToStandbyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HAServiceProtocol_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransitionToObserverRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HAServiceProtocol_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransitionToObserverResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HAServiceProtocol_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetServiceStatusRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HAServiceProtocol_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetServiceStatusResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_HAServiceProtocol_proto_rawDesc, + NumEnums: 2, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_HAServiceProtocol_proto_goTypes, + DependencyIndexes: file_HAServiceProtocol_proto_depIdxs, + EnumInfos: file_HAServiceProtocol_proto_enumTypes, + MessageInfos: file_HAServiceProtocol_proto_msgTypes, + }.Build() + File_HAServiceProtocol_proto = out.File + file_HAServiceProtocol_proto_rawDesc = nil + file_HAServiceProtocol_proto_goTypes = nil + file_HAServiceProtocol_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/HAServiceProtocol.proto b/internal/protocol/hadoop_common/HAServiceProtocol.proto index e0060f25..356f81b4 100644 --- a/internal/protocol/hadoop_common/HAServiceProtocol.proto +++ b/internal/protocol/hadoop_common/HAServiceProtocol.proto @@ -21,17 +21,19 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.ha.proto"; option java_outer_classname = "HAServiceProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; enum HAServiceStateProto { INITIALIZING = 0; ACTIVE = 1; STANDBY = 2; + OBSERVER = 3; } enum HARequestSource { @@ -82,6 +84,19 @@ message TransitionToStandbyRequestProto { message TransitionToStandbyResponseProto { } +/** + * void request + */ +message TransitionToObserverRequestProto { + required HAStateChangeRequestInfoProto reqInfo = 1; +} + +/** + * void response + */ +message TransitionToObserverResponseProto { +} + /** * void request */ @@ -126,6 +141,12 @@ service HAServiceProtocolService { rpc transitionToStandby(TransitionToStandbyRequestProto) returns(TransitionToStandbyResponseProto); + /** + * Request service to transition to observer state. + */ + rpc transitionToObserver(TransitionToObserverRequestProto) + returns(TransitionToObserverResponseProto); + /** * Get the current status of the service. */ diff --git a/internal/protocol/hadoop_common/IpcConnectionContext.pb.go b/internal/protocol/hadoop_common/IpcConnectionContext.pb.go index 7f621594..3596ec40 100644 --- a/internal/protocol/hadoop_common/IpcConnectionContext.pb.go +++ b/internal/protocol/hadoop_common/IpcConnectionContext.pb.go @@ -1,177 +1,268 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: IpcConnectionContext.proto -/* -Package hadoop_common is a generated protocol buffer package. - -It is generated from these files: - IpcConnectionContext.proto - ZKFCProtocol.proto - RefreshAuthorizationPolicyProtocol.proto - GenericRefreshProtocol.proto - RpcHeader.proto - TraceAdmin.proto - RefreshCallQueueProtocol.proto - Security.proto - ProtobufRpcEngine.proto - RefreshUserMappingsProtocol.proto - GetUserMappingsProtocol.proto - HAServiceProtocol.proto - ProtocolInfo.proto - -It has these top-level messages: - UserInformationProto - IpcConnectionContextProto - CedeActiveRequestProto - CedeActiveResponseProto - GracefulFailoverRequestProto - GracefulFailoverResponseProto - RefreshServiceAclRequestProto - RefreshServiceAclResponseProto - GenericRefreshRequestProto - GenericRefreshResponseProto - GenericRefreshResponseCollectionProto - RPCTraceInfoProto - RPCCallerContextProto - RpcRequestHeaderProto - RpcResponseHeaderProto - RpcSaslProto - ListSpanReceiversRequestProto - SpanReceiverListInfo - ListSpanReceiversResponseProto - ConfigPair - AddSpanReceiverRequestProto - AddSpanReceiverResponseProto - RemoveSpanReceiverRequestProto - RemoveSpanReceiverResponseProto - RefreshCallQueueRequestProto - RefreshCallQueueResponseProto - TokenProto - GetDelegationTokenRequestProto - GetDelegationTokenResponseProto - RenewDelegationTokenRequestProto - RenewDelegationTokenResponseProto - CancelDelegationTokenRequestProto - CancelDelegationTokenResponseProto - RequestHeaderProto - RefreshUserToGroupsMappingsRequestProto - RefreshUserToGroupsMappingsResponseProto - RefreshSuperUserGroupsConfigurationRequestProto - RefreshSuperUserGroupsConfigurationResponseProto - GetGroupsForUserRequestProto - GetGroupsForUserResponseProto - HAStateChangeRequestInfoProto - MonitorHealthRequestProto - MonitorHealthResponseProto - TransitionToActiveRequestProto - TransitionToActiveResponseProto - TransitionToStandbyRequestProto - TransitionToStandbyResponseProto - GetServiceStatusRequestProto - GetServiceStatusResponseProto - GetProtocolVersionsRequestProto - ProtocolVersionProto - GetProtocolVersionsResponseProto - GetProtocolSignatureRequestProto - GetProtocolSignatureResponseProto - ProtocolSignatureProto -*/ package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // Spec for UserInformationProto is specified in ProtoUtil#makeIpcConnectionContext type UserInformationProto struct { - EffectiveUser *string `protobuf:"bytes,1,opt,name=effectiveUser" json:"effectiveUser,omitempty"` - RealUser *string `protobuf:"bytes,2,opt,name=realUser" json:"realUser,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EffectiveUser *string `protobuf:"bytes,1,opt,name=effectiveUser" json:"effectiveUser,omitempty"` + RealUser *string `protobuf:"bytes,2,opt,name=realUser" json:"realUser,omitempty"` +} + +func (x *UserInformationProto) Reset() { + *x = UserInformationProto{} + if protoimpl.UnsafeEnabled { + mi := &file_IpcConnectionContext_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserInformationProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UserInformationProto) Reset() { *m = UserInformationProto{} } -func (m *UserInformationProto) String() string { return proto.CompactTextString(m) } -func (*UserInformationProto) ProtoMessage() {} -func (*UserInformationProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*UserInformationProto) ProtoMessage() {} -func (m *UserInformationProto) GetEffectiveUser() string { - if m != nil && m.EffectiveUser != nil { - return *m.EffectiveUser +func (x *UserInformationProto) ProtoReflect() protoreflect.Message { + mi := &file_IpcConnectionContext_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserInformationProto.ProtoReflect.Descriptor instead. +func (*UserInformationProto) Descriptor() ([]byte, []int) { + return file_IpcConnectionContext_proto_rawDescGZIP(), []int{0} +} + +func (x *UserInformationProto) GetEffectiveUser() string { + if x != nil && x.EffectiveUser != nil { + return *x.EffectiveUser } return "" } -func (m *UserInformationProto) GetRealUser() string { - if m != nil && m.RealUser != nil { - return *m.RealUser +func (x *UserInformationProto) GetRealUser() string { + if x != nil && x.RealUser != nil { + return *x.RealUser } return "" } -// * +//* // The connection context is sent as part of the connection establishment. // It establishes the context for ALL Rpc calls within the connection. type IpcConnectionContextProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // UserInfo beyond what is determined as part of security handshake // at connection time (kerberos, tokens etc). UserInfo *UserInformationProto `protobuf:"bytes,2,opt,name=userInfo" json:"userInfo,omitempty"` // Protocol name for next rpc layer. // The client created a proxy with this protocol name - Protocol *string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"` - XXX_unrecognized []byte `json:"-"` + Protocol *string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"` +} + +func (x *IpcConnectionContextProto) Reset() { + *x = IpcConnectionContextProto{} + if protoimpl.UnsafeEnabled { + mi := &file_IpcConnectionContext_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *IpcConnectionContextProto) Reset() { *m = IpcConnectionContextProto{} } -func (m *IpcConnectionContextProto) String() string { return proto.CompactTextString(m) } -func (*IpcConnectionContextProto) ProtoMessage() {} -func (*IpcConnectionContextProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (x *IpcConnectionContextProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IpcConnectionContextProto) ProtoMessage() {} -func (m *IpcConnectionContextProto) GetUserInfo() *UserInformationProto { - if m != nil { - return m.UserInfo +func (x *IpcConnectionContextProto) ProtoReflect() protoreflect.Message { + mi := &file_IpcConnectionContext_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IpcConnectionContextProto.ProtoReflect.Descriptor instead. +func (*IpcConnectionContextProto) Descriptor() ([]byte, []int) { + return file_IpcConnectionContext_proto_rawDescGZIP(), []int{1} +} + +func (x *IpcConnectionContextProto) GetUserInfo() *UserInformationProto { + if x != nil { + return x.UserInfo } return nil } -func (m *IpcConnectionContextProto) GetProtocol() string { - if m != nil && m.Protocol != nil { - return *m.Protocol +func (x *IpcConnectionContextProto) GetProtocol() string { + if x != nil && x.Protocol != nil { + return *x.Protocol } return "" } -func init() { - proto.RegisterType((*UserInformationProto)(nil), "hadoop.common.UserInformationProto") - proto.RegisterType((*IpcConnectionContextProto)(nil), "hadoop.common.IpcConnectionContextProto") -} - -func init() { proto.RegisterFile("IpcConnectionContext.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 199 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xf2, 0x2c, 0x48, 0x76, - 0xce, 0xcf, 0xcb, 0x4b, 0x4d, 0x2e, 0xc9, 0xcc, 0xcf, 0x73, 0xce, 0xcf, 0x2b, 0x49, 0xad, 0x28, - 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcd, 0x48, 0x4c, 0xc9, 0xcf, 0x2f, 0xd0, 0x4b, - 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0x53, 0x8a, 0xe0, 0x12, 0x09, 0x2d, 0x4e, 0x2d, 0xf2, 0xcc, 0x4b, - 0xcb, 0x2f, 0xca, 0x4d, 0x04, 0x29, 0x0f, 0x00, 0x2b, 0x53, 0xe1, 0xe2, 0x4d, 0x4d, 0x4b, 0x03, - 0x19, 0x50, 0x96, 0x0a, 0x52, 0x20, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x84, 0x2a, 0x28, 0x24, - 0xc5, 0xc5, 0x51, 0x94, 0x9a, 0x98, 0x03, 0x56, 0xc0, 0x04, 0x56, 0x00, 0xe7, 0x2b, 0x55, 0x70, - 0x49, 0x62, 0x73, 0x06, 0xc4, 0x78, 0x7b, 0x2e, 0x8e, 0x52, 0xa8, 0xb5, 0x60, 0x8d, 0xdc, 0x46, - 0xca, 0x7a, 0x28, 0x0e, 0xd3, 0xc3, 0xe6, 0xaa, 0x20, 0xb8, 0x26, 0x90, 0xcd, 0x60, 0xff, 0x24, - 0xe7, 0xe7, 0x48, 0x30, 0x43, 0x6c, 0x86, 0xf1, 0x9d, 0xec, 0xb9, 0xe4, 0xf2, 0x8b, 0xd2, 0xf5, - 0x12, 0x0b, 0x12, 0x93, 0x33, 0x52, 0x61, 0xc6, 0x66, 0x16, 0x24, 0x43, 0x42, 0x20, 0xa9, 0x34, - 0xcd, 0x49, 0x0a, 0xa7, 0xcb, 0x8a, 0x17, 0x30, 0x32, 0x02, 0x02, 0x00, 0x00, 0xff, 0xff, 0x94, - 0x05, 0xde, 0x49, 0x40, 0x01, 0x00, 0x00, +var File_IpcConnectionContext_proto protoreflect.FileDescriptor + +var file_IpcConnectionContext_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x49, 0x70, 0x63, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x58, 0x0a, 0x14, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x61, + 0x6c, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x61, + 0x6c, 0x55, 0x73, 0x65, 0x72, 0x22, 0x78, 0x0a, 0x19, 0x49, 0x70, 0x63, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, + 0x7d, 0x0a, 0x1e, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x69, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x42, 0x1a, 0x49, 0x70, 0x63, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3c, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, + 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0xa0, 0x01, 0x01, +} + +var ( + file_IpcConnectionContext_proto_rawDescOnce sync.Once + file_IpcConnectionContext_proto_rawDescData = file_IpcConnectionContext_proto_rawDesc +) + +func file_IpcConnectionContext_proto_rawDescGZIP() []byte { + file_IpcConnectionContext_proto_rawDescOnce.Do(func() { + file_IpcConnectionContext_proto_rawDescData = protoimpl.X.CompressGZIP(file_IpcConnectionContext_proto_rawDescData) + }) + return file_IpcConnectionContext_proto_rawDescData +} + +var file_IpcConnectionContext_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_IpcConnectionContext_proto_goTypes = []interface{}{ + (*UserInformationProto)(nil), // 0: hadoop.common.UserInformationProto + (*IpcConnectionContextProto)(nil), // 1: hadoop.common.IpcConnectionContextProto +} +var file_IpcConnectionContext_proto_depIdxs = []int32{ + 0, // 0: hadoop.common.IpcConnectionContextProto.userInfo:type_name -> hadoop.common.UserInformationProto + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_IpcConnectionContext_proto_init() } +func file_IpcConnectionContext_proto_init() { + if File_IpcConnectionContext_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_IpcConnectionContext_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserInformationProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_IpcConnectionContext_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IpcConnectionContextProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_IpcConnectionContext_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_IpcConnectionContext_proto_goTypes, + DependencyIndexes: file_IpcConnectionContext_proto_depIdxs, + MessageInfos: file_IpcConnectionContext_proto_msgTypes, + }.Build() + File_IpcConnectionContext_proto = out.File + file_IpcConnectionContext_proto_rawDesc = nil + file_IpcConnectionContext_proto_goTypes = nil + file_IpcConnectionContext_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/IpcConnectionContext.proto b/internal/protocol/hadoop_common/IpcConnectionContext.proto index 4557e893..3cfbe515 100644 --- a/internal/protocol/hadoop_common/IpcConnectionContext.proto +++ b/internal/protocol/hadoop_common/IpcConnectionContext.proto @@ -21,10 +21,11 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.ipc.protobuf"; option java_outer_classname = "IpcConnectionContextProtos"; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; /** diff --git a/internal/protocol/hadoop_common/ProtobufRpcEngine.pb.go b/internal/protocol/hadoop_common/ProtobufRpcEngine.pb.go index 6321f81b..1e2d18e9 100644 --- a/internal/protocol/hadoop_common/ProtobufRpcEngine.pb.go +++ b/internal/protocol/hadoop_common/ProtobufRpcEngine.pb.go @@ -1,18 +1,48 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: ProtobufRpcEngine.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // This message is the header for the Protobuf Rpc Engine // when sending a RPC request from RPC client to the RPC server. // The actual request (serialized as protobuf) follows this request. @@ -20,9 +50,13 @@ var _ = math.Inf // No special header is needed for the Rpc Response for Protobuf Rpc Engine. // The normal RPC response header (see RpcHeader.proto) are sufficient. type RequestHeaderProto struct { - // * Name of the RPC method + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + //* Name of the RPC method MethodName *string `protobuf:"bytes,1,req,name=methodName" json:"methodName,omitempty"` - // * + //* // RPCs for a particular interface (ie protocol) are done using a // IPC connection that is setup using rpcProxy. // The rpcProxy's has a declared protocol name that is @@ -37,56 +71,149 @@ type RequestHeaderProto struct { // ProtocolInfoProto) since they reuse the connection; in this case // the declaringClassProtocolName field is set to the ProtocolInfoProto DeclaringClassProtocolName *string `protobuf:"bytes,2,req,name=declaringClassProtocolName" json:"declaringClassProtocolName,omitempty"` - // * protocol version of class declaring the called method + //* protocol version of class declaring the called method ClientProtocolVersion *uint64 `protobuf:"varint,3,req,name=clientProtocolVersion" json:"clientProtocolVersion,omitempty"` - XXX_unrecognized []byte `json:"-"` } -func (m *RequestHeaderProto) Reset() { *m = RequestHeaderProto{} } -func (m *RequestHeaderProto) String() string { return proto.CompactTextString(m) } -func (*RequestHeaderProto) ProtoMessage() {} -func (*RequestHeaderProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{0} } +func (x *RequestHeaderProto) Reset() { + *x = RequestHeaderProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ProtobufRpcEngine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RequestHeaderProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestHeaderProto) ProtoMessage() {} + +func (x *RequestHeaderProto) ProtoReflect() protoreflect.Message { + mi := &file_ProtobufRpcEngine_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestHeaderProto.ProtoReflect.Descriptor instead. +func (*RequestHeaderProto) Descriptor() ([]byte, []int) { + return file_ProtobufRpcEngine_proto_rawDescGZIP(), []int{0} +} -func (m *RequestHeaderProto) GetMethodName() string { - if m != nil && m.MethodName != nil { - return *m.MethodName +func (x *RequestHeaderProto) GetMethodName() string { + if x != nil && x.MethodName != nil { + return *x.MethodName } return "" } -func (m *RequestHeaderProto) GetDeclaringClassProtocolName() string { - if m != nil && m.DeclaringClassProtocolName != nil { - return *m.DeclaringClassProtocolName +func (x *RequestHeaderProto) GetDeclaringClassProtocolName() string { + if x != nil && x.DeclaringClassProtocolName != nil { + return *x.DeclaringClassProtocolName } return "" } -func (m *RequestHeaderProto) GetClientProtocolVersion() uint64 { - if m != nil && m.ClientProtocolVersion != nil { - return *m.ClientProtocolVersion +func (x *RequestHeaderProto) GetClientProtocolVersion() uint64 { + if x != nil && x.ClientProtocolVersion != nil { + return *x.ClientProtocolVersion } return 0 } -func init() { - proto.RegisterType((*RequestHeaderProto)(nil), "hadoop.common.RequestHeaderProto") +var File_ProtobufRpcEngine_proto protoreflect.FileDescriptor + +var file_ProtobufRpcEngine_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x52, 0x70, 0x63, 0x45, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xaa, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1e, 0x0a, 0x0a, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x3e, 0x0a, 0x1a, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x02, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x34, 0x0a, 0x15, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x15, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x7a, 0x0a, 0x1e, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, + 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x69, 0x70, 0x63, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x17, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x52, 0x70, 0x63, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, + 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, + 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0xa0, 0x01, + 0x01, +} + +var ( + file_ProtobufRpcEngine_proto_rawDescOnce sync.Once + file_ProtobufRpcEngine_proto_rawDescData = file_ProtobufRpcEngine_proto_rawDesc +) + +func file_ProtobufRpcEngine_proto_rawDescGZIP() []byte { + file_ProtobufRpcEngine_proto_rawDescOnce.Do(func() { + file_ProtobufRpcEngine_proto_rawDescData = protoimpl.X.CompressGZIP(file_ProtobufRpcEngine_proto_rawDescData) + }) + return file_ProtobufRpcEngine_proto_rawDescData +} + +var file_ProtobufRpcEngine_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_ProtobufRpcEngine_proto_goTypes = []interface{}{ + (*RequestHeaderProto)(nil), // 0: hadoop.common.RequestHeaderProto +} +var file_ProtobufRpcEngine_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } -func init() { proto.RegisterFile("ProtobufRpcEngine.proto", fileDescriptor8) } - -var fileDescriptor8 = []byte{ - // 197 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x8f, 0xb1, 0x6a, 0xc3, 0x30, - 0x14, 0x45, 0x91, 0xdb, 0xa5, 0x82, 0x2e, 0x82, 0x52, 0xd3, 0xc1, 0x98, 0x4e, 0x9e, 0x34, 0x75, - 0x2c, 0x1d, 0x5c, 0x0a, 0x9d, 0x42, 0xd0, 0x90, 0x5d, 0x96, 0x9e, 0x6d, 0x81, 0xa4, 0xa7, 0x48, - 0xf2, 0xff, 0x64, 0xce, 0x57, 0x86, 0x28, 0x09, 0x04, 0x12, 0xb2, 0x9e, 0x7b, 0xee, 0x70, 0xe8, - 0xfb, 0x3a, 0x62, 0xc6, 0x61, 0x19, 0x45, 0x50, 0x7f, 0x7e, 0x32, 0x1e, 0x78, 0x38, 0x12, 0xf6, - 0x3a, 0x4b, 0x8d, 0x18, 0xb8, 0x42, 0xe7, 0xd0, 0x7f, 0xee, 0x09, 0x65, 0x02, 0xb6, 0x0b, 0xa4, - 0xfc, 0x0f, 0x52, 0x43, 0x2c, 0x3f, 0xd6, 0x50, 0xea, 0x20, 0xcf, 0xa8, 0x57, 0xd2, 0x41, 0x4d, - 0xda, 0xaa, 0x7b, 0x11, 0x57, 0x84, 0xfd, 0xd0, 0x0f, 0x0d, 0xca, 0xca, 0x68, 0xfc, 0xf4, 0x6b, - 0x65, 0x4a, 0xe5, 0xa6, 0xd0, 0x16, 0xbf, 0x2a, 0xfe, 0x03, 0x83, 0x7d, 0xd1, 0x37, 0x65, 0x0d, - 0xf8, 0x7c, 0xa1, 0x1b, 0x88, 0xc9, 0xa0, 0xaf, 0x9f, 0xda, 0xaa, 0x7b, 0x16, 0xf7, 0xc7, 0xfe, - 0x9b, 0x36, 0x18, 0x27, 0x2e, 0x83, 0x54, 0x33, 0xf0, 0x73, 0x88, 0x09, 0xea, 0x94, 0x36, 0x2c, - 0x63, 0x7f, 0x9b, 0x5d, 0x40, 0xda, 0x11, 0x72, 0x08, 0x00, 0x00, 0xff, 0xff, 0xd8, 0xe2, 0xf0, - 0x01, 0x13, 0x01, 0x00, 0x00, +func init() { file_ProtobufRpcEngine_proto_init() } +func file_ProtobufRpcEngine_proto_init() { + if File_ProtobufRpcEngine_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ProtobufRpcEngine_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RequestHeaderProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ProtobufRpcEngine_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ProtobufRpcEngine_proto_goTypes, + DependencyIndexes: file_ProtobufRpcEngine_proto_depIdxs, + MessageInfos: file_ProtobufRpcEngine_proto_msgTypes, + }.Build() + File_ProtobufRpcEngine_proto = out.File + file_ProtobufRpcEngine_proto_rawDesc = nil + file_ProtobufRpcEngine_proto_goTypes = nil + file_ProtobufRpcEngine_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/ProtobufRpcEngine.proto b/internal/protocol/hadoop_common/ProtobufRpcEngine.proto index a17e2078..774fba43 100644 --- a/internal/protocol/hadoop_common/ProtobufRpcEngine.proto +++ b/internal/protocol/hadoop_common/ProtobufRpcEngine.proto @@ -21,7 +21,7 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; /** * These are the messages used by Hadoop RPC for the Rpc Engine Protocol Buffer * to marshal the request and response in the RPC layer. @@ -31,6 +31,7 @@ option java_package = "org.apache.hadoop.ipc.protobuf"; option java_outer_classname = "ProtobufRpcEngineProtos"; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; /** diff --git a/internal/protocol/hadoop_common/ProtocolInfo.pb.go b/internal/protocol/hadoop_common/ProtocolInfo.pb.go index 9c858f09..00fe69ff 100644 --- a/internal/protocol/hadoop_common/ProtocolInfo.pb.go +++ b/internal/protocol/hadoop_common/ProtocolInfo.pb.go @@ -1,194 +1,559 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: ProtocolInfo.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // Request to get protocol versions for all supported rpc kinds. type GetProtocolVersionsRequestProto struct { - Protocol *string `protobuf:"bytes,1,req,name=protocol" json:"protocol,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Protocol *string `protobuf:"bytes,1,req,name=protocol" json:"protocol,omitempty"` // Protocol name +} + +func (x *GetProtocolVersionsRequestProto) Reset() { + *x = GetProtocolVersionsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ProtocolInfo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetProtocolVersionsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetProtocolVersionsRequestProto) Reset() { *m = GetProtocolVersionsRequestProto{} } -func (m *GetProtocolVersionsRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetProtocolVersionsRequestProto) ProtoMessage() {} +func (*GetProtocolVersionsRequestProto) ProtoMessage() {} + +func (x *GetProtocolVersionsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ProtocolInfo_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProtocolVersionsRequestProto.ProtoReflect.Descriptor instead. func (*GetProtocolVersionsRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor12, []int{0} + return file_ProtocolInfo_proto_rawDescGZIP(), []int{0} } -func (m *GetProtocolVersionsRequestProto) GetProtocol() string { - if m != nil && m.Protocol != nil { - return *m.Protocol +func (x *GetProtocolVersionsRequestProto) GetProtocol() string { + if x != nil && x.Protocol != nil { + return *x.Protocol } return "" } -// * +//* // Protocol version with corresponding rpc kind. type ProtocolVersionProto struct { - RpcKind *string `protobuf:"bytes,1,req,name=rpcKind" json:"rpcKind,omitempty"` - Versions []uint64 `protobuf:"varint,2,rep,name=versions" json:"versions,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RpcKind *string `protobuf:"bytes,1,req,name=rpcKind" json:"rpcKind,omitempty"` //RPC kind + Versions []uint64 `protobuf:"varint,2,rep,name=versions" json:"versions,omitempty"` //Protocol version corresponding to the rpc kind. +} + +func (x *ProtocolVersionProto) Reset() { + *x = ProtocolVersionProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ProtocolInfo_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProtocolVersionProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProtocolVersionProto) ProtoMessage() {} + +func (x *ProtocolVersionProto) ProtoReflect() protoreflect.Message { + mi := &file_ProtocolInfo_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ProtocolVersionProto) Reset() { *m = ProtocolVersionProto{} } -func (m *ProtocolVersionProto) String() string { return proto.CompactTextString(m) } -func (*ProtocolVersionProto) ProtoMessage() {} -func (*ProtocolVersionProto) Descriptor() ([]byte, []int) { return fileDescriptor12, []int{1} } +// Deprecated: Use ProtocolVersionProto.ProtoReflect.Descriptor instead. +func (*ProtocolVersionProto) Descriptor() ([]byte, []int) { + return file_ProtocolInfo_proto_rawDescGZIP(), []int{1} +} -func (m *ProtocolVersionProto) GetRpcKind() string { - if m != nil && m.RpcKind != nil { - return *m.RpcKind +func (x *ProtocolVersionProto) GetRpcKind() string { + if x != nil && x.RpcKind != nil { + return *x.RpcKind } return "" } -func (m *ProtocolVersionProto) GetVersions() []uint64 { - if m != nil { - return m.Versions +func (x *ProtocolVersionProto) GetVersions() []uint64 { + if x != nil { + return x.Versions } return nil } -// * +//* // Get protocol version response. type GetProtocolVersionsResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + ProtocolVersions []*ProtocolVersionProto `protobuf:"bytes,1,rep,name=protocolVersions" json:"protocolVersions,omitempty"` - XXX_unrecognized []byte `json:"-"` } -func (m *GetProtocolVersionsResponseProto) Reset() { *m = GetProtocolVersionsResponseProto{} } -func (m *GetProtocolVersionsResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetProtocolVersionsResponseProto) ProtoMessage() {} +func (x *GetProtocolVersionsResponseProto) Reset() { + *x = GetProtocolVersionsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ProtocolInfo_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetProtocolVersionsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProtocolVersionsResponseProto) ProtoMessage() {} + +func (x *GetProtocolVersionsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ProtocolInfo_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProtocolVersionsResponseProto.ProtoReflect.Descriptor instead. func (*GetProtocolVersionsResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor12, []int{2} + return file_ProtocolInfo_proto_rawDescGZIP(), []int{2} } -func (m *GetProtocolVersionsResponseProto) GetProtocolVersions() []*ProtocolVersionProto { - if m != nil { - return m.ProtocolVersions +func (x *GetProtocolVersionsResponseProto) GetProtocolVersions() []*ProtocolVersionProto { + if x != nil { + return x.ProtocolVersions } return nil } -// * +//* // Get protocol signature request. type GetProtocolSignatureRequestProto struct { - Protocol *string `protobuf:"bytes,1,req,name=protocol" json:"protocol,omitempty"` - RpcKind *string `protobuf:"bytes,2,req,name=rpcKind" json:"rpcKind,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Protocol *string `protobuf:"bytes,1,req,name=protocol" json:"protocol,omitempty"` // Protocol name + RpcKind *string `protobuf:"bytes,2,req,name=rpcKind" json:"rpcKind,omitempty"` // RPC kind } -func (m *GetProtocolSignatureRequestProto) Reset() { *m = GetProtocolSignatureRequestProto{} } -func (m *GetProtocolSignatureRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetProtocolSignatureRequestProto) ProtoMessage() {} +func (x *GetProtocolSignatureRequestProto) Reset() { + *x = GetProtocolSignatureRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ProtocolInfo_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetProtocolSignatureRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProtocolSignatureRequestProto) ProtoMessage() {} + +func (x *GetProtocolSignatureRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ProtocolInfo_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProtocolSignatureRequestProto.ProtoReflect.Descriptor instead. func (*GetProtocolSignatureRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor12, []int{3} + return file_ProtocolInfo_proto_rawDescGZIP(), []int{3} } -func (m *GetProtocolSignatureRequestProto) GetProtocol() string { - if m != nil && m.Protocol != nil { - return *m.Protocol +func (x *GetProtocolSignatureRequestProto) GetProtocol() string { + if x != nil && x.Protocol != nil { + return *x.Protocol } return "" } -func (m *GetProtocolSignatureRequestProto) GetRpcKind() string { - if m != nil && m.RpcKind != nil { - return *m.RpcKind +func (x *GetProtocolSignatureRequestProto) GetRpcKind() string { + if x != nil && x.RpcKind != nil { + return *x.RpcKind } return "" } -// * +//* // Get protocol signature response. type GetProtocolSignatureResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + ProtocolSignature []*ProtocolSignatureProto `protobuf:"bytes,1,rep,name=protocolSignature" json:"protocolSignature,omitempty"` - XXX_unrecognized []byte `json:"-"` } -func (m *GetProtocolSignatureResponseProto) Reset() { *m = GetProtocolSignatureResponseProto{} } -func (m *GetProtocolSignatureResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetProtocolSignatureResponseProto) ProtoMessage() {} +func (x *GetProtocolSignatureResponseProto) Reset() { + *x = GetProtocolSignatureResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ProtocolInfo_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetProtocolSignatureResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProtocolSignatureResponseProto) ProtoMessage() {} + +func (x *GetProtocolSignatureResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ProtocolInfo_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProtocolSignatureResponseProto.ProtoReflect.Descriptor instead. func (*GetProtocolSignatureResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor12, []int{4} + return file_ProtocolInfo_proto_rawDescGZIP(), []int{4} } -func (m *GetProtocolSignatureResponseProto) GetProtocolSignature() []*ProtocolSignatureProto { - if m != nil { - return m.ProtocolSignature +func (x *GetProtocolSignatureResponseProto) GetProtocolSignature() []*ProtocolSignatureProto { + if x != nil { + return x.ProtocolSignature } return nil } type ProtocolSignatureProto struct { - Version *uint64 `protobuf:"varint,1,req,name=version" json:"version,omitempty"` - Methods []uint32 `protobuf:"varint,2,rep,name=methods" json:"methods,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version *uint64 `protobuf:"varint,1,req,name=version" json:"version,omitempty"` + Methods []uint32 `protobuf:"varint,2,rep,name=methods" json:"methods,omitempty"` } -func (m *ProtocolSignatureProto) Reset() { *m = ProtocolSignatureProto{} } -func (m *ProtocolSignatureProto) String() string { return proto.CompactTextString(m) } -func (*ProtocolSignatureProto) ProtoMessage() {} -func (*ProtocolSignatureProto) Descriptor() ([]byte, []int) { return fileDescriptor12, []int{5} } +func (x *ProtocolSignatureProto) Reset() { + *x = ProtocolSignatureProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ProtocolInfo_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *ProtocolSignatureProto) GetVersion() uint64 { - if m != nil && m.Version != nil { - return *m.Version +func (x *ProtocolSignatureProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProtocolSignatureProto) ProtoMessage() {} + +func (x *ProtocolSignatureProto) ProtoReflect() protoreflect.Message { + mi := &file_ProtocolInfo_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProtocolSignatureProto.ProtoReflect.Descriptor instead. +func (*ProtocolSignatureProto) Descriptor() ([]byte, []int) { + return file_ProtocolInfo_proto_rawDescGZIP(), []int{5} +} + +func (x *ProtocolSignatureProto) GetVersion() uint64 { + if x != nil && x.Version != nil { + return *x.Version } return 0 } -func (m *ProtocolSignatureProto) GetMethods() []uint32 { - if m != nil { - return m.Methods +func (x *ProtocolSignatureProto) GetMethods() []uint32 { + if x != nil { + return x.Methods } return nil } -func init() { - proto.RegisterType((*GetProtocolVersionsRequestProto)(nil), "hadoop.common.GetProtocolVersionsRequestProto") - proto.RegisterType((*ProtocolVersionProto)(nil), "hadoop.common.ProtocolVersionProto") - proto.RegisterType((*GetProtocolVersionsResponseProto)(nil), "hadoop.common.GetProtocolVersionsResponseProto") - proto.RegisterType((*GetProtocolSignatureRequestProto)(nil), "hadoop.common.GetProtocolSignatureRequestProto") - proto.RegisterType((*GetProtocolSignatureResponseProto)(nil), "hadoop.common.GetProtocolSignatureResponseProto") - proto.RegisterType((*ProtocolSignatureProto)(nil), "hadoop.common.ProtocolSignatureProto") -} - -func init() { proto.RegisterFile("ProtocolInfo.proto", fileDescriptor12) } - -var fileDescriptor12 = []byte{ - // 339 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x51, 0x4b, 0xf3, 0x30, - 0x14, 0xa5, 0xdd, 0xe0, 0xfb, 0xbc, 0x32, 0xd0, 0x6e, 0x48, 0xd9, 0x83, 0xd6, 0x88, 0xb0, 0xa7, - 0x28, 0x7b, 0x14, 0x7c, 0xd9, 0x8b, 0x88, 0x03, 0x25, 0x03, 0xf1, 0xb5, 0x66, 0x59, 0x57, 0x70, - 0xb9, 0x31, 0xe9, 0x86, 0xfe, 0x83, 0xfd, 0x0c, 0x7f, 0xaa, 0x74, 0x69, 0x47, 0xdb, 0x45, 0xdd, - 0x5b, 0x4f, 0x73, 0xce, 0xbd, 0xf7, 0x9c, 0x9b, 0x40, 0xf0, 0xa4, 0x31, 0x43, 0x8e, 0x6f, 0xf7, - 0x72, 0x86, 0x54, 0xe5, 0x20, 0xe8, 0xcc, 0xe3, 0x29, 0xa2, 0xa2, 0x1c, 0x17, 0x0b, 0x94, 0xe4, - 0x16, 0xce, 0xee, 0x44, 0x56, 0xf2, 0x9e, 0x85, 0x36, 0x29, 0x4a, 0xc3, 0xc4, 0xfb, 0x52, 0x18, - 0xfb, 0x3b, 0xe8, 0xc3, 0x7f, 0x55, 0x9c, 0x87, 0x5e, 0xe4, 0x0f, 0x0e, 0xd8, 0x16, 0x93, 0x31, - 0xf4, 0x1a, 0x5a, 0xab, 0x09, 0xe1, 0x9f, 0x56, 0xfc, 0x21, 0x95, 0xd3, 0x42, 0x52, 0xc2, 0xbc, - 0xda, 0xaa, 0xe8, 0x12, 0xfa, 0x51, 0x6b, 0xd0, 0x66, 0x5b, 0x4c, 0x0c, 0x44, 0xce, 0x61, 0x8c, - 0x42, 0x69, 0x84, 0xad, 0xfc, 0x08, 0x47, 0xaa, 0x41, 0x08, 0xbd, 0xa8, 0x35, 0x38, 0x1c, 0x5e, - 0xd0, 0x9a, 0x35, 0xea, 0x1a, 0x8c, 0xed, 0x88, 0xc9, 0x4b, 0xad, 0xe9, 0x24, 0x4d, 0x64, 0x9c, - 0x2d, 0xb5, 0xd8, 0x37, 0x82, 0xaa, 0x55, 0xbf, 0x66, 0x95, 0x7c, 0xc0, 0xb9, 0xbb, 0x72, 0xd5, - 0xcf, 0x04, 0x8e, 0x55, 0x93, 0x51, 0x18, 0xba, 0xfc, 0xc1, 0xd0, 0x96, 0x67, 0x2d, 0xed, 0xea, - 0xc9, 0x18, 0x4e, 0xdc, 0xe4, 0x7c, 0xda, 0x22, 0xee, 0x8d, 0x91, 0x36, 0x2b, 0x61, 0x7e, 0xb2, - 0x10, 0xd9, 0x1c, 0xa7, 0x76, 0x2f, 0x1d, 0x56, 0xc2, 0xe1, 0xda, 0x87, 0x6e, 0xf5, 0x26, 0x4d, - 0x84, 0x5e, 0xa5, 0x5c, 0x04, 0x2b, 0xe8, 0x26, 0xbb, 0xeb, 0x0a, 0x68, 0x63, 0xec, 0x3f, 0xee, - 0x57, 0xff, 0x6a, 0x1f, 0x7e, 0x35, 0xb2, 0x4f, 0xe8, 0x25, 0x8e, 0x5c, 0x83, 0x5f, 0x0a, 0x39, - 0xd7, 0xda, 0xbf, 0xde, 0x4b, 0x50, 0x69, 0x3d, 0xba, 0x81, 0x53, 0xd4, 0x09, 0x8d, 0x55, 0xcc, - 0xe7, 0xa2, 0x54, 0xa7, 0x8a, 0xdb, 0xc7, 0xf5, 0xba, 0x9c, 0x8d, 0x6a, 0x6f, 0x6e, 0xf3, 0x6d, - 0xd6, 0x9e, 0xf7, 0xe5, 0x79, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x42, 0x12, 0xbd, 0x0a, 0x8e, - 0x03, 0x00, 0x00, +var File_ProtocolInfo_proto protoreflect.FileDescriptor + +var file_ProtocolInfo_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x22, 0x3d, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x22, 0x4c, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x70, + 0x63, 0x4b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x72, 0x70, 0x63, + 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x73, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x58, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x70, 0x63, 0x4b, 0x69, 0x6e, 0x64, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x72, 0x70, 0x63, 0x4b, 0x69, 0x6e, 0x64, 0x22, + 0x78, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x53, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x32, 0x88, 0x02, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x76, 0x0a, 0x13, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x79, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, + 0x2f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x42, 0x78, 0x0a, 0x1e, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x69, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x42, 0x12, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x6e, + 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, + 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0xa0, 0x01, 0x01, +} + +var ( + file_ProtocolInfo_proto_rawDescOnce sync.Once + file_ProtocolInfo_proto_rawDescData = file_ProtocolInfo_proto_rawDesc +) + +func file_ProtocolInfo_proto_rawDescGZIP() []byte { + file_ProtocolInfo_proto_rawDescOnce.Do(func() { + file_ProtocolInfo_proto_rawDescData = protoimpl.X.CompressGZIP(file_ProtocolInfo_proto_rawDescData) + }) + return file_ProtocolInfo_proto_rawDescData +} + +var file_ProtocolInfo_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_ProtocolInfo_proto_goTypes = []interface{}{ + (*GetProtocolVersionsRequestProto)(nil), // 0: hadoop.common.GetProtocolVersionsRequestProto + (*ProtocolVersionProto)(nil), // 1: hadoop.common.ProtocolVersionProto + (*GetProtocolVersionsResponseProto)(nil), // 2: hadoop.common.GetProtocolVersionsResponseProto + (*GetProtocolSignatureRequestProto)(nil), // 3: hadoop.common.GetProtocolSignatureRequestProto + (*GetProtocolSignatureResponseProto)(nil), // 4: hadoop.common.GetProtocolSignatureResponseProto + (*ProtocolSignatureProto)(nil), // 5: hadoop.common.ProtocolSignatureProto +} +var file_ProtocolInfo_proto_depIdxs = []int32{ + 1, // 0: hadoop.common.GetProtocolVersionsResponseProto.protocolVersions:type_name -> hadoop.common.ProtocolVersionProto + 5, // 1: hadoop.common.GetProtocolSignatureResponseProto.protocolSignature:type_name -> hadoop.common.ProtocolSignatureProto + 0, // 2: hadoop.common.ProtocolInfoService.getProtocolVersions:input_type -> hadoop.common.GetProtocolVersionsRequestProto + 3, // 3: hadoop.common.ProtocolInfoService.getProtocolSignature:input_type -> hadoop.common.GetProtocolSignatureRequestProto + 2, // 4: hadoop.common.ProtocolInfoService.getProtocolVersions:output_type -> hadoop.common.GetProtocolVersionsResponseProto + 4, // 5: hadoop.common.ProtocolInfoService.getProtocolSignature:output_type -> hadoop.common.GetProtocolSignatureResponseProto + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_ProtocolInfo_proto_init() } +func file_ProtocolInfo_proto_init() { + if File_ProtocolInfo_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ProtocolInfo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetProtocolVersionsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ProtocolInfo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtocolVersionProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ProtocolInfo_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetProtocolVersionsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ProtocolInfo_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetProtocolSignatureRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ProtocolInfo_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetProtocolSignatureResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ProtocolInfo_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtocolSignatureProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ProtocolInfo_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ProtocolInfo_proto_goTypes, + DependencyIndexes: file_ProtocolInfo_proto_depIdxs, + MessageInfos: file_ProtocolInfo_proto_msgTypes, + }.Build() + File_ProtocolInfo_proto = out.File + file_ProtocolInfo_proto_rawDesc = nil + file_ProtocolInfo_proto_goTypes = nil + file_ProtocolInfo_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/ProtocolInfo.proto b/internal/protocol/hadoop_common/ProtocolInfo.proto index fdbc440d..4847bfdd 100644 --- a/internal/protocol/hadoop_common/ProtocolInfo.proto +++ b/internal/protocol/hadoop_common/ProtocolInfo.proto @@ -21,11 +21,12 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.ipc.protobuf"; option java_outer_classname = "ProtocolInfoProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; /** diff --git a/internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.pb.go b/internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.pb.go index 5054b196..0689e666 100644 --- a/internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.pb.go +++ b/internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.pb.go @@ -1,58 +1,233 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: RefreshAuthorizationPolicyProtocol.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // Refresh service acl request. type RefreshServiceAclRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RefreshServiceAclRequestProto) Reset() { + *x = RefreshServiceAclRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RefreshAuthorizationPolicyProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RefreshServiceAclRequestProto) Reset() { *m = RefreshServiceAclRequestProto{} } -func (m *RefreshServiceAclRequestProto) String() string { return proto.CompactTextString(m) } -func (*RefreshServiceAclRequestProto) ProtoMessage() {} -func (*RefreshServiceAclRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +func (x *RefreshServiceAclRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshServiceAclRequestProto) ProtoMessage() {} + +func (x *RefreshServiceAclRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_RefreshAuthorizationPolicyProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} -// * +// Deprecated: Use RefreshServiceAclRequestProto.ProtoReflect.Descriptor instead. +func (*RefreshServiceAclRequestProto) Descriptor() ([]byte, []int) { + return file_RefreshAuthorizationPolicyProtocol_proto_rawDescGZIP(), []int{0} +} + +//* // void response type RefreshServiceAclResponseProto struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *RefreshServiceAclResponseProto) Reset() { *m = RefreshServiceAclResponseProto{} } -func (m *RefreshServiceAclResponseProto) String() string { return proto.CompactTextString(m) } -func (*RefreshServiceAclResponseProto) ProtoMessage() {} -func (*RefreshServiceAclResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } - -func init() { - proto.RegisterType((*RefreshServiceAclRequestProto)(nil), "hadoop.common.RefreshServiceAclRequestProto") - proto.RegisterType((*RefreshServiceAclResponseProto)(nil), "hadoop.common.RefreshServiceAclResponseProto") -} - -func init() { proto.RegisterFile("RefreshAuthorizationPolicyProtocol.proto", fileDescriptor2) } - -var fileDescriptor2 = []byte{ - // 189 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x08, 0x4a, 0x4d, 0x2b, - 0x4a, 0x2d, 0xce, 0x70, 0x2c, 0x2d, 0xc9, 0xc8, 0x2f, 0xca, 0xac, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, - 0x0b, 0xc8, 0xcf, 0xc9, 0x4c, 0xae, 0x0c, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0xce, 0xcf, 0xd1, 0x2b, - 0x00, 0x31, 0x84, 0x78, 0x33, 0x12, 0x53, 0xf2, 0xf3, 0x0b, 0xf4, 0x92, 0xf3, 0x73, 0x73, 0xf3, - 0xf3, 0x94, 0xe4, 0xb9, 0x64, 0xa1, 0x5a, 0x83, 0x53, 0x8b, 0xca, 0x32, 0x93, 0x53, 0x1d, 0x93, - 0x73, 0x82, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, 0xc0, 0x1a, 0x95, 0x14, 0xb8, 0xe4, 0xb0, 0x28, - 0x28, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x05, 0xab, 0x30, 0x9a, 0xcb, 0xc8, 0xa5, 0x49, 0xd8, 0x7a, - 0xa8, 0x6e, 0xa1, 0x02, 0x2e, 0xc1, 0x22, 0x74, 0xf3, 0x84, 0x74, 0xf4, 0x50, 0x5c, 0xa5, 0x87, - 0xd7, 0x49, 0x52, 0xba, 0x84, 0x55, 0x23, 0xb9, 0xcf, 0x29, 0x88, 0x4b, 0x21, 0xbf, 0x28, 0x5d, - 0x2f, 0xb1, 0x20, 0x31, 0x39, 0x23, 0x15, 0xa6, 0xb5, 0x38, 0x35, 0xb9, 0xb4, 0x28, 0xb3, 0xa4, - 0x12, 0x12, 0x2a, 0x4e, 0x44, 0x84, 0x1f, 0x98, 0x2e, 0xee, 0x60, 0x64, 0x5c, 0xc0, 0xc8, 0x08, - 0x08, 0x00, 0x00, 0xff, 0xff, 0x4a, 0xf2, 0xf6, 0x15, 0x70, 0x01, 0x00, 0x00, + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RefreshServiceAclResponseProto) Reset() { + *x = RefreshServiceAclResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RefreshAuthorizationPolicyProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefreshServiceAclResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshServiceAclResponseProto) ProtoMessage() {} + +func (x *RefreshServiceAclResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_RefreshAuthorizationPolicyProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshServiceAclResponseProto.ProtoReflect.Descriptor instead. +func (*RefreshServiceAclResponseProto) Descriptor() ([]byte, []int) { + return file_RefreshAuthorizationPolicyProtocol_proto_rawDescGZIP(), []int{1} +} + +var File_RefreshAuthorizationPolicyProtocol_proto protoreflect.FileDescriptor + +var file_RefreshAuthorizationPolicyProtocol_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x1f, 0x0a, 0x1d, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x1e, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x9d, 0x01, 0x0a, + 0x29, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x11, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x6c, 0x12, + 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x90, 0x01, 0x0a, + 0x20, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x42, 0x28, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3c, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, + 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0xa0, 0x01, 0x01, +} + +var ( + file_RefreshAuthorizationPolicyProtocol_proto_rawDescOnce sync.Once + file_RefreshAuthorizationPolicyProtocol_proto_rawDescData = file_RefreshAuthorizationPolicyProtocol_proto_rawDesc +) + +func file_RefreshAuthorizationPolicyProtocol_proto_rawDescGZIP() []byte { + file_RefreshAuthorizationPolicyProtocol_proto_rawDescOnce.Do(func() { + file_RefreshAuthorizationPolicyProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_RefreshAuthorizationPolicyProtocol_proto_rawDescData) + }) + return file_RefreshAuthorizationPolicyProtocol_proto_rawDescData +} + +var file_RefreshAuthorizationPolicyProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_RefreshAuthorizationPolicyProtocol_proto_goTypes = []interface{}{ + (*RefreshServiceAclRequestProto)(nil), // 0: hadoop.common.RefreshServiceAclRequestProto + (*RefreshServiceAclResponseProto)(nil), // 1: hadoop.common.RefreshServiceAclResponseProto +} +var file_RefreshAuthorizationPolicyProtocol_proto_depIdxs = []int32{ + 0, // 0: hadoop.common.RefreshAuthorizationPolicyProtocolService.refreshServiceAcl:input_type -> hadoop.common.RefreshServiceAclRequestProto + 1, // 1: hadoop.common.RefreshAuthorizationPolicyProtocolService.refreshServiceAcl:output_type -> hadoop.common.RefreshServiceAclResponseProto + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_RefreshAuthorizationPolicyProtocol_proto_init() } +func file_RefreshAuthorizationPolicyProtocol_proto_init() { + if File_RefreshAuthorizationPolicyProtocol_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_RefreshAuthorizationPolicyProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshServiceAclRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_RefreshAuthorizationPolicyProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshServiceAclResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_RefreshAuthorizationPolicyProtocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_RefreshAuthorizationPolicyProtocol_proto_goTypes, + DependencyIndexes: file_RefreshAuthorizationPolicyProtocol_proto_depIdxs, + MessageInfos: file_RefreshAuthorizationPolicyProtocol_proto_msgTypes, + }.Build() + File_RefreshAuthorizationPolicyProtocol_proto = out.File + file_RefreshAuthorizationPolicyProtocol_proto_rawDesc = nil + file_RefreshAuthorizationPolicyProtocol_proto_goTypes = nil + file_RefreshAuthorizationPolicyProtocol_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.proto b/internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.proto index 5ef1c2d0..7361db5b 100644 --- a/internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.proto +++ b/internal/protocol/hadoop_common/RefreshAuthorizationPolicyProtocol.proto @@ -21,11 +21,12 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.security.proto"; option java_outer_classname = "RefreshAuthorizationPolicyProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; /** diff --git a/internal/protocol/hadoop_common/RefreshCallQueueProtocol.pb.go b/internal/protocol/hadoop_common/RefreshCallQueueProtocol.pb.go index 4ddd7d8f..0f15d9fc 100644 --- a/internal/protocol/hadoop_common/RefreshCallQueueProtocol.pb.go +++ b/internal/protocol/hadoop_common/RefreshCallQueueProtocol.pb.go @@ -1,57 +1,231 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: RefreshCallQueueProtocol.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // Refresh callqueue request. type RefreshCallQueueRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RefreshCallQueueRequestProto) Reset() { + *x = RefreshCallQueueRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RefreshCallQueueProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RefreshCallQueueRequestProto) Reset() { *m = RefreshCallQueueRequestProto{} } -func (m *RefreshCallQueueRequestProto) String() string { return proto.CompactTextString(m) } -func (*RefreshCallQueueRequestProto) ProtoMessage() {} -func (*RefreshCallQueueRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} } +func (x *RefreshCallQueueRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshCallQueueRequestProto) ProtoMessage() {} + +func (x *RefreshCallQueueRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_RefreshCallQueueProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} -// * +// Deprecated: Use RefreshCallQueueRequestProto.ProtoReflect.Descriptor instead. +func (*RefreshCallQueueRequestProto) Descriptor() ([]byte, []int) { + return file_RefreshCallQueueProtocol_proto_rawDescGZIP(), []int{0} +} + +//* // void response. type RefreshCallQueueResponseProto struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *RefreshCallQueueResponseProto) Reset() { *m = RefreshCallQueueResponseProto{} } -func (m *RefreshCallQueueResponseProto) String() string { return proto.CompactTextString(m) } -func (*RefreshCallQueueResponseProto) ProtoMessage() {} -func (*RefreshCallQueueResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{1} } - -func init() { - proto.RegisterType((*RefreshCallQueueRequestProto)(nil), "hadoop.common.RefreshCallQueueRequestProto") - proto.RegisterType((*RefreshCallQueueResponseProto)(nil), "hadoop.common.RefreshCallQueueResponseProto") -} - -func init() { proto.RegisterFile("RefreshCallQueueProtocol.proto", fileDescriptor6) } - -var fileDescriptor6 = []byte{ - // 168 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x0b, 0x4a, 0x4d, 0x2b, - 0x4a, 0x2d, 0xce, 0x70, 0x4e, 0xcc, 0xc9, 0x09, 0x2c, 0x4d, 0x2d, 0x4d, 0x0d, 0x28, 0xca, 0x2f, - 0xc9, 0x4f, 0xce, 0xcf, 0xd1, 0x2b, 0x00, 0x31, 0x84, 0x78, 0x33, 0x12, 0x53, 0xf2, 0xf3, 0x0b, - 0xf4, 0x92, 0xf3, 0x73, 0x73, 0xf3, 0xf3, 0x94, 0xe4, 0xb8, 0x64, 0xd0, 0x35, 0x04, 0xa5, 0x16, - 0x96, 0xa6, 0x16, 0x97, 0x80, 0xf5, 0x29, 0xc9, 0x73, 0xc9, 0x62, 0xca, 0x17, 0x17, 0xe4, 0xe7, - 0x15, 0x43, 0x0c, 0x36, 0x9a, 0xc0, 0xc8, 0x25, 0x8f, 0xcb, 0xca, 0xe0, 0xd4, 0xa2, 0xb2, 0xcc, - 0xe4, 0x54, 0xa1, 0x5c, 0x2e, 0x81, 0x22, 0x34, 0x25, 0x42, 0xda, 0x7a, 0x28, 0x0e, 0xd1, 0xc3, - 0xe7, 0x0a, 0x29, 0x1d, 0x82, 0x8a, 0x91, 0x9c, 0xe4, 0xe4, 0xcc, 0x25, 0x9d, 0x5f, 0x94, 0xae, - 0x97, 0x58, 0x90, 0x98, 0x9c, 0x91, 0x0a, 0xd3, 0x99, 0x59, 0x90, 0x0c, 0x09, 0x01, 0x27, 0x9c, - 0x21, 0x04, 0xa6, 0x8b, 0x3b, 0x18, 0x19, 0x17, 0x30, 0x32, 0x02, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x5d, 0x22, 0xcd, 0xe0, 0x48, 0x01, 0x00, 0x00, + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RefreshCallQueueResponseProto) Reset() { + *x = RefreshCallQueueResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RefreshCallQueueProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefreshCallQueueResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshCallQueueResponseProto) ProtoMessage() {} + +func (x *RefreshCallQueueResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_RefreshCallQueueProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshCallQueueResponseProto.ProtoReflect.Descriptor instead. +func (*RefreshCallQueueResponseProto) Descriptor() ([]byte, []int) { + return file_RefreshCallQueueProtocol_proto_rawDescGZIP(), []int{1} +} + +var File_RefreshCallQueueProtocol_proto protoreflect.FileDescriptor + +var file_RefreshCallQueueProtocol_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x61, 0x6c, 0x6c, 0x51, 0x75, 0x65, + 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0d, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, + 0x1e, 0x0a, 0x1c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x61, 0x6c, 0x6c, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x1f, 0x0a, 0x1d, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x61, 0x6c, 0x6c, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x32, 0x90, 0x01, 0x0a, 0x1f, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x61, 0x6c, 0x6c, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, + 0x61, 0x6c, 0x6c, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x43, 0x61, 0x6c, 0x6c, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x61, 0x6c, + 0x6c, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x42, 0x81, 0x01, 0x0a, 0x1b, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, + 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x69, 0x70, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x42, 0x1e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x61, 0x6c, 0x6c, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, + 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0xa0, 0x01, 0x01, +} + +var ( + file_RefreshCallQueueProtocol_proto_rawDescOnce sync.Once + file_RefreshCallQueueProtocol_proto_rawDescData = file_RefreshCallQueueProtocol_proto_rawDesc +) + +func file_RefreshCallQueueProtocol_proto_rawDescGZIP() []byte { + file_RefreshCallQueueProtocol_proto_rawDescOnce.Do(func() { + file_RefreshCallQueueProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_RefreshCallQueueProtocol_proto_rawDescData) + }) + return file_RefreshCallQueueProtocol_proto_rawDescData +} + +var file_RefreshCallQueueProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_RefreshCallQueueProtocol_proto_goTypes = []interface{}{ + (*RefreshCallQueueRequestProto)(nil), // 0: hadoop.common.RefreshCallQueueRequestProto + (*RefreshCallQueueResponseProto)(nil), // 1: hadoop.common.RefreshCallQueueResponseProto +} +var file_RefreshCallQueueProtocol_proto_depIdxs = []int32{ + 0, // 0: hadoop.common.RefreshCallQueueProtocolService.refreshCallQueue:input_type -> hadoop.common.RefreshCallQueueRequestProto + 1, // 1: hadoop.common.RefreshCallQueueProtocolService.refreshCallQueue:output_type -> hadoop.common.RefreshCallQueueResponseProto + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_RefreshCallQueueProtocol_proto_init() } +func file_RefreshCallQueueProtocol_proto_init() { + if File_RefreshCallQueueProtocol_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_RefreshCallQueueProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshCallQueueRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_RefreshCallQueueProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshCallQueueResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_RefreshCallQueueProtocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_RefreshCallQueueProtocol_proto_goTypes, + DependencyIndexes: file_RefreshCallQueueProtocol_proto_depIdxs, + MessageInfos: file_RefreshCallQueueProtocol_proto_msgTypes, + }.Build() + File_RefreshCallQueueProtocol_proto = out.File + file_RefreshCallQueueProtocol_proto_rawDesc = nil + file_RefreshCallQueueProtocol_proto_goTypes = nil + file_RefreshCallQueueProtocol_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/RefreshCallQueueProtocol.proto b/internal/protocol/hadoop_common/RefreshCallQueueProtocol.proto index 67ed1332..3fd715d7 100644 --- a/internal/protocol/hadoop_common/RefreshCallQueueProtocol.proto +++ b/internal/protocol/hadoop_common/RefreshCallQueueProtocol.proto @@ -21,11 +21,12 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.ipc.proto"; option java_outer_classname = "RefreshCallQueueProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; /** diff --git a/internal/protocol/hadoop_common/RefreshUserMappingsProtocol.pb.go b/internal/protocol/hadoop_common/RefreshUserMappingsProtocol.pb.go index f254f3e3..57df221f 100644 --- a/internal/protocol/hadoop_common/RefreshUserMappingsProtocol.pb.go +++ b/internal/protocol/hadoop_common/RefreshUserMappingsProtocol.pb.go @@ -1,106 +1,360 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: RefreshUserMappingsProtocol.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // Refresh user to group mappings request. type RefreshUserToGroupsMappingsRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *RefreshUserToGroupsMappingsRequestProto) Reset() { - *m = RefreshUserToGroupsMappingsRequestProto{} +func (x *RefreshUserToGroupsMappingsRequestProto) Reset() { + *x = RefreshUserToGroupsMappingsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RefreshUserMappingsProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RefreshUserToGroupsMappingsRequestProto) String() string { return proto.CompactTextString(m) } -func (*RefreshUserToGroupsMappingsRequestProto) ProtoMessage() {} + +func (x *RefreshUserToGroupsMappingsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshUserToGroupsMappingsRequestProto) ProtoMessage() {} + +func (x *RefreshUserToGroupsMappingsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_RefreshUserMappingsProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshUserToGroupsMappingsRequestProto.ProtoReflect.Descriptor instead. func (*RefreshUserToGroupsMappingsRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor9, []int{0} + return file_RefreshUserMappingsProtocol_proto_rawDescGZIP(), []int{0} } -// * +//* // void response type RefreshUserToGroupsMappingsResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RefreshUserToGroupsMappingsResponseProto) Reset() { + *x = RefreshUserToGroupsMappingsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RefreshUserMappingsProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RefreshUserToGroupsMappingsResponseProto) Reset() { - *m = RefreshUserToGroupsMappingsResponseProto{} +func (x *RefreshUserToGroupsMappingsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RefreshUserToGroupsMappingsResponseProto) String() string { return proto.CompactTextString(m) } -func (*RefreshUserToGroupsMappingsResponseProto) ProtoMessage() {} + +func (*RefreshUserToGroupsMappingsResponseProto) ProtoMessage() {} + +func (x *RefreshUserToGroupsMappingsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_RefreshUserMappingsProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshUserToGroupsMappingsResponseProto.ProtoReflect.Descriptor instead. func (*RefreshUserToGroupsMappingsResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor9, []int{1} + return file_RefreshUserMappingsProtocol_proto_rawDescGZIP(), []int{1} } -// * +//* // Refresh superuser configuration request. type RefreshSuperUserGroupsConfigurationRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *RefreshSuperUserGroupsConfigurationRequestProto) Reset() { - *m = RefreshSuperUserGroupsConfigurationRequestProto{} +func (x *RefreshSuperUserGroupsConfigurationRequestProto) Reset() { + *x = RefreshSuperUserGroupsConfigurationRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RefreshUserMappingsProtocol_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RefreshSuperUserGroupsConfigurationRequestProto) String() string { - return proto.CompactTextString(m) + +func (x *RefreshSuperUserGroupsConfigurationRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } + func (*RefreshSuperUserGroupsConfigurationRequestProto) ProtoMessage() {} + +func (x *RefreshSuperUserGroupsConfigurationRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_RefreshUserMappingsProtocol_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshSuperUserGroupsConfigurationRequestProto.ProtoReflect.Descriptor instead. func (*RefreshSuperUserGroupsConfigurationRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor9, []int{2} + return file_RefreshUserMappingsProtocol_proto_rawDescGZIP(), []int{2} } -// * +//* // void response type RefreshSuperUserGroupsConfigurationResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *RefreshSuperUserGroupsConfigurationResponseProto) Reset() { - *m = RefreshSuperUserGroupsConfigurationResponseProto{} +func (x *RefreshSuperUserGroupsConfigurationResponseProto) Reset() { + *x = RefreshSuperUserGroupsConfigurationResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RefreshUserMappingsProtocol_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RefreshSuperUserGroupsConfigurationResponseProto) String() string { - return proto.CompactTextString(m) + +func (x *RefreshSuperUserGroupsConfigurationResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } + func (*RefreshSuperUserGroupsConfigurationResponseProto) ProtoMessage() {} + +func (x *RefreshSuperUserGroupsConfigurationResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_RefreshUserMappingsProtocol_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshSuperUserGroupsConfigurationResponseProto.ProtoReflect.Descriptor instead. func (*RefreshSuperUserGroupsConfigurationResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor9, []int{3} -} - -func init() { - proto.RegisterType((*RefreshUserToGroupsMappingsRequestProto)(nil), "hadoop.common.RefreshUserToGroupsMappingsRequestProto") - proto.RegisterType((*RefreshUserToGroupsMappingsResponseProto)(nil), "hadoop.common.RefreshUserToGroupsMappingsResponseProto") - proto.RegisterType((*RefreshSuperUserGroupsConfigurationRequestProto)(nil), "hadoop.common.RefreshSuperUserGroupsConfigurationRequestProto") - proto.RegisterType((*RefreshSuperUserGroupsConfigurationResponseProto)(nil), "hadoop.common.RefreshSuperUserGroupsConfigurationResponseProto") -} - -func init() { proto.RegisterFile("RefreshUserMappingsProtocol.proto", fileDescriptor9) } - -var fileDescriptor9 = []byte{ - // 249 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x0c, 0x4a, 0x4d, 0x2b, - 0x4a, 0x2d, 0xce, 0x08, 0x2d, 0x4e, 0x2d, 0xf2, 0x4d, 0x2c, 0x28, 0xc8, 0xcc, 0x4b, 0x2f, 0x0e, - 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0xce, 0xcf, 0xd1, 0x2b, 0x00, 0x31, 0x84, 0x78, 0x33, 0x12, 0x53, - 0xf2, 0xf3, 0x0b, 0xf4, 0x92, 0xf3, 0x73, 0x73, 0xf3, 0xf3, 0x94, 0x34, 0xb9, 0xd4, 0x91, 0xf4, - 0x84, 0xe4, 0xbb, 0x17, 0xe5, 0x97, 0x16, 0x14, 0xc3, 0xf4, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, - 0x97, 0x80, 0x8d, 0x50, 0xd2, 0xe2, 0xd2, 0xc0, 0xab, 0xb4, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x15, - 0xa2, 0xd6, 0x90, 0x4b, 0x1f, 0xaa, 0x36, 0xb8, 0xb4, 0x20, 0xb5, 0x08, 0xa4, 0x01, 0xa2, 0xdc, - 0x39, 0x3f, 0x2f, 0x2d, 0x33, 0xbd, 0xb4, 0x28, 0xb1, 0x24, 0x33, 0x3f, 0x0f, 0xc5, 0x78, 0x23, - 0x2e, 0x03, 0xa2, 0xb4, 0x20, 0x59, 0x63, 0x74, 0x8f, 0x89, 0x4b, 0x09, 0x8f, 0x97, 0x83, 0x53, - 0x8b, 0xca, 0x32, 0x93, 0x53, 0x85, 0xfa, 0x18, 0xb9, 0xa4, 0x8b, 0x70, 0x3b, 0x5d, 0xc8, 0x4c, - 0x0f, 0x25, 0x50, 0xf4, 0x88, 0x0c, 0x11, 0x29, 0x73, 0x52, 0xf4, 0x21, 0xb9, 0x5b, 0x68, 0x19, - 0x23, 0x97, 0x72, 0x11, 0x61, 0xcf, 0x0a, 0xd9, 0x61, 0xb7, 0x80, 0xd8, 0x30, 0x95, 0xb2, 0x27, - 0x47, 0x3f, 0x92, 0x43, 0x9d, 0xbc, 0xb9, 0x14, 0xf2, 0x8b, 0xd2, 0xf5, 0x12, 0x0b, 0x12, 0x93, - 0x33, 0x52, 0x61, 0x86, 0x15, 0xa7, 0x26, 0x97, 0x16, 0x65, 0x96, 0x54, 0x42, 0x52, 0x94, 0x13, - 0xbe, 0x44, 0x07, 0xa6, 0x8b, 0x3b, 0x18, 0x19, 0x17, 0x30, 0x32, 0x02, 0x02, 0x00, 0x00, 0xff, - 0xff, 0xfc, 0xf2, 0x05, 0xcb, 0x9e, 0x02, 0x00, 0x00, + return file_RefreshUserMappingsProtocol_proto_rawDescGZIP(), []int{3} +} + +var File_RefreshUserMappingsProtocol_proto protoreflect.FileDescriptor + +var file_RefreshUserMappingsProtocol_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x27, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x55, 0x73, 0x65, + 0x72, 0x54, 0x6f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2a, 0x0a, + 0x28, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a, 0x2f, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x30, + 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x32, 0xde, 0x02, 0x0a, 0x22, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x55, 0x73, 0x65, 0x72, + 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x1b, 0x72, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x36, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x55, + 0x73, 0x65, 0x72, 0x54, 0x6f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x37, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0xa6, 0x01, 0x0a, 0x23, 0x72, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x3e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, + 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x3f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, + 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x42, 0x89, 0x01, 0x0a, 0x20, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x21, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x55, + 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, + 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0xa0, 0x01, 0x01, +} + +var ( + file_RefreshUserMappingsProtocol_proto_rawDescOnce sync.Once + file_RefreshUserMappingsProtocol_proto_rawDescData = file_RefreshUserMappingsProtocol_proto_rawDesc +) + +func file_RefreshUserMappingsProtocol_proto_rawDescGZIP() []byte { + file_RefreshUserMappingsProtocol_proto_rawDescOnce.Do(func() { + file_RefreshUserMappingsProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_RefreshUserMappingsProtocol_proto_rawDescData) + }) + return file_RefreshUserMappingsProtocol_proto_rawDescData +} + +var file_RefreshUserMappingsProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_RefreshUserMappingsProtocol_proto_goTypes = []interface{}{ + (*RefreshUserToGroupsMappingsRequestProto)(nil), // 0: hadoop.common.RefreshUserToGroupsMappingsRequestProto + (*RefreshUserToGroupsMappingsResponseProto)(nil), // 1: hadoop.common.RefreshUserToGroupsMappingsResponseProto + (*RefreshSuperUserGroupsConfigurationRequestProto)(nil), // 2: hadoop.common.RefreshSuperUserGroupsConfigurationRequestProto + (*RefreshSuperUserGroupsConfigurationResponseProto)(nil), // 3: hadoop.common.RefreshSuperUserGroupsConfigurationResponseProto +} +var file_RefreshUserMappingsProtocol_proto_depIdxs = []int32{ + 0, // 0: hadoop.common.RefreshUserMappingsProtocolService.refreshUserToGroupsMappings:input_type -> hadoop.common.RefreshUserToGroupsMappingsRequestProto + 2, // 1: hadoop.common.RefreshUserMappingsProtocolService.refreshSuperUserGroupsConfiguration:input_type -> hadoop.common.RefreshSuperUserGroupsConfigurationRequestProto + 1, // 2: hadoop.common.RefreshUserMappingsProtocolService.refreshUserToGroupsMappings:output_type -> hadoop.common.RefreshUserToGroupsMappingsResponseProto + 3, // 3: hadoop.common.RefreshUserMappingsProtocolService.refreshSuperUserGroupsConfiguration:output_type -> hadoop.common.RefreshSuperUserGroupsConfigurationResponseProto + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_RefreshUserMappingsProtocol_proto_init() } +func file_RefreshUserMappingsProtocol_proto_init() { + if File_RefreshUserMappingsProtocol_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_RefreshUserMappingsProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshUserToGroupsMappingsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_RefreshUserMappingsProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshUserToGroupsMappingsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_RefreshUserMappingsProtocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshSuperUserGroupsConfigurationRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_RefreshUserMappingsProtocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshSuperUserGroupsConfigurationResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_RefreshUserMappingsProtocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_RefreshUserMappingsProtocol_proto_goTypes, + DependencyIndexes: file_RefreshUserMappingsProtocol_proto_depIdxs, + MessageInfos: file_RefreshUserMappingsProtocol_proto_msgTypes, + }.Build() + File_RefreshUserMappingsProtocol_proto = out.File + file_RefreshUserMappingsProtocol_proto_rawDesc = nil + file_RefreshUserMappingsProtocol_proto_goTypes = nil + file_RefreshUserMappingsProtocol_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/RefreshUserMappingsProtocol.proto b/internal/protocol/hadoop_common/RefreshUserMappingsProtocol.proto index 41031ed9..4ce34ab0 100644 --- a/internal/protocol/hadoop_common/RefreshUserMappingsProtocol.proto +++ b/internal/protocol/hadoop_common/RefreshUserMappingsProtocol.proto @@ -21,11 +21,12 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.security.proto"; option java_outer_classname = "RefreshUserMappingsProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; /** diff --git a/internal/protocol/hadoop_common/RpcHeader.pb.go b/internal/protocol/hadoop_common/RpcHeader.pb.go index 2b2d4721..20f7f54d 100644 --- a/internal/protocol/hadoop_common/RpcHeader.pb.go +++ b/internal/protocol/hadoop_common/RpcHeader.pb.go @@ -1,200 +1,312 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: RpcHeader.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // RpcKind determine the rpcEngine and the serialization of the rpc request type RpcKindProto int32 const ( - RpcKindProto_RPC_BUILTIN RpcKindProto = 0 - RpcKindProto_RPC_WRITABLE RpcKindProto = 1 - RpcKindProto_RPC_PROTOCOL_BUFFER RpcKindProto = 2 + RpcKindProto_RPC_BUILTIN RpcKindProto = 0 // Used for built in calls by tests + RpcKindProto_RPC_WRITABLE RpcKindProto = 1 // Use WritableRpcEngine + RpcKindProto_RPC_PROTOCOL_BUFFER RpcKindProto = 2 // Use ProtobufRpcEngine ) -var RpcKindProto_name = map[int32]string{ - 0: "RPC_BUILTIN", - 1: "RPC_WRITABLE", - 2: "RPC_PROTOCOL_BUFFER", -} -var RpcKindProto_value = map[string]int32{ - "RPC_BUILTIN": 0, - "RPC_WRITABLE": 1, - "RPC_PROTOCOL_BUFFER": 2, -} +// Enum value maps for RpcKindProto. +var ( + RpcKindProto_name = map[int32]string{ + 0: "RPC_BUILTIN", + 1: "RPC_WRITABLE", + 2: "RPC_PROTOCOL_BUFFER", + } + RpcKindProto_value = map[string]int32{ + "RPC_BUILTIN": 0, + "RPC_WRITABLE": 1, + "RPC_PROTOCOL_BUFFER": 2, + } +) func (x RpcKindProto) Enum() *RpcKindProto { p := new(RpcKindProto) *p = x return p } + func (x RpcKindProto) String() string { - return proto.EnumName(RpcKindProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RpcKindProto) Descriptor() protoreflect.EnumDescriptor { + return file_RpcHeader_proto_enumTypes[0].Descriptor() } -func (x *RpcKindProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RpcKindProto_value, data, "RpcKindProto") + +func (RpcKindProto) Type() protoreflect.EnumType { + return &file_RpcHeader_proto_enumTypes[0] +} + +func (x RpcKindProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *RpcKindProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = RpcKindProto(value) + *x = RpcKindProto(num) return nil } -func (RpcKindProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } + +// Deprecated: Use RpcKindProto.Descriptor instead. +func (RpcKindProto) EnumDescriptor() ([]byte, []int) { + return file_RpcHeader_proto_rawDescGZIP(), []int{0} +} type RpcRequestHeaderProto_OperationProto int32 const ( - RpcRequestHeaderProto_RPC_FINAL_PACKET RpcRequestHeaderProto_OperationProto = 0 - RpcRequestHeaderProto_RPC_CONTINUATION_PACKET RpcRequestHeaderProto_OperationProto = 1 - RpcRequestHeaderProto_RPC_CLOSE_CONNECTION RpcRequestHeaderProto_OperationProto = 2 + RpcRequestHeaderProto_RPC_FINAL_PACKET RpcRequestHeaderProto_OperationProto = 0 // The final RPC Packet + RpcRequestHeaderProto_RPC_CONTINUATION_PACKET RpcRequestHeaderProto_OperationProto = 1 // not implemented yet + RpcRequestHeaderProto_RPC_CLOSE_CONNECTION RpcRequestHeaderProto_OperationProto = 2 // close the rpc connection ) -var RpcRequestHeaderProto_OperationProto_name = map[int32]string{ - 0: "RPC_FINAL_PACKET", - 1: "RPC_CONTINUATION_PACKET", - 2: "RPC_CLOSE_CONNECTION", -} -var RpcRequestHeaderProto_OperationProto_value = map[string]int32{ - "RPC_FINAL_PACKET": 0, - "RPC_CONTINUATION_PACKET": 1, - "RPC_CLOSE_CONNECTION": 2, -} +// Enum value maps for RpcRequestHeaderProto_OperationProto. +var ( + RpcRequestHeaderProto_OperationProto_name = map[int32]string{ + 0: "RPC_FINAL_PACKET", + 1: "RPC_CONTINUATION_PACKET", + 2: "RPC_CLOSE_CONNECTION", + } + RpcRequestHeaderProto_OperationProto_value = map[string]int32{ + "RPC_FINAL_PACKET": 0, + "RPC_CONTINUATION_PACKET": 1, + "RPC_CLOSE_CONNECTION": 2, + } +) func (x RpcRequestHeaderProto_OperationProto) Enum() *RpcRequestHeaderProto_OperationProto { p := new(RpcRequestHeaderProto_OperationProto) *p = x return p } + func (x RpcRequestHeaderProto_OperationProto) String() string { - return proto.EnumName(RpcRequestHeaderProto_OperationProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RpcRequestHeaderProto_OperationProto) Descriptor() protoreflect.EnumDescriptor { + return file_RpcHeader_proto_enumTypes[1].Descriptor() } -func (x *RpcRequestHeaderProto_OperationProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RpcRequestHeaderProto_OperationProto_value, data, "RpcRequestHeaderProto_OperationProto") + +func (RpcRequestHeaderProto_OperationProto) Type() protoreflect.EnumType { + return &file_RpcHeader_proto_enumTypes[1] +} + +func (x RpcRequestHeaderProto_OperationProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *RpcRequestHeaderProto_OperationProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = RpcRequestHeaderProto_OperationProto(value) + *x = RpcRequestHeaderProto_OperationProto(num) return nil } + +// Deprecated: Use RpcRequestHeaderProto_OperationProto.Descriptor instead. func (RpcRequestHeaderProto_OperationProto) EnumDescriptor() ([]byte, []int) { - return fileDescriptor4, []int{2, 0} + return file_RpcHeader_proto_rawDescGZIP(), []int{2, 0} } type RpcResponseHeaderProto_RpcStatusProto int32 const ( - RpcResponseHeaderProto_SUCCESS RpcResponseHeaderProto_RpcStatusProto = 0 - RpcResponseHeaderProto_ERROR RpcResponseHeaderProto_RpcStatusProto = 1 - RpcResponseHeaderProto_FATAL RpcResponseHeaderProto_RpcStatusProto = 2 + RpcResponseHeaderProto_SUCCESS RpcResponseHeaderProto_RpcStatusProto = 0 // RPC succeeded + RpcResponseHeaderProto_ERROR RpcResponseHeaderProto_RpcStatusProto = 1 // RPC or error - connection left open for future calls + RpcResponseHeaderProto_FATAL RpcResponseHeaderProto_RpcStatusProto = 2 // Fatal error - connection closed ) -var RpcResponseHeaderProto_RpcStatusProto_name = map[int32]string{ - 0: "SUCCESS", - 1: "ERROR", - 2: "FATAL", -} -var RpcResponseHeaderProto_RpcStatusProto_value = map[string]int32{ - "SUCCESS": 0, - "ERROR": 1, - "FATAL": 2, -} +// Enum value maps for RpcResponseHeaderProto_RpcStatusProto. +var ( + RpcResponseHeaderProto_RpcStatusProto_name = map[int32]string{ + 0: "SUCCESS", + 1: "ERROR", + 2: "FATAL", + } + RpcResponseHeaderProto_RpcStatusProto_value = map[string]int32{ + "SUCCESS": 0, + "ERROR": 1, + "FATAL": 2, + } +) func (x RpcResponseHeaderProto_RpcStatusProto) Enum() *RpcResponseHeaderProto_RpcStatusProto { p := new(RpcResponseHeaderProto_RpcStatusProto) *p = x return p } + func (x RpcResponseHeaderProto_RpcStatusProto) String() string { - return proto.EnumName(RpcResponseHeaderProto_RpcStatusProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RpcResponseHeaderProto_RpcStatusProto) Descriptor() protoreflect.EnumDescriptor { + return file_RpcHeader_proto_enumTypes[2].Descriptor() } -func (x *RpcResponseHeaderProto_RpcStatusProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RpcResponseHeaderProto_RpcStatusProto_value, data, "RpcResponseHeaderProto_RpcStatusProto") + +func (RpcResponseHeaderProto_RpcStatusProto) Type() protoreflect.EnumType { + return &file_RpcHeader_proto_enumTypes[2] +} + +func (x RpcResponseHeaderProto_RpcStatusProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *RpcResponseHeaderProto_RpcStatusProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = RpcResponseHeaderProto_RpcStatusProto(value) + *x = RpcResponseHeaderProto_RpcStatusProto(num) return nil } + +// Deprecated: Use RpcResponseHeaderProto_RpcStatusProto.Descriptor instead. func (RpcResponseHeaderProto_RpcStatusProto) EnumDescriptor() ([]byte, []int) { - return fileDescriptor4, []int{3, 0} + return file_RpcHeader_proto_rawDescGZIP(), []int{3, 0} } type RpcResponseHeaderProto_RpcErrorCodeProto int32 const ( // Non-fatal Rpc error - connection left open for future rpc calls - RpcResponseHeaderProto_ERROR_APPLICATION RpcResponseHeaderProto_RpcErrorCodeProto = 1 - RpcResponseHeaderProto_ERROR_NO_SUCH_METHOD RpcResponseHeaderProto_RpcErrorCodeProto = 2 - RpcResponseHeaderProto_ERROR_NO_SUCH_PROTOCOL RpcResponseHeaderProto_RpcErrorCodeProto = 3 - RpcResponseHeaderProto_ERROR_RPC_SERVER RpcResponseHeaderProto_RpcErrorCodeProto = 4 - RpcResponseHeaderProto_ERROR_SERIALIZING_RESPONSE RpcResponseHeaderProto_RpcErrorCodeProto = 5 - RpcResponseHeaderProto_ERROR_RPC_VERSION_MISMATCH RpcResponseHeaderProto_RpcErrorCodeProto = 6 + RpcResponseHeaderProto_ERROR_APPLICATION RpcResponseHeaderProto_RpcErrorCodeProto = 1 // RPC Failed - rpc app threw exception + RpcResponseHeaderProto_ERROR_NO_SUCH_METHOD RpcResponseHeaderProto_RpcErrorCodeProto = 2 // Rpc error - no such method + RpcResponseHeaderProto_ERROR_NO_SUCH_PROTOCOL RpcResponseHeaderProto_RpcErrorCodeProto = 3 // Rpc error - no such protocol + RpcResponseHeaderProto_ERROR_RPC_SERVER RpcResponseHeaderProto_RpcErrorCodeProto = 4 // Rpc error on server side + RpcResponseHeaderProto_ERROR_SERIALIZING_RESPONSE RpcResponseHeaderProto_RpcErrorCodeProto = 5 // error serializign response + RpcResponseHeaderProto_ERROR_RPC_VERSION_MISMATCH RpcResponseHeaderProto_RpcErrorCodeProto = 6 // Rpc protocol version mismatch // Fatal Server side Rpc error - connection closed - RpcResponseHeaderProto_FATAL_UNKNOWN RpcResponseHeaderProto_RpcErrorCodeProto = 10 - RpcResponseHeaderProto_FATAL_UNSUPPORTED_SERIALIZATION RpcResponseHeaderProto_RpcErrorCodeProto = 11 - RpcResponseHeaderProto_FATAL_INVALID_RPC_HEADER RpcResponseHeaderProto_RpcErrorCodeProto = 12 - RpcResponseHeaderProto_FATAL_DESERIALIZING_REQUEST RpcResponseHeaderProto_RpcErrorCodeProto = 13 - RpcResponseHeaderProto_FATAL_VERSION_MISMATCH RpcResponseHeaderProto_RpcErrorCodeProto = 14 - RpcResponseHeaderProto_FATAL_UNAUTHORIZED RpcResponseHeaderProto_RpcErrorCodeProto = 15 + RpcResponseHeaderProto_FATAL_UNKNOWN RpcResponseHeaderProto_RpcErrorCodeProto = 10 // unknown Fatal error + RpcResponseHeaderProto_FATAL_UNSUPPORTED_SERIALIZATION RpcResponseHeaderProto_RpcErrorCodeProto = 11 // IPC layer serilization type invalid + RpcResponseHeaderProto_FATAL_INVALID_RPC_HEADER RpcResponseHeaderProto_RpcErrorCodeProto = 12 // fields of RpcHeader are invalid + RpcResponseHeaderProto_FATAL_DESERIALIZING_REQUEST RpcResponseHeaderProto_RpcErrorCodeProto = 13 // could not deserilize rpc request + RpcResponseHeaderProto_FATAL_VERSION_MISMATCH RpcResponseHeaderProto_RpcErrorCodeProto = 14 // Ipc Layer version mismatch + RpcResponseHeaderProto_FATAL_UNAUTHORIZED RpcResponseHeaderProto_RpcErrorCodeProto = 15 // Auth failed ) -var RpcResponseHeaderProto_RpcErrorCodeProto_name = map[int32]string{ - 1: "ERROR_APPLICATION", - 2: "ERROR_NO_SUCH_METHOD", - 3: "ERROR_NO_SUCH_PROTOCOL", - 4: "ERROR_RPC_SERVER", - 5: "ERROR_SERIALIZING_RESPONSE", - 6: "ERROR_RPC_VERSION_MISMATCH", - 10: "FATAL_UNKNOWN", - 11: "FATAL_UNSUPPORTED_SERIALIZATION", - 12: "FATAL_INVALID_RPC_HEADER", - 13: "FATAL_DESERIALIZING_REQUEST", - 14: "FATAL_VERSION_MISMATCH", - 15: "FATAL_UNAUTHORIZED", -} -var RpcResponseHeaderProto_RpcErrorCodeProto_value = map[string]int32{ - "ERROR_APPLICATION": 1, - "ERROR_NO_SUCH_METHOD": 2, - "ERROR_NO_SUCH_PROTOCOL": 3, - "ERROR_RPC_SERVER": 4, - "ERROR_SERIALIZING_RESPONSE": 5, - "ERROR_RPC_VERSION_MISMATCH": 6, - "FATAL_UNKNOWN": 10, - "FATAL_UNSUPPORTED_SERIALIZATION": 11, - "FATAL_INVALID_RPC_HEADER": 12, - "FATAL_DESERIALIZING_REQUEST": 13, - "FATAL_VERSION_MISMATCH": 14, - "FATAL_UNAUTHORIZED": 15, -} +// Enum value maps for RpcResponseHeaderProto_RpcErrorCodeProto. +var ( + RpcResponseHeaderProto_RpcErrorCodeProto_name = map[int32]string{ + 1: "ERROR_APPLICATION", + 2: "ERROR_NO_SUCH_METHOD", + 3: "ERROR_NO_SUCH_PROTOCOL", + 4: "ERROR_RPC_SERVER", + 5: "ERROR_SERIALIZING_RESPONSE", + 6: "ERROR_RPC_VERSION_MISMATCH", + 10: "FATAL_UNKNOWN", + 11: "FATAL_UNSUPPORTED_SERIALIZATION", + 12: "FATAL_INVALID_RPC_HEADER", + 13: "FATAL_DESERIALIZING_REQUEST", + 14: "FATAL_VERSION_MISMATCH", + 15: "FATAL_UNAUTHORIZED", + } + RpcResponseHeaderProto_RpcErrorCodeProto_value = map[string]int32{ + "ERROR_APPLICATION": 1, + "ERROR_NO_SUCH_METHOD": 2, + "ERROR_NO_SUCH_PROTOCOL": 3, + "ERROR_RPC_SERVER": 4, + "ERROR_SERIALIZING_RESPONSE": 5, + "ERROR_RPC_VERSION_MISMATCH": 6, + "FATAL_UNKNOWN": 10, + "FATAL_UNSUPPORTED_SERIALIZATION": 11, + "FATAL_INVALID_RPC_HEADER": 12, + "FATAL_DESERIALIZING_REQUEST": 13, + "FATAL_VERSION_MISMATCH": 14, + "FATAL_UNAUTHORIZED": 15, + } +) func (x RpcResponseHeaderProto_RpcErrorCodeProto) Enum() *RpcResponseHeaderProto_RpcErrorCodeProto { p := new(RpcResponseHeaderProto_RpcErrorCodeProto) *p = x return p } + func (x RpcResponseHeaderProto_RpcErrorCodeProto) String() string { - return proto.EnumName(RpcResponseHeaderProto_RpcErrorCodeProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RpcResponseHeaderProto_RpcErrorCodeProto) Descriptor() protoreflect.EnumDescriptor { + return file_RpcHeader_proto_enumTypes[3].Descriptor() +} + +func (RpcResponseHeaderProto_RpcErrorCodeProto) Type() protoreflect.EnumType { + return &file_RpcHeader_proto_enumTypes[3] +} + +func (x RpcResponseHeaderProto_RpcErrorCodeProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *RpcResponseHeaderProto_RpcErrorCodeProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RpcResponseHeaderProto_RpcErrorCodeProto_value, data, "RpcResponseHeaderProto_RpcErrorCodeProto") + +// Deprecated: Do not use. +func (x *RpcResponseHeaderProto_RpcErrorCodeProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = RpcResponseHeaderProto_RpcErrorCodeProto(value) + *x = RpcResponseHeaderProto_RpcErrorCodeProto(num) return nil } + +// Deprecated: Use RpcResponseHeaderProto_RpcErrorCodeProto.Descriptor instead. func (RpcResponseHeaderProto_RpcErrorCodeProto) EnumDescriptor() ([]byte, []int) { - return fileDescriptor4, []int{3, 1} + return file_RpcHeader_proto_rawDescGZIP(), []int{3, 1} } type RpcSaslProto_SaslState int32 @@ -208,169 +320,292 @@ const ( RpcSaslProto_WRAP RpcSaslProto_SaslState = 5 ) -var RpcSaslProto_SaslState_name = map[int32]string{ - 0: "SUCCESS", - 1: "NEGOTIATE", - 2: "INITIATE", - 3: "CHALLENGE", - 4: "RESPONSE", - 5: "WRAP", -} -var RpcSaslProto_SaslState_value = map[string]int32{ - "SUCCESS": 0, - "NEGOTIATE": 1, - "INITIATE": 2, - "CHALLENGE": 3, - "RESPONSE": 4, - "WRAP": 5, -} +// Enum value maps for RpcSaslProto_SaslState. +var ( + RpcSaslProto_SaslState_name = map[int32]string{ + 0: "SUCCESS", + 1: "NEGOTIATE", + 2: "INITIATE", + 3: "CHALLENGE", + 4: "RESPONSE", + 5: "WRAP", + } + RpcSaslProto_SaslState_value = map[string]int32{ + "SUCCESS": 0, + "NEGOTIATE": 1, + "INITIATE": 2, + "CHALLENGE": 3, + "RESPONSE": 4, + "WRAP": 5, + } +) func (x RpcSaslProto_SaslState) Enum() *RpcSaslProto_SaslState { p := new(RpcSaslProto_SaslState) *p = x return p } + func (x RpcSaslProto_SaslState) String() string { - return proto.EnumName(RpcSaslProto_SaslState_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RpcSaslProto_SaslState) Descriptor() protoreflect.EnumDescriptor { + return file_RpcHeader_proto_enumTypes[4].Descriptor() +} + +func (RpcSaslProto_SaslState) Type() protoreflect.EnumType { + return &file_RpcHeader_proto_enumTypes[4] } -func (x *RpcSaslProto_SaslState) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RpcSaslProto_SaslState_value, data, "RpcSaslProto_SaslState") + +func (x RpcSaslProto_SaslState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *RpcSaslProto_SaslState) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = RpcSaslProto_SaslState(value) + *x = RpcSaslProto_SaslState(num) return nil } -func (RpcSaslProto_SaslState) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{4, 0} } -// * +// Deprecated: Use RpcSaslProto_SaslState.Descriptor instead. +func (RpcSaslProto_SaslState) EnumDescriptor() ([]byte, []int) { + return file_RpcHeader_proto_rawDescGZIP(), []int{4, 0} +} + +//* // Used to pass through the information necessary to continue // a trace after an RPC is made. All we need is the traceid // (so we know the overarching trace this message is a part of), and // the id of the current span when this message was sent, so we know // what span caused the new span we will create when this message is received. type RPCTraceInfoProto struct { - TraceId *int64 `protobuf:"varint,1,opt,name=traceId" json:"traceId,omitempty"` - ParentId *int64 `protobuf:"varint,2,opt,name=parentId" json:"parentId,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TraceId *int64 `protobuf:"varint,1,opt,name=traceId" json:"traceId,omitempty"` // parentIdHigh + ParentId *int64 `protobuf:"varint,2,opt,name=parentId" json:"parentId,omitempty"` // parentIdLow +} + +func (x *RPCTraceInfoProto) Reset() { + *x = RPCTraceInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RpcHeader_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RPCTraceInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RPCTraceInfoProto) ProtoMessage() {} + +func (x *RPCTraceInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_RpcHeader_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *RPCTraceInfoProto) Reset() { *m = RPCTraceInfoProto{} } -func (m *RPCTraceInfoProto) String() string { return proto.CompactTextString(m) } -func (*RPCTraceInfoProto) ProtoMessage() {} -func (*RPCTraceInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } +// Deprecated: Use RPCTraceInfoProto.ProtoReflect.Descriptor instead. +func (*RPCTraceInfoProto) Descriptor() ([]byte, []int) { + return file_RpcHeader_proto_rawDescGZIP(), []int{0} +} -func (m *RPCTraceInfoProto) GetTraceId() int64 { - if m != nil && m.TraceId != nil { - return *m.TraceId +func (x *RPCTraceInfoProto) GetTraceId() int64 { + if x != nil && x.TraceId != nil { + return *x.TraceId } return 0 } -func (m *RPCTraceInfoProto) GetParentId() int64 { - if m != nil && m.ParentId != nil { - return *m.ParentId +func (x *RPCTraceInfoProto) GetParentId() int64 { + if x != nil && x.ParentId != nil { + return *x.ParentId } return 0 } -// * +//* // Used to pass through the call context entry after an RPC is made. type RPCCallerContextProto struct { - Context *string `protobuf:"bytes,1,req,name=context" json:"context,omitempty"` - Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Context *string `protobuf:"bytes,1,req,name=context" json:"context,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` +} + +func (x *RPCCallerContextProto) Reset() { + *x = RPCCallerContextProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RpcHeader_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RPCCallerContextProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RPCCallerContextProto) Reset() { *m = RPCCallerContextProto{} } -func (m *RPCCallerContextProto) String() string { return proto.CompactTextString(m) } -func (*RPCCallerContextProto) ProtoMessage() {} -func (*RPCCallerContextProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} } +func (*RPCCallerContextProto) ProtoMessage() {} -func (m *RPCCallerContextProto) GetContext() string { - if m != nil && m.Context != nil { - return *m.Context +func (x *RPCCallerContextProto) ProtoReflect() protoreflect.Message { + mi := &file_RpcHeader_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RPCCallerContextProto.ProtoReflect.Descriptor instead. +func (*RPCCallerContextProto) Descriptor() ([]byte, []int) { + return file_RpcHeader_proto_rawDescGZIP(), []int{1} +} + +func (x *RPCCallerContextProto) GetContext() string { + if x != nil && x.Context != nil { + return *x.Context } return "" } -func (m *RPCCallerContextProto) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *RPCCallerContextProto) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type RpcRequestHeaderProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + RpcKind *RpcKindProto `protobuf:"varint,1,opt,name=rpcKind,enum=hadoop.common.RpcKindProto" json:"rpcKind,omitempty"` RpcOp *RpcRequestHeaderProto_OperationProto `protobuf:"varint,2,opt,name=rpcOp,enum=hadoop.common.RpcRequestHeaderProto_OperationProto" json:"rpcOp,omitempty"` - CallId *int32 `protobuf:"zigzag32,3,req,name=callId" json:"callId,omitempty"` - ClientId []byte `protobuf:"bytes,4,req,name=clientId" json:"clientId,omitempty"` + CallId *int32 `protobuf:"zigzag32,3,req,name=callId" json:"callId,omitempty"` // a sequence number that is sent back in response + ClientId []byte `protobuf:"bytes,4,req,name=clientId" json:"clientId,omitempty"` // Globally unique client ID // clientId + callId uniquely identifies a request // retry count, 1 means this is the first retry - RetryCount *int32 `protobuf:"zigzag32,5,opt,name=retryCount,def=-1" json:"retryCount,omitempty"` - TraceInfo *RPCTraceInfoProto `protobuf:"bytes,6,opt,name=traceInfo" json:"traceInfo,omitempty"` - CallerContext *RPCCallerContextProto `protobuf:"bytes,7,opt,name=callerContext" json:"callerContext,omitempty"` - XXX_unrecognized []byte `json:"-"` + RetryCount *int32 `protobuf:"zigzag32,5,opt,name=retryCount,def=-1" json:"retryCount,omitempty"` + TraceInfo *RPCTraceInfoProto `protobuf:"bytes,6,opt,name=traceInfo" json:"traceInfo,omitempty"` // tracing info + CallerContext *RPCCallerContextProto `protobuf:"bytes,7,opt,name=callerContext" json:"callerContext,omitempty"` // call context + StateId *int64 `protobuf:"varint,8,opt,name=stateId" json:"stateId,omitempty"` // The last seen Global State ID } -func (m *RpcRequestHeaderProto) Reset() { *m = RpcRequestHeaderProto{} } -func (m *RpcRequestHeaderProto) String() string { return proto.CompactTextString(m) } -func (*RpcRequestHeaderProto) ProtoMessage() {} -func (*RpcRequestHeaderProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{2} } +// Default values for RpcRequestHeaderProto fields. +const ( + Default_RpcRequestHeaderProto_RetryCount = int32(-1) +) + +func (x *RpcRequestHeaderProto) Reset() { + *x = RpcRequestHeaderProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RpcHeader_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -const Default_RpcRequestHeaderProto_RetryCount int32 = -1 +func (x *RpcRequestHeaderProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *RpcRequestHeaderProto) GetRpcKind() RpcKindProto { - if m != nil && m.RpcKind != nil { - return *m.RpcKind +func (*RpcRequestHeaderProto) ProtoMessage() {} + +func (x *RpcRequestHeaderProto) ProtoReflect() protoreflect.Message { + mi := &file_RpcHeader_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RpcRequestHeaderProto.ProtoReflect.Descriptor instead. +func (*RpcRequestHeaderProto) Descriptor() ([]byte, []int) { + return file_RpcHeader_proto_rawDescGZIP(), []int{2} +} + +func (x *RpcRequestHeaderProto) GetRpcKind() RpcKindProto { + if x != nil && x.RpcKind != nil { + return *x.RpcKind } return RpcKindProto_RPC_BUILTIN } -func (m *RpcRequestHeaderProto) GetRpcOp() RpcRequestHeaderProto_OperationProto { - if m != nil && m.RpcOp != nil { - return *m.RpcOp +func (x *RpcRequestHeaderProto) GetRpcOp() RpcRequestHeaderProto_OperationProto { + if x != nil && x.RpcOp != nil { + return *x.RpcOp } return RpcRequestHeaderProto_RPC_FINAL_PACKET } -func (m *RpcRequestHeaderProto) GetCallId() int32 { - if m != nil && m.CallId != nil { - return *m.CallId +func (x *RpcRequestHeaderProto) GetCallId() int32 { + if x != nil && x.CallId != nil { + return *x.CallId } return 0 } -func (m *RpcRequestHeaderProto) GetClientId() []byte { - if m != nil { - return m.ClientId +func (x *RpcRequestHeaderProto) GetClientId() []byte { + if x != nil { + return x.ClientId } return nil } -func (m *RpcRequestHeaderProto) GetRetryCount() int32 { - if m != nil && m.RetryCount != nil { - return *m.RetryCount +func (x *RpcRequestHeaderProto) GetRetryCount() int32 { + if x != nil && x.RetryCount != nil { + return *x.RetryCount } return Default_RpcRequestHeaderProto_RetryCount } -func (m *RpcRequestHeaderProto) GetTraceInfo() *RPCTraceInfoProto { - if m != nil { - return m.TraceInfo +func (x *RpcRequestHeaderProto) GetTraceInfo() *RPCTraceInfoProto { + if x != nil { + return x.TraceInfo } return nil } -func (m *RpcRequestHeaderProto) GetCallerContext() *RPCCallerContextProto { - if m != nil { - return m.CallerContext +func (x *RpcRequestHeaderProto) GetCallerContext() *RPCCallerContextProto { + if x != nil { + return x.CallerContext } return nil } -// * +func (x *RpcRequestHeaderProto) GetStateId() int64 { + if x != nil && x.StateId != nil { + return *x.StateId + } + return 0 +} + +//* // Rpc Response Header // +------------------------------------------------------------------+ // | Rpc total response length in bytes (4 bytes int) | @@ -389,251 +624,551 @@ func (m *RpcRequestHeaderProto) GetCallerContext() *RPCCallerContextProto { // Note that rpc response header is also used when connection setup fails. // Ie the response looks like a rpc response with a fake callId. type RpcResponseHeaderProto struct { - CallId *uint32 `protobuf:"varint,1,req,name=callId" json:"callId,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CallId *uint32 `protobuf:"varint,1,req,name=callId" json:"callId,omitempty"` // callId used in Request Status *RpcResponseHeaderProto_RpcStatusProto `protobuf:"varint,2,req,name=status,enum=hadoop.common.RpcResponseHeaderProto_RpcStatusProto" json:"status,omitempty"` - ServerIpcVersionNum *uint32 `protobuf:"varint,3,opt,name=serverIpcVersionNum" json:"serverIpcVersionNum,omitempty"` - ExceptionClassName *string `protobuf:"bytes,4,opt,name=exceptionClassName" json:"exceptionClassName,omitempty"` - ErrorMsg *string `protobuf:"bytes,5,opt,name=errorMsg" json:"errorMsg,omitempty"` - ErrorDetail *RpcResponseHeaderProto_RpcErrorCodeProto `protobuf:"varint,6,opt,name=errorDetail,enum=hadoop.common.RpcResponseHeaderProto_RpcErrorCodeProto" json:"errorDetail,omitempty"` - ClientId []byte `protobuf:"bytes,7,opt,name=clientId" json:"clientId,omitempty"` + ServerIpcVersionNum *uint32 `protobuf:"varint,3,opt,name=serverIpcVersionNum" json:"serverIpcVersionNum,omitempty"` // Sent if success or fail + ExceptionClassName *string `protobuf:"bytes,4,opt,name=exceptionClassName" json:"exceptionClassName,omitempty"` // if request fails + ErrorMsg *string `protobuf:"bytes,5,opt,name=errorMsg" json:"errorMsg,omitempty"` // if request fails, often contains strack trace + ErrorDetail *RpcResponseHeaderProto_RpcErrorCodeProto `protobuf:"varint,6,opt,name=errorDetail,enum=hadoop.common.RpcResponseHeaderProto_RpcErrorCodeProto" json:"errorDetail,omitempty"` // in case of error + ClientId []byte `protobuf:"bytes,7,opt,name=clientId" json:"clientId,omitempty"` // Globally unique client ID RetryCount *int32 `protobuf:"zigzag32,8,opt,name=retryCount,def=-1" json:"retryCount,omitempty"` - XXX_unrecognized []byte `json:"-"` + StateId *int64 `protobuf:"varint,9,opt,name=stateId" json:"stateId,omitempty"` // The last written Global State ID +} + +// Default values for RpcResponseHeaderProto fields. +const ( + Default_RpcResponseHeaderProto_RetryCount = int32(-1) +) + +func (x *RpcResponseHeaderProto) Reset() { + *x = RpcResponseHeaderProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RpcHeader_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RpcResponseHeaderProto) Reset() { *m = RpcResponseHeaderProto{} } -func (m *RpcResponseHeaderProto) String() string { return proto.CompactTextString(m) } -func (*RpcResponseHeaderProto) ProtoMessage() {} -func (*RpcResponseHeaderProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{3} } +func (x *RpcResponseHeaderProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -const Default_RpcResponseHeaderProto_RetryCount int32 = -1 +func (*RpcResponseHeaderProto) ProtoMessage() {} -func (m *RpcResponseHeaderProto) GetCallId() uint32 { - if m != nil && m.CallId != nil { - return *m.CallId +func (x *RpcResponseHeaderProto) ProtoReflect() protoreflect.Message { + mi := &file_RpcHeader_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RpcResponseHeaderProto.ProtoReflect.Descriptor instead. +func (*RpcResponseHeaderProto) Descriptor() ([]byte, []int) { + return file_RpcHeader_proto_rawDescGZIP(), []int{3} +} + +func (x *RpcResponseHeaderProto) GetCallId() uint32 { + if x != nil && x.CallId != nil { + return *x.CallId } return 0 } -func (m *RpcResponseHeaderProto) GetStatus() RpcResponseHeaderProto_RpcStatusProto { - if m != nil && m.Status != nil { - return *m.Status +func (x *RpcResponseHeaderProto) GetStatus() RpcResponseHeaderProto_RpcStatusProto { + if x != nil && x.Status != nil { + return *x.Status } return RpcResponseHeaderProto_SUCCESS } -func (m *RpcResponseHeaderProto) GetServerIpcVersionNum() uint32 { - if m != nil && m.ServerIpcVersionNum != nil { - return *m.ServerIpcVersionNum +func (x *RpcResponseHeaderProto) GetServerIpcVersionNum() uint32 { + if x != nil && x.ServerIpcVersionNum != nil { + return *x.ServerIpcVersionNum } return 0 } -func (m *RpcResponseHeaderProto) GetExceptionClassName() string { - if m != nil && m.ExceptionClassName != nil { - return *m.ExceptionClassName +func (x *RpcResponseHeaderProto) GetExceptionClassName() string { + if x != nil && x.ExceptionClassName != nil { + return *x.ExceptionClassName } return "" } -func (m *RpcResponseHeaderProto) GetErrorMsg() string { - if m != nil && m.ErrorMsg != nil { - return *m.ErrorMsg +func (x *RpcResponseHeaderProto) GetErrorMsg() string { + if x != nil && x.ErrorMsg != nil { + return *x.ErrorMsg } return "" } -func (m *RpcResponseHeaderProto) GetErrorDetail() RpcResponseHeaderProto_RpcErrorCodeProto { - if m != nil && m.ErrorDetail != nil { - return *m.ErrorDetail +func (x *RpcResponseHeaderProto) GetErrorDetail() RpcResponseHeaderProto_RpcErrorCodeProto { + if x != nil && x.ErrorDetail != nil { + return *x.ErrorDetail } return RpcResponseHeaderProto_ERROR_APPLICATION } -func (m *RpcResponseHeaderProto) GetClientId() []byte { - if m != nil { - return m.ClientId +func (x *RpcResponseHeaderProto) GetClientId() []byte { + if x != nil { + return x.ClientId } return nil } -func (m *RpcResponseHeaderProto) GetRetryCount() int32 { - if m != nil && m.RetryCount != nil { - return *m.RetryCount +func (x *RpcResponseHeaderProto) GetRetryCount() int32 { + if x != nil && x.RetryCount != nil { + return *x.RetryCount } return Default_RpcResponseHeaderProto_RetryCount } +func (x *RpcResponseHeaderProto) GetStateId() int64 { + if x != nil && x.StateId != nil { + return *x.StateId + } + return 0 +} + type RpcSaslProto struct { - Version *uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` - State *RpcSaslProto_SaslState `protobuf:"varint,2,req,name=state,enum=hadoop.common.RpcSaslProto_SaslState" json:"state,omitempty"` - Token []byte `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"` - Auths []*RpcSaslProto_SaslAuth `protobuf:"bytes,4,rep,name=auths" json:"auths,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version *uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` + State *RpcSaslProto_SaslState `protobuf:"varint,2,req,name=state,enum=hadoop.common.RpcSaslProto_SaslState" json:"state,omitempty"` + Token []byte `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"` + Auths []*RpcSaslProto_SaslAuth `protobuf:"bytes,4,rep,name=auths" json:"auths,omitempty"` +} + +func (x *RpcSaslProto) Reset() { + *x = RpcSaslProto{} + if protoimpl.UnsafeEnabled { + mi := &file_RpcHeader_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RpcSaslProto) Reset() { *m = RpcSaslProto{} } -func (m *RpcSaslProto) String() string { return proto.CompactTextString(m) } -func (*RpcSaslProto) ProtoMessage() {} -func (*RpcSaslProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{4} } +func (x *RpcSaslProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RpcSaslProto) ProtoMessage() {} + +func (x *RpcSaslProto) ProtoReflect() protoreflect.Message { + mi := &file_RpcHeader_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} -func (m *RpcSaslProto) GetVersion() uint32 { - if m != nil && m.Version != nil { - return *m.Version +// Deprecated: Use RpcSaslProto.ProtoReflect.Descriptor instead. +func (*RpcSaslProto) Descriptor() ([]byte, []int) { + return file_RpcHeader_proto_rawDescGZIP(), []int{4} +} + +func (x *RpcSaslProto) GetVersion() uint32 { + if x != nil && x.Version != nil { + return *x.Version } return 0 } -func (m *RpcSaslProto) GetState() RpcSaslProto_SaslState { - if m != nil && m.State != nil { - return *m.State +func (x *RpcSaslProto) GetState() RpcSaslProto_SaslState { + if x != nil && x.State != nil { + return *x.State } return RpcSaslProto_SUCCESS } -func (m *RpcSaslProto) GetToken() []byte { - if m != nil { - return m.Token +func (x *RpcSaslProto) GetToken() []byte { + if x != nil { + return x.Token } return nil } -func (m *RpcSaslProto) GetAuths() []*RpcSaslProto_SaslAuth { - if m != nil { - return m.Auths +func (x *RpcSaslProto) GetAuths() []*RpcSaslProto_SaslAuth { + if x != nil { + return x.Auths } return nil } type RpcSaslProto_SaslAuth struct { - Method *string `protobuf:"bytes,1,req,name=method" json:"method,omitempty"` - Mechanism *string `protobuf:"bytes,2,req,name=mechanism" json:"mechanism,omitempty"` - Protocol *string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"` - ServerId *string `protobuf:"bytes,4,opt,name=serverId" json:"serverId,omitempty"` - Challenge []byte `protobuf:"bytes,5,opt,name=challenge" json:"challenge,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Method *string `protobuf:"bytes,1,req,name=method" json:"method,omitempty"` + Mechanism *string `protobuf:"bytes,2,req,name=mechanism" json:"mechanism,omitempty"` + Protocol *string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"` + ServerId *string `protobuf:"bytes,4,opt,name=serverId" json:"serverId,omitempty"` + Challenge []byte `protobuf:"bytes,5,opt,name=challenge" json:"challenge,omitempty"` +} + +func (x *RpcSaslProto_SaslAuth) Reset() { + *x = RpcSaslProto_SaslAuth{} + if protoimpl.UnsafeEnabled { + mi := &file_RpcHeader_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RpcSaslProto_SaslAuth) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RpcSaslProto_SaslAuth) Reset() { *m = RpcSaslProto_SaslAuth{} } -func (m *RpcSaslProto_SaslAuth) String() string { return proto.CompactTextString(m) } -func (*RpcSaslProto_SaslAuth) ProtoMessage() {} -func (*RpcSaslProto_SaslAuth) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{4, 0} } +func (*RpcSaslProto_SaslAuth) ProtoMessage() {} -func (m *RpcSaslProto_SaslAuth) GetMethod() string { - if m != nil && m.Method != nil { - return *m.Method +func (x *RpcSaslProto_SaslAuth) ProtoReflect() protoreflect.Message { + mi := &file_RpcHeader_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RpcSaslProto_SaslAuth.ProtoReflect.Descriptor instead. +func (*RpcSaslProto_SaslAuth) Descriptor() ([]byte, []int) { + return file_RpcHeader_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *RpcSaslProto_SaslAuth) GetMethod() string { + if x != nil && x.Method != nil { + return *x.Method } return "" } -func (m *RpcSaslProto_SaslAuth) GetMechanism() string { - if m != nil && m.Mechanism != nil { - return *m.Mechanism +func (x *RpcSaslProto_SaslAuth) GetMechanism() string { + if x != nil && x.Mechanism != nil { + return *x.Mechanism } return "" } -func (m *RpcSaslProto_SaslAuth) GetProtocol() string { - if m != nil && m.Protocol != nil { - return *m.Protocol +func (x *RpcSaslProto_SaslAuth) GetProtocol() string { + if x != nil && x.Protocol != nil { + return *x.Protocol } return "" } -func (m *RpcSaslProto_SaslAuth) GetServerId() string { - if m != nil && m.ServerId != nil { - return *m.ServerId +func (x *RpcSaslProto_SaslAuth) GetServerId() string { + if x != nil && x.ServerId != nil { + return *x.ServerId } return "" } -func (m *RpcSaslProto_SaslAuth) GetChallenge() []byte { - if m != nil { - return m.Challenge +func (x *RpcSaslProto_SaslAuth) GetChallenge() []byte { + if x != nil { + return x.Challenge } return nil } -func init() { - proto.RegisterType((*RPCTraceInfoProto)(nil), "hadoop.common.RPCTraceInfoProto") - proto.RegisterType((*RPCCallerContextProto)(nil), "hadoop.common.RPCCallerContextProto") - proto.RegisterType((*RpcRequestHeaderProto)(nil), "hadoop.common.RpcRequestHeaderProto") - proto.RegisterType((*RpcResponseHeaderProto)(nil), "hadoop.common.RpcResponseHeaderProto") - proto.RegisterType((*RpcSaslProto)(nil), "hadoop.common.RpcSaslProto") - proto.RegisterType((*RpcSaslProto_SaslAuth)(nil), "hadoop.common.RpcSaslProto.SaslAuth") - proto.RegisterEnum("hadoop.common.RpcKindProto", RpcKindProto_name, RpcKindProto_value) - proto.RegisterEnum("hadoop.common.RpcRequestHeaderProto_OperationProto", RpcRequestHeaderProto_OperationProto_name, RpcRequestHeaderProto_OperationProto_value) - proto.RegisterEnum("hadoop.common.RpcResponseHeaderProto_RpcStatusProto", RpcResponseHeaderProto_RpcStatusProto_name, RpcResponseHeaderProto_RpcStatusProto_value) - proto.RegisterEnum("hadoop.common.RpcResponseHeaderProto_RpcErrorCodeProto", RpcResponseHeaderProto_RpcErrorCodeProto_name, RpcResponseHeaderProto_RpcErrorCodeProto_value) - proto.RegisterEnum("hadoop.common.RpcSaslProto_SaslState", RpcSaslProto_SaslState_name, RpcSaslProto_SaslState_value) -} - -func init() { proto.RegisterFile("RpcHeader.proto", fileDescriptor4) } - -var fileDescriptor4 = []byte{ - // 1035 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xdd, 0x6e, 0xe3, 0x44, - 0x14, 0x5e, 0x3b, 0x49, 0xdb, 0x9c, 0x26, 0xa9, 0x33, 0xdb, 0x76, 0xad, 0x76, 0xb5, 0x1b, 0x05, - 0x90, 0x22, 0x24, 0x22, 0xe8, 0x2e, 0x42, 0x5a, 0x24, 0x24, 0xd7, 0x99, 0x36, 0xb3, 0x75, 0x6d, - 0x33, 0x76, 0x5a, 0xb1, 0x02, 0x45, 0xc6, 0x99, 0x6d, 0x22, 0x12, 0xdb, 0xd8, 0xce, 0x6a, 0x79, - 0x11, 0xae, 0x79, 0x02, 0xc4, 0x03, 0x71, 0xc3, 0x9b, 0xa0, 0x99, 0x89, 0x9d, 0xa6, 0x29, 0x12, - 0x77, 0x73, 0xfe, 0xbe, 0x39, 0x3f, 0xdf, 0x99, 0x81, 0x03, 0x9a, 0x84, 0x43, 0x16, 0x4c, 0x58, - 0xda, 0x4f, 0xd2, 0x38, 0x8f, 0x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3, 0xf2, 0xfd, 0xf9, 0xfa, 0xb3, 0x17, 0xb7, 0x65, 0x7f, 0x28, 0xca, 0xbf, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x4d, 0x60, 0xab, 0xef, 0x01, 0x08, 0x00, 0x00, +var File_RpcHeader_proto protoreflect.FileDescriptor + +var file_RpcHeader_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x52, 0x70, 0x63, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0d, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x22, 0x49, 0x0a, 0x11, 0x52, 0x50, 0x43, 0x54, 0x72, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x4f, 0x0a, 0x15, 0x52, + 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xf6, 0x03, 0x0a, + 0x15, 0x52, 0x70, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x0a, 0x07, 0x72, 0x70, 0x63, 0x4b, 0x69, 0x6e, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x70, 0x63, 0x4b, 0x69, 0x6e, 0x64, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x72, 0x70, 0x63, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x49, 0x0a, + 0x05, 0x72, 0x70, 0x63, 0x4f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x70, 0x63, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x05, 0x72, 0x70, 0x63, 0x4f, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6c, 0x6c, + 0x49, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x11, 0x52, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x02, + 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0a, + 0x72, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, + 0x3a, 0x02, 0x2d, 0x31, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x3e, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x50, 0x43, 0x54, 0x72, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x4a, 0x0a, 0x0d, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x61, 0x6c, 0x6c, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0d, 0x63, + 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0x5d, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x50, 0x43, 0x5f, + 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x00, 0x12, 0x1b, + 0x0a, 0x17, 0x52, 0x50, 0x43, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x52, + 0x50, 0x43, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x22, 0xca, 0x06, 0x0a, 0x16, 0x52, 0x70, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, + 0x52, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x70, 0x63, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x52, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x49, 0x70, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x13, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x70, 0x63, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x12, 0x2e, 0x0a, 0x12, 0x65, 0x78, 0x63, 0x65, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x4d, 0x73, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x4d, 0x73, 0x67, 0x12, 0x59, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x70, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x52, 0x70, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, + 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0a, 0x72, + 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x11, 0x3a, + 0x02, 0x2d, 0x31, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x0e, 0x52, 0x70, 0x63, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x0a, 0x07, 0x53, + 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x54, 0x41, 0x4c, 0x10, 0x02, 0x22, 0xe1, + 0x02, 0x0a, 0x11, 0x52, 0x70, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x41, 0x50, + 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x5f, 0x53, 0x55, 0x43, 0x48, 0x5f, 0x4d, 0x45, 0x54, + 0x48, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, + 0x4f, 0x5f, 0x53, 0x55, 0x43, 0x48, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, + 0x03, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x52, 0x50, 0x43, 0x5f, 0x53, + 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x53, 0x45, 0x52, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x53, + 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x52, 0x50, 0x43, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x53, + 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x41, 0x54, 0x41, 0x4c, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x0a, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, + 0x54, 0x41, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, + 0x53, 0x45, 0x52, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0b, 0x12, + 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x54, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, + 0x5f, 0x52, 0x50, 0x43, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x0c, 0x12, 0x1f, 0x0a, + 0x1b, 0x46, 0x41, 0x54, 0x41, 0x4c, 0x5f, 0x44, 0x45, 0x53, 0x45, 0x52, 0x49, 0x41, 0x4c, 0x49, + 0x5a, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x0d, 0x12, 0x1a, + 0x0a, 0x16, 0x46, 0x41, 0x54, 0x41, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, + 0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x0e, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x41, + 0x54, 0x41, 0x4c, 0x5f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, + 0x10, 0x0f, 0x22, 0xae, 0x03, 0x0a, 0x0c, 0x52, 0x70, 0x63, 0x53, 0x61, 0x73, 0x6c, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x70, 0x63, + 0x53, 0x61, 0x73, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x61, 0x73, 0x6c, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x3a, 0x0a, 0x05, 0x61, 0x75, 0x74, 0x68, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x52, 0x70, 0x63, 0x53, 0x61, 0x73, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x61, 0x73, + 0x6c, 0x41, 0x75, 0x74, 0x68, 0x52, 0x05, 0x61, 0x75, 0x74, 0x68, 0x73, 0x1a, 0x96, 0x01, 0x0a, + 0x08, 0x53, 0x61, 0x73, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x18, 0x02, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, + 0x65, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6c, + 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x22, 0x5c, 0x0a, 0x09, 0x53, 0x61, 0x73, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x4e, 0x45, 0x47, 0x4f, 0x54, 0x49, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0c, + 0x0a, 0x08, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, + 0x43, 0x48, 0x41, 0x4c, 0x4c, 0x45, 0x4e, 0x47, 0x45, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x52, + 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x52, 0x41, + 0x50, 0x10, 0x05, 0x2a, 0x4a, 0x0a, 0x0c, 0x52, 0x70, 0x63, 0x4b, 0x69, 0x6e, 0x64, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x43, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x54, + 0x49, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x50, 0x43, 0x5f, 0x57, 0x52, 0x49, 0x54, + 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x50, 0x43, 0x5f, 0x50, 0x52, + 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x42, 0x55, 0x46, 0x46, 0x45, 0x52, 0x10, 0x02, 0x42, + 0x72, 0x0a, 0x1e, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x69, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x42, 0x0f, 0x52, 0x70, 0x63, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x73, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0xa0, 0x01, 0x01, +} + +var ( + file_RpcHeader_proto_rawDescOnce sync.Once + file_RpcHeader_proto_rawDescData = file_RpcHeader_proto_rawDesc +) + +func file_RpcHeader_proto_rawDescGZIP() []byte { + file_RpcHeader_proto_rawDescOnce.Do(func() { + file_RpcHeader_proto_rawDescData = protoimpl.X.CompressGZIP(file_RpcHeader_proto_rawDescData) + }) + return file_RpcHeader_proto_rawDescData +} + +var file_RpcHeader_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_RpcHeader_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_RpcHeader_proto_goTypes = []interface{}{ + (RpcKindProto)(0), // 0: hadoop.common.RpcKindProto + (RpcRequestHeaderProto_OperationProto)(0), // 1: hadoop.common.RpcRequestHeaderProto.OperationProto + (RpcResponseHeaderProto_RpcStatusProto)(0), // 2: hadoop.common.RpcResponseHeaderProto.RpcStatusProto + (RpcResponseHeaderProto_RpcErrorCodeProto)(0), // 3: hadoop.common.RpcResponseHeaderProto.RpcErrorCodeProto + (RpcSaslProto_SaslState)(0), // 4: hadoop.common.RpcSaslProto.SaslState + (*RPCTraceInfoProto)(nil), // 5: hadoop.common.RPCTraceInfoProto + (*RPCCallerContextProto)(nil), // 6: hadoop.common.RPCCallerContextProto + (*RpcRequestHeaderProto)(nil), // 7: hadoop.common.RpcRequestHeaderProto + (*RpcResponseHeaderProto)(nil), // 8: hadoop.common.RpcResponseHeaderProto + (*RpcSaslProto)(nil), // 9: hadoop.common.RpcSaslProto + (*RpcSaslProto_SaslAuth)(nil), // 10: hadoop.common.RpcSaslProto.SaslAuth +} +var file_RpcHeader_proto_depIdxs = []int32{ + 0, // 0: hadoop.common.RpcRequestHeaderProto.rpcKind:type_name -> hadoop.common.RpcKindProto + 1, // 1: hadoop.common.RpcRequestHeaderProto.rpcOp:type_name -> hadoop.common.RpcRequestHeaderProto.OperationProto + 5, // 2: hadoop.common.RpcRequestHeaderProto.traceInfo:type_name -> hadoop.common.RPCTraceInfoProto + 6, // 3: hadoop.common.RpcRequestHeaderProto.callerContext:type_name -> hadoop.common.RPCCallerContextProto + 2, // 4: hadoop.common.RpcResponseHeaderProto.status:type_name -> hadoop.common.RpcResponseHeaderProto.RpcStatusProto + 3, // 5: hadoop.common.RpcResponseHeaderProto.errorDetail:type_name -> hadoop.common.RpcResponseHeaderProto.RpcErrorCodeProto + 4, // 6: hadoop.common.RpcSaslProto.state:type_name -> hadoop.common.RpcSaslProto.SaslState + 10, // 7: hadoop.common.RpcSaslProto.auths:type_name -> hadoop.common.RpcSaslProto.SaslAuth + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_RpcHeader_proto_init() } +func file_RpcHeader_proto_init() { + if File_RpcHeader_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_RpcHeader_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RPCTraceInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_RpcHeader_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RPCCallerContextProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_RpcHeader_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RpcRequestHeaderProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_RpcHeader_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RpcResponseHeaderProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_RpcHeader_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RpcSaslProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_RpcHeader_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RpcSaslProto_SaslAuth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_RpcHeader_proto_rawDesc, + NumEnums: 5, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_RpcHeader_proto_goTypes, + DependencyIndexes: file_RpcHeader_proto_depIdxs, + EnumInfos: file_RpcHeader_proto_enumTypes, + MessageInfos: file_RpcHeader_proto_msgTypes, + }.Build() + File_RpcHeader_proto = out.File + file_RpcHeader_proto_rawDesc = nil + file_RpcHeader_proto_goTypes = nil + file_RpcHeader_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/RpcHeader.proto b/internal/protocol/hadoop_common/RpcHeader.proto index aa146162..cc0821eb 100644 --- a/internal/protocol/hadoop_common/RpcHeader.proto +++ b/internal/protocol/hadoop_common/RpcHeader.proto @@ -21,10 +21,11 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.ipc.protobuf"; option java_outer_classname = "RpcHeaderProtos"; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; /** @@ -90,6 +91,7 @@ message RpcRequestHeaderProto { // the header for the RpcRequest optional sint32 retryCount = 5 [default = -1]; optional RPCTraceInfoProto traceInfo = 6; // tracing info optional RPCCallerContextProto callerContext = 7; // call context + optional int64 stateId = 8; // The last seen Global State ID } @@ -155,6 +157,7 @@ message RpcResponseHeaderProto { optional RpcErrorCodeProto errorDetail = 6; // in case of error optional bytes clientId = 7; // Globally unique client ID optional sint32 retryCount = 8 [default = -1]; + optional int64 stateId = 9; // The last written Global State ID } message RpcSaslProto { diff --git a/internal/protocol/hadoop_common/Security.pb.go b/internal/protocol/hadoop_common/Security.pb.go index 666e1d49..6a78a624 100644 --- a/internal/protocol/hadoop_common/Security.pb.go +++ b/internal/protocol/hadoop_common/Security.pb.go @@ -1,193 +1,745 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: Security.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // Security token identifier type TokenProto struct { - Identifier []byte `protobuf:"bytes,1,req,name=identifier" json:"identifier,omitempty"` - Password []byte `protobuf:"bytes,2,req,name=password" json:"password,omitempty"` - Kind *string `protobuf:"bytes,3,req,name=kind" json:"kind,omitempty"` - Service *string `protobuf:"bytes,4,req,name=service" json:"service,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Identifier []byte `protobuf:"bytes,1,req,name=identifier" json:"identifier,omitempty"` + Password []byte `protobuf:"bytes,2,req,name=password" json:"password,omitempty"` + Kind *string `protobuf:"bytes,3,req,name=kind" json:"kind,omitempty"` + Service *string `protobuf:"bytes,4,req,name=service" json:"service,omitempty"` } -func (m *TokenProto) Reset() { *m = TokenProto{} } -func (m *TokenProto) String() string { return proto.CompactTextString(m) } -func (*TokenProto) ProtoMessage() {} -func (*TokenProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{0} } +func (x *TokenProto) Reset() { + *x = TokenProto{} + if protoimpl.UnsafeEnabled { + mi := &file_Security_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *TokenProto) GetIdentifier() []byte { - if m != nil { - return m.Identifier +func (x *TokenProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenProto) ProtoMessage() {} + +func (x *TokenProto) ProtoReflect() protoreflect.Message { + mi := &file_Security_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenProto.ProtoReflect.Descriptor instead. +func (*TokenProto) Descriptor() ([]byte, []int) { + return file_Security_proto_rawDescGZIP(), []int{0} +} + +func (x *TokenProto) GetIdentifier() []byte { + if x != nil { + return x.Identifier } return nil } -func (m *TokenProto) GetPassword() []byte { - if m != nil { - return m.Password +func (x *TokenProto) GetPassword() []byte { + if x != nil { + return x.Password } return nil } -func (m *TokenProto) GetKind() string { - if m != nil && m.Kind != nil { - return *m.Kind +func (x *TokenProto) GetKind() string { + if x != nil && x.Kind != nil { + return *x.Kind + } + return "" +} + +func (x *TokenProto) GetService() string { + if x != nil && x.Service != nil { + return *x.Service } return "" } -func (m *TokenProto) GetService() string { - if m != nil && m.Service != nil { - return *m.Service +type CredentialsKVProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Alias *string `protobuf:"bytes,1,req,name=alias" json:"alias,omitempty"` + Token *TokenProto `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` + Secret []byte `protobuf:"bytes,3,opt,name=secret" json:"secret,omitempty"` +} + +func (x *CredentialsKVProto) Reset() { + *x = CredentialsKVProto{} + if protoimpl.UnsafeEnabled { + mi := &file_Security_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CredentialsKVProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CredentialsKVProto) ProtoMessage() {} + +func (x *CredentialsKVProto) ProtoReflect() protoreflect.Message { + mi := &file_Security_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CredentialsKVProto.ProtoReflect.Descriptor instead. +func (*CredentialsKVProto) Descriptor() ([]byte, []int) { + return file_Security_proto_rawDescGZIP(), []int{1} +} + +func (x *CredentialsKVProto) GetAlias() string { + if x != nil && x.Alias != nil { + return *x.Alias } return "" } +func (x *CredentialsKVProto) GetToken() *TokenProto { + if x != nil { + return x.Token + } + return nil +} + +func (x *CredentialsKVProto) GetSecret() []byte { + if x != nil { + return x.Secret + } + return nil +} + +type CredentialsProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tokens []*CredentialsKVProto `protobuf:"bytes,1,rep,name=tokens" json:"tokens,omitempty"` + Secrets []*CredentialsKVProto `protobuf:"bytes,2,rep,name=secrets" json:"secrets,omitempty"` +} + +func (x *CredentialsProto) Reset() { + *x = CredentialsProto{} + if protoimpl.UnsafeEnabled { + mi := &file_Security_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CredentialsProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CredentialsProto) ProtoMessage() {} + +func (x *CredentialsProto) ProtoReflect() protoreflect.Message { + mi := &file_Security_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CredentialsProto.ProtoReflect.Descriptor instead. +func (*CredentialsProto) Descriptor() ([]byte, []int) { + return file_Security_proto_rawDescGZIP(), []int{2} +} + +func (x *CredentialsProto) GetTokens() []*CredentialsKVProto { + if x != nil { + return x.Tokens + } + return nil +} + +func (x *CredentialsProto) GetSecrets() []*CredentialsKVProto { + if x != nil { + return x.Secrets + } + return nil +} + type GetDelegationTokenRequestProto struct { - Renewer *string `protobuf:"bytes,1,req,name=renewer" json:"renewer,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Renewer *string `protobuf:"bytes,1,req,name=renewer" json:"renewer,omitempty"` +} + +func (x *GetDelegationTokenRequestProto) Reset() { + *x = GetDelegationTokenRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_Security_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDelegationTokenRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetDelegationTokenRequestProto) Reset() { *m = GetDelegationTokenRequestProto{} } -func (m *GetDelegationTokenRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetDelegationTokenRequestProto) ProtoMessage() {} -func (*GetDelegationTokenRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{1} } +func (*GetDelegationTokenRequestProto) ProtoMessage() {} -func (m *GetDelegationTokenRequestProto) GetRenewer() string { - if m != nil && m.Renewer != nil { - return *m.Renewer +func (x *GetDelegationTokenRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_Security_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDelegationTokenRequestProto.ProtoReflect.Descriptor instead. +func (*GetDelegationTokenRequestProto) Descriptor() ([]byte, []int) { + return file_Security_proto_rawDescGZIP(), []int{3} +} + +func (x *GetDelegationTokenRequestProto) GetRenewer() string { + if x != nil && x.Renewer != nil { + return *x.Renewer } return "" } type GetDelegationTokenResponseProto struct { - Token *TokenProto `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token *TokenProto `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` } -func (m *GetDelegationTokenResponseProto) Reset() { *m = GetDelegationTokenResponseProto{} } -func (m *GetDelegationTokenResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetDelegationTokenResponseProto) ProtoMessage() {} -func (*GetDelegationTokenResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{2} } +func (x *GetDelegationTokenResponseProto) Reset() { + *x = GetDelegationTokenResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_Security_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDelegationTokenResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *GetDelegationTokenResponseProto) GetToken() *TokenProto { - if m != nil { - return m.Token +func (*GetDelegationTokenResponseProto) ProtoMessage() {} + +func (x *GetDelegationTokenResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_Security_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDelegationTokenResponseProto.ProtoReflect.Descriptor instead. +func (*GetDelegationTokenResponseProto) Descriptor() ([]byte, []int) { + return file_Security_proto_rawDescGZIP(), []int{4} +} + +func (x *GetDelegationTokenResponseProto) GetToken() *TokenProto { + if x != nil { + return x.Token } return nil } type RenewDelegationTokenRequestProto struct { - Token *TokenProto `protobuf:"bytes,1,req,name=token" json:"token,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token *TokenProto `protobuf:"bytes,1,req,name=token" json:"token,omitempty"` +} + +func (x *RenewDelegationTokenRequestProto) Reset() { + *x = RenewDelegationTokenRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_Security_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RenewDelegationTokenRequestProto) Reset() { *m = RenewDelegationTokenRequestProto{} } -func (m *RenewDelegationTokenRequestProto) String() string { return proto.CompactTextString(m) } -func (*RenewDelegationTokenRequestProto) ProtoMessage() {} +func (x *RenewDelegationTokenRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenewDelegationTokenRequestProto) ProtoMessage() {} + +func (x *RenewDelegationTokenRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_Security_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenewDelegationTokenRequestProto.ProtoReflect.Descriptor instead. func (*RenewDelegationTokenRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor7, []int{3} + return file_Security_proto_rawDescGZIP(), []int{5} } -func (m *RenewDelegationTokenRequestProto) GetToken() *TokenProto { - if m != nil { - return m.Token +func (x *RenewDelegationTokenRequestProto) GetToken() *TokenProto { + if x != nil { + return x.Token } return nil } type RenewDelegationTokenResponseProto struct { - NewExpiryTime *uint64 `protobuf:"varint,1,req,name=newExpiryTime" json:"newExpiryTime,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NewExpiryTime *uint64 `protobuf:"varint,1,req,name=newExpiryTime" json:"newExpiryTime,omitempty"` } -func (m *RenewDelegationTokenResponseProto) Reset() { *m = RenewDelegationTokenResponseProto{} } -func (m *RenewDelegationTokenResponseProto) String() string { return proto.CompactTextString(m) } -func (*RenewDelegationTokenResponseProto) ProtoMessage() {} +func (x *RenewDelegationTokenResponseProto) Reset() { + *x = RenewDelegationTokenResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_Security_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RenewDelegationTokenResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenewDelegationTokenResponseProto) ProtoMessage() {} + +func (x *RenewDelegationTokenResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_Security_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenewDelegationTokenResponseProto.ProtoReflect.Descriptor instead. func (*RenewDelegationTokenResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor7, []int{4} + return file_Security_proto_rawDescGZIP(), []int{6} } -func (m *RenewDelegationTokenResponseProto) GetNewExpiryTime() uint64 { - if m != nil && m.NewExpiryTime != nil { - return *m.NewExpiryTime +func (x *RenewDelegationTokenResponseProto) GetNewExpiryTime() uint64 { + if x != nil && x.NewExpiryTime != nil { + return *x.NewExpiryTime } return 0 } type CancelDelegationTokenRequestProto struct { - Token *TokenProto `protobuf:"bytes,1,req,name=token" json:"token,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token *TokenProto `protobuf:"bytes,1,req,name=token" json:"token,omitempty"` +} + +func (x *CancelDelegationTokenRequestProto) Reset() { + *x = CancelDelegationTokenRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_Security_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CancelDelegationTokenRequestProto) Reset() { *m = CancelDelegationTokenRequestProto{} } -func (m *CancelDelegationTokenRequestProto) String() string { return proto.CompactTextString(m) } -func (*CancelDelegationTokenRequestProto) ProtoMessage() {} +func (x *CancelDelegationTokenRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelDelegationTokenRequestProto) ProtoMessage() {} + +func (x *CancelDelegationTokenRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_Security_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelDelegationTokenRequestProto.ProtoReflect.Descriptor instead. func (*CancelDelegationTokenRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor7, []int{5} + return file_Security_proto_rawDescGZIP(), []int{7} } -func (m *CancelDelegationTokenRequestProto) GetToken() *TokenProto { - if m != nil { - return m.Token +func (x *CancelDelegationTokenRequestProto) GetToken() *TokenProto { + if x != nil { + return x.Token } return nil } type CancelDelegationTokenResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CancelDelegationTokenResponseProto) Reset() { + *x = CancelDelegationTokenResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_Security_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelDelegationTokenResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CancelDelegationTokenResponseProto) Reset() { *m = CancelDelegationTokenResponseProto{} } -func (m *CancelDelegationTokenResponseProto) String() string { return proto.CompactTextString(m) } -func (*CancelDelegationTokenResponseProto) ProtoMessage() {} +func (*CancelDelegationTokenResponseProto) ProtoMessage() {} + +func (x *CancelDelegationTokenResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_Security_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelDelegationTokenResponseProto.ProtoReflect.Descriptor instead. func (*CancelDelegationTokenResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor7, []int{6} -} - -func init() { - proto.RegisterType((*TokenProto)(nil), "hadoop.common.TokenProto") - proto.RegisterType((*GetDelegationTokenRequestProto)(nil), "hadoop.common.GetDelegationTokenRequestProto") - proto.RegisterType((*GetDelegationTokenResponseProto)(nil), "hadoop.common.GetDelegationTokenResponseProto") - proto.RegisterType((*RenewDelegationTokenRequestProto)(nil), "hadoop.common.RenewDelegationTokenRequestProto") - proto.RegisterType((*RenewDelegationTokenResponseProto)(nil), "hadoop.common.RenewDelegationTokenResponseProto") - proto.RegisterType((*CancelDelegationTokenRequestProto)(nil), "hadoop.common.CancelDelegationTokenRequestProto") - proto.RegisterType((*CancelDelegationTokenResponseProto)(nil), "hadoop.common.CancelDelegationTokenResponseProto") -} - -func init() { proto.RegisterFile("Security.proto", fileDescriptor7) } - -var fileDescriptor7 = []byte{ - // 303 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xb1, 0x4e, 0xf3, 0x30, - 0x10, 0xc7, 0xe5, 0x7c, 0xfd, 0x54, 0x7a, 0x50, 0x86, 0x4c, 0x86, 0xa1, 0xa4, 0x56, 0x87, 0x4e, - 0x41, 0x62, 0x42, 0x8c, 0x05, 0x84, 0xd8, 0x90, 0xdb, 0x17, 0xb0, 0x92, 0xa3, 0xb5, 0xda, 0xd8, - 0xc6, 0x76, 0x1b, 0xfa, 0x06, 0x3c, 0x06, 0x8f, 0x8a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x57, 0x23, - 0xed, 0x76, 0x26, 0x0b, 0x0c, 0xf4, 0x0e, 0x6f, 0x87, 0x6c, 0x06, 0xc3, 0x5b, 0xa1, 0x32, 0x5c, - 0xfd, 0xa9, 0xe0, 0x08, 0xd8, 0x37, 0xd4, 0x86, 0xe1, 0xe4, 0x1a, 0x12, 0x6d, 0xe7, 0xa9, 0x30, - 0x22, 0x5b, 0x60, 0xcd, 0x74, 0xad, 0xb3, 0x9a, 0xec, 0xcf, 0x2c, 0x8c, 0xb8, 0x37, 0x42, 0xde, - 0x09, 0xf9, 0x08, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x67, 0xa7, 0xeb, 0x7d, 0x02, 0x00, 0x00, + return file_Security_proto_rawDescGZIP(), []int{8} +} + +var File_Security_proto protoreflect.FileDescriptor + +var file_Security_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0d, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, + 0x76, 0x0a, 0x0a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x0a, + 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x0c, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x73, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x4b, 0x56, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, + 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, + 0x69, 0x61, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x8a, 0x01, 0x0a, + 0x10, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x39, 0x0a, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x4b, 0x56, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x07, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x4b, 0x56, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x22, 0x3a, 0x0a, 0x1e, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x72, + 0x65, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, + 0x6e, 0x65, 0x77, 0x65, 0x72, 0x22, 0x52, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x53, 0x0a, 0x20, 0x52, 0x65, 0x6e, + 0x65, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x0a, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x49, + 0x0a, 0x21, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, + 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x54, 0x0a, 0x21, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, + 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0x24, 0x0a, 0x22, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x76, 0x0a, 0x20, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, + 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, + 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0xa0, 0x01, 0x01, +} + +var ( + file_Security_proto_rawDescOnce sync.Once + file_Security_proto_rawDescData = file_Security_proto_rawDesc +) + +func file_Security_proto_rawDescGZIP() []byte { + file_Security_proto_rawDescOnce.Do(func() { + file_Security_proto_rawDescData = protoimpl.X.CompressGZIP(file_Security_proto_rawDescData) + }) + return file_Security_proto_rawDescData +} + +var file_Security_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_Security_proto_goTypes = []interface{}{ + (*TokenProto)(nil), // 0: hadoop.common.TokenProto + (*CredentialsKVProto)(nil), // 1: hadoop.common.CredentialsKVProto + (*CredentialsProto)(nil), // 2: hadoop.common.CredentialsProto + (*GetDelegationTokenRequestProto)(nil), // 3: hadoop.common.GetDelegationTokenRequestProto + (*GetDelegationTokenResponseProto)(nil), // 4: hadoop.common.GetDelegationTokenResponseProto + (*RenewDelegationTokenRequestProto)(nil), // 5: hadoop.common.RenewDelegationTokenRequestProto + (*RenewDelegationTokenResponseProto)(nil), // 6: hadoop.common.RenewDelegationTokenResponseProto + (*CancelDelegationTokenRequestProto)(nil), // 7: hadoop.common.CancelDelegationTokenRequestProto + (*CancelDelegationTokenResponseProto)(nil), // 8: hadoop.common.CancelDelegationTokenResponseProto +} +var file_Security_proto_depIdxs = []int32{ + 0, // 0: hadoop.common.CredentialsKVProto.token:type_name -> hadoop.common.TokenProto + 1, // 1: hadoop.common.CredentialsProto.tokens:type_name -> hadoop.common.CredentialsKVProto + 1, // 2: hadoop.common.CredentialsProto.secrets:type_name -> hadoop.common.CredentialsKVProto + 0, // 3: hadoop.common.GetDelegationTokenResponseProto.token:type_name -> hadoop.common.TokenProto + 0, // 4: hadoop.common.RenewDelegationTokenRequestProto.token:type_name -> hadoop.common.TokenProto + 0, // 5: hadoop.common.CancelDelegationTokenRequestProto.token:type_name -> hadoop.common.TokenProto + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_Security_proto_init() } +func file_Security_proto_init() { + if File_Security_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_Security_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Security_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CredentialsKVProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Security_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CredentialsProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Security_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDelegationTokenRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Security_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDelegationTokenResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Security_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenewDelegationTokenRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Security_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenewDelegationTokenResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Security_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelDelegationTokenRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_Security_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelDelegationTokenResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_Security_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Security_proto_goTypes, + DependencyIndexes: file_Security_proto_depIdxs, + MessageInfos: file_Security_proto_msgTypes, + }.Build() + File_Security_proto = out.File + file_Security_proto_rawDesc = nil + file_Security_proto_goTypes = nil + file_Security_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/Security.proto b/internal/protocol/hadoop_common/Security.proto index 5ff571de..fa3fdffb 100644 --- a/internal/protocol/hadoop_common/Security.proto +++ b/internal/protocol/hadoop_common/Security.proto @@ -21,11 +21,12 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.security.proto"; option java_outer_classname = "SecurityProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; /** @@ -38,6 +39,17 @@ message TokenProto { required string service = 4; } +message CredentialsKVProto { + required string alias = 1; + optional hadoop.common.TokenProto token = 2; + optional bytes secret = 3; +} + +message CredentialsProto { + repeated hadoop.common.CredentialsKVProto tokens = 1; + repeated hadoop.common.CredentialsKVProto secrets = 2; +} + message GetDelegationTokenRequestProto { required string renewer = 1; } diff --git a/internal/protocol/hadoop_common/TraceAdmin.pb.go b/internal/protocol/hadoop_common/TraceAdmin.pb.go index c7a68f3f..9aa69185 100644 --- a/internal/protocol/hadoop_common/TraceAdmin.pb.go +++ b/internal/protocol/hadoop_common/TraceAdmin.pb.go @@ -1,199 +1,656 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: TraceAdmin.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type ListSpanReceiversRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListSpanReceiversRequestProto) Reset() { + *x = ListSpanReceiversRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_TraceAdmin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSpanReceiversRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListSpanReceiversRequestProto) Reset() { *m = ListSpanReceiversRequestProto{} } -func (m *ListSpanReceiversRequestProto) String() string { return proto.CompactTextString(m) } -func (*ListSpanReceiversRequestProto) ProtoMessage() {} -func (*ListSpanReceiversRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} } +func (*ListSpanReceiversRequestProto) ProtoMessage() {} + +func (x *ListSpanReceiversRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_TraceAdmin_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSpanReceiversRequestProto.ProtoReflect.Descriptor instead. +func (*ListSpanReceiversRequestProto) Descriptor() ([]byte, []int) { + return file_TraceAdmin_proto_rawDescGZIP(), []int{0} +} type SpanReceiverListInfo struct { - Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` - ClassName *string `protobuf:"bytes,2,req,name=className" json:"className,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` + ClassName *string `protobuf:"bytes,2,req,name=className" json:"className,omitempty"` } -func (m *SpanReceiverListInfo) Reset() { *m = SpanReceiverListInfo{} } -func (m *SpanReceiverListInfo) String() string { return proto.CompactTextString(m) } -func (*SpanReceiverListInfo) ProtoMessage() {} -func (*SpanReceiverListInfo) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{1} } +func (x *SpanReceiverListInfo) Reset() { + *x = SpanReceiverListInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_TraceAdmin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpanReceiverListInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *SpanReceiverListInfo) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id +func (*SpanReceiverListInfo) ProtoMessage() {} + +func (x *SpanReceiverListInfo) ProtoReflect() protoreflect.Message { + mi := &file_TraceAdmin_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpanReceiverListInfo.ProtoReflect.Descriptor instead. +func (*SpanReceiverListInfo) Descriptor() ([]byte, []int) { + return file_TraceAdmin_proto_rawDescGZIP(), []int{1} +} + +func (x *SpanReceiverListInfo) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id } return 0 } -func (m *SpanReceiverListInfo) GetClassName() string { - if m != nil && m.ClassName != nil { - return *m.ClassName +func (x *SpanReceiverListInfo) GetClassName() string { + if x != nil && x.ClassName != nil { + return *x.ClassName } return "" } type ListSpanReceiversResponseProto struct { - Descriptions []*SpanReceiverListInfo `protobuf:"bytes,1,rep,name=descriptions" json:"descriptions,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Descriptions []*SpanReceiverListInfo `protobuf:"bytes,1,rep,name=descriptions" json:"descriptions,omitempty"` } -func (m *ListSpanReceiversResponseProto) Reset() { *m = ListSpanReceiversResponseProto{} } -func (m *ListSpanReceiversResponseProto) String() string { return proto.CompactTextString(m) } -func (*ListSpanReceiversResponseProto) ProtoMessage() {} -func (*ListSpanReceiversResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{2} } +func (x *ListSpanReceiversResponseProto) Reset() { + *x = ListSpanReceiversResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_TraceAdmin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *ListSpanReceiversResponseProto) GetDescriptions() []*SpanReceiverListInfo { - if m != nil { - return m.Descriptions +func (x *ListSpanReceiversResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSpanReceiversResponseProto) ProtoMessage() {} + +func (x *ListSpanReceiversResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_TraceAdmin_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSpanReceiversResponseProto.ProtoReflect.Descriptor instead. +func (*ListSpanReceiversResponseProto) Descriptor() ([]byte, []int) { + return file_TraceAdmin_proto_rawDescGZIP(), []int{2} +} + +func (x *ListSpanReceiversResponseProto) GetDescriptions() []*SpanReceiverListInfo { + if x != nil { + return x.Descriptions } return nil } type ConfigPair struct { - Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` - Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` + Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` +} + +func (x *ConfigPair) Reset() { + *x = ConfigPair{} + if protoimpl.UnsafeEnabled { + mi := &file_TraceAdmin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ConfigPair) Reset() { *m = ConfigPair{} } -func (m *ConfigPair) String() string { return proto.CompactTextString(m) } -func (*ConfigPair) ProtoMessage() {} -func (*ConfigPair) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{3} } +func (x *ConfigPair) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *ConfigPair) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key +func (*ConfigPair) ProtoMessage() {} + +func (x *ConfigPair) ProtoReflect() protoreflect.Message { + mi := &file_TraceAdmin_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfigPair.ProtoReflect.Descriptor instead. +func (*ConfigPair) Descriptor() ([]byte, []int) { + return file_TraceAdmin_proto_rawDescGZIP(), []int{3} +} + +func (x *ConfigPair) GetKey() string { + if x != nil && x.Key != nil { + return *x.Key } return "" } -func (m *ConfigPair) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value +func (x *ConfigPair) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value } return "" } type AddSpanReceiverRequestProto struct { - ClassName *string `protobuf:"bytes,1,req,name=className" json:"className,omitempty"` - Config []*ConfigPair `protobuf:"bytes,2,rep,name=config" json:"config,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClassName *string `protobuf:"bytes,1,req,name=className" json:"className,omitempty"` + Config []*ConfigPair `protobuf:"bytes,2,rep,name=config" json:"config,omitempty"` +} + +func (x *AddSpanReceiverRequestProto) Reset() { + *x = AddSpanReceiverRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_TraceAdmin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddSpanReceiverRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AddSpanReceiverRequestProto) Reset() { *m = AddSpanReceiverRequestProto{} } -func (m *AddSpanReceiverRequestProto) String() string { return proto.CompactTextString(m) } -func (*AddSpanReceiverRequestProto) ProtoMessage() {} -func (*AddSpanReceiverRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{4} } +func (*AddSpanReceiverRequestProto) ProtoMessage() {} -func (m *AddSpanReceiverRequestProto) GetClassName() string { - if m != nil && m.ClassName != nil { - return *m.ClassName +func (x *AddSpanReceiverRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_TraceAdmin_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddSpanReceiverRequestProto.ProtoReflect.Descriptor instead. +func (*AddSpanReceiverRequestProto) Descriptor() ([]byte, []int) { + return file_TraceAdmin_proto_rawDescGZIP(), []int{4} +} + +func (x *AddSpanReceiverRequestProto) GetClassName() string { + if x != nil && x.ClassName != nil { + return *x.ClassName } return "" } -func (m *AddSpanReceiverRequestProto) GetConfig() []*ConfigPair { - if m != nil { - return m.Config +func (x *AddSpanReceiverRequestProto) GetConfig() []*ConfigPair { + if x != nil { + return x.Config } return nil } type AddSpanReceiverResponseProto struct { - Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` +} + +func (x *AddSpanReceiverResponseProto) Reset() { + *x = AddSpanReceiverResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_TraceAdmin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddSpanReceiverResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddSpanReceiverResponseProto) ProtoMessage() {} + +func (x *AddSpanReceiverResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_TraceAdmin_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *AddSpanReceiverResponseProto) Reset() { *m = AddSpanReceiverResponseProto{} } -func (m *AddSpanReceiverResponseProto) String() string { return proto.CompactTextString(m) } -func (*AddSpanReceiverResponseProto) ProtoMessage() {} -func (*AddSpanReceiverResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{5} } +// Deprecated: Use AddSpanReceiverResponseProto.ProtoReflect.Descriptor instead. +func (*AddSpanReceiverResponseProto) Descriptor() ([]byte, []int) { + return file_TraceAdmin_proto_rawDescGZIP(), []int{5} +} -func (m *AddSpanReceiverResponseProto) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id +func (x *AddSpanReceiverResponseProto) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id } return 0 } type RemoveSpanReceiverRequestProto struct { - Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` } -func (m *RemoveSpanReceiverRequestProto) Reset() { *m = RemoveSpanReceiverRequestProto{} } -func (m *RemoveSpanReceiverRequestProto) String() string { return proto.CompactTextString(m) } -func (*RemoveSpanReceiverRequestProto) ProtoMessage() {} -func (*RemoveSpanReceiverRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{6} } +func (x *RemoveSpanReceiverRequestProto) Reset() { + *x = RemoveSpanReceiverRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_TraceAdmin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *RemoveSpanReceiverRequestProto) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id +func (x *RemoveSpanReceiverRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveSpanReceiverRequestProto) ProtoMessage() {} + +func (x *RemoveSpanReceiverRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_TraceAdmin_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveSpanReceiverRequestProto.ProtoReflect.Descriptor instead. +func (*RemoveSpanReceiverRequestProto) Descriptor() ([]byte, []int) { + return file_TraceAdmin_proto_rawDescGZIP(), []int{6} +} + +func (x *RemoveSpanReceiverRequestProto) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id } return 0 } type RemoveSpanReceiverResponseProto struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *RemoveSpanReceiverResponseProto) Reset() { *m = RemoveSpanReceiverResponseProto{} } -func (m *RemoveSpanReceiverResponseProto) String() string { return proto.CompactTextString(m) } -func (*RemoveSpanReceiverResponseProto) ProtoMessage() {} -func (*RemoveSpanReceiverResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{7} } - -func init() { - proto.RegisterType((*ListSpanReceiversRequestProto)(nil), "hadoop.common.ListSpanReceiversRequestProto") - proto.RegisterType((*SpanReceiverListInfo)(nil), "hadoop.common.SpanReceiverListInfo") - proto.RegisterType((*ListSpanReceiversResponseProto)(nil), "hadoop.common.ListSpanReceiversResponseProto") - proto.RegisterType((*ConfigPair)(nil), "hadoop.common.ConfigPair") - proto.RegisterType((*AddSpanReceiverRequestProto)(nil), "hadoop.common.AddSpanReceiverRequestProto") - proto.RegisterType((*AddSpanReceiverResponseProto)(nil), "hadoop.common.AddSpanReceiverResponseProto") - proto.RegisterType((*RemoveSpanReceiverRequestProto)(nil), "hadoop.common.RemoveSpanReceiverRequestProto") - proto.RegisterType((*RemoveSpanReceiverResponseProto)(nil), "hadoop.common.RemoveSpanReceiverResponseProto") -} - -func init() { proto.RegisterFile("TraceAdmin.proto", fileDescriptor5) } - -var fileDescriptor5 = []byte{ - // 385 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xef, 0x4e, 0xea, 0x30, - 0x18, 0xc6, 0xb3, 0x91, 0x73, 0x12, 0xde, 0xc3, 0x39, 0x07, 0x1a, 0x3e, 0x0c, 0x44, 0xc0, 0xf9, - 0x85, 0xf8, 0x67, 0x2a, 0xf1, 0x06, 0x40, 0x13, 0x63, 0x62, 0x0c, 0x29, 0xde, 0x40, 0xd3, 0x15, - 0xa8, 0xb2, 0x76, 0xb6, 0x63, 0x89, 0x77, 0xe0, 0x65, 0x78, 0x75, 0x5e, 0x87, 0x61, 0x4a, 0xd6, - 0x15, 0x04, 0xbf, 0xed, 0xcf, 0xf3, 0xf6, 0xf9, 0x3d, 0xcf, 0x5b, 0xa8, 0x3e, 0x28, 0x42, 0xd9, - 0x20, 0x8c, 0xb8, 0x08, 0x62, 0x25, 0x13, 0x89, 0xfe, 0xce, 0x48, 0x28,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68, 0x4f, 0x1c, 0x40, 0x67, 0xd3, 0x84, 0x61, 0xd2, 0x7f, 0x77, 0xa1, 0x96, 0x5f, - 0x90, 0x31, 0x53, 0x29, 0xa7, 0x0c, 0xc5, 0x50, 0x9b, 0xdb, 0xbb, 0x42, 0x27, 0x56, 0xa4, 0xad, - 0x97, 0xa6, 0x79, 0xba, 0x5b, 0x6d, 0x86, 0x7d, 0x84, 0xff, 0xa4, 0x58, 0x06, 0x3a, 0xb2, 0x4e, - 0xd8, 0xb2, 0x9c, 0xe6, 0xf1, 0x2e, 0xad, 0xe9, 0xa5, 0x01, 0xa9, 0xb5, 0x5a, 0x90, 0x0d, 0xbc, - 0xbd, 0xeb, 0x66, 0xf0, 0x03, 0xb9, 0x61, 0x3a, 0x3c, 0x83, 0x86, 0x54, 0xd3, 0x80, 0xc4, 0x84, - 0xce, 0xd8, 0x6a, 0x36, 0x51, 0x84, 0x72, 0x31, 0x1d, 0x56, 0xf2, 0x15, 0x8c, 0x86, 0xaf, 0x8e, - 0xf3, 0xe6, 0x38, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x09, 0x34, 0x4e, 0xb8, 0x03, 0x00, - 0x00, + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveSpanReceiverResponseProto) Reset() { + *x = RemoveSpanReceiverResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_TraceAdmin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveSpanReceiverResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveSpanReceiverResponseProto) ProtoMessage() {} + +func (x *RemoveSpanReceiverResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_TraceAdmin_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveSpanReceiverResponseProto.ProtoReflect.Descriptor instead. +func (*RemoveSpanReceiverResponseProto) Descriptor() ([]byte, []int) { + return file_TraceAdmin_proto_rawDescGZIP(), []int{7} +} + +var File_TraceAdmin_proto protoreflect.FileDescriptor + +var file_TraceAdmin_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x54, 0x72, 0x61, 0x63, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0d, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x22, 0x1f, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x44, 0x0a, 0x14, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x09, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x69, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x47, 0x0a, 0x0c, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x4c, 0x69, 0x73, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x34, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x61, 0x69, + 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x6e, 0x0a, 0x1b, 0x41, 0x64, 0x64, + 0x53, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x61, 0x69, + 0x72, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x2e, 0x0a, 0x1c, 0x41, 0x64, 0x64, + 0x53, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x30, 0x0a, 0x1e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x21, 0x0a, 0x1f, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xe6, + 0x02, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x11, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x61, 0x6e, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, + 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x70, 0x61, 0x6e, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x6a, 0x0a, 0x0f, 0x61, 0x64, 0x64, 0x53, 0x70, 0x61, + 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x70, 0x61, + 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x73, 0x0a, 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x70, 0x61, 0x6e, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, + 0x70, 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x70, + 0x61, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x6d, 0x0a, 0x19, 0x6f, 0x72, 0x67, 0x2e, 0x61, + 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x74, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x42, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x50, 0x42, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x88, 0x01, 0x01, 0xa0, 0x01, 0x01, +} + +var ( + file_TraceAdmin_proto_rawDescOnce sync.Once + file_TraceAdmin_proto_rawDescData = file_TraceAdmin_proto_rawDesc +) + +func file_TraceAdmin_proto_rawDescGZIP() []byte { + file_TraceAdmin_proto_rawDescOnce.Do(func() { + file_TraceAdmin_proto_rawDescData = protoimpl.X.CompressGZIP(file_TraceAdmin_proto_rawDescData) + }) + return file_TraceAdmin_proto_rawDescData +} + +var file_TraceAdmin_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_TraceAdmin_proto_goTypes = []interface{}{ + (*ListSpanReceiversRequestProto)(nil), // 0: hadoop.common.ListSpanReceiversRequestProto + (*SpanReceiverListInfo)(nil), // 1: hadoop.common.SpanReceiverListInfo + (*ListSpanReceiversResponseProto)(nil), // 2: hadoop.common.ListSpanReceiversResponseProto + (*ConfigPair)(nil), // 3: hadoop.common.ConfigPair + (*AddSpanReceiverRequestProto)(nil), // 4: hadoop.common.AddSpanReceiverRequestProto + (*AddSpanReceiverResponseProto)(nil), // 5: hadoop.common.AddSpanReceiverResponseProto + (*RemoveSpanReceiverRequestProto)(nil), // 6: hadoop.common.RemoveSpanReceiverRequestProto + (*RemoveSpanReceiverResponseProto)(nil), // 7: hadoop.common.RemoveSpanReceiverResponseProto +} +var file_TraceAdmin_proto_depIdxs = []int32{ + 1, // 0: hadoop.common.ListSpanReceiversResponseProto.descriptions:type_name -> hadoop.common.SpanReceiverListInfo + 3, // 1: hadoop.common.AddSpanReceiverRequestProto.config:type_name -> hadoop.common.ConfigPair + 0, // 2: hadoop.common.TraceAdminService.listSpanReceivers:input_type -> hadoop.common.ListSpanReceiversRequestProto + 4, // 3: hadoop.common.TraceAdminService.addSpanReceiver:input_type -> hadoop.common.AddSpanReceiverRequestProto + 6, // 4: hadoop.common.TraceAdminService.removeSpanReceiver:input_type -> hadoop.common.RemoveSpanReceiverRequestProto + 2, // 5: hadoop.common.TraceAdminService.listSpanReceivers:output_type -> hadoop.common.ListSpanReceiversResponseProto + 5, // 6: hadoop.common.TraceAdminService.addSpanReceiver:output_type -> hadoop.common.AddSpanReceiverResponseProto + 7, // 7: hadoop.common.TraceAdminService.removeSpanReceiver:output_type -> hadoop.common.RemoveSpanReceiverResponseProto + 5, // [5:8] is the sub-list for method output_type + 2, // [2:5] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_TraceAdmin_proto_init() } +func file_TraceAdmin_proto_init() { + if File_TraceAdmin_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_TraceAdmin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSpanReceiversRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_TraceAdmin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpanReceiverListInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_TraceAdmin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSpanReceiversResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_TraceAdmin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConfigPair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_TraceAdmin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddSpanReceiverRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_TraceAdmin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddSpanReceiverResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_TraceAdmin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveSpanReceiverRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_TraceAdmin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveSpanReceiverResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_TraceAdmin_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_TraceAdmin_proto_goTypes, + DependencyIndexes: file_TraceAdmin_proto_depIdxs, + MessageInfos: file_TraceAdmin_proto_msgTypes, + }.Build() + File_TraceAdmin_proto = out.File + file_TraceAdmin_proto_rawDesc = nil + file_TraceAdmin_proto_goTypes = nil + file_TraceAdmin_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/TraceAdmin.proto b/internal/protocol/hadoop_common/TraceAdmin.proto index 52d2a90a..14f6d5cf 100644 --- a/internal/protocol/hadoop_common/TraceAdmin.proto +++ b/internal/protocol/hadoop_common/TraceAdmin.proto @@ -21,11 +21,12 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.tracing"; option java_outer_classname = "TraceAdminPB"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; message ListSpanReceiversRequestProto { diff --git a/internal/protocol/hadoop_common/ZKFCProtocol.pb.go b/internal/protocol/hadoop_common/ZKFCProtocol.pb.go index 97d2ac91..5a12fcf0 100644 --- a/internal/protocol/hadoop_common/ZKFCProtocol.pb.go +++ b/internal/protocol/hadoop_common/ZKFCProtocol.pb.go @@ -1,85 +1,349 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: ZKFCProtocol.proto package hadoop_common -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type CedeActiveRequestProto struct { - MillisToCede *uint32 `protobuf:"varint,1,req,name=millisToCede" json:"millisToCede,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MillisToCede *uint32 `protobuf:"varint,1,req,name=millisToCede" json:"millisToCede,omitempty"` +} + +func (x *CedeActiveRequestProto) Reset() { + *x = CedeActiveRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ZKFCProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CedeActiveRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CedeActiveRequestProto) Reset() { *m = CedeActiveRequestProto{} } -func (m *CedeActiveRequestProto) String() string { return proto.CompactTextString(m) } -func (*CedeActiveRequestProto) ProtoMessage() {} -func (*CedeActiveRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } +func (*CedeActiveRequestProto) ProtoMessage() {} -func (m *CedeActiveRequestProto) GetMillisToCede() uint32 { - if m != nil && m.MillisToCede != nil { - return *m.MillisToCede +func (x *CedeActiveRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ZKFCProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CedeActiveRequestProto.ProtoReflect.Descriptor instead. +func (*CedeActiveRequestProto) Descriptor() ([]byte, []int) { + return file_ZKFCProtocol_proto_rawDescGZIP(), []int{0} +} + +func (x *CedeActiveRequestProto) GetMillisToCede() uint32 { + if x != nil && x.MillisToCede != nil { + return *x.MillisToCede } return 0 } type CedeActiveResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *CedeActiveResponseProto) Reset() { *m = CedeActiveResponseProto{} } -func (m *CedeActiveResponseProto) String() string { return proto.CompactTextString(m) } -func (*CedeActiveResponseProto) ProtoMessage() {} -func (*CedeActiveResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } +func (x *CedeActiveResponseProto) Reset() { + *x = CedeActiveResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ZKFCProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CedeActiveResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CedeActiveResponseProto) ProtoMessage() {} + +func (x *CedeActiveResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ZKFCProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CedeActiveResponseProto.ProtoReflect.Descriptor instead. +func (*CedeActiveResponseProto) Descriptor() ([]byte, []int) { + return file_ZKFCProtocol_proto_rawDescGZIP(), []int{1} +} type GracefulFailoverRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *GracefulFailoverRequestProto) Reset() { *m = GracefulFailoverRequestProto{} } -func (m *GracefulFailoverRequestProto) String() string { return proto.CompactTextString(m) } -func (*GracefulFailoverRequestProto) ProtoMessage() {} -func (*GracefulFailoverRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } +func (x *GracefulFailoverRequestProto) Reset() { + *x = GracefulFailoverRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ZKFCProtocol_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GracefulFailoverRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GracefulFailoverRequestProto) ProtoMessage() {} + +func (x *GracefulFailoverRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ZKFCProtocol_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GracefulFailoverRequestProto.ProtoReflect.Descriptor instead. +func (*GracefulFailoverRequestProto) Descriptor() ([]byte, []int) { + return file_ZKFCProtocol_proto_rawDescGZIP(), []int{2} +} type GracefulFailoverResponseProto struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *GracefulFailoverResponseProto) Reset() { *m = GracefulFailoverResponseProto{} } -func (m *GracefulFailoverResponseProto) String() string { return proto.CompactTextString(m) } -func (*GracefulFailoverResponseProto) ProtoMessage() {} -func (*GracefulFailoverResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} } - -func init() { - proto.RegisterType((*CedeActiveRequestProto)(nil), "hadoop.common.CedeActiveRequestProto") - proto.RegisterType((*CedeActiveResponseProto)(nil), "hadoop.common.CedeActiveResponseProto") - proto.RegisterType((*GracefulFailoverRequestProto)(nil), "hadoop.common.GracefulFailoverRequestProto") - proto.RegisterType((*GracefulFailoverResponseProto)(nil), "hadoop.common.GracefulFailoverResponseProto") -} - -func init() { proto.RegisterFile("ZKFCProtocol.proto", fileDescriptor1) } - -var fileDescriptor1 = []byte{ - // 238 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x8a, 0xf2, 0x76, 0x73, - 0x0e, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0xce, 0xcf, 0xd1, 0x2b, 0x00, 0x31, 0x84, 0x78, 0x33, 0x12, - 0x53, 0xf2, 0xf3, 0x0b, 0xf4, 0x92, 0xf3, 0x73, 0x73, 0xf3, 0xf3, 0x94, 0x6c, 0xb8, 0xc4, 0x9c, - 0x53, 0x53, 0x52, 0x1d, 0x93, 0x4b, 0x32, 0xcb, 0x52, 0x83, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, - 0xc0, 0x3a, 0x84, 0x94, 0xb8, 0x78, 0x72, 0x33, 0x73, 0x72, 0x32, 0x8b, 0x43, 0xf2, 0x41, 0x2a, - 0x24, 0x18, 0x15, 0x98, 0x34, 0x78, 0x83, 0x50, 0xc4, 0x94, 0x24, 0xb9, 0xc4, 0x91, 0x75, 0x17, - 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x82, 0xb5, 0x2b, 0xc9, 0x71, 0xc9, 0xb8, 0x17, 0x25, 0x26, 0xa7, - 0xa6, 0x95, 0xe6, 0xb8, 0x25, 0x66, 0xe6, 0xe4, 0x97, 0xa5, 0x16, 0x21, 0x1b, 0xaf, 0x24, 0xcf, - 0x25, 0x8b, 0x29, 0x8f, 0x64, 0x80, 0xd1, 0x43, 0x46, 0x2e, 0x61, 0x64, 0xf7, 0x07, 0xa7, 0x16, - 0x95, 0x65, 0x26, 0xa7, 0x0a, 0x45, 0x73, 0x71, 0x25, 0xc3, 0xed, 0x14, 0x52, 0xd5, 0x43, 0xf1, - 0x8f, 0x1e, 0x76, 0xcf, 0x48, 0xa9, 0xe1, 0x51, 0x86, 0x64, 0xa9, 0x50, 0x2e, 0x97, 0x40, 0x3a, - 0x9a, 0xab, 0x84, 0xb4, 0xd1, 0xf4, 0xe2, 0xf3, 0x96, 0x94, 0x0e, 0x41, 0xc5, 0x48, 0xd6, 0x39, - 0x99, 0x71, 0x49, 0xe5, 0x17, 0xa5, 0xeb, 0x25, 0x16, 0x24, 0x26, 0x67, 0xa4, 0xc2, 0x74, 0x66, - 0x24, 0x42, 0xa2, 0xca, 0x09, 0x25, 0xfa, 0xc0, 0x74, 0x71, 0x07, 0x23, 0xe3, 0x02, 0x46, 0x46, - 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x73, 0xcc, 0xde, 0xd9, 0x01, 0x00, 0x00, + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GracefulFailoverResponseProto) Reset() { + *x = GracefulFailoverResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ZKFCProtocol_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GracefulFailoverResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GracefulFailoverResponseProto) ProtoMessage() {} + +func (x *GracefulFailoverResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ZKFCProtocol_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GracefulFailoverResponseProto.ProtoReflect.Descriptor instead. +func (*GracefulFailoverResponseProto) Descriptor() ([]byte, []int) { + return file_ZKFCProtocol_proto_rawDescGZIP(), []int{3} +} + +var File_ZKFCProtocol_proto protoreflect.FileDescriptor + +var file_ZKFCProtocol_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x5a, 0x4b, 0x46, 0x43, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x22, 0x3c, 0x0a, 0x16, 0x43, 0x65, 0x64, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, + 0x0c, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x54, 0x6f, 0x43, 0x65, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x54, 0x6f, 0x43, 0x65, 0x64, + 0x65, 0x22, 0x19, 0x0a, 0x17, 0x43, 0x65, 0x64, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1e, 0x0a, 0x1c, + 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1f, 0x0a, 0x1d, + 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xe1, 0x01, + 0x0a, 0x13, 0x5a, 0x4b, 0x46, 0x43, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x0a, 0x63, 0x65, 0x64, 0x65, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x12, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x65, 0x64, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x65, 0x64, 0x65, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x6d, 0x0a, 0x10, 0x67, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x46, 0x61, + 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x46, + 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x72, 0x61, 0x63, 0x65, 0x66, 0x75, 0x6c, 0x46, 0x61, 0x69, 0x6c, + 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x42, 0x74, 0x0a, 0x1a, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, + 0x12, 0x5a, 0x4b, 0x46, 0x43, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, + 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0xa0, 0x01, 0x01, +} + +var ( + file_ZKFCProtocol_proto_rawDescOnce sync.Once + file_ZKFCProtocol_proto_rawDescData = file_ZKFCProtocol_proto_rawDesc +) + +func file_ZKFCProtocol_proto_rawDescGZIP() []byte { + file_ZKFCProtocol_proto_rawDescOnce.Do(func() { + file_ZKFCProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_ZKFCProtocol_proto_rawDescData) + }) + return file_ZKFCProtocol_proto_rawDescData +} + +var file_ZKFCProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_ZKFCProtocol_proto_goTypes = []interface{}{ + (*CedeActiveRequestProto)(nil), // 0: hadoop.common.CedeActiveRequestProto + (*CedeActiveResponseProto)(nil), // 1: hadoop.common.CedeActiveResponseProto + (*GracefulFailoverRequestProto)(nil), // 2: hadoop.common.GracefulFailoverRequestProto + (*GracefulFailoverResponseProto)(nil), // 3: hadoop.common.GracefulFailoverResponseProto +} +var file_ZKFCProtocol_proto_depIdxs = []int32{ + 0, // 0: hadoop.common.ZKFCProtocolService.cedeActive:input_type -> hadoop.common.CedeActiveRequestProto + 2, // 1: hadoop.common.ZKFCProtocolService.gracefulFailover:input_type -> hadoop.common.GracefulFailoverRequestProto + 1, // 2: hadoop.common.ZKFCProtocolService.cedeActive:output_type -> hadoop.common.CedeActiveResponseProto + 3, // 3: hadoop.common.ZKFCProtocolService.gracefulFailover:output_type -> hadoop.common.GracefulFailoverResponseProto + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ZKFCProtocol_proto_init() } +func file_ZKFCProtocol_proto_init() { + if File_ZKFCProtocol_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ZKFCProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CedeActiveRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ZKFCProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CedeActiveResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ZKFCProtocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GracefulFailoverRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ZKFCProtocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GracefulFailoverResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ZKFCProtocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ZKFCProtocol_proto_goTypes, + DependencyIndexes: file_ZKFCProtocol_proto_depIdxs, + MessageInfos: file_ZKFCProtocol_proto_msgTypes, + }.Build() + File_ZKFCProtocol_proto = out.File + file_ZKFCProtocol_proto_rawDesc = nil + file_ZKFCProtocol_proto_goTypes = nil + file_ZKFCProtocol_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_common/ZKFCProtocol.proto b/internal/protocol/hadoop_common/ZKFCProtocol.proto index a2b8dd10..784c24b1 100644 --- a/internal/protocol/hadoop_common/ZKFCProtocol.proto +++ b/internal/protocol/hadoop_common/ZKFCProtocol.proto @@ -21,11 +21,12 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax = "proto2"; option java_package = "org.apache.hadoop.ha.proto"; option java_outer_classname = "ZKFCProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common"; package hadoop.common; message CedeActiveRequestProto { diff --git a/internal/protocol/hadoop_hdfs/AliasMapProtocol.pb.go b/internal/protocol/hadoop_hdfs/AliasMapProtocol.pb.go new file mode 100644 index 00000000..71d7b85b --- /dev/null +++ b/internal/protocol/hadoop_hdfs/AliasMapProtocol.pb.go @@ -0,0 +1,725 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: AliasMapProtocol.proto + +package hadoop_hdfs + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type KeyValueProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *BlockProto `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` + Value *ProvidedStorageLocationProto `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (x *KeyValueProto) Reset() { + *x = KeyValueProto{} + if protoimpl.UnsafeEnabled { + mi := &file_AliasMapProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyValueProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyValueProto) ProtoMessage() {} + +func (x *KeyValueProto) ProtoReflect() protoreflect.Message { + mi := &file_AliasMapProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyValueProto.ProtoReflect.Descriptor instead. +func (*KeyValueProto) Descriptor() ([]byte, []int) { + return file_AliasMapProtocol_proto_rawDescGZIP(), []int{0} +} + +func (x *KeyValueProto) GetKey() *BlockProto { + if x != nil { + return x.Key + } + return nil +} + +func (x *KeyValueProto) GetValue() *ProvidedStorageLocationProto { + if x != nil { + return x.Value + } + return nil +} + +type WriteRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyValuePair *KeyValueProto `protobuf:"bytes,1,req,name=keyValuePair" json:"keyValuePair,omitempty"` +} + +func (x *WriteRequestProto) Reset() { + *x = WriteRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_AliasMapProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteRequestProto) ProtoMessage() {} + +func (x *WriteRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_AliasMapProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteRequestProto.ProtoReflect.Descriptor instead. +func (*WriteRequestProto) Descriptor() ([]byte, []int) { + return file_AliasMapProtocol_proto_rawDescGZIP(), []int{1} +} + +func (x *WriteRequestProto) GetKeyValuePair() *KeyValueProto { + if x != nil { + return x.KeyValuePair + } + return nil +} + +type WriteResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WriteResponseProto) Reset() { + *x = WriteResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_AliasMapProtocol_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteResponseProto) ProtoMessage() {} + +func (x *WriteResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_AliasMapProtocol_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteResponseProto.ProtoReflect.Descriptor instead. +func (*WriteResponseProto) Descriptor() ([]byte, []int) { + return file_AliasMapProtocol_proto_rawDescGZIP(), []int{2} +} + +type ReadRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *BlockProto `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` +} + +func (x *ReadRequestProto) Reset() { + *x = ReadRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_AliasMapProtocol_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadRequestProto) ProtoMessage() {} + +func (x *ReadRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_AliasMapProtocol_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadRequestProto.ProtoReflect.Descriptor instead. +func (*ReadRequestProto) Descriptor() ([]byte, []int) { + return file_AliasMapProtocol_proto_rawDescGZIP(), []int{3} +} + +func (x *ReadRequestProto) GetKey() *BlockProto { + if x != nil { + return x.Key + } + return nil +} + +type ReadResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value *ProvidedStorageLocationProto `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` +} + +func (x *ReadResponseProto) Reset() { + *x = ReadResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_AliasMapProtocol_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadResponseProto) ProtoMessage() {} + +func (x *ReadResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_AliasMapProtocol_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadResponseProto.ProtoReflect.Descriptor instead. +func (*ReadResponseProto) Descriptor() ([]byte, []int) { + return file_AliasMapProtocol_proto_rawDescGZIP(), []int{4} +} + +func (x *ReadResponseProto) GetValue() *ProvidedStorageLocationProto { + if x != nil { + return x.Value + } + return nil +} + +type ListRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Marker *BlockProto `protobuf:"bytes,1,opt,name=marker" json:"marker,omitempty"` +} + +func (x *ListRequestProto) Reset() { + *x = ListRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_AliasMapProtocol_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequestProto) ProtoMessage() {} + +func (x *ListRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_AliasMapProtocol_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRequestProto.ProtoReflect.Descriptor instead. +func (*ListRequestProto) Descriptor() ([]byte, []int) { + return file_AliasMapProtocol_proto_rawDescGZIP(), []int{5} +} + +func (x *ListRequestProto) GetMarker() *BlockProto { + if x != nil { + return x.Marker + } + return nil +} + +type ListResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FileRegions []*KeyValueProto `protobuf:"bytes,1,rep,name=fileRegions" json:"fileRegions,omitempty"` + NextMarker *BlockProto `protobuf:"bytes,2,opt,name=nextMarker" json:"nextMarker,omitempty"` +} + +func (x *ListResponseProto) Reset() { + *x = ListResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_AliasMapProtocol_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResponseProto) ProtoMessage() {} + +func (x *ListResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_AliasMapProtocol_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListResponseProto.ProtoReflect.Descriptor instead. +func (*ListResponseProto) Descriptor() ([]byte, []int) { + return file_AliasMapProtocol_proto_rawDescGZIP(), []int{6} +} + +func (x *ListResponseProto) GetFileRegions() []*KeyValueProto { + if x != nil { + return x.FileRegions + } + return nil +} + +func (x *ListResponseProto) GetNextMarker() *BlockProto { + if x != nil { + return x.NextMarker + } + return nil +} + +type BlockPoolRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BlockPoolRequestProto) Reset() { + *x = BlockPoolRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_AliasMapProtocol_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockPoolRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockPoolRequestProto) ProtoMessage() {} + +func (x *BlockPoolRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_AliasMapProtocol_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockPoolRequestProto.ProtoReflect.Descriptor instead. +func (*BlockPoolRequestProto) Descriptor() ([]byte, []int) { + return file_AliasMapProtocol_proto_rawDescGZIP(), []int{7} +} + +type BlockPoolResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockPoolId *string `protobuf:"bytes,1,req,name=blockPoolId" json:"blockPoolId,omitempty"` +} + +func (x *BlockPoolResponseProto) Reset() { + *x = BlockPoolResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_AliasMapProtocol_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockPoolResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockPoolResponseProto) ProtoMessage() {} + +func (x *BlockPoolResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_AliasMapProtocol_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockPoolResponseProto.ProtoReflect.Descriptor instead. +func (*BlockPoolResponseProto) Descriptor() ([]byte, []int) { + return file_AliasMapProtocol_proto_rawDescGZIP(), []int{8} +} + +func (x *BlockPoolResponseProto) GetBlockPoolId() string { + if x != nil && x.BlockPoolId != nil { + return *x.BlockPoolId + } + return "" +} + +var File_AliasMapProtocol_proto protoreflect.FileDescriptor + +var file_AliasMapProtocol_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x1a, 0x0a, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x7b, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x29, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3f, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x53, + 0x0a, 0x11, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x3e, 0x0a, 0x0c, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, + 0x61, 0x69, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0c, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, + 0x61, 0x69, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, 0x10, 0x52, 0x65, 0x61, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x54, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x43, + 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x2f, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x72, 0x22, 0x8a, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3c, 0x0a, 0x0b, 0x66, 0x69, 0x6c, + 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4b, 0x65, 0x79, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72, + 0x22, 0x17, 0x0a, 0x15, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x16, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x32, 0xcc, 0x02, 0x0a, 0x17, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4d, + 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x48, 0x0a, 0x05, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x45, 0x0a, 0x04, 0x72, + 0x65, 0x61, 0x64, 0x12, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x45, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x59, 0x0a, 0x0e, 0x67, 0x65, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x81, 0x01, 0x0a, 0x25, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, + 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x16, + 0x41, 0x6c, 0x69, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, + 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x68, 0x64, + 0x66, 0x73, 0x88, 0x01, 0x01, 0xa0, 0x01, 0x01, +} + +var ( + file_AliasMapProtocol_proto_rawDescOnce sync.Once + file_AliasMapProtocol_proto_rawDescData = file_AliasMapProtocol_proto_rawDesc +) + +func file_AliasMapProtocol_proto_rawDescGZIP() []byte { + file_AliasMapProtocol_proto_rawDescOnce.Do(func() { + file_AliasMapProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_AliasMapProtocol_proto_rawDescData) + }) + return file_AliasMapProtocol_proto_rawDescData +} + +var file_AliasMapProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_AliasMapProtocol_proto_goTypes = []interface{}{ + (*KeyValueProto)(nil), // 0: hadoop.hdfs.KeyValueProto + (*WriteRequestProto)(nil), // 1: hadoop.hdfs.WriteRequestProto + (*WriteResponseProto)(nil), // 2: hadoop.hdfs.WriteResponseProto + (*ReadRequestProto)(nil), // 3: hadoop.hdfs.ReadRequestProto + (*ReadResponseProto)(nil), // 4: hadoop.hdfs.ReadResponseProto + (*ListRequestProto)(nil), // 5: hadoop.hdfs.ListRequestProto + (*ListResponseProto)(nil), // 6: hadoop.hdfs.ListResponseProto + (*BlockPoolRequestProto)(nil), // 7: hadoop.hdfs.BlockPoolRequestProto + (*BlockPoolResponseProto)(nil), // 8: hadoop.hdfs.BlockPoolResponseProto + (*BlockProto)(nil), // 9: hadoop.hdfs.BlockProto + (*ProvidedStorageLocationProto)(nil), // 10: hadoop.hdfs.ProvidedStorageLocationProto +} +var file_AliasMapProtocol_proto_depIdxs = []int32{ + 9, // 0: hadoop.hdfs.KeyValueProto.key:type_name -> hadoop.hdfs.BlockProto + 10, // 1: hadoop.hdfs.KeyValueProto.value:type_name -> hadoop.hdfs.ProvidedStorageLocationProto + 0, // 2: hadoop.hdfs.WriteRequestProto.keyValuePair:type_name -> hadoop.hdfs.KeyValueProto + 9, // 3: hadoop.hdfs.ReadRequestProto.key:type_name -> hadoop.hdfs.BlockProto + 10, // 4: hadoop.hdfs.ReadResponseProto.value:type_name -> hadoop.hdfs.ProvidedStorageLocationProto + 9, // 5: hadoop.hdfs.ListRequestProto.marker:type_name -> hadoop.hdfs.BlockProto + 0, // 6: hadoop.hdfs.ListResponseProto.fileRegions:type_name -> hadoop.hdfs.KeyValueProto + 9, // 7: hadoop.hdfs.ListResponseProto.nextMarker:type_name -> hadoop.hdfs.BlockProto + 1, // 8: hadoop.hdfs.AliasMapProtocolService.write:input_type -> hadoop.hdfs.WriteRequestProto + 3, // 9: hadoop.hdfs.AliasMapProtocolService.read:input_type -> hadoop.hdfs.ReadRequestProto + 5, // 10: hadoop.hdfs.AliasMapProtocolService.list:input_type -> hadoop.hdfs.ListRequestProto + 7, // 11: hadoop.hdfs.AliasMapProtocolService.getBlockPoolId:input_type -> hadoop.hdfs.BlockPoolRequestProto + 2, // 12: hadoop.hdfs.AliasMapProtocolService.write:output_type -> hadoop.hdfs.WriteResponseProto + 4, // 13: hadoop.hdfs.AliasMapProtocolService.read:output_type -> hadoop.hdfs.ReadResponseProto + 6, // 14: hadoop.hdfs.AliasMapProtocolService.list:output_type -> hadoop.hdfs.ListResponseProto + 8, // 15: hadoop.hdfs.AliasMapProtocolService.getBlockPoolId:output_type -> hadoop.hdfs.BlockPoolResponseProto + 12, // [12:16] is the sub-list for method output_type + 8, // [8:12] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_AliasMapProtocol_proto_init() } +func file_AliasMapProtocol_proto_init() { + if File_AliasMapProtocol_proto != nil { + return + } + file_hdfs_proto_init() + if !protoimpl.UnsafeEnabled { + file_AliasMapProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyValueProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_AliasMapProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_AliasMapProtocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_AliasMapProtocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_AliasMapProtocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_AliasMapProtocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_AliasMapProtocol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_AliasMapProtocol_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockPoolRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_AliasMapProtocol_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockPoolResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_AliasMapProtocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_AliasMapProtocol_proto_goTypes, + DependencyIndexes: file_AliasMapProtocol_proto_depIdxs, + MessageInfos: file_AliasMapProtocol_proto_msgTypes, + }.Build() + File_AliasMapProtocol_proto = out.File + file_AliasMapProtocol_proto_rawDesc = nil + file_AliasMapProtocol_proto_goTypes = nil + file_AliasMapProtocol_proto_depIdxs = nil +} diff --git a/internal/protocol/hadoop_hdfs/AliasMapProtocol.proto b/internal/protocol/hadoop_hdfs/AliasMapProtocol.proto new file mode 100644 index 00000000..42b17887 --- /dev/null +++ b/internal/protocol/hadoop_hdfs/AliasMapProtocol.proto @@ -0,0 +1,69 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto2"; +option java_package = "org.apache.hadoop.hdfs.protocol.proto"; +option java_outer_classname = "AliasMapProtocolProtos"; +option java_generic_services = true; +option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; +package hadoop.hdfs; + +import "hdfs.proto"; + +message KeyValueProto { + optional BlockProto key = 1; + optional ProvidedStorageLocationProto value = 2; +} + +message WriteRequestProto { + required KeyValueProto keyValuePair = 1; +} + +message WriteResponseProto { +} + +message ReadRequestProto { + required BlockProto key = 1; +} + +message ReadResponseProto { + optional ProvidedStorageLocationProto value = 1; +} + +message ListRequestProto { + optional BlockProto marker = 1; +} + +message ListResponseProto { + repeated KeyValueProto fileRegions = 1; + optional BlockProto nextMarker = 2; +} + +message BlockPoolRequestProto { +} + +message BlockPoolResponseProto { + required string blockPoolId = 1; +} + +service AliasMapProtocolService { + rpc write(WriteRequestProto) returns(WriteResponseProto); + rpc read(ReadRequestProto) returns(ReadResponseProto); + rpc list(ListRequestProto) returns(ListResponseProto); + rpc getBlockPoolId(BlockPoolRequestProto) returns(BlockPoolResponseProto); +} diff --git a/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go b/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go index 6cd853ce..e82acba5 100644 --- a/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go +++ b/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.pb.go @@ -1,407 +1,2124 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: ClientDatanodeProtocol.proto package hadoop_hdfs -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import hadoop_common "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" +import ( + hadoop_common "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // block - block for which visible length is requested type GetReplicaVisibleLengthRequestProto struct { - Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` } -func (m *GetReplicaVisibleLengthRequestProto) Reset() { *m = GetReplicaVisibleLengthRequestProto{} } -func (m *GetReplicaVisibleLengthRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetReplicaVisibleLengthRequestProto) ProtoMessage() {} +func (x *GetReplicaVisibleLengthRequestProto) Reset() { + *x = GetReplicaVisibleLengthRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReplicaVisibleLengthRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReplicaVisibleLengthRequestProto) ProtoMessage() {} + +func (x *GetReplicaVisibleLengthRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReplicaVisibleLengthRequestProto.ProtoReflect.Descriptor instead. func (*GetReplicaVisibleLengthRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor6, []int{0} + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{0} } -func (m *GetReplicaVisibleLengthRequestProto) GetBlock() *ExtendedBlockProto { - if m != nil { - return m.Block +func (x *GetReplicaVisibleLengthRequestProto) GetBlock() *ExtendedBlockProto { + if x != nil { + return x.Block } return nil } -// * +//* // length - visible length of the block type GetReplicaVisibleLengthResponseProto struct { - Length *uint64 `protobuf:"varint,1,req,name=length" json:"length,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Length *uint64 `protobuf:"varint,1,req,name=length" json:"length,omitempty"` +} + +func (x *GetReplicaVisibleLengthResponseProto) Reset() { + *x = GetReplicaVisibleLengthResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReplicaVisibleLengthResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReplicaVisibleLengthResponseProto) ProtoMessage() {} + +func (x *GetReplicaVisibleLengthResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetReplicaVisibleLengthResponseProto) Reset() { *m = GetReplicaVisibleLengthResponseProto{} } -func (m *GetReplicaVisibleLengthResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetReplicaVisibleLengthResponseProto) ProtoMessage() {} +// Deprecated: Use GetReplicaVisibleLengthResponseProto.ProtoReflect.Descriptor instead. func (*GetReplicaVisibleLengthResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor6, []int{1} + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{1} } -func (m *GetReplicaVisibleLengthResponseProto) GetLength() uint64 { - if m != nil && m.Length != nil { - return *m.Length +func (x *GetReplicaVisibleLengthResponseProto) GetLength() uint64 { + if x != nil && x.Length != nil { + return *x.Length } return 0 } -// * +//* // void request type RefreshNamenodesRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *RefreshNamenodesRequestProto) Reset() { *m = RefreshNamenodesRequestProto{} } -func (m *RefreshNamenodesRequestProto) String() string { return proto.CompactTextString(m) } -func (*RefreshNamenodesRequestProto) ProtoMessage() {} -func (*RefreshNamenodesRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{2} } +func (x *RefreshNamenodesRequestProto) Reset() { + *x = RefreshNamenodesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefreshNamenodesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshNamenodesRequestProto) ProtoMessage() {} + +func (x *RefreshNamenodesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshNamenodesRequestProto.ProtoReflect.Descriptor instead. +func (*RefreshNamenodesRequestProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{2} +} -// * +//* // void response type RefreshNamenodesResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RefreshNamenodesResponseProto) Reset() { + *x = RefreshNamenodesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RefreshNamenodesResponseProto) Reset() { *m = RefreshNamenodesResponseProto{} } -func (m *RefreshNamenodesResponseProto) String() string { return proto.CompactTextString(m) } -func (*RefreshNamenodesResponseProto) ProtoMessage() {} -func (*RefreshNamenodesResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{3} } +func (x *RefreshNamenodesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshNamenodesResponseProto) ProtoMessage() {} + +func (x *RefreshNamenodesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshNamenodesResponseProto.ProtoReflect.Descriptor instead. +func (*RefreshNamenodesResponseProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{3} +} -// * +//* // blockPool - block pool to be deleted // force - if false, delete the block pool only if it is empty. // if true, delete the block pool even if it has blocks. type DeleteBlockPoolRequestProto struct { - BlockPool *string `protobuf:"bytes,1,req,name=blockPool" json:"blockPool,omitempty"` - Force *bool `protobuf:"varint,2,req,name=force" json:"force,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockPool *string `protobuf:"bytes,1,req,name=blockPool" json:"blockPool,omitempty"` + Force *bool `protobuf:"varint,2,req,name=force" json:"force,omitempty"` +} + +func (x *DeleteBlockPoolRequestProto) Reset() { + *x = DeleteBlockPoolRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteBlockPoolRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeleteBlockPoolRequestProto) Reset() { *m = DeleteBlockPoolRequestProto{} } -func (m *DeleteBlockPoolRequestProto) String() string { return proto.CompactTextString(m) } -func (*DeleteBlockPoolRequestProto) ProtoMessage() {} -func (*DeleteBlockPoolRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{4} } +func (*DeleteBlockPoolRequestProto) ProtoMessage() {} -func (m *DeleteBlockPoolRequestProto) GetBlockPool() string { - if m != nil && m.BlockPool != nil { - return *m.BlockPool +func (x *DeleteBlockPoolRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBlockPoolRequestProto.ProtoReflect.Descriptor instead. +func (*DeleteBlockPoolRequestProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteBlockPoolRequestProto) GetBlockPool() string { + if x != nil && x.BlockPool != nil { + return *x.BlockPool } return "" } -func (m *DeleteBlockPoolRequestProto) GetForce() bool { - if m != nil && m.Force != nil { - return *m.Force +func (x *DeleteBlockPoolRequestProto) GetForce() bool { + if x != nil && x.Force != nil { + return *x.Force } return false } -// * +//* // void response type DeleteBlockPoolResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *DeleteBlockPoolResponseProto) Reset() { *m = DeleteBlockPoolResponseProto{} } -func (m *DeleteBlockPoolResponseProto) String() string { return proto.CompactTextString(m) } -func (*DeleteBlockPoolResponseProto) ProtoMessage() {} -func (*DeleteBlockPoolResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{5} } +func (x *DeleteBlockPoolResponseProto) Reset() { + *x = DeleteBlockPoolResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteBlockPoolResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -// * +func (*DeleteBlockPoolResponseProto) ProtoMessage() {} + +func (x *DeleteBlockPoolResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBlockPoolResponseProto.ProtoReflect.Descriptor instead. +func (*DeleteBlockPoolResponseProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{5} +} + +//* // Gets the file information where block and its metadata is stored // block - block for which path information is being requested // token - block token // // This message is deprecated in favor of file descriptor passing. type GetBlockLocalPathInfoRequestProto struct { - Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` - Token *hadoop_common.TokenProto `protobuf:"bytes,2,req,name=token" json:"token,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` + Token *hadoop_common.TokenProto `protobuf:"bytes,2,req,name=token" json:"token,omitempty"` +} + +func (x *GetBlockLocalPathInfoRequestProto) Reset() { + *x = GetBlockLocalPathInfoRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockLocalPathInfoRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetBlockLocalPathInfoRequestProto) Reset() { *m = GetBlockLocalPathInfoRequestProto{} } -func (m *GetBlockLocalPathInfoRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetBlockLocalPathInfoRequestProto) ProtoMessage() {} +func (*GetBlockLocalPathInfoRequestProto) ProtoMessage() {} + +func (x *GetBlockLocalPathInfoRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlockLocalPathInfoRequestProto.ProtoReflect.Descriptor instead. func (*GetBlockLocalPathInfoRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor6, []int{6} + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{6} } -func (m *GetBlockLocalPathInfoRequestProto) GetBlock() *ExtendedBlockProto { - if m != nil { - return m.Block +func (x *GetBlockLocalPathInfoRequestProto) GetBlock() *ExtendedBlockProto { + if x != nil { + return x.Block } return nil } -func (m *GetBlockLocalPathInfoRequestProto) GetToken() *hadoop_common.TokenProto { - if m != nil { - return m.Token +func (x *GetBlockLocalPathInfoRequestProto) GetToken() *hadoop_common.TokenProto { + if x != nil { + return x.Token } return nil } -// * +//* // block - block for which file path information is being returned // localPath - file path where the block data is stored // localMetaPath - file path where the block meta data is stored // // This message is deprecated in favor of file descriptor passing. type GetBlockLocalPathInfoResponseProto struct { - Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` - LocalPath *string `protobuf:"bytes,2,req,name=localPath" json:"localPath,omitempty"` - LocalMetaPath *string `protobuf:"bytes,3,req,name=localMetaPath" json:"localMetaPath,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` + LocalPath *string `protobuf:"bytes,2,req,name=localPath" json:"localPath,omitempty"` + LocalMetaPath *string `protobuf:"bytes,3,req,name=localMetaPath" json:"localMetaPath,omitempty"` +} + +func (x *GetBlockLocalPathInfoResponseProto) Reset() { + *x = GetBlockLocalPathInfoResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockLocalPathInfoResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockLocalPathInfoResponseProto) ProtoMessage() {} + +func (x *GetBlockLocalPathInfoResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetBlockLocalPathInfoResponseProto) Reset() { *m = GetBlockLocalPathInfoResponseProto{} } -func (m *GetBlockLocalPathInfoResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetBlockLocalPathInfoResponseProto) ProtoMessage() {} +// Deprecated: Use GetBlockLocalPathInfoResponseProto.ProtoReflect.Descriptor instead. func (*GetBlockLocalPathInfoResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor6, []int{7} + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{7} } -func (m *GetBlockLocalPathInfoResponseProto) GetBlock() *ExtendedBlockProto { - if m != nil { - return m.Block +func (x *GetBlockLocalPathInfoResponseProto) GetBlock() *ExtendedBlockProto { + if x != nil { + return x.Block } return nil } -func (m *GetBlockLocalPathInfoResponseProto) GetLocalPath() string { - if m != nil && m.LocalPath != nil { - return *m.LocalPath +func (x *GetBlockLocalPathInfoResponseProto) GetLocalPath() string { + if x != nil && x.LocalPath != nil { + return *x.LocalPath } return "" } -func (m *GetBlockLocalPathInfoResponseProto) GetLocalMetaPath() string { - if m != nil && m.LocalMetaPath != nil { - return *m.LocalMetaPath +func (x *GetBlockLocalPathInfoResponseProto) GetLocalMetaPath() string { + if x != nil && x.LocalMetaPath != nil { + return *x.LocalMetaPath } return "" } -// * +//* // forUpgrade - if true, clients are advised to wait for restart and quick // upgrade restart is instrumented. Otherwise, datanode does // the regular shutdown. type ShutdownDatanodeRequestProto struct { - ForUpgrade *bool `protobuf:"varint,1,req,name=forUpgrade" json:"forUpgrade,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ForUpgrade *bool `protobuf:"varint,1,req,name=forUpgrade" json:"forUpgrade,omitempty"` } -func (m *ShutdownDatanodeRequestProto) Reset() { *m = ShutdownDatanodeRequestProto{} } -func (m *ShutdownDatanodeRequestProto) String() string { return proto.CompactTextString(m) } -func (*ShutdownDatanodeRequestProto) ProtoMessage() {} -func (*ShutdownDatanodeRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{8} } +func (x *ShutdownDatanodeRequestProto) Reset() { + *x = ShutdownDatanodeRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShutdownDatanodeRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShutdownDatanodeRequestProto) ProtoMessage() {} + +func (x *ShutdownDatanodeRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ShutdownDatanodeRequestProto.ProtoReflect.Descriptor instead. +func (*ShutdownDatanodeRequestProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{8} +} -func (m *ShutdownDatanodeRequestProto) GetForUpgrade() bool { - if m != nil && m.ForUpgrade != nil { - return *m.ForUpgrade +func (x *ShutdownDatanodeRequestProto) GetForUpgrade() bool { + if x != nil && x.ForUpgrade != nil { + return *x.ForUpgrade } return false } type ShutdownDatanodeResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *ShutdownDatanodeResponseProto) Reset() { *m = ShutdownDatanodeResponseProto{} } -func (m *ShutdownDatanodeResponseProto) String() string { return proto.CompactTextString(m) } -func (*ShutdownDatanodeResponseProto) ProtoMessage() {} -func (*ShutdownDatanodeResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{9} } +func (x *ShutdownDatanodeResponseProto) Reset() { + *x = ShutdownDatanodeResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -// * Tell datanode to evict active clients that are writing +func (x *ShutdownDatanodeResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShutdownDatanodeResponseProto) ProtoMessage() {} + +func (x *ShutdownDatanodeResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ShutdownDatanodeResponseProto.ProtoReflect.Descriptor instead. +func (*ShutdownDatanodeResponseProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{9} +} + +//* Tell datanode to evict active clients that are writing type EvictWritersRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EvictWritersRequestProto) Reset() { + *x = EvictWritersRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvictWritersRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EvictWritersRequestProto) Reset() { *m = EvictWritersRequestProto{} } -func (m *EvictWritersRequestProto) String() string { return proto.CompactTextString(m) } -func (*EvictWritersRequestProto) ProtoMessage() {} -func (*EvictWritersRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{10} } +func (*EvictWritersRequestProto) ProtoMessage() {} + +func (x *EvictWritersRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvictWritersRequestProto.ProtoReflect.Descriptor instead. +func (*EvictWritersRequestProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{10} +} type EvictWritersResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EvictWritersResponseProto) Reset() { + *x = EvictWritersResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvictWritersResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EvictWritersResponseProto) Reset() { *m = EvictWritersResponseProto{} } -func (m *EvictWritersResponseProto) String() string { return proto.CompactTextString(m) } -func (*EvictWritersResponseProto) ProtoMessage() {} -func (*EvictWritersResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{11} } +func (*EvictWritersResponseProto) ProtoMessage() {} -// * +func (x *EvictWritersResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvictWritersResponseProto.ProtoReflect.Descriptor instead. +func (*EvictWritersResponseProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{11} +} + +//* // Ping datanode for liveness and quick info type GetDatanodeInfoRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetDatanodeInfoRequestProto) Reset() { + *x = GetDatanodeInfoRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDatanodeInfoRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDatanodeInfoRequestProto) ProtoMessage() {} + +func (x *GetDatanodeInfoRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetDatanodeInfoRequestProto) Reset() { *m = GetDatanodeInfoRequestProto{} } -func (m *GetDatanodeInfoRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetDatanodeInfoRequestProto) ProtoMessage() {} -func (*GetDatanodeInfoRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{12} } +// Deprecated: Use GetDatanodeInfoRequestProto.ProtoReflect.Descriptor instead. +func (*GetDatanodeInfoRequestProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{12} +} type GetDatanodeInfoResponseProto struct { - LocalInfo *DatanodeLocalInfoProto `protobuf:"bytes,1,req,name=localInfo" json:"localInfo,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LocalInfo *DatanodeLocalInfoProto `protobuf:"bytes,1,req,name=localInfo" json:"localInfo,omitempty"` +} + +func (x *GetDatanodeInfoResponseProto) Reset() { + *x = GetDatanodeInfoResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDatanodeInfoResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDatanodeInfoResponseProto) ProtoMessage() {} + +func (x *GetDatanodeInfoResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetDatanodeInfoResponseProto) Reset() { *m = GetDatanodeInfoResponseProto{} } -func (m *GetDatanodeInfoResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetDatanodeInfoResponseProto) ProtoMessage() {} -func (*GetDatanodeInfoResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{13} } +// Deprecated: Use GetDatanodeInfoResponseProto.ProtoReflect.Descriptor instead. +func (*GetDatanodeInfoResponseProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{13} +} -func (m *GetDatanodeInfoResponseProto) GetLocalInfo() *DatanodeLocalInfoProto { - if m != nil { - return m.LocalInfo +func (x *GetDatanodeInfoResponseProto) GetLocalInfo() *DatanodeLocalInfoProto { + if x != nil { + return x.LocalInfo + } + return nil +} + +type GetVolumeReportRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetVolumeReportRequestProto) Reset() { + *x = GetVolumeReportRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeReportRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeReportRequestProto) ProtoMessage() {} + +func (x *GetVolumeReportRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVolumeReportRequestProto.ProtoReflect.Descriptor instead. +func (*GetVolumeReportRequestProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{14} +} + +type GetVolumeReportResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VolumeInfo []*DatanodeVolumeInfoProto `protobuf:"bytes,1,rep,name=volumeInfo" json:"volumeInfo,omitempty"` +} + +func (x *GetVolumeReportResponseProto) Reset() { + *x = GetVolumeReportResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeReportResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeReportResponseProto) ProtoMessage() {} + +func (x *GetVolumeReportResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVolumeReportResponseProto.ProtoReflect.Descriptor instead. +func (*GetVolumeReportResponseProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{15} +} + +func (x *GetVolumeReportResponseProto) GetVolumeInfo() []*DatanodeVolumeInfoProto { + if x != nil { + return x.VolumeInfo } return nil } type TriggerBlockReportRequestProto struct { - Incremental *bool `protobuf:"varint,1,req,name=incremental" json:"incremental,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Incremental *bool `protobuf:"varint,1,req,name=incremental" json:"incremental,omitempty"` + NnAddress *string `protobuf:"bytes,2,opt,name=nnAddress" json:"nnAddress,omitempty"` +} + +func (x *TriggerBlockReportRequestProto) Reset() { + *x = TriggerBlockReportRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TriggerBlockReportRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TriggerBlockReportRequestProto) ProtoMessage() {} + +func (x *TriggerBlockReportRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *TriggerBlockReportRequestProto) Reset() { *m = TriggerBlockReportRequestProto{} } -func (m *TriggerBlockReportRequestProto) String() string { return proto.CompactTextString(m) } -func (*TriggerBlockReportRequestProto) ProtoMessage() {} -func (*TriggerBlockReportRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{14} } +// Deprecated: Use TriggerBlockReportRequestProto.ProtoReflect.Descriptor instead. +func (*TriggerBlockReportRequestProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{16} +} -func (m *TriggerBlockReportRequestProto) GetIncremental() bool { - if m != nil && m.Incremental != nil { - return *m.Incremental +func (x *TriggerBlockReportRequestProto) GetIncremental() bool { + if x != nil && x.Incremental != nil { + return *x.Incremental } return false } +func (x *TriggerBlockReportRequestProto) GetNnAddress() string { + if x != nil && x.NnAddress != nil { + return *x.NnAddress + } + return "" +} + type TriggerBlockReportResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *TriggerBlockReportResponseProto) Reset() { *m = TriggerBlockReportResponseProto{} } -func (m *TriggerBlockReportResponseProto) String() string { return proto.CompactTextString(m) } -func (*TriggerBlockReportResponseProto) ProtoMessage() {} +func (x *TriggerBlockReportResponseProto) Reset() { + *x = TriggerBlockReportResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TriggerBlockReportResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TriggerBlockReportResponseProto) ProtoMessage() {} + +func (x *TriggerBlockReportResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TriggerBlockReportResponseProto.ProtoReflect.Descriptor instead. func (*TriggerBlockReportResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor6, []int{15} + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{17} } type GetBalancerBandwidthRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *GetBalancerBandwidthRequestProto) Reset() { *m = GetBalancerBandwidthRequestProto{} } -func (m *GetBalancerBandwidthRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetBalancerBandwidthRequestProto) ProtoMessage() {} +func (x *GetBalancerBandwidthRequestProto) Reset() { + *x = GetBalancerBandwidthRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBalancerBandwidthRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBalancerBandwidthRequestProto) ProtoMessage() {} + +func (x *GetBalancerBandwidthRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBalancerBandwidthRequestProto.ProtoReflect.Descriptor instead. func (*GetBalancerBandwidthRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor6, []int{16} + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{18} } -// * +//* // bandwidth - balancer bandwidth value of the datanode. type GetBalancerBandwidthResponseProto struct { - Bandwidth *uint64 `protobuf:"varint,1,req,name=bandwidth" json:"bandwidth,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bandwidth *uint64 `protobuf:"varint,1,req,name=bandwidth" json:"bandwidth,omitempty"` +} + +func (x *GetBalancerBandwidthResponseProto) Reset() { + *x = GetBalancerBandwidthResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBalancerBandwidthResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetBalancerBandwidthResponseProto) Reset() { *m = GetBalancerBandwidthResponseProto{} } -func (m *GetBalancerBandwidthResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetBalancerBandwidthResponseProto) ProtoMessage() {} +func (*GetBalancerBandwidthResponseProto) ProtoMessage() {} + +func (x *GetBalancerBandwidthResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBalancerBandwidthResponseProto.ProtoReflect.Descriptor instead. func (*GetBalancerBandwidthResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor6, []int{17} + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{19} +} + +func (x *GetBalancerBandwidthResponseProto) GetBandwidth() uint64 { + if x != nil && x.Bandwidth != nil { + return *x.Bandwidth + } + return 0 +} + +//* +// This message allows a client to submit a disk +// balancer plan to a data node. +type SubmitDiskBalancerPlanRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PlanID *string `protobuf:"bytes,1,req,name=planID" json:"planID,omitempty"` // A hash of the plan like SHA-1 + Plan *string `protobuf:"bytes,2,req,name=plan" json:"plan,omitempty"` // Plan file data in Json format + PlanVersion *uint64 `protobuf:"varint,3,opt,name=planVersion" json:"planVersion,omitempty"` // Plan version number + IgnoreDateCheck *bool `protobuf:"varint,4,opt,name=ignoreDateCheck" json:"ignoreDateCheck,omitempty"` // Ignore date checks on this plan. + PlanFile *string `protobuf:"bytes,5,req,name=planFile" json:"planFile,omitempty"` // Plan file path +} + +func (x *SubmitDiskBalancerPlanRequestProto) Reset() { + *x = SubmitDiskBalancerPlanRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubmitDiskBalancerPlanRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitDiskBalancerPlanRequestProto) ProtoMessage() {} + +func (x *SubmitDiskBalancerPlanRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubmitDiskBalancerPlanRequestProto.ProtoReflect.Descriptor instead. +func (*SubmitDiskBalancerPlanRequestProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{20} +} + +func (x *SubmitDiskBalancerPlanRequestProto) GetPlanID() string { + if x != nil && x.PlanID != nil { + return *x.PlanID + } + return "" +} + +func (x *SubmitDiskBalancerPlanRequestProto) GetPlan() string { + if x != nil && x.Plan != nil { + return *x.Plan + } + return "" +} + +func (x *SubmitDiskBalancerPlanRequestProto) GetPlanVersion() uint64 { + if x != nil && x.PlanVersion != nil { + return *x.PlanVersion + } + return 0 +} + +func (x *SubmitDiskBalancerPlanRequestProto) GetIgnoreDateCheck() bool { + if x != nil && x.IgnoreDateCheck != nil { + return *x.IgnoreDateCheck + } + return false +} + +func (x *SubmitDiskBalancerPlanRequestProto) GetPlanFile() string { + if x != nil && x.PlanFile != nil { + return *x.PlanFile + } + return "" +} + +//* +// Response from the DataNode on Plan Submit request +type SubmitDiskBalancerPlanResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SubmitDiskBalancerPlanResponseProto) Reset() { + *x = SubmitDiskBalancerPlanResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubmitDiskBalancerPlanResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitDiskBalancerPlanResponseProto) ProtoMessage() {} + +func (x *SubmitDiskBalancerPlanResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubmitDiskBalancerPlanResponseProto.ProtoReflect.Descriptor instead. +func (*SubmitDiskBalancerPlanResponseProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{21} +} + +//* +// This message describes a request to cancel an +// outstanding disk balancer plan +type CancelPlanRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PlanID *string `protobuf:"bytes,1,req,name=planID" json:"planID,omitempty"` +} + +func (x *CancelPlanRequestProto) Reset() { + *x = CancelPlanRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelPlanRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelPlanRequestProto) ProtoMessage() {} + +func (x *CancelPlanRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelPlanRequestProto.ProtoReflect.Descriptor instead. +func (*CancelPlanRequestProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{22} +} + +func (x *CancelPlanRequestProto) GetPlanID() string { + if x != nil && x.PlanID != nil { + return *x.PlanID + } + return "" +} + +//* +// This is the response for the cancellation request +type CancelPlanResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *GetBalancerBandwidthResponseProto) GetBandwidth() uint64 { - if m != nil && m.Bandwidth != nil { - return *m.Bandwidth +func (x *CancelPlanResponseProto) Reset() { + *x = CancelPlanResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelPlanResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelPlanResponseProto) ProtoMessage() {} + +func (x *CancelPlanResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelPlanResponseProto.ProtoReflect.Descriptor instead. +func (*CancelPlanResponseProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{23} +} + +//* +// This message allows a client to query data node to see +// if a disk balancer plan is executing and if so what is +// the status. +type QueryPlanStatusRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryPlanStatusRequestProto) Reset() { + *x = QueryPlanStatusRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPlanStatusRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPlanStatusRequestProto) ProtoMessage() {} + +func (x *QueryPlanStatusRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryPlanStatusRequestProto.ProtoReflect.Descriptor instead. +func (*QueryPlanStatusRequestProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{24} +} + +//* +// This message describes a plan if it is in progress +type QueryPlanStatusResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *uint32 `protobuf:"varint,1,opt,name=result" json:"result,omitempty"` + PlanID *string `protobuf:"bytes,2,opt,name=planID" json:"planID,omitempty"` + CurrentStatus *string `protobuf:"bytes,3,opt,name=currentStatus" json:"currentStatus,omitempty"` + PlanFile *string `protobuf:"bytes,4,opt,name=planFile" json:"planFile,omitempty"` +} + +func (x *QueryPlanStatusResponseProto) Reset() { + *x = QueryPlanStatusResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPlanStatusResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPlanStatusResponseProto) ProtoMessage() {} + +func (x *QueryPlanStatusResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryPlanStatusResponseProto.ProtoReflect.Descriptor instead. +func (*QueryPlanStatusResponseProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{25} +} + +func (x *QueryPlanStatusResponseProto) GetResult() uint32 { + if x != nil && x.Result != nil { + return *x.Result } return 0 } -func init() { - proto.RegisterType((*GetReplicaVisibleLengthRequestProto)(nil), "hadoop.hdfs.GetReplicaVisibleLengthRequestProto") - proto.RegisterType((*GetReplicaVisibleLengthResponseProto)(nil), "hadoop.hdfs.GetReplicaVisibleLengthResponseProto") - proto.RegisterType((*RefreshNamenodesRequestProto)(nil), "hadoop.hdfs.RefreshNamenodesRequestProto") - proto.RegisterType((*RefreshNamenodesResponseProto)(nil), "hadoop.hdfs.RefreshNamenodesResponseProto") - proto.RegisterType((*DeleteBlockPoolRequestProto)(nil), "hadoop.hdfs.DeleteBlockPoolRequestProto") - proto.RegisterType((*DeleteBlockPoolResponseProto)(nil), "hadoop.hdfs.DeleteBlockPoolResponseProto") - proto.RegisterType((*GetBlockLocalPathInfoRequestProto)(nil), "hadoop.hdfs.GetBlockLocalPathInfoRequestProto") - proto.RegisterType((*GetBlockLocalPathInfoResponseProto)(nil), "hadoop.hdfs.GetBlockLocalPathInfoResponseProto") - proto.RegisterType((*ShutdownDatanodeRequestProto)(nil), "hadoop.hdfs.ShutdownDatanodeRequestProto") - proto.RegisterType((*ShutdownDatanodeResponseProto)(nil), "hadoop.hdfs.ShutdownDatanodeResponseProto") - proto.RegisterType((*EvictWritersRequestProto)(nil), "hadoop.hdfs.EvictWritersRequestProto") - proto.RegisterType((*EvictWritersResponseProto)(nil), "hadoop.hdfs.EvictWritersResponseProto") - proto.RegisterType((*GetDatanodeInfoRequestProto)(nil), "hadoop.hdfs.GetDatanodeInfoRequestProto") - proto.RegisterType((*GetDatanodeInfoResponseProto)(nil), "hadoop.hdfs.GetDatanodeInfoResponseProto") - proto.RegisterType((*TriggerBlockReportRequestProto)(nil), "hadoop.hdfs.TriggerBlockReportRequestProto") - proto.RegisterType((*TriggerBlockReportResponseProto)(nil), "hadoop.hdfs.TriggerBlockReportResponseProto") - proto.RegisterType((*GetBalancerBandwidthRequestProto)(nil), "hadoop.hdfs.GetBalancerBandwidthRequestProto") - proto.RegisterType((*GetBalancerBandwidthResponseProto)(nil), "hadoop.hdfs.GetBalancerBandwidthResponseProto") -} - -func init() { proto.RegisterFile("ClientDatanodeProtocol.proto", fileDescriptor6) } - -var fileDescriptor6 = []byte{ - // 804 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4b, 0x6f, 0xdb, 0x46, - 0x10, 0x06, 0xdd, 0xba, 0xb0, 0x46, 0x7d, 0x61, 0xe1, 0xb6, 0x32, 0x2d, 0xd9, 0x32, 0x6d, 0x17, - 0x76, 0x1f, 0x74, 0x2b, 0xc0, 0x3d, 0x1a, 0xb0, 0x6a, 0xc3, 0x28, 0xaa, 0x16, 0x2e, 0xe5, 0x26, - 0x97, 0xe4, 0xb0, 0x22, 0x47, 0xd4, 0xc2, 0x14, 0x97, 0x59, 0xae, 0x6c, 0xe7, 0x12, 0x20, 0xb7, - 0x00, 0x41, 0x0e, 0xf9, 0x05, 0xc9, 0x4f, 0x0d, 0xb8, 0x92, 0xa2, 0x5d, 0x8a, 0xa2, 0x95, 0x20, - 0x27, 0x91, 0x33, 0xdf, 0x3c, 0xf6, 0xdb, 0x99, 0x4f, 0x84, 0xfa, 0x9f, 0x11, 0xc3, 0x58, 0x9e, - 0x51, 0x49, 0x63, 0x1e, 0xe0, 0xa5, 0xe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 0x77, 0x55, 0x22, 0x13, 0xb9, 0xbb, - 0x2a, 0x55, 0x8c, 0xe7, 0x16, 0xd4, 0xd4, 0xfc, 0x1b, 0xff, 0xd8, 0x5d, 0x49, 0xe5, 0x28, 0x25, - 0x05, 0xe3, 0x5c, 0x00, 0x33, 0x4a, 0xb7, 0x96, 0x0c, 0xd1, 0x7b, 0x18, 0xc1, 0x7a, 0x2a, 0xa9, - 0xc8, 0x43, 0xc9, 0xaf, 0xe6, 0x75, 0x14, 0x40, 0x8c, 0xd2, 0xee, 0x12, 0x70, 0xbd, 0xec, 0x2b, - 0x0b, 0xea, 0x11, 0x4b, 0x75, 0x50, 0x2f, 0xca, 0x7c, 0x09, 0x0a, 0xc9, 0x30, 0x25, 0xc7, 0x46, - 0xc2, 0x4e, 0x09, 0xd4, 0xe8, 0xe3, 0x8f, 0x0f, 0x08, 0xd3, 0xfb, 0xe1, 0x40, 0xe4, 0x9c, 0x6a, - 0x92, 0x9f, 0x8d, 0x6c, 0xe5, 0xd2, 0x6c, 0xff, 0x72, 0x2f, 0x38, 0xc7, 0x7b, 0x58, 0xa0, 0xaf, - 0x39, 0xde, 0xef, 0x93, 0x69, 0xdb, 0x5d, 0x02, 0xae, 0x95, 0x6d, 0xff, 0x0d, 0xfb, 0x5c, 0x84, - 0x2e, 0x4d, 0xa8, 0x3f, 0x40, 0x23, 0x36, 0x31, 0x3e, 0x14, 0xdb, 0x0b, 0x3e, 0x47, 0xd5, 0x6f, - 0xfa, 0xc2, 0xb2, 0xde, 0x5a, 0xd6, 0xbb, 0x00, 0x00, 0x00, 0xff, 0xff, 0x38, 0x38, 0x2f, 0xb6, - 0xb3, 0x0a, 0x00, 0x00, +func (x *QueryPlanStatusResponseProto) GetPlanID() string { + if x != nil && x.PlanID != nil { + return *x.PlanID + } + return "" +} + +func (x *QueryPlanStatusResponseProto) GetCurrentStatus() string { + if x != nil && x.CurrentStatus != nil { + return *x.CurrentStatus + } + return "" +} + +func (x *QueryPlanStatusResponseProto) GetPlanFile() string { + if x != nil && x.PlanFile != nil { + return *x.PlanFile + } + return "" +} + +//* +// This message sends a request to data node get a specific setting +// that is used by disk balancer. +type DiskBalancerSettingRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` +} + +func (x *DiskBalancerSettingRequestProto) Reset() { + *x = DiskBalancerSettingRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskBalancerSettingRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskBalancerSettingRequestProto) ProtoMessage() {} + +func (x *DiskBalancerSettingRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskBalancerSettingRequestProto.ProtoReflect.Descriptor instead. +func (*DiskBalancerSettingRequestProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{26} +} + +func (x *DiskBalancerSettingRequestProto) GetKey() string { + if x != nil && x.Key != nil { + return *x.Key + } + return "" +} + +//* +// Response that describes the value of requested disk balancer setting. +type DiskBalancerSettingResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` +} + +func (x *DiskBalancerSettingResponseProto) Reset() { + *x = DiskBalancerSettingResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskBalancerSettingResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskBalancerSettingResponseProto) ProtoMessage() {} + +func (x *DiskBalancerSettingResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientDatanodeProtocol_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskBalancerSettingResponseProto.ProtoReflect.Descriptor instead. +func (*DiskBalancerSettingResponseProto) Descriptor() ([]byte, []int) { + return file_ClientDatanodeProtocol_proto_rawDescGZIP(), []int{27} +} + +func (x *DiskBalancerSettingResponseProto) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value + } + return "" +} + +var File_ClientDatanodeProtocol_proto protoreflect.FileDescriptor + +var file_ClientDatanodeProtocol_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x1a, 0x0e, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x56, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x0a, + 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x56, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0x1e, 0x0a, 0x1c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, + 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1f, 0x0a, 0x1d, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, + 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, + 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, + 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, + 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x21, 0x47, 0x65, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, + 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2f, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x02, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9f, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x0a, + 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, + 0x68, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x50, + 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x4d, 0x65, 0x74, 0x61, 0x50, 0x61, 0x74, 0x68, 0x22, 0x3e, 0x0a, 0x1c, 0x53, 0x68, 0x75, 0x74, + 0x64, 0x6f, 0x77, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x6f, + 0x72, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x53, 0x68, 0x75, 0x74, + 0x64, 0x6f, 0x77, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x18, 0x45, 0x76, 0x69, + 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1b, 0x0a, 0x19, 0x45, 0x76, 0x69, 0x63, 0x74, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x1d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x61, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x41, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, + 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, + 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x1d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x44, 0x0a, 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x60, 0x0a, 0x1e, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, + 0x52, 0x0b, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, + 0x0a, 0x20, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, 0x61, 0x6e, + 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x61, 0x6e, 0x64, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, 0x62, 0x61, 0x6e, 0x64, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x22, 0xb8, 0x01, 0x0a, 0x22, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x44, 0x69, 0x73, 0x6b, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, + 0x61, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x6e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x70, + 0x6c, 0x61, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x69, 0x67, + 0x6e, 0x6f, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x6e, 0x46, 0x69, 0x6c, 0x65, + 0x18, 0x05, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x6e, 0x46, 0x69, 0x6c, 0x65, + 0x22, 0x25, 0x0a, 0x23, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x30, 0x0a, 0x16, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x44, 0x22, 0x19, 0x0a, 0x17, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1d, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, + 0x61, 0x6e, 0x49, 0x44, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, + 0x61, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, + 0x61, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x22, 0x33, 0x0a, 0x1f, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x38, 0x0a, 0x20, 0x44, + 0x69, 0x73, 0x6b, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0xc0, 0x0f, 0x0a, 0x1d, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x17, 0x67, 0x65, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x56, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x12, 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x56, 0x69, 0x73, 0x69, 0x62, + 0x6c, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x56, 0x69, 0x73, + 0x69, 0x62, 0x6c, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x69, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x61, 0x6d, 0x65, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x66, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x78, 0x0a, 0x15, 0x67, 0x65, + 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, + 0x61, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, + 0x61, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x69, 0x0a, 0x10, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x44, + 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x5d, 0x0a, 0x0c, 0x65, 0x76, 0x69, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x76, + 0x69, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x76, 0x69, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x66, + 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x66, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x81, + 0x01, 0x0a, 0x18, 0x67, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x75, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x8d, 0x01, 0x0a, 0x1c, 0x6c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x36, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x62, + 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x6f, 0x0a, 0x12, 0x74, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, + 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x75, 0x0a, 0x14, 0x67, 0x65, + 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x12, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x7b, 0x0a, 0x16, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x2f, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x44, 0x69, 0x73, 0x6b, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6c, 0x61, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x63, + 0x0a, 0x16, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x6c, 0x61, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x6c, 0x0a, 0x15, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x69, 0x73, 0x6b, + 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x28, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x75, 0x0a, 0x16, 0x67, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x87, 0x01, 0x0a, 0x25, 0x6f, 0x72, 0x67, + 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x42, 0x1c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, + 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, + 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x68, 0x64, 0x66, 0x73, 0x88, 0x01, 0x01, 0xa0, + 0x01, 0x01, +} + +var ( + file_ClientDatanodeProtocol_proto_rawDescOnce sync.Once + file_ClientDatanodeProtocol_proto_rawDescData = file_ClientDatanodeProtocol_proto_rawDesc +) + +func file_ClientDatanodeProtocol_proto_rawDescGZIP() []byte { + file_ClientDatanodeProtocol_proto_rawDescOnce.Do(func() { + file_ClientDatanodeProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_ClientDatanodeProtocol_proto_rawDescData) + }) + return file_ClientDatanodeProtocol_proto_rawDescData +} + +var file_ClientDatanodeProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_ClientDatanodeProtocol_proto_goTypes = []interface{}{ + (*GetReplicaVisibleLengthRequestProto)(nil), // 0: hadoop.hdfs.GetReplicaVisibleLengthRequestProto + (*GetReplicaVisibleLengthResponseProto)(nil), // 1: hadoop.hdfs.GetReplicaVisibleLengthResponseProto + (*RefreshNamenodesRequestProto)(nil), // 2: hadoop.hdfs.RefreshNamenodesRequestProto + (*RefreshNamenodesResponseProto)(nil), // 3: hadoop.hdfs.RefreshNamenodesResponseProto + (*DeleteBlockPoolRequestProto)(nil), // 4: hadoop.hdfs.DeleteBlockPoolRequestProto + (*DeleteBlockPoolResponseProto)(nil), // 5: hadoop.hdfs.DeleteBlockPoolResponseProto + (*GetBlockLocalPathInfoRequestProto)(nil), // 6: hadoop.hdfs.GetBlockLocalPathInfoRequestProto + (*GetBlockLocalPathInfoResponseProto)(nil), // 7: hadoop.hdfs.GetBlockLocalPathInfoResponseProto + (*ShutdownDatanodeRequestProto)(nil), // 8: hadoop.hdfs.ShutdownDatanodeRequestProto + (*ShutdownDatanodeResponseProto)(nil), // 9: hadoop.hdfs.ShutdownDatanodeResponseProto + (*EvictWritersRequestProto)(nil), // 10: hadoop.hdfs.EvictWritersRequestProto + (*EvictWritersResponseProto)(nil), // 11: hadoop.hdfs.EvictWritersResponseProto + (*GetDatanodeInfoRequestProto)(nil), // 12: hadoop.hdfs.GetDatanodeInfoRequestProto + (*GetDatanodeInfoResponseProto)(nil), // 13: hadoop.hdfs.GetDatanodeInfoResponseProto + (*GetVolumeReportRequestProto)(nil), // 14: hadoop.hdfs.GetVolumeReportRequestProto + (*GetVolumeReportResponseProto)(nil), // 15: hadoop.hdfs.GetVolumeReportResponseProto + (*TriggerBlockReportRequestProto)(nil), // 16: hadoop.hdfs.TriggerBlockReportRequestProto + (*TriggerBlockReportResponseProto)(nil), // 17: hadoop.hdfs.TriggerBlockReportResponseProto + (*GetBalancerBandwidthRequestProto)(nil), // 18: hadoop.hdfs.GetBalancerBandwidthRequestProto + (*GetBalancerBandwidthResponseProto)(nil), // 19: hadoop.hdfs.GetBalancerBandwidthResponseProto + (*SubmitDiskBalancerPlanRequestProto)(nil), // 20: hadoop.hdfs.SubmitDiskBalancerPlanRequestProto + (*SubmitDiskBalancerPlanResponseProto)(nil), // 21: hadoop.hdfs.SubmitDiskBalancerPlanResponseProto + (*CancelPlanRequestProto)(nil), // 22: hadoop.hdfs.CancelPlanRequestProto + (*CancelPlanResponseProto)(nil), // 23: hadoop.hdfs.CancelPlanResponseProto + (*QueryPlanStatusRequestProto)(nil), // 24: hadoop.hdfs.QueryPlanStatusRequestProto + (*QueryPlanStatusResponseProto)(nil), // 25: hadoop.hdfs.QueryPlanStatusResponseProto + (*DiskBalancerSettingRequestProto)(nil), // 26: hadoop.hdfs.DiskBalancerSettingRequestProto + (*DiskBalancerSettingResponseProto)(nil), // 27: hadoop.hdfs.DiskBalancerSettingResponseProto + (*ExtendedBlockProto)(nil), // 28: hadoop.hdfs.ExtendedBlockProto + (*hadoop_common.TokenProto)(nil), // 29: hadoop.common.TokenProto + (*DatanodeLocalInfoProto)(nil), // 30: hadoop.hdfs.DatanodeLocalInfoProto + (*DatanodeVolumeInfoProto)(nil), // 31: hadoop.hdfs.DatanodeVolumeInfoProto + (*GetReconfigurationStatusRequestProto)(nil), // 32: hadoop.hdfs.GetReconfigurationStatusRequestProto + (*StartReconfigurationRequestProto)(nil), // 33: hadoop.hdfs.StartReconfigurationRequestProto + (*ListReconfigurablePropertiesRequestProto)(nil), // 34: hadoop.hdfs.ListReconfigurablePropertiesRequestProto + (*GetReconfigurationStatusResponseProto)(nil), // 35: hadoop.hdfs.GetReconfigurationStatusResponseProto + (*StartReconfigurationResponseProto)(nil), // 36: hadoop.hdfs.StartReconfigurationResponseProto + (*ListReconfigurablePropertiesResponseProto)(nil), // 37: hadoop.hdfs.ListReconfigurablePropertiesResponseProto +} +var file_ClientDatanodeProtocol_proto_depIdxs = []int32{ + 28, // 0: hadoop.hdfs.GetReplicaVisibleLengthRequestProto.block:type_name -> hadoop.hdfs.ExtendedBlockProto + 28, // 1: hadoop.hdfs.GetBlockLocalPathInfoRequestProto.block:type_name -> hadoop.hdfs.ExtendedBlockProto + 29, // 2: hadoop.hdfs.GetBlockLocalPathInfoRequestProto.token:type_name -> hadoop.common.TokenProto + 28, // 3: hadoop.hdfs.GetBlockLocalPathInfoResponseProto.block:type_name -> hadoop.hdfs.ExtendedBlockProto + 30, // 4: hadoop.hdfs.GetDatanodeInfoResponseProto.localInfo:type_name -> hadoop.hdfs.DatanodeLocalInfoProto + 31, // 5: hadoop.hdfs.GetVolumeReportResponseProto.volumeInfo:type_name -> hadoop.hdfs.DatanodeVolumeInfoProto + 0, // 6: hadoop.hdfs.ClientDatanodeProtocolService.getReplicaVisibleLength:input_type -> hadoop.hdfs.GetReplicaVisibleLengthRequestProto + 2, // 7: hadoop.hdfs.ClientDatanodeProtocolService.refreshNamenodes:input_type -> hadoop.hdfs.RefreshNamenodesRequestProto + 4, // 8: hadoop.hdfs.ClientDatanodeProtocolService.deleteBlockPool:input_type -> hadoop.hdfs.DeleteBlockPoolRequestProto + 6, // 9: hadoop.hdfs.ClientDatanodeProtocolService.getBlockLocalPathInfo:input_type -> hadoop.hdfs.GetBlockLocalPathInfoRequestProto + 8, // 10: hadoop.hdfs.ClientDatanodeProtocolService.shutdownDatanode:input_type -> hadoop.hdfs.ShutdownDatanodeRequestProto + 10, // 11: hadoop.hdfs.ClientDatanodeProtocolService.evictWriters:input_type -> hadoop.hdfs.EvictWritersRequestProto + 12, // 12: hadoop.hdfs.ClientDatanodeProtocolService.getDatanodeInfo:input_type -> hadoop.hdfs.GetDatanodeInfoRequestProto + 14, // 13: hadoop.hdfs.ClientDatanodeProtocolService.getVolumeReport:input_type -> hadoop.hdfs.GetVolumeReportRequestProto + 32, // 14: hadoop.hdfs.ClientDatanodeProtocolService.getReconfigurationStatus:input_type -> hadoop.hdfs.GetReconfigurationStatusRequestProto + 33, // 15: hadoop.hdfs.ClientDatanodeProtocolService.startReconfiguration:input_type -> hadoop.hdfs.StartReconfigurationRequestProto + 34, // 16: hadoop.hdfs.ClientDatanodeProtocolService.listReconfigurableProperties:input_type -> hadoop.hdfs.ListReconfigurablePropertiesRequestProto + 16, // 17: hadoop.hdfs.ClientDatanodeProtocolService.triggerBlockReport:input_type -> hadoop.hdfs.TriggerBlockReportRequestProto + 18, // 18: hadoop.hdfs.ClientDatanodeProtocolService.getBalancerBandwidth:input_type -> hadoop.hdfs.GetBalancerBandwidthRequestProto + 20, // 19: hadoop.hdfs.ClientDatanodeProtocolService.submitDiskBalancerPlan:input_type -> hadoop.hdfs.SubmitDiskBalancerPlanRequestProto + 22, // 20: hadoop.hdfs.ClientDatanodeProtocolService.cancelDiskBalancerPlan:input_type -> hadoop.hdfs.CancelPlanRequestProto + 24, // 21: hadoop.hdfs.ClientDatanodeProtocolService.queryDiskBalancerPlan:input_type -> hadoop.hdfs.QueryPlanStatusRequestProto + 26, // 22: hadoop.hdfs.ClientDatanodeProtocolService.getDiskBalancerSetting:input_type -> hadoop.hdfs.DiskBalancerSettingRequestProto + 1, // 23: hadoop.hdfs.ClientDatanodeProtocolService.getReplicaVisibleLength:output_type -> hadoop.hdfs.GetReplicaVisibleLengthResponseProto + 3, // 24: hadoop.hdfs.ClientDatanodeProtocolService.refreshNamenodes:output_type -> hadoop.hdfs.RefreshNamenodesResponseProto + 5, // 25: hadoop.hdfs.ClientDatanodeProtocolService.deleteBlockPool:output_type -> hadoop.hdfs.DeleteBlockPoolResponseProto + 7, // 26: hadoop.hdfs.ClientDatanodeProtocolService.getBlockLocalPathInfo:output_type -> hadoop.hdfs.GetBlockLocalPathInfoResponseProto + 9, // 27: hadoop.hdfs.ClientDatanodeProtocolService.shutdownDatanode:output_type -> hadoop.hdfs.ShutdownDatanodeResponseProto + 11, // 28: hadoop.hdfs.ClientDatanodeProtocolService.evictWriters:output_type -> hadoop.hdfs.EvictWritersResponseProto + 13, // 29: hadoop.hdfs.ClientDatanodeProtocolService.getDatanodeInfo:output_type -> hadoop.hdfs.GetDatanodeInfoResponseProto + 15, // 30: hadoop.hdfs.ClientDatanodeProtocolService.getVolumeReport:output_type -> hadoop.hdfs.GetVolumeReportResponseProto + 35, // 31: hadoop.hdfs.ClientDatanodeProtocolService.getReconfigurationStatus:output_type -> hadoop.hdfs.GetReconfigurationStatusResponseProto + 36, // 32: hadoop.hdfs.ClientDatanodeProtocolService.startReconfiguration:output_type -> hadoop.hdfs.StartReconfigurationResponseProto + 37, // 33: hadoop.hdfs.ClientDatanodeProtocolService.listReconfigurableProperties:output_type -> hadoop.hdfs.ListReconfigurablePropertiesResponseProto + 17, // 34: hadoop.hdfs.ClientDatanodeProtocolService.triggerBlockReport:output_type -> hadoop.hdfs.TriggerBlockReportResponseProto + 19, // 35: hadoop.hdfs.ClientDatanodeProtocolService.getBalancerBandwidth:output_type -> hadoop.hdfs.GetBalancerBandwidthResponseProto + 21, // 36: hadoop.hdfs.ClientDatanodeProtocolService.submitDiskBalancerPlan:output_type -> hadoop.hdfs.SubmitDiskBalancerPlanResponseProto + 23, // 37: hadoop.hdfs.ClientDatanodeProtocolService.cancelDiskBalancerPlan:output_type -> hadoop.hdfs.CancelPlanResponseProto + 25, // 38: hadoop.hdfs.ClientDatanodeProtocolService.queryDiskBalancerPlan:output_type -> hadoop.hdfs.QueryPlanStatusResponseProto + 27, // 39: hadoop.hdfs.ClientDatanodeProtocolService.getDiskBalancerSetting:output_type -> hadoop.hdfs.DiskBalancerSettingResponseProto + 23, // [23:40] is the sub-list for method output_type + 6, // [6:23] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_ClientDatanodeProtocol_proto_init() } +func file_ClientDatanodeProtocol_proto_init() { + if File_ClientDatanodeProtocol_proto != nil { + return + } + file_hdfs_proto_init() + file_ReconfigurationProtocol_proto_init() + if !protoimpl.UnsafeEnabled { + file_ClientDatanodeProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReplicaVisibleLengthRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReplicaVisibleLengthResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshNamenodesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshNamenodesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteBlockPoolRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteBlockPoolResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBlockLocalPathInfoRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBlockLocalPathInfoResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShutdownDatanodeRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShutdownDatanodeResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvictWritersRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvictWritersResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDatanodeInfoRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDatanodeInfoResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeReportRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeReportResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TriggerBlockReportRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TriggerBlockReportResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBalancerBandwidthRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBalancerBandwidthResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitDiskBalancerPlanRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitDiskBalancerPlanResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelPlanRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelPlanResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPlanStatusRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPlanStatusResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiskBalancerSettingRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientDatanodeProtocol_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiskBalancerSettingResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ClientDatanodeProtocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 28, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ClientDatanodeProtocol_proto_goTypes, + DependencyIndexes: file_ClientDatanodeProtocol_proto_depIdxs, + MessageInfos: file_ClientDatanodeProtocol_proto_msgTypes, + }.Build() + File_ClientDatanodeProtocol_proto = out.File + file_ClientDatanodeProtocol_proto_rawDesc = nil + file_ClientDatanodeProtocol_proto_goTypes = nil + file_ClientDatanodeProtocol_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.proto b/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.proto index e135df84..5fc8681e 100644 --- a/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.proto +++ b/internal/protocol/hadoop_hdfs/ClientDatanodeProtocol.proto @@ -21,7 +21,7 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax="proto2"; // This file contains protocol buffers that are used throughout HDFS -- i.e. // by the client, server, and data transfer protocols. @@ -29,6 +29,7 @@ option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "ClientDatanodeProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; package hadoop.hdfs; import "Security.proto"; @@ -131,9 +132,16 @@ message GetDatanodeInfoResponseProto { required DatanodeLocalInfoProto localInfo = 1; } +message GetVolumeReportRequestProto { +} + +message GetVolumeReportResponseProto { + repeated DatanodeVolumeInfoProto volumeInfo = 1; +} message TriggerBlockReportRequestProto { required bool incremental = 1; + optional string nnAddress = 2; } message TriggerBlockReportResponseProto { @@ -149,6 +157,72 @@ message GetBalancerBandwidthResponseProto { required uint64 bandwidth = 1; } +/** + * This message allows a client to submit a disk + * balancer plan to a data node. + */ +message SubmitDiskBalancerPlanRequestProto { + required string planID = 1; // A hash of the plan like SHA-1 + required string plan = 2; // Plan file data in Json format + optional uint64 planVersion = 3; // Plan version number + optional bool ignoreDateCheck = 4; // Ignore date checks on this plan. + required string planFile = 5; // Plan file path +} + +/** + * Response from the DataNode on Plan Submit request + */ +message SubmitDiskBalancerPlanResponseProto { +} + +/** + * This message describes a request to cancel an + * outstanding disk balancer plan + */ +message CancelPlanRequestProto { + required string planID = 1; +} + +/** + * This is the response for the cancellation request + */ +message CancelPlanResponseProto { +} + + +/** + * This message allows a client to query data node to see + * if a disk balancer plan is executing and if so what is + * the status. + */ +message QueryPlanStatusRequestProto { +} + +/** + * This message describes a plan if it is in progress + */ +message QueryPlanStatusResponseProto { + optional uint32 result = 1; + optional string planID = 2; + optional string currentStatus = 3; + optional string planFile = 4; +} + +/** + * This message sends a request to data node get a specific setting + * that is used by disk balancer. + */ +message DiskBalancerSettingRequestProto { + required string key = 1; +} + +/** + * Response that describes the value of requested disk balancer setting. + */ +message DiskBalancerSettingResponseProto { + required string value = 1; +} + /** * Protocol used from client to the Datanode. * See the request and response for details of rpc call. @@ -189,6 +263,9 @@ service ClientDatanodeProtocolService { rpc getDatanodeInfo(GetDatanodeInfoRequestProto) returns(GetDatanodeInfoResponseProto); + rpc getVolumeReport(GetVolumeReportRequestProto) + returns(GetVolumeReportResponseProto); + rpc getReconfigurationStatus(GetReconfigurationStatusRequestProto) returns(GetReconfigurationStatusResponseProto); @@ -207,4 +284,26 @@ service ClientDatanodeProtocolService { */ rpc getBalancerBandwidth(GetBalancerBandwidthRequestProto) returns(GetBalancerBandwidthResponseProto); + + /** + * Submit a disk balancer plan for execution + */ + rpc submitDiskBalancerPlan(SubmitDiskBalancerPlanRequestProto) + returns (SubmitDiskBalancerPlanResponseProto); + /** + * Cancel an executing plan + */ + rpc cancelDiskBalancerPlan(CancelPlanRequestProto) + returns (CancelPlanResponseProto); + + /** + * Gets the status of an executing Plan + */ + rpc queryDiskBalancerPlan(QueryPlanStatusRequestProto) + returns (QueryPlanStatusResponseProto); + /** + * Gets run-time settings of Disk Balancer. + */ + rpc getDiskBalancerSetting(DiskBalancerSettingRequestProto) + returns(DiskBalancerSettingResponseProto); } diff --git a/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go b/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go index 9d8a6000..beb7e3fd 100644 --- a/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go +++ b/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.pb.go @@ -1,100 +1,239 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: ClientNamenodeProtocol.proto package hadoop_hdfs -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" +import ( + hadoop_common "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type CreateFlagProto int32 const ( - CreateFlagProto_CREATE CreateFlagProto = 1 - CreateFlagProto_OVERWRITE CreateFlagProto = 2 - CreateFlagProto_APPEND CreateFlagProto = 4 - CreateFlagProto_LAZY_PERSIST CreateFlagProto = 16 - CreateFlagProto_NEW_BLOCK CreateFlagProto = 32 + CreateFlagProto_CREATE CreateFlagProto = 1 // Create a file + CreateFlagProto_OVERWRITE CreateFlagProto = 2 // Truncate/overwrite a file. Same as POSIX O_TRUNC + CreateFlagProto_APPEND CreateFlagProto = 4 // Append to a file + CreateFlagProto_LAZY_PERSIST CreateFlagProto = 16 // File with reduced durability guarantees. + CreateFlagProto_NEW_BLOCK CreateFlagProto = 32 // Write data to a new block when appending + CreateFlagProto_SHOULD_REPLICATE CreateFlagProto = 128 // Enforce to create a replicate file ) -var CreateFlagProto_name = map[int32]string{ - 1: "CREATE", - 2: "OVERWRITE", - 4: "APPEND", - 16: "LAZY_PERSIST", - 32: "NEW_BLOCK", -} -var CreateFlagProto_value = map[string]int32{ - "CREATE": 1, - "OVERWRITE": 2, - "APPEND": 4, - "LAZY_PERSIST": 16, - "NEW_BLOCK": 32, -} +// Enum value maps for CreateFlagProto. +var ( + CreateFlagProto_name = map[int32]string{ + 1: "CREATE", + 2: "OVERWRITE", + 4: "APPEND", + 16: "LAZY_PERSIST", + 32: "NEW_BLOCK", + 128: "SHOULD_REPLICATE", + } + CreateFlagProto_value = map[string]int32{ + "CREATE": 1, + "OVERWRITE": 2, + "APPEND": 4, + "LAZY_PERSIST": 16, + "NEW_BLOCK": 32, + "SHOULD_REPLICATE": 128, + } +) func (x CreateFlagProto) Enum() *CreateFlagProto { p := new(CreateFlagProto) *p = x return p } + func (x CreateFlagProto) String() string { - return proto.EnumName(CreateFlagProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CreateFlagProto) Descriptor() protoreflect.EnumDescriptor { + return file_ClientNamenodeProtocol_proto_enumTypes[0].Descriptor() +} + +func (CreateFlagProto) Type() protoreflect.EnumType { + return &file_ClientNamenodeProtocol_proto_enumTypes[0] +} + +func (x CreateFlagProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *CreateFlagProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(CreateFlagProto_value, data, "CreateFlagProto") + +// Deprecated: Do not use. +func (x *CreateFlagProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = CreateFlagProto(value) + *x = CreateFlagProto(num) return nil } -func (CreateFlagProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } -type DatanodeReportTypeProto int32 +// Deprecated: Use CreateFlagProto.Descriptor instead. +func (CreateFlagProto) EnumDescriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{0} +} + +type AddBlockFlagProto int32 const ( - DatanodeReportTypeProto_ALL DatanodeReportTypeProto = 1 - DatanodeReportTypeProto_LIVE DatanodeReportTypeProto = 2 - DatanodeReportTypeProto_DEAD DatanodeReportTypeProto = 3 - DatanodeReportTypeProto_DECOMMISSIONING DatanodeReportTypeProto = 4 + AddBlockFlagProto_NO_LOCAL_WRITE AddBlockFlagProto = 1 // avoid writing to local node. + AddBlockFlagProto_IGNORE_CLIENT_LOCALITY AddBlockFlagProto = 2 // write to a random node +) + +// Enum value maps for AddBlockFlagProto. +var ( + AddBlockFlagProto_name = map[int32]string{ + 1: "NO_LOCAL_WRITE", + 2: "IGNORE_CLIENT_LOCALITY", + } + AddBlockFlagProto_value = map[string]int32{ + "NO_LOCAL_WRITE": 1, + "IGNORE_CLIENT_LOCALITY": 2, + } ) -var DatanodeReportTypeProto_name = map[int32]string{ - 1: "ALL", - 2: "LIVE", - 3: "DEAD", - 4: "DECOMMISSIONING", +func (x AddBlockFlagProto) Enum() *AddBlockFlagProto { + p := new(AddBlockFlagProto) + *p = x + return p +} + +func (x AddBlockFlagProto) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AddBlockFlagProto) Descriptor() protoreflect.EnumDescriptor { + return file_ClientNamenodeProtocol_proto_enumTypes[1].Descriptor() +} + +func (AddBlockFlagProto) Type() protoreflect.EnumType { + return &file_ClientNamenodeProtocol_proto_enumTypes[1] +} + +func (x AddBlockFlagProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *AddBlockFlagProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = AddBlockFlagProto(num) + return nil } -var DatanodeReportTypeProto_value = map[string]int32{ - "ALL": 1, - "LIVE": 2, - "DEAD": 3, - "DECOMMISSIONING": 4, + +// Deprecated: Use AddBlockFlagProto.Descriptor instead. +func (AddBlockFlagProto) EnumDescriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{1} } +type DatanodeReportTypeProto int32 + +const ( + DatanodeReportTypeProto_ALL DatanodeReportTypeProto = 1 + DatanodeReportTypeProto_LIVE DatanodeReportTypeProto = 2 + DatanodeReportTypeProto_DEAD DatanodeReportTypeProto = 3 + DatanodeReportTypeProto_DECOMMISSIONING DatanodeReportTypeProto = 4 + DatanodeReportTypeProto_ENTERING_MAINTENANCE DatanodeReportTypeProto = 5 + DatanodeReportTypeProto_IN_MAINTENANCE DatanodeReportTypeProto = 6 +) + +// Enum value maps for DatanodeReportTypeProto. +var ( + DatanodeReportTypeProto_name = map[int32]string{ + 1: "ALL", + 2: "LIVE", + 3: "DEAD", + 4: "DECOMMISSIONING", + 5: "ENTERING_MAINTENANCE", + 6: "IN_MAINTENANCE", + } + DatanodeReportTypeProto_value = map[string]int32{ + "ALL": 1, + "LIVE": 2, + "DEAD": 3, + "DECOMMISSIONING": 4, + "ENTERING_MAINTENANCE": 5, + "IN_MAINTENANCE": 6, + } +) + func (x DatanodeReportTypeProto) Enum() *DatanodeReportTypeProto { p := new(DatanodeReportTypeProto) *p = x return p } + func (x DatanodeReportTypeProto) String() string { - return proto.EnumName(DatanodeReportTypeProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DatanodeReportTypeProto) Descriptor() protoreflect.EnumDescriptor { + return file_ClientNamenodeProtocol_proto_enumTypes[2].Descriptor() +} + +func (DatanodeReportTypeProto) Type() protoreflect.EnumType { + return &file_ClientNamenodeProtocol_proto_enumTypes[2] +} + +func (x DatanodeReportTypeProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *DatanodeReportTypeProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(DatanodeReportTypeProto_value, data, "DatanodeReportTypeProto") + +// Deprecated: Do not use. +func (x *DatanodeReportTypeProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = DatanodeReportTypeProto(value) + *x = DatanodeReportTypeProto(num) return nil } -func (DatanodeReportTypeProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{1} } + +// Deprecated: Use DatanodeReportTypeProto.Descriptor instead. +func (DatanodeReportTypeProto) EnumDescriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{2} +} type SafeModeActionProto int32 @@ -105,36 +244,58 @@ const ( SafeModeActionProto_SAFEMODE_FORCE_EXIT SafeModeActionProto = 4 ) -var SafeModeActionProto_name = map[int32]string{ - 1: "SAFEMODE_LEAVE", - 2: "SAFEMODE_ENTER", - 3: "SAFEMODE_GET", - 4: "SAFEMODE_FORCE_EXIT", -} -var SafeModeActionProto_value = map[string]int32{ - "SAFEMODE_LEAVE": 1, - "SAFEMODE_ENTER": 2, - "SAFEMODE_GET": 3, - "SAFEMODE_FORCE_EXIT": 4, -} +// Enum value maps for SafeModeActionProto. +var ( + SafeModeActionProto_name = map[int32]string{ + 1: "SAFEMODE_LEAVE", + 2: "SAFEMODE_ENTER", + 3: "SAFEMODE_GET", + 4: "SAFEMODE_FORCE_EXIT", + } + SafeModeActionProto_value = map[string]int32{ + "SAFEMODE_LEAVE": 1, + "SAFEMODE_ENTER": 2, + "SAFEMODE_GET": 3, + "SAFEMODE_FORCE_EXIT": 4, + } +) func (x SafeModeActionProto) Enum() *SafeModeActionProto { p := new(SafeModeActionProto) *p = x return p } + func (x SafeModeActionProto) String() string { - return proto.EnumName(SafeModeActionProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (x *SafeModeActionProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(SafeModeActionProto_value, data, "SafeModeActionProto") + +func (SafeModeActionProto) Descriptor() protoreflect.EnumDescriptor { + return file_ClientNamenodeProtocol_proto_enumTypes[3].Descriptor() +} + +func (SafeModeActionProto) Type() protoreflect.EnumType { + return &file_ClientNamenodeProtocol_proto_enumTypes[3] +} + +func (x SafeModeActionProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *SafeModeActionProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = SafeModeActionProto(value) + *x = SafeModeActionProto(num) return nil } -func (SafeModeActionProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{2} } + +// Deprecated: Use SafeModeActionProto.Descriptor instead. +func (SafeModeActionProto) EnumDescriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{3} +} type RollingUpgradeActionProto int32 @@ -144,3767 +305,13346 @@ const ( RollingUpgradeActionProto_FINALIZE RollingUpgradeActionProto = 3 ) -var RollingUpgradeActionProto_name = map[int32]string{ - 1: "QUERY", - 2: "START", - 3: "FINALIZE", -} -var RollingUpgradeActionProto_value = map[string]int32{ - "QUERY": 1, - "START": 2, - "FINALIZE": 3, -} +// Enum value maps for RollingUpgradeActionProto. +var ( + RollingUpgradeActionProto_name = map[int32]string{ + 1: "QUERY", + 2: "START", + 3: "FINALIZE", + } + RollingUpgradeActionProto_value = map[string]int32{ + "QUERY": 1, + "START": 2, + "FINALIZE": 3, + } +) func (x RollingUpgradeActionProto) Enum() *RollingUpgradeActionProto { p := new(RollingUpgradeActionProto) *p = x return p } + func (x RollingUpgradeActionProto) String() string { - return proto.EnumName(RollingUpgradeActionProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RollingUpgradeActionProto) Descriptor() protoreflect.EnumDescriptor { + return file_ClientNamenodeProtocol_proto_enumTypes[4].Descriptor() +} + +func (RollingUpgradeActionProto) Type() protoreflect.EnumType { + return &file_ClientNamenodeProtocol_proto_enumTypes[4] +} + +func (x RollingUpgradeActionProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *RollingUpgradeActionProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RollingUpgradeActionProto_value, data, "RollingUpgradeActionProto") + +// Deprecated: Do not use. +func (x *RollingUpgradeActionProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = RollingUpgradeActionProto(value) + *x = RollingUpgradeActionProto(num) return nil } -func (RollingUpgradeActionProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{3} } + +// Deprecated: Use RollingUpgradeActionProto.Descriptor instead. +func (RollingUpgradeActionProto) EnumDescriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{4} +} type CacheFlagProto int32 const ( - CacheFlagProto_FORCE CacheFlagProto = 1 + CacheFlagProto_FORCE CacheFlagProto = 1 // Ignore pool resource limits ) -var CacheFlagProto_name = map[int32]string{ - 1: "FORCE", -} -var CacheFlagProto_value = map[string]int32{ - "FORCE": 1, -} +// Enum value maps for CacheFlagProto. +var ( + CacheFlagProto_name = map[int32]string{ + 1: "FORCE", + } + CacheFlagProto_value = map[string]int32{ + "FORCE": 1, + } +) func (x CacheFlagProto) Enum() *CacheFlagProto { p := new(CacheFlagProto) *p = x return p } + func (x CacheFlagProto) String() string { - return proto.EnumName(CacheFlagProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CacheFlagProto) Descriptor() protoreflect.EnumDescriptor { + return file_ClientNamenodeProtocol_proto_enumTypes[5].Descriptor() +} + +func (CacheFlagProto) Type() protoreflect.EnumType { + return &file_ClientNamenodeProtocol_proto_enumTypes[5] +} + +func (x CacheFlagProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *CacheFlagProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = CacheFlagProto(num) + return nil +} + +// Deprecated: Use CacheFlagProto.Descriptor instead. +func (CacheFlagProto) EnumDescriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{5} +} + +type OpenFilesTypeProto int32 + +const ( + OpenFilesTypeProto_ALL_OPEN_FILES OpenFilesTypeProto = 1 + OpenFilesTypeProto_BLOCKING_DECOMMISSION OpenFilesTypeProto = 2 +) + +// Enum value maps for OpenFilesTypeProto. +var ( + OpenFilesTypeProto_name = map[int32]string{ + 1: "ALL_OPEN_FILES", + 2: "BLOCKING_DECOMMISSION", + } + OpenFilesTypeProto_value = map[string]int32{ + "ALL_OPEN_FILES": 1, + "BLOCKING_DECOMMISSION": 2, + } +) + +func (x OpenFilesTypeProto) Enum() *OpenFilesTypeProto { + p := new(OpenFilesTypeProto) + *p = x + return p +} + +func (x OpenFilesTypeProto) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OpenFilesTypeProto) Descriptor() protoreflect.EnumDescriptor { + return file_ClientNamenodeProtocol_proto_enumTypes[6].Descriptor() +} + +func (OpenFilesTypeProto) Type() protoreflect.EnumType { + return &file_ClientNamenodeProtocol_proto_enumTypes[6] +} + +func (x OpenFilesTypeProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *CacheFlagProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(CacheFlagProto_value, data, "CacheFlagProto") + +// Deprecated: Do not use. +func (x *OpenFilesTypeProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = CacheFlagProto(value) + *x = OpenFilesTypeProto(num) return nil } -func (CacheFlagProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{4} } + +// Deprecated: Use OpenFilesTypeProto.Descriptor instead. +func (OpenFilesTypeProto) EnumDescriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{6} +} type GetBlockLocationsRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - Offset *uint64 `protobuf:"varint,2,req,name=offset" json:"offset,omitempty"` - Length *uint64 `protobuf:"varint,3,req,name=length" json:"length,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` // file name + Offset *uint64 `protobuf:"varint,2,req,name=offset" json:"offset,omitempty"` // range start offset + Length *uint64 `protobuf:"varint,3,req,name=length" json:"length,omitempty"` // range length +} + +func (x *GetBlockLocationsRequestProto) Reset() { + *x = GetBlockLocationsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockLocationsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockLocationsRequestProto) ProtoMessage() {} + +func (x *GetBlockLocationsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetBlockLocationsRequestProto) Reset() { *m = GetBlockLocationsRequestProto{} } -func (m *GetBlockLocationsRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetBlockLocationsRequestProto) ProtoMessage() {} -func (*GetBlockLocationsRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } +// Deprecated: Use GetBlockLocationsRequestProto.ProtoReflect.Descriptor instead. +func (*GetBlockLocationsRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{0} +} -func (m *GetBlockLocationsRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *GetBlockLocationsRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *GetBlockLocationsRequestProto) GetOffset() uint64 { - if m != nil && m.Offset != nil { - return *m.Offset +func (x *GetBlockLocationsRequestProto) GetOffset() uint64 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (m *GetBlockLocationsRequestProto) GetLength() uint64 { - if m != nil && m.Length != nil { - return *m.Length +func (x *GetBlockLocationsRequestProto) GetLength() uint64 { + if x != nil && x.Length != nil { + return *x.Length } return 0 } type GetBlockLocationsResponseProto struct { - Locations *LocatedBlocksProto `protobuf:"bytes,1,opt,name=locations" json:"locations,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Locations *LocatedBlocksProto `protobuf:"bytes,1,opt,name=locations" json:"locations,omitempty"` +} + +func (x *GetBlockLocationsResponseProto) Reset() { + *x = GetBlockLocationsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockLocationsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockLocationsResponseProto) ProtoMessage() {} + +func (x *GetBlockLocationsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetBlockLocationsResponseProto) Reset() { *m = GetBlockLocationsResponseProto{} } -func (m *GetBlockLocationsResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetBlockLocationsResponseProto) ProtoMessage() {} -func (*GetBlockLocationsResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} } +// Deprecated: Use GetBlockLocationsResponseProto.ProtoReflect.Descriptor instead. +func (*GetBlockLocationsResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{1} +} -func (m *GetBlockLocationsResponseProto) GetLocations() *LocatedBlocksProto { - if m != nil { - return m.Locations +func (x *GetBlockLocationsResponseProto) GetLocations() *LocatedBlocksProto { + if x != nil { + return x.Locations } return nil } type GetServerDefaultsRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetServerDefaultsRequestProto) Reset() { + *x = GetServerDefaultsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetServerDefaultsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetServerDefaultsRequestProto) ProtoMessage() {} + +func (x *GetServerDefaultsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetServerDefaultsRequestProto) Reset() { *m = GetServerDefaultsRequestProto{} } -func (m *GetServerDefaultsRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetServerDefaultsRequestProto) ProtoMessage() {} -func (*GetServerDefaultsRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{2} } +// Deprecated: Use GetServerDefaultsRequestProto.ProtoReflect.Descriptor instead. +func (*GetServerDefaultsRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{2} +} type GetServerDefaultsResponseProto struct { - ServerDefaults *FsServerDefaultsProto `protobuf:"bytes,1,req,name=serverDefaults" json:"serverDefaults,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerDefaults *FsServerDefaultsProto `protobuf:"bytes,1,req,name=serverDefaults" json:"serverDefaults,omitempty"` +} + +func (x *GetServerDefaultsResponseProto) Reset() { + *x = GetServerDefaultsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetServerDefaultsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetServerDefaultsResponseProto) ProtoMessage() {} + +func (x *GetServerDefaultsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetServerDefaultsResponseProto) Reset() { *m = GetServerDefaultsResponseProto{} } -func (m *GetServerDefaultsResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetServerDefaultsResponseProto) ProtoMessage() {} -func (*GetServerDefaultsResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{3} } +// Deprecated: Use GetServerDefaultsResponseProto.ProtoReflect.Descriptor instead. +func (*GetServerDefaultsResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{3} +} -func (m *GetServerDefaultsResponseProto) GetServerDefaults() *FsServerDefaultsProto { - if m != nil { - return m.ServerDefaults +func (x *GetServerDefaultsResponseProto) GetServerDefaults() *FsServerDefaultsProto { + if x != nil { + return x.ServerDefaults } return nil } type CreateRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` Masked *FsPermissionProto `protobuf:"bytes,2,req,name=masked" json:"masked,omitempty"` ClientName *string `protobuf:"bytes,3,req,name=clientName" json:"clientName,omitempty"` - CreateFlag *uint32 `protobuf:"varint,4,req,name=createFlag" json:"createFlag,omitempty"` + CreateFlag *uint32 `protobuf:"varint,4,req,name=createFlag" json:"createFlag,omitempty"` // bits set using CreateFlag CreateParent *bool `protobuf:"varint,5,req,name=createParent" json:"createParent,omitempty"` - Replication *uint32 `protobuf:"varint,6,req,name=replication" json:"replication,omitempty"` + Replication *uint32 `protobuf:"varint,6,req,name=replication" json:"replication,omitempty"` // Short: Only 16 bits used BlockSize *uint64 `protobuf:"varint,7,req,name=blockSize" json:"blockSize,omitempty"` CryptoProtocolVersion []CryptoProtocolVersionProto `protobuf:"varint,8,rep,name=cryptoProtocolVersion,enum=hadoop.hdfs.CryptoProtocolVersionProto" json:"cryptoProtocolVersion,omitempty"` - XXX_unrecognized []byte `json:"-"` + Unmasked *FsPermissionProto `protobuf:"bytes,9,opt,name=unmasked" json:"unmasked,omitempty"` + EcPolicyName *string `protobuf:"bytes,10,opt,name=ecPolicyName" json:"ecPolicyName,omitempty"` + StoragePolicy *string `protobuf:"bytes,11,opt,name=storagePolicy" json:"storagePolicy,omitempty"` +} + +func (x *CreateRequestProto) Reset() { + *x = CreateRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequestProto) ProtoMessage() {} + +func (x *CreateRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *CreateRequestProto) Reset() { *m = CreateRequestProto{} } -func (m *CreateRequestProto) String() string { return proto.CompactTextString(m) } -func (*CreateRequestProto) ProtoMessage() {} -func (*CreateRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{4} } +// Deprecated: Use CreateRequestProto.ProtoReflect.Descriptor instead. +func (*CreateRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{4} +} -func (m *CreateRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *CreateRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *CreateRequestProto) GetMasked() *FsPermissionProto { - if m != nil { - return m.Masked +func (x *CreateRequestProto) GetMasked() *FsPermissionProto { + if x != nil { + return x.Masked } return nil } -func (m *CreateRequestProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName +func (x *CreateRequestProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName } return "" } -func (m *CreateRequestProto) GetCreateFlag() uint32 { - if m != nil && m.CreateFlag != nil { - return *m.CreateFlag +func (x *CreateRequestProto) GetCreateFlag() uint32 { + if x != nil && x.CreateFlag != nil { + return *x.CreateFlag } return 0 } -func (m *CreateRequestProto) GetCreateParent() bool { - if m != nil && m.CreateParent != nil { - return *m.CreateParent +func (x *CreateRequestProto) GetCreateParent() bool { + if x != nil && x.CreateParent != nil { + return *x.CreateParent } return false } -func (m *CreateRequestProto) GetReplication() uint32 { - if m != nil && m.Replication != nil { - return *m.Replication +func (x *CreateRequestProto) GetReplication() uint32 { + if x != nil && x.Replication != nil { + return *x.Replication } return 0 } -func (m *CreateRequestProto) GetBlockSize() uint64 { - if m != nil && m.BlockSize != nil { - return *m.BlockSize +func (x *CreateRequestProto) GetBlockSize() uint64 { + if x != nil && x.BlockSize != nil { + return *x.BlockSize } return 0 } -func (m *CreateRequestProto) GetCryptoProtocolVersion() []CryptoProtocolVersionProto { - if m != nil { - return m.CryptoProtocolVersion +func (x *CreateRequestProto) GetCryptoProtocolVersion() []CryptoProtocolVersionProto { + if x != nil { + return x.CryptoProtocolVersion + } + return nil +} + +func (x *CreateRequestProto) GetUnmasked() *FsPermissionProto { + if x != nil { + return x.Unmasked } return nil } +func (x *CreateRequestProto) GetEcPolicyName() string { + if x != nil && x.EcPolicyName != nil { + return *x.EcPolicyName + } + return "" +} + +func (x *CreateRequestProto) GetStoragePolicy() string { + if x != nil && x.StoragePolicy != nil { + return *x.StoragePolicy + } + return "" +} + type CreateResponseProto struct { - Fs *HdfsFileStatusProto `protobuf:"bytes,1,opt,name=fs" json:"fs,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Fs *HdfsFileStatusProto `protobuf:"bytes,1,opt,name=fs" json:"fs,omitempty"` +} + +func (x *CreateResponseProto) Reset() { + *x = CreateResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateResponseProto) ProtoMessage() {} + +func (x *CreateResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *CreateResponseProto) Reset() { *m = CreateResponseProto{} } -func (m *CreateResponseProto) String() string { return proto.CompactTextString(m) } -func (*CreateResponseProto) ProtoMessage() {} -func (*CreateResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{5} } +// Deprecated: Use CreateResponseProto.ProtoReflect.Descriptor instead. +func (*CreateResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{5} +} -func (m *CreateResponseProto) GetFs() *HdfsFileStatusProto { - if m != nil { - return m.Fs +func (x *CreateResponseProto) GetFs() *HdfsFileStatusProto { + if x != nil { + return x.Fs } return nil } type AppendRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` - Flag *uint32 `protobuf:"varint,3,opt,name=flag" json:"flag,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` + Flag *uint32 `protobuf:"varint,3,opt,name=flag" json:"flag,omitempty"` // bits set using CreateFlag +} + +func (x *AppendRequestProto) Reset() { + *x = AppendRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppendRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppendRequestProto) ProtoMessage() {} + +func (x *AppendRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *AppendRequestProto) Reset() { *m = AppendRequestProto{} } -func (m *AppendRequestProto) String() string { return proto.CompactTextString(m) } -func (*AppendRequestProto) ProtoMessage() {} -func (*AppendRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{6} } +// Deprecated: Use AppendRequestProto.ProtoReflect.Descriptor instead. +func (*AppendRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{6} +} -func (m *AppendRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *AppendRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *AppendRequestProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName +func (x *AppendRequestProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName } return "" } -func (m *AppendRequestProto) GetFlag() uint32 { - if m != nil && m.Flag != nil { - return *m.Flag +func (x *AppendRequestProto) GetFlag() uint32 { + if x != nil && x.Flag != nil { + return *x.Flag } return 0 } type AppendResponseProto struct { - Block *LocatedBlockProto `protobuf:"bytes,1,opt,name=block" json:"block,omitempty"` - Stat *HdfsFileStatusProto `protobuf:"bytes,2,opt,name=stat" json:"stat,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *LocatedBlockProto `protobuf:"bytes,1,opt,name=block" json:"block,omitempty"` + Stat *HdfsFileStatusProto `protobuf:"bytes,2,opt,name=stat" json:"stat,omitempty"` +} + +func (x *AppendResponseProto) Reset() { + *x = AppendResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppendResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppendResponseProto) ProtoMessage() {} + +func (x *AppendResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AppendResponseProto.ProtoReflect.Descriptor instead. +func (*AppendResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{7} } -func (m *AppendResponseProto) Reset() { *m = AppendResponseProto{} } -func (m *AppendResponseProto) String() string { return proto.CompactTextString(m) } -func (*AppendResponseProto) ProtoMessage() {} -func (*AppendResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{7} } +func (x *AppendResponseProto) GetBlock() *LocatedBlockProto { + if x != nil { + return x.Block + } + return nil +} -func (m *AppendResponseProto) GetBlock() *LocatedBlockProto { - if m != nil { - return m.Block +func (x *AppendResponseProto) GetStat() *HdfsFileStatusProto { + if x != nil { + return x.Stat } return nil } -func (m *AppendResponseProto) GetStat() *HdfsFileStatusProto { - if m != nil { - return m.Stat +type SetReplicationRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + Replication *uint32 `protobuf:"varint,2,req,name=replication" json:"replication,omitempty"` // Short: Only 16 bits used +} + +func (x *SetReplicationRequestProto) Reset() { + *x = SetReplicationRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetReplicationRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetReplicationRequestProto) ProtoMessage() {} + +func (x *SetReplicationRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetReplicationRequestProto.ProtoReflect.Descriptor instead. +func (*SetReplicationRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{8} +} + +func (x *SetReplicationRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *SetReplicationRequestProto) GetReplication() uint32 { + if x != nil && x.Replication != nil { + return *x.Replication + } + return 0 +} + +type SetReplicationResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` +} + +func (x *SetReplicationResponseProto) Reset() { + *x = SetReplicationResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetReplicationResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetReplicationResponseProto) ProtoMessage() {} + +func (x *SetReplicationResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetReplicationResponseProto.ProtoReflect.Descriptor instead. +func (*SetReplicationResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{9} +} + +func (x *SetReplicationResponseProto) GetResult() bool { + if x != nil && x.Result != nil { + return *x.Result + } + return false +} + +type SetStoragePolicyRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + PolicyName *string `protobuf:"bytes,2,req,name=policyName" json:"policyName,omitempty"` +} + +func (x *SetStoragePolicyRequestProto) Reset() { + *x = SetStoragePolicyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetStoragePolicyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetStoragePolicyRequestProto) ProtoMessage() {} + +func (x *SetStoragePolicyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetStoragePolicyRequestProto.ProtoReflect.Descriptor instead. +func (*SetStoragePolicyRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{10} +} + +func (x *SetStoragePolicyRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *SetStoragePolicyRequestProto) GetPolicyName() string { + if x != nil && x.PolicyName != nil { + return *x.PolicyName + } + return "" +} + +type SetStoragePolicyResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetStoragePolicyResponseProto) Reset() { + *x = SetStoragePolicyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetStoragePolicyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetStoragePolicyResponseProto) ProtoMessage() {} + +func (x *SetStoragePolicyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetStoragePolicyResponseProto.ProtoReflect.Descriptor instead. +func (*SetStoragePolicyResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{11} +} + +type UnsetStoragePolicyRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` +} + +func (x *UnsetStoragePolicyRequestProto) Reset() { + *x = UnsetStoragePolicyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsetStoragePolicyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsetStoragePolicyRequestProto) ProtoMessage() {} + +func (x *UnsetStoragePolicyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsetStoragePolicyRequestProto.ProtoReflect.Descriptor instead. +func (*UnsetStoragePolicyRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{12} +} + +func (x *UnsetStoragePolicyRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +type UnsetStoragePolicyResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UnsetStoragePolicyResponseProto) Reset() { + *x = UnsetStoragePolicyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsetStoragePolicyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsetStoragePolicyResponseProto) ProtoMessage() {} + +func (x *UnsetStoragePolicyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsetStoragePolicyResponseProto.ProtoReflect.Descriptor instead. +func (*UnsetStoragePolicyResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{13} +} + +type GetStoragePolicyRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` +} + +func (x *GetStoragePolicyRequestProto) Reset() { + *x = GetStoragePolicyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStoragePolicyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStoragePolicyRequestProto) ProtoMessage() {} + +func (x *GetStoragePolicyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStoragePolicyRequestProto.ProtoReflect.Descriptor instead. +func (*GetStoragePolicyRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{14} +} + +func (x *GetStoragePolicyRequestProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path + } + return "" +} + +type GetStoragePolicyResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StoragePolicy *BlockStoragePolicyProto `protobuf:"bytes,1,req,name=storagePolicy" json:"storagePolicy,omitempty"` +} + +func (x *GetStoragePolicyResponseProto) Reset() { + *x = GetStoragePolicyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStoragePolicyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStoragePolicyResponseProto) ProtoMessage() {} + +func (x *GetStoragePolicyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStoragePolicyResponseProto.ProtoReflect.Descriptor instead. +func (*GetStoragePolicyResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{15} +} + +func (x *GetStoragePolicyResponseProto) GetStoragePolicy() *BlockStoragePolicyProto { + if x != nil { + return x.StoragePolicy + } + return nil +} + +type GetStoragePoliciesRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetStoragePoliciesRequestProto) Reset() { + *x = GetStoragePoliciesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStoragePoliciesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStoragePoliciesRequestProto) ProtoMessage() {} + +func (x *GetStoragePoliciesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStoragePoliciesRequestProto.ProtoReflect.Descriptor instead. +func (*GetStoragePoliciesRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{16} +} + +type GetStoragePoliciesResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Policies []*BlockStoragePolicyProto `protobuf:"bytes,1,rep,name=policies" json:"policies,omitempty"` +} + +func (x *GetStoragePoliciesResponseProto) Reset() { + *x = GetStoragePoliciesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStoragePoliciesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStoragePoliciesResponseProto) ProtoMessage() {} + +func (x *GetStoragePoliciesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStoragePoliciesResponseProto.ProtoReflect.Descriptor instead. +func (*GetStoragePoliciesResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{17} +} + +func (x *GetStoragePoliciesResponseProto) GetPolicies() []*BlockStoragePolicyProto { + if x != nil { + return x.Policies + } + return nil +} + +type SetPermissionRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + Permission *FsPermissionProto `protobuf:"bytes,2,req,name=permission" json:"permission,omitempty"` +} + +func (x *SetPermissionRequestProto) Reset() { + *x = SetPermissionRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPermissionRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPermissionRequestProto) ProtoMessage() {} + +func (x *SetPermissionRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPermissionRequestProto.ProtoReflect.Descriptor instead. +func (*SetPermissionRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{18} +} + +func (x *SetPermissionRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *SetPermissionRequestProto) GetPermission() *FsPermissionProto { + if x != nil { + return x.Permission + } + return nil +} + +type SetPermissionResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetPermissionResponseProto) Reset() { + *x = SetPermissionResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPermissionResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPermissionResponseProto) ProtoMessage() {} + +func (x *SetPermissionResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPermissionResponseProto.ProtoReflect.Descriptor instead. +func (*SetPermissionResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{19} +} + +type SetOwnerRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + Username *string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"` + Groupname *string `protobuf:"bytes,3,opt,name=groupname" json:"groupname,omitempty"` +} + +func (x *SetOwnerRequestProto) Reset() { + *x = SetOwnerRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetOwnerRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetOwnerRequestProto) ProtoMessage() {} + +func (x *SetOwnerRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetOwnerRequestProto.ProtoReflect.Descriptor instead. +func (*SetOwnerRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{20} +} + +func (x *SetOwnerRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *SetOwnerRequestProto) GetUsername() string { + if x != nil && x.Username != nil { + return *x.Username + } + return "" +} + +func (x *SetOwnerRequestProto) GetGroupname() string { + if x != nil && x.Groupname != nil { + return *x.Groupname + } + return "" +} + +type SetOwnerResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetOwnerResponseProto) Reset() { + *x = SetOwnerResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetOwnerResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetOwnerResponseProto) ProtoMessage() {} + +func (x *SetOwnerResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetOwnerResponseProto.ProtoReflect.Descriptor instead. +func (*SetOwnerResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{21} +} + +type AbandonBlockRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + B *ExtendedBlockProto `protobuf:"bytes,1,req,name=b" json:"b,omitempty"` + Src *string `protobuf:"bytes,2,req,name=src" json:"src,omitempty"` + Holder *string `protobuf:"bytes,3,req,name=holder" json:"holder,omitempty"` + FileId *uint64 `protobuf:"varint,4,opt,name=fileId,def=0" json:"fileId,omitempty"` // default to GRANDFATHER_INODE_ID +} + +// Default values for AbandonBlockRequestProto fields. +const ( + Default_AbandonBlockRequestProto_FileId = uint64(0) +) + +func (x *AbandonBlockRequestProto) Reset() { + *x = AbandonBlockRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AbandonBlockRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AbandonBlockRequestProto) ProtoMessage() {} + +func (x *AbandonBlockRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AbandonBlockRequestProto.ProtoReflect.Descriptor instead. +func (*AbandonBlockRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{22} +} + +func (x *AbandonBlockRequestProto) GetB() *ExtendedBlockProto { + if x != nil { + return x.B + } + return nil +} + +func (x *AbandonBlockRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *AbandonBlockRequestProto) GetHolder() string { + if x != nil && x.Holder != nil { + return *x.Holder + } + return "" +} + +func (x *AbandonBlockRequestProto) GetFileId() uint64 { + if x != nil && x.FileId != nil { + return *x.FileId + } + return Default_AbandonBlockRequestProto_FileId +} + +type AbandonBlockResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AbandonBlockResponseProto) Reset() { + *x = AbandonBlockResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AbandonBlockResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AbandonBlockResponseProto) ProtoMessage() {} + +func (x *AbandonBlockResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AbandonBlockResponseProto.ProtoReflect.Descriptor instead. +func (*AbandonBlockResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{23} +} + +type AddBlockRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` + Previous *ExtendedBlockProto `protobuf:"bytes,3,opt,name=previous" json:"previous,omitempty"` + ExcludeNodes []*DatanodeInfoProto `protobuf:"bytes,4,rep,name=excludeNodes" json:"excludeNodes,omitempty"` + FileId *uint64 `protobuf:"varint,5,opt,name=fileId,def=0" json:"fileId,omitempty"` // default as a bogus id + FavoredNodes []string `protobuf:"bytes,6,rep,name=favoredNodes" json:"favoredNodes,omitempty"` //the set of datanodes to use for the block + Flags []AddBlockFlagProto `protobuf:"varint,7,rep,name=flags,enum=hadoop.hdfs.AddBlockFlagProto" json:"flags,omitempty"` // default to empty. +} + +// Default values for AddBlockRequestProto fields. +const ( + Default_AddBlockRequestProto_FileId = uint64(0) +) + +func (x *AddBlockRequestProto) Reset() { + *x = AddBlockRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddBlockRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddBlockRequestProto) ProtoMessage() {} + +func (x *AddBlockRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddBlockRequestProto.ProtoReflect.Descriptor instead. +func (*AddBlockRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{24} +} + +func (x *AddBlockRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *AddBlockRequestProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName + } + return "" +} + +func (x *AddBlockRequestProto) GetPrevious() *ExtendedBlockProto { + if x != nil { + return x.Previous + } + return nil +} + +func (x *AddBlockRequestProto) GetExcludeNodes() []*DatanodeInfoProto { + if x != nil { + return x.ExcludeNodes + } + return nil +} + +func (x *AddBlockRequestProto) GetFileId() uint64 { + if x != nil && x.FileId != nil { + return *x.FileId + } + return Default_AddBlockRequestProto_FileId +} + +func (x *AddBlockRequestProto) GetFavoredNodes() []string { + if x != nil { + return x.FavoredNodes + } + return nil +} + +func (x *AddBlockRequestProto) GetFlags() []AddBlockFlagProto { + if x != nil { + return x.Flags + } + return nil +} + +type AddBlockResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *LocatedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` +} + +func (x *AddBlockResponseProto) Reset() { + *x = AddBlockResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddBlockResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddBlockResponseProto) ProtoMessage() {} + +func (x *AddBlockResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddBlockResponseProto.ProtoReflect.Descriptor instead. +func (*AddBlockResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{25} +} + +func (x *AddBlockResponseProto) GetBlock() *LocatedBlockProto { + if x != nil { + return x.Block + } + return nil +} + +type GetAdditionalDatanodeRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + Blk *ExtendedBlockProto `protobuf:"bytes,2,req,name=blk" json:"blk,omitempty"` + Existings []*DatanodeInfoProto `protobuf:"bytes,3,rep,name=existings" json:"existings,omitempty"` + Excludes []*DatanodeInfoProto `protobuf:"bytes,4,rep,name=excludes" json:"excludes,omitempty"` + NumAdditionalNodes *uint32 `protobuf:"varint,5,req,name=numAdditionalNodes" json:"numAdditionalNodes,omitempty"` + ClientName *string `protobuf:"bytes,6,req,name=clientName" json:"clientName,omitempty"` + ExistingStorageUuids []string `protobuf:"bytes,7,rep,name=existingStorageUuids" json:"existingStorageUuids,omitempty"` + FileId *uint64 `protobuf:"varint,8,opt,name=fileId,def=0" json:"fileId,omitempty"` // default to GRANDFATHER_INODE_ID +} + +// Default values for GetAdditionalDatanodeRequestProto fields. +const ( + Default_GetAdditionalDatanodeRequestProto_FileId = uint64(0) +) + +func (x *GetAdditionalDatanodeRequestProto) Reset() { + *x = GetAdditionalDatanodeRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAdditionalDatanodeRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAdditionalDatanodeRequestProto) ProtoMessage() {} + +func (x *GetAdditionalDatanodeRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAdditionalDatanodeRequestProto.ProtoReflect.Descriptor instead. +func (*GetAdditionalDatanodeRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{26} +} + +func (x *GetAdditionalDatanodeRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *GetAdditionalDatanodeRequestProto) GetBlk() *ExtendedBlockProto { + if x != nil { + return x.Blk + } + return nil +} + +func (x *GetAdditionalDatanodeRequestProto) GetExistings() []*DatanodeInfoProto { + if x != nil { + return x.Existings + } + return nil +} + +func (x *GetAdditionalDatanodeRequestProto) GetExcludes() []*DatanodeInfoProto { + if x != nil { + return x.Excludes + } + return nil +} + +func (x *GetAdditionalDatanodeRequestProto) GetNumAdditionalNodes() uint32 { + if x != nil && x.NumAdditionalNodes != nil { + return *x.NumAdditionalNodes + } + return 0 +} + +func (x *GetAdditionalDatanodeRequestProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName + } + return "" +} + +func (x *GetAdditionalDatanodeRequestProto) GetExistingStorageUuids() []string { + if x != nil { + return x.ExistingStorageUuids + } + return nil +} + +func (x *GetAdditionalDatanodeRequestProto) GetFileId() uint64 { + if x != nil && x.FileId != nil { + return *x.FileId + } + return Default_GetAdditionalDatanodeRequestProto_FileId +} + +type GetAdditionalDatanodeResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *LocatedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` +} + +func (x *GetAdditionalDatanodeResponseProto) Reset() { + *x = GetAdditionalDatanodeResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAdditionalDatanodeResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAdditionalDatanodeResponseProto) ProtoMessage() {} + +func (x *GetAdditionalDatanodeResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAdditionalDatanodeResponseProto.ProtoReflect.Descriptor instead. +func (*GetAdditionalDatanodeResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{27} +} + +func (x *GetAdditionalDatanodeResponseProto) GetBlock() *LocatedBlockProto { + if x != nil { + return x.Block + } + return nil +} + +type CompleteRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` + Last *ExtendedBlockProto `protobuf:"bytes,3,opt,name=last" json:"last,omitempty"` + FileId *uint64 `protobuf:"varint,4,opt,name=fileId,def=0" json:"fileId,omitempty"` // default to GRANDFATHER_INODE_ID +} + +// Default values for CompleteRequestProto fields. +const ( + Default_CompleteRequestProto_FileId = uint64(0) +) + +func (x *CompleteRequestProto) Reset() { + *x = CompleteRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompleteRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompleteRequestProto) ProtoMessage() {} + +func (x *CompleteRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompleteRequestProto.ProtoReflect.Descriptor instead. +func (*CompleteRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{28} +} + +func (x *CompleteRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *CompleteRequestProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName + } + return "" +} + +func (x *CompleteRequestProto) GetLast() *ExtendedBlockProto { + if x != nil { + return x.Last + } + return nil +} + +func (x *CompleteRequestProto) GetFileId() uint64 { + if x != nil && x.FileId != nil { + return *x.FileId + } + return Default_CompleteRequestProto_FileId +} + +type CompleteResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` +} + +func (x *CompleteResponseProto) Reset() { + *x = CompleteResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompleteResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompleteResponseProto) ProtoMessage() {} + +func (x *CompleteResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompleteResponseProto.ProtoReflect.Descriptor instead. +func (*CompleteResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{29} +} + +func (x *CompleteResponseProto) GetResult() bool { + if x != nil && x.Result != nil { + return *x.Result + } + return false +} + +type ReportBadBlocksRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Blocks []*LocatedBlockProto `protobuf:"bytes,1,rep,name=blocks" json:"blocks,omitempty"` +} + +func (x *ReportBadBlocksRequestProto) Reset() { + *x = ReportBadBlocksRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReportBadBlocksRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportBadBlocksRequestProto) ProtoMessage() {} + +func (x *ReportBadBlocksRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReportBadBlocksRequestProto.ProtoReflect.Descriptor instead. +func (*ReportBadBlocksRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{30} +} + +func (x *ReportBadBlocksRequestProto) GetBlocks() []*LocatedBlockProto { + if x != nil { + return x.Blocks + } + return nil +} + +type ReportBadBlocksResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReportBadBlocksResponseProto) Reset() { + *x = ReportBadBlocksResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReportBadBlocksResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportBadBlocksResponseProto) ProtoMessage() {} + +func (x *ReportBadBlocksResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReportBadBlocksResponseProto.ProtoReflect.Descriptor instead. +func (*ReportBadBlocksResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{31} +} + +type ConcatRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Trg *string `protobuf:"bytes,1,req,name=trg" json:"trg,omitempty"` + Srcs []string `protobuf:"bytes,2,rep,name=srcs" json:"srcs,omitempty"` +} + +func (x *ConcatRequestProto) Reset() { + *x = ConcatRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConcatRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConcatRequestProto) ProtoMessage() {} + +func (x *ConcatRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConcatRequestProto.ProtoReflect.Descriptor instead. +func (*ConcatRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{32} +} + +func (x *ConcatRequestProto) GetTrg() string { + if x != nil && x.Trg != nil { + return *x.Trg + } + return "" +} + +func (x *ConcatRequestProto) GetSrcs() []string { + if x != nil { + return x.Srcs + } + return nil +} + +type ConcatResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ConcatResponseProto) Reset() { + *x = ConcatResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConcatResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConcatResponseProto) ProtoMessage() {} + +func (x *ConcatResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConcatResponseProto.ProtoReflect.Descriptor instead. +func (*ConcatResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{33} +} + +type TruncateRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + NewLength *uint64 `protobuf:"varint,2,req,name=newLength" json:"newLength,omitempty"` + ClientName *string `protobuf:"bytes,3,req,name=clientName" json:"clientName,omitempty"` +} + +func (x *TruncateRequestProto) Reset() { + *x = TruncateRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TruncateRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TruncateRequestProto) ProtoMessage() {} + +func (x *TruncateRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TruncateRequestProto.ProtoReflect.Descriptor instead. +func (*TruncateRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{34} +} + +func (x *TruncateRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *TruncateRequestProto) GetNewLength() uint64 { + if x != nil && x.NewLength != nil { + return *x.NewLength + } + return 0 +} + +func (x *TruncateRequestProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName + } + return "" +} + +type TruncateResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` +} + +func (x *TruncateResponseProto) Reset() { + *x = TruncateResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TruncateResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TruncateResponseProto) ProtoMessage() {} + +func (x *TruncateResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TruncateResponseProto.ProtoReflect.Descriptor instead. +func (*TruncateResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{35} +} + +func (x *TruncateResponseProto) GetResult() bool { + if x != nil && x.Result != nil { + return *x.Result + } + return false +} + +type RenameRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + Dst *string `protobuf:"bytes,2,req,name=dst" json:"dst,omitempty"` +} + +func (x *RenameRequestProto) Reset() { + *x = RenameRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RenameRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenameRequestProto) ProtoMessage() {} + +func (x *RenameRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenameRequestProto.ProtoReflect.Descriptor instead. +func (*RenameRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{36} +} + +func (x *RenameRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *RenameRequestProto) GetDst() string { + if x != nil && x.Dst != nil { + return *x.Dst + } + return "" +} + +type RenameResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` +} + +func (x *RenameResponseProto) Reset() { + *x = RenameResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RenameResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenameResponseProto) ProtoMessage() {} + +func (x *RenameResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenameResponseProto.ProtoReflect.Descriptor instead. +func (*RenameResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{37} +} + +func (x *RenameResponseProto) GetResult() bool { + if x != nil && x.Result != nil { + return *x.Result + } + return false +} + +type Rename2RequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + Dst *string `protobuf:"bytes,2,req,name=dst" json:"dst,omitempty"` + OverwriteDest *bool `protobuf:"varint,3,req,name=overwriteDest" json:"overwriteDest,omitempty"` + MoveToTrash *bool `protobuf:"varint,4,opt,name=moveToTrash" json:"moveToTrash,omitempty"` +} + +func (x *Rename2RequestProto) Reset() { + *x = Rename2RequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Rename2RequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Rename2RequestProto) ProtoMessage() {} + +func (x *Rename2RequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Rename2RequestProto.ProtoReflect.Descriptor instead. +func (*Rename2RequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{38} +} + +func (x *Rename2RequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *Rename2RequestProto) GetDst() string { + if x != nil && x.Dst != nil { + return *x.Dst + } + return "" +} + +func (x *Rename2RequestProto) GetOverwriteDest() bool { + if x != nil && x.OverwriteDest != nil { + return *x.OverwriteDest + } + return false +} + +func (x *Rename2RequestProto) GetMoveToTrash() bool { + if x != nil && x.MoveToTrash != nil { + return *x.MoveToTrash + } + return false +} + +type Rename2ResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Rename2ResponseProto) Reset() { + *x = Rename2ResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Rename2ResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Rename2ResponseProto) ProtoMessage() {} + +func (x *Rename2ResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Rename2ResponseProto.ProtoReflect.Descriptor instead. +func (*Rename2ResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{39} +} + +type DeleteRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + Recursive *bool `protobuf:"varint,2,req,name=recursive" json:"recursive,omitempty"` +} + +func (x *DeleteRequestProto) Reset() { + *x = DeleteRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRequestProto) ProtoMessage() {} + +func (x *DeleteRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRequestProto.ProtoReflect.Descriptor instead. +func (*DeleteRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{40} +} + +func (x *DeleteRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *DeleteRequestProto) GetRecursive() bool { + if x != nil && x.Recursive != nil { + return *x.Recursive + } + return false +} + +type DeleteResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` +} + +func (x *DeleteResponseProto) Reset() { + *x = DeleteResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResponseProto) ProtoMessage() {} + +func (x *DeleteResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteResponseProto.ProtoReflect.Descriptor instead. +func (*DeleteResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{41} +} + +func (x *DeleteResponseProto) GetResult() bool { + if x != nil && x.Result != nil { + return *x.Result + } + return false +} + +type MkdirsRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + Masked *FsPermissionProto `protobuf:"bytes,2,req,name=masked" json:"masked,omitempty"` + CreateParent *bool `protobuf:"varint,3,req,name=createParent" json:"createParent,omitempty"` + Unmasked *FsPermissionProto `protobuf:"bytes,4,opt,name=unmasked" json:"unmasked,omitempty"` +} + +func (x *MkdirsRequestProto) Reset() { + *x = MkdirsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirsRequestProto) ProtoMessage() {} + +func (x *MkdirsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MkdirsRequestProto.ProtoReflect.Descriptor instead. +func (*MkdirsRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{42} +} + +func (x *MkdirsRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *MkdirsRequestProto) GetMasked() *FsPermissionProto { + if x != nil { + return x.Masked + } + return nil +} + +func (x *MkdirsRequestProto) GetCreateParent() bool { + if x != nil && x.CreateParent != nil { + return *x.CreateParent + } + return false +} + +func (x *MkdirsRequestProto) GetUnmasked() *FsPermissionProto { + if x != nil { + return x.Unmasked + } + return nil +} + +type MkdirsResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` +} + +func (x *MkdirsResponseProto) Reset() { + *x = MkdirsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirsResponseProto) ProtoMessage() {} + +func (x *MkdirsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MkdirsResponseProto.ProtoReflect.Descriptor instead. +func (*MkdirsResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{43} +} + +func (x *MkdirsResponseProto) GetResult() bool { + if x != nil && x.Result != nil { + return *x.Result + } + return false +} + +type GetListingRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + StartAfter []byte `protobuf:"bytes,2,req,name=startAfter" json:"startAfter,omitempty"` + NeedLocation *bool `protobuf:"varint,3,req,name=needLocation" json:"needLocation,omitempty"` +} + +func (x *GetListingRequestProto) Reset() { + *x = GetListingRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetListingRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetListingRequestProto) ProtoMessage() {} + +func (x *GetListingRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetListingRequestProto.ProtoReflect.Descriptor instead. +func (*GetListingRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{44} +} + +func (x *GetListingRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *GetListingRequestProto) GetStartAfter() []byte { + if x != nil { + return x.StartAfter + } + return nil +} + +func (x *GetListingRequestProto) GetNeedLocation() bool { + if x != nil && x.NeedLocation != nil { + return *x.NeedLocation + } + return false +} + +type GetListingResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DirList *DirectoryListingProto `protobuf:"bytes,1,opt,name=dirList" json:"dirList,omitempty"` +} + +func (x *GetListingResponseProto) Reset() { + *x = GetListingResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetListingResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetListingResponseProto) ProtoMessage() {} + +func (x *GetListingResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetListingResponseProto.ProtoReflect.Descriptor instead. +func (*GetListingResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{45} +} + +func (x *GetListingResponseProto) GetDirList() *DirectoryListingProto { + if x != nil { + return x.DirList + } + return nil +} + +type GetBatchedListingRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Paths []string `protobuf:"bytes,1,rep,name=paths" json:"paths,omitempty"` + StartAfter []byte `protobuf:"bytes,2,req,name=startAfter" json:"startAfter,omitempty"` + NeedLocation *bool `protobuf:"varint,3,req,name=needLocation" json:"needLocation,omitempty"` +} + +func (x *GetBatchedListingRequestProto) Reset() { + *x = GetBatchedListingRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBatchedListingRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBatchedListingRequestProto) ProtoMessage() {} + +func (x *GetBatchedListingRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBatchedListingRequestProto.ProtoReflect.Descriptor instead. +func (*GetBatchedListingRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{46} +} + +func (x *GetBatchedListingRequestProto) GetPaths() []string { + if x != nil { + return x.Paths + } + return nil +} + +func (x *GetBatchedListingRequestProto) GetStartAfter() []byte { + if x != nil { + return x.StartAfter + } + return nil +} + +func (x *GetBatchedListingRequestProto) GetNeedLocation() bool { + if x != nil && x.NeedLocation != nil { + return *x.NeedLocation + } + return false +} + +type GetBatchedListingResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Listings []*BatchedDirectoryListingProto `protobuf:"bytes,1,rep,name=listings" json:"listings,omitempty"` + HasMore *bool `protobuf:"varint,2,req,name=hasMore" json:"hasMore,omitempty"` + StartAfter []byte `protobuf:"bytes,3,req,name=startAfter" json:"startAfter,omitempty"` +} + +func (x *GetBatchedListingResponseProto) Reset() { + *x = GetBatchedListingResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBatchedListingResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBatchedListingResponseProto) ProtoMessage() {} + +func (x *GetBatchedListingResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBatchedListingResponseProto.ProtoReflect.Descriptor instead. +func (*GetBatchedListingResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{47} +} + +func (x *GetBatchedListingResponseProto) GetListings() []*BatchedDirectoryListingProto { + if x != nil { + return x.Listings + } + return nil +} + +func (x *GetBatchedListingResponseProto) GetHasMore() bool { + if x != nil && x.HasMore != nil { + return *x.HasMore + } + return false +} + +func (x *GetBatchedListingResponseProto) GetStartAfter() []byte { + if x != nil { + return x.StartAfter + } + return nil +} + +type GetSnapshottableDirListingRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetSnapshottableDirListingRequestProto) Reset() { + *x = GetSnapshottableDirListingRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSnapshottableDirListingRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSnapshottableDirListingRequestProto) ProtoMessage() {} + +func (x *GetSnapshottableDirListingRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSnapshottableDirListingRequestProto.ProtoReflect.Descriptor instead. +func (*GetSnapshottableDirListingRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{48} +} + +type GetSnapshottableDirListingResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnapshottableDirList *SnapshottableDirectoryListingProto `protobuf:"bytes,1,opt,name=snapshottableDirList" json:"snapshottableDirList,omitempty"` +} + +func (x *GetSnapshottableDirListingResponseProto) Reset() { + *x = GetSnapshottableDirListingResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSnapshottableDirListingResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSnapshottableDirListingResponseProto) ProtoMessage() {} + +func (x *GetSnapshottableDirListingResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[49] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSnapshottableDirListingResponseProto.ProtoReflect.Descriptor instead. +func (*GetSnapshottableDirListingResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{49} +} + +func (x *GetSnapshottableDirListingResponseProto) GetSnapshottableDirList() *SnapshottableDirectoryListingProto { + if x != nil { + return x.SnapshottableDirList + } + return nil +} + +type GetSnapshotDiffReportRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` + FromSnapshot *string `protobuf:"bytes,2,req,name=fromSnapshot" json:"fromSnapshot,omitempty"` + ToSnapshot *string `protobuf:"bytes,3,req,name=toSnapshot" json:"toSnapshot,omitempty"` +} + +func (x *GetSnapshotDiffReportRequestProto) Reset() { + *x = GetSnapshotDiffReportRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSnapshotDiffReportRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSnapshotDiffReportRequestProto) ProtoMessage() {} + +func (x *GetSnapshotDiffReportRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[50] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSnapshotDiffReportRequestProto.ProtoReflect.Descriptor instead. +func (*GetSnapshotDiffReportRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{50} +} + +func (x *GetSnapshotDiffReportRequestProto) GetSnapshotRoot() string { + if x != nil && x.SnapshotRoot != nil { + return *x.SnapshotRoot + } + return "" +} + +func (x *GetSnapshotDiffReportRequestProto) GetFromSnapshot() string { + if x != nil && x.FromSnapshot != nil { + return *x.FromSnapshot + } + return "" +} + +func (x *GetSnapshotDiffReportRequestProto) GetToSnapshot() string { + if x != nil && x.ToSnapshot != nil { + return *x.ToSnapshot + } + return "" +} + +type GetSnapshotDiffReportResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DiffReport *SnapshotDiffReportProto `protobuf:"bytes,1,req,name=diffReport" json:"diffReport,omitempty"` +} + +func (x *GetSnapshotDiffReportResponseProto) Reset() { + *x = GetSnapshotDiffReportResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSnapshotDiffReportResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSnapshotDiffReportResponseProto) ProtoMessage() {} + +func (x *GetSnapshotDiffReportResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[51] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSnapshotDiffReportResponseProto.ProtoReflect.Descriptor instead. +func (*GetSnapshotDiffReportResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{51} +} + +func (x *GetSnapshotDiffReportResponseProto) GetDiffReport() *SnapshotDiffReportProto { + if x != nil { + return x.DiffReport + } + return nil +} + +type GetSnapshotDiffReportListingRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` + FromSnapshot *string `protobuf:"bytes,2,req,name=fromSnapshot" json:"fromSnapshot,omitempty"` + ToSnapshot *string `protobuf:"bytes,3,req,name=toSnapshot" json:"toSnapshot,omitempty"` + Cursor *SnapshotDiffReportCursorProto `protobuf:"bytes,4,opt,name=cursor" json:"cursor,omitempty"` +} + +func (x *GetSnapshotDiffReportListingRequestProto) Reset() { + *x = GetSnapshotDiffReportListingRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSnapshotDiffReportListingRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSnapshotDiffReportListingRequestProto) ProtoMessage() {} + +func (x *GetSnapshotDiffReportListingRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[52] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSnapshotDiffReportListingRequestProto.ProtoReflect.Descriptor instead. +func (*GetSnapshotDiffReportListingRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{52} +} + +func (x *GetSnapshotDiffReportListingRequestProto) GetSnapshotRoot() string { + if x != nil && x.SnapshotRoot != nil { + return *x.SnapshotRoot + } + return "" +} + +func (x *GetSnapshotDiffReportListingRequestProto) GetFromSnapshot() string { + if x != nil && x.FromSnapshot != nil { + return *x.FromSnapshot + } + return "" +} + +func (x *GetSnapshotDiffReportListingRequestProto) GetToSnapshot() string { + if x != nil && x.ToSnapshot != nil { + return *x.ToSnapshot + } + return "" +} + +func (x *GetSnapshotDiffReportListingRequestProto) GetCursor() *SnapshotDiffReportCursorProto { + if x != nil { + return x.Cursor + } + return nil +} + +type GetSnapshotDiffReportListingResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DiffReport *SnapshotDiffReportListingProto `protobuf:"bytes,1,req,name=diffReport" json:"diffReport,omitempty"` +} + +func (x *GetSnapshotDiffReportListingResponseProto) Reset() { + *x = GetSnapshotDiffReportListingResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSnapshotDiffReportListingResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSnapshotDiffReportListingResponseProto) ProtoMessage() {} + +func (x *GetSnapshotDiffReportListingResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[53] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSnapshotDiffReportListingResponseProto.ProtoReflect.Descriptor instead. +func (*GetSnapshotDiffReportListingResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{53} +} + +func (x *GetSnapshotDiffReportListingResponseProto) GetDiffReport() *SnapshotDiffReportListingProto { + if x != nil { + return x.DiffReport + } + return nil +} + +type RenewLeaseRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientName *string `protobuf:"bytes,1,req,name=clientName" json:"clientName,omitempty"` +} + +func (x *RenewLeaseRequestProto) Reset() { + *x = RenewLeaseRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RenewLeaseRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenewLeaseRequestProto) ProtoMessage() {} + +func (x *RenewLeaseRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[54] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenewLeaseRequestProto.ProtoReflect.Descriptor instead. +func (*RenewLeaseRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{54} +} + +func (x *RenewLeaseRequestProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName + } + return "" +} + +type RenewLeaseResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RenewLeaseResponseProto) Reset() { + *x = RenewLeaseResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RenewLeaseResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenewLeaseResponseProto) ProtoMessage() {} + +func (x *RenewLeaseResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[55] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenewLeaseResponseProto.ProtoReflect.Descriptor instead. +func (*RenewLeaseResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{55} +} + +type RecoverLeaseRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` +} + +func (x *RecoverLeaseRequestProto) Reset() { + *x = RecoverLeaseRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecoverLeaseRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecoverLeaseRequestProto) ProtoMessage() {} + +func (x *RecoverLeaseRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecoverLeaseRequestProto.ProtoReflect.Descriptor instead. +func (*RecoverLeaseRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{56} +} + +func (x *RecoverLeaseRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *RecoverLeaseRequestProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName + } + return "" +} + +type RecoverLeaseResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` +} + +func (x *RecoverLeaseResponseProto) Reset() { + *x = RecoverLeaseResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecoverLeaseResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecoverLeaseResponseProto) ProtoMessage() {} + +func (x *RecoverLeaseResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[57] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecoverLeaseResponseProto.ProtoReflect.Descriptor instead. +func (*RecoverLeaseResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{57} +} + +func (x *RecoverLeaseResponseProto) GetResult() bool { + if x != nil && x.Result != nil { + return *x.Result + } + return false +} + +type GetFsStatusRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetFsStatusRequestProto) Reset() { + *x = GetFsStatusRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFsStatusRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFsStatusRequestProto) ProtoMessage() {} + +func (x *GetFsStatusRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[58] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFsStatusRequestProto.ProtoReflect.Descriptor instead. +func (*GetFsStatusRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{58} +} + +type GetFsStatsResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Capacity *uint64 `protobuf:"varint,1,req,name=capacity" json:"capacity,omitempty"` + Used *uint64 `protobuf:"varint,2,req,name=used" json:"used,omitempty"` + Remaining *uint64 `protobuf:"varint,3,req,name=remaining" json:"remaining,omitempty"` + UnderReplicated *uint64 `protobuf:"varint,4,req,name=under_replicated,json=underReplicated" json:"under_replicated,omitempty"` + CorruptBlocks *uint64 `protobuf:"varint,5,req,name=corrupt_blocks,json=corruptBlocks" json:"corrupt_blocks,omitempty"` + MissingBlocks *uint64 `protobuf:"varint,6,req,name=missing_blocks,json=missingBlocks" json:"missing_blocks,omitempty"` + MissingReplOneBlocks *uint64 `protobuf:"varint,7,opt,name=missing_repl_one_blocks,json=missingReplOneBlocks" json:"missing_repl_one_blocks,omitempty"` + BlocksInFuture *uint64 `protobuf:"varint,8,opt,name=blocks_in_future,json=blocksInFuture" json:"blocks_in_future,omitempty"` + PendingDeletionBlocks *uint64 `protobuf:"varint,9,opt,name=pending_deletion_blocks,json=pendingDeletionBlocks" json:"pending_deletion_blocks,omitempty"` +} + +func (x *GetFsStatsResponseProto) Reset() { + *x = GetFsStatsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFsStatsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFsStatsResponseProto) ProtoMessage() {} + +func (x *GetFsStatsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[59] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFsStatsResponseProto.ProtoReflect.Descriptor instead. +func (*GetFsStatsResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{59} +} + +func (x *GetFsStatsResponseProto) GetCapacity() uint64 { + if x != nil && x.Capacity != nil { + return *x.Capacity + } + return 0 +} + +func (x *GetFsStatsResponseProto) GetUsed() uint64 { + if x != nil && x.Used != nil { + return *x.Used + } + return 0 +} + +func (x *GetFsStatsResponseProto) GetRemaining() uint64 { + if x != nil && x.Remaining != nil { + return *x.Remaining + } + return 0 +} + +func (x *GetFsStatsResponseProto) GetUnderReplicated() uint64 { + if x != nil && x.UnderReplicated != nil { + return *x.UnderReplicated + } + return 0 +} + +func (x *GetFsStatsResponseProto) GetCorruptBlocks() uint64 { + if x != nil && x.CorruptBlocks != nil { + return *x.CorruptBlocks + } + return 0 +} + +func (x *GetFsStatsResponseProto) GetMissingBlocks() uint64 { + if x != nil && x.MissingBlocks != nil { + return *x.MissingBlocks + } + return 0 +} + +func (x *GetFsStatsResponseProto) GetMissingReplOneBlocks() uint64 { + if x != nil && x.MissingReplOneBlocks != nil { + return *x.MissingReplOneBlocks + } + return 0 +} + +func (x *GetFsStatsResponseProto) GetBlocksInFuture() uint64 { + if x != nil && x.BlocksInFuture != nil { + return *x.BlocksInFuture + } + return 0 +} + +func (x *GetFsStatsResponseProto) GetPendingDeletionBlocks() uint64 { + if x != nil && x.PendingDeletionBlocks != nil { + return *x.PendingDeletionBlocks + } + return 0 +} + +type GetFsReplicatedBlockStatsRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetFsReplicatedBlockStatsRequestProto) Reset() { + *x = GetFsReplicatedBlockStatsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFsReplicatedBlockStatsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFsReplicatedBlockStatsRequestProto) ProtoMessage() {} + +func (x *GetFsReplicatedBlockStatsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[60] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFsReplicatedBlockStatsRequestProto.ProtoReflect.Descriptor instead. +func (*GetFsReplicatedBlockStatsRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{60} +} + +type GetFsReplicatedBlockStatsResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LowRedundancy *uint64 `protobuf:"varint,1,req,name=low_redundancy,json=lowRedundancy" json:"low_redundancy,omitempty"` + CorruptBlocks *uint64 `protobuf:"varint,2,req,name=corrupt_blocks,json=corruptBlocks" json:"corrupt_blocks,omitempty"` + MissingBlocks *uint64 `protobuf:"varint,3,req,name=missing_blocks,json=missingBlocks" json:"missing_blocks,omitempty"` + MissingReplOneBlocks *uint64 `protobuf:"varint,4,req,name=missing_repl_one_blocks,json=missingReplOneBlocks" json:"missing_repl_one_blocks,omitempty"` + BlocksInFuture *uint64 `protobuf:"varint,5,req,name=blocks_in_future,json=blocksInFuture" json:"blocks_in_future,omitempty"` + PendingDeletionBlocks *uint64 `protobuf:"varint,6,req,name=pending_deletion_blocks,json=pendingDeletionBlocks" json:"pending_deletion_blocks,omitempty"` + HighestPrioLowRedundancyBlocks *uint64 `protobuf:"varint,7,opt,name=highest_prio_low_redundancy_blocks,json=highestPrioLowRedundancyBlocks" json:"highest_prio_low_redundancy_blocks,omitempty"` +} + +func (x *GetFsReplicatedBlockStatsResponseProto) Reset() { + *x = GetFsReplicatedBlockStatsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFsReplicatedBlockStatsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFsReplicatedBlockStatsResponseProto) ProtoMessage() {} + +func (x *GetFsReplicatedBlockStatsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[61] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFsReplicatedBlockStatsResponseProto.ProtoReflect.Descriptor instead. +func (*GetFsReplicatedBlockStatsResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{61} +} + +func (x *GetFsReplicatedBlockStatsResponseProto) GetLowRedundancy() uint64 { + if x != nil && x.LowRedundancy != nil { + return *x.LowRedundancy + } + return 0 +} + +func (x *GetFsReplicatedBlockStatsResponseProto) GetCorruptBlocks() uint64 { + if x != nil && x.CorruptBlocks != nil { + return *x.CorruptBlocks + } + return 0 +} + +func (x *GetFsReplicatedBlockStatsResponseProto) GetMissingBlocks() uint64 { + if x != nil && x.MissingBlocks != nil { + return *x.MissingBlocks + } + return 0 +} + +func (x *GetFsReplicatedBlockStatsResponseProto) GetMissingReplOneBlocks() uint64 { + if x != nil && x.MissingReplOneBlocks != nil { + return *x.MissingReplOneBlocks + } + return 0 +} + +func (x *GetFsReplicatedBlockStatsResponseProto) GetBlocksInFuture() uint64 { + if x != nil && x.BlocksInFuture != nil { + return *x.BlocksInFuture + } + return 0 +} + +func (x *GetFsReplicatedBlockStatsResponseProto) GetPendingDeletionBlocks() uint64 { + if x != nil && x.PendingDeletionBlocks != nil { + return *x.PendingDeletionBlocks + } + return 0 +} + +func (x *GetFsReplicatedBlockStatsResponseProto) GetHighestPrioLowRedundancyBlocks() uint64 { + if x != nil && x.HighestPrioLowRedundancyBlocks != nil { + return *x.HighestPrioLowRedundancyBlocks + } + return 0 +} + +type GetFsECBlockGroupStatsRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetFsECBlockGroupStatsRequestProto) Reset() { + *x = GetFsECBlockGroupStatsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFsECBlockGroupStatsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFsECBlockGroupStatsRequestProto) ProtoMessage() {} + +func (x *GetFsECBlockGroupStatsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[62] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFsECBlockGroupStatsRequestProto.ProtoReflect.Descriptor instead. +func (*GetFsECBlockGroupStatsRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{62} +} + +type GetFsECBlockGroupStatsResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LowRedundancy *uint64 `protobuf:"varint,1,req,name=low_redundancy,json=lowRedundancy" json:"low_redundancy,omitempty"` + CorruptBlocks *uint64 `protobuf:"varint,2,req,name=corrupt_blocks,json=corruptBlocks" json:"corrupt_blocks,omitempty"` + MissingBlocks *uint64 `protobuf:"varint,3,req,name=missing_blocks,json=missingBlocks" json:"missing_blocks,omitempty"` + BlocksInFuture *uint64 `protobuf:"varint,4,req,name=blocks_in_future,json=blocksInFuture" json:"blocks_in_future,omitempty"` + PendingDeletionBlocks *uint64 `protobuf:"varint,5,req,name=pending_deletion_blocks,json=pendingDeletionBlocks" json:"pending_deletion_blocks,omitempty"` + HighestPrioLowRedundancyBlocks *uint64 `protobuf:"varint,6,opt,name=highest_prio_low_redundancy_blocks,json=highestPrioLowRedundancyBlocks" json:"highest_prio_low_redundancy_blocks,omitempty"` +} + +func (x *GetFsECBlockGroupStatsResponseProto) Reset() { + *x = GetFsECBlockGroupStatsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFsECBlockGroupStatsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFsECBlockGroupStatsResponseProto) ProtoMessage() {} + +func (x *GetFsECBlockGroupStatsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[63] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFsECBlockGroupStatsResponseProto.ProtoReflect.Descriptor instead. +func (*GetFsECBlockGroupStatsResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{63} +} + +func (x *GetFsECBlockGroupStatsResponseProto) GetLowRedundancy() uint64 { + if x != nil && x.LowRedundancy != nil { + return *x.LowRedundancy + } + return 0 +} + +func (x *GetFsECBlockGroupStatsResponseProto) GetCorruptBlocks() uint64 { + if x != nil && x.CorruptBlocks != nil { + return *x.CorruptBlocks + } + return 0 +} + +func (x *GetFsECBlockGroupStatsResponseProto) GetMissingBlocks() uint64 { + if x != nil && x.MissingBlocks != nil { + return *x.MissingBlocks + } + return 0 +} + +func (x *GetFsECBlockGroupStatsResponseProto) GetBlocksInFuture() uint64 { + if x != nil && x.BlocksInFuture != nil { + return *x.BlocksInFuture + } + return 0 +} + +func (x *GetFsECBlockGroupStatsResponseProto) GetPendingDeletionBlocks() uint64 { + if x != nil && x.PendingDeletionBlocks != nil { + return *x.PendingDeletionBlocks + } + return 0 +} + +func (x *GetFsECBlockGroupStatsResponseProto) GetHighestPrioLowRedundancyBlocks() uint64 { + if x != nil && x.HighestPrioLowRedundancyBlocks != nil { + return *x.HighestPrioLowRedundancyBlocks + } + return 0 +} + +type GetDatanodeReportRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type *DatanodeReportTypeProto `protobuf:"varint,1,req,name=type,enum=hadoop.hdfs.DatanodeReportTypeProto" json:"type,omitempty"` +} + +func (x *GetDatanodeReportRequestProto) Reset() { + *x = GetDatanodeReportRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDatanodeReportRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDatanodeReportRequestProto) ProtoMessage() {} + +func (x *GetDatanodeReportRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[64] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDatanodeReportRequestProto.ProtoReflect.Descriptor instead. +func (*GetDatanodeReportRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{64} +} + +func (x *GetDatanodeReportRequestProto) GetType() DatanodeReportTypeProto { + if x != nil && x.Type != nil { + return *x.Type + } + return DatanodeReportTypeProto_ALL +} + +type GetDatanodeReportResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Di []*DatanodeInfoProto `protobuf:"bytes,1,rep,name=di" json:"di,omitempty"` +} + +func (x *GetDatanodeReportResponseProto) Reset() { + *x = GetDatanodeReportResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDatanodeReportResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDatanodeReportResponseProto) ProtoMessage() {} + +func (x *GetDatanodeReportResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[65] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDatanodeReportResponseProto.ProtoReflect.Descriptor instead. +func (*GetDatanodeReportResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{65} +} + +func (x *GetDatanodeReportResponseProto) GetDi() []*DatanodeInfoProto { + if x != nil { + return x.Di + } + return nil +} + +type GetDatanodeStorageReportRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type *DatanodeReportTypeProto `protobuf:"varint,1,req,name=type,enum=hadoop.hdfs.DatanodeReportTypeProto" json:"type,omitempty"` +} + +func (x *GetDatanodeStorageReportRequestProto) Reset() { + *x = GetDatanodeStorageReportRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDatanodeStorageReportRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDatanodeStorageReportRequestProto) ProtoMessage() {} + +func (x *GetDatanodeStorageReportRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[66] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDatanodeStorageReportRequestProto.ProtoReflect.Descriptor instead. +func (*GetDatanodeStorageReportRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{66} +} + +func (x *GetDatanodeStorageReportRequestProto) GetType() DatanodeReportTypeProto { + if x != nil && x.Type != nil { + return *x.Type + } + return DatanodeReportTypeProto_ALL +} + +type DatanodeStorageReportProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DatanodeInfo *DatanodeInfoProto `protobuf:"bytes,1,req,name=datanodeInfo" json:"datanodeInfo,omitempty"` + StorageReports []*StorageReportProto `protobuf:"bytes,2,rep,name=storageReports" json:"storageReports,omitempty"` +} + +func (x *DatanodeStorageReportProto) Reset() { + *x = DatanodeStorageReportProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DatanodeStorageReportProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DatanodeStorageReportProto) ProtoMessage() {} + +func (x *DatanodeStorageReportProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[67] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DatanodeStorageReportProto.ProtoReflect.Descriptor instead. +func (*DatanodeStorageReportProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{67} +} + +func (x *DatanodeStorageReportProto) GetDatanodeInfo() *DatanodeInfoProto { + if x != nil { + return x.DatanodeInfo + } + return nil +} + +func (x *DatanodeStorageReportProto) GetStorageReports() []*StorageReportProto { + if x != nil { + return x.StorageReports + } + return nil +} + +type GetDatanodeStorageReportResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DatanodeStorageReports []*DatanodeStorageReportProto `protobuf:"bytes,1,rep,name=datanodeStorageReports" json:"datanodeStorageReports,omitempty"` +} + +func (x *GetDatanodeStorageReportResponseProto) Reset() { + *x = GetDatanodeStorageReportResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDatanodeStorageReportResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDatanodeStorageReportResponseProto) ProtoMessage() {} + +func (x *GetDatanodeStorageReportResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[68] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDatanodeStorageReportResponseProto.ProtoReflect.Descriptor instead. +func (*GetDatanodeStorageReportResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{68} +} + +func (x *GetDatanodeStorageReportResponseProto) GetDatanodeStorageReports() []*DatanodeStorageReportProto { + if x != nil { + return x.DatanodeStorageReports + } + return nil +} + +type GetPreferredBlockSizeRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filename *string `protobuf:"bytes,1,req,name=filename" json:"filename,omitempty"` +} + +func (x *GetPreferredBlockSizeRequestProto) Reset() { + *x = GetPreferredBlockSizeRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPreferredBlockSizeRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPreferredBlockSizeRequestProto) ProtoMessage() {} + +func (x *GetPreferredBlockSizeRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[69] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPreferredBlockSizeRequestProto.ProtoReflect.Descriptor instead. +func (*GetPreferredBlockSizeRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{69} +} + +func (x *GetPreferredBlockSizeRequestProto) GetFilename() string { + if x != nil && x.Filename != nil { + return *x.Filename + } + return "" +} + +type GetPreferredBlockSizeResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bsize *uint64 `protobuf:"varint,1,req,name=bsize" json:"bsize,omitempty"` +} + +func (x *GetPreferredBlockSizeResponseProto) Reset() { + *x = GetPreferredBlockSizeResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPreferredBlockSizeResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPreferredBlockSizeResponseProto) ProtoMessage() {} + +func (x *GetPreferredBlockSizeResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[70] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPreferredBlockSizeResponseProto.ProtoReflect.Descriptor instead. +func (*GetPreferredBlockSizeResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{70} +} + +func (x *GetPreferredBlockSizeResponseProto) GetBsize() uint64 { + if x != nil && x.Bsize != nil { + return *x.Bsize + } + return 0 +} + +type SetSafeModeRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Action *SafeModeActionProto `protobuf:"varint,1,req,name=action,enum=hadoop.hdfs.SafeModeActionProto" json:"action,omitempty"` + Checked *bool `protobuf:"varint,2,opt,name=checked,def=0" json:"checked,omitempty"` +} + +// Default values for SetSafeModeRequestProto fields. +const ( + Default_SetSafeModeRequestProto_Checked = bool(false) +) + +func (x *SetSafeModeRequestProto) Reset() { + *x = SetSafeModeRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetSafeModeRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSafeModeRequestProto) ProtoMessage() {} + +func (x *SetSafeModeRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[71] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSafeModeRequestProto.ProtoReflect.Descriptor instead. +func (*SetSafeModeRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{71} +} + +func (x *SetSafeModeRequestProto) GetAction() SafeModeActionProto { + if x != nil && x.Action != nil { + return *x.Action + } + return SafeModeActionProto_SAFEMODE_LEAVE +} + +func (x *SetSafeModeRequestProto) GetChecked() bool { + if x != nil && x.Checked != nil { + return *x.Checked + } + return Default_SetSafeModeRequestProto_Checked +} + +type SetSafeModeResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` +} + +func (x *SetSafeModeResponseProto) Reset() { + *x = SetSafeModeResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetSafeModeResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSafeModeResponseProto) ProtoMessage() {} + +func (x *SetSafeModeResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[72] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSafeModeResponseProto.ProtoReflect.Descriptor instead. +func (*SetSafeModeResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{72} +} + +func (x *SetSafeModeResponseProto) GetResult() bool { + if x != nil && x.Result != nil { + return *x.Result + } + return false +} + +type SaveNamespaceRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TimeWindow *uint64 `protobuf:"varint,1,opt,name=timeWindow,def=0" json:"timeWindow,omitempty"` + TxGap *uint64 `protobuf:"varint,2,opt,name=txGap,def=0" json:"txGap,omitempty"` +} + +// Default values for SaveNamespaceRequestProto fields. +const ( + Default_SaveNamespaceRequestProto_TimeWindow = uint64(0) + Default_SaveNamespaceRequestProto_TxGap = uint64(0) +) + +func (x *SaveNamespaceRequestProto) Reset() { + *x = SaveNamespaceRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveNamespaceRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveNamespaceRequestProto) ProtoMessage() {} + +func (x *SaveNamespaceRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[73] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SaveNamespaceRequestProto.ProtoReflect.Descriptor instead. +func (*SaveNamespaceRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{73} +} + +func (x *SaveNamespaceRequestProto) GetTimeWindow() uint64 { + if x != nil && x.TimeWindow != nil { + return *x.TimeWindow + } + return Default_SaveNamespaceRequestProto_TimeWindow +} + +func (x *SaveNamespaceRequestProto) GetTxGap() uint64 { + if x != nil && x.TxGap != nil { + return *x.TxGap + } + return Default_SaveNamespaceRequestProto_TxGap +} + +type SaveNamespaceResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Saved *bool `protobuf:"varint,1,opt,name=saved,def=1" json:"saved,omitempty"` +} + +// Default values for SaveNamespaceResponseProto fields. +const ( + Default_SaveNamespaceResponseProto_Saved = bool(true) +) + +func (x *SaveNamespaceResponseProto) Reset() { + *x = SaveNamespaceResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveNamespaceResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveNamespaceResponseProto) ProtoMessage() {} + +func (x *SaveNamespaceResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[74] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SaveNamespaceResponseProto.ProtoReflect.Descriptor instead. +func (*SaveNamespaceResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{74} +} + +func (x *SaveNamespaceResponseProto) GetSaved() bool { + if x != nil && x.Saved != nil { + return *x.Saved + } + return Default_SaveNamespaceResponseProto_Saved +} + +type RollEditsRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RollEditsRequestProto) Reset() { + *x = RollEditsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RollEditsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RollEditsRequestProto) ProtoMessage() {} + +func (x *RollEditsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[75] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RollEditsRequestProto.ProtoReflect.Descriptor instead. +func (*RollEditsRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{75} +} + +type RollEditsResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NewSegmentTxId *uint64 `protobuf:"varint,1,req,name=newSegmentTxId" json:"newSegmentTxId,omitempty"` +} + +func (x *RollEditsResponseProto) Reset() { + *x = RollEditsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RollEditsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RollEditsResponseProto) ProtoMessage() {} + +func (x *RollEditsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[76] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RollEditsResponseProto.ProtoReflect.Descriptor instead. +func (*RollEditsResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{76} +} + +func (x *RollEditsResponseProto) GetNewSegmentTxId() uint64 { + if x != nil && x.NewSegmentTxId != nil { + return *x.NewSegmentTxId + } + return 0 +} + +type RestoreFailedStorageRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Arg *string `protobuf:"bytes,1,req,name=arg" json:"arg,omitempty"` +} + +func (x *RestoreFailedStorageRequestProto) Reset() { + *x = RestoreFailedStorageRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestoreFailedStorageRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreFailedStorageRequestProto) ProtoMessage() {} + +func (x *RestoreFailedStorageRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[77] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestoreFailedStorageRequestProto.ProtoReflect.Descriptor instead. +func (*RestoreFailedStorageRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{77} +} + +func (x *RestoreFailedStorageRequestProto) GetArg() string { + if x != nil && x.Arg != nil { + return *x.Arg + } + return "" +} + +type RestoreFailedStorageResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` +} + +func (x *RestoreFailedStorageResponseProto) Reset() { + *x = RestoreFailedStorageResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestoreFailedStorageResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreFailedStorageResponseProto) ProtoMessage() {} + +func (x *RestoreFailedStorageResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[78] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestoreFailedStorageResponseProto.ProtoReflect.Descriptor instead. +func (*RestoreFailedStorageResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{78} +} + +func (x *RestoreFailedStorageResponseProto) GetResult() bool { + if x != nil && x.Result != nil { + return *x.Result + } + return false +} + +type RefreshNodesRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RefreshNodesRequestProto) Reset() { + *x = RefreshNodesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefreshNodesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshNodesRequestProto) ProtoMessage() {} + +func (x *RefreshNodesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[79] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshNodesRequestProto.ProtoReflect.Descriptor instead. +func (*RefreshNodesRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{79} +} + +type RefreshNodesResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RefreshNodesResponseProto) Reset() { + *x = RefreshNodesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefreshNodesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshNodesResponseProto) ProtoMessage() {} + +func (x *RefreshNodesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[80] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshNodesResponseProto.ProtoReflect.Descriptor instead. +func (*RefreshNodesResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{80} +} + +type FinalizeUpgradeRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FinalizeUpgradeRequestProto) Reset() { + *x = FinalizeUpgradeRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FinalizeUpgradeRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinalizeUpgradeRequestProto) ProtoMessage() {} + +func (x *FinalizeUpgradeRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[81] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinalizeUpgradeRequestProto.ProtoReflect.Descriptor instead. +func (*FinalizeUpgradeRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{81} +} + +type FinalizeUpgradeResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FinalizeUpgradeResponseProto) Reset() { + *x = FinalizeUpgradeResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FinalizeUpgradeResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinalizeUpgradeResponseProto) ProtoMessage() {} + +func (x *FinalizeUpgradeResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[82] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinalizeUpgradeResponseProto.ProtoReflect.Descriptor instead. +func (*FinalizeUpgradeResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{82} +} + +type UpgradeStatusRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpgradeStatusRequestProto) Reset() { + *x = UpgradeStatusRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpgradeStatusRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpgradeStatusRequestProto) ProtoMessage() {} + +func (x *UpgradeStatusRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[83] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpgradeStatusRequestProto.ProtoReflect.Descriptor instead. +func (*UpgradeStatusRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{83} +} + +type UpgradeStatusResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UpgradeFinalized *bool `protobuf:"varint,1,req,name=upgradeFinalized" json:"upgradeFinalized,omitempty"` +} + +func (x *UpgradeStatusResponseProto) Reset() { + *x = UpgradeStatusResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpgradeStatusResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpgradeStatusResponseProto) ProtoMessage() {} + +func (x *UpgradeStatusResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[84] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpgradeStatusResponseProto.ProtoReflect.Descriptor instead. +func (*UpgradeStatusResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{84} +} + +func (x *UpgradeStatusResponseProto) GetUpgradeFinalized() bool { + if x != nil && x.UpgradeFinalized != nil { + return *x.UpgradeFinalized + } + return false +} + +type RollingUpgradeRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Action *RollingUpgradeActionProto `protobuf:"varint,1,req,name=action,enum=hadoop.hdfs.RollingUpgradeActionProto" json:"action,omitempty"` +} + +func (x *RollingUpgradeRequestProto) Reset() { + *x = RollingUpgradeRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RollingUpgradeRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RollingUpgradeRequestProto) ProtoMessage() {} + +func (x *RollingUpgradeRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[85] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RollingUpgradeRequestProto.ProtoReflect.Descriptor instead. +func (*RollingUpgradeRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{85} +} + +func (x *RollingUpgradeRequestProto) GetAction() RollingUpgradeActionProto { + if x != nil && x.Action != nil { + return *x.Action + } + return RollingUpgradeActionProto_QUERY +} + +type RollingUpgradeInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *RollingUpgradeStatusProto `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` + StartTime *uint64 `protobuf:"varint,2,req,name=startTime" json:"startTime,omitempty"` + FinalizeTime *uint64 `protobuf:"varint,3,req,name=finalizeTime" json:"finalizeTime,omitempty"` + CreatedRollbackImages *bool `protobuf:"varint,4,req,name=createdRollbackImages" json:"createdRollbackImages,omitempty"` +} + +func (x *RollingUpgradeInfoProto) Reset() { + *x = RollingUpgradeInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RollingUpgradeInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RollingUpgradeInfoProto) ProtoMessage() {} + +func (x *RollingUpgradeInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[86] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RollingUpgradeInfoProto.ProtoReflect.Descriptor instead. +func (*RollingUpgradeInfoProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{86} +} + +func (x *RollingUpgradeInfoProto) GetStatus() *RollingUpgradeStatusProto { + if x != nil { + return x.Status + } + return nil +} + +func (x *RollingUpgradeInfoProto) GetStartTime() uint64 { + if x != nil && x.StartTime != nil { + return *x.StartTime + } + return 0 +} + +func (x *RollingUpgradeInfoProto) GetFinalizeTime() uint64 { + if x != nil && x.FinalizeTime != nil { + return *x.FinalizeTime + } + return 0 +} + +func (x *RollingUpgradeInfoProto) GetCreatedRollbackImages() bool { + if x != nil && x.CreatedRollbackImages != nil { + return *x.CreatedRollbackImages + } + return false +} + +type RollingUpgradeResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RollingUpgradeInfo *RollingUpgradeInfoProto `protobuf:"bytes,1,opt,name=rollingUpgradeInfo" json:"rollingUpgradeInfo,omitempty"` +} + +func (x *RollingUpgradeResponseProto) Reset() { + *x = RollingUpgradeResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RollingUpgradeResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RollingUpgradeResponseProto) ProtoMessage() {} + +func (x *RollingUpgradeResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[87] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RollingUpgradeResponseProto.ProtoReflect.Descriptor instead. +func (*RollingUpgradeResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{87} +} + +func (x *RollingUpgradeResponseProto) GetRollingUpgradeInfo() *RollingUpgradeInfoProto { + if x != nil { + return x.RollingUpgradeInfo + } + return nil +} + +type ListCorruptFileBlocksRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` + Cookie *string `protobuf:"bytes,2,opt,name=cookie" json:"cookie,omitempty"` +} + +func (x *ListCorruptFileBlocksRequestProto) Reset() { + *x = ListCorruptFileBlocksRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCorruptFileBlocksRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCorruptFileBlocksRequestProto) ProtoMessage() {} + +func (x *ListCorruptFileBlocksRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[88] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCorruptFileBlocksRequestProto.ProtoReflect.Descriptor instead. +func (*ListCorruptFileBlocksRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{88} +} + +func (x *ListCorruptFileBlocksRequestProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path + } + return "" +} + +func (x *ListCorruptFileBlocksRequestProto) GetCookie() string { + if x != nil && x.Cookie != nil { + return *x.Cookie + } + return "" +} + +type ListCorruptFileBlocksResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Corrupt *CorruptFileBlocksProto `protobuf:"bytes,1,req,name=corrupt" json:"corrupt,omitempty"` +} + +func (x *ListCorruptFileBlocksResponseProto) Reset() { + *x = ListCorruptFileBlocksResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCorruptFileBlocksResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCorruptFileBlocksResponseProto) ProtoMessage() {} + +func (x *ListCorruptFileBlocksResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[89] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCorruptFileBlocksResponseProto.ProtoReflect.Descriptor instead. +func (*ListCorruptFileBlocksResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{89} +} + +func (x *ListCorruptFileBlocksResponseProto) GetCorrupt() *CorruptFileBlocksProto { + if x != nil { + return x.Corrupt + } + return nil +} + +type MetaSaveRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filename *string `protobuf:"bytes,1,req,name=filename" json:"filename,omitempty"` +} + +func (x *MetaSaveRequestProto) Reset() { + *x = MetaSaveRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetaSaveRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetaSaveRequestProto) ProtoMessage() {} + +func (x *MetaSaveRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[90] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetaSaveRequestProto.ProtoReflect.Descriptor instead. +func (*MetaSaveRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{90} +} + +func (x *MetaSaveRequestProto) GetFilename() string { + if x != nil && x.Filename != nil { + return *x.Filename + } + return "" +} + +type MetaSaveResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MetaSaveResponseProto) Reset() { + *x = MetaSaveResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetaSaveResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetaSaveResponseProto) ProtoMessage() {} + +func (x *MetaSaveResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[91] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetaSaveResponseProto.ProtoReflect.Descriptor instead. +func (*MetaSaveResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{91} +} + +type GetFileInfoRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` +} + +func (x *GetFileInfoRequestProto) Reset() { + *x = GetFileInfoRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFileInfoRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFileInfoRequestProto) ProtoMessage() {} + +func (x *GetFileInfoRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[92] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFileInfoRequestProto.ProtoReflect.Descriptor instead. +func (*GetFileInfoRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{92} +} + +func (x *GetFileInfoRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +type GetFileInfoResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Fs *HdfsFileStatusProto `protobuf:"bytes,1,opt,name=fs" json:"fs,omitempty"` +} + +func (x *GetFileInfoResponseProto) Reset() { + *x = GetFileInfoResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFileInfoResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFileInfoResponseProto) ProtoMessage() {} + +func (x *GetFileInfoResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[93] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFileInfoResponseProto.ProtoReflect.Descriptor instead. +func (*GetFileInfoResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{93} +} + +func (x *GetFileInfoResponseProto) GetFs() *HdfsFileStatusProto { + if x != nil { + return x.Fs + } + return nil +} + +type GetLocatedFileInfoRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,opt,name=src" json:"src,omitempty"` + NeedBlockToken *bool `protobuf:"varint,2,opt,name=needBlockToken,def=0" json:"needBlockToken,omitempty"` +} + +// Default values for GetLocatedFileInfoRequestProto fields. +const ( + Default_GetLocatedFileInfoRequestProto_NeedBlockToken = bool(false) +) + +func (x *GetLocatedFileInfoRequestProto) Reset() { + *x = GetLocatedFileInfoRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLocatedFileInfoRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLocatedFileInfoRequestProto) ProtoMessage() {} + +func (x *GetLocatedFileInfoRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[94] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLocatedFileInfoRequestProto.ProtoReflect.Descriptor instead. +func (*GetLocatedFileInfoRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{94} +} + +func (x *GetLocatedFileInfoRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *GetLocatedFileInfoRequestProto) GetNeedBlockToken() bool { + if x != nil && x.NeedBlockToken != nil { + return *x.NeedBlockToken + } + return Default_GetLocatedFileInfoRequestProto_NeedBlockToken +} + +type GetLocatedFileInfoResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Fs *HdfsFileStatusProto `protobuf:"bytes,1,opt,name=fs" json:"fs,omitempty"` +} + +func (x *GetLocatedFileInfoResponseProto) Reset() { + *x = GetLocatedFileInfoResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLocatedFileInfoResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLocatedFileInfoResponseProto) ProtoMessage() {} + +func (x *GetLocatedFileInfoResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[95] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLocatedFileInfoResponseProto.ProtoReflect.Descriptor instead. +func (*GetLocatedFileInfoResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{95} +} + +func (x *GetLocatedFileInfoResponseProto) GetFs() *HdfsFileStatusProto { + if x != nil { + return x.Fs + } + return nil +} + +type IsFileClosedRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` +} + +func (x *IsFileClosedRequestProto) Reset() { + *x = IsFileClosedRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsFileClosedRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsFileClosedRequestProto) ProtoMessage() {} + +func (x *IsFileClosedRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[96] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsFileClosedRequestProto.ProtoReflect.Descriptor instead. +func (*IsFileClosedRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{96} +} + +func (x *IsFileClosedRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +type IsFileClosedResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` +} + +func (x *IsFileClosedResponseProto) Reset() { + *x = IsFileClosedResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsFileClosedResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsFileClosedResponseProto) ProtoMessage() {} + +func (x *IsFileClosedResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[97] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsFileClosedResponseProto.ProtoReflect.Descriptor instead. +func (*IsFileClosedResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{97} +} + +func (x *IsFileClosedResponseProto) GetResult() bool { + if x != nil && x.Result != nil { + return *x.Result + } + return false +} + +type CacheDirectiveInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` + Path *string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` + Replication *uint32 `protobuf:"varint,3,opt,name=replication" json:"replication,omitempty"` + Pool *string `protobuf:"bytes,4,opt,name=pool" json:"pool,omitempty"` + Expiration *CacheDirectiveInfoExpirationProto `protobuf:"bytes,5,opt,name=expiration" json:"expiration,omitempty"` +} + +func (x *CacheDirectiveInfoProto) Reset() { + *x = CacheDirectiveInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CacheDirectiveInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CacheDirectiveInfoProto) ProtoMessage() {} + +func (x *CacheDirectiveInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[98] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CacheDirectiveInfoProto.ProtoReflect.Descriptor instead. +func (*CacheDirectiveInfoProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{98} +} + +func (x *CacheDirectiveInfoProto) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id + } + return 0 +} + +func (x *CacheDirectiveInfoProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path + } + return "" +} + +func (x *CacheDirectiveInfoProto) GetReplication() uint32 { + if x != nil && x.Replication != nil { + return *x.Replication + } + return 0 +} + +func (x *CacheDirectiveInfoProto) GetPool() string { + if x != nil && x.Pool != nil { + return *x.Pool + } + return "" +} + +func (x *CacheDirectiveInfoProto) GetExpiration() *CacheDirectiveInfoExpirationProto { + if x != nil { + return x.Expiration + } + return nil +} + +type CacheDirectiveInfoExpirationProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Millis *int64 `protobuf:"varint,1,req,name=millis" json:"millis,omitempty"` + IsRelative *bool `protobuf:"varint,2,req,name=isRelative" json:"isRelative,omitempty"` +} + +func (x *CacheDirectiveInfoExpirationProto) Reset() { + *x = CacheDirectiveInfoExpirationProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CacheDirectiveInfoExpirationProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CacheDirectiveInfoExpirationProto) ProtoMessage() {} + +func (x *CacheDirectiveInfoExpirationProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[99] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CacheDirectiveInfoExpirationProto.ProtoReflect.Descriptor instead. +func (*CacheDirectiveInfoExpirationProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{99} +} + +func (x *CacheDirectiveInfoExpirationProto) GetMillis() int64 { + if x != nil && x.Millis != nil { + return *x.Millis + } + return 0 +} + +func (x *CacheDirectiveInfoExpirationProto) GetIsRelative() bool { + if x != nil && x.IsRelative != nil { + return *x.IsRelative + } + return false +} + +type CacheDirectiveStatsProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BytesNeeded *int64 `protobuf:"varint,1,req,name=bytesNeeded" json:"bytesNeeded,omitempty"` + BytesCached *int64 `protobuf:"varint,2,req,name=bytesCached" json:"bytesCached,omitempty"` + FilesNeeded *int64 `protobuf:"varint,3,req,name=filesNeeded" json:"filesNeeded,omitempty"` + FilesCached *int64 `protobuf:"varint,4,req,name=filesCached" json:"filesCached,omitempty"` + HasExpired *bool `protobuf:"varint,5,req,name=hasExpired" json:"hasExpired,omitempty"` +} + +func (x *CacheDirectiveStatsProto) Reset() { + *x = CacheDirectiveStatsProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CacheDirectiveStatsProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CacheDirectiveStatsProto) ProtoMessage() {} + +func (x *CacheDirectiveStatsProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[100] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CacheDirectiveStatsProto.ProtoReflect.Descriptor instead. +func (*CacheDirectiveStatsProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{100} +} + +func (x *CacheDirectiveStatsProto) GetBytesNeeded() int64 { + if x != nil && x.BytesNeeded != nil { + return *x.BytesNeeded + } + return 0 +} + +func (x *CacheDirectiveStatsProto) GetBytesCached() int64 { + if x != nil && x.BytesCached != nil { + return *x.BytesCached + } + return 0 +} + +func (x *CacheDirectiveStatsProto) GetFilesNeeded() int64 { + if x != nil && x.FilesNeeded != nil { + return *x.FilesNeeded + } + return 0 +} + +func (x *CacheDirectiveStatsProto) GetFilesCached() int64 { + if x != nil && x.FilesCached != nil { + return *x.FilesCached + } + return 0 +} + +func (x *CacheDirectiveStatsProto) GetHasExpired() bool { + if x != nil && x.HasExpired != nil { + return *x.HasExpired + } + return false +} + +type AddCacheDirectiveRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *CacheDirectiveInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` + CacheFlags *uint32 `protobuf:"varint,2,opt,name=cacheFlags" json:"cacheFlags,omitempty"` // bits set using CacheFlag +} + +func (x *AddCacheDirectiveRequestProto) Reset() { + *x = AddCacheDirectiveRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddCacheDirectiveRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddCacheDirectiveRequestProto) ProtoMessage() {} + +func (x *AddCacheDirectiveRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[101] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddCacheDirectiveRequestProto.ProtoReflect.Descriptor instead. +func (*AddCacheDirectiveRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{101} +} + +func (x *AddCacheDirectiveRequestProto) GetInfo() *CacheDirectiveInfoProto { + if x != nil { + return x.Info + } + return nil +} + +func (x *AddCacheDirectiveRequestProto) GetCacheFlags() uint32 { + if x != nil && x.CacheFlags != nil { + return *x.CacheFlags + } + return 0 +} + +type AddCacheDirectiveResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` +} + +func (x *AddCacheDirectiveResponseProto) Reset() { + *x = AddCacheDirectiveResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddCacheDirectiveResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddCacheDirectiveResponseProto) ProtoMessage() {} + +func (x *AddCacheDirectiveResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[102] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddCacheDirectiveResponseProto.ProtoReflect.Descriptor instead. +func (*AddCacheDirectiveResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{102} +} + +func (x *AddCacheDirectiveResponseProto) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id + } + return 0 +} + +type ModifyCacheDirectiveRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *CacheDirectiveInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` + CacheFlags *uint32 `protobuf:"varint,2,opt,name=cacheFlags" json:"cacheFlags,omitempty"` // bits set using CacheFlag +} + +func (x *ModifyCacheDirectiveRequestProto) Reset() { + *x = ModifyCacheDirectiveRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ModifyCacheDirectiveRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModifyCacheDirectiveRequestProto) ProtoMessage() {} + +func (x *ModifyCacheDirectiveRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[103] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyCacheDirectiveRequestProto.ProtoReflect.Descriptor instead. +func (*ModifyCacheDirectiveRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{103} +} + +func (x *ModifyCacheDirectiveRequestProto) GetInfo() *CacheDirectiveInfoProto { + if x != nil { + return x.Info } return nil } -type SetReplicationRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - Replication *uint32 `protobuf:"varint,2,req,name=replication" json:"replication,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ModifyCacheDirectiveRequestProto) GetCacheFlags() uint32 { + if x != nil && x.CacheFlags != nil { + return *x.CacheFlags + } + return 0 } -func (m *SetReplicationRequestProto) Reset() { *m = SetReplicationRequestProto{} } -func (m *SetReplicationRequestProto) String() string { return proto.CompactTextString(m) } -func (*SetReplicationRequestProto) ProtoMessage() {} -func (*SetReplicationRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{8} } - -func (m *SetReplicationRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src - } - return "" +type ModifyCacheDirectiveResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *SetReplicationRequestProto) GetReplication() uint32 { - if m != nil && m.Replication != nil { - return *m.Replication +func (x *ModifyCacheDirectiveResponseProto) Reset() { + *x = ModifyCacheDirectiveResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -type SetReplicationResponseProto struct { - Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ModifyCacheDirectiveResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetReplicationResponseProto) Reset() { *m = SetReplicationResponseProto{} } -func (m *SetReplicationResponseProto) String() string { return proto.CompactTextString(m) } -func (*SetReplicationResponseProto) ProtoMessage() {} -func (*SetReplicationResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{9} } +func (*ModifyCacheDirectiveResponseProto) ProtoMessage() {} -func (m *SetReplicationResponseProto) GetResult() bool { - if m != nil && m.Result != nil { - return *m.Result +func (x *ModifyCacheDirectiveResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[104] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -type SetStoragePolicyRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - PolicyName *string `protobuf:"bytes,2,req,name=policyName" json:"policyName,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use ModifyCacheDirectiveResponseProto.ProtoReflect.Descriptor instead. +func (*ModifyCacheDirectiveResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{104} } -func (m *SetStoragePolicyRequestProto) Reset() { *m = SetStoragePolicyRequestProto{} } -func (m *SetStoragePolicyRequestProto) String() string { return proto.CompactTextString(m) } -func (*SetStoragePolicyRequestProto) ProtoMessage() {} -func (*SetStoragePolicyRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{10} } +type RemoveCacheDirectiveRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetStoragePolicyRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src - } - return "" + Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` } -func (m *SetStoragePolicyRequestProto) GetPolicyName() string { - if m != nil && m.PolicyName != nil { - return *m.PolicyName +func (x *RemoveCacheDirectiveRequestProto) Reset() { + *x = RemoveCacheDirectiveRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type SetStoragePolicyResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *RemoveCacheDirectiveRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetStoragePolicyResponseProto) Reset() { *m = SetStoragePolicyResponseProto{} } -func (m *SetStoragePolicyResponseProto) String() string { return proto.CompactTextString(m) } -func (*SetStoragePolicyResponseProto) ProtoMessage() {} -func (*SetStoragePolicyResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{11} } +func (*RemoveCacheDirectiveRequestProto) ProtoMessage() {} -type UnsetStoragePolicyRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *RemoveCacheDirectiveRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[105] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *UnsetStoragePolicyRequestProto) Reset() { *m = UnsetStoragePolicyRequestProto{} } -func (m *UnsetStoragePolicyRequestProto) String() string { return proto.CompactTextString(m) } -func (*UnsetStoragePolicyRequestProto) ProtoMessage() {} -func (*UnsetStoragePolicyRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{12} } +// Deprecated: Use RemoveCacheDirectiveRequestProto.ProtoReflect.Descriptor instead. +func (*RemoveCacheDirectiveRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{105} +} -func (m *UnsetStoragePolicyRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *RemoveCacheDirectiveRequestProto) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id } - return "" + return 0 } -type UnsetStoragePolicyResponseProto struct { - XXX_unrecognized []byte `json:"-"` +type RemoveCacheDirectiveResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *UnsetStoragePolicyResponseProto) Reset() { *m = UnsetStoragePolicyResponseProto{} } -func (m *UnsetStoragePolicyResponseProto) String() string { return proto.CompactTextString(m) } -func (*UnsetStoragePolicyResponseProto) ProtoMessage() {} -func (*UnsetStoragePolicyResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{13} +func (x *RemoveCacheDirectiveResponseProto) Reset() { + *x = RemoveCacheDirectiveResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -type GetStoragePolicyRequestProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *RemoveCacheDirectiveResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetStoragePolicyRequestProto) Reset() { *m = GetStoragePolicyRequestProto{} } -func (m *GetStoragePolicyRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetStoragePolicyRequestProto) ProtoMessage() {} -func (*GetStoragePolicyRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{14} } +func (*RemoveCacheDirectiveResponseProto) ProtoMessage() {} -func (m *GetStoragePolicyRequestProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *RemoveCacheDirectiveResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[106] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -type GetStoragePolicyResponseProto struct { - StoragePolicy *BlockStoragePolicyProto `protobuf:"bytes,1,req,name=storagePolicy" json:"storagePolicy,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use RemoveCacheDirectiveResponseProto.ProtoReflect.Descriptor instead. +func (*RemoveCacheDirectiveResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{106} } -func (m *GetStoragePolicyResponseProto) Reset() { *m = GetStoragePolicyResponseProto{} } -func (m *GetStoragePolicyResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetStoragePolicyResponseProto) ProtoMessage() {} -func (*GetStoragePolicyResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{15} } +type ListCacheDirectivesRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PrevId *int64 `protobuf:"varint,1,req,name=prevId" json:"prevId,omitempty"` + Filter *CacheDirectiveInfoProto `protobuf:"bytes,2,req,name=filter" json:"filter,omitempty"` +} -func (m *GetStoragePolicyResponseProto) GetStoragePolicy() *BlockStoragePolicyProto { - if m != nil { - return m.StoragePolicy +func (x *ListCacheDirectivesRequestProto) Reset() { + *x = ListCacheDirectivesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type GetStoragePoliciesRequestProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *ListCacheDirectivesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetStoragePoliciesRequestProto) Reset() { *m = GetStoragePoliciesRequestProto{} } -func (m *GetStoragePoliciesRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetStoragePoliciesRequestProto) ProtoMessage() {} -func (*GetStoragePoliciesRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{16} } +func (*ListCacheDirectivesRequestProto) ProtoMessage() {} -type GetStoragePoliciesResponseProto struct { - Policies []*BlockStoragePolicyProto `protobuf:"bytes,1,rep,name=policies" json:"policies,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ListCacheDirectivesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[107] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetStoragePoliciesResponseProto) Reset() { *m = GetStoragePoliciesResponseProto{} } -func (m *GetStoragePoliciesResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetStoragePoliciesResponseProto) ProtoMessage() {} -func (*GetStoragePoliciesResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{17} +// Deprecated: Use ListCacheDirectivesRequestProto.ProtoReflect.Descriptor instead. +func (*ListCacheDirectivesRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{107} } -func (m *GetStoragePoliciesResponseProto) GetPolicies() []*BlockStoragePolicyProto { - if m != nil { - return m.Policies +func (x *ListCacheDirectivesRequestProto) GetPrevId() int64 { + if x != nil && x.PrevId != nil { + return *x.PrevId } - return nil + return 0 } -type SetPermissionRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - Permission *FsPermissionProto `protobuf:"bytes,2,req,name=permission" json:"permission,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ListCacheDirectivesRequestProto) GetFilter() *CacheDirectiveInfoProto { + if x != nil { + return x.Filter + } + return nil } -func (m *SetPermissionRequestProto) Reset() { *m = SetPermissionRequestProto{} } -func (m *SetPermissionRequestProto) String() string { return proto.CompactTextString(m) } -func (*SetPermissionRequestProto) ProtoMessage() {} -func (*SetPermissionRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{18} } +type CacheDirectiveEntryProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetPermissionRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src - } - return "" + Info *CacheDirectiveInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` + Stats *CacheDirectiveStatsProto `protobuf:"bytes,2,req,name=stats" json:"stats,omitempty"` } -func (m *SetPermissionRequestProto) GetPermission() *FsPermissionProto { - if m != nil { - return m.Permission +func (x *CacheDirectiveEntryProto) Reset() { + *x = CacheDirectiveEntryProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type SetPermissionResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *CacheDirectiveEntryProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetPermissionResponseProto) Reset() { *m = SetPermissionResponseProto{} } -func (m *SetPermissionResponseProto) String() string { return proto.CompactTextString(m) } -func (*SetPermissionResponseProto) ProtoMessage() {} -func (*SetPermissionResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{19} } +func (*CacheDirectiveEntryProto) ProtoMessage() {} -type SetOwnerRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - Username *string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"` - Groupname *string `protobuf:"bytes,3,opt,name=groupname" json:"groupname,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CacheDirectiveEntryProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[108] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *SetOwnerRequestProto) Reset() { *m = SetOwnerRequestProto{} } -func (m *SetOwnerRequestProto) String() string { return proto.CompactTextString(m) } -func (*SetOwnerRequestProto) ProtoMessage() {} -func (*SetOwnerRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{20} } +// Deprecated: Use CacheDirectiveEntryProto.ProtoReflect.Descriptor instead. +func (*CacheDirectiveEntryProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{108} +} -func (m *SetOwnerRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *CacheDirectiveEntryProto) GetInfo() *CacheDirectiveInfoProto { + if x != nil { + return x.Info } - return "" + return nil } -func (m *SetOwnerRequestProto) GetUsername() string { - if m != nil && m.Username != nil { - return *m.Username +func (x *CacheDirectiveEntryProto) GetStats() *CacheDirectiveStatsProto { + if x != nil { + return x.Stats } - return "" + return nil +} + +type ListCacheDirectivesResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Elements []*CacheDirectiveEntryProto `protobuf:"bytes,1,rep,name=elements" json:"elements,omitempty"` + HasMore *bool `protobuf:"varint,2,req,name=hasMore" json:"hasMore,omitempty"` } -func (m *SetOwnerRequestProto) GetGroupname() string { - if m != nil && m.Groupname != nil { - return *m.Groupname +func (x *ListCacheDirectivesResponseProto) Reset() { + *x = ListCacheDirectivesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type SetOwnerResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *ListCacheDirectivesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetOwnerResponseProto) Reset() { *m = SetOwnerResponseProto{} } -func (m *SetOwnerResponseProto) String() string { return proto.CompactTextString(m) } -func (*SetOwnerResponseProto) ProtoMessage() {} -func (*SetOwnerResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{21} } +func (*ListCacheDirectivesResponseProto) ProtoMessage() {} -type AbandonBlockRequestProto struct { - B *ExtendedBlockProto `protobuf:"bytes,1,req,name=b" json:"b,omitempty"` - Src *string `protobuf:"bytes,2,req,name=src" json:"src,omitempty"` - Holder *string `protobuf:"bytes,3,req,name=holder" json:"holder,omitempty"` - FileId *uint64 `protobuf:"varint,4,opt,name=fileId,def=0" json:"fileId,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ListCacheDirectivesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[109] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *AbandonBlockRequestProto) Reset() { *m = AbandonBlockRequestProto{} } -func (m *AbandonBlockRequestProto) String() string { return proto.CompactTextString(m) } -func (*AbandonBlockRequestProto) ProtoMessage() {} -func (*AbandonBlockRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{22} } - -const Default_AbandonBlockRequestProto_FileId uint64 = 0 +// Deprecated: Use ListCacheDirectivesResponseProto.ProtoReflect.Descriptor instead. +func (*ListCacheDirectivesResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{109} +} -func (m *AbandonBlockRequestProto) GetB() *ExtendedBlockProto { - if m != nil { - return m.B +func (x *ListCacheDirectivesResponseProto) GetElements() []*CacheDirectiveEntryProto { + if x != nil { + return x.Elements } return nil } -func (m *AbandonBlockRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *ListCacheDirectivesResponseProto) GetHasMore() bool { + if x != nil && x.HasMore != nil { + return *x.HasMore } - return "" + return false } -func (m *AbandonBlockRequestProto) GetHolder() string { - if m != nil && m.Holder != nil { - return *m.Holder - } - return "" +type CachePoolInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PoolName *string `protobuf:"bytes,1,opt,name=poolName" json:"poolName,omitempty"` + OwnerName *string `protobuf:"bytes,2,opt,name=ownerName" json:"ownerName,omitempty"` + GroupName *string `protobuf:"bytes,3,opt,name=groupName" json:"groupName,omitempty"` + Mode *int32 `protobuf:"varint,4,opt,name=mode" json:"mode,omitempty"` + Limit *int64 `protobuf:"varint,5,opt,name=limit" json:"limit,omitempty"` + MaxRelativeExpiry *int64 `protobuf:"varint,6,opt,name=maxRelativeExpiry" json:"maxRelativeExpiry,omitempty"` + DefaultReplication *uint32 `protobuf:"varint,7,opt,name=defaultReplication,def=1" json:"defaultReplication,omitempty"` } -func (m *AbandonBlockRequestProto) GetFileId() uint64 { - if m != nil && m.FileId != nil { - return *m.FileId +// Default values for CachePoolInfoProto fields. +const ( + Default_CachePoolInfoProto_DefaultReplication = uint32(1) +) + +func (x *CachePoolInfoProto) Reset() { + *x = CachePoolInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return Default_AbandonBlockRequestProto_FileId } -type AbandonBlockResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *CachePoolInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AbandonBlockResponseProto) Reset() { *m = AbandonBlockResponseProto{} } -func (m *AbandonBlockResponseProto) String() string { return proto.CompactTextString(m) } -func (*AbandonBlockResponseProto) ProtoMessage() {} -func (*AbandonBlockResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{23} } +func (*CachePoolInfoProto) ProtoMessage() {} -type AddBlockRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` - Previous *ExtendedBlockProto `protobuf:"bytes,3,opt,name=previous" json:"previous,omitempty"` - ExcludeNodes []*DatanodeInfoProto `protobuf:"bytes,4,rep,name=excludeNodes" json:"excludeNodes,omitempty"` - FileId *uint64 `protobuf:"varint,5,opt,name=fileId,def=0" json:"fileId,omitempty"` - FavoredNodes []string `protobuf:"bytes,6,rep,name=favoredNodes" json:"favoredNodes,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CachePoolInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[110] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *AddBlockRequestProto) Reset() { *m = AddBlockRequestProto{} } -func (m *AddBlockRequestProto) String() string { return proto.CompactTextString(m) } -func (*AddBlockRequestProto) ProtoMessage() {} -func (*AddBlockRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{24} } - -const Default_AddBlockRequestProto_FileId uint64 = 0 +// Deprecated: Use CachePoolInfoProto.ProtoReflect.Descriptor instead. +func (*CachePoolInfoProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{110} +} -func (m *AddBlockRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *CachePoolInfoProto) GetPoolName() string { + if x != nil && x.PoolName != nil { + return *x.PoolName } return "" } -func (m *AddBlockRequestProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName +func (x *CachePoolInfoProto) GetOwnerName() string { + if x != nil && x.OwnerName != nil { + return *x.OwnerName } return "" } -func (m *AddBlockRequestProto) GetPrevious() *ExtendedBlockProto { - if m != nil { - return m.Previous +func (x *CachePoolInfoProto) GetGroupName() string { + if x != nil && x.GroupName != nil { + return *x.GroupName } - return nil + return "" } -func (m *AddBlockRequestProto) GetExcludeNodes() []*DatanodeInfoProto { - if m != nil { - return m.ExcludeNodes +func (x *CachePoolInfoProto) GetMode() int32 { + if x != nil && x.Mode != nil { + return *x.Mode } - return nil + return 0 } -func (m *AddBlockRequestProto) GetFileId() uint64 { - if m != nil && m.FileId != nil { - return *m.FileId +func (x *CachePoolInfoProto) GetLimit() int64 { + if x != nil && x.Limit != nil { + return *x.Limit } - return Default_AddBlockRequestProto_FileId + return 0 } -func (m *AddBlockRequestProto) GetFavoredNodes() []string { - if m != nil { - return m.FavoredNodes +func (x *CachePoolInfoProto) GetMaxRelativeExpiry() int64 { + if x != nil && x.MaxRelativeExpiry != nil { + return *x.MaxRelativeExpiry } - return nil + return 0 } -type AddBlockResponseProto struct { - Block *LocatedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CachePoolInfoProto) GetDefaultReplication() uint32 { + if x != nil && x.DefaultReplication != nil { + return *x.DefaultReplication + } + return Default_CachePoolInfoProto_DefaultReplication } -func (m *AddBlockResponseProto) Reset() { *m = AddBlockResponseProto{} } -func (m *AddBlockResponseProto) String() string { return proto.CompactTextString(m) } -func (*AddBlockResponseProto) ProtoMessage() {} -func (*AddBlockResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{25} } +type CachePoolStatsProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *AddBlockResponseProto) GetBlock() *LocatedBlockProto { - if m != nil { - return m.Block - } - return nil + BytesNeeded *int64 `protobuf:"varint,1,req,name=bytesNeeded" json:"bytesNeeded,omitempty"` + BytesCached *int64 `protobuf:"varint,2,req,name=bytesCached" json:"bytesCached,omitempty"` + BytesOverlimit *int64 `protobuf:"varint,3,req,name=bytesOverlimit" json:"bytesOverlimit,omitempty"` + FilesNeeded *int64 `protobuf:"varint,4,req,name=filesNeeded" json:"filesNeeded,omitempty"` + FilesCached *int64 `protobuf:"varint,5,req,name=filesCached" json:"filesCached,omitempty"` } -type GetAdditionalDatanodeRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - Blk *ExtendedBlockProto `protobuf:"bytes,2,req,name=blk" json:"blk,omitempty"` - Existings []*DatanodeInfoProto `protobuf:"bytes,3,rep,name=existings" json:"existings,omitempty"` - Excludes []*DatanodeInfoProto `protobuf:"bytes,4,rep,name=excludes" json:"excludes,omitempty"` - NumAdditionalNodes *uint32 `protobuf:"varint,5,req,name=numAdditionalNodes" json:"numAdditionalNodes,omitempty"` - ClientName *string `protobuf:"bytes,6,req,name=clientName" json:"clientName,omitempty"` - ExistingStorageUuids []string `protobuf:"bytes,7,rep,name=existingStorageUuids" json:"existingStorageUuids,omitempty"` - FileId *uint64 `protobuf:"varint,8,opt,name=fileId,def=0" json:"fileId,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CachePoolStatsProto) Reset() { + *x = CachePoolStatsProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetAdditionalDatanodeRequestProto) Reset() { *m = GetAdditionalDatanodeRequestProto{} } -func (m *GetAdditionalDatanodeRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetAdditionalDatanodeRequestProto) ProtoMessage() {} -func (*GetAdditionalDatanodeRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{26} +func (x *CachePoolStatsProto) String() string { + return protoimpl.X.MessageStringOf(x) } -const Default_GetAdditionalDatanodeRequestProto_FileId uint64 = 0 +func (*CachePoolStatsProto) ProtoMessage() {} -func (m *GetAdditionalDatanodeRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *CachePoolStatsProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[111] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *GetAdditionalDatanodeRequestProto) GetBlk() *ExtendedBlockProto { - if m != nil { - return m.Blk - } - return nil +// Deprecated: Use CachePoolStatsProto.ProtoReflect.Descriptor instead. +func (*CachePoolStatsProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{111} } -func (m *GetAdditionalDatanodeRequestProto) GetExistings() []*DatanodeInfoProto { - if m != nil { - return m.Existings +func (x *CachePoolStatsProto) GetBytesNeeded() int64 { + if x != nil && x.BytesNeeded != nil { + return *x.BytesNeeded } - return nil + return 0 } -func (m *GetAdditionalDatanodeRequestProto) GetExcludes() []*DatanodeInfoProto { - if m != nil { - return m.Excludes +func (x *CachePoolStatsProto) GetBytesCached() int64 { + if x != nil && x.BytesCached != nil { + return *x.BytesCached } - return nil + return 0 } -func (m *GetAdditionalDatanodeRequestProto) GetNumAdditionalNodes() uint32 { - if m != nil && m.NumAdditionalNodes != nil { - return *m.NumAdditionalNodes +func (x *CachePoolStatsProto) GetBytesOverlimit() int64 { + if x != nil && x.BytesOverlimit != nil { + return *x.BytesOverlimit } return 0 } -func (m *GetAdditionalDatanodeRequestProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName +func (x *CachePoolStatsProto) GetFilesNeeded() int64 { + if x != nil && x.FilesNeeded != nil { + return *x.FilesNeeded } - return "" + return 0 } -func (m *GetAdditionalDatanodeRequestProto) GetExistingStorageUuids() []string { - if m != nil { - return m.ExistingStorageUuids +func (x *CachePoolStatsProto) GetFilesCached() int64 { + if x != nil && x.FilesCached != nil { + return *x.FilesCached } - return nil + return 0 +} + +type AddCachePoolRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *CachePoolInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` } -func (m *GetAdditionalDatanodeRequestProto) GetFileId() uint64 { - if m != nil && m.FileId != nil { - return *m.FileId +func (x *AddCachePoolRequestProto) Reset() { + *x = AddCachePoolRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return Default_GetAdditionalDatanodeRequestProto_FileId } -type GetAdditionalDatanodeResponseProto struct { - Block *LocatedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *AddCachePoolRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetAdditionalDatanodeResponseProto) Reset() { *m = GetAdditionalDatanodeResponseProto{} } -func (m *GetAdditionalDatanodeResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetAdditionalDatanodeResponseProto) ProtoMessage() {} -func (*GetAdditionalDatanodeResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{27} +func (*AddCachePoolRequestProto) ProtoMessage() {} + +func (x *AddCachePoolRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[112] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddCachePoolRequestProto.ProtoReflect.Descriptor instead. +func (*AddCachePoolRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{112} } -func (m *GetAdditionalDatanodeResponseProto) GetBlock() *LocatedBlockProto { - if m != nil { - return m.Block +func (x *AddCachePoolRequestProto) GetInfo() *CachePoolInfoProto { + if x != nil { + return x.Info } return nil } -type CompleteRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` - Last *ExtendedBlockProto `protobuf:"bytes,3,opt,name=last" json:"last,omitempty"` - FileId *uint64 `protobuf:"varint,4,opt,name=fileId,def=0" json:"fileId,omitempty"` - XXX_unrecognized []byte `json:"-"` +type AddCachePoolResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AddCachePoolResponseProto) Reset() { + *x = AddCachePoolResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CompleteRequestProto) Reset() { *m = CompleteRequestProto{} } -func (m *CompleteRequestProto) String() string { return proto.CompactTextString(m) } -func (*CompleteRequestProto) ProtoMessage() {} -func (*CompleteRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{28} } +func (x *AddCachePoolResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -const Default_CompleteRequestProto_FileId uint64 = 0 +func (*AddCachePoolResponseProto) ProtoMessage() {} -func (m *CompleteRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *AddCachePoolResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[113] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *CompleteRequestProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName - } - return "" +// Deprecated: Use AddCachePoolResponseProto.ProtoReflect.Descriptor instead. +func (*AddCachePoolResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{113} } -func (m *CompleteRequestProto) GetLast() *ExtendedBlockProto { - if m != nil { - return m.Last - } - return nil +type ModifyCachePoolRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *CachePoolInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` } -func (m *CompleteRequestProto) GetFileId() uint64 { - if m != nil && m.FileId != nil { - return *m.FileId +func (x *ModifyCachePoolRequestProto) Reset() { + *x = ModifyCachePoolRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return Default_CompleteRequestProto_FileId } -type CompleteResponseProto struct { - Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ModifyCachePoolRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CompleteResponseProto) Reset() { *m = CompleteResponseProto{} } -func (m *CompleteResponseProto) String() string { return proto.CompactTextString(m) } -func (*CompleteResponseProto) ProtoMessage() {} -func (*CompleteResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{29} } +func (*ModifyCachePoolRequestProto) ProtoMessage() {} -func (m *CompleteResponseProto) GetResult() bool { - if m != nil && m.Result != nil { - return *m.Result +func (x *ModifyCachePoolRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[114] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -type ReportBadBlocksRequestProto struct { - Blocks []*LocatedBlockProto `protobuf:"bytes,1,rep,name=blocks" json:"blocks,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use ModifyCachePoolRequestProto.ProtoReflect.Descriptor instead. +func (*ModifyCachePoolRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{114} } -func (m *ReportBadBlocksRequestProto) Reset() { *m = ReportBadBlocksRequestProto{} } -func (m *ReportBadBlocksRequestProto) String() string { return proto.CompactTextString(m) } -func (*ReportBadBlocksRequestProto) ProtoMessage() {} -func (*ReportBadBlocksRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{30} } - -func (m *ReportBadBlocksRequestProto) GetBlocks() []*LocatedBlockProto { - if m != nil { - return m.Blocks +func (x *ModifyCachePoolRequestProto) GetInfo() *CachePoolInfoProto { + if x != nil { + return x.Info } return nil } -type ReportBadBlocksResponseProto struct { - XXX_unrecognized []byte `json:"-"` +type ModifyCachePoolResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *ReportBadBlocksResponseProto) Reset() { *m = ReportBadBlocksResponseProto{} } -func (m *ReportBadBlocksResponseProto) String() string { return proto.CompactTextString(m) } -func (*ReportBadBlocksResponseProto) ProtoMessage() {} -func (*ReportBadBlocksResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{31} } +func (x *ModifyCachePoolResponseProto) Reset() { + *x = ModifyCachePoolResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -type ConcatRequestProto struct { - Trg *string `protobuf:"bytes,1,req,name=trg" json:"trg,omitempty"` - Srcs []string `protobuf:"bytes,2,rep,name=srcs" json:"srcs,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ModifyCachePoolResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ConcatRequestProto) Reset() { *m = ConcatRequestProto{} } -func (m *ConcatRequestProto) String() string { return proto.CompactTextString(m) } -func (*ConcatRequestProto) ProtoMessage() {} -func (*ConcatRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{32} } +func (*ModifyCachePoolResponseProto) ProtoMessage() {} -func (m *ConcatRequestProto) GetTrg() string { - if m != nil && m.Trg != nil { - return *m.Trg +func (x *ModifyCachePoolResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[115] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyCachePoolResponseProto.ProtoReflect.Descriptor instead. +func (*ModifyCachePoolResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{115} +} + +type RemoveCachePoolRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PoolName *string `protobuf:"bytes,1,req,name=poolName" json:"poolName,omitempty"` } -func (m *ConcatRequestProto) GetSrcs() []string { - if m != nil { - return m.Srcs +func (x *RemoveCachePoolRequestProto) Reset() { + *x = RemoveCachePoolRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type ConcatResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *RemoveCachePoolRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ConcatResponseProto) Reset() { *m = ConcatResponseProto{} } -func (m *ConcatResponseProto) String() string { return proto.CompactTextString(m) } -func (*ConcatResponseProto) ProtoMessage() {} -func (*ConcatResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{33} } +func (*RemoveCachePoolRequestProto) ProtoMessage() {} -type TruncateRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - NewLength *uint64 `protobuf:"varint,2,req,name=newLength" json:"newLength,omitempty"` - ClientName *string `protobuf:"bytes,3,req,name=clientName" json:"clientName,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *RemoveCachePoolRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[116] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *TruncateRequestProto) Reset() { *m = TruncateRequestProto{} } -func (m *TruncateRequestProto) String() string { return proto.CompactTextString(m) } -func (*TruncateRequestProto) ProtoMessage() {} -func (*TruncateRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{34} } +// Deprecated: Use RemoveCachePoolRequestProto.ProtoReflect.Descriptor instead. +func (*RemoveCachePoolRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{116} +} -func (m *TruncateRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *RemoveCachePoolRequestProto) GetPoolName() string { + if x != nil && x.PoolName != nil { + return *x.PoolName } return "" } -func (m *TruncateRequestProto) GetNewLength() uint64 { - if m != nil && m.NewLength != nil { - return *m.NewLength - } - return 0 +type RemoveCachePoolResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *TruncateRequestProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName +func (x *RemoveCachePoolResponseProto) Reset() { + *x = RemoveCachePoolResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type TruncateResponseProto struct { - Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *RemoveCachePoolResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TruncateResponseProto) Reset() { *m = TruncateResponseProto{} } -func (m *TruncateResponseProto) String() string { return proto.CompactTextString(m) } -func (*TruncateResponseProto) ProtoMessage() {} -func (*TruncateResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{35} } +func (*RemoveCachePoolResponseProto) ProtoMessage() {} -func (m *TruncateResponseProto) GetResult() bool { - if m != nil && m.Result != nil { - return *m.Result +func (x *RemoveCachePoolResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[117] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -type RenameRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - Dst *string `protobuf:"bytes,2,req,name=dst" json:"dst,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use RemoveCachePoolResponseProto.ProtoReflect.Descriptor instead. +func (*RemoveCachePoolResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{117} } -func (m *RenameRequestProto) Reset() { *m = RenameRequestProto{} } -func (m *RenameRequestProto) String() string { return proto.CompactTextString(m) } -func (*RenameRequestProto) ProtoMessage() {} -func (*RenameRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{36} } +type ListCachePoolsRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *RenameRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src - } - return "" + PrevPoolName *string `protobuf:"bytes,1,req,name=prevPoolName" json:"prevPoolName,omitempty"` } -func (m *RenameRequestProto) GetDst() string { - if m != nil && m.Dst != nil { - return *m.Dst +func (x *ListCachePoolsRequestProto) Reset() { + *x = ListCachePoolsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type RenameResponseProto struct { - Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ListCachePoolsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RenameResponseProto) Reset() { *m = RenameResponseProto{} } -func (m *RenameResponseProto) String() string { return proto.CompactTextString(m) } -func (*RenameResponseProto) ProtoMessage() {} -func (*RenameResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{37} } +func (*ListCachePoolsRequestProto) ProtoMessage() {} -func (m *RenameResponseProto) GetResult() bool { - if m != nil && m.Result != nil { - return *m.Result +func (x *ListCachePoolsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[118] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -type Rename2RequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - Dst *string `protobuf:"bytes,2,req,name=dst" json:"dst,omitempty"` - OverwriteDest *bool `protobuf:"varint,3,req,name=overwriteDest" json:"overwriteDest,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use ListCachePoolsRequestProto.ProtoReflect.Descriptor instead. +func (*ListCachePoolsRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{118} } -func (m *Rename2RequestProto) Reset() { *m = Rename2RequestProto{} } -func (m *Rename2RequestProto) String() string { return proto.CompactTextString(m) } -func (*Rename2RequestProto) ProtoMessage() {} -func (*Rename2RequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{38} } - -func (m *Rename2RequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *ListCachePoolsRequestProto) GetPrevPoolName() string { + if x != nil && x.PrevPoolName != nil { + return *x.PrevPoolName } return "" } -func (m *Rename2RequestProto) GetDst() string { - if m != nil && m.Dst != nil { - return *m.Dst - } - return "" +type ListCachePoolsResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entries []*CachePoolEntryProto `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` + HasMore *bool `protobuf:"varint,2,req,name=hasMore" json:"hasMore,omitempty"` } -func (m *Rename2RequestProto) GetOverwriteDest() bool { - if m != nil && m.OverwriteDest != nil { - return *m.OverwriteDest +func (x *ListCachePoolsResponseProto) Reset() { + *x = ListCachePoolsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return false } -type Rename2ResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *ListCachePoolsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Rename2ResponseProto) Reset() { *m = Rename2ResponseProto{} } -func (m *Rename2ResponseProto) String() string { return proto.CompactTextString(m) } -func (*Rename2ResponseProto) ProtoMessage() {} -func (*Rename2ResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{39} } +func (*ListCachePoolsResponseProto) ProtoMessage() {} -type DeleteRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - Recursive *bool `protobuf:"varint,2,req,name=recursive" json:"recursive,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ListCachePoolsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[119] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *DeleteRequestProto) Reset() { *m = DeleteRequestProto{} } -func (m *DeleteRequestProto) String() string { return proto.CompactTextString(m) } -func (*DeleteRequestProto) ProtoMessage() {} -func (*DeleteRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{40} } +// Deprecated: Use ListCachePoolsResponseProto.ProtoReflect.Descriptor instead. +func (*ListCachePoolsResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{119} +} -func (m *DeleteRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *ListCachePoolsResponseProto) GetEntries() []*CachePoolEntryProto { + if x != nil { + return x.Entries } - return "" + return nil } -func (m *DeleteRequestProto) GetRecursive() bool { - if m != nil && m.Recursive != nil { - return *m.Recursive +func (x *ListCachePoolsResponseProto) GetHasMore() bool { + if x != nil && x.HasMore != nil { + return *x.HasMore } return false } -type DeleteResponseProto struct { - Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` - XXX_unrecognized []byte `json:"-"` -} +type CachePoolEntryProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *DeleteResponseProto) Reset() { *m = DeleteResponseProto{} } -func (m *DeleteResponseProto) String() string { return proto.CompactTextString(m) } -func (*DeleteResponseProto) ProtoMessage() {} -func (*DeleteResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{41} } + Info *CachePoolInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` + Stats *CachePoolStatsProto `protobuf:"bytes,2,req,name=stats" json:"stats,omitempty"` +} -func (m *DeleteResponseProto) GetResult() bool { - if m != nil && m.Result != nil { - return *m.Result +func (x *CachePoolEntryProto) Reset() { + *x = CachePoolEntryProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return false } -type MkdirsRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - Masked *FsPermissionProto `protobuf:"bytes,2,req,name=masked" json:"masked,omitempty"` - CreateParent *bool `protobuf:"varint,3,req,name=createParent" json:"createParent,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CachePoolEntryProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *MkdirsRequestProto) Reset() { *m = MkdirsRequestProto{} } -func (m *MkdirsRequestProto) String() string { return proto.CompactTextString(m) } -func (*MkdirsRequestProto) ProtoMessage() {} -func (*MkdirsRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{42} } +func (*CachePoolEntryProto) ProtoMessage() {} -func (m *MkdirsRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *CachePoolEntryProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[120] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) +} + +// Deprecated: Use CachePoolEntryProto.ProtoReflect.Descriptor instead. +func (*CachePoolEntryProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{120} } -func (m *MkdirsRequestProto) GetMasked() *FsPermissionProto { - if m != nil { - return m.Masked +func (x *CachePoolEntryProto) GetInfo() *CachePoolInfoProto { + if x != nil { + return x.Info } return nil } -func (m *MkdirsRequestProto) GetCreateParent() bool { - if m != nil && m.CreateParent != nil { - return *m.CreateParent +func (x *CachePoolEntryProto) GetStats() *CachePoolStatsProto { + if x != nil { + return x.Stats } - return false + return nil } -type MkdirsResponseProto struct { - Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` - XXX_unrecognized []byte `json:"-"` -} +type GetFileLinkInfoRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *MkdirsResponseProto) Reset() { *m = MkdirsResponseProto{} } -func (m *MkdirsResponseProto) String() string { return proto.CompactTextString(m) } -func (*MkdirsResponseProto) ProtoMessage() {} -func (*MkdirsResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{43} } + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` +} -func (m *MkdirsResponseProto) GetResult() bool { - if m != nil && m.Result != nil { - return *m.Result +func (x *GetFileLinkInfoRequestProto) Reset() { + *x = GetFileLinkInfoRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[121] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return false } -type GetListingRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - StartAfter []byte `protobuf:"bytes,2,req,name=startAfter" json:"startAfter,omitempty"` - NeedLocation *bool `protobuf:"varint,3,req,name=needLocation" json:"needLocation,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetFileLinkInfoRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetListingRequestProto) Reset() { *m = GetListingRequestProto{} } -func (m *GetListingRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetListingRequestProto) ProtoMessage() {} -func (*GetListingRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{44} } +func (*GetFileLinkInfoRequestProto) ProtoMessage() {} -func (m *GetListingRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *GetFileLinkInfoRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[121] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *GetListingRequestProto) GetStartAfter() []byte { - if m != nil { - return m.StartAfter - } - return nil +// Deprecated: Use GetFileLinkInfoRequestProto.ProtoReflect.Descriptor instead. +func (*GetFileLinkInfoRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{121} } -func (m *GetListingRequestProto) GetNeedLocation() bool { - if m != nil && m.NeedLocation != nil { - return *m.NeedLocation +func (x *GetFileLinkInfoRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } - return false + return "" } -type GetListingResponseProto struct { - DirList *DirectoryListingProto `protobuf:"bytes,1,opt,name=dirList" json:"dirList,omitempty"` - XXX_unrecognized []byte `json:"-"` -} +type GetFileLinkInfoResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetListingResponseProto) Reset() { *m = GetListingResponseProto{} } -func (m *GetListingResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetListingResponseProto) ProtoMessage() {} -func (*GetListingResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{45} } + Fs *HdfsFileStatusProto `protobuf:"bytes,1,opt,name=fs" json:"fs,omitempty"` +} -func (m *GetListingResponseProto) GetDirList() *DirectoryListingProto { - if m != nil { - return m.DirList +func (x *GetFileLinkInfoResponseProto) Reset() { + *x = GetFileLinkInfoResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[122] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type GetSnapshottableDirListingRequestProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *GetFileLinkInfoResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSnapshottableDirListingRequestProto) Reset() { - *m = GetSnapshottableDirListingRequestProto{} -} -func (m *GetSnapshottableDirListingRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetSnapshottableDirListingRequestProto) ProtoMessage() {} -func (*GetSnapshottableDirListingRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{46} -} +func (*GetFileLinkInfoResponseProto) ProtoMessage() {} -type GetSnapshottableDirListingResponseProto struct { - SnapshottableDirList *SnapshottableDirectoryListingProto `protobuf:"bytes,1,opt,name=snapshottableDirList" json:"snapshottableDirList,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetFileLinkInfoResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[122] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetSnapshottableDirListingResponseProto) Reset() { - *m = GetSnapshottableDirListingResponseProto{} -} -func (m *GetSnapshottableDirListingResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetSnapshottableDirListingResponseProto) ProtoMessage() {} -func (*GetSnapshottableDirListingResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{47} +// Deprecated: Use GetFileLinkInfoResponseProto.ProtoReflect.Descriptor instead. +func (*GetFileLinkInfoResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{122} } -func (m *GetSnapshottableDirListingResponseProto) GetSnapshottableDirList() *SnapshottableDirectoryListingProto { - if m != nil { - return m.SnapshottableDirList +func (x *GetFileLinkInfoResponseProto) GetFs() *HdfsFileStatusProto { + if x != nil { + return x.Fs } return nil } -type GetSnapshotDiffReportRequestProto struct { - SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` - FromSnapshot *string `protobuf:"bytes,2,req,name=fromSnapshot" json:"fromSnapshot,omitempty"` - ToSnapshot *string `protobuf:"bytes,3,req,name=toSnapshot" json:"toSnapshot,omitempty"` - XXX_unrecognized []byte `json:"-"` +type GetContentSummaryRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` } -func (m *GetSnapshotDiffReportRequestProto) Reset() { *m = GetSnapshotDiffReportRequestProto{} } -func (m *GetSnapshotDiffReportRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetSnapshotDiffReportRequestProto) ProtoMessage() {} -func (*GetSnapshotDiffReportRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{48} +func (x *GetContentSummaryRequestProto) Reset() { + *x = GetContentSummaryRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[123] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetContentSummaryRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSnapshotDiffReportRequestProto) GetSnapshotRoot() string { - if m != nil && m.SnapshotRoot != nil { - return *m.SnapshotRoot +func (*GetContentSummaryRequestProto) ProtoMessage() {} + +func (x *GetContentSummaryRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[123] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) +} + +// Deprecated: Use GetContentSummaryRequestProto.ProtoReflect.Descriptor instead. +func (*GetContentSummaryRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{123} } -func (m *GetSnapshotDiffReportRequestProto) GetFromSnapshot() string { - if m != nil && m.FromSnapshot != nil { - return *m.FromSnapshot +func (x *GetContentSummaryRequestProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } return "" } -func (m *GetSnapshotDiffReportRequestProto) GetToSnapshot() string { - if m != nil && m.ToSnapshot != nil { - return *m.ToSnapshot +type GetContentSummaryResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Summary *ContentSummaryProto `protobuf:"bytes,1,req,name=summary" json:"summary,omitempty"` +} + +func (x *GetContentSummaryResponseProto) Reset() { + *x = GetContentSummaryResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type GetSnapshotDiffReportResponseProto struct { - DiffReport *SnapshotDiffReportProto `protobuf:"bytes,1,req,name=diffReport" json:"diffReport,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetContentSummaryResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetSnapshotDiffReportResponseProto) Reset() { *m = GetSnapshotDiffReportResponseProto{} } -func (m *GetSnapshotDiffReportResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetSnapshotDiffReportResponseProto) ProtoMessage() {} -func (*GetSnapshotDiffReportResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{49} +func (*GetContentSummaryResponseProto) ProtoMessage() {} + +func (x *GetContentSummaryResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[124] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetContentSummaryResponseProto.ProtoReflect.Descriptor instead. +func (*GetContentSummaryResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{124} } -func (m *GetSnapshotDiffReportResponseProto) GetDiffReport() *SnapshotDiffReportProto { - if m != nil { - return m.DiffReport +func (x *GetContentSummaryResponseProto) GetSummary() *ContentSummaryProto { + if x != nil { + return x.Summary } return nil } -type RenewLeaseRequestProto struct { - ClientName *string `protobuf:"bytes,1,req,name=clientName" json:"clientName,omitempty"` - XXX_unrecognized []byte `json:"-"` -} +type GetQuotaUsageRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *RenewLeaseRequestProto) Reset() { *m = RenewLeaseRequestProto{} } -func (m *RenewLeaseRequestProto) String() string { return proto.CompactTextString(m) } -func (*RenewLeaseRequestProto) ProtoMessage() {} -func (*RenewLeaseRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{50} } + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` +} -func (m *RenewLeaseRequestProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName +func (x *GetQuotaUsageRequestProto) Reset() { + *x = GetQuotaUsageRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type RenewLeaseResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *GetQuotaUsageRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RenewLeaseResponseProto) Reset() { *m = RenewLeaseResponseProto{} } -func (m *RenewLeaseResponseProto) String() string { return proto.CompactTextString(m) } -func (*RenewLeaseResponseProto) ProtoMessage() {} -func (*RenewLeaseResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{51} } +func (*GetQuotaUsageRequestProto) ProtoMessage() {} -type RecoverLeaseRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetQuotaUsageRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[125] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *RecoverLeaseRequestProto) Reset() { *m = RecoverLeaseRequestProto{} } -func (m *RecoverLeaseRequestProto) String() string { return proto.CompactTextString(m) } -func (*RecoverLeaseRequestProto) ProtoMessage() {} -func (*RecoverLeaseRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{52} } +// Deprecated: Use GetQuotaUsageRequestProto.ProtoReflect.Descriptor instead. +func (*GetQuotaUsageRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{125} +} -func (m *RecoverLeaseRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *GetQuotaUsageRequestProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } return "" } -func (m *RecoverLeaseRequestProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName +type GetQuotaUsageResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Usage *QuotaUsageProto `protobuf:"bytes,1,req,name=usage" json:"usage,omitempty"` +} + +func (x *GetQuotaUsageResponseProto) Reset() { + *x = GetQuotaUsageResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type RecoverLeaseResponseProto struct { - Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetQuotaUsageResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RecoverLeaseResponseProto) Reset() { *m = RecoverLeaseResponseProto{} } -func (m *RecoverLeaseResponseProto) String() string { return proto.CompactTextString(m) } -func (*RecoverLeaseResponseProto) ProtoMessage() {} -func (*RecoverLeaseResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{53} } +func (*GetQuotaUsageResponseProto) ProtoMessage() {} -func (m *RecoverLeaseResponseProto) GetResult() bool { - if m != nil && m.Result != nil { - return *m.Result +func (x *GetQuotaUsageResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[126] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -type GetFsStatusRequestProto struct { - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use GetQuotaUsageResponseProto.ProtoReflect.Descriptor instead. +func (*GetQuotaUsageResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{126} } -func (m *GetFsStatusRequestProto) Reset() { *m = GetFsStatusRequestProto{} } -func (m *GetFsStatusRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetFsStatusRequestProto) ProtoMessage() {} -func (*GetFsStatusRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{54} } - -type GetFsStatsResponseProto struct { - Capacity *uint64 `protobuf:"varint,1,req,name=capacity" json:"capacity,omitempty"` - Used *uint64 `protobuf:"varint,2,req,name=used" json:"used,omitempty"` - Remaining *uint64 `protobuf:"varint,3,req,name=remaining" json:"remaining,omitempty"` - UnderReplicated *uint64 `protobuf:"varint,4,req,name=under_replicated,json=underReplicated" json:"under_replicated,omitempty"` - CorruptBlocks *uint64 `protobuf:"varint,5,req,name=corrupt_blocks,json=corruptBlocks" json:"corrupt_blocks,omitempty"` - MissingBlocks *uint64 `protobuf:"varint,6,req,name=missing_blocks,json=missingBlocks" json:"missing_blocks,omitempty"` - MissingReplOneBlocks *uint64 `protobuf:"varint,7,opt,name=missing_repl_one_blocks,json=missingReplOneBlocks" json:"missing_repl_one_blocks,omitempty"` - BlocksInFuture *uint64 `protobuf:"varint,8,opt,name=blocks_in_future,json=blocksInFuture" json:"blocks_in_future,omitempty"` - PendingDeletionBlocks *uint64 `protobuf:"varint,9,opt,name=pending_deletion_blocks,json=pendingDeletionBlocks" json:"pending_deletion_blocks,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetQuotaUsageResponseProto) GetUsage() *QuotaUsageProto { + if x != nil { + return x.Usage + } + return nil } -func (m *GetFsStatsResponseProto) Reset() { *m = GetFsStatsResponseProto{} } -func (m *GetFsStatsResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetFsStatsResponseProto) ProtoMessage() {} -func (*GetFsStatsResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{55} } +type SetQuotaRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetFsStatsResponseProto) GetCapacity() uint64 { - if m != nil && m.Capacity != nil { - return *m.Capacity - } - return 0 + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` + NamespaceQuota *uint64 `protobuf:"varint,2,req,name=namespaceQuota" json:"namespaceQuota,omitempty"` + StoragespaceQuota *uint64 `protobuf:"varint,3,req,name=storagespaceQuota" json:"storagespaceQuota,omitempty"` + StorageType *StorageTypeProto `protobuf:"varint,4,opt,name=storageType,enum=hadoop.hdfs.StorageTypeProto" json:"storageType,omitempty"` } -func (m *GetFsStatsResponseProto) GetUsed() uint64 { - if m != nil && m.Used != nil { - return *m.Used +func (x *SetQuotaRequestProto) Reset() { + *x = SetQuotaRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (m *GetFsStatsResponseProto) GetRemaining() uint64 { - if m != nil && m.Remaining != nil { - return *m.Remaining - } - return 0 +func (x *SetQuotaRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetFsStatsResponseProto) GetUnderReplicated() uint64 { - if m != nil && m.UnderReplicated != nil { - return *m.UnderReplicated +func (*SetQuotaRequestProto) ProtoMessage() {} + +func (x *SetQuotaRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[127] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (m *GetFsStatsResponseProto) GetCorruptBlocks() uint64 { - if m != nil && m.CorruptBlocks != nil { - return *m.CorruptBlocks - } - return 0 +// Deprecated: Use SetQuotaRequestProto.ProtoReflect.Descriptor instead. +func (*SetQuotaRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{127} } -func (m *GetFsStatsResponseProto) GetMissingBlocks() uint64 { - if m != nil && m.MissingBlocks != nil { - return *m.MissingBlocks +func (x *SetQuotaRequestProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } - return 0 + return "" } -func (m *GetFsStatsResponseProto) GetMissingReplOneBlocks() uint64 { - if m != nil && m.MissingReplOneBlocks != nil { - return *m.MissingReplOneBlocks +func (x *SetQuotaRequestProto) GetNamespaceQuota() uint64 { + if x != nil && x.NamespaceQuota != nil { + return *x.NamespaceQuota } return 0 } -func (m *GetFsStatsResponseProto) GetBlocksInFuture() uint64 { - if m != nil && m.BlocksInFuture != nil { - return *m.BlocksInFuture +func (x *SetQuotaRequestProto) GetStoragespaceQuota() uint64 { + if x != nil && x.StoragespaceQuota != nil { + return *x.StoragespaceQuota } return 0 } -func (m *GetFsStatsResponseProto) GetPendingDeletionBlocks() uint64 { - if m != nil && m.PendingDeletionBlocks != nil { - return *m.PendingDeletionBlocks +func (x *SetQuotaRequestProto) GetStorageType() StorageTypeProto { + if x != nil && x.StorageType != nil { + return *x.StorageType } - return 0 + return StorageTypeProto_DISK } -type GetDatanodeReportRequestProto struct { - Type *DatanodeReportTypeProto `protobuf:"varint,1,req,name=type,enum=hadoop.hdfs.DatanodeReportTypeProto" json:"type,omitempty"` - XXX_unrecognized []byte `json:"-"` +type SetQuotaResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *GetDatanodeReportRequestProto) Reset() { *m = GetDatanodeReportRequestProto{} } -func (m *GetDatanodeReportRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetDatanodeReportRequestProto) ProtoMessage() {} -func (*GetDatanodeReportRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{56} } - -func (m *GetDatanodeReportRequestProto) GetType() DatanodeReportTypeProto { - if m != nil && m.Type != nil { - return *m.Type +func (x *SetQuotaResponseProto) Reset() { + *x = SetQuotaResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return DatanodeReportTypeProto_ALL } -type GetDatanodeReportResponseProto struct { - Di []*DatanodeInfoProto `protobuf:"bytes,1,rep,name=di" json:"di,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *SetQuotaResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetDatanodeReportResponseProto) Reset() { *m = GetDatanodeReportResponseProto{} } -func (m *GetDatanodeReportResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetDatanodeReportResponseProto) ProtoMessage() {} -func (*GetDatanodeReportResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{57} } +func (*SetQuotaResponseProto) ProtoMessage() {} -func (m *GetDatanodeReportResponseProto) GetDi() []*DatanodeInfoProto { - if m != nil { - return m.Di +func (x *SetQuotaResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[128] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type GetDatanodeStorageReportRequestProto struct { - Type *DatanodeReportTypeProto `protobuf:"varint,1,req,name=type,enum=hadoop.hdfs.DatanodeReportTypeProto" json:"type,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use SetQuotaResponseProto.ProtoReflect.Descriptor instead. +func (*SetQuotaResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{128} } -func (m *GetDatanodeStorageReportRequestProto) Reset() { *m = GetDatanodeStorageReportRequestProto{} } -func (m *GetDatanodeStorageReportRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetDatanodeStorageReportRequestProto) ProtoMessage() {} -func (*GetDatanodeStorageReportRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{58} +type FsyncRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + Client *string `protobuf:"bytes,2,req,name=client" json:"client,omitempty"` + LastBlockLength *int64 `protobuf:"zigzag64,3,opt,name=lastBlockLength,def=-1" json:"lastBlockLength,omitempty"` + FileId *uint64 `protobuf:"varint,4,opt,name=fileId,def=0" json:"fileId,omitempty"` // default to GRANDFATHER_INODE_ID } -func (m *GetDatanodeStorageReportRequestProto) GetType() DatanodeReportTypeProto { - if m != nil && m.Type != nil { - return *m.Type +// Default values for FsyncRequestProto fields. +const ( + Default_FsyncRequestProto_LastBlockLength = int64(-1) + Default_FsyncRequestProto_FileId = uint64(0) +) + +func (x *FsyncRequestProto) Reset() { + *x = FsyncRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return DatanodeReportTypeProto_ALL } -type DatanodeStorageReportProto struct { - DatanodeInfo *DatanodeInfoProto `protobuf:"bytes,1,req,name=datanodeInfo" json:"datanodeInfo,omitempty"` - StorageReports []*StorageReportProto `protobuf:"bytes,2,rep,name=storageReports" json:"storageReports,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *FsyncRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DatanodeStorageReportProto) Reset() { *m = DatanodeStorageReportProto{} } -func (m *DatanodeStorageReportProto) String() string { return proto.CompactTextString(m) } -func (*DatanodeStorageReportProto) ProtoMessage() {} -func (*DatanodeStorageReportProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{59} } +func (*FsyncRequestProto) ProtoMessage() {} -func (m *DatanodeStorageReportProto) GetDatanodeInfo() *DatanodeInfoProto { - if m != nil { - return m.DatanodeInfo +func (x *FsyncRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[129] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *DatanodeStorageReportProto) GetStorageReports() []*StorageReportProto { - if m != nil { - return m.StorageReports - } - return nil +// Deprecated: Use FsyncRequestProto.ProtoReflect.Descriptor instead. +func (*FsyncRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{129} } -type GetDatanodeStorageReportResponseProto struct { - DatanodeStorageReports []*DatanodeStorageReportProto `protobuf:"bytes,1,rep,name=datanodeStorageReports" json:"datanodeStorageReports,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *FsyncRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" } -func (m *GetDatanodeStorageReportResponseProto) Reset() { *m = GetDatanodeStorageReportResponseProto{} } -func (m *GetDatanodeStorageReportResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetDatanodeStorageReportResponseProto) ProtoMessage() {} -func (*GetDatanodeStorageReportResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{60} +func (x *FsyncRequestProto) GetClient() string { + if x != nil && x.Client != nil { + return *x.Client + } + return "" } -func (m *GetDatanodeStorageReportResponseProto) GetDatanodeStorageReports() []*DatanodeStorageReportProto { - if m != nil { - return m.DatanodeStorageReports +func (x *FsyncRequestProto) GetLastBlockLength() int64 { + if x != nil && x.LastBlockLength != nil { + return *x.LastBlockLength } - return nil + return Default_FsyncRequestProto_LastBlockLength } -type GetPreferredBlockSizeRequestProto struct { - Filename *string `protobuf:"bytes,1,req,name=filename" json:"filename,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *FsyncRequestProto) GetFileId() uint64 { + if x != nil && x.FileId != nil { + return *x.FileId + } + return Default_FsyncRequestProto_FileId } -func (m *GetPreferredBlockSizeRequestProto) Reset() { *m = GetPreferredBlockSizeRequestProto{} } -func (m *GetPreferredBlockSizeRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetPreferredBlockSizeRequestProto) ProtoMessage() {} -func (*GetPreferredBlockSizeRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{61} +type FsyncResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *GetPreferredBlockSizeRequestProto) GetFilename() string { - if m != nil && m.Filename != nil { - return *m.Filename +func (x *FsyncResponseProto) Reset() { + *x = FsyncResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type GetPreferredBlockSizeResponseProto struct { - Bsize *uint64 `protobuf:"varint,1,req,name=bsize" json:"bsize,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *FsyncResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetPreferredBlockSizeResponseProto) Reset() { *m = GetPreferredBlockSizeResponseProto{} } -func (m *GetPreferredBlockSizeResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetPreferredBlockSizeResponseProto) ProtoMessage() {} -func (*GetPreferredBlockSizeResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{62} -} +func (*FsyncResponseProto) ProtoMessage() {} -func (m *GetPreferredBlockSizeResponseProto) GetBsize() uint64 { - if m != nil && m.Bsize != nil { - return *m.Bsize +func (x *FsyncResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[130] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -type SetSafeModeRequestProto struct { - Action *SafeModeActionProto `protobuf:"varint,1,req,name=action,enum=hadoop.hdfs.SafeModeActionProto" json:"action,omitempty"` - Checked *bool `protobuf:"varint,2,opt,name=checked,def=0" json:"checked,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use FsyncResponseProto.ProtoReflect.Descriptor instead. +func (*FsyncResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{130} } -func (m *SetSafeModeRequestProto) Reset() { *m = SetSafeModeRequestProto{} } -func (m *SetSafeModeRequestProto) String() string { return proto.CompactTextString(m) } -func (*SetSafeModeRequestProto) ProtoMessage() {} -func (*SetSafeModeRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{63} } - -const Default_SetSafeModeRequestProto_Checked bool = false +type SetTimesRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetSafeModeRequestProto) GetAction() SafeModeActionProto { - if m != nil && m.Action != nil { - return *m.Action - } - return SafeModeActionProto_SAFEMODE_LEAVE + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + Mtime *uint64 `protobuf:"varint,2,req,name=mtime" json:"mtime,omitempty"` + Atime *uint64 `protobuf:"varint,3,req,name=atime" json:"atime,omitempty"` } -func (m *SetSafeModeRequestProto) GetChecked() bool { - if m != nil && m.Checked != nil { - return *m.Checked +func (x *SetTimesRequestProto) Reset() { + *x = SetTimesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return Default_SetSafeModeRequestProto_Checked } -type SetSafeModeResponseProto struct { - Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *SetTimesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetSafeModeResponseProto) Reset() { *m = SetSafeModeResponseProto{} } -func (m *SetSafeModeResponseProto) String() string { return proto.CompactTextString(m) } -func (*SetSafeModeResponseProto) ProtoMessage() {} -func (*SetSafeModeResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{64} } +func (*SetTimesRequestProto) ProtoMessage() {} -func (m *SetSafeModeResponseProto) GetResult() bool { - if m != nil && m.Result != nil { - return *m.Result +func (x *SetTimesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[131] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -type SaveNamespaceRequestProto struct { - TimeWindow *uint64 `protobuf:"varint,1,opt,name=timeWindow,def=0" json:"timeWindow,omitempty"` - TxGap *uint64 `protobuf:"varint,2,opt,name=txGap,def=0" json:"txGap,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use SetTimesRequestProto.ProtoReflect.Descriptor instead. +func (*SetTimesRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{131} } -func (m *SaveNamespaceRequestProto) Reset() { *m = SaveNamespaceRequestProto{} } -func (m *SaveNamespaceRequestProto) String() string { return proto.CompactTextString(m) } -func (*SaveNamespaceRequestProto) ProtoMessage() {} -func (*SaveNamespaceRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{65} } - -const Default_SaveNamespaceRequestProto_TimeWindow uint64 = 0 -const Default_SaveNamespaceRequestProto_TxGap uint64 = 0 +func (x *SetTimesRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} -func (m *SaveNamespaceRequestProto) GetTimeWindow() uint64 { - if m != nil && m.TimeWindow != nil { - return *m.TimeWindow +func (x *SetTimesRequestProto) GetMtime() uint64 { + if x != nil && x.Mtime != nil { + return *x.Mtime } - return Default_SaveNamespaceRequestProto_TimeWindow + return 0 } -func (m *SaveNamespaceRequestProto) GetTxGap() uint64 { - if m != nil && m.TxGap != nil { - return *m.TxGap +func (x *SetTimesRequestProto) GetAtime() uint64 { + if x != nil && x.Atime != nil { + return *x.Atime } - return Default_SaveNamespaceRequestProto_TxGap + return 0 } -type SaveNamespaceResponseProto struct { - Saved *bool `protobuf:"varint,1,opt,name=saved,def=1" json:"saved,omitempty"` - XXX_unrecognized []byte `json:"-"` +type SetTimesResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetTimesResponseProto) Reset() { + *x = SetTimesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SaveNamespaceResponseProto) Reset() { *m = SaveNamespaceResponseProto{} } -func (m *SaveNamespaceResponseProto) String() string { return proto.CompactTextString(m) } -func (*SaveNamespaceResponseProto) ProtoMessage() {} -func (*SaveNamespaceResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{66} } +func (x *SetTimesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -const Default_SaveNamespaceResponseProto_Saved bool = true +func (*SetTimesResponseProto) ProtoMessage() {} -func (m *SaveNamespaceResponseProto) GetSaved() bool { - if m != nil && m.Saved != nil { - return *m.Saved +func (x *SetTimesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[132] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return Default_SaveNamespaceResponseProto_Saved + return mi.MessageOf(x) } -type RollEditsRequestProto struct { - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use SetTimesResponseProto.ProtoReflect.Descriptor instead. +func (*SetTimesResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{132} } -func (m *RollEditsRequestProto) Reset() { *m = RollEditsRequestProto{} } -func (m *RollEditsRequestProto) String() string { return proto.CompactTextString(m) } -func (*RollEditsRequestProto) ProtoMessage() {} -func (*RollEditsRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{67} } +type CreateSymlinkRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -type RollEditsResponseProto struct { - NewSegmentTxId *uint64 `protobuf:"varint,1,req,name=newSegmentTxId" json:"newSegmentTxId,omitempty"` - XXX_unrecognized []byte `json:"-"` + Target *string `protobuf:"bytes,1,req,name=target" json:"target,omitempty"` + Link *string `protobuf:"bytes,2,req,name=link" json:"link,omitempty"` + DirPerm *FsPermissionProto `protobuf:"bytes,3,req,name=dirPerm" json:"dirPerm,omitempty"` + CreateParent *bool `protobuf:"varint,4,req,name=createParent" json:"createParent,omitempty"` } -func (m *RollEditsResponseProto) Reset() { *m = RollEditsResponseProto{} } -func (m *RollEditsResponseProto) String() string { return proto.CompactTextString(m) } -func (*RollEditsResponseProto) ProtoMessage() {} -func (*RollEditsResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{68} } - -func (m *RollEditsResponseProto) GetNewSegmentTxId() uint64 { - if m != nil && m.NewSegmentTxId != nil { - return *m.NewSegmentTxId +func (x *CreateSymlinkRequestProto) Reset() { + *x = CreateSymlinkRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -type RestoreFailedStorageRequestProto struct { - Arg *string `protobuf:"bytes,1,req,name=arg" json:"arg,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CreateSymlinkRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RestoreFailedStorageRequestProto) Reset() { *m = RestoreFailedStorageRequestProto{} } -func (m *RestoreFailedStorageRequestProto) String() string { return proto.CompactTextString(m) } -func (*RestoreFailedStorageRequestProto) ProtoMessage() {} -func (*RestoreFailedStorageRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{69} +func (*CreateSymlinkRequestProto) ProtoMessage() {} + +func (x *CreateSymlinkRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[133] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSymlinkRequestProto.ProtoReflect.Descriptor instead. +func (*CreateSymlinkRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{133} } -func (m *RestoreFailedStorageRequestProto) GetArg() string { - if m != nil && m.Arg != nil { - return *m.Arg +func (x *CreateSymlinkRequestProto) GetTarget() string { + if x != nil && x.Target != nil { + return *x.Target } return "" } -type RestoreFailedStorageResponseProto struct { - Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CreateSymlinkRequestProto) GetLink() string { + if x != nil && x.Link != nil { + return *x.Link + } + return "" } -func (m *RestoreFailedStorageResponseProto) Reset() { *m = RestoreFailedStorageResponseProto{} } -func (m *RestoreFailedStorageResponseProto) String() string { return proto.CompactTextString(m) } -func (*RestoreFailedStorageResponseProto) ProtoMessage() {} -func (*RestoreFailedStorageResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{70} +func (x *CreateSymlinkRequestProto) GetDirPerm() *FsPermissionProto { + if x != nil { + return x.DirPerm + } + return nil } -func (m *RestoreFailedStorageResponseProto) GetResult() bool { - if m != nil && m.Result != nil { - return *m.Result +func (x *CreateSymlinkRequestProto) GetCreateParent() bool { + if x != nil && x.CreateParent != nil { + return *x.CreateParent } return false } -type RefreshNodesRequestProto struct { - XXX_unrecognized []byte `json:"-"` +type CreateSymlinkResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *RefreshNodesRequestProto) Reset() { *m = RefreshNodesRequestProto{} } -func (m *RefreshNodesRequestProto) String() string { return proto.CompactTextString(m) } -func (*RefreshNodesRequestProto) ProtoMessage() {} -func (*RefreshNodesRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{71} } +func (x *CreateSymlinkResponseProto) Reset() { + *x = CreateSymlinkResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -type RefreshNodesResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *CreateSymlinkResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RefreshNodesResponseProto) Reset() { *m = RefreshNodesResponseProto{} } -func (m *RefreshNodesResponseProto) String() string { return proto.CompactTextString(m) } -func (*RefreshNodesResponseProto) ProtoMessage() {} -func (*RefreshNodesResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{72} } +func (*CreateSymlinkResponseProto) ProtoMessage() {} -type FinalizeUpgradeRequestProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *CreateSymlinkResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[134] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *FinalizeUpgradeRequestProto) Reset() { *m = FinalizeUpgradeRequestProto{} } -func (m *FinalizeUpgradeRequestProto) String() string { return proto.CompactTextString(m) } -func (*FinalizeUpgradeRequestProto) ProtoMessage() {} -func (*FinalizeUpgradeRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{73} } - -type FinalizeUpgradeResponseProto struct { - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use CreateSymlinkResponseProto.ProtoReflect.Descriptor instead. +func (*CreateSymlinkResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{134} } -func (m *FinalizeUpgradeResponseProto) Reset() { *m = FinalizeUpgradeResponseProto{} } -func (m *FinalizeUpgradeResponseProto) String() string { return proto.CompactTextString(m) } -func (*FinalizeUpgradeResponseProto) ProtoMessage() {} -func (*FinalizeUpgradeResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{74} } +type GetLinkTargetRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -type RollingUpgradeRequestProto struct { - Action *RollingUpgradeActionProto `protobuf:"varint,1,req,name=action,enum=hadoop.hdfs.RollingUpgradeActionProto" json:"action,omitempty"` - XXX_unrecognized []byte `json:"-"` + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` } -func (m *RollingUpgradeRequestProto) Reset() { *m = RollingUpgradeRequestProto{} } -func (m *RollingUpgradeRequestProto) String() string { return proto.CompactTextString(m) } -func (*RollingUpgradeRequestProto) ProtoMessage() {} -func (*RollingUpgradeRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{75} } - -func (m *RollingUpgradeRequestProto) GetAction() RollingUpgradeActionProto { - if m != nil && m.Action != nil { - return *m.Action +func (x *GetLinkTargetRequestProto) Reset() { + *x = GetLinkTargetRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return RollingUpgradeActionProto_QUERY } -type RollingUpgradeInfoProto struct { - Status *RollingUpgradeStatusProto `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` - StartTime *uint64 `protobuf:"varint,2,req,name=startTime" json:"startTime,omitempty"` - FinalizeTime *uint64 `protobuf:"varint,3,req,name=finalizeTime" json:"finalizeTime,omitempty"` - CreatedRollbackImages *bool `protobuf:"varint,4,req,name=createdRollbackImages" json:"createdRollbackImages,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetLinkTargetRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RollingUpgradeInfoProto) Reset() { *m = RollingUpgradeInfoProto{} } -func (m *RollingUpgradeInfoProto) String() string { return proto.CompactTextString(m) } -func (*RollingUpgradeInfoProto) ProtoMessage() {} -func (*RollingUpgradeInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{76} } +func (*GetLinkTargetRequestProto) ProtoMessage() {} -func (m *RollingUpgradeInfoProto) GetStatus() *RollingUpgradeStatusProto { - if m != nil { - return m.Status +func (x *GetLinkTargetRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[135] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *RollingUpgradeInfoProto) GetStartTime() uint64 { - if m != nil && m.StartTime != nil { - return *m.StartTime - } - return 0 +// Deprecated: Use GetLinkTargetRequestProto.ProtoReflect.Descriptor instead. +func (*GetLinkTargetRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{135} } -func (m *RollingUpgradeInfoProto) GetFinalizeTime() uint64 { - if m != nil && m.FinalizeTime != nil { - return *m.FinalizeTime +func (x *GetLinkTargetRequestProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } - return 0 + return "" +} + +type GetLinkTargetResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TargetPath *string `protobuf:"bytes,1,opt,name=targetPath" json:"targetPath,omitempty"` } -func (m *RollingUpgradeInfoProto) GetCreatedRollbackImages() bool { - if m != nil && m.CreatedRollbackImages != nil { - return *m.CreatedRollbackImages +func (x *GetLinkTargetResponseProto) Reset() { + *x = GetLinkTargetResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return false } -type RollingUpgradeResponseProto struct { - RollingUpgradeInfo *RollingUpgradeInfoProto `protobuf:"bytes,1,opt,name=rollingUpgradeInfo" json:"rollingUpgradeInfo,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetLinkTargetResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RollingUpgradeResponseProto) Reset() { *m = RollingUpgradeResponseProto{} } -func (m *RollingUpgradeResponseProto) String() string { return proto.CompactTextString(m) } -func (*RollingUpgradeResponseProto) ProtoMessage() {} -func (*RollingUpgradeResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{77} } +func (*GetLinkTargetResponseProto) ProtoMessage() {} -func (m *RollingUpgradeResponseProto) GetRollingUpgradeInfo() *RollingUpgradeInfoProto { - if m != nil { - return m.RollingUpgradeInfo +func (x *GetLinkTargetResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[136] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil -} - -type ListCorruptFileBlocksRequestProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - Cookie *string `protobuf:"bytes,2,opt,name=cookie" json:"cookie,omitempty"` - XXX_unrecognized []byte `json:"-"` + return mi.MessageOf(x) } -func (m *ListCorruptFileBlocksRequestProto) Reset() { *m = ListCorruptFileBlocksRequestProto{} } -func (m *ListCorruptFileBlocksRequestProto) String() string { return proto.CompactTextString(m) } -func (*ListCorruptFileBlocksRequestProto) ProtoMessage() {} -func (*ListCorruptFileBlocksRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{78} +// Deprecated: Use GetLinkTargetResponseProto.ProtoReflect.Descriptor instead. +func (*GetLinkTargetResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{136} } -func (m *ListCorruptFileBlocksRequestProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *GetLinkTargetResponseProto) GetTargetPath() string { + if x != nil && x.TargetPath != nil { + return *x.TargetPath } return "" } -func (m *ListCorruptFileBlocksRequestProto) GetCookie() string { - if m != nil && m.Cookie != nil { - return *m.Cookie - } - return "" +type UpdateBlockForPipelineRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` + ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` } -type ListCorruptFileBlocksResponseProto struct { - Corrupt *CorruptFileBlocksProto `protobuf:"bytes,1,req,name=corrupt" json:"corrupt,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *UpdateBlockForPipelineRequestProto) Reset() { + *x = UpdateBlockForPipelineRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ListCorruptFileBlocksResponseProto) Reset() { *m = ListCorruptFileBlocksResponseProto{} } -func (m *ListCorruptFileBlocksResponseProto) String() string { return proto.CompactTextString(m) } -func (*ListCorruptFileBlocksResponseProto) ProtoMessage() {} -func (*ListCorruptFileBlocksResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{79} +func (x *UpdateBlockForPipelineRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListCorruptFileBlocksResponseProto) GetCorrupt() *CorruptFileBlocksProto { - if m != nil { - return m.Corrupt +func (*UpdateBlockForPipelineRequestProto) ProtoMessage() {} + +func (x *UpdateBlockForPipelineRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[137] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type MetaSaveRequestProto struct { - Filename *string `protobuf:"bytes,1,req,name=filename" json:"filename,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use UpdateBlockForPipelineRequestProto.ProtoReflect.Descriptor instead. +func (*UpdateBlockForPipelineRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{137} } -func (m *MetaSaveRequestProto) Reset() { *m = MetaSaveRequestProto{} } -func (m *MetaSaveRequestProto) String() string { return proto.CompactTextString(m) } -func (*MetaSaveRequestProto) ProtoMessage() {} -func (*MetaSaveRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{80} } +func (x *UpdateBlockForPipelineRequestProto) GetBlock() *ExtendedBlockProto { + if x != nil { + return x.Block + } + return nil +} -func (m *MetaSaveRequestProto) GetFilename() string { - if m != nil && m.Filename != nil { - return *m.Filename +func (x *UpdateBlockForPipelineRequestProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName } return "" } -type MetaSaveResponseProto struct { - XXX_unrecognized []byte `json:"-"` +type UpdateBlockForPipelineResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *LocatedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` } -func (m *MetaSaveResponseProto) Reset() { *m = MetaSaveResponseProto{} } -func (m *MetaSaveResponseProto) String() string { return proto.CompactTextString(m) } -func (*MetaSaveResponseProto) ProtoMessage() {} -func (*MetaSaveResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{81} } +func (x *UpdateBlockForPipelineResponseProto) Reset() { + *x = UpdateBlockForPipelineResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -type GetFileInfoRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *UpdateBlockForPipelineResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetFileInfoRequestProto) Reset() { *m = GetFileInfoRequestProto{} } -func (m *GetFileInfoRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetFileInfoRequestProto) ProtoMessage() {} -func (*GetFileInfoRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{82} } +func (*UpdateBlockForPipelineResponseProto) ProtoMessage() {} -func (m *GetFileInfoRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *UpdateBlockForPipelineResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[138] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -type GetFileInfoResponseProto struct { - Fs *HdfsFileStatusProto `protobuf:"bytes,1,opt,name=fs" json:"fs,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use UpdateBlockForPipelineResponseProto.ProtoReflect.Descriptor instead. +func (*UpdateBlockForPipelineResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{138} } -func (m *GetFileInfoResponseProto) Reset() { *m = GetFileInfoResponseProto{} } -func (m *GetFileInfoResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetFileInfoResponseProto) ProtoMessage() {} -func (*GetFileInfoResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{83} } - -func (m *GetFileInfoResponseProto) GetFs() *HdfsFileStatusProto { - if m != nil { - return m.Fs +func (x *UpdateBlockForPipelineResponseProto) GetBlock() *LocatedBlockProto { + if x != nil { + return x.Block } return nil } -type IsFileClosedRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XXX_unrecognized []byte `json:"-"` -} +type UpdatePipelineRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *IsFileClosedRequestProto) Reset() { *m = IsFileClosedRequestProto{} } -func (m *IsFileClosedRequestProto) String() string { return proto.CompactTextString(m) } -func (*IsFileClosedRequestProto) ProtoMessage() {} -func (*IsFileClosedRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{84} } + ClientName *string `protobuf:"bytes,1,req,name=clientName" json:"clientName,omitempty"` + OldBlock *ExtendedBlockProto `protobuf:"bytes,2,req,name=oldBlock" json:"oldBlock,omitempty"` + NewBlock *ExtendedBlockProto `protobuf:"bytes,3,req,name=newBlock" json:"newBlock,omitempty"` + NewNodes []*DatanodeIDProto `protobuf:"bytes,4,rep,name=newNodes" json:"newNodes,omitempty"` + StorageIDs []string `protobuf:"bytes,5,rep,name=storageIDs" json:"storageIDs,omitempty"` +} -func (m *IsFileClosedRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *UpdatePipelineRequestProto) Reset() { + *x = UpdatePipelineRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[139] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type IsFileClosedResponseProto struct { - Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *UpdatePipelineRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *IsFileClosedResponseProto) Reset() { *m = IsFileClosedResponseProto{} } -func (m *IsFileClosedResponseProto) String() string { return proto.CompactTextString(m) } -func (*IsFileClosedResponseProto) ProtoMessage() {} -func (*IsFileClosedResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{85} } +func (*UpdatePipelineRequestProto) ProtoMessage() {} -func (m *IsFileClosedResponseProto) GetResult() bool { - if m != nil && m.Result != nil { - return *m.Result +func (x *UpdatePipelineRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[139] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -type CacheDirectiveInfoProto struct { - Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` - Path *string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` - Replication *uint32 `protobuf:"varint,3,opt,name=replication" json:"replication,omitempty"` - Pool *string `protobuf:"bytes,4,opt,name=pool" json:"pool,omitempty"` - Expiration *CacheDirectiveInfoExpirationProto `protobuf:"bytes,5,opt,name=expiration" json:"expiration,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use UpdatePipelineRequestProto.ProtoReflect.Descriptor instead. +func (*UpdatePipelineRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{139} } -func (m *CacheDirectiveInfoProto) Reset() { *m = CacheDirectiveInfoProto{} } -func (m *CacheDirectiveInfoProto) String() string { return proto.CompactTextString(m) } -func (*CacheDirectiveInfoProto) ProtoMessage() {} -func (*CacheDirectiveInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{86} } - -func (m *CacheDirectiveInfoProto) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id +func (x *UpdatePipelineRequestProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName } - return 0 + return "" } -func (m *CacheDirectiveInfoProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *UpdatePipelineRequestProto) GetOldBlock() *ExtendedBlockProto { + if x != nil { + return x.OldBlock } - return "" + return nil } -func (m *CacheDirectiveInfoProto) GetReplication() uint32 { - if m != nil && m.Replication != nil { - return *m.Replication +func (x *UpdatePipelineRequestProto) GetNewBlock() *ExtendedBlockProto { + if x != nil { + return x.NewBlock } - return 0 + return nil } -func (m *CacheDirectiveInfoProto) GetPool() string { - if m != nil && m.Pool != nil { - return *m.Pool +func (x *UpdatePipelineRequestProto) GetNewNodes() []*DatanodeIDProto { + if x != nil { + return x.NewNodes } - return "" + return nil } -func (m *CacheDirectiveInfoProto) GetExpiration() *CacheDirectiveInfoExpirationProto { - if m != nil { - return m.Expiration +func (x *UpdatePipelineRequestProto) GetStorageIDs() []string { + if x != nil { + return x.StorageIDs } return nil } -type CacheDirectiveInfoExpirationProto struct { - Millis *int64 `protobuf:"varint,1,req,name=millis" json:"millis,omitempty"` - IsRelative *bool `protobuf:"varint,2,req,name=isRelative" json:"isRelative,omitempty"` - XXX_unrecognized []byte `json:"-"` +type UpdatePipelineResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *CacheDirectiveInfoExpirationProto) Reset() { *m = CacheDirectiveInfoExpirationProto{} } -func (m *CacheDirectiveInfoExpirationProto) String() string { return proto.CompactTextString(m) } -func (*CacheDirectiveInfoExpirationProto) ProtoMessage() {} -func (*CacheDirectiveInfoExpirationProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{87} +func (x *UpdatePipelineResponseProto) Reset() { + *x = UpdatePipelineResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[140] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CacheDirectiveInfoExpirationProto) GetMillis() int64 { - if m != nil && m.Millis != nil { - return *m.Millis - } - return 0 +func (x *UpdatePipelineResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CacheDirectiveInfoExpirationProto) GetIsRelative() bool { - if m != nil && m.IsRelative != nil { - return *m.IsRelative +func (*UpdatePipelineResponseProto) ProtoMessage() {} + +func (x *UpdatePipelineResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[140] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -type CacheDirectiveStatsProto struct { - BytesNeeded *int64 `protobuf:"varint,1,req,name=bytesNeeded" json:"bytesNeeded,omitempty"` - BytesCached *int64 `protobuf:"varint,2,req,name=bytesCached" json:"bytesCached,omitempty"` - FilesNeeded *int64 `protobuf:"varint,3,req,name=filesNeeded" json:"filesNeeded,omitempty"` - FilesCached *int64 `protobuf:"varint,4,req,name=filesCached" json:"filesCached,omitempty"` - HasExpired *bool `protobuf:"varint,5,req,name=hasExpired" json:"hasExpired,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use UpdatePipelineResponseProto.ProtoReflect.Descriptor instead. +func (*UpdatePipelineResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{140} } -func (m *CacheDirectiveStatsProto) Reset() { *m = CacheDirectiveStatsProto{} } -func (m *CacheDirectiveStatsProto) String() string { return proto.CompactTextString(m) } -func (*CacheDirectiveStatsProto) ProtoMessage() {} -func (*CacheDirectiveStatsProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{88} } +type SetBalancerBandwidthRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CacheDirectiveStatsProto) GetBytesNeeded() int64 { - if m != nil && m.BytesNeeded != nil { - return *m.BytesNeeded - } - return 0 + Bandwidth *int64 `protobuf:"varint,1,req,name=bandwidth" json:"bandwidth,omitempty"` } -func (m *CacheDirectiveStatsProto) GetBytesCached() int64 { - if m != nil && m.BytesCached != nil { - return *m.BytesCached +func (x *SetBalancerBandwidthRequestProto) Reset() { + *x = SetBalancerBandwidthRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[141] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (m *CacheDirectiveStatsProto) GetFilesNeeded() int64 { - if m != nil && m.FilesNeeded != nil { - return *m.FilesNeeded - } - return 0 +func (x *SetBalancerBandwidthRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CacheDirectiveStatsProto) GetFilesCached() int64 { - if m != nil && m.FilesCached != nil { - return *m.FilesCached - } - return 0 -} +func (*SetBalancerBandwidthRequestProto) ProtoMessage() {} -func (m *CacheDirectiveStatsProto) GetHasExpired() bool { - if m != nil && m.HasExpired != nil { - return *m.HasExpired +func (x *SetBalancerBandwidthRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[141] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -type AddCacheDirectiveRequestProto struct { - Info *CacheDirectiveInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` - CacheFlags *uint32 `protobuf:"varint,2,opt,name=cacheFlags" json:"cacheFlags,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use SetBalancerBandwidthRequestProto.ProtoReflect.Descriptor instead. +func (*SetBalancerBandwidthRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{141} } -func (m *AddCacheDirectiveRequestProto) Reset() { *m = AddCacheDirectiveRequestProto{} } -func (m *AddCacheDirectiveRequestProto) String() string { return proto.CompactTextString(m) } -func (*AddCacheDirectiveRequestProto) ProtoMessage() {} -func (*AddCacheDirectiveRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{89} } - -func (m *AddCacheDirectiveRequestProto) GetInfo() *CacheDirectiveInfoProto { - if m != nil { - return m.Info +func (x *SetBalancerBandwidthRequestProto) GetBandwidth() int64 { + if x != nil && x.Bandwidth != nil { + return *x.Bandwidth } - return nil + return 0 +} + +type SetBalancerBandwidthResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *AddCacheDirectiveRequestProto) GetCacheFlags() uint32 { - if m != nil && m.CacheFlags != nil { - return *m.CacheFlags +func (x *SetBalancerBandwidthResponseProto) Reset() { + *x = SetBalancerBandwidthResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[142] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -type AddCacheDirectiveResponseProto struct { - Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *SetBalancerBandwidthResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AddCacheDirectiveResponseProto) Reset() { *m = AddCacheDirectiveResponseProto{} } -func (m *AddCacheDirectiveResponseProto) String() string { return proto.CompactTextString(m) } -func (*AddCacheDirectiveResponseProto) ProtoMessage() {} -func (*AddCacheDirectiveResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{90} } +func (*SetBalancerBandwidthResponseProto) ProtoMessage() {} -func (m *AddCacheDirectiveResponseProto) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id +func (x *SetBalancerBandwidthResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[142] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -type ModifyCacheDirectiveRequestProto struct { - Info *CacheDirectiveInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` - CacheFlags *uint32 `protobuf:"varint,2,opt,name=cacheFlags" json:"cacheFlags,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use SetBalancerBandwidthResponseProto.ProtoReflect.Descriptor instead. +func (*SetBalancerBandwidthResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{142} } -func (m *ModifyCacheDirectiveRequestProto) Reset() { *m = ModifyCacheDirectiveRequestProto{} } -func (m *ModifyCacheDirectiveRequestProto) String() string { return proto.CompactTextString(m) } -func (*ModifyCacheDirectiveRequestProto) ProtoMessage() {} -func (*ModifyCacheDirectiveRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{91} +type GetDataEncryptionKeyRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *ModifyCacheDirectiveRequestProto) GetInfo() *CacheDirectiveInfoProto { - if m != nil { - return m.Info +func (x *GetDataEncryptionKeyRequestProto) Reset() { + *x = GetDataEncryptionKeyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[143] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (m *ModifyCacheDirectiveRequestProto) GetCacheFlags() uint32 { - if m != nil && m.CacheFlags != nil { - return *m.CacheFlags - } - return 0 +func (x *GetDataEncryptionKeyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -type ModifyCacheDirectiveResponseProto struct { - XXX_unrecognized []byte `json:"-"` -} +func (*GetDataEncryptionKeyRequestProto) ProtoMessage() {} -func (m *ModifyCacheDirectiveResponseProto) Reset() { *m = ModifyCacheDirectiveResponseProto{} } -func (m *ModifyCacheDirectiveResponseProto) String() string { return proto.CompactTextString(m) } -func (*ModifyCacheDirectiveResponseProto) ProtoMessage() {} -func (*ModifyCacheDirectiveResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{92} +func (x *GetDataEncryptionKeyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[143] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type RemoveCacheDirectiveRequestProto struct { - Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use GetDataEncryptionKeyRequestProto.ProtoReflect.Descriptor instead. +func (*GetDataEncryptionKeyRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{143} } -func (m *RemoveCacheDirectiveRequestProto) Reset() { *m = RemoveCacheDirectiveRequestProto{} } -func (m *RemoveCacheDirectiveRequestProto) String() string { return proto.CompactTextString(m) } -func (*RemoveCacheDirectiveRequestProto) ProtoMessage() {} -func (*RemoveCacheDirectiveRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{93} +type GetDataEncryptionKeyResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DataEncryptionKey *DataEncryptionKeyProto `protobuf:"bytes,1,opt,name=dataEncryptionKey" json:"dataEncryptionKey,omitempty"` } -func (m *RemoveCacheDirectiveRequestProto) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id +func (x *GetDataEncryptionKeyResponseProto) Reset() { + *x = GetDataEncryptionKeyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[144] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -type RemoveCacheDirectiveResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *GetDataEncryptionKeyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RemoveCacheDirectiveResponseProto) Reset() { *m = RemoveCacheDirectiveResponseProto{} } -func (m *RemoveCacheDirectiveResponseProto) String() string { return proto.CompactTextString(m) } -func (*RemoveCacheDirectiveResponseProto) ProtoMessage() {} -func (*RemoveCacheDirectiveResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{94} -} +func (*GetDataEncryptionKeyResponseProto) ProtoMessage() {} -type ListCacheDirectivesRequestProto struct { - PrevId *int64 `protobuf:"varint,1,req,name=prevId" json:"prevId,omitempty"` - Filter *CacheDirectiveInfoProto `protobuf:"bytes,2,req,name=filter" json:"filter,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetDataEncryptionKeyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[144] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ListCacheDirectivesRequestProto) Reset() { *m = ListCacheDirectivesRequestProto{} } -func (m *ListCacheDirectivesRequestProto) String() string { return proto.CompactTextString(m) } -func (*ListCacheDirectivesRequestProto) ProtoMessage() {} -func (*ListCacheDirectivesRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{95} +// Deprecated: Use GetDataEncryptionKeyResponseProto.ProtoReflect.Descriptor instead. +func (*GetDataEncryptionKeyResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{144} } -func (m *ListCacheDirectivesRequestProto) GetPrevId() int64 { - if m != nil && m.PrevId != nil { - return *m.PrevId +func (x *GetDataEncryptionKeyResponseProto) GetDataEncryptionKey() *DataEncryptionKeyProto { + if x != nil { + return x.DataEncryptionKey } - return 0 + return nil +} + +type CreateSnapshotRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` + SnapshotName *string `protobuf:"bytes,2,opt,name=snapshotName" json:"snapshotName,omitempty"` } -func (m *ListCacheDirectivesRequestProto) GetFilter() *CacheDirectiveInfoProto { - if m != nil { - return m.Filter +func (x *CreateSnapshotRequestProto) Reset() { + *x = CreateSnapshotRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[145] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type CacheDirectiveEntryProto struct { - Info *CacheDirectiveInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` - Stats *CacheDirectiveStatsProto `protobuf:"bytes,2,req,name=stats" json:"stats,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CreateSnapshotRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CacheDirectiveEntryProto) Reset() { *m = CacheDirectiveEntryProto{} } -func (m *CacheDirectiveEntryProto) String() string { return proto.CompactTextString(m) } -func (*CacheDirectiveEntryProto) ProtoMessage() {} -func (*CacheDirectiveEntryProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{96} } +func (*CreateSnapshotRequestProto) ProtoMessage() {} -func (m *CacheDirectiveEntryProto) GetInfo() *CacheDirectiveInfoProto { - if m != nil { - return m.Info +func (x *CreateSnapshotRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[145] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *CacheDirectiveEntryProto) GetStats() *CacheDirectiveStatsProto { - if m != nil { - return m.Stats - } - return nil +// Deprecated: Use CreateSnapshotRequestProto.ProtoReflect.Descriptor instead. +func (*CreateSnapshotRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{145} } -type ListCacheDirectivesResponseProto struct { - Elements []*CacheDirectiveEntryProto `protobuf:"bytes,1,rep,name=elements" json:"elements,omitempty"` - HasMore *bool `protobuf:"varint,2,req,name=hasMore" json:"hasMore,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CreateSnapshotRequestProto) GetSnapshotRoot() string { + if x != nil && x.SnapshotRoot != nil { + return *x.SnapshotRoot + } + return "" } -func (m *ListCacheDirectivesResponseProto) Reset() { *m = ListCacheDirectivesResponseProto{} } -func (m *ListCacheDirectivesResponseProto) String() string { return proto.CompactTextString(m) } -func (*ListCacheDirectivesResponseProto) ProtoMessage() {} -func (*ListCacheDirectivesResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{97} +func (x *CreateSnapshotRequestProto) GetSnapshotName() string { + if x != nil && x.SnapshotName != nil { + return *x.SnapshotName + } + return "" } -func (m *ListCacheDirectivesResponseProto) GetElements() []*CacheDirectiveEntryProto { - if m != nil { - return m.Elements - } - return nil +type CreateSnapshotResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnapshotPath *string `protobuf:"bytes,1,req,name=snapshotPath" json:"snapshotPath,omitempty"` } -func (m *ListCacheDirectivesResponseProto) GetHasMore() bool { - if m != nil && m.HasMore != nil { - return *m.HasMore +func (x *CreateSnapshotResponseProto) Reset() { + *x = CreateSnapshotResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[146] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return false } -type CachePoolInfoProto struct { - PoolName *string `protobuf:"bytes,1,opt,name=poolName" json:"poolName,omitempty"` - OwnerName *string `protobuf:"bytes,2,opt,name=ownerName" json:"ownerName,omitempty"` - GroupName *string `protobuf:"bytes,3,opt,name=groupName" json:"groupName,omitempty"` - Mode *int32 `protobuf:"varint,4,opt,name=mode" json:"mode,omitempty"` - Limit *int64 `protobuf:"varint,5,opt,name=limit" json:"limit,omitempty"` - MaxRelativeExpiry *int64 `protobuf:"varint,6,opt,name=maxRelativeExpiry" json:"maxRelativeExpiry,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CreateSnapshotResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CachePoolInfoProto) Reset() { *m = CachePoolInfoProto{} } -func (m *CachePoolInfoProto) String() string { return proto.CompactTextString(m) } -func (*CachePoolInfoProto) ProtoMessage() {} -func (*CachePoolInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{98} } +func (*CreateSnapshotResponseProto) ProtoMessage() {} -func (m *CachePoolInfoProto) GetPoolName() string { - if m != nil && m.PoolName != nil { - return *m.PoolName +func (x *CreateSnapshotResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[146] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *CachePoolInfoProto) GetOwnerName() string { - if m != nil && m.OwnerName != nil { - return *m.OwnerName - } - return "" +// Deprecated: Use CreateSnapshotResponseProto.ProtoReflect.Descriptor instead. +func (*CreateSnapshotResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{146} } -func (m *CachePoolInfoProto) GetGroupName() string { - if m != nil && m.GroupName != nil { - return *m.GroupName +func (x *CreateSnapshotResponseProto) GetSnapshotPath() string { + if x != nil && x.SnapshotPath != nil { + return *x.SnapshotPath } return "" } -func (m *CachePoolInfoProto) GetMode() int32 { - if m != nil && m.Mode != nil { - return *m.Mode - } - return 0 -} +type RenameSnapshotRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CachePoolInfoProto) GetLimit() int64 { - if m != nil && m.Limit != nil { - return *m.Limit - } - return 0 + SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` + SnapshotOldName *string `protobuf:"bytes,2,req,name=snapshotOldName" json:"snapshotOldName,omitempty"` + SnapshotNewName *string `protobuf:"bytes,3,req,name=snapshotNewName" json:"snapshotNewName,omitempty"` } -func (m *CachePoolInfoProto) GetMaxRelativeExpiry() int64 { - if m != nil && m.MaxRelativeExpiry != nil { - return *m.MaxRelativeExpiry +func (x *RenameSnapshotRequestProto) Reset() { + *x = RenameSnapshotRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[147] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -type CachePoolStatsProto struct { - BytesNeeded *int64 `protobuf:"varint,1,req,name=bytesNeeded" json:"bytesNeeded,omitempty"` - BytesCached *int64 `protobuf:"varint,2,req,name=bytesCached" json:"bytesCached,omitempty"` - BytesOverlimit *int64 `protobuf:"varint,3,req,name=bytesOverlimit" json:"bytesOverlimit,omitempty"` - FilesNeeded *int64 `protobuf:"varint,4,req,name=filesNeeded" json:"filesNeeded,omitempty"` - FilesCached *int64 `protobuf:"varint,5,req,name=filesCached" json:"filesCached,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *RenameSnapshotRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CachePoolStatsProto) Reset() { *m = CachePoolStatsProto{} } -func (m *CachePoolStatsProto) String() string { return proto.CompactTextString(m) } -func (*CachePoolStatsProto) ProtoMessage() {} -func (*CachePoolStatsProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{99} } +func (*RenameSnapshotRequestProto) ProtoMessage() {} -func (m *CachePoolStatsProto) GetBytesNeeded() int64 { - if m != nil && m.BytesNeeded != nil { - return *m.BytesNeeded +func (x *RenameSnapshotRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[147] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) +} + +// Deprecated: Use RenameSnapshotRequestProto.ProtoReflect.Descriptor instead. +func (*RenameSnapshotRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{147} } -func (m *CachePoolStatsProto) GetBytesCached() int64 { - if m != nil && m.BytesCached != nil { - return *m.BytesCached +func (x *RenameSnapshotRequestProto) GetSnapshotRoot() string { + if x != nil && x.SnapshotRoot != nil { + return *x.SnapshotRoot } - return 0 + return "" } -func (m *CachePoolStatsProto) GetBytesOverlimit() int64 { - if m != nil && m.BytesOverlimit != nil { - return *m.BytesOverlimit +func (x *RenameSnapshotRequestProto) GetSnapshotOldName() string { + if x != nil && x.SnapshotOldName != nil { + return *x.SnapshotOldName } - return 0 + return "" } -func (m *CachePoolStatsProto) GetFilesNeeded() int64 { - if m != nil && m.FilesNeeded != nil { - return *m.FilesNeeded +func (x *RenameSnapshotRequestProto) GetSnapshotNewName() string { + if x != nil && x.SnapshotNewName != nil { + return *x.SnapshotNewName } - return 0 + return "" +} + +type RenameSnapshotResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *CachePoolStatsProto) GetFilesCached() int64 { - if m != nil && m.FilesCached != nil { - return *m.FilesCached +func (x *RenameSnapshotResponseProto) Reset() { + *x = RenameSnapshotResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[148] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -type AddCachePoolRequestProto struct { - Info *CachePoolInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *RenameSnapshotResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AddCachePoolRequestProto) Reset() { *m = AddCachePoolRequestProto{} } -func (m *AddCachePoolRequestProto) String() string { return proto.CompactTextString(m) } -func (*AddCachePoolRequestProto) ProtoMessage() {} -func (*AddCachePoolRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{100} } +func (*RenameSnapshotResponseProto) ProtoMessage() {} -func (m *AddCachePoolRequestProto) GetInfo() *CachePoolInfoProto { - if m != nil { - return m.Info +func (x *RenameSnapshotResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[148] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type AddCachePoolResponseProto struct { - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use RenameSnapshotResponseProto.ProtoReflect.Descriptor instead. +func (*RenameSnapshotResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{148} } -func (m *AddCachePoolResponseProto) Reset() { *m = AddCachePoolResponseProto{} } -func (m *AddCachePoolResponseProto) String() string { return proto.CompactTextString(m) } -func (*AddCachePoolResponseProto) ProtoMessage() {} -func (*AddCachePoolResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{101} } +type AllowSnapshotRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -type ModifyCachePoolRequestProto struct { - Info *CachePoolInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` - XXX_unrecognized []byte `json:"-"` + SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` } -func (m *ModifyCachePoolRequestProto) Reset() { *m = ModifyCachePoolRequestProto{} } -func (m *ModifyCachePoolRequestProto) String() string { return proto.CompactTextString(m) } -func (*ModifyCachePoolRequestProto) ProtoMessage() {} -func (*ModifyCachePoolRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{102} } - -func (m *ModifyCachePoolRequestProto) GetInfo() *CachePoolInfoProto { - if m != nil { - return m.Info +func (x *AllowSnapshotRequestProto) Reset() { + *x = AllowSnapshotRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[149] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type ModifyCachePoolResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *AllowSnapshotRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ModifyCachePoolResponseProto) Reset() { *m = ModifyCachePoolResponseProto{} } -func (m *ModifyCachePoolResponseProto) String() string { return proto.CompactTextString(m) } -func (*ModifyCachePoolResponseProto) ProtoMessage() {} -func (*ModifyCachePoolResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{103} } +func (*AllowSnapshotRequestProto) ProtoMessage() {} -type RemoveCachePoolRequestProto struct { - PoolName *string `protobuf:"bytes,1,req,name=poolName" json:"poolName,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *AllowSnapshotRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[149] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *RemoveCachePoolRequestProto) Reset() { *m = RemoveCachePoolRequestProto{} } -func (m *RemoveCachePoolRequestProto) String() string { return proto.CompactTextString(m) } -func (*RemoveCachePoolRequestProto) ProtoMessage() {} -func (*RemoveCachePoolRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{104} } +// Deprecated: Use AllowSnapshotRequestProto.ProtoReflect.Descriptor instead. +func (*AllowSnapshotRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{149} +} -func (m *RemoveCachePoolRequestProto) GetPoolName() string { - if m != nil && m.PoolName != nil { - return *m.PoolName +func (x *AllowSnapshotRequestProto) GetSnapshotRoot() string { + if x != nil && x.SnapshotRoot != nil { + return *x.SnapshotRoot } return "" } -type RemoveCachePoolResponseProto struct { - XXX_unrecognized []byte `json:"-"` +type AllowSnapshotResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *RemoveCachePoolResponseProto) Reset() { *m = RemoveCachePoolResponseProto{} } -func (m *RemoveCachePoolResponseProto) String() string { return proto.CompactTextString(m) } -func (*RemoveCachePoolResponseProto) ProtoMessage() {} -func (*RemoveCachePoolResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{105} } +func (x *AllowSnapshotResponseProto) Reset() { + *x = AllowSnapshotResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[150] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -type ListCachePoolsRequestProto struct { - PrevPoolName *string `protobuf:"bytes,1,req,name=prevPoolName" json:"prevPoolName,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *AllowSnapshotResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListCachePoolsRequestProto) Reset() { *m = ListCachePoolsRequestProto{} } -func (m *ListCachePoolsRequestProto) String() string { return proto.CompactTextString(m) } -func (*ListCachePoolsRequestProto) ProtoMessage() {} -func (*ListCachePoolsRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{106} } +func (*AllowSnapshotResponseProto) ProtoMessage() {} -func (m *ListCachePoolsRequestProto) GetPrevPoolName() string { - if m != nil && m.PrevPoolName != nil { - return *m.PrevPoolName +func (x *AllowSnapshotResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[150] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -type ListCachePoolsResponseProto struct { - Entries []*CachePoolEntryProto `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` - HasMore *bool `protobuf:"varint,2,req,name=hasMore" json:"hasMore,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use AllowSnapshotResponseProto.ProtoReflect.Descriptor instead. +func (*AllowSnapshotResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{150} } -func (m *ListCachePoolsResponseProto) Reset() { *m = ListCachePoolsResponseProto{} } -func (m *ListCachePoolsResponseProto) String() string { return proto.CompactTextString(m) } -func (*ListCachePoolsResponseProto) ProtoMessage() {} -func (*ListCachePoolsResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{107} } +type DisallowSnapshotRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ListCachePoolsResponseProto) GetEntries() []*CachePoolEntryProto { - if m != nil { - return m.Entries - } - return nil + SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` } -func (m *ListCachePoolsResponseProto) GetHasMore() bool { - if m != nil && m.HasMore != nil { - return *m.HasMore +func (x *DisallowSnapshotRequestProto) Reset() { + *x = DisallowSnapshotRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[151] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return false } -type CachePoolEntryProto struct { - Info *CachePoolInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` - Stats *CachePoolStatsProto `protobuf:"bytes,2,req,name=stats" json:"stats,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *DisallowSnapshotRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CachePoolEntryProto) Reset() { *m = CachePoolEntryProto{} } -func (m *CachePoolEntryProto) String() string { return proto.CompactTextString(m) } -func (*CachePoolEntryProto) ProtoMessage() {} -func (*CachePoolEntryProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{108} } +func (*DisallowSnapshotRequestProto) ProtoMessage() {} -func (m *CachePoolEntryProto) GetInfo() *CachePoolInfoProto { - if m != nil { - return m.Info +func (x *DisallowSnapshotRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[151] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *CachePoolEntryProto) GetStats() *CachePoolStatsProto { - if m != nil { - return m.Stats - } - return nil +// Deprecated: Use DisallowSnapshotRequestProto.ProtoReflect.Descriptor instead. +func (*DisallowSnapshotRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{151} } -type GetFileLinkInfoRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *DisallowSnapshotRequestProto) GetSnapshotRoot() string { + if x != nil && x.SnapshotRoot != nil { + return *x.SnapshotRoot + } + return "" } -func (m *GetFileLinkInfoRequestProto) Reset() { *m = GetFileLinkInfoRequestProto{} } -func (m *GetFileLinkInfoRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetFileLinkInfoRequestProto) ProtoMessage() {} -func (*GetFileLinkInfoRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{109} } +type DisallowSnapshotResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} -func (m *GetFileLinkInfoRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *DisallowSnapshotResponseProto) Reset() { + *x = DisallowSnapshotResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[152] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type GetFileLinkInfoResponseProto struct { - Fs *HdfsFileStatusProto `protobuf:"bytes,1,opt,name=fs" json:"fs,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *DisallowSnapshotResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetFileLinkInfoResponseProto) Reset() { *m = GetFileLinkInfoResponseProto{} } -func (m *GetFileLinkInfoResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetFileLinkInfoResponseProto) ProtoMessage() {} -func (*GetFileLinkInfoResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{110} } +func (*DisallowSnapshotResponseProto) ProtoMessage() {} -func (m *GetFileLinkInfoResponseProto) GetFs() *HdfsFileStatusProto { - if m != nil { - return m.Fs +func (x *DisallowSnapshotResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[152] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type GetContentSummaryRequestProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use DisallowSnapshotResponseProto.ProtoReflect.Descriptor instead. +func (*DisallowSnapshotResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{152} } -func (m *GetContentSummaryRequestProto) Reset() { *m = GetContentSummaryRequestProto{} } -func (m *GetContentSummaryRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetContentSummaryRequestProto) ProtoMessage() {} -func (*GetContentSummaryRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{111} } +type DeleteSnapshotRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetContentSummaryRequestProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path - } - return "" + SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` + SnapshotName *string `protobuf:"bytes,2,req,name=snapshotName" json:"snapshotName,omitempty"` } -type GetContentSummaryResponseProto struct { - Summary *ContentSummaryProto `protobuf:"bytes,1,req,name=summary" json:"summary,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *DeleteSnapshotRequestProto) Reset() { + *x = DeleteSnapshotRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[153] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetContentSummaryResponseProto) Reset() { *m = GetContentSummaryResponseProto{} } -func (m *GetContentSummaryResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetContentSummaryResponseProto) ProtoMessage() {} -func (*GetContentSummaryResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{112} +func (x *DeleteSnapshotRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetContentSummaryResponseProto) GetSummary() *ContentSummaryProto { - if m != nil { - return m.Summary +func (*DeleteSnapshotRequestProto) ProtoMessage() {} + +func (x *DeleteSnapshotRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[153] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type GetQuotaUsageRequestProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use DeleteSnapshotRequestProto.ProtoReflect.Descriptor instead. +func (*DeleteSnapshotRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{153} } -func (m *GetQuotaUsageRequestProto) Reset() { *m = GetQuotaUsageRequestProto{} } -func (m *GetQuotaUsageRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetQuotaUsageRequestProto) ProtoMessage() {} -func (*GetQuotaUsageRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{113} } - -func (m *GetQuotaUsageRequestProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *DeleteSnapshotRequestProto) GetSnapshotRoot() string { + if x != nil && x.SnapshotRoot != nil { + return *x.SnapshotRoot } return "" } -type GetQuotaUsageResponseProto struct { - Usage *QuotaUsageProto `protobuf:"bytes,1,req,name=usage" json:"usage,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *DeleteSnapshotRequestProto) GetSnapshotName() string { + if x != nil && x.SnapshotName != nil { + return *x.SnapshotName + } + return "" } -func (m *GetQuotaUsageResponseProto) Reset() { *m = GetQuotaUsageResponseProto{} } -func (m *GetQuotaUsageResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetQuotaUsageResponseProto) ProtoMessage() {} -func (*GetQuotaUsageResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{114} } +type DeleteSnapshotResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} -func (m *GetQuotaUsageResponseProto) GetUsage() *QuotaUsageProto { - if m != nil { - return m.Usage +func (x *DeleteSnapshotResponseProto) Reset() { + *x = DeleteSnapshotResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[154] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type SetQuotaRequestProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - NamespaceQuota *uint64 `protobuf:"varint,2,req,name=namespaceQuota" json:"namespaceQuota,omitempty"` - StoragespaceQuota *uint64 `protobuf:"varint,3,req,name=storagespaceQuota" json:"storagespaceQuota,omitempty"` - StorageType *StorageTypeProto `protobuf:"varint,4,opt,name=storageType,enum=hadoop.hdfs.StorageTypeProto" json:"storageType,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *DeleteSnapshotResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetQuotaRequestProto) Reset() { *m = SetQuotaRequestProto{} } -func (m *SetQuotaRequestProto) String() string { return proto.CompactTextString(m) } -func (*SetQuotaRequestProto) ProtoMessage() {} -func (*SetQuotaRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{115} } +func (*DeleteSnapshotResponseProto) ProtoMessage() {} -func (m *SetQuotaRequestProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *DeleteSnapshotResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[154] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *SetQuotaRequestProto) GetNamespaceQuota() uint64 { - if m != nil && m.NamespaceQuota != nil { - return *m.NamespaceQuota - } - return 0 +// Deprecated: Use DeleteSnapshotResponseProto.ProtoReflect.Descriptor instead. +func (*DeleteSnapshotResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{154} } -func (m *SetQuotaRequestProto) GetStoragespaceQuota() uint64 { - if m != nil && m.StoragespaceQuota != nil { - return *m.StoragespaceQuota - } - return 0 +type CheckAccessRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` + Mode *AclEntryProto_FsActionProto `protobuf:"varint,2,req,name=mode,enum=hadoop.hdfs.AclEntryProto_FsActionProto" json:"mode,omitempty"` } -func (m *SetQuotaRequestProto) GetStorageType() StorageTypeProto { - if m != nil && m.StorageType != nil { - return *m.StorageType +func (x *CheckAccessRequestProto) Reset() { + *x = CheckAccessRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[155] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return StorageTypeProto_DISK } -type SetQuotaResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *CheckAccessRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetQuotaResponseProto) Reset() { *m = SetQuotaResponseProto{} } -func (m *SetQuotaResponseProto) String() string { return proto.CompactTextString(m) } -func (*SetQuotaResponseProto) ProtoMessage() {} -func (*SetQuotaResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{116} } +func (*CheckAccessRequestProto) ProtoMessage() {} -type FsyncRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - Client *string `protobuf:"bytes,2,req,name=client" json:"client,omitempty"` - LastBlockLength *int64 `protobuf:"zigzag64,3,opt,name=lastBlockLength,def=-1" json:"lastBlockLength,omitempty"` - FileId *uint64 `protobuf:"varint,4,opt,name=fileId,def=0" json:"fileId,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CheckAccessRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[155] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *FsyncRequestProto) Reset() { *m = FsyncRequestProto{} } -func (m *FsyncRequestProto) String() string { return proto.CompactTextString(m) } -func (*FsyncRequestProto) ProtoMessage() {} -func (*FsyncRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{117} } - -const Default_FsyncRequestProto_LastBlockLength int64 = -1 -const Default_FsyncRequestProto_FileId uint64 = 0 - -func (m *FsyncRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src - } - return "" +// Deprecated: Use CheckAccessRequestProto.ProtoReflect.Descriptor instead. +func (*CheckAccessRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{155} } -func (m *FsyncRequestProto) GetClient() string { - if m != nil && m.Client != nil { - return *m.Client +func (x *CheckAccessRequestProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } return "" } -func (m *FsyncRequestProto) GetLastBlockLength() int64 { - if m != nil && m.LastBlockLength != nil { - return *m.LastBlockLength +func (x *CheckAccessRequestProto) GetMode() AclEntryProto_FsActionProto { + if x != nil && x.Mode != nil { + return *x.Mode } - return Default_FsyncRequestProto_LastBlockLength + return AclEntryProto_NONE } -func (m *FsyncRequestProto) GetFileId() uint64 { - if m != nil && m.FileId != nil { - return *m.FileId - } - return Default_FsyncRequestProto_FileId +type CheckAccessResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -type FsyncResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *CheckAccessResponseProto) Reset() { + *x = CheckAccessResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[156] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *FsyncResponseProto) Reset() { *m = FsyncResponseProto{} } -func (m *FsyncResponseProto) String() string { return proto.CompactTextString(m) } -func (*FsyncResponseProto) ProtoMessage() {} -func (*FsyncResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{118} } - -type SetTimesRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - Mtime *uint64 `protobuf:"varint,2,req,name=mtime" json:"mtime,omitempty"` - Atime *uint64 `protobuf:"varint,3,req,name=atime" json:"atime,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *CheckAccessResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetTimesRequestProto) Reset() { *m = SetTimesRequestProto{} } -func (m *SetTimesRequestProto) String() string { return proto.CompactTextString(m) } -func (*SetTimesRequestProto) ProtoMessage() {} -func (*SetTimesRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{119} } +func (*CheckAccessResponseProto) ProtoMessage() {} -func (m *SetTimesRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *CheckAccessResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[156] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *SetTimesRequestProto) GetMtime() uint64 { - if m != nil && m.Mtime != nil { - return *m.Mtime - } - return 0 +// Deprecated: Use CheckAccessResponseProto.ProtoReflect.Descriptor instead. +func (*CheckAccessResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{156} } -func (m *SetTimesRequestProto) GetAtime() uint64 { - if m != nil && m.Atime != nil { - return *m.Atime - } - return 0 +type GetCurrentEditLogTxidRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -type SetTimesResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *GetCurrentEditLogTxidRequestProto) Reset() { + *x = GetCurrentEditLogTxidRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[157] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SetTimesResponseProto) Reset() { *m = SetTimesResponseProto{} } -func (m *SetTimesResponseProto) String() string { return proto.CompactTextString(m) } -func (*SetTimesResponseProto) ProtoMessage() {} -func (*SetTimesResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{120} } - -type CreateSymlinkRequestProto struct { - Target *string `protobuf:"bytes,1,req,name=target" json:"target,omitempty"` - Link *string `protobuf:"bytes,2,req,name=link" json:"link,omitempty"` - DirPerm *FsPermissionProto `protobuf:"bytes,3,req,name=dirPerm" json:"dirPerm,omitempty"` - CreateParent *bool `protobuf:"varint,4,req,name=createParent" json:"createParent,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetCurrentEditLogTxidRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateSymlinkRequestProto) Reset() { *m = CreateSymlinkRequestProto{} } -func (m *CreateSymlinkRequestProto) String() string { return proto.CompactTextString(m) } -func (*CreateSymlinkRequestProto) ProtoMessage() {} -func (*CreateSymlinkRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{121} } +func (*GetCurrentEditLogTxidRequestProto) ProtoMessage() {} -func (m *CreateSymlinkRequestProto) GetTarget() string { - if m != nil && m.Target != nil { - return *m.Target +func (x *GetCurrentEditLogTxidRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[157] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *CreateSymlinkRequestProto) GetLink() string { - if m != nil && m.Link != nil { - return *m.Link - } - return "" +// Deprecated: Use GetCurrentEditLogTxidRequestProto.ProtoReflect.Descriptor instead. +func (*GetCurrentEditLogTxidRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{157} } -func (m *CreateSymlinkRequestProto) GetDirPerm() *FsPermissionProto { - if m != nil { - return m.DirPerm - } - return nil +type GetCurrentEditLogTxidResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Txid *int64 `protobuf:"varint,1,req,name=txid" json:"txid,omitempty"` } -func (m *CreateSymlinkRequestProto) GetCreateParent() bool { - if m != nil && m.CreateParent != nil { - return *m.CreateParent +func (x *GetCurrentEditLogTxidResponseProto) Reset() { + *x = GetCurrentEditLogTxidResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[158] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return false } -type CreateSymlinkResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *GetCurrentEditLogTxidResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateSymlinkResponseProto) Reset() { *m = CreateSymlinkResponseProto{} } -func (m *CreateSymlinkResponseProto) String() string { return proto.CompactTextString(m) } -func (*CreateSymlinkResponseProto) ProtoMessage() {} -func (*CreateSymlinkResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{122} } +func (*GetCurrentEditLogTxidResponseProto) ProtoMessage() {} -type GetLinkTargetRequestProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetCurrentEditLogTxidResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[158] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetLinkTargetRequestProto) Reset() { *m = GetLinkTargetRequestProto{} } -func (m *GetLinkTargetRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetLinkTargetRequestProto) ProtoMessage() {} -func (*GetLinkTargetRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{123} } +// Deprecated: Use GetCurrentEditLogTxidResponseProto.ProtoReflect.Descriptor instead. +func (*GetCurrentEditLogTxidResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{158} +} -func (m *GetLinkTargetRequestProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *GetCurrentEditLogTxidResponseProto) GetTxid() int64 { + if x != nil && x.Txid != nil { + return *x.Txid } - return "" + return 0 } -type GetLinkTargetResponseProto struct { - TargetPath *string `protobuf:"bytes,1,opt,name=targetPath" json:"targetPath,omitempty"` - XXX_unrecognized []byte `json:"-"` -} +type GetEditsFromTxidRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetLinkTargetResponseProto) Reset() { *m = GetLinkTargetResponseProto{} } -func (m *GetLinkTargetResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetLinkTargetResponseProto) ProtoMessage() {} -func (*GetLinkTargetResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{124} } + Txid *int64 `protobuf:"varint,1,req,name=txid" json:"txid,omitempty"` +} -func (m *GetLinkTargetResponseProto) GetTargetPath() string { - if m != nil && m.TargetPath != nil { - return *m.TargetPath +func (x *GetEditsFromTxidRequestProto) Reset() { + *x = GetEditsFromTxidRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[159] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type UpdateBlockForPipelineRequestProto struct { - Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` - ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetEditsFromTxidRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UpdateBlockForPipelineRequestProto) Reset() { *m = UpdateBlockForPipelineRequestProto{} } -func (m *UpdateBlockForPipelineRequestProto) String() string { return proto.CompactTextString(m) } -func (*UpdateBlockForPipelineRequestProto) ProtoMessage() {} -func (*UpdateBlockForPipelineRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{125} -} +func (*GetEditsFromTxidRequestProto) ProtoMessage() {} -func (m *UpdateBlockForPipelineRequestProto) GetBlock() *ExtendedBlockProto { - if m != nil { - return m.Block +func (x *GetEditsFromTxidRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[159] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *UpdateBlockForPipelineRequestProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName - } - return "" +// Deprecated: Use GetEditsFromTxidRequestProto.ProtoReflect.Descriptor instead. +func (*GetEditsFromTxidRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{159} } -type UpdateBlockForPipelineResponseProto struct { - Block *LocatedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetEditsFromTxidRequestProto) GetTxid() int64 { + if x != nil && x.Txid != nil { + return *x.Txid + } + return 0 } -func (m *UpdateBlockForPipelineResponseProto) Reset() { *m = UpdateBlockForPipelineResponseProto{} } -func (m *UpdateBlockForPipelineResponseProto) String() string { return proto.CompactTextString(m) } -func (*UpdateBlockForPipelineResponseProto) ProtoMessage() {} -func (*UpdateBlockForPipelineResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{126} +type GetEditsFromTxidResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EventsList *EventsListProto `protobuf:"bytes,1,req,name=eventsList" json:"eventsList,omitempty"` } -func (m *UpdateBlockForPipelineResponseProto) GetBlock() *LocatedBlockProto { - if m != nil { - return m.Block +func (x *GetEditsFromTxidResponseProto) Reset() { + *x = GetEditsFromTxidResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[160] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type UpdatePipelineRequestProto struct { - ClientName *string `protobuf:"bytes,1,req,name=clientName" json:"clientName,omitempty"` - OldBlock *ExtendedBlockProto `protobuf:"bytes,2,req,name=oldBlock" json:"oldBlock,omitempty"` - NewBlock *ExtendedBlockProto `protobuf:"bytes,3,req,name=newBlock" json:"newBlock,omitempty"` - NewNodes []*DatanodeIDProto `protobuf:"bytes,4,rep,name=newNodes" json:"newNodes,omitempty"` - StorageIDs []string `protobuf:"bytes,5,rep,name=storageIDs" json:"storageIDs,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *GetEditsFromTxidResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UpdatePipelineRequestProto) Reset() { *m = UpdatePipelineRequestProto{} } -func (m *UpdatePipelineRequestProto) String() string { return proto.CompactTextString(m) } -func (*UpdatePipelineRequestProto) ProtoMessage() {} -func (*UpdatePipelineRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{127} } +func (*GetEditsFromTxidResponseProto) ProtoMessage() {} -func (m *UpdatePipelineRequestProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName +func (x *GetEditsFromTxidResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[160] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *UpdatePipelineRequestProto) GetOldBlock() *ExtendedBlockProto { - if m != nil { - return m.OldBlock - } - return nil +// Deprecated: Use GetEditsFromTxidResponseProto.ProtoReflect.Descriptor instead. +func (*GetEditsFromTxidResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{160} } -func (m *UpdatePipelineRequestProto) GetNewBlock() *ExtendedBlockProto { - if m != nil { - return m.NewBlock +func (x *GetEditsFromTxidResponseProto) GetEventsList() *EventsListProto { + if x != nil { + return x.EventsList } return nil } -func (m *UpdatePipelineRequestProto) GetNewNodes() []*DatanodeIDProto { - if m != nil { - return m.NewNodes - } - return nil +type ListOpenFilesRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` + Types []OpenFilesTypeProto `protobuf:"varint,2,rep,name=types,enum=hadoop.hdfs.OpenFilesTypeProto" json:"types,omitempty"` + Path *string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` } -func (m *UpdatePipelineRequestProto) GetStorageIDs() []string { - if m != nil { - return m.StorageIDs +func (x *ListOpenFilesRequestProto) Reset() { + *x = ListOpenFilesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[161] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type UpdatePipelineResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *ListOpenFilesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UpdatePipelineResponseProto) Reset() { *m = UpdatePipelineResponseProto{} } -func (m *UpdatePipelineResponseProto) String() string { return proto.CompactTextString(m) } -func (*UpdatePipelineResponseProto) ProtoMessage() {} -func (*UpdatePipelineResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{128} } +func (*ListOpenFilesRequestProto) ProtoMessage() {} -type SetBalancerBandwidthRequestProto struct { - Bandwidth *int64 `protobuf:"varint,1,req,name=bandwidth" json:"bandwidth,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ListOpenFilesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[161] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *SetBalancerBandwidthRequestProto) Reset() { *m = SetBalancerBandwidthRequestProto{} } -func (m *SetBalancerBandwidthRequestProto) String() string { return proto.CompactTextString(m) } -func (*SetBalancerBandwidthRequestProto) ProtoMessage() {} -func (*SetBalancerBandwidthRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{129} +// Deprecated: Use ListOpenFilesRequestProto.ProtoReflect.Descriptor instead. +func (*ListOpenFilesRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{161} } -func (m *SetBalancerBandwidthRequestProto) GetBandwidth() int64 { - if m != nil && m.Bandwidth != nil { - return *m.Bandwidth +func (x *ListOpenFilesRequestProto) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id } return 0 } -type SetBalancerBandwidthResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *ListOpenFilesRequestProto) GetTypes() []OpenFilesTypeProto { + if x != nil { + return x.Types + } + return nil } -func (m *SetBalancerBandwidthResponseProto) Reset() { *m = SetBalancerBandwidthResponseProto{} } -func (m *SetBalancerBandwidthResponseProto) String() string { return proto.CompactTextString(m) } -func (*SetBalancerBandwidthResponseProto) ProtoMessage() {} -func (*SetBalancerBandwidthResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{130} +func (x *ListOpenFilesRequestProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path + } + return "" } -type GetDataEncryptionKeyRequestProto struct { - XXX_unrecognized []byte `json:"-"` -} +type OpenFilesBatchResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetDataEncryptionKeyRequestProto) Reset() { *m = GetDataEncryptionKeyRequestProto{} } -func (m *GetDataEncryptionKeyRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetDataEncryptionKeyRequestProto) ProtoMessage() {} -func (*GetDataEncryptionKeyRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{131} + Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` + Path *string `protobuf:"bytes,2,req,name=path" json:"path,omitempty"` + ClientName *string `protobuf:"bytes,3,req,name=clientName" json:"clientName,omitempty"` + ClientMachine *string `protobuf:"bytes,4,req,name=clientMachine" json:"clientMachine,omitempty"` } -type GetDataEncryptionKeyResponseProto struct { - DataEncryptionKey *DataEncryptionKeyProto `protobuf:"bytes,1,opt,name=dataEncryptionKey" json:"dataEncryptionKey,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *OpenFilesBatchResponseProto) Reset() { + *x = OpenFilesBatchResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[162] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetDataEncryptionKeyResponseProto) Reset() { *m = GetDataEncryptionKeyResponseProto{} } -func (m *GetDataEncryptionKeyResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetDataEncryptionKeyResponseProto) ProtoMessage() {} -func (*GetDataEncryptionKeyResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{132} +func (x *OpenFilesBatchResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetDataEncryptionKeyResponseProto) GetDataEncryptionKey() *DataEncryptionKeyProto { - if m != nil { - return m.DataEncryptionKey +func (*OpenFilesBatchResponseProto) ProtoMessage() {} + +func (x *OpenFilesBatchResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[162] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type CreateSnapshotRequestProto struct { - SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` - SnapshotName *string `protobuf:"bytes,2,opt,name=snapshotName" json:"snapshotName,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use OpenFilesBatchResponseProto.ProtoReflect.Descriptor instead. +func (*OpenFilesBatchResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{162} } -func (m *CreateSnapshotRequestProto) Reset() { *m = CreateSnapshotRequestProto{} } -func (m *CreateSnapshotRequestProto) String() string { return proto.CompactTextString(m) } -func (*CreateSnapshotRequestProto) ProtoMessage() {} -func (*CreateSnapshotRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{133} } +func (x *OpenFilesBatchResponseProto) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id + } + return 0 +} -func (m *CreateSnapshotRequestProto) GetSnapshotRoot() string { - if m != nil && m.SnapshotRoot != nil { - return *m.SnapshotRoot +func (x *OpenFilesBatchResponseProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } return "" } -func (m *CreateSnapshotRequestProto) GetSnapshotName() string { - if m != nil && m.SnapshotName != nil { - return *m.SnapshotName +func (x *OpenFilesBatchResponseProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName } return "" } -type CreateSnapshotResponseProto struct { - SnapshotPath *string `protobuf:"bytes,1,req,name=snapshotPath" json:"snapshotPath,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *OpenFilesBatchResponseProto) GetClientMachine() string { + if x != nil && x.ClientMachine != nil { + return *x.ClientMachine + } + return "" } -func (m *CreateSnapshotResponseProto) Reset() { *m = CreateSnapshotResponseProto{} } -func (m *CreateSnapshotResponseProto) String() string { return proto.CompactTextString(m) } -func (*CreateSnapshotResponseProto) ProtoMessage() {} -func (*CreateSnapshotResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{134} } +type ListOpenFilesResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entries []*OpenFilesBatchResponseProto `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` + HasMore *bool `protobuf:"varint,2,req,name=hasMore" json:"hasMore,omitempty"` + Types []OpenFilesTypeProto `protobuf:"varint,3,rep,name=types,enum=hadoop.hdfs.OpenFilesTypeProto" json:"types,omitempty"` +} -func (m *CreateSnapshotResponseProto) GetSnapshotPath() string { - if m != nil && m.SnapshotPath != nil { - return *m.SnapshotPath +func (x *ListOpenFilesResponseProto) Reset() { + *x = ListOpenFilesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[163] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type RenameSnapshotRequestProto struct { - SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` - SnapshotOldName *string `protobuf:"bytes,2,req,name=snapshotOldName" json:"snapshotOldName,omitempty"` - SnapshotNewName *string `protobuf:"bytes,3,req,name=snapshotNewName" json:"snapshotNewName,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ListOpenFilesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RenameSnapshotRequestProto) Reset() { *m = RenameSnapshotRequestProto{} } -func (m *RenameSnapshotRequestProto) String() string { return proto.CompactTextString(m) } -func (*RenameSnapshotRequestProto) ProtoMessage() {} -func (*RenameSnapshotRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{135} } +func (*ListOpenFilesResponseProto) ProtoMessage() {} -func (m *RenameSnapshotRequestProto) GetSnapshotRoot() string { - if m != nil && m.SnapshotRoot != nil { - return *m.SnapshotRoot +func (x *ListOpenFilesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[163] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (m *RenameSnapshotRequestProto) GetSnapshotOldName() string { - if m != nil && m.SnapshotOldName != nil { - return *m.SnapshotOldName - } - return "" +// Deprecated: Use ListOpenFilesResponseProto.ProtoReflect.Descriptor instead. +func (*ListOpenFilesResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{163} } -func (m *RenameSnapshotRequestProto) GetSnapshotNewName() string { - if m != nil && m.SnapshotNewName != nil { - return *m.SnapshotNewName +func (x *ListOpenFilesResponseProto) GetEntries() []*OpenFilesBatchResponseProto { + if x != nil { + return x.Entries } - return "" + return nil } -type RenameSnapshotResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *ListOpenFilesResponseProto) GetHasMore() bool { + if x != nil && x.HasMore != nil { + return *x.HasMore + } + return false } -func (m *RenameSnapshotResponseProto) Reset() { *m = RenameSnapshotResponseProto{} } -func (m *RenameSnapshotResponseProto) String() string { return proto.CompactTextString(m) } -func (*RenameSnapshotResponseProto) ProtoMessage() {} -func (*RenameSnapshotResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{136} } - -type AllowSnapshotRequestProto struct { - SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *ListOpenFilesResponseProto) GetTypes() []OpenFilesTypeProto { + if x != nil { + return x.Types + } + return nil } -func (m *AllowSnapshotRequestProto) Reset() { *m = AllowSnapshotRequestProto{} } -func (m *AllowSnapshotRequestProto) String() string { return proto.CompactTextString(m) } -func (*AllowSnapshotRequestProto) ProtoMessage() {} -func (*AllowSnapshotRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{137} } +type MsyncRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} -func (m *AllowSnapshotRequestProto) GetSnapshotRoot() string { - if m != nil && m.SnapshotRoot != nil { - return *m.SnapshotRoot +func (x *MsyncRequestProto) Reset() { + *x = MsyncRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[164] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type AllowSnapshotResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *MsyncRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AllowSnapshotResponseProto) Reset() { *m = AllowSnapshotResponseProto{} } -func (m *AllowSnapshotResponseProto) String() string { return proto.CompactTextString(m) } -func (*AllowSnapshotResponseProto) ProtoMessage() {} -func (*AllowSnapshotResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{138} } +func (*MsyncRequestProto) ProtoMessage() {} -type DisallowSnapshotRequestProto struct { - SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *MsyncRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[164] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *DisallowSnapshotRequestProto) Reset() { *m = DisallowSnapshotRequestProto{} } -func (m *DisallowSnapshotRequestProto) String() string { return proto.CompactTextString(m) } -func (*DisallowSnapshotRequestProto) ProtoMessage() {} -func (*DisallowSnapshotRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{139} } +// Deprecated: Use MsyncRequestProto.ProtoReflect.Descriptor instead. +func (*MsyncRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{164} +} + +type MsyncResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} -func (m *DisallowSnapshotRequestProto) GetSnapshotRoot() string { - if m != nil && m.SnapshotRoot != nil { - return *m.SnapshotRoot +func (x *MsyncResponseProto) Reset() { + *x = MsyncResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[165] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type DisallowSnapshotResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *MsyncResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DisallowSnapshotResponseProto) Reset() { *m = DisallowSnapshotResponseProto{} } -func (m *DisallowSnapshotResponseProto) String() string { return proto.CompactTextString(m) } -func (*DisallowSnapshotResponseProto) ProtoMessage() {} -func (*DisallowSnapshotResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{140} } +func (*MsyncResponseProto) ProtoMessage() {} -type DeleteSnapshotRequestProto struct { - SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` - SnapshotName *string `protobuf:"bytes,2,req,name=snapshotName" json:"snapshotName,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *MsyncResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[165] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MsyncResponseProto.ProtoReflect.Descriptor instead. +func (*MsyncResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{165} } -func (m *DeleteSnapshotRequestProto) Reset() { *m = DeleteSnapshotRequestProto{} } -func (m *DeleteSnapshotRequestProto) String() string { return proto.CompactTextString(m) } -func (*DeleteSnapshotRequestProto) ProtoMessage() {} -func (*DeleteSnapshotRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{141} } +type SatisfyStoragePolicyRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *DeleteSnapshotRequestProto) GetSnapshotRoot() string { - if m != nil && m.SnapshotRoot != nil { - return *m.SnapshotRoot - } - return "" + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` } -func (m *DeleteSnapshotRequestProto) GetSnapshotName() string { - if m != nil && m.SnapshotName != nil { - return *m.SnapshotName +func (x *SatisfyStoragePolicyRequestProto) Reset() { + *x = SatisfyStoragePolicyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[166] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type DeleteSnapshotResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *SatisfyStoragePolicyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DeleteSnapshotResponseProto) Reset() { *m = DeleteSnapshotResponseProto{} } -func (m *DeleteSnapshotResponseProto) String() string { return proto.CompactTextString(m) } -func (*DeleteSnapshotResponseProto) ProtoMessage() {} -func (*DeleteSnapshotResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{142} } +func (*SatisfyStoragePolicyRequestProto) ProtoMessage() {} -type CheckAccessRequestProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - Mode *AclEntryProto_FsActionProto `protobuf:"varint,2,req,name=mode,enum=hadoop.hdfs.AclEntryProto_FsActionProto" json:"mode,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *SatisfyStoragePolicyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[166] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *CheckAccessRequestProto) Reset() { *m = CheckAccessRequestProto{} } -func (m *CheckAccessRequestProto) String() string { return proto.CompactTextString(m) } -func (*CheckAccessRequestProto) ProtoMessage() {} -func (*CheckAccessRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{143} } +// Deprecated: Use SatisfyStoragePolicyRequestProto.ProtoReflect.Descriptor instead. +func (*SatisfyStoragePolicyRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{166} +} -func (m *CheckAccessRequestProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *SatisfyStoragePolicyRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *CheckAccessRequestProto) GetMode() AclEntryProto_FsActionProto { - if m != nil && m.Mode != nil { - return *m.Mode +type SatisfyStoragePolicyResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SatisfyStoragePolicyResponseProto) Reset() { + *x = SatisfyStoragePolicyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[167] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return AclEntryProto_NONE } -type CheckAccessResponseProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *SatisfyStoragePolicyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CheckAccessResponseProto) Reset() { *m = CheckAccessResponseProto{} } -func (m *CheckAccessResponseProto) String() string { return proto.CompactTextString(m) } -func (*CheckAccessResponseProto) ProtoMessage() {} -func (*CheckAccessResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{144} } +func (*SatisfyStoragePolicyResponseProto) ProtoMessage() {} -type GetCurrentEditLogTxidRequestProto struct { - XXX_unrecognized []byte `json:"-"` +func (x *SatisfyStoragePolicyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[167] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetCurrentEditLogTxidRequestProto) Reset() { *m = GetCurrentEditLogTxidRequestProto{} } -func (m *GetCurrentEditLogTxidRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetCurrentEditLogTxidRequestProto) ProtoMessage() {} -func (*GetCurrentEditLogTxidRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{145} +// Deprecated: Use SatisfyStoragePolicyResponseProto.ProtoReflect.Descriptor instead. +func (*SatisfyStoragePolicyResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{167} } -type GetCurrentEditLogTxidResponseProto struct { - Txid *int64 `protobuf:"varint,1,req,name=txid" json:"txid,omitempty"` - XXX_unrecognized []byte `json:"-"` +type HAServiceStateRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *GetCurrentEditLogTxidResponseProto) Reset() { *m = GetCurrentEditLogTxidResponseProto{} } -func (m *GetCurrentEditLogTxidResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetCurrentEditLogTxidResponseProto) ProtoMessage() {} -func (*GetCurrentEditLogTxidResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor4, []int{146} +func (x *HAServiceStateRequestProto) Reset() { + *x = HAServiceStateRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[168] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HAServiceStateRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetCurrentEditLogTxidResponseProto) GetTxid() int64 { - if m != nil && m.Txid != nil { - return *m.Txid +func (*HAServiceStateRequestProto) ProtoMessage() {} + +func (x *HAServiceStateRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[168] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -type GetEditsFromTxidRequestProto struct { - Txid *int64 `protobuf:"varint,1,req,name=txid" json:"txid,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use HAServiceStateRequestProto.ProtoReflect.Descriptor instead. +func (*HAServiceStateRequestProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{168} } -func (m *GetEditsFromTxidRequestProto) Reset() { *m = GetEditsFromTxidRequestProto{} } -func (m *GetEditsFromTxidRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetEditsFromTxidRequestProto) ProtoMessage() {} -func (*GetEditsFromTxidRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{147} } +type HAServiceStateResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetEditsFromTxidRequestProto) GetTxid() int64 { - if m != nil && m.Txid != nil { - return *m.Txid - } - return 0 + State *hadoop_common.HAServiceStateProto `protobuf:"varint,1,req,name=state,enum=hadoop.common.HAServiceStateProto" json:"state,omitempty"` } -type GetEditsFromTxidResponseProto struct { - EventsList *EventsListProto `protobuf:"bytes,1,req,name=eventsList" json:"eventsList,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GetEditsFromTxidResponseProto) Reset() { *m = GetEditsFromTxidResponseProto{} } -func (m *GetEditsFromTxidResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetEditsFromTxidResponseProto) ProtoMessage() {} -func (*GetEditsFromTxidResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{148} } - -func (m *GetEditsFromTxidResponseProto) GetEventsList() *EventsListProto { - if m != nil { - return m.EventsList - } - return nil -} - -func init() { - proto.RegisterType((*GetBlockLocationsRequestProto)(nil), "hadoop.hdfs.GetBlockLocationsRequestProto") - proto.RegisterType((*GetBlockLocationsResponseProto)(nil), "hadoop.hdfs.GetBlockLocationsResponseProto") - proto.RegisterType((*GetServerDefaultsRequestProto)(nil), "hadoop.hdfs.GetServerDefaultsRequestProto") - proto.RegisterType((*GetServerDefaultsResponseProto)(nil), "hadoop.hdfs.GetServerDefaultsResponseProto") - proto.RegisterType((*CreateRequestProto)(nil), "hadoop.hdfs.CreateRequestProto") - proto.RegisterType((*CreateResponseProto)(nil), "hadoop.hdfs.CreateResponseProto") - proto.RegisterType((*AppendRequestProto)(nil), "hadoop.hdfs.AppendRequestProto") - proto.RegisterType((*AppendResponseProto)(nil), "hadoop.hdfs.AppendResponseProto") - proto.RegisterType((*SetReplicationRequestProto)(nil), "hadoop.hdfs.SetReplicationRequestProto") - proto.RegisterType((*SetReplicationResponseProto)(nil), "hadoop.hdfs.SetReplicationResponseProto") - proto.RegisterType((*SetStoragePolicyRequestProto)(nil), "hadoop.hdfs.SetStoragePolicyRequestProto") - proto.RegisterType((*SetStoragePolicyResponseProto)(nil), "hadoop.hdfs.SetStoragePolicyResponseProto") - proto.RegisterType((*UnsetStoragePolicyRequestProto)(nil), "hadoop.hdfs.UnsetStoragePolicyRequestProto") - proto.RegisterType((*UnsetStoragePolicyResponseProto)(nil), "hadoop.hdfs.UnsetStoragePolicyResponseProto") - proto.RegisterType((*GetStoragePolicyRequestProto)(nil), "hadoop.hdfs.GetStoragePolicyRequestProto") - proto.RegisterType((*GetStoragePolicyResponseProto)(nil), "hadoop.hdfs.GetStoragePolicyResponseProto") - proto.RegisterType((*GetStoragePoliciesRequestProto)(nil), "hadoop.hdfs.GetStoragePoliciesRequestProto") - proto.RegisterType((*GetStoragePoliciesResponseProto)(nil), "hadoop.hdfs.GetStoragePoliciesResponseProto") - proto.RegisterType((*SetPermissionRequestProto)(nil), "hadoop.hdfs.SetPermissionRequestProto") - proto.RegisterType((*SetPermissionResponseProto)(nil), "hadoop.hdfs.SetPermissionResponseProto") - proto.RegisterType((*SetOwnerRequestProto)(nil), "hadoop.hdfs.SetOwnerRequestProto") - proto.RegisterType((*SetOwnerResponseProto)(nil), "hadoop.hdfs.SetOwnerResponseProto") - proto.RegisterType((*AbandonBlockRequestProto)(nil), "hadoop.hdfs.AbandonBlockRequestProto") - proto.RegisterType((*AbandonBlockResponseProto)(nil), "hadoop.hdfs.AbandonBlockResponseProto") - proto.RegisterType((*AddBlockRequestProto)(nil), "hadoop.hdfs.AddBlockRequestProto") - proto.RegisterType((*AddBlockResponseProto)(nil), "hadoop.hdfs.AddBlockResponseProto") - proto.RegisterType((*GetAdditionalDatanodeRequestProto)(nil), "hadoop.hdfs.GetAdditionalDatanodeRequestProto") - proto.RegisterType((*GetAdditionalDatanodeResponseProto)(nil), "hadoop.hdfs.GetAdditionalDatanodeResponseProto") - proto.RegisterType((*CompleteRequestProto)(nil), "hadoop.hdfs.CompleteRequestProto") - proto.RegisterType((*CompleteResponseProto)(nil), "hadoop.hdfs.CompleteResponseProto") - proto.RegisterType((*ReportBadBlocksRequestProto)(nil), "hadoop.hdfs.ReportBadBlocksRequestProto") - proto.RegisterType((*ReportBadBlocksResponseProto)(nil), "hadoop.hdfs.ReportBadBlocksResponseProto") - proto.RegisterType((*ConcatRequestProto)(nil), "hadoop.hdfs.ConcatRequestProto") - proto.RegisterType((*ConcatResponseProto)(nil), "hadoop.hdfs.ConcatResponseProto") - proto.RegisterType((*TruncateRequestProto)(nil), "hadoop.hdfs.TruncateRequestProto") - proto.RegisterType((*TruncateResponseProto)(nil), "hadoop.hdfs.TruncateResponseProto") - proto.RegisterType((*RenameRequestProto)(nil), "hadoop.hdfs.RenameRequestProto") - proto.RegisterType((*RenameResponseProto)(nil), "hadoop.hdfs.RenameResponseProto") - proto.RegisterType((*Rename2RequestProto)(nil), "hadoop.hdfs.Rename2RequestProto") - proto.RegisterType((*Rename2ResponseProto)(nil), "hadoop.hdfs.Rename2ResponseProto") - proto.RegisterType((*DeleteRequestProto)(nil), "hadoop.hdfs.DeleteRequestProto") - proto.RegisterType((*DeleteResponseProto)(nil), "hadoop.hdfs.DeleteResponseProto") - proto.RegisterType((*MkdirsRequestProto)(nil), "hadoop.hdfs.MkdirsRequestProto") - proto.RegisterType((*MkdirsResponseProto)(nil), "hadoop.hdfs.MkdirsResponseProto") - proto.RegisterType((*GetListingRequestProto)(nil), "hadoop.hdfs.GetListingRequestProto") - proto.RegisterType((*GetListingResponseProto)(nil), "hadoop.hdfs.GetListingResponseProto") - proto.RegisterType((*GetSnapshottableDirListingRequestProto)(nil), "hadoop.hdfs.GetSnapshottableDirListingRequestProto") - proto.RegisterType((*GetSnapshottableDirListingResponseProto)(nil), "hadoop.hdfs.GetSnapshottableDirListingResponseProto") - proto.RegisterType((*GetSnapshotDiffReportRequestProto)(nil), "hadoop.hdfs.GetSnapshotDiffReportRequestProto") - proto.RegisterType((*GetSnapshotDiffReportResponseProto)(nil), "hadoop.hdfs.GetSnapshotDiffReportResponseProto") - proto.RegisterType((*RenewLeaseRequestProto)(nil), "hadoop.hdfs.RenewLeaseRequestProto") - proto.RegisterType((*RenewLeaseResponseProto)(nil), "hadoop.hdfs.RenewLeaseResponseProto") - proto.RegisterType((*RecoverLeaseRequestProto)(nil), "hadoop.hdfs.RecoverLeaseRequestProto") - proto.RegisterType((*RecoverLeaseResponseProto)(nil), "hadoop.hdfs.RecoverLeaseResponseProto") - proto.RegisterType((*GetFsStatusRequestProto)(nil), "hadoop.hdfs.GetFsStatusRequestProto") - proto.RegisterType((*GetFsStatsResponseProto)(nil), "hadoop.hdfs.GetFsStatsResponseProto") - proto.RegisterType((*GetDatanodeReportRequestProto)(nil), "hadoop.hdfs.GetDatanodeReportRequestProto") - proto.RegisterType((*GetDatanodeReportResponseProto)(nil), "hadoop.hdfs.GetDatanodeReportResponseProto") - proto.RegisterType((*GetDatanodeStorageReportRequestProto)(nil), "hadoop.hdfs.GetDatanodeStorageReportRequestProto") - proto.RegisterType((*DatanodeStorageReportProto)(nil), "hadoop.hdfs.DatanodeStorageReportProto") - proto.RegisterType((*GetDatanodeStorageReportResponseProto)(nil), "hadoop.hdfs.GetDatanodeStorageReportResponseProto") - proto.RegisterType((*GetPreferredBlockSizeRequestProto)(nil), "hadoop.hdfs.GetPreferredBlockSizeRequestProto") - proto.RegisterType((*GetPreferredBlockSizeResponseProto)(nil), "hadoop.hdfs.GetPreferredBlockSizeResponseProto") - proto.RegisterType((*SetSafeModeRequestProto)(nil), "hadoop.hdfs.SetSafeModeRequestProto") - proto.RegisterType((*SetSafeModeResponseProto)(nil), "hadoop.hdfs.SetSafeModeResponseProto") - proto.RegisterType((*SaveNamespaceRequestProto)(nil), "hadoop.hdfs.SaveNamespaceRequestProto") - proto.RegisterType((*SaveNamespaceResponseProto)(nil), "hadoop.hdfs.SaveNamespaceResponseProto") - proto.RegisterType((*RollEditsRequestProto)(nil), "hadoop.hdfs.RollEditsRequestProto") - proto.RegisterType((*RollEditsResponseProto)(nil), "hadoop.hdfs.RollEditsResponseProto") - proto.RegisterType((*RestoreFailedStorageRequestProto)(nil), "hadoop.hdfs.RestoreFailedStorageRequestProto") - proto.RegisterType((*RestoreFailedStorageResponseProto)(nil), "hadoop.hdfs.RestoreFailedStorageResponseProto") - proto.RegisterType((*RefreshNodesRequestProto)(nil), "hadoop.hdfs.RefreshNodesRequestProto") - proto.RegisterType((*RefreshNodesResponseProto)(nil), "hadoop.hdfs.RefreshNodesResponseProto") - proto.RegisterType((*FinalizeUpgradeRequestProto)(nil), "hadoop.hdfs.FinalizeUpgradeRequestProto") - proto.RegisterType((*FinalizeUpgradeResponseProto)(nil), "hadoop.hdfs.FinalizeUpgradeResponseProto") - proto.RegisterType((*RollingUpgradeRequestProto)(nil), "hadoop.hdfs.RollingUpgradeRequestProto") - proto.RegisterType((*RollingUpgradeInfoProto)(nil), "hadoop.hdfs.RollingUpgradeInfoProto") - proto.RegisterType((*RollingUpgradeResponseProto)(nil), "hadoop.hdfs.RollingUpgradeResponseProto") - proto.RegisterType((*ListCorruptFileBlocksRequestProto)(nil), "hadoop.hdfs.ListCorruptFileBlocksRequestProto") - proto.RegisterType((*ListCorruptFileBlocksResponseProto)(nil), "hadoop.hdfs.ListCorruptFileBlocksResponseProto") - proto.RegisterType((*MetaSaveRequestProto)(nil), "hadoop.hdfs.MetaSaveRequestProto") - proto.RegisterType((*MetaSaveResponseProto)(nil), "hadoop.hdfs.MetaSaveResponseProto") - proto.RegisterType((*GetFileInfoRequestProto)(nil), "hadoop.hdfs.GetFileInfoRequestProto") - proto.RegisterType((*GetFileInfoResponseProto)(nil), "hadoop.hdfs.GetFileInfoResponseProto") - proto.RegisterType((*IsFileClosedRequestProto)(nil), "hadoop.hdfs.IsFileClosedRequestProto") - proto.RegisterType((*IsFileClosedResponseProto)(nil), "hadoop.hdfs.IsFileClosedResponseProto") - proto.RegisterType((*CacheDirectiveInfoProto)(nil), "hadoop.hdfs.CacheDirectiveInfoProto") - proto.RegisterType((*CacheDirectiveInfoExpirationProto)(nil), "hadoop.hdfs.CacheDirectiveInfoExpirationProto") - proto.RegisterType((*CacheDirectiveStatsProto)(nil), "hadoop.hdfs.CacheDirectiveStatsProto") - proto.RegisterType((*AddCacheDirectiveRequestProto)(nil), "hadoop.hdfs.AddCacheDirectiveRequestProto") - proto.RegisterType((*AddCacheDirectiveResponseProto)(nil), "hadoop.hdfs.AddCacheDirectiveResponseProto") - proto.RegisterType((*ModifyCacheDirectiveRequestProto)(nil), "hadoop.hdfs.ModifyCacheDirectiveRequestProto") - proto.RegisterType((*ModifyCacheDirectiveResponseProto)(nil), "hadoop.hdfs.ModifyCacheDirectiveResponseProto") - proto.RegisterType((*RemoveCacheDirectiveRequestProto)(nil), "hadoop.hdfs.RemoveCacheDirectiveRequestProto") - proto.RegisterType((*RemoveCacheDirectiveResponseProto)(nil), "hadoop.hdfs.RemoveCacheDirectiveResponseProto") - proto.RegisterType((*ListCacheDirectivesRequestProto)(nil), "hadoop.hdfs.ListCacheDirectivesRequestProto") - proto.RegisterType((*CacheDirectiveEntryProto)(nil), "hadoop.hdfs.CacheDirectiveEntryProto") - proto.RegisterType((*ListCacheDirectivesResponseProto)(nil), "hadoop.hdfs.ListCacheDirectivesResponseProto") - proto.RegisterType((*CachePoolInfoProto)(nil), "hadoop.hdfs.CachePoolInfoProto") - proto.RegisterType((*CachePoolStatsProto)(nil), "hadoop.hdfs.CachePoolStatsProto") - proto.RegisterType((*AddCachePoolRequestProto)(nil), "hadoop.hdfs.AddCachePoolRequestProto") - proto.RegisterType((*AddCachePoolResponseProto)(nil), "hadoop.hdfs.AddCachePoolResponseProto") - proto.RegisterType((*ModifyCachePoolRequestProto)(nil), "hadoop.hdfs.ModifyCachePoolRequestProto") - proto.RegisterType((*ModifyCachePoolResponseProto)(nil), "hadoop.hdfs.ModifyCachePoolResponseProto") - proto.RegisterType((*RemoveCachePoolRequestProto)(nil), "hadoop.hdfs.RemoveCachePoolRequestProto") - proto.RegisterType((*RemoveCachePoolResponseProto)(nil), "hadoop.hdfs.RemoveCachePoolResponseProto") - proto.RegisterType((*ListCachePoolsRequestProto)(nil), "hadoop.hdfs.ListCachePoolsRequestProto") - proto.RegisterType((*ListCachePoolsResponseProto)(nil), "hadoop.hdfs.ListCachePoolsResponseProto") - proto.RegisterType((*CachePoolEntryProto)(nil), "hadoop.hdfs.CachePoolEntryProto") - proto.RegisterType((*GetFileLinkInfoRequestProto)(nil), "hadoop.hdfs.GetFileLinkInfoRequestProto") - proto.RegisterType((*GetFileLinkInfoResponseProto)(nil), "hadoop.hdfs.GetFileLinkInfoResponseProto") - proto.RegisterType((*GetContentSummaryRequestProto)(nil), "hadoop.hdfs.GetContentSummaryRequestProto") - proto.RegisterType((*GetContentSummaryResponseProto)(nil), "hadoop.hdfs.GetContentSummaryResponseProto") - proto.RegisterType((*GetQuotaUsageRequestProto)(nil), "hadoop.hdfs.GetQuotaUsageRequestProto") - proto.RegisterType((*GetQuotaUsageResponseProto)(nil), "hadoop.hdfs.GetQuotaUsageResponseProto") - proto.RegisterType((*SetQuotaRequestProto)(nil), "hadoop.hdfs.SetQuotaRequestProto") - proto.RegisterType((*SetQuotaResponseProto)(nil), "hadoop.hdfs.SetQuotaResponseProto") - proto.RegisterType((*FsyncRequestProto)(nil), "hadoop.hdfs.FsyncRequestProto") - proto.RegisterType((*FsyncResponseProto)(nil), "hadoop.hdfs.FsyncResponseProto") - proto.RegisterType((*SetTimesRequestProto)(nil), "hadoop.hdfs.SetTimesRequestProto") - proto.RegisterType((*SetTimesResponseProto)(nil), "hadoop.hdfs.SetTimesResponseProto") - proto.RegisterType((*CreateSymlinkRequestProto)(nil), "hadoop.hdfs.CreateSymlinkRequestProto") - proto.RegisterType((*CreateSymlinkResponseProto)(nil), "hadoop.hdfs.CreateSymlinkResponseProto") - proto.RegisterType((*GetLinkTargetRequestProto)(nil), "hadoop.hdfs.GetLinkTargetRequestProto") - proto.RegisterType((*GetLinkTargetResponseProto)(nil), "hadoop.hdfs.GetLinkTargetResponseProto") - proto.RegisterType((*UpdateBlockForPipelineRequestProto)(nil), "hadoop.hdfs.UpdateBlockForPipelineRequestProto") - proto.RegisterType((*UpdateBlockForPipelineResponseProto)(nil), "hadoop.hdfs.UpdateBlockForPipelineResponseProto") - proto.RegisterType((*UpdatePipelineRequestProto)(nil), "hadoop.hdfs.UpdatePipelineRequestProto") - proto.RegisterType((*UpdatePipelineResponseProto)(nil), "hadoop.hdfs.UpdatePipelineResponseProto") - proto.RegisterType((*SetBalancerBandwidthRequestProto)(nil), "hadoop.hdfs.SetBalancerBandwidthRequestProto") - proto.RegisterType((*SetBalancerBandwidthResponseProto)(nil), "hadoop.hdfs.SetBalancerBandwidthResponseProto") - proto.RegisterType((*GetDataEncryptionKeyRequestProto)(nil), "hadoop.hdfs.GetDataEncryptionKeyRequestProto") - proto.RegisterType((*GetDataEncryptionKeyResponseProto)(nil), "hadoop.hdfs.GetDataEncryptionKeyResponseProto") - proto.RegisterType((*CreateSnapshotRequestProto)(nil), "hadoop.hdfs.CreateSnapshotRequestProto") - proto.RegisterType((*CreateSnapshotResponseProto)(nil), "hadoop.hdfs.CreateSnapshotResponseProto") - proto.RegisterType((*RenameSnapshotRequestProto)(nil), "hadoop.hdfs.RenameSnapshotRequestProto") - proto.RegisterType((*RenameSnapshotResponseProto)(nil), "hadoop.hdfs.RenameSnapshotResponseProto") - proto.RegisterType((*AllowSnapshotRequestProto)(nil), "hadoop.hdfs.AllowSnapshotRequestProto") - proto.RegisterType((*AllowSnapshotResponseProto)(nil), "hadoop.hdfs.AllowSnapshotResponseProto") - proto.RegisterType((*DisallowSnapshotRequestProto)(nil), "hadoop.hdfs.DisallowSnapshotRequestProto") - proto.RegisterType((*DisallowSnapshotResponseProto)(nil), "hadoop.hdfs.DisallowSnapshotResponseProto") - proto.RegisterType((*DeleteSnapshotRequestProto)(nil), "hadoop.hdfs.DeleteSnapshotRequestProto") - proto.RegisterType((*DeleteSnapshotResponseProto)(nil), "hadoop.hdfs.DeleteSnapshotResponseProto") - proto.RegisterType((*CheckAccessRequestProto)(nil), "hadoop.hdfs.CheckAccessRequestProto") - proto.RegisterType((*CheckAccessResponseProto)(nil), "hadoop.hdfs.CheckAccessResponseProto") - proto.RegisterType((*GetCurrentEditLogTxidRequestProto)(nil), "hadoop.hdfs.GetCurrentEditLogTxidRequestProto") - proto.RegisterType((*GetCurrentEditLogTxidResponseProto)(nil), "hadoop.hdfs.GetCurrentEditLogTxidResponseProto") - proto.RegisterType((*GetEditsFromTxidRequestProto)(nil), "hadoop.hdfs.GetEditsFromTxidRequestProto") - proto.RegisterType((*GetEditsFromTxidResponseProto)(nil), "hadoop.hdfs.GetEditsFromTxidResponseProto") - proto.RegisterEnum("hadoop.hdfs.CreateFlagProto", CreateFlagProto_name, CreateFlagProto_value) - proto.RegisterEnum("hadoop.hdfs.DatanodeReportTypeProto", DatanodeReportTypeProto_name, DatanodeReportTypeProto_value) - proto.RegisterEnum("hadoop.hdfs.SafeModeActionProto", SafeModeActionProto_name, SafeModeActionProto_value) - proto.RegisterEnum("hadoop.hdfs.RollingUpgradeActionProto", RollingUpgradeActionProto_name, RollingUpgradeActionProto_value) - proto.RegisterEnum("hadoop.hdfs.CacheFlagProto", CacheFlagProto_name, CacheFlagProto_value) -} - -func init() { proto.RegisterFile("ClientNamenodeProtocol.proto", fileDescriptor4) } - -var fileDescriptor4 = []byte{ - // 5410 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5c, 0x5b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0x4b, 0x41, 0x3f, 0x65, 0x9b, 0xa1, 0x6c, 0x8c, 0xca, 0xd8, 0x7e, 0x0a, 0x4b, 0x29, 0x1b, 0xae, - 0xfa, 0x28, 0x0c, 0x50, 0xca, 0x7f, 0x09, 0x87, 0x07, 0xd6, 0x02, 0x2b, 0xc6, 0x16, 0xec, 0x07, - 0x88, 0x89, 0xad, 0x42, 0x9d, 0x72, 0x1d, 0x79, 0xc1, 0x51, 0x6f, 0x94, 0x8c, 0x22, 0x44, 0xa3, - 0x28, 0x6b, 0x9e, 0xd2, 0x77, 0x82, 0x2d, 0x42, 0x35, 0x3e, 0x85, 0xa5, 0x21, 0x0a, 0x5c, 0x5c, - 0x81, 0x8b, 0xfd, 0xb3, 0x17, 0x06, 0x69, 0x05, 0x73, 0x44, 0x60, 0x91, 0x15, 0x6f, 0xb2, 0x52, - 0x5a, 0x83, 0xf9, 0x35, 0x39, 0x0c, 0x67, 0x81, 0x97, 0xb2, 0xc6, 0x9e, 0x40, 0x2d, 0xb9, 0x18, - 0xd2, 0xf9, 0x36, 0x2f, 0xcd, 0x67, 0x51, 0xec, 0xf0, 0x62, 0x88, 0x58, 0x04, 0x84, 0x25, 0xcc, - 0x03, 0x72, 0xf4, 0x95, 0x55, 0xf3, 0x83, 0xbb, 0x06, 0x55, 0xd7, 0xd3, 0x06, 0x2d, 0x6a, 0x50, - 0x5b, 0x75, 0x3d, 0xf3, 0xb7, 0x70, 0x9f, 0xd3, 0xc8, 0xa2, 0xcc, 0x1f, 0xd5, 0xe6, 0x7f, 0xae, - 0x40, 0x53, 0xab, 0x9f, 0x2a, 0x7e, 0x06, 0x57, 0x5c, 0xce, 0x32, 0x6d, 0x44, 0xaa, 0x39, 0x06, - 0xf1, 0x32, 0xc6, 0x36, 0xcc, 0xc7, 0xbc, 0x66, 0x1a, 0x37, 0xc9, 0x71, 0xa5, 0x5a, 0xb9, 0x25, - 0x89, 0x99, 0xdf, 0x55, 0xe0, 0x41, 0x7e, 0x77, 0xf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 0xd2, 0x71, 0x96, 0x32, 0x2e, 0x34, 0x81, 0x24, 0x64, - 0xda, 0xb0, 0x54, 0x18, 0xfa, 0xe4, 0x52, 0x07, 0x4b, 0x85, 0xa1, 0x6f, 0xec, 0x01, 0xa0, 0xf3, - 0xa1, 0x17, 0x51, 0xa1, 0x69, 0xd2, 0x25, 0x6b, 0xe2, 0x10, 0x2b, 0x36, 0x75, 0xc6, 0x02, 0xec, - 0x08, 0x90, 0x69, 0x30, 0x7f, 0x0d, 0x77, 0x4b, 0x05, 0x70, 0x17, 0x0c, 0x3c, 0xdf, 0xf7, 0xe8, - 0xc2, 0x9f, 0xb2, 0xd8, 0x17, 0x0e, 0xde, 0xbd, 0xd8, 0x42, 0xbe, 0x9d, 0x64, 0xe7, 0x77, 0x8e, - 0x62, 0xfe, 0x6b, 0x05, 0x1a, 0xa2, 0x76, 0x12, 0x75, 0x53, 0xa5, 0x2d, 0xb8, 0xfc, 0xe6, 0x22, - 0x41, 0xf1, 0x1e, 0x42, 0x2e, 0x72, 0x99, 0x66, 0x9e, 0x34, 0xe6, 0x20, 0x2a, 0x68, 0xe8, 0x9d, - 0x72, 0x50, 0x12, 0xe6, 0xc0, 0xd3, 0x30, 0xd5, 0x31, 0x45, 0x39, 0x38, 0xd2, 0x98, 0x83, 0xe9, - 0xa8, 0x71, 0x1c, 0x4c, 0xc7, 0x6d, 0x80, 0x63, 0x3b, 0x26, 0x4d, 0x46, 0x2e, 0xcb, 0x89, 0x72, - 0x14, 0xf3, 0x02, 0x6e, 0xb5, 0x5d, 0x57, 0x6c, 0x86, 0x1c, 0x01, 0x7a, 0x59, 0x80, 0x76, 0xbf, - 0x64, 0x30, 0x58, 0x04, 0x88, 0x25, 0xc8, 0xe1, 0x07, 0x33, 0x6c, 0xf9, 0x76, 0x3f, 0x26, 0x93, - 0xe3, 0xaa, 0xc5, 0x51, 0xcc, 0x0f, 0xe1, 0xb6, 0xa6, 0x6a, 0x7e, 0x72, 0xa6, 0x13, 0xad, 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0xa1, 0x0b, 0x56, 0x85, 0xb4, 0x28, 0x0b, 0xb6, 0x18, 0x29, 0xa3, 0x2c, 0xd8, 0x12, - 0x90, 0x8c, 0x11, 0xc1, 0x75, 0x5f, 0xc5, 0x85, 0x18, 0xef, 0xab, 0x53, 0x2a, 0x1f, 0x46, 0xd3, - 0xfc, 0xa0, 0x9c, 0x5b, 0x3e, 0x44, 0x70, 0x50, 0x01, 0xf9, 0x10, 0x91, 0x03, 0x4b, 0x90, 0x0f, - 0x11, 0x79, 0x60, 0x03, 0xec, 0x24, 0x06, 0x22, 0x30, 0x40, 0x72, 0x12, 0x05, 0x50, 0x04, 0xc9, - 0x49, 0x14, 0x01, 0x0c, 0x68, 0x30, 0x2e, 0xa0, 0x04, 0x94, 0x60, 0x3c, 0x17, 0x7e, 0xa0, 0x04, - 0xe3, 0xf9, 0x68, 0x03, 0xec, 0x8c, 0x7c, 0x01, 0x2b, 0x20, 0x39, 0xa3, 0x7c, 0x28, 0x82, 0xe4, - 0x8c, 0x8a, 0x10, 0x07, 0x3d, 0xb8, 0xd6, 0x17, 0xb3, 0xec, 0x52, 0x63, 0x0a, 0x92, 0xf6, 0xcd, - 0xf7, 0x8a, 0x39, 0xd5, 0xb8, 0x48, 0xcc, 0x85, 0xab, 0x71, 0x51, 0x7e, 0x6e, 0x5e, 0x8d, 0x8b, - 0x8a, 0x52, 0xf2, 0xf4, 0x04, 0x4c, 0x93, 0xcb, 0xca, 0x09, 0x58, 0xc9, 0x74, 0xab, 0x27, 0x60, - 0x35, 0x93, 0x6c, 0xfc, 0x02, 0xa6, 0x7b, 0xf1, 0x45, 0xe0, 0x18, 0x72, 0xa6, 0x53, 0x4a, 0x2e, - 0x37, 0xef, 0xe8, 0xca, 0x55, 0xe3, 0x48, 0x7a, 0x56, 0x35, 0x4e, 0xc9, 0x05, 0xab, 0xc6, 0xa9, - 0x89, 0x5d, 0x1c, 0xad, 0x38, 0x7c, 0xc2, 0x54, 0x8a, 0x56, 0x72, 0x73,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 0x37, 0xa7, 0x62, 0xb0, - 0x8e, 0xba, 0x39, 0x95, 0xe1, 0x76, 0x68, 0x3a, 0x5b, 0xc0, 0xdb, 0xa8, 0xe9, 0xec, 0x5c, 0x08, - 0x8f, 0x9a, 0xce, 0x2e, 0x40, 0xee, 0xb0, 0x8c, 0x80, 0xda, 0x19, 0x78, 0x1b, 0x51, 0x32, 0x02, - 0x5a, 0xb6, 0xe2, 0x8c, 0x40, 0x8e, 0x88, 0x34, 0xca, 0xfd, 0x49, 0x46, 0x79, 0xfb, 0xfb, 0x8e, - 0xf2, 0xf6, 0x04, 0xa3, 0x4c, 0x0f, 0xaa, 0x19, 0xd6, 0x5d, 0x3d, 0xa8, 0xea, 0xd1, 0xf6, 0xea, - 0x41, 0x35, 0x07, 0x64, 0xff, 0xec, 0x39, 0x3c, 0x08, 0xa3, 0xfe, 0x9a, 0x3d, 0xb4, 0x9d, 0x63, - 0x24, 0x08, 0x0d, 0x85, 0x7f, 0xe9, 0xfb, 0x2c, 0xe7, 0x1f, 0xfe, 0x92, 0xbf, 0xf1, 0x77, 0x95, - 0xca, 0x3f, 0x56, 0x2a, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x97, 0x20, 0x5c, 0x2c, 0x15, 0x58, - 0x00, 0x00, +func (x *HAServiceStateResponseProto) Reset() { + *x = HAServiceStateResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[169] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HAServiceStateResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HAServiceStateResponseProto) ProtoMessage() {} + +func (x *HAServiceStateResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ClientNamenodeProtocol_proto_msgTypes[169] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HAServiceStateResponseProto.ProtoReflect.Descriptor instead. +func (*HAServiceStateResponseProto) Descriptor() ([]byte, []int) { + return file_ClientNamenodeProtocol_proto_rawDescGZIP(), []int{169} +} + +func (x *HAServiceStateResponseProto) GetState() hadoop_common.HAServiceStateProto { + if x != nil && x.State != nil { + return *x.State + } + return hadoop_common.HAServiceStateProto(0) +} + +var File_ClientNamenodeProtocol_proto protoreflect.FileDescriptor + +var file_ClientNamenodeProtocol_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x1a, 0x0e, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x61, 0x63, 0x6c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x0b, 0x78, 0x61, 0x74, 0x74, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0d, 0x69, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x13, 0x65, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x48, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x61, + 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, + 0x63, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, + 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x22, 0x5f, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x3d, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x6c, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4a, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x73, 0x22, 0xe7, 0x03, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x36, 0x0a, 0x06, 0x6d, 0x61, + 0x73, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x61, 0x73, 0x6b, + 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, + 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x6c, + 0x61, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x5d, 0x0a, 0x15, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x15, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x08, 0x75, 0x6e, 0x6d, 0x61, 0x73, 0x6b, 0x65, + 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x75, 0x6e, 0x6d, 0x61, 0x73, 0x6b, 0x65, + 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x47, 0x0a, 0x13, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x30, 0x0a, 0x02, 0x66, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x48, 0x64, 0x66, + 0x73, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x02, 0x66, 0x73, 0x22, 0x5a, 0x0a, 0x12, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, + 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x1e, 0x0a, 0x0a, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x66, 0x6c, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, + 0x22, 0x81, 0x01, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x34, + 0x0a, 0x04, 0x73, 0x74, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x48, 0x64, 0x66, 0x73, 0x46, + 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, + 0x73, 0x74, 0x61, 0x74, 0x22, 0x50, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x03, 0x73, 0x72, 0x63, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x50, 0x0a, + 0x1c, 0x53, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, + 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, + 0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x02, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0x1f, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x32, 0x0a, 0x1e, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x03, 0x73, 0x72, 0x63, 0x22, 0x21, 0x0a, 0x1f, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x6b, 0x0a, 0x1d, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4a, 0x0a, 0x0d, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x20, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a, 0x1f, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x40, 0x0a, + 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, + 0x6d, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, + 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x3e, + 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x46, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x1c, + 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x62, 0x0a, 0x14, + 0x53, 0x65, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x17, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, 0x18, 0x41, 0x62, + 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x0a, 0x01, 0x62, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x01, 0x62, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x6f, 0x6c, 0x64, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x3a, + 0x01, 0x30, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x41, 0x62, + 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x02, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, + 0x72, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x12, + 0x42, 0x0a, 0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, + 0x64, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x22, + 0x0a, 0x0c, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x65, 0x64, 0x4e, 0x6f, 0x64, + 0x65, 0x73, 0x12, 0x34, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x6c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x4d, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x81, 0x03, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, + 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, + 0x31, 0x0a, 0x03, 0x62, 0x6c, 0x6b, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x03, 0x62, + 0x6c, 0x6b, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x08, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x12, + 0x6e, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6f, 0x64, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x12, 0x6e, 0x75, 0x6d, 0x41, 0x64, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x14, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, + 0x75, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x65, 0x78, 0x69, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, + 0x12, 0x19, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, + 0x3a, 0x01, 0x30, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x5a, 0x0a, 0x22, 0x47, + 0x65, 0x74, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x98, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, + 0x72, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, + 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0x55, 0x0a, 0x1b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x61, 0x64, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x36, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x42, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x12, 0x43, 0x6f, + 0x6e, 0x63, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x10, 0x0a, 0x03, 0x74, 0x72, 0x67, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x74, + 0x72, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x72, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x04, 0x73, 0x72, 0x63, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x63, 0x61, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x66, 0x0a, + 0x14, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x15, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x38, 0x0a, 0x12, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, + 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x10, + 0x0a, 0x03, 0x64, 0x73, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x74, + 0x22, 0x2d, 0x0a, 0x13, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0x81, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x6f, + 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x44, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x02, + 0x28, 0x08, 0x52, 0x0d, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x44, 0x65, 0x73, + 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x54, 0x72, 0x61, 0x73, 0x68, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x54, 0x72, + 0x61, 0x73, 0x68, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x44, 0x0a, 0x12, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, + 0x73, 0x72, 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, + 0x65, 0x22, 0x2d, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x22, 0xbe, 0x01, 0x0a, 0x12, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x36, 0x0a, 0x06, 0x6d, 0x61, 0x73, + 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x61, 0x73, 0x6b, 0x65, + 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x75, 0x6e, 0x6d, 0x61, 0x73, 0x6b, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x75, 0x6e, 0x6d, 0x61, 0x73, 0x6b, 0x65, + 0x64, 0x22, 0x2d, 0x0a, 0x13, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x22, 0x6e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, + 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x1e, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, + 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, + 0x6e, 0x65, 0x65, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x02, + 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x65, 0x65, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x57, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3c, 0x0a, 0x07, 0x64, + 0x69, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x07, 0x64, 0x69, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x79, 0x0a, 0x1d, 0x47, 0x65, 0x74, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, + 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, + 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x02, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, + 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x65, 0x65, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x65, 0x65, 0x64, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa1, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x45, 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, + 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x22, 0x28, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x72, 0x4c, + 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, 0x27, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x63, + 0x0a, 0x14, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, + 0x69, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x14, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x72, 0x4c, + 0x69, 0x73, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x22, 0x0a, + 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x02, 0x20, + 0x02, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, + 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x22, 0x6a, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x44, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xd6, 0x01, + 0x0a, 0x28, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, + 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x02, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, + 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x78, 0x0a, 0x29, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x4b, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, + 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x22, 0x38, 0x0a, 0x16, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, + 0x6e, 0x65, 0x77, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4c, 0x0a, 0x18, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, + 0x73, 0x72, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x19, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x4c, 0x65, + 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, + 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x46, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xf9, 0x02, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x46, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x04, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x75, + 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x02, + 0x28, 0x04, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x0a, + 0x10, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x72, + 0x75, 0x70, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, + 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, + 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x18, 0x06, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x70, 0x6c, 0x4f, 0x6e, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x28, 0x0a, + 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x75, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x49, + 0x6e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, + 0x27, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x46, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x03, 0x0a, 0x26, 0x47, 0x65, 0x74, + 0x46, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x6e, + 0x64, 0x61, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x6f, 0x77, + 0x52, 0x65, 0x64, 0x75, 0x6e, 0x64, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, + 0x72, 0x72, 0x75, 0x70, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x04, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x14, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x4f, 0x6e, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, + 0x28, 0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x75, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x49, 0x6e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x02, 0x28, 0x04, 0x52, 0x15, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x12, 0x4a, 0x0a, 0x22, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x69, + 0x6f, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x6e, 0x64, 0x61, 0x6e, 0x63, 0x79, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1e, 0x68, + 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x50, 0x72, 0x69, 0x6f, 0x4c, 0x6f, 0x77, 0x52, 0x65, 0x64, + 0x75, 0x6e, 0x64, 0x61, 0x6e, 0x63, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x24, 0x0a, + 0x22, 0x47, 0x65, 0x74, 0x46, 0x73, 0x45, 0x43, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x02, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x46, 0x73, 0x45, 0x43, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x6c, + 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x6e, 0x64, 0x61, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x64, 0x75, 0x6e, 0x64, 0x61, 0x6e, + 0x63, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, + 0x75, 0x70, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, + 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x12, 0x28, 0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x66, 0x75, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x49, 0x6e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x15, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x12, 0x4a, 0x0a, 0x22, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, + 0x69, 0x6f, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x6e, 0x64, 0x61, 0x6e, 0x63, + 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1e, + 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x50, 0x72, 0x69, 0x6f, 0x4c, 0x6f, 0x77, 0x52, 0x65, + 0x64, 0x75, 0x6e, 0x64, 0x61, 0x6e, 0x63, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x59, + 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x24, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x50, 0x0a, 0x1e, 0x47, 0x65, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x0a, 0x02, 0x64, + 0x69, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x02, 0x64, 0x69, 0x22, 0x60, 0x0a, 0x24, 0x47, + 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x0e, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa9, 0x01, + 0x0a, 0x1a, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x42, 0x0a, 0x0c, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x47, 0x0a, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x25, 0x47, 0x65, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x5f, 0x0a, 0x16, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x16, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x73, 0x22, 0x3f, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x72, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, + 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, + 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x62, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x62, 0x73, 0x69, 0x7a, + 0x65, 0x22, 0x74, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x53, 0x61, 0x66, 0x65, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x0a, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x61, 0x66, 0x65, 0x4d, + 0x6f, 0x64, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x07, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x07, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x22, 0x32, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x53, 0x61, + 0x66, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x57, 0x0a, 0x19, 0x53, + 0x61, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, + 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, + 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x17, 0x0a, 0x05, 0x74, + 0x78, 0x47, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x05, 0x74, + 0x78, 0x47, 0x61, 0x70, 0x22, 0x38, 0x0a, 0x1a, 0x53, 0x61, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x05, 0x73, 0x61, 0x76, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x05, 0x73, 0x61, 0x76, 0x65, 0x64, 0x22, 0x17, + 0x0a, 0x15, 0x52, 0x6f, 0x6c, 0x6c, 0x45, 0x64, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x16, 0x52, 0x6f, 0x6c, 0x6c, 0x45, + 0x64, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x54, + 0x78, 0x49, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0e, 0x6e, 0x65, 0x77, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x78, 0x49, 0x64, 0x22, 0x34, 0x0a, 0x20, 0x52, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, + 0x03, 0x61, 0x72, 0x67, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x61, 0x72, 0x67, 0x22, + 0x3b, 0x0a, 0x21, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x1a, 0x0a, 0x18, + 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1d, 0x0a, 0x1b, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1e, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x48, 0x0a, 0x1a, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x2a, 0x0a, 0x10, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, 0x10, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x5c, 0x0a, 0x1a, 0x52, + 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3e, 0x0a, 0x06, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd1, 0x01, 0x0a, 0x17, 0x52, 0x6f, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x02, 0x28, 0x08, 0x52, 0x15, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, + 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x22, 0x73, 0x0a, + 0x1b, 0x52, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x54, 0x0a, 0x12, + 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x12, + 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x4f, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x75, 0x70, + 0x74, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x63, + 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6f, + 0x6b, 0x69, 0x65, 0x22, 0x63, 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x75, + 0x70, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3d, 0x0a, 0x07, 0x63, 0x6f, 0x72, + 0x72, 0x75, 0x70, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, + 0x46, 0x69, 0x6c, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x07, 0x63, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x22, 0x32, 0x0a, 0x14, 0x4d, 0x65, 0x74, 0x61, + 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, + 0x4d, 0x65, 0x74, 0x61, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, + 0x72, 0x63, 0x22, 0x4c, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, + 0x0a, 0x02, 0x66, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x48, 0x64, 0x66, 0x73, 0x46, 0x69, 0x6c, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x02, 0x66, 0x73, + 0x22, 0x61, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, + 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x73, 0x72, 0x63, 0x12, 0x2d, 0x0a, 0x0e, 0x6e, 0x65, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, + 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x6e, 0x65, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x53, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x0a, 0x02, 0x66, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x48, 0x64, 0x66, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x02, 0x66, 0x73, 0x22, 0x2c, 0x0a, 0x18, 0x49, 0x73, 0x46, 0x69, + 0x6c, 0x65, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x33, 0x0a, 0x19, 0x49, 0x73, 0x46, 0x69, 0x6c, 0x65, + 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xc3, 0x01, 0x0a, 0x17, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x72, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x6f, + 0x6c, 0x12, 0x4e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x5b, 0x0a, 0x21, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x06, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x1e, + 0x0a, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x22, 0xc2, + 0x01, 0x0a, 0x18, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, + 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x12, 0x20, 0x0a, + 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x03, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, + 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x02, 0x28, 0x03, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4e, 0x65, 0x65, 0x64, 0x65, + 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, + 0x18, 0x04, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x64, 0x18, 0x05, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x45, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x64, 0x22, 0x79, 0x0a, 0x1d, 0x41, 0x64, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1e, + 0x0a, 0x0a, 0x63, 0x61, 0x63, 0x68, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x61, 0x63, 0x68, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x30, + 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x7c, 0x0a, 0x20, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1e, + 0x0a, 0x0a, 0x63, 0x61, 0x63, 0x68, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x61, 0x63, 0x68, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x23, + 0x0a, 0x21, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x20, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x21, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x1f, + 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x76, 0x49, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, + 0x06, 0x70, 0x72, 0x65, 0x76, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x91, 0x01, 0x0a, 0x18, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x38, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x7f, 0x0a, 0x20, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x41, 0x0a, + 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, + 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x22, 0xf7, 0x01, 0x0a, 0x12, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, + 0x6d, 0x61, 0x78, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, + 0x79, 0x12, 0x31, 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x3a, 0x01, 0x31, + 0x52, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc5, 0x01, 0x0a, 0x13, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, + 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x0a, 0x0b, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x03, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x12, 0x20, + 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x02, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, + 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4f, + 0x76, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, 0x04, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0b, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, + 0x6c, 0x65, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x05, 0x20, 0x02, 0x28, 0x03, 0x52, + 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x22, 0x4f, 0x0a, 0x18, + 0x41, 0x64, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, + 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x1b, 0x0a, + 0x19, 0x41, 0x64, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x52, 0x0a, 0x1b, 0x4d, 0x6f, + 0x64, 0x69, 0x66, 0x79, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x0a, 0x04, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x1e, + 0x0a, 0x1c, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x39, + 0x0a, 0x1b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1e, 0x0a, 0x1c, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x1a, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x50, + 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x70, + 0x72, 0x65, 0x76, 0x50, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x73, 0x0a, 0x1b, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3a, 0x0a, 0x07, 0x65, 0x6e, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, + 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x65, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, + 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, + 0x22, 0x82, 0x01, 0x0a, 0x13, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, + 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, + 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x2f, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, + 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x50, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, + 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x0a, 0x02, 0x66, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x48, 0x64, 0x66, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x02, 0x66, 0x73, 0x22, 0x33, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x5c, 0x0a, + 0x1e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x3a, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x2f, 0x0a, 0x19, 0x47, + 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x50, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x0a, 0x05, 0x75, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, + 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0xc1, + 0x01, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x02, 0x28, 0x04, 0x52, 0x0e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x51, 0x75, + 0x6f, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x11, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x51, 0x75, 0x6f, 0x74, + 0x61, 0x12, 0x3f, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x01, 0x0a, 0x11, + 0x46, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, + 0x73, 0x72, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x02, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x0f, 0x6c, + 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x12, 0x3a, 0x02, 0x2d, 0x31, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x65, 0x49, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x46, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x54, 0x0a, 0x14, 0x53, 0x65, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x03, 0x73, 0x72, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x02, 0x28, 0x04, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x61, 0x74, 0x69, 0x6d, 0x65, + 0x22, 0x17, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x01, 0x0a, 0x19, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6c, + 0x69, 0x6e, 0x6b, 0x12, 0x38, 0x0a, 0x07, 0x64, 0x69, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x18, 0x03, + 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x46, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x64, 0x69, 0x72, 0x50, 0x65, 0x72, 0x6d, 0x12, 0x22, 0x0a, + 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, + 0x02, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, + 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x2f, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x22, 0x3c, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, + 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x7b, + 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x6f, 0x72, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5b, 0x0a, 0x23, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x90, 0x02, 0x0a, 0x1a, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3b, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x38, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x44, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x44, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x20, 0x53, 0x65, + 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, + 0x0a, 0x09, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x03, 0x52, 0x09, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x22, 0x23, 0x0a, 0x21, + 0x53, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x22, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x76, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x51, 0x0a, 0x11, 0x64, 0x61, + 0x74, 0x61, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x11, 0x64, 0x61, 0x74, 0x61, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x22, 0x64, 0x0a, + 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, + 0x22, 0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x41, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x50, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x94, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x6e, 0x61, 0x6d, + 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4f, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x09, 0x52, 0x0f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4f, 0x6c, 0x64, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4e, + 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1d, 0x0a, + 0x1b, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x19, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x1c, 0x0a, + 0x1a, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x42, 0x0a, 0x1c, 0x44, + 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x22, + 0x1f, 0x0a, 0x1d, 0x44, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x64, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, + 0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, + 0x6f, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1d, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6b, 0x0a, 0x17, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x3c, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, + 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x6d, 0x6f, + 0x64, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x23, + 0x0a, 0x21, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x64, 0x69, 0x74, + 0x4c, 0x6f, 0x67, 0x54, 0x78, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x45, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x54, 0x78, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x22, 0x32, 0x0a, + 0x1c, 0x47, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x78, 0x69, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x04, 0x74, 0x78, 0x69, + 0x64, 0x22, 0x5d, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x73, 0x46, 0x72, 0x6f, + 0x6d, 0x54, 0x78, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x3c, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x22, 0x76, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, + 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x87, 0x01, 0x0a, 0x1b, 0x4f, 0x70, 0x65, + 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x0a, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, + 0x02, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x42, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x65, 0x6e, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x12, + 0x35, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1f, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x79, 0x6e, 0x63, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x4d, + 0x73, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x34, 0x0a, 0x20, 0x53, 0x61, 0x74, 0x69, 0x73, 0x66, 0x79, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x23, 0x0a, 0x21, 0x53, 0x61, 0x74, 0x69, 0x73, + 0x66, 0x79, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1c, 0x0a, 0x1a, + 0x48, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x1b, 0x48, 0x41, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x2a, 0x70, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, + 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x56, 0x45, 0x52, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x10, 0x0a, + 0x0c, 0x4c, 0x41, 0x5a, 0x59, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x10, 0x10, 0x12, + 0x0d, 0x0a, 0x09, 0x4e, 0x45, 0x57, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x20, 0x12, 0x15, + 0x0a, 0x10, 0x53, 0x48, 0x4f, 0x55, 0x4c, 0x44, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, + 0x54, 0x45, 0x10, 0x80, 0x01, 0x2a, 0x43, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x46, 0x6c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x4f, + 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x01, 0x12, 0x1a, + 0x0a, 0x16, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, + 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x02, 0x2a, 0x79, 0x0a, 0x17, 0x44, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x08, + 0x0a, 0x04, 0x4c, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x41, 0x44, + 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x45, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x53, 0x53, 0x49, + 0x4f, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x4e, 0x54, 0x45, 0x52, + 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, + 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, + 0x4e, 0x43, 0x45, 0x10, 0x06, 0x2a, 0x68, 0x0a, 0x13, 0x53, 0x61, 0x66, 0x65, 0x4d, 0x6f, 0x64, + 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x0e, + 0x53, 0x41, 0x46, 0x45, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x01, + 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x41, 0x46, 0x45, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x4e, 0x54, + 0x45, 0x52, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x41, 0x46, 0x45, 0x4d, 0x4f, 0x44, 0x45, + 0x5f, 0x47, 0x45, 0x54, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x41, 0x46, 0x45, 0x4d, 0x4f, + 0x44, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x58, 0x49, 0x54, 0x10, 0x04, 0x2a, + 0x3f, 0x0a, 0x19, 0x52, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x0a, 0x05, + 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x52, 0x54, + 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x10, 0x03, + 0x2a, 0x1b, 0x0a, 0x0e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x10, 0x01, 0x2a, 0x43, 0x0a, + 0x12, 0x4f, 0x70, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4c, 0x4c, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x5f, + 0x46, 0x49, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x42, 0x4c, 0x4f, 0x43, 0x4b, + 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x45, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, + 0x10, 0x02, 0x32, 0xfc, 0x58, 0x0a, 0x16, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x6c, 0x0a, + 0x11, 0x67, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x6c, 0x0a, 0x11, 0x67, + 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, + 0x12, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4b, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, + 0x12, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, + 0x70, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x63, 0x0a, 0x0e, 0x73, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x69, 0x0a, 0x10, 0x73, 0x65, 0x74, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x6f, 0x0a, 0x12, 0x75, 0x6e, 0x73, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x69, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x6f, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x60, 0x0a, 0x0d, 0x73, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x51, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x21, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x22, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x53, 0x65, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x5d, 0x0a, 0x0c, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x51, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x21, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x78, 0x0a, 0x15, 0x67, 0x65, 0x74, 0x41, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x12, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x51, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x21, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x22, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x66, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x61, + 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x61, 0x64, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4b, 0x0a, 0x06, + 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x12, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x51, 0x0a, 0x08, 0x74, 0x72, 0x75, + 0x6e, 0x63, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4b, 0x0a, 0x06, + 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4e, 0x0a, 0x07, 0x72, 0x65, 0x6e, + 0x61, 0x6d, 0x65, 0x32, 0x12, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4b, 0x0a, 0x06, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4b, 0x0a, 0x06, 0x6d, 0x6b, 0x64, 0x69, 0x72, 0x73, + 0x12, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4d, + 0x6b, 0x64, 0x69, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x57, 0x0a, 0x0a, 0x67, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x12, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x6c, 0x0a, 0x11, + 0x67, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x12, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x57, 0x0a, 0x0a, 0x72, 0x65, + 0x6e, 0x65, 0x77, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x4c, 0x65, 0x61, 0x73, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x65, + 0x77, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x5d, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x4c, 0x65, + 0x61, 0x73, 0x65, 0x12, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x58, 0x0a, 0x0a, 0x67, 0x65, 0x74, 0x46, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x46, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x84, 0x01, 0x0a, + 0x19, 0x67, 0x65, 0x74, 0x46, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x32, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x73, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x46, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x7b, 0x0a, 0x16, 0x67, 0x65, 0x74, 0x46, 0x73, 0x45, 0x43, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2f, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x46, + 0x73, 0x45, 0x43, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x46, 0x73, 0x45, 0x43, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x6c, 0x0a, 0x11, 0x67, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x81, + 0x01, 0x0a, 0x18, 0x67, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x78, 0x0a, 0x15, 0x67, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, + 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2e, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x5a, 0x0a, 0x0b, + 0x73, 0x65, 0x74, 0x53, 0x61, 0x66, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x61, 0x66, + 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x53, 0x65, 0x74, 0x53, 0x61, 0x66, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x60, 0x0a, 0x0d, 0x73, 0x61, 0x76, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x53, 0x61, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x54, 0x0a, 0x09, 0x72, 0x6f, + 0x6c, 0x6c, 0x45, 0x64, 0x69, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x45, 0x64, 0x69, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x45, 0x64, + 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x75, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x5d, 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x6f, 0x64, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x66, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x60, + 0x0a, 0x0d, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x63, 0x0a, 0x0e, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x12, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x78, 0x0a, 0x15, 0x6c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x72, + 0x72, 0x75, 0x70, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2e, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x51, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x53, 0x61, 0x76, 0x65, 0x12, 0x21, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x53, 0x61, + 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x5a, 0x0a, 0x0b, 0x67, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x6f, + 0x0a, 0x12, 0x67, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x6c, 0x0a, 0x11, 0x61, 0x64, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x12, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x75, 0x0a, + 0x14, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x75, 0x0a, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x2d, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x72, 0x0a, 0x13, 0x6c, + 0x69, 0x73, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x5d, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, + 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x66, + 0x0a, 0x0f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, + 0x6c, 0x12, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x66, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x63, + 0x0a, 0x0e, 0x6c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x73, + 0x12, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x66, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, + 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x6e, 0x6b, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x6c, 0x0a, 0x11, 0x67, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x12, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x51, 0x0a, 0x08, 0x73, 0x65, 0x74, + 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x21, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x48, 0x0a, 0x05, + 0x66, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x51, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x12, 0x21, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x60, 0x0a, 0x0d, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x26, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x60, 0x0a, 0x0d, 0x67, + 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, + 0x6e, 0x6b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x7b, 0x0a, + 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x2f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x63, 0x0a, 0x0e, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x27, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x73, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x79, 0x0a, 0x14, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2f, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6e, + 0x65, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, + 0x6e, 0x65, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x7c, 0x0a, 0x15, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x75, 0x0a, + 0x14, 0x73, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, + 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, 0x61, + 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x75, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x2d, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x63, 0x0a, 0x0e, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x27, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x63, 0x0a, 0x0e, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x12, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x60, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x6c, 0x6c, + 0x6f, 0x77, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x69, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x29, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x87, 0x01, 0x0a, 0x1a, 0x67, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x12, 0x33, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x44, 0x69, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x63, 0x0a, 0x0e, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x27, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x78, 0x0a, 0x15, 0x67, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x2e, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x8d, 0x01, 0x0a, 0x1c, + 0x67, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x35, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, + 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x5d, 0x0a, 0x0c, 0x69, + 0x73, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x25, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x49, 0x73, 0x46, 0x69, 0x6c, 0x65, + 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x49, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x69, 0x0a, 0x10, 0x6d, 0x6f, + 0x64, 0x69, 0x66, 0x79, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x29, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4d, 0x6f, 0x64, + 0x69, 0x66, 0x79, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x41, 0x63, + 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x69, 0x0a, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, + 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x63, + 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x69, 0x0a, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x41, 0x63, 0x6c, 0x12, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x54, 0x0a, 0x09, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x63, 0x6c, 0x12, 0x22, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x63, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x4b, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x1f, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x63, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x5d, + 0x0a, 0x0c, 0x67, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x63, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x51, 0x0a, + 0x08, 0x73, 0x65, 0x74, 0x58, 0x41, 0x74, 0x74, 0x72, 0x12, 0x21, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x58, 0x41, 0x74, 0x74, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x58, 0x41, + 0x74, 0x74, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x54, 0x0a, 0x09, 0x67, 0x65, 0x74, 0x58, 0x41, 0x74, 0x74, 0x72, 0x73, 0x12, 0x22, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x58, + 0x41, 0x74, 0x74, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x58, 0x41, 0x74, 0x74, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x57, 0x0a, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x58, 0x41, + 0x74, 0x74, 0x72, 0x73, 0x12, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x58, 0x41, 0x74, 0x74, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x58, 0x41, 0x74, 0x74, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x5a, 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x58, 0x41, 0x74, 0x74, 0x72, 0x12, 0x24, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x58, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x58, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x5a, 0x0a, 0x0b, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x24, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x75, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x6f, 0x6e, 0x65, 0x12, + 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x6f, + 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x6f, 0x6e, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x72, + 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x5a, 0x6f, 0x6e, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x5a, 0x6f, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x5a, 0x6f, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x7e, 0x0a, 0x17, 0x72, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x30, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, + 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x31, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x7b, 0x0a, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2f, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x5d, 0x0a, 0x0c, 0x67, 0x65, 0x74, 0x45, 0x5a, 0x46, 0x6f, 0x72, 0x50, 0x61, 0x74, 0x68, 0x12, + 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, + 0x74, 0x45, 0x5a, 0x46, 0x6f, 0x72, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x5a, 0x46, 0x6f, 0x72, 0x50, 0x61, 0x74, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x7b, + 0x0a, 0x16, 0x73, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, + 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, + 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x81, 0x01, 0x0a, 0x18, + 0x75, 0x6e, 0x73, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x31, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x45, + 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x93, 0x01, 0x0a, 0x1e, 0x67, 0x65, 0x74, 0x45, 0x43, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, + 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x12, 0x37, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x45, 0x43, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x38, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x43, 0x54, + 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x46, 0x6f, 0x72, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x78, 0x0a, 0x15, 0x67, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x45, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x54, 0x78, 0x69, 0x64, 0x12, 0x2e, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x54, 0x78, + 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x54, 0x78, + 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x69, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x54, + 0x78, 0x69, 0x64, 0x12, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x78, + 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x45, 0x64, 0x69, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x78, 0x69, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x81, 0x01, 0x0a, 0x18, 0x67, + 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, + 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x81, + 0x01, 0x0a, 0x18, 0x61, 0x64, 0x64, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x72, 0x61, + 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x84, 0x01, 0x0a, 0x19, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x45, 0x72, 0x61, + 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x32, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, + 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x84, 0x01, 0x0a, 0x19, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x32, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x72, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x87, 0x01, 0x0a, 0x1a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x72, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x33, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, + 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x7b, 0x0a, 0x16, 0x67, 0x65, + 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x7b, 0x0a, 0x16, 0x67, 0x65, 0x74, 0x45, 0x72, + 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x63, + 0x73, 0x12, 0x2f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x64, 0x65, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x60, 0x0a, 0x0d, 0x67, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, + 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x51, + 0x75, 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x60, 0x0a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x4f, 0x70, + 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x48, 0x0a, 0x05, 0x6d, 0x73, 0x79, 0x6e, + 0x63, 0x12, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x4d, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x4d, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x75, 0x0a, 0x14, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x79, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2d, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x61, 0x74, 0x69, 0x73, 0x66, 0x79, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x61, 0x74, 0x69, 0x73, 0x66, 0x79, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x66, 0x0a, 0x11, 0x67, 0x65, 0x74, + 0x48, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x48, 0x41, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x48, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x42, 0x87, 0x01, 0x0a, 0x25, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x1c, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, + 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x5f, 0x68, 0x64, 0x66, 0x73, 0x88, 0x01, 0x01, 0xa0, 0x01, 0x01, +} + +var ( + file_ClientNamenodeProtocol_proto_rawDescOnce sync.Once + file_ClientNamenodeProtocol_proto_rawDescData = file_ClientNamenodeProtocol_proto_rawDesc +) + +func file_ClientNamenodeProtocol_proto_rawDescGZIP() []byte { + file_ClientNamenodeProtocol_proto_rawDescOnce.Do(func() { + file_ClientNamenodeProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_ClientNamenodeProtocol_proto_rawDescData) + }) + return file_ClientNamenodeProtocol_proto_rawDescData +} + +var file_ClientNamenodeProtocol_proto_enumTypes = make([]protoimpl.EnumInfo, 7) +var file_ClientNamenodeProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 170) +var file_ClientNamenodeProtocol_proto_goTypes = []interface{}{ + (CreateFlagProto)(0), // 0: hadoop.hdfs.CreateFlagProto + (AddBlockFlagProto)(0), // 1: hadoop.hdfs.AddBlockFlagProto + (DatanodeReportTypeProto)(0), // 2: hadoop.hdfs.DatanodeReportTypeProto + (SafeModeActionProto)(0), // 3: hadoop.hdfs.SafeModeActionProto + (RollingUpgradeActionProto)(0), // 4: hadoop.hdfs.RollingUpgradeActionProto + (CacheFlagProto)(0), // 5: hadoop.hdfs.CacheFlagProto + (OpenFilesTypeProto)(0), // 6: hadoop.hdfs.OpenFilesTypeProto + (*GetBlockLocationsRequestProto)(nil), // 7: hadoop.hdfs.GetBlockLocationsRequestProto + (*GetBlockLocationsResponseProto)(nil), // 8: hadoop.hdfs.GetBlockLocationsResponseProto + (*GetServerDefaultsRequestProto)(nil), // 9: hadoop.hdfs.GetServerDefaultsRequestProto + (*GetServerDefaultsResponseProto)(nil), // 10: hadoop.hdfs.GetServerDefaultsResponseProto + (*CreateRequestProto)(nil), // 11: hadoop.hdfs.CreateRequestProto + (*CreateResponseProto)(nil), // 12: hadoop.hdfs.CreateResponseProto + (*AppendRequestProto)(nil), // 13: hadoop.hdfs.AppendRequestProto + (*AppendResponseProto)(nil), // 14: hadoop.hdfs.AppendResponseProto + (*SetReplicationRequestProto)(nil), // 15: hadoop.hdfs.SetReplicationRequestProto + (*SetReplicationResponseProto)(nil), // 16: hadoop.hdfs.SetReplicationResponseProto + (*SetStoragePolicyRequestProto)(nil), // 17: hadoop.hdfs.SetStoragePolicyRequestProto + (*SetStoragePolicyResponseProto)(nil), // 18: hadoop.hdfs.SetStoragePolicyResponseProto + (*UnsetStoragePolicyRequestProto)(nil), // 19: hadoop.hdfs.UnsetStoragePolicyRequestProto + (*UnsetStoragePolicyResponseProto)(nil), // 20: hadoop.hdfs.UnsetStoragePolicyResponseProto + (*GetStoragePolicyRequestProto)(nil), // 21: hadoop.hdfs.GetStoragePolicyRequestProto + (*GetStoragePolicyResponseProto)(nil), // 22: hadoop.hdfs.GetStoragePolicyResponseProto + (*GetStoragePoliciesRequestProto)(nil), // 23: hadoop.hdfs.GetStoragePoliciesRequestProto + (*GetStoragePoliciesResponseProto)(nil), // 24: hadoop.hdfs.GetStoragePoliciesResponseProto + (*SetPermissionRequestProto)(nil), // 25: hadoop.hdfs.SetPermissionRequestProto + (*SetPermissionResponseProto)(nil), // 26: hadoop.hdfs.SetPermissionResponseProto + (*SetOwnerRequestProto)(nil), // 27: hadoop.hdfs.SetOwnerRequestProto + (*SetOwnerResponseProto)(nil), // 28: hadoop.hdfs.SetOwnerResponseProto + (*AbandonBlockRequestProto)(nil), // 29: hadoop.hdfs.AbandonBlockRequestProto + (*AbandonBlockResponseProto)(nil), // 30: hadoop.hdfs.AbandonBlockResponseProto + (*AddBlockRequestProto)(nil), // 31: hadoop.hdfs.AddBlockRequestProto + (*AddBlockResponseProto)(nil), // 32: hadoop.hdfs.AddBlockResponseProto + (*GetAdditionalDatanodeRequestProto)(nil), // 33: hadoop.hdfs.GetAdditionalDatanodeRequestProto + (*GetAdditionalDatanodeResponseProto)(nil), // 34: hadoop.hdfs.GetAdditionalDatanodeResponseProto + (*CompleteRequestProto)(nil), // 35: hadoop.hdfs.CompleteRequestProto + (*CompleteResponseProto)(nil), // 36: hadoop.hdfs.CompleteResponseProto + (*ReportBadBlocksRequestProto)(nil), // 37: hadoop.hdfs.ReportBadBlocksRequestProto + (*ReportBadBlocksResponseProto)(nil), // 38: hadoop.hdfs.ReportBadBlocksResponseProto + (*ConcatRequestProto)(nil), // 39: hadoop.hdfs.ConcatRequestProto + (*ConcatResponseProto)(nil), // 40: hadoop.hdfs.ConcatResponseProto + (*TruncateRequestProto)(nil), // 41: hadoop.hdfs.TruncateRequestProto + (*TruncateResponseProto)(nil), // 42: hadoop.hdfs.TruncateResponseProto + (*RenameRequestProto)(nil), // 43: hadoop.hdfs.RenameRequestProto + (*RenameResponseProto)(nil), // 44: hadoop.hdfs.RenameResponseProto + (*Rename2RequestProto)(nil), // 45: hadoop.hdfs.Rename2RequestProto + (*Rename2ResponseProto)(nil), // 46: hadoop.hdfs.Rename2ResponseProto + (*DeleteRequestProto)(nil), // 47: hadoop.hdfs.DeleteRequestProto + (*DeleteResponseProto)(nil), // 48: hadoop.hdfs.DeleteResponseProto + (*MkdirsRequestProto)(nil), // 49: hadoop.hdfs.MkdirsRequestProto + (*MkdirsResponseProto)(nil), // 50: hadoop.hdfs.MkdirsResponseProto + (*GetListingRequestProto)(nil), // 51: hadoop.hdfs.GetListingRequestProto + (*GetListingResponseProto)(nil), // 52: hadoop.hdfs.GetListingResponseProto + (*GetBatchedListingRequestProto)(nil), // 53: hadoop.hdfs.GetBatchedListingRequestProto + (*GetBatchedListingResponseProto)(nil), // 54: hadoop.hdfs.GetBatchedListingResponseProto + (*GetSnapshottableDirListingRequestProto)(nil), // 55: hadoop.hdfs.GetSnapshottableDirListingRequestProto + (*GetSnapshottableDirListingResponseProto)(nil), // 56: hadoop.hdfs.GetSnapshottableDirListingResponseProto + (*GetSnapshotDiffReportRequestProto)(nil), // 57: hadoop.hdfs.GetSnapshotDiffReportRequestProto + (*GetSnapshotDiffReportResponseProto)(nil), // 58: hadoop.hdfs.GetSnapshotDiffReportResponseProto + (*GetSnapshotDiffReportListingRequestProto)(nil), // 59: hadoop.hdfs.GetSnapshotDiffReportListingRequestProto + (*GetSnapshotDiffReportListingResponseProto)(nil), // 60: hadoop.hdfs.GetSnapshotDiffReportListingResponseProto + (*RenewLeaseRequestProto)(nil), // 61: hadoop.hdfs.RenewLeaseRequestProto + (*RenewLeaseResponseProto)(nil), // 62: hadoop.hdfs.RenewLeaseResponseProto + (*RecoverLeaseRequestProto)(nil), // 63: hadoop.hdfs.RecoverLeaseRequestProto + (*RecoverLeaseResponseProto)(nil), // 64: hadoop.hdfs.RecoverLeaseResponseProto + (*GetFsStatusRequestProto)(nil), // 65: hadoop.hdfs.GetFsStatusRequestProto + (*GetFsStatsResponseProto)(nil), // 66: hadoop.hdfs.GetFsStatsResponseProto + (*GetFsReplicatedBlockStatsRequestProto)(nil), // 67: hadoop.hdfs.GetFsReplicatedBlockStatsRequestProto + (*GetFsReplicatedBlockStatsResponseProto)(nil), // 68: hadoop.hdfs.GetFsReplicatedBlockStatsResponseProto + (*GetFsECBlockGroupStatsRequestProto)(nil), // 69: hadoop.hdfs.GetFsECBlockGroupStatsRequestProto + (*GetFsECBlockGroupStatsResponseProto)(nil), // 70: hadoop.hdfs.GetFsECBlockGroupStatsResponseProto + (*GetDatanodeReportRequestProto)(nil), // 71: hadoop.hdfs.GetDatanodeReportRequestProto + (*GetDatanodeReportResponseProto)(nil), // 72: hadoop.hdfs.GetDatanodeReportResponseProto + (*GetDatanodeStorageReportRequestProto)(nil), // 73: hadoop.hdfs.GetDatanodeStorageReportRequestProto + (*DatanodeStorageReportProto)(nil), // 74: hadoop.hdfs.DatanodeStorageReportProto + (*GetDatanodeStorageReportResponseProto)(nil), // 75: hadoop.hdfs.GetDatanodeStorageReportResponseProto + (*GetPreferredBlockSizeRequestProto)(nil), // 76: hadoop.hdfs.GetPreferredBlockSizeRequestProto + (*GetPreferredBlockSizeResponseProto)(nil), // 77: hadoop.hdfs.GetPreferredBlockSizeResponseProto + (*SetSafeModeRequestProto)(nil), // 78: hadoop.hdfs.SetSafeModeRequestProto + (*SetSafeModeResponseProto)(nil), // 79: hadoop.hdfs.SetSafeModeResponseProto + (*SaveNamespaceRequestProto)(nil), // 80: hadoop.hdfs.SaveNamespaceRequestProto + (*SaveNamespaceResponseProto)(nil), // 81: hadoop.hdfs.SaveNamespaceResponseProto + (*RollEditsRequestProto)(nil), // 82: hadoop.hdfs.RollEditsRequestProto + (*RollEditsResponseProto)(nil), // 83: hadoop.hdfs.RollEditsResponseProto + (*RestoreFailedStorageRequestProto)(nil), // 84: hadoop.hdfs.RestoreFailedStorageRequestProto + (*RestoreFailedStorageResponseProto)(nil), // 85: hadoop.hdfs.RestoreFailedStorageResponseProto + (*RefreshNodesRequestProto)(nil), // 86: hadoop.hdfs.RefreshNodesRequestProto + (*RefreshNodesResponseProto)(nil), // 87: hadoop.hdfs.RefreshNodesResponseProto + (*FinalizeUpgradeRequestProto)(nil), // 88: hadoop.hdfs.FinalizeUpgradeRequestProto + (*FinalizeUpgradeResponseProto)(nil), // 89: hadoop.hdfs.FinalizeUpgradeResponseProto + (*UpgradeStatusRequestProto)(nil), // 90: hadoop.hdfs.UpgradeStatusRequestProto + (*UpgradeStatusResponseProto)(nil), // 91: hadoop.hdfs.UpgradeStatusResponseProto + (*RollingUpgradeRequestProto)(nil), // 92: hadoop.hdfs.RollingUpgradeRequestProto + (*RollingUpgradeInfoProto)(nil), // 93: hadoop.hdfs.RollingUpgradeInfoProto + (*RollingUpgradeResponseProto)(nil), // 94: hadoop.hdfs.RollingUpgradeResponseProto + (*ListCorruptFileBlocksRequestProto)(nil), // 95: hadoop.hdfs.ListCorruptFileBlocksRequestProto + (*ListCorruptFileBlocksResponseProto)(nil), // 96: hadoop.hdfs.ListCorruptFileBlocksResponseProto + (*MetaSaveRequestProto)(nil), // 97: hadoop.hdfs.MetaSaveRequestProto + (*MetaSaveResponseProto)(nil), // 98: hadoop.hdfs.MetaSaveResponseProto + (*GetFileInfoRequestProto)(nil), // 99: hadoop.hdfs.GetFileInfoRequestProto + (*GetFileInfoResponseProto)(nil), // 100: hadoop.hdfs.GetFileInfoResponseProto + (*GetLocatedFileInfoRequestProto)(nil), // 101: hadoop.hdfs.GetLocatedFileInfoRequestProto + (*GetLocatedFileInfoResponseProto)(nil), // 102: hadoop.hdfs.GetLocatedFileInfoResponseProto + (*IsFileClosedRequestProto)(nil), // 103: hadoop.hdfs.IsFileClosedRequestProto + (*IsFileClosedResponseProto)(nil), // 104: hadoop.hdfs.IsFileClosedResponseProto + (*CacheDirectiveInfoProto)(nil), // 105: hadoop.hdfs.CacheDirectiveInfoProto + (*CacheDirectiveInfoExpirationProto)(nil), // 106: hadoop.hdfs.CacheDirectiveInfoExpirationProto + (*CacheDirectiveStatsProto)(nil), // 107: hadoop.hdfs.CacheDirectiveStatsProto + (*AddCacheDirectiveRequestProto)(nil), // 108: hadoop.hdfs.AddCacheDirectiveRequestProto + (*AddCacheDirectiveResponseProto)(nil), // 109: hadoop.hdfs.AddCacheDirectiveResponseProto + (*ModifyCacheDirectiveRequestProto)(nil), // 110: hadoop.hdfs.ModifyCacheDirectiveRequestProto + (*ModifyCacheDirectiveResponseProto)(nil), // 111: hadoop.hdfs.ModifyCacheDirectiveResponseProto + (*RemoveCacheDirectiveRequestProto)(nil), // 112: hadoop.hdfs.RemoveCacheDirectiveRequestProto + (*RemoveCacheDirectiveResponseProto)(nil), // 113: hadoop.hdfs.RemoveCacheDirectiveResponseProto + (*ListCacheDirectivesRequestProto)(nil), // 114: hadoop.hdfs.ListCacheDirectivesRequestProto + (*CacheDirectiveEntryProto)(nil), // 115: hadoop.hdfs.CacheDirectiveEntryProto + (*ListCacheDirectivesResponseProto)(nil), // 116: hadoop.hdfs.ListCacheDirectivesResponseProto + (*CachePoolInfoProto)(nil), // 117: hadoop.hdfs.CachePoolInfoProto + (*CachePoolStatsProto)(nil), // 118: hadoop.hdfs.CachePoolStatsProto + (*AddCachePoolRequestProto)(nil), // 119: hadoop.hdfs.AddCachePoolRequestProto + (*AddCachePoolResponseProto)(nil), // 120: hadoop.hdfs.AddCachePoolResponseProto + (*ModifyCachePoolRequestProto)(nil), // 121: hadoop.hdfs.ModifyCachePoolRequestProto + (*ModifyCachePoolResponseProto)(nil), // 122: hadoop.hdfs.ModifyCachePoolResponseProto + (*RemoveCachePoolRequestProto)(nil), // 123: hadoop.hdfs.RemoveCachePoolRequestProto + (*RemoveCachePoolResponseProto)(nil), // 124: hadoop.hdfs.RemoveCachePoolResponseProto + (*ListCachePoolsRequestProto)(nil), // 125: hadoop.hdfs.ListCachePoolsRequestProto + (*ListCachePoolsResponseProto)(nil), // 126: hadoop.hdfs.ListCachePoolsResponseProto + (*CachePoolEntryProto)(nil), // 127: hadoop.hdfs.CachePoolEntryProto + (*GetFileLinkInfoRequestProto)(nil), // 128: hadoop.hdfs.GetFileLinkInfoRequestProto + (*GetFileLinkInfoResponseProto)(nil), // 129: hadoop.hdfs.GetFileLinkInfoResponseProto + (*GetContentSummaryRequestProto)(nil), // 130: hadoop.hdfs.GetContentSummaryRequestProto + (*GetContentSummaryResponseProto)(nil), // 131: hadoop.hdfs.GetContentSummaryResponseProto + (*GetQuotaUsageRequestProto)(nil), // 132: hadoop.hdfs.GetQuotaUsageRequestProto + (*GetQuotaUsageResponseProto)(nil), // 133: hadoop.hdfs.GetQuotaUsageResponseProto + (*SetQuotaRequestProto)(nil), // 134: hadoop.hdfs.SetQuotaRequestProto + (*SetQuotaResponseProto)(nil), // 135: hadoop.hdfs.SetQuotaResponseProto + (*FsyncRequestProto)(nil), // 136: hadoop.hdfs.FsyncRequestProto + (*FsyncResponseProto)(nil), // 137: hadoop.hdfs.FsyncResponseProto + (*SetTimesRequestProto)(nil), // 138: hadoop.hdfs.SetTimesRequestProto + (*SetTimesResponseProto)(nil), // 139: hadoop.hdfs.SetTimesResponseProto + (*CreateSymlinkRequestProto)(nil), // 140: hadoop.hdfs.CreateSymlinkRequestProto + (*CreateSymlinkResponseProto)(nil), // 141: hadoop.hdfs.CreateSymlinkResponseProto + (*GetLinkTargetRequestProto)(nil), // 142: hadoop.hdfs.GetLinkTargetRequestProto + (*GetLinkTargetResponseProto)(nil), // 143: hadoop.hdfs.GetLinkTargetResponseProto + (*UpdateBlockForPipelineRequestProto)(nil), // 144: hadoop.hdfs.UpdateBlockForPipelineRequestProto + (*UpdateBlockForPipelineResponseProto)(nil), // 145: hadoop.hdfs.UpdateBlockForPipelineResponseProto + (*UpdatePipelineRequestProto)(nil), // 146: hadoop.hdfs.UpdatePipelineRequestProto + (*UpdatePipelineResponseProto)(nil), // 147: hadoop.hdfs.UpdatePipelineResponseProto + (*SetBalancerBandwidthRequestProto)(nil), // 148: hadoop.hdfs.SetBalancerBandwidthRequestProto + (*SetBalancerBandwidthResponseProto)(nil), // 149: hadoop.hdfs.SetBalancerBandwidthResponseProto + (*GetDataEncryptionKeyRequestProto)(nil), // 150: hadoop.hdfs.GetDataEncryptionKeyRequestProto + (*GetDataEncryptionKeyResponseProto)(nil), // 151: hadoop.hdfs.GetDataEncryptionKeyResponseProto + (*CreateSnapshotRequestProto)(nil), // 152: hadoop.hdfs.CreateSnapshotRequestProto + (*CreateSnapshotResponseProto)(nil), // 153: hadoop.hdfs.CreateSnapshotResponseProto + (*RenameSnapshotRequestProto)(nil), // 154: hadoop.hdfs.RenameSnapshotRequestProto + (*RenameSnapshotResponseProto)(nil), // 155: hadoop.hdfs.RenameSnapshotResponseProto + (*AllowSnapshotRequestProto)(nil), // 156: hadoop.hdfs.AllowSnapshotRequestProto + (*AllowSnapshotResponseProto)(nil), // 157: hadoop.hdfs.AllowSnapshotResponseProto + (*DisallowSnapshotRequestProto)(nil), // 158: hadoop.hdfs.DisallowSnapshotRequestProto + (*DisallowSnapshotResponseProto)(nil), // 159: hadoop.hdfs.DisallowSnapshotResponseProto + (*DeleteSnapshotRequestProto)(nil), // 160: hadoop.hdfs.DeleteSnapshotRequestProto + (*DeleteSnapshotResponseProto)(nil), // 161: hadoop.hdfs.DeleteSnapshotResponseProto + (*CheckAccessRequestProto)(nil), // 162: hadoop.hdfs.CheckAccessRequestProto + (*CheckAccessResponseProto)(nil), // 163: hadoop.hdfs.CheckAccessResponseProto + (*GetCurrentEditLogTxidRequestProto)(nil), // 164: hadoop.hdfs.GetCurrentEditLogTxidRequestProto + (*GetCurrentEditLogTxidResponseProto)(nil), // 165: hadoop.hdfs.GetCurrentEditLogTxidResponseProto + (*GetEditsFromTxidRequestProto)(nil), // 166: hadoop.hdfs.GetEditsFromTxidRequestProto + (*GetEditsFromTxidResponseProto)(nil), // 167: hadoop.hdfs.GetEditsFromTxidResponseProto + (*ListOpenFilesRequestProto)(nil), // 168: hadoop.hdfs.ListOpenFilesRequestProto + (*OpenFilesBatchResponseProto)(nil), // 169: hadoop.hdfs.OpenFilesBatchResponseProto + (*ListOpenFilesResponseProto)(nil), // 170: hadoop.hdfs.ListOpenFilesResponseProto + (*MsyncRequestProto)(nil), // 171: hadoop.hdfs.MsyncRequestProto + (*MsyncResponseProto)(nil), // 172: hadoop.hdfs.MsyncResponseProto + (*SatisfyStoragePolicyRequestProto)(nil), // 173: hadoop.hdfs.SatisfyStoragePolicyRequestProto + (*SatisfyStoragePolicyResponseProto)(nil), // 174: hadoop.hdfs.SatisfyStoragePolicyResponseProto + (*HAServiceStateRequestProto)(nil), // 175: hadoop.hdfs.HAServiceStateRequestProto + (*HAServiceStateResponseProto)(nil), // 176: hadoop.hdfs.HAServiceStateResponseProto + (*LocatedBlocksProto)(nil), // 177: hadoop.hdfs.LocatedBlocksProto + (*FsServerDefaultsProto)(nil), // 178: hadoop.hdfs.FsServerDefaultsProto + (*FsPermissionProto)(nil), // 179: hadoop.hdfs.FsPermissionProto + (CryptoProtocolVersionProto)(0), // 180: hadoop.hdfs.CryptoProtocolVersionProto + (*HdfsFileStatusProto)(nil), // 181: hadoop.hdfs.HdfsFileStatusProto + (*LocatedBlockProto)(nil), // 182: hadoop.hdfs.LocatedBlockProto + (*BlockStoragePolicyProto)(nil), // 183: hadoop.hdfs.BlockStoragePolicyProto + (*ExtendedBlockProto)(nil), // 184: hadoop.hdfs.ExtendedBlockProto + (*DatanodeInfoProto)(nil), // 185: hadoop.hdfs.DatanodeInfoProto + (*DirectoryListingProto)(nil), // 186: hadoop.hdfs.DirectoryListingProto + (*BatchedDirectoryListingProto)(nil), // 187: hadoop.hdfs.BatchedDirectoryListingProto + (*SnapshottableDirectoryListingProto)(nil), // 188: hadoop.hdfs.SnapshottableDirectoryListingProto + (*SnapshotDiffReportProto)(nil), // 189: hadoop.hdfs.SnapshotDiffReportProto + (*SnapshotDiffReportCursorProto)(nil), // 190: hadoop.hdfs.SnapshotDiffReportCursorProto + (*SnapshotDiffReportListingProto)(nil), // 191: hadoop.hdfs.SnapshotDiffReportListingProto + (*StorageReportProto)(nil), // 192: hadoop.hdfs.StorageReportProto + (*RollingUpgradeStatusProto)(nil), // 193: hadoop.hdfs.RollingUpgradeStatusProto + (*CorruptFileBlocksProto)(nil), // 194: hadoop.hdfs.CorruptFileBlocksProto + (*ContentSummaryProto)(nil), // 195: hadoop.hdfs.ContentSummaryProto + (*QuotaUsageProto)(nil), // 196: hadoop.hdfs.QuotaUsageProto + (StorageTypeProto)(0), // 197: hadoop.hdfs.StorageTypeProto + (*DatanodeIDProto)(nil), // 198: hadoop.hdfs.DatanodeIDProto + (*DataEncryptionKeyProto)(nil), // 199: hadoop.hdfs.DataEncryptionKeyProto + (AclEntryProto_FsActionProto)(0), // 200: hadoop.hdfs.AclEntryProto.FsActionProto + (*EventsListProto)(nil), // 201: hadoop.hdfs.EventsListProto + (hadoop_common.HAServiceStateProto)(0), // 202: hadoop.common.HAServiceStateProto + (*hadoop_common.GetDelegationTokenRequestProto)(nil), // 203: hadoop.common.GetDelegationTokenRequestProto + (*hadoop_common.RenewDelegationTokenRequestProto)(nil), // 204: hadoop.common.RenewDelegationTokenRequestProto + (*hadoop_common.CancelDelegationTokenRequestProto)(nil), // 205: hadoop.common.CancelDelegationTokenRequestProto + (*ModifyAclEntriesRequestProto)(nil), // 206: hadoop.hdfs.ModifyAclEntriesRequestProto + (*RemoveAclEntriesRequestProto)(nil), // 207: hadoop.hdfs.RemoveAclEntriesRequestProto + (*RemoveDefaultAclRequestProto)(nil), // 208: hadoop.hdfs.RemoveDefaultAclRequestProto + (*RemoveAclRequestProto)(nil), // 209: hadoop.hdfs.RemoveAclRequestProto + (*SetAclRequestProto)(nil), // 210: hadoop.hdfs.SetAclRequestProto + (*GetAclStatusRequestProto)(nil), // 211: hadoop.hdfs.GetAclStatusRequestProto + (*SetXAttrRequestProto)(nil), // 212: hadoop.hdfs.SetXAttrRequestProto + (*GetXAttrsRequestProto)(nil), // 213: hadoop.hdfs.GetXAttrsRequestProto + (*ListXAttrsRequestProto)(nil), // 214: hadoop.hdfs.ListXAttrsRequestProto + (*RemoveXAttrRequestProto)(nil), // 215: hadoop.hdfs.RemoveXAttrRequestProto + (*CreateEncryptionZoneRequestProto)(nil), // 216: hadoop.hdfs.CreateEncryptionZoneRequestProto + (*ListEncryptionZonesRequestProto)(nil), // 217: hadoop.hdfs.ListEncryptionZonesRequestProto + (*ReencryptEncryptionZoneRequestProto)(nil), // 218: hadoop.hdfs.ReencryptEncryptionZoneRequestProto + (*ListReencryptionStatusRequestProto)(nil), // 219: hadoop.hdfs.ListReencryptionStatusRequestProto + (*GetEZForPathRequestProto)(nil), // 220: hadoop.hdfs.GetEZForPathRequestProto + (*SetErasureCodingPolicyRequestProto)(nil), // 221: hadoop.hdfs.SetErasureCodingPolicyRequestProto + (*UnsetErasureCodingPolicyRequestProto)(nil), // 222: hadoop.hdfs.UnsetErasureCodingPolicyRequestProto + (*GetECTopologyResultForPoliciesRequestProto)(nil), // 223: hadoop.hdfs.GetECTopologyResultForPoliciesRequestProto + (*GetErasureCodingPoliciesRequestProto)(nil), // 224: hadoop.hdfs.GetErasureCodingPoliciesRequestProto + (*AddErasureCodingPoliciesRequestProto)(nil), // 225: hadoop.hdfs.AddErasureCodingPoliciesRequestProto + (*RemoveErasureCodingPolicyRequestProto)(nil), // 226: hadoop.hdfs.RemoveErasureCodingPolicyRequestProto + (*EnableErasureCodingPolicyRequestProto)(nil), // 227: hadoop.hdfs.EnableErasureCodingPolicyRequestProto + (*DisableErasureCodingPolicyRequestProto)(nil), // 228: hadoop.hdfs.DisableErasureCodingPolicyRequestProto + (*GetErasureCodingPolicyRequestProto)(nil), // 229: hadoop.hdfs.GetErasureCodingPolicyRequestProto + (*GetErasureCodingCodecsRequestProto)(nil), // 230: hadoop.hdfs.GetErasureCodingCodecsRequestProto + (*hadoop_common.GetDelegationTokenResponseProto)(nil), // 231: hadoop.common.GetDelegationTokenResponseProto + (*hadoop_common.RenewDelegationTokenResponseProto)(nil), // 232: hadoop.common.RenewDelegationTokenResponseProto + (*hadoop_common.CancelDelegationTokenResponseProto)(nil), // 233: hadoop.common.CancelDelegationTokenResponseProto + (*ModifyAclEntriesResponseProto)(nil), // 234: hadoop.hdfs.ModifyAclEntriesResponseProto + (*RemoveAclEntriesResponseProto)(nil), // 235: hadoop.hdfs.RemoveAclEntriesResponseProto + (*RemoveDefaultAclResponseProto)(nil), // 236: hadoop.hdfs.RemoveDefaultAclResponseProto + (*RemoveAclResponseProto)(nil), // 237: hadoop.hdfs.RemoveAclResponseProto + (*SetAclResponseProto)(nil), // 238: hadoop.hdfs.SetAclResponseProto + (*GetAclStatusResponseProto)(nil), // 239: hadoop.hdfs.GetAclStatusResponseProto + (*SetXAttrResponseProto)(nil), // 240: hadoop.hdfs.SetXAttrResponseProto + (*GetXAttrsResponseProto)(nil), // 241: hadoop.hdfs.GetXAttrsResponseProto + (*ListXAttrsResponseProto)(nil), // 242: hadoop.hdfs.ListXAttrsResponseProto + (*RemoveXAttrResponseProto)(nil), // 243: hadoop.hdfs.RemoveXAttrResponseProto + (*CreateEncryptionZoneResponseProto)(nil), // 244: hadoop.hdfs.CreateEncryptionZoneResponseProto + (*ListEncryptionZonesResponseProto)(nil), // 245: hadoop.hdfs.ListEncryptionZonesResponseProto + (*ReencryptEncryptionZoneResponseProto)(nil), // 246: hadoop.hdfs.ReencryptEncryptionZoneResponseProto + (*ListReencryptionStatusResponseProto)(nil), // 247: hadoop.hdfs.ListReencryptionStatusResponseProto + (*GetEZForPathResponseProto)(nil), // 248: hadoop.hdfs.GetEZForPathResponseProto + (*SetErasureCodingPolicyResponseProto)(nil), // 249: hadoop.hdfs.SetErasureCodingPolicyResponseProto + (*UnsetErasureCodingPolicyResponseProto)(nil), // 250: hadoop.hdfs.UnsetErasureCodingPolicyResponseProto + (*GetECTopologyResultForPoliciesResponseProto)(nil), // 251: hadoop.hdfs.GetECTopologyResultForPoliciesResponseProto + (*GetErasureCodingPoliciesResponseProto)(nil), // 252: hadoop.hdfs.GetErasureCodingPoliciesResponseProto + (*AddErasureCodingPoliciesResponseProto)(nil), // 253: hadoop.hdfs.AddErasureCodingPoliciesResponseProto + (*RemoveErasureCodingPolicyResponseProto)(nil), // 254: hadoop.hdfs.RemoveErasureCodingPolicyResponseProto + (*EnableErasureCodingPolicyResponseProto)(nil), // 255: hadoop.hdfs.EnableErasureCodingPolicyResponseProto + (*DisableErasureCodingPolicyResponseProto)(nil), // 256: hadoop.hdfs.DisableErasureCodingPolicyResponseProto + (*GetErasureCodingPolicyResponseProto)(nil), // 257: hadoop.hdfs.GetErasureCodingPolicyResponseProto + (*GetErasureCodingCodecsResponseProto)(nil), // 258: hadoop.hdfs.GetErasureCodingCodecsResponseProto +} +var file_ClientNamenodeProtocol_proto_depIdxs = []int32{ + 177, // 0: hadoop.hdfs.GetBlockLocationsResponseProto.locations:type_name -> hadoop.hdfs.LocatedBlocksProto + 178, // 1: hadoop.hdfs.GetServerDefaultsResponseProto.serverDefaults:type_name -> hadoop.hdfs.FsServerDefaultsProto + 179, // 2: hadoop.hdfs.CreateRequestProto.masked:type_name -> hadoop.hdfs.FsPermissionProto + 180, // 3: hadoop.hdfs.CreateRequestProto.cryptoProtocolVersion:type_name -> hadoop.hdfs.CryptoProtocolVersionProto + 179, // 4: hadoop.hdfs.CreateRequestProto.unmasked:type_name -> hadoop.hdfs.FsPermissionProto + 181, // 5: hadoop.hdfs.CreateResponseProto.fs:type_name -> hadoop.hdfs.HdfsFileStatusProto + 182, // 6: hadoop.hdfs.AppendResponseProto.block:type_name -> hadoop.hdfs.LocatedBlockProto + 181, // 7: hadoop.hdfs.AppendResponseProto.stat:type_name -> hadoop.hdfs.HdfsFileStatusProto + 183, // 8: hadoop.hdfs.GetStoragePolicyResponseProto.storagePolicy:type_name -> hadoop.hdfs.BlockStoragePolicyProto + 183, // 9: hadoop.hdfs.GetStoragePoliciesResponseProto.policies:type_name -> hadoop.hdfs.BlockStoragePolicyProto + 179, // 10: hadoop.hdfs.SetPermissionRequestProto.permission:type_name -> hadoop.hdfs.FsPermissionProto + 184, // 11: hadoop.hdfs.AbandonBlockRequestProto.b:type_name -> hadoop.hdfs.ExtendedBlockProto + 184, // 12: hadoop.hdfs.AddBlockRequestProto.previous:type_name -> hadoop.hdfs.ExtendedBlockProto + 185, // 13: hadoop.hdfs.AddBlockRequestProto.excludeNodes:type_name -> hadoop.hdfs.DatanodeInfoProto + 1, // 14: hadoop.hdfs.AddBlockRequestProto.flags:type_name -> hadoop.hdfs.AddBlockFlagProto + 182, // 15: hadoop.hdfs.AddBlockResponseProto.block:type_name -> hadoop.hdfs.LocatedBlockProto + 184, // 16: hadoop.hdfs.GetAdditionalDatanodeRequestProto.blk:type_name -> hadoop.hdfs.ExtendedBlockProto + 185, // 17: hadoop.hdfs.GetAdditionalDatanodeRequestProto.existings:type_name -> hadoop.hdfs.DatanodeInfoProto + 185, // 18: hadoop.hdfs.GetAdditionalDatanodeRequestProto.excludes:type_name -> hadoop.hdfs.DatanodeInfoProto + 182, // 19: hadoop.hdfs.GetAdditionalDatanodeResponseProto.block:type_name -> hadoop.hdfs.LocatedBlockProto + 184, // 20: hadoop.hdfs.CompleteRequestProto.last:type_name -> hadoop.hdfs.ExtendedBlockProto + 182, // 21: hadoop.hdfs.ReportBadBlocksRequestProto.blocks:type_name -> hadoop.hdfs.LocatedBlockProto + 179, // 22: hadoop.hdfs.MkdirsRequestProto.masked:type_name -> hadoop.hdfs.FsPermissionProto + 179, // 23: hadoop.hdfs.MkdirsRequestProto.unmasked:type_name -> hadoop.hdfs.FsPermissionProto + 186, // 24: hadoop.hdfs.GetListingResponseProto.dirList:type_name -> hadoop.hdfs.DirectoryListingProto + 187, // 25: hadoop.hdfs.GetBatchedListingResponseProto.listings:type_name -> hadoop.hdfs.BatchedDirectoryListingProto + 188, // 26: hadoop.hdfs.GetSnapshottableDirListingResponseProto.snapshottableDirList:type_name -> hadoop.hdfs.SnapshottableDirectoryListingProto + 189, // 27: hadoop.hdfs.GetSnapshotDiffReportResponseProto.diffReport:type_name -> hadoop.hdfs.SnapshotDiffReportProto + 190, // 28: hadoop.hdfs.GetSnapshotDiffReportListingRequestProto.cursor:type_name -> hadoop.hdfs.SnapshotDiffReportCursorProto + 191, // 29: hadoop.hdfs.GetSnapshotDiffReportListingResponseProto.diffReport:type_name -> hadoop.hdfs.SnapshotDiffReportListingProto + 2, // 30: hadoop.hdfs.GetDatanodeReportRequestProto.type:type_name -> hadoop.hdfs.DatanodeReportTypeProto + 185, // 31: hadoop.hdfs.GetDatanodeReportResponseProto.di:type_name -> hadoop.hdfs.DatanodeInfoProto + 2, // 32: hadoop.hdfs.GetDatanodeStorageReportRequestProto.type:type_name -> hadoop.hdfs.DatanodeReportTypeProto + 185, // 33: hadoop.hdfs.DatanodeStorageReportProto.datanodeInfo:type_name -> hadoop.hdfs.DatanodeInfoProto + 192, // 34: hadoop.hdfs.DatanodeStorageReportProto.storageReports:type_name -> hadoop.hdfs.StorageReportProto + 74, // 35: hadoop.hdfs.GetDatanodeStorageReportResponseProto.datanodeStorageReports:type_name -> hadoop.hdfs.DatanodeStorageReportProto + 3, // 36: hadoop.hdfs.SetSafeModeRequestProto.action:type_name -> hadoop.hdfs.SafeModeActionProto + 4, // 37: hadoop.hdfs.RollingUpgradeRequestProto.action:type_name -> hadoop.hdfs.RollingUpgradeActionProto + 193, // 38: hadoop.hdfs.RollingUpgradeInfoProto.status:type_name -> hadoop.hdfs.RollingUpgradeStatusProto + 93, // 39: hadoop.hdfs.RollingUpgradeResponseProto.rollingUpgradeInfo:type_name -> hadoop.hdfs.RollingUpgradeInfoProto + 194, // 40: hadoop.hdfs.ListCorruptFileBlocksResponseProto.corrupt:type_name -> hadoop.hdfs.CorruptFileBlocksProto + 181, // 41: hadoop.hdfs.GetFileInfoResponseProto.fs:type_name -> hadoop.hdfs.HdfsFileStatusProto + 181, // 42: hadoop.hdfs.GetLocatedFileInfoResponseProto.fs:type_name -> hadoop.hdfs.HdfsFileStatusProto + 106, // 43: hadoop.hdfs.CacheDirectiveInfoProto.expiration:type_name -> hadoop.hdfs.CacheDirectiveInfoExpirationProto + 105, // 44: hadoop.hdfs.AddCacheDirectiveRequestProto.info:type_name -> hadoop.hdfs.CacheDirectiveInfoProto + 105, // 45: hadoop.hdfs.ModifyCacheDirectiveRequestProto.info:type_name -> hadoop.hdfs.CacheDirectiveInfoProto + 105, // 46: hadoop.hdfs.ListCacheDirectivesRequestProto.filter:type_name -> hadoop.hdfs.CacheDirectiveInfoProto + 105, // 47: hadoop.hdfs.CacheDirectiveEntryProto.info:type_name -> hadoop.hdfs.CacheDirectiveInfoProto + 107, // 48: hadoop.hdfs.CacheDirectiveEntryProto.stats:type_name -> hadoop.hdfs.CacheDirectiveStatsProto + 115, // 49: hadoop.hdfs.ListCacheDirectivesResponseProto.elements:type_name -> hadoop.hdfs.CacheDirectiveEntryProto + 117, // 50: hadoop.hdfs.AddCachePoolRequestProto.info:type_name -> hadoop.hdfs.CachePoolInfoProto + 117, // 51: hadoop.hdfs.ModifyCachePoolRequestProto.info:type_name -> hadoop.hdfs.CachePoolInfoProto + 127, // 52: hadoop.hdfs.ListCachePoolsResponseProto.entries:type_name -> hadoop.hdfs.CachePoolEntryProto + 117, // 53: hadoop.hdfs.CachePoolEntryProto.info:type_name -> hadoop.hdfs.CachePoolInfoProto + 118, // 54: hadoop.hdfs.CachePoolEntryProto.stats:type_name -> hadoop.hdfs.CachePoolStatsProto + 181, // 55: hadoop.hdfs.GetFileLinkInfoResponseProto.fs:type_name -> hadoop.hdfs.HdfsFileStatusProto + 195, // 56: hadoop.hdfs.GetContentSummaryResponseProto.summary:type_name -> hadoop.hdfs.ContentSummaryProto + 196, // 57: hadoop.hdfs.GetQuotaUsageResponseProto.usage:type_name -> hadoop.hdfs.QuotaUsageProto + 197, // 58: hadoop.hdfs.SetQuotaRequestProto.storageType:type_name -> hadoop.hdfs.StorageTypeProto + 179, // 59: hadoop.hdfs.CreateSymlinkRequestProto.dirPerm:type_name -> hadoop.hdfs.FsPermissionProto + 184, // 60: hadoop.hdfs.UpdateBlockForPipelineRequestProto.block:type_name -> hadoop.hdfs.ExtendedBlockProto + 182, // 61: hadoop.hdfs.UpdateBlockForPipelineResponseProto.block:type_name -> hadoop.hdfs.LocatedBlockProto + 184, // 62: hadoop.hdfs.UpdatePipelineRequestProto.oldBlock:type_name -> hadoop.hdfs.ExtendedBlockProto + 184, // 63: hadoop.hdfs.UpdatePipelineRequestProto.newBlock:type_name -> hadoop.hdfs.ExtendedBlockProto + 198, // 64: hadoop.hdfs.UpdatePipelineRequestProto.newNodes:type_name -> hadoop.hdfs.DatanodeIDProto + 199, // 65: hadoop.hdfs.GetDataEncryptionKeyResponseProto.dataEncryptionKey:type_name -> hadoop.hdfs.DataEncryptionKeyProto + 200, // 66: hadoop.hdfs.CheckAccessRequestProto.mode:type_name -> hadoop.hdfs.AclEntryProto.FsActionProto + 201, // 67: hadoop.hdfs.GetEditsFromTxidResponseProto.eventsList:type_name -> hadoop.hdfs.EventsListProto + 6, // 68: hadoop.hdfs.ListOpenFilesRequestProto.types:type_name -> hadoop.hdfs.OpenFilesTypeProto + 169, // 69: hadoop.hdfs.ListOpenFilesResponseProto.entries:type_name -> hadoop.hdfs.OpenFilesBatchResponseProto + 6, // 70: hadoop.hdfs.ListOpenFilesResponseProto.types:type_name -> hadoop.hdfs.OpenFilesTypeProto + 202, // 71: hadoop.hdfs.HAServiceStateResponseProto.state:type_name -> hadoop.common.HAServiceStateProto + 7, // 72: hadoop.hdfs.ClientNamenodeProtocol.getBlockLocations:input_type -> hadoop.hdfs.GetBlockLocationsRequestProto + 9, // 73: hadoop.hdfs.ClientNamenodeProtocol.getServerDefaults:input_type -> hadoop.hdfs.GetServerDefaultsRequestProto + 11, // 74: hadoop.hdfs.ClientNamenodeProtocol.create:input_type -> hadoop.hdfs.CreateRequestProto + 13, // 75: hadoop.hdfs.ClientNamenodeProtocol.append:input_type -> hadoop.hdfs.AppendRequestProto + 15, // 76: hadoop.hdfs.ClientNamenodeProtocol.setReplication:input_type -> hadoop.hdfs.SetReplicationRequestProto + 17, // 77: hadoop.hdfs.ClientNamenodeProtocol.setStoragePolicy:input_type -> hadoop.hdfs.SetStoragePolicyRequestProto + 19, // 78: hadoop.hdfs.ClientNamenodeProtocol.unsetStoragePolicy:input_type -> hadoop.hdfs.UnsetStoragePolicyRequestProto + 21, // 79: hadoop.hdfs.ClientNamenodeProtocol.getStoragePolicy:input_type -> hadoop.hdfs.GetStoragePolicyRequestProto + 23, // 80: hadoop.hdfs.ClientNamenodeProtocol.getStoragePolicies:input_type -> hadoop.hdfs.GetStoragePoliciesRequestProto + 25, // 81: hadoop.hdfs.ClientNamenodeProtocol.setPermission:input_type -> hadoop.hdfs.SetPermissionRequestProto + 27, // 82: hadoop.hdfs.ClientNamenodeProtocol.setOwner:input_type -> hadoop.hdfs.SetOwnerRequestProto + 29, // 83: hadoop.hdfs.ClientNamenodeProtocol.abandonBlock:input_type -> hadoop.hdfs.AbandonBlockRequestProto + 31, // 84: hadoop.hdfs.ClientNamenodeProtocol.addBlock:input_type -> hadoop.hdfs.AddBlockRequestProto + 33, // 85: hadoop.hdfs.ClientNamenodeProtocol.getAdditionalDatanode:input_type -> hadoop.hdfs.GetAdditionalDatanodeRequestProto + 35, // 86: hadoop.hdfs.ClientNamenodeProtocol.complete:input_type -> hadoop.hdfs.CompleteRequestProto + 37, // 87: hadoop.hdfs.ClientNamenodeProtocol.reportBadBlocks:input_type -> hadoop.hdfs.ReportBadBlocksRequestProto + 39, // 88: hadoop.hdfs.ClientNamenodeProtocol.concat:input_type -> hadoop.hdfs.ConcatRequestProto + 41, // 89: hadoop.hdfs.ClientNamenodeProtocol.truncate:input_type -> hadoop.hdfs.TruncateRequestProto + 43, // 90: hadoop.hdfs.ClientNamenodeProtocol.rename:input_type -> hadoop.hdfs.RenameRequestProto + 45, // 91: hadoop.hdfs.ClientNamenodeProtocol.rename2:input_type -> hadoop.hdfs.Rename2RequestProto + 47, // 92: hadoop.hdfs.ClientNamenodeProtocol.delete:input_type -> hadoop.hdfs.DeleteRequestProto + 49, // 93: hadoop.hdfs.ClientNamenodeProtocol.mkdirs:input_type -> hadoop.hdfs.MkdirsRequestProto + 51, // 94: hadoop.hdfs.ClientNamenodeProtocol.getListing:input_type -> hadoop.hdfs.GetListingRequestProto + 53, // 95: hadoop.hdfs.ClientNamenodeProtocol.getBatchedListing:input_type -> hadoop.hdfs.GetBatchedListingRequestProto + 61, // 96: hadoop.hdfs.ClientNamenodeProtocol.renewLease:input_type -> hadoop.hdfs.RenewLeaseRequestProto + 63, // 97: hadoop.hdfs.ClientNamenodeProtocol.recoverLease:input_type -> hadoop.hdfs.RecoverLeaseRequestProto + 65, // 98: hadoop.hdfs.ClientNamenodeProtocol.getFsStats:input_type -> hadoop.hdfs.GetFsStatusRequestProto + 67, // 99: hadoop.hdfs.ClientNamenodeProtocol.getFsReplicatedBlockStats:input_type -> hadoop.hdfs.GetFsReplicatedBlockStatsRequestProto + 69, // 100: hadoop.hdfs.ClientNamenodeProtocol.getFsECBlockGroupStats:input_type -> hadoop.hdfs.GetFsECBlockGroupStatsRequestProto + 71, // 101: hadoop.hdfs.ClientNamenodeProtocol.getDatanodeReport:input_type -> hadoop.hdfs.GetDatanodeReportRequestProto + 73, // 102: hadoop.hdfs.ClientNamenodeProtocol.getDatanodeStorageReport:input_type -> hadoop.hdfs.GetDatanodeStorageReportRequestProto + 76, // 103: hadoop.hdfs.ClientNamenodeProtocol.getPreferredBlockSize:input_type -> hadoop.hdfs.GetPreferredBlockSizeRequestProto + 78, // 104: hadoop.hdfs.ClientNamenodeProtocol.setSafeMode:input_type -> hadoop.hdfs.SetSafeModeRequestProto + 80, // 105: hadoop.hdfs.ClientNamenodeProtocol.saveNamespace:input_type -> hadoop.hdfs.SaveNamespaceRequestProto + 82, // 106: hadoop.hdfs.ClientNamenodeProtocol.rollEdits:input_type -> hadoop.hdfs.RollEditsRequestProto + 84, // 107: hadoop.hdfs.ClientNamenodeProtocol.restoreFailedStorage:input_type -> hadoop.hdfs.RestoreFailedStorageRequestProto + 86, // 108: hadoop.hdfs.ClientNamenodeProtocol.refreshNodes:input_type -> hadoop.hdfs.RefreshNodesRequestProto + 88, // 109: hadoop.hdfs.ClientNamenodeProtocol.finalizeUpgrade:input_type -> hadoop.hdfs.FinalizeUpgradeRequestProto + 90, // 110: hadoop.hdfs.ClientNamenodeProtocol.upgradeStatus:input_type -> hadoop.hdfs.UpgradeStatusRequestProto + 92, // 111: hadoop.hdfs.ClientNamenodeProtocol.rollingUpgrade:input_type -> hadoop.hdfs.RollingUpgradeRequestProto + 95, // 112: hadoop.hdfs.ClientNamenodeProtocol.listCorruptFileBlocks:input_type -> hadoop.hdfs.ListCorruptFileBlocksRequestProto + 97, // 113: hadoop.hdfs.ClientNamenodeProtocol.metaSave:input_type -> hadoop.hdfs.MetaSaveRequestProto + 99, // 114: hadoop.hdfs.ClientNamenodeProtocol.getFileInfo:input_type -> hadoop.hdfs.GetFileInfoRequestProto + 101, // 115: hadoop.hdfs.ClientNamenodeProtocol.getLocatedFileInfo:input_type -> hadoop.hdfs.GetLocatedFileInfoRequestProto + 108, // 116: hadoop.hdfs.ClientNamenodeProtocol.addCacheDirective:input_type -> hadoop.hdfs.AddCacheDirectiveRequestProto + 110, // 117: hadoop.hdfs.ClientNamenodeProtocol.modifyCacheDirective:input_type -> hadoop.hdfs.ModifyCacheDirectiveRequestProto + 112, // 118: hadoop.hdfs.ClientNamenodeProtocol.removeCacheDirective:input_type -> hadoop.hdfs.RemoveCacheDirectiveRequestProto + 114, // 119: hadoop.hdfs.ClientNamenodeProtocol.listCacheDirectives:input_type -> hadoop.hdfs.ListCacheDirectivesRequestProto + 119, // 120: hadoop.hdfs.ClientNamenodeProtocol.addCachePool:input_type -> hadoop.hdfs.AddCachePoolRequestProto + 121, // 121: hadoop.hdfs.ClientNamenodeProtocol.modifyCachePool:input_type -> hadoop.hdfs.ModifyCachePoolRequestProto + 123, // 122: hadoop.hdfs.ClientNamenodeProtocol.removeCachePool:input_type -> hadoop.hdfs.RemoveCachePoolRequestProto + 125, // 123: hadoop.hdfs.ClientNamenodeProtocol.listCachePools:input_type -> hadoop.hdfs.ListCachePoolsRequestProto + 128, // 124: hadoop.hdfs.ClientNamenodeProtocol.getFileLinkInfo:input_type -> hadoop.hdfs.GetFileLinkInfoRequestProto + 130, // 125: hadoop.hdfs.ClientNamenodeProtocol.getContentSummary:input_type -> hadoop.hdfs.GetContentSummaryRequestProto + 134, // 126: hadoop.hdfs.ClientNamenodeProtocol.setQuota:input_type -> hadoop.hdfs.SetQuotaRequestProto + 136, // 127: hadoop.hdfs.ClientNamenodeProtocol.fsync:input_type -> hadoop.hdfs.FsyncRequestProto + 138, // 128: hadoop.hdfs.ClientNamenodeProtocol.setTimes:input_type -> hadoop.hdfs.SetTimesRequestProto + 140, // 129: hadoop.hdfs.ClientNamenodeProtocol.createSymlink:input_type -> hadoop.hdfs.CreateSymlinkRequestProto + 142, // 130: hadoop.hdfs.ClientNamenodeProtocol.getLinkTarget:input_type -> hadoop.hdfs.GetLinkTargetRequestProto + 144, // 131: hadoop.hdfs.ClientNamenodeProtocol.updateBlockForPipeline:input_type -> hadoop.hdfs.UpdateBlockForPipelineRequestProto + 146, // 132: hadoop.hdfs.ClientNamenodeProtocol.updatePipeline:input_type -> hadoop.hdfs.UpdatePipelineRequestProto + 203, // 133: hadoop.hdfs.ClientNamenodeProtocol.getDelegationToken:input_type -> hadoop.common.GetDelegationTokenRequestProto + 204, // 134: hadoop.hdfs.ClientNamenodeProtocol.renewDelegationToken:input_type -> hadoop.common.RenewDelegationTokenRequestProto + 205, // 135: hadoop.hdfs.ClientNamenodeProtocol.cancelDelegationToken:input_type -> hadoop.common.CancelDelegationTokenRequestProto + 148, // 136: hadoop.hdfs.ClientNamenodeProtocol.setBalancerBandwidth:input_type -> hadoop.hdfs.SetBalancerBandwidthRequestProto + 150, // 137: hadoop.hdfs.ClientNamenodeProtocol.getDataEncryptionKey:input_type -> hadoop.hdfs.GetDataEncryptionKeyRequestProto + 152, // 138: hadoop.hdfs.ClientNamenodeProtocol.createSnapshot:input_type -> hadoop.hdfs.CreateSnapshotRequestProto + 154, // 139: hadoop.hdfs.ClientNamenodeProtocol.renameSnapshot:input_type -> hadoop.hdfs.RenameSnapshotRequestProto + 156, // 140: hadoop.hdfs.ClientNamenodeProtocol.allowSnapshot:input_type -> hadoop.hdfs.AllowSnapshotRequestProto + 158, // 141: hadoop.hdfs.ClientNamenodeProtocol.disallowSnapshot:input_type -> hadoop.hdfs.DisallowSnapshotRequestProto + 55, // 142: hadoop.hdfs.ClientNamenodeProtocol.getSnapshottableDirListing:input_type -> hadoop.hdfs.GetSnapshottableDirListingRequestProto + 160, // 143: hadoop.hdfs.ClientNamenodeProtocol.deleteSnapshot:input_type -> hadoop.hdfs.DeleteSnapshotRequestProto + 57, // 144: hadoop.hdfs.ClientNamenodeProtocol.getSnapshotDiffReport:input_type -> hadoop.hdfs.GetSnapshotDiffReportRequestProto + 59, // 145: hadoop.hdfs.ClientNamenodeProtocol.getSnapshotDiffReportListing:input_type -> hadoop.hdfs.GetSnapshotDiffReportListingRequestProto + 103, // 146: hadoop.hdfs.ClientNamenodeProtocol.isFileClosed:input_type -> hadoop.hdfs.IsFileClosedRequestProto + 206, // 147: hadoop.hdfs.ClientNamenodeProtocol.modifyAclEntries:input_type -> hadoop.hdfs.ModifyAclEntriesRequestProto + 207, // 148: hadoop.hdfs.ClientNamenodeProtocol.removeAclEntries:input_type -> hadoop.hdfs.RemoveAclEntriesRequestProto + 208, // 149: hadoop.hdfs.ClientNamenodeProtocol.removeDefaultAcl:input_type -> hadoop.hdfs.RemoveDefaultAclRequestProto + 209, // 150: hadoop.hdfs.ClientNamenodeProtocol.removeAcl:input_type -> hadoop.hdfs.RemoveAclRequestProto + 210, // 151: hadoop.hdfs.ClientNamenodeProtocol.setAcl:input_type -> hadoop.hdfs.SetAclRequestProto + 211, // 152: hadoop.hdfs.ClientNamenodeProtocol.getAclStatus:input_type -> hadoop.hdfs.GetAclStatusRequestProto + 212, // 153: hadoop.hdfs.ClientNamenodeProtocol.setXAttr:input_type -> hadoop.hdfs.SetXAttrRequestProto + 213, // 154: hadoop.hdfs.ClientNamenodeProtocol.getXAttrs:input_type -> hadoop.hdfs.GetXAttrsRequestProto + 214, // 155: hadoop.hdfs.ClientNamenodeProtocol.listXAttrs:input_type -> hadoop.hdfs.ListXAttrsRequestProto + 215, // 156: hadoop.hdfs.ClientNamenodeProtocol.removeXAttr:input_type -> hadoop.hdfs.RemoveXAttrRequestProto + 162, // 157: hadoop.hdfs.ClientNamenodeProtocol.checkAccess:input_type -> hadoop.hdfs.CheckAccessRequestProto + 216, // 158: hadoop.hdfs.ClientNamenodeProtocol.createEncryptionZone:input_type -> hadoop.hdfs.CreateEncryptionZoneRequestProto + 217, // 159: hadoop.hdfs.ClientNamenodeProtocol.listEncryptionZones:input_type -> hadoop.hdfs.ListEncryptionZonesRequestProto + 218, // 160: hadoop.hdfs.ClientNamenodeProtocol.reencryptEncryptionZone:input_type -> hadoop.hdfs.ReencryptEncryptionZoneRequestProto + 219, // 161: hadoop.hdfs.ClientNamenodeProtocol.listReencryptionStatus:input_type -> hadoop.hdfs.ListReencryptionStatusRequestProto + 220, // 162: hadoop.hdfs.ClientNamenodeProtocol.getEZForPath:input_type -> hadoop.hdfs.GetEZForPathRequestProto + 221, // 163: hadoop.hdfs.ClientNamenodeProtocol.setErasureCodingPolicy:input_type -> hadoop.hdfs.SetErasureCodingPolicyRequestProto + 222, // 164: hadoop.hdfs.ClientNamenodeProtocol.unsetErasureCodingPolicy:input_type -> hadoop.hdfs.UnsetErasureCodingPolicyRequestProto + 223, // 165: hadoop.hdfs.ClientNamenodeProtocol.getECTopologyResultForPolicies:input_type -> hadoop.hdfs.GetECTopologyResultForPoliciesRequestProto + 164, // 166: hadoop.hdfs.ClientNamenodeProtocol.getCurrentEditLogTxid:input_type -> hadoop.hdfs.GetCurrentEditLogTxidRequestProto + 166, // 167: hadoop.hdfs.ClientNamenodeProtocol.getEditsFromTxid:input_type -> hadoop.hdfs.GetEditsFromTxidRequestProto + 224, // 168: hadoop.hdfs.ClientNamenodeProtocol.getErasureCodingPolicies:input_type -> hadoop.hdfs.GetErasureCodingPoliciesRequestProto + 225, // 169: hadoop.hdfs.ClientNamenodeProtocol.addErasureCodingPolicies:input_type -> hadoop.hdfs.AddErasureCodingPoliciesRequestProto + 226, // 170: hadoop.hdfs.ClientNamenodeProtocol.removeErasureCodingPolicy:input_type -> hadoop.hdfs.RemoveErasureCodingPolicyRequestProto + 227, // 171: hadoop.hdfs.ClientNamenodeProtocol.enableErasureCodingPolicy:input_type -> hadoop.hdfs.EnableErasureCodingPolicyRequestProto + 228, // 172: hadoop.hdfs.ClientNamenodeProtocol.disableErasureCodingPolicy:input_type -> hadoop.hdfs.DisableErasureCodingPolicyRequestProto + 229, // 173: hadoop.hdfs.ClientNamenodeProtocol.getErasureCodingPolicy:input_type -> hadoop.hdfs.GetErasureCodingPolicyRequestProto + 230, // 174: hadoop.hdfs.ClientNamenodeProtocol.getErasureCodingCodecs:input_type -> hadoop.hdfs.GetErasureCodingCodecsRequestProto + 132, // 175: hadoop.hdfs.ClientNamenodeProtocol.getQuotaUsage:input_type -> hadoop.hdfs.GetQuotaUsageRequestProto + 168, // 176: hadoop.hdfs.ClientNamenodeProtocol.listOpenFiles:input_type -> hadoop.hdfs.ListOpenFilesRequestProto + 171, // 177: hadoop.hdfs.ClientNamenodeProtocol.msync:input_type -> hadoop.hdfs.MsyncRequestProto + 173, // 178: hadoop.hdfs.ClientNamenodeProtocol.satisfyStoragePolicy:input_type -> hadoop.hdfs.SatisfyStoragePolicyRequestProto + 175, // 179: hadoop.hdfs.ClientNamenodeProtocol.getHAServiceState:input_type -> hadoop.hdfs.HAServiceStateRequestProto + 8, // 180: hadoop.hdfs.ClientNamenodeProtocol.getBlockLocations:output_type -> hadoop.hdfs.GetBlockLocationsResponseProto + 10, // 181: hadoop.hdfs.ClientNamenodeProtocol.getServerDefaults:output_type -> hadoop.hdfs.GetServerDefaultsResponseProto + 12, // 182: hadoop.hdfs.ClientNamenodeProtocol.create:output_type -> hadoop.hdfs.CreateResponseProto + 14, // 183: hadoop.hdfs.ClientNamenodeProtocol.append:output_type -> hadoop.hdfs.AppendResponseProto + 16, // 184: hadoop.hdfs.ClientNamenodeProtocol.setReplication:output_type -> hadoop.hdfs.SetReplicationResponseProto + 18, // 185: hadoop.hdfs.ClientNamenodeProtocol.setStoragePolicy:output_type -> hadoop.hdfs.SetStoragePolicyResponseProto + 20, // 186: hadoop.hdfs.ClientNamenodeProtocol.unsetStoragePolicy:output_type -> hadoop.hdfs.UnsetStoragePolicyResponseProto + 22, // 187: hadoop.hdfs.ClientNamenodeProtocol.getStoragePolicy:output_type -> hadoop.hdfs.GetStoragePolicyResponseProto + 24, // 188: hadoop.hdfs.ClientNamenodeProtocol.getStoragePolicies:output_type -> hadoop.hdfs.GetStoragePoliciesResponseProto + 26, // 189: hadoop.hdfs.ClientNamenodeProtocol.setPermission:output_type -> hadoop.hdfs.SetPermissionResponseProto + 28, // 190: hadoop.hdfs.ClientNamenodeProtocol.setOwner:output_type -> hadoop.hdfs.SetOwnerResponseProto + 30, // 191: hadoop.hdfs.ClientNamenodeProtocol.abandonBlock:output_type -> hadoop.hdfs.AbandonBlockResponseProto + 32, // 192: hadoop.hdfs.ClientNamenodeProtocol.addBlock:output_type -> hadoop.hdfs.AddBlockResponseProto + 34, // 193: hadoop.hdfs.ClientNamenodeProtocol.getAdditionalDatanode:output_type -> hadoop.hdfs.GetAdditionalDatanodeResponseProto + 36, // 194: hadoop.hdfs.ClientNamenodeProtocol.complete:output_type -> hadoop.hdfs.CompleteResponseProto + 38, // 195: hadoop.hdfs.ClientNamenodeProtocol.reportBadBlocks:output_type -> hadoop.hdfs.ReportBadBlocksResponseProto + 40, // 196: hadoop.hdfs.ClientNamenodeProtocol.concat:output_type -> hadoop.hdfs.ConcatResponseProto + 42, // 197: hadoop.hdfs.ClientNamenodeProtocol.truncate:output_type -> hadoop.hdfs.TruncateResponseProto + 44, // 198: hadoop.hdfs.ClientNamenodeProtocol.rename:output_type -> hadoop.hdfs.RenameResponseProto + 46, // 199: hadoop.hdfs.ClientNamenodeProtocol.rename2:output_type -> hadoop.hdfs.Rename2ResponseProto + 48, // 200: hadoop.hdfs.ClientNamenodeProtocol.delete:output_type -> hadoop.hdfs.DeleteResponseProto + 50, // 201: hadoop.hdfs.ClientNamenodeProtocol.mkdirs:output_type -> hadoop.hdfs.MkdirsResponseProto + 52, // 202: hadoop.hdfs.ClientNamenodeProtocol.getListing:output_type -> hadoop.hdfs.GetListingResponseProto + 54, // 203: hadoop.hdfs.ClientNamenodeProtocol.getBatchedListing:output_type -> hadoop.hdfs.GetBatchedListingResponseProto + 62, // 204: hadoop.hdfs.ClientNamenodeProtocol.renewLease:output_type -> hadoop.hdfs.RenewLeaseResponseProto + 64, // 205: hadoop.hdfs.ClientNamenodeProtocol.recoverLease:output_type -> hadoop.hdfs.RecoverLeaseResponseProto + 66, // 206: hadoop.hdfs.ClientNamenodeProtocol.getFsStats:output_type -> hadoop.hdfs.GetFsStatsResponseProto + 68, // 207: hadoop.hdfs.ClientNamenodeProtocol.getFsReplicatedBlockStats:output_type -> hadoop.hdfs.GetFsReplicatedBlockStatsResponseProto + 70, // 208: hadoop.hdfs.ClientNamenodeProtocol.getFsECBlockGroupStats:output_type -> hadoop.hdfs.GetFsECBlockGroupStatsResponseProto + 72, // 209: hadoop.hdfs.ClientNamenodeProtocol.getDatanodeReport:output_type -> hadoop.hdfs.GetDatanodeReportResponseProto + 75, // 210: hadoop.hdfs.ClientNamenodeProtocol.getDatanodeStorageReport:output_type -> hadoop.hdfs.GetDatanodeStorageReportResponseProto + 77, // 211: hadoop.hdfs.ClientNamenodeProtocol.getPreferredBlockSize:output_type -> hadoop.hdfs.GetPreferredBlockSizeResponseProto + 79, // 212: hadoop.hdfs.ClientNamenodeProtocol.setSafeMode:output_type -> hadoop.hdfs.SetSafeModeResponseProto + 81, // 213: hadoop.hdfs.ClientNamenodeProtocol.saveNamespace:output_type -> hadoop.hdfs.SaveNamespaceResponseProto + 83, // 214: hadoop.hdfs.ClientNamenodeProtocol.rollEdits:output_type -> hadoop.hdfs.RollEditsResponseProto + 85, // 215: hadoop.hdfs.ClientNamenodeProtocol.restoreFailedStorage:output_type -> hadoop.hdfs.RestoreFailedStorageResponseProto + 87, // 216: hadoop.hdfs.ClientNamenodeProtocol.refreshNodes:output_type -> hadoop.hdfs.RefreshNodesResponseProto + 89, // 217: hadoop.hdfs.ClientNamenodeProtocol.finalizeUpgrade:output_type -> hadoop.hdfs.FinalizeUpgradeResponseProto + 91, // 218: hadoop.hdfs.ClientNamenodeProtocol.upgradeStatus:output_type -> hadoop.hdfs.UpgradeStatusResponseProto + 94, // 219: hadoop.hdfs.ClientNamenodeProtocol.rollingUpgrade:output_type -> hadoop.hdfs.RollingUpgradeResponseProto + 96, // 220: hadoop.hdfs.ClientNamenodeProtocol.listCorruptFileBlocks:output_type -> hadoop.hdfs.ListCorruptFileBlocksResponseProto + 98, // 221: hadoop.hdfs.ClientNamenodeProtocol.metaSave:output_type -> hadoop.hdfs.MetaSaveResponseProto + 100, // 222: hadoop.hdfs.ClientNamenodeProtocol.getFileInfo:output_type -> hadoop.hdfs.GetFileInfoResponseProto + 102, // 223: hadoop.hdfs.ClientNamenodeProtocol.getLocatedFileInfo:output_type -> hadoop.hdfs.GetLocatedFileInfoResponseProto + 109, // 224: hadoop.hdfs.ClientNamenodeProtocol.addCacheDirective:output_type -> hadoop.hdfs.AddCacheDirectiveResponseProto + 111, // 225: hadoop.hdfs.ClientNamenodeProtocol.modifyCacheDirective:output_type -> hadoop.hdfs.ModifyCacheDirectiveResponseProto + 113, // 226: hadoop.hdfs.ClientNamenodeProtocol.removeCacheDirective:output_type -> hadoop.hdfs.RemoveCacheDirectiveResponseProto + 116, // 227: hadoop.hdfs.ClientNamenodeProtocol.listCacheDirectives:output_type -> hadoop.hdfs.ListCacheDirectivesResponseProto + 120, // 228: hadoop.hdfs.ClientNamenodeProtocol.addCachePool:output_type -> hadoop.hdfs.AddCachePoolResponseProto + 122, // 229: hadoop.hdfs.ClientNamenodeProtocol.modifyCachePool:output_type -> hadoop.hdfs.ModifyCachePoolResponseProto + 124, // 230: hadoop.hdfs.ClientNamenodeProtocol.removeCachePool:output_type -> hadoop.hdfs.RemoveCachePoolResponseProto + 126, // 231: hadoop.hdfs.ClientNamenodeProtocol.listCachePools:output_type -> hadoop.hdfs.ListCachePoolsResponseProto + 129, // 232: hadoop.hdfs.ClientNamenodeProtocol.getFileLinkInfo:output_type -> hadoop.hdfs.GetFileLinkInfoResponseProto + 131, // 233: hadoop.hdfs.ClientNamenodeProtocol.getContentSummary:output_type -> hadoop.hdfs.GetContentSummaryResponseProto + 135, // 234: hadoop.hdfs.ClientNamenodeProtocol.setQuota:output_type -> hadoop.hdfs.SetQuotaResponseProto + 137, // 235: hadoop.hdfs.ClientNamenodeProtocol.fsync:output_type -> hadoop.hdfs.FsyncResponseProto + 139, // 236: hadoop.hdfs.ClientNamenodeProtocol.setTimes:output_type -> hadoop.hdfs.SetTimesResponseProto + 141, // 237: hadoop.hdfs.ClientNamenodeProtocol.createSymlink:output_type -> hadoop.hdfs.CreateSymlinkResponseProto + 143, // 238: hadoop.hdfs.ClientNamenodeProtocol.getLinkTarget:output_type -> hadoop.hdfs.GetLinkTargetResponseProto + 145, // 239: hadoop.hdfs.ClientNamenodeProtocol.updateBlockForPipeline:output_type -> hadoop.hdfs.UpdateBlockForPipelineResponseProto + 147, // 240: hadoop.hdfs.ClientNamenodeProtocol.updatePipeline:output_type -> hadoop.hdfs.UpdatePipelineResponseProto + 231, // 241: hadoop.hdfs.ClientNamenodeProtocol.getDelegationToken:output_type -> hadoop.common.GetDelegationTokenResponseProto + 232, // 242: hadoop.hdfs.ClientNamenodeProtocol.renewDelegationToken:output_type -> hadoop.common.RenewDelegationTokenResponseProto + 233, // 243: hadoop.hdfs.ClientNamenodeProtocol.cancelDelegationToken:output_type -> hadoop.common.CancelDelegationTokenResponseProto + 149, // 244: hadoop.hdfs.ClientNamenodeProtocol.setBalancerBandwidth:output_type -> hadoop.hdfs.SetBalancerBandwidthResponseProto + 151, // 245: hadoop.hdfs.ClientNamenodeProtocol.getDataEncryptionKey:output_type -> hadoop.hdfs.GetDataEncryptionKeyResponseProto + 153, // 246: hadoop.hdfs.ClientNamenodeProtocol.createSnapshot:output_type -> hadoop.hdfs.CreateSnapshotResponseProto + 155, // 247: hadoop.hdfs.ClientNamenodeProtocol.renameSnapshot:output_type -> hadoop.hdfs.RenameSnapshotResponseProto + 157, // 248: hadoop.hdfs.ClientNamenodeProtocol.allowSnapshot:output_type -> hadoop.hdfs.AllowSnapshotResponseProto + 159, // 249: hadoop.hdfs.ClientNamenodeProtocol.disallowSnapshot:output_type -> hadoop.hdfs.DisallowSnapshotResponseProto + 56, // 250: hadoop.hdfs.ClientNamenodeProtocol.getSnapshottableDirListing:output_type -> hadoop.hdfs.GetSnapshottableDirListingResponseProto + 161, // 251: hadoop.hdfs.ClientNamenodeProtocol.deleteSnapshot:output_type -> hadoop.hdfs.DeleteSnapshotResponseProto + 58, // 252: hadoop.hdfs.ClientNamenodeProtocol.getSnapshotDiffReport:output_type -> hadoop.hdfs.GetSnapshotDiffReportResponseProto + 60, // 253: hadoop.hdfs.ClientNamenodeProtocol.getSnapshotDiffReportListing:output_type -> hadoop.hdfs.GetSnapshotDiffReportListingResponseProto + 104, // 254: hadoop.hdfs.ClientNamenodeProtocol.isFileClosed:output_type -> hadoop.hdfs.IsFileClosedResponseProto + 234, // 255: hadoop.hdfs.ClientNamenodeProtocol.modifyAclEntries:output_type -> hadoop.hdfs.ModifyAclEntriesResponseProto + 235, // 256: hadoop.hdfs.ClientNamenodeProtocol.removeAclEntries:output_type -> hadoop.hdfs.RemoveAclEntriesResponseProto + 236, // 257: hadoop.hdfs.ClientNamenodeProtocol.removeDefaultAcl:output_type -> hadoop.hdfs.RemoveDefaultAclResponseProto + 237, // 258: hadoop.hdfs.ClientNamenodeProtocol.removeAcl:output_type -> hadoop.hdfs.RemoveAclResponseProto + 238, // 259: hadoop.hdfs.ClientNamenodeProtocol.setAcl:output_type -> hadoop.hdfs.SetAclResponseProto + 239, // 260: hadoop.hdfs.ClientNamenodeProtocol.getAclStatus:output_type -> hadoop.hdfs.GetAclStatusResponseProto + 240, // 261: hadoop.hdfs.ClientNamenodeProtocol.setXAttr:output_type -> hadoop.hdfs.SetXAttrResponseProto + 241, // 262: hadoop.hdfs.ClientNamenodeProtocol.getXAttrs:output_type -> hadoop.hdfs.GetXAttrsResponseProto + 242, // 263: hadoop.hdfs.ClientNamenodeProtocol.listXAttrs:output_type -> hadoop.hdfs.ListXAttrsResponseProto + 243, // 264: hadoop.hdfs.ClientNamenodeProtocol.removeXAttr:output_type -> hadoop.hdfs.RemoveXAttrResponseProto + 163, // 265: hadoop.hdfs.ClientNamenodeProtocol.checkAccess:output_type -> hadoop.hdfs.CheckAccessResponseProto + 244, // 266: hadoop.hdfs.ClientNamenodeProtocol.createEncryptionZone:output_type -> hadoop.hdfs.CreateEncryptionZoneResponseProto + 245, // 267: hadoop.hdfs.ClientNamenodeProtocol.listEncryptionZones:output_type -> hadoop.hdfs.ListEncryptionZonesResponseProto + 246, // 268: hadoop.hdfs.ClientNamenodeProtocol.reencryptEncryptionZone:output_type -> hadoop.hdfs.ReencryptEncryptionZoneResponseProto + 247, // 269: hadoop.hdfs.ClientNamenodeProtocol.listReencryptionStatus:output_type -> hadoop.hdfs.ListReencryptionStatusResponseProto + 248, // 270: hadoop.hdfs.ClientNamenodeProtocol.getEZForPath:output_type -> hadoop.hdfs.GetEZForPathResponseProto + 249, // 271: hadoop.hdfs.ClientNamenodeProtocol.setErasureCodingPolicy:output_type -> hadoop.hdfs.SetErasureCodingPolicyResponseProto + 250, // 272: hadoop.hdfs.ClientNamenodeProtocol.unsetErasureCodingPolicy:output_type -> hadoop.hdfs.UnsetErasureCodingPolicyResponseProto + 251, // 273: hadoop.hdfs.ClientNamenodeProtocol.getECTopologyResultForPolicies:output_type -> hadoop.hdfs.GetECTopologyResultForPoliciesResponseProto + 165, // 274: hadoop.hdfs.ClientNamenodeProtocol.getCurrentEditLogTxid:output_type -> hadoop.hdfs.GetCurrentEditLogTxidResponseProto + 167, // 275: hadoop.hdfs.ClientNamenodeProtocol.getEditsFromTxid:output_type -> hadoop.hdfs.GetEditsFromTxidResponseProto + 252, // 276: hadoop.hdfs.ClientNamenodeProtocol.getErasureCodingPolicies:output_type -> hadoop.hdfs.GetErasureCodingPoliciesResponseProto + 253, // 277: hadoop.hdfs.ClientNamenodeProtocol.addErasureCodingPolicies:output_type -> hadoop.hdfs.AddErasureCodingPoliciesResponseProto + 254, // 278: hadoop.hdfs.ClientNamenodeProtocol.removeErasureCodingPolicy:output_type -> hadoop.hdfs.RemoveErasureCodingPolicyResponseProto + 255, // 279: hadoop.hdfs.ClientNamenodeProtocol.enableErasureCodingPolicy:output_type -> hadoop.hdfs.EnableErasureCodingPolicyResponseProto + 256, // 280: hadoop.hdfs.ClientNamenodeProtocol.disableErasureCodingPolicy:output_type -> hadoop.hdfs.DisableErasureCodingPolicyResponseProto + 257, // 281: hadoop.hdfs.ClientNamenodeProtocol.getErasureCodingPolicy:output_type -> hadoop.hdfs.GetErasureCodingPolicyResponseProto + 258, // 282: hadoop.hdfs.ClientNamenodeProtocol.getErasureCodingCodecs:output_type -> hadoop.hdfs.GetErasureCodingCodecsResponseProto + 133, // 283: hadoop.hdfs.ClientNamenodeProtocol.getQuotaUsage:output_type -> hadoop.hdfs.GetQuotaUsageResponseProto + 170, // 284: hadoop.hdfs.ClientNamenodeProtocol.listOpenFiles:output_type -> hadoop.hdfs.ListOpenFilesResponseProto + 172, // 285: hadoop.hdfs.ClientNamenodeProtocol.msync:output_type -> hadoop.hdfs.MsyncResponseProto + 174, // 286: hadoop.hdfs.ClientNamenodeProtocol.satisfyStoragePolicy:output_type -> hadoop.hdfs.SatisfyStoragePolicyResponseProto + 176, // 287: hadoop.hdfs.ClientNamenodeProtocol.getHAServiceState:output_type -> hadoop.hdfs.HAServiceStateResponseProto + 180, // [180:288] is the sub-list for method output_type + 72, // [72:180] is the sub-list for method input_type + 72, // [72:72] is the sub-list for extension type_name + 72, // [72:72] is the sub-list for extension extendee + 0, // [0:72] is the sub-list for field type_name +} + +func init() { file_ClientNamenodeProtocol_proto_init() } +func file_ClientNamenodeProtocol_proto_init() { + if File_ClientNamenodeProtocol_proto != nil { + return + } + file_hdfs_proto_init() + file_acl_proto_init() + file_xattr_proto_init() + file_encryption_proto_init() + file_inotify_proto_init() + file_erasurecoding_proto_init() + if !protoimpl.UnsafeEnabled { + file_ClientNamenodeProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBlockLocationsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBlockLocationsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetServerDefaultsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetServerDefaultsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppendRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppendResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetReplicationRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetReplicationResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetStoragePolicyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetStoragePolicyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsetStoragePolicyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsetStoragePolicyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStoragePolicyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStoragePolicyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStoragePoliciesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStoragePoliciesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPermissionRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPermissionResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetOwnerRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetOwnerResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AbandonBlockRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AbandonBlockResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddBlockRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddBlockResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAdditionalDatanodeRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAdditionalDatanodeResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompleteRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompleteResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReportBadBlocksRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReportBadBlocksResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConcatRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConcatResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TruncateRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TruncateResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenameRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenameResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Rename2RequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Rename2ResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetListingRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetListingResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBatchedListingRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBatchedListingResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSnapshottableDirListingRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSnapshottableDirListingResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSnapshotDiffReportRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSnapshotDiffReportResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSnapshotDiffReportListingRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSnapshotDiffReportListingResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenewLeaseRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenewLeaseResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecoverLeaseRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecoverLeaseResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFsStatusRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFsStatsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFsReplicatedBlockStatsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFsReplicatedBlockStatsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFsECBlockGroupStatsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFsECBlockGroupStatsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDatanodeReportRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDatanodeReportResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDatanodeStorageReportRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DatanodeStorageReportProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDatanodeStorageReportResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPreferredBlockSizeRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPreferredBlockSizeResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetSafeModeRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetSafeModeResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveNamespaceRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveNamespaceResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RollEditsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RollEditsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestoreFailedStorageRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestoreFailedStorageResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshNodesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshNodesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FinalizeUpgradeRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FinalizeUpgradeResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpgradeStatusRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpgradeStatusResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RollingUpgradeRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RollingUpgradeInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RollingUpgradeResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCorruptFileBlocksRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCorruptFileBlocksResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetaSaveRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetaSaveResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFileInfoRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFileInfoResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLocatedFileInfoRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLocatedFileInfoResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsFileClosedRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsFileClosedResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CacheDirectiveInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CacheDirectiveInfoExpirationProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CacheDirectiveStatsProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddCacheDirectiveRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddCacheDirectiveResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModifyCacheDirectiveRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModifyCacheDirectiveResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveCacheDirectiveRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveCacheDirectiveResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCacheDirectivesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CacheDirectiveEntryProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCacheDirectivesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CachePoolInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CachePoolStatsProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddCachePoolRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddCachePoolResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModifyCachePoolRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModifyCachePoolResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveCachePoolRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveCachePoolResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCachePoolsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCachePoolsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CachePoolEntryProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFileLinkInfoRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFileLinkInfoResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetContentSummaryRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetContentSummaryResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQuotaUsageRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQuotaUsageResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetQuotaRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetQuotaResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FsyncRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FsyncResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetTimesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetTimesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSymlinkRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSymlinkResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLinkTargetRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLinkTargetResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateBlockForPipelineRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateBlockForPipelineResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdatePipelineRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdatePipelineResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetBalancerBandwidthRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetBalancerBandwidthResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDataEncryptionKeyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDataEncryptionKeyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSnapshotRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSnapshotResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenameSnapshotRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenameSnapshotResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllowSnapshotRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllowSnapshotResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisallowSnapshotRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisallowSnapshotResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSnapshotRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSnapshotResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckAccessRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckAccessResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCurrentEditLogTxidRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCurrentEditLogTxidResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEditsFromTxidRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEditsFromTxidResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOpenFilesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenFilesBatchResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOpenFilesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[164].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsyncRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[165].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsyncResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[166].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SatisfyStoragePolicyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[167].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SatisfyStoragePolicyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[168].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HAServiceStateRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ClientNamenodeProtocol_proto_msgTypes[169].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HAServiceStateResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ClientNamenodeProtocol_proto_rawDesc, + NumEnums: 7, + NumMessages: 170, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ClientNamenodeProtocol_proto_goTypes, + DependencyIndexes: file_ClientNamenodeProtocol_proto_depIdxs, + EnumInfos: file_ClientNamenodeProtocol_proto_enumTypes, + MessageInfos: file_ClientNamenodeProtocol_proto_msgTypes, + }.Build() + File_ClientNamenodeProtocol_proto = out.File + file_ClientNamenodeProtocol_proto_rawDesc = nil + file_ClientNamenodeProtocol_proto_goTypes = nil + file_ClientNamenodeProtocol_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.proto b/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.proto index 30732efc..d9b32ffa 100644 --- a/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.proto +++ b/internal/protocol/hadoop_hdfs/ClientNamenodeProtocol.proto @@ -21,11 +21,12 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax="proto2"; option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "ClientNamenodeProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; package hadoop.hdfs; import "Security.proto"; @@ -35,6 +36,7 @@ import "xattr.proto"; import "encryption.proto"; import "inotify.proto"; import "erasurecoding.proto"; +import "HAServiceProtocol.proto"; /** * The ClientNamenodeProtocol Service defines the interface between a client @@ -68,6 +70,7 @@ enum CreateFlagProto { APPEND = 0x04; // Append to a file LAZY_PERSIST = 0x10; // File with reduced durability guarantees. NEW_BLOCK = 0x20; // Write data to a new block when appending + SHOULD_REPLICATE = 0x80; // Enforce to create a replicate file } message CreateRequestProto { @@ -79,6 +82,9 @@ message CreateRequestProto { required uint32 replication = 6; // Short: Only 16 bits used required uint64 blockSize = 7; repeated CryptoProtocolVersionProto cryptoProtocolVersion = 8; + optional FsPermissionProto unmasked = 9; + optional string ecPolicyName = 10; + optional string storagePolicy = 11; } message CreateResponseProto { @@ -162,6 +168,11 @@ message AbandonBlockRequestProto { message AbandonBlockResponseProto { // void response } +enum AddBlockFlagProto { + NO_LOCAL_WRITE = 1; // avoid writing to local node. + IGNORE_CLIENT_LOCALITY = 2; // write to a random node +} + message AddBlockRequestProto { required string src = 1; required string clientName = 2; @@ -169,6 +180,7 @@ message AddBlockRequestProto { repeated DatanodeInfoProto excludeNodes = 4; optional uint64 fileId = 5 [default = 0]; // default as a bogus id repeated string favoredNodes = 6; //the set of datanodes to use for the block + repeated AddBlockFlagProto flags = 7; // default to empty. } message AddBlockResponseProto { @@ -240,6 +252,7 @@ message Rename2RequestProto { required string src = 1; required string dst = 2; required bool overwriteDest = 3; + optional bool moveToTrash = 4; } message Rename2ResponseProto { // void response @@ -258,6 +271,7 @@ message MkdirsRequestProto { required string src = 1; required FsPermissionProto masked = 2; required bool createParent = 3; + optional FsPermissionProto unmasked = 4; } message MkdirsResponseProto { required bool result = 1; @@ -272,6 +286,18 @@ message GetListingResponseProto { optional DirectoryListingProto dirList = 1; } +message GetBatchedListingRequestProto { + repeated string paths = 1; + required bytes startAfter = 2; + required bool needLocation = 3; +} + +message GetBatchedListingResponseProto { + repeated BatchedDirectoryListingProto listings = 1; + required bool hasMore = 2; + required bytes startAfter = 3; +} + message GetSnapshottableDirListingRequestProto { // no input parameters } message GetSnapshottableDirListingResponseProto { @@ -287,6 +313,16 @@ message GetSnapshotDiffReportResponseProto { required SnapshotDiffReportProto diffReport = 1; } +message GetSnapshotDiffReportListingRequestProto { + required string snapshotRoot = 1; + required string fromSnapshot = 2; + required string toSnapshot = 3; + optional SnapshotDiffReportCursorProto cursor = 4; +} + +message GetSnapshotDiffReportListingResponseProto { + required SnapshotDiffReportListingProto diffReport = 1; +} message RenewLeaseRequestProto { required string clientName = 1; } @@ -317,11 +353,39 @@ message GetFsStatsResponseProto { optional uint64 pending_deletion_blocks = 9; } +message GetFsReplicatedBlockStatsRequestProto { // no input paramters +} + +message GetFsReplicatedBlockStatsResponseProto { + required uint64 low_redundancy = 1; + required uint64 corrupt_blocks = 2; + required uint64 missing_blocks = 3; + required uint64 missing_repl_one_blocks = 4; + required uint64 blocks_in_future = 5; + required uint64 pending_deletion_blocks = 6; + optional uint64 highest_prio_low_redundancy_blocks = 7; + +} + +message GetFsECBlockGroupStatsRequestProto { // no input paramters +} + +message GetFsECBlockGroupStatsResponseProto { + required uint64 low_redundancy = 1; + required uint64 corrupt_blocks = 2; + required uint64 missing_blocks = 3; + required uint64 blocks_in_future = 4; + required uint64 pending_deletion_blocks = 5; + optional uint64 highest_prio_low_redundancy_blocks = 6; +} + enum DatanodeReportTypeProto { // type of the datanode report ALL = 1; LIVE = 2; DEAD = 3; DECOMMISSIONING = 4; + ENTERING_MAINTENANCE = 5; + IN_MAINTENANCE = 6; } message GetDatanodeReportRequestProto { @@ -405,6 +469,13 @@ message FinalizeUpgradeRequestProto { // no parameters message FinalizeUpgradeResponseProto { // void response } +message UpgradeStatusRequestProto { // no parameters +} + +message UpgradeStatusResponseProto { + required bool upgradeFinalized = 1; +} + enum RollingUpgradeActionProto { QUERY = 1; START = 2; @@ -425,7 +496,6 @@ message RollingUpgradeInfoProto { message RollingUpgradeResponseProto { optional RollingUpgradeInfoProto rollingUpgradeInfo= 1; } - message ListCorruptFileBlocksRequestProto { required string path = 1; optional string cookie = 2; @@ -450,6 +520,15 @@ message GetFileInfoResponseProto { optional HdfsFileStatusProto fs = 1; } +message GetLocatedFileInfoRequestProto { + optional string src = 1; + optional bool needBlockToken = 2 [default = false]; +} + +message GetLocatedFileInfoResponseProto { + optional HdfsFileStatusProto fs = 1; +} + message IsFileClosedRequestProto { required string src = 1; } @@ -529,6 +608,7 @@ message CachePoolInfoProto { optional int32 mode = 4; optional int64 limit = 5; optional int64 maxRelativeExpiry = 6; + optional uint32 defaultReplication = 7 [default=1]; } message CachePoolStatsProto { @@ -741,6 +821,51 @@ message GetEditsFromTxidResponseProto { required EventsListProto eventsList = 1; } +enum OpenFilesTypeProto { + ALL_OPEN_FILES = 1; + BLOCKING_DECOMMISSION = 2; +} + +message ListOpenFilesRequestProto { + required int64 id = 1; + repeated OpenFilesTypeProto types = 2; + optional string path = 3; +} + +message OpenFilesBatchResponseProto { + required int64 id = 1; + required string path = 2; + required string clientName = 3; + required string clientMachine = 4; +} + +message ListOpenFilesResponseProto { + repeated OpenFilesBatchResponseProto entries = 1; + required bool hasMore = 2; + repeated OpenFilesTypeProto types = 3; +} + +message MsyncRequestProto { +} + +message MsyncResponseProto { +} + +message SatisfyStoragePolicyRequestProto { + required string src = 1; +} + +message SatisfyStoragePolicyResponseProto { + +} + +message HAServiceStateRequestProto { +} + +message HAServiceStateResponseProto { + required hadoop.common.HAServiceStateProto state = 1; +} + service ClientNamenodeProtocol { rpc getBlockLocations(GetBlockLocationsRequestProto) returns(GetBlockLocationsResponseProto); @@ -775,10 +900,15 @@ service ClientNamenodeProtocol { rpc delete(DeleteRequestProto) returns(DeleteResponseProto); rpc mkdirs(MkdirsRequestProto) returns(MkdirsResponseProto); rpc getListing(GetListingRequestProto) returns(GetListingResponseProto); + rpc getBatchedListing (GetBatchedListingRequestProto) returns (GetBatchedListingResponseProto); rpc renewLease(RenewLeaseRequestProto) returns(RenewLeaseResponseProto); rpc recoverLease(RecoverLeaseRequestProto) returns(RecoverLeaseResponseProto); rpc getFsStats(GetFsStatusRequestProto) returns(GetFsStatsResponseProto); + rpc getFsReplicatedBlockStats(GetFsReplicatedBlockStatsRequestProto) + returns (GetFsReplicatedBlockStatsResponseProto); + rpc getFsECBlockGroupStats(GetFsECBlockGroupStatsRequestProto) + returns (GetFsECBlockGroupStatsResponseProto); rpc getDatanodeReport(GetDatanodeReportRequestProto) returns(GetDatanodeReportResponseProto); rpc getDatanodeStorageReport(GetDatanodeStorageReportRequestProto) @@ -796,12 +926,16 @@ service ClientNamenodeProtocol { rpc refreshNodes(RefreshNodesRequestProto) returns(RefreshNodesResponseProto); rpc finalizeUpgrade(FinalizeUpgradeRequestProto) returns(FinalizeUpgradeResponseProto); + rpc upgradeStatus(UpgradeStatusRequestProto) + returns(UpgradeStatusResponseProto); rpc rollingUpgrade(RollingUpgradeRequestProto) returns(RollingUpgradeResponseProto); rpc listCorruptFileBlocks(ListCorruptFileBlocksRequestProto) returns(ListCorruptFileBlocksResponseProto); rpc metaSave(MetaSaveRequestProto) returns(MetaSaveResponseProto); rpc getFileInfo(GetFileInfoRequestProto) returns(GetFileInfoResponseProto); + rpc getLocatedFileInfo(GetLocatedFileInfoRequestProto) + returns(GetLocatedFileInfoResponseProto); rpc addCacheDirective(AddCacheDirectiveRequestProto) returns (AddCacheDirectiveResponseProto); rpc modifyCacheDirective(ModifyCacheDirectiveRequestProto) @@ -857,6 +991,8 @@ service ClientNamenodeProtocol { returns(DeleteSnapshotResponseProto); rpc getSnapshotDiffReport(GetSnapshotDiffReportRequestProto) returns(GetSnapshotDiffReportResponseProto); + rpc getSnapshotDiffReportListing(GetSnapshotDiffReportListingRequestProto) + returns(GetSnapshotDiffReportListingResponseProto); rpc isFileClosed(IsFileClosedRequestProto) returns(IsFileClosedResponseProto); rpc modifyAclEntries(ModifyAclEntriesRequestProto) @@ -885,18 +1021,44 @@ service ClientNamenodeProtocol { returns(CreateEncryptionZoneResponseProto); rpc listEncryptionZones(ListEncryptionZonesRequestProto) returns(ListEncryptionZonesResponseProto); + rpc reencryptEncryptionZone(ReencryptEncryptionZoneRequestProto) + returns(ReencryptEncryptionZoneResponseProto); + rpc listReencryptionStatus(ListReencryptionStatusRequestProto) + returns(ListReencryptionStatusResponseProto); rpc getEZForPath(GetEZForPathRequestProto) returns(GetEZForPathResponseProto); rpc setErasureCodingPolicy(SetErasureCodingPolicyRequestProto) returns(SetErasureCodingPolicyResponseProto); + rpc unsetErasureCodingPolicy(UnsetErasureCodingPolicyRequestProto) + returns(UnsetErasureCodingPolicyResponseProto); + rpc getECTopologyResultForPolicies(GetECTopologyResultForPoliciesRequestProto) + returns(GetECTopologyResultForPoliciesResponseProto); rpc getCurrentEditLogTxid(GetCurrentEditLogTxidRequestProto) returns(GetCurrentEditLogTxidResponseProto); rpc getEditsFromTxid(GetEditsFromTxidRequestProto) returns(GetEditsFromTxidResponseProto); rpc getErasureCodingPolicies(GetErasureCodingPoliciesRequestProto) returns(GetErasureCodingPoliciesResponseProto); + rpc addErasureCodingPolicies(AddErasureCodingPoliciesRequestProto) + returns(AddErasureCodingPoliciesResponseProto); + rpc removeErasureCodingPolicy(RemoveErasureCodingPolicyRequestProto) + returns(RemoveErasureCodingPolicyResponseProto); + rpc enableErasureCodingPolicy(EnableErasureCodingPolicyRequestProto) + returns(EnableErasureCodingPolicyResponseProto); + rpc disableErasureCodingPolicy(DisableErasureCodingPolicyRequestProto) + returns(DisableErasureCodingPolicyResponseProto); rpc getErasureCodingPolicy(GetErasureCodingPolicyRequestProto) returns(GetErasureCodingPolicyResponseProto); + rpc getErasureCodingCodecs(GetErasureCodingCodecsRequestProto) + returns(GetErasureCodingCodecsResponseProto); rpc getQuotaUsage(GetQuotaUsageRequestProto) returns(GetQuotaUsageResponseProto); + rpc listOpenFiles(ListOpenFilesRequestProto) + returns(ListOpenFilesResponseProto); + rpc msync(MsyncRequestProto) + returns(MsyncResponseProto); + rpc satisfyStoragePolicy(SatisfyStoragePolicyRequestProto) + returns(SatisfyStoragePolicyResponseProto); + rpc getHAServiceState(HAServiceStateRequestProto) + returns(HAServiceStateResponseProto); } diff --git a/internal/protocol/hadoop_hdfs/HAZKInfo.pb.go b/internal/protocol/hadoop_hdfs/HAZKInfo.pb.go new file mode 100644 index 00000000..78bbb3ae --- /dev/null +++ b/internal/protocol/hadoop_hdfs/HAZKInfo.pb.go @@ -0,0 +1,211 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: HAZKInfo.proto + +package hadoop_hdfs + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ActiveNodeInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NameserviceId *string `protobuf:"bytes,1,req,name=nameserviceId" json:"nameserviceId,omitempty"` + NamenodeId *string `protobuf:"bytes,2,req,name=namenodeId" json:"namenodeId,omitempty"` + Hostname *string `protobuf:"bytes,3,req,name=hostname" json:"hostname,omitempty"` + Port *int32 `protobuf:"varint,4,req,name=port" json:"port,omitempty"` + ZkfcPort *int32 `protobuf:"varint,5,req,name=zkfcPort" json:"zkfcPort,omitempty"` +} + +func (x *ActiveNodeInfo) Reset() { + *x = ActiveNodeInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_HAZKInfo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActiveNodeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActiveNodeInfo) ProtoMessage() {} + +func (x *ActiveNodeInfo) ProtoReflect() protoreflect.Message { + mi := &file_HAZKInfo_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActiveNodeInfo.ProtoReflect.Descriptor instead. +func (*ActiveNodeInfo) Descriptor() ([]byte, []int) { + return file_HAZKInfo_proto_rawDescGZIP(), []int{0} +} + +func (x *ActiveNodeInfo) GetNameserviceId() string { + if x != nil && x.NameserviceId != nil { + return *x.NameserviceId + } + return "" +} + +func (x *ActiveNodeInfo) GetNamenodeId() string { + if x != nil && x.NamenodeId != nil { + return *x.NamenodeId + } + return "" +} + +func (x *ActiveNodeInfo) GetHostname() string { + if x != nil && x.Hostname != nil { + return *x.Hostname + } + return "" +} + +func (x *ActiveNodeInfo) GetPort() int32 { + if x != nil && x.Port != nil { + return *x.Port + } + return 0 +} + +func (x *ActiveNodeInfo) GetZkfcPort() int32 { + if x != nil && x.ZkfcPort != nil { + return *x.ZkfcPort + } + return 0 +} + +var File_HAZKInfo_proto protoreflect.FileDescriptor + +var file_HAZKInfo_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x48, 0x41, 0x5a, 0x4b, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0b, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x22, 0xa2, 0x01, + 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, + 0x64, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, + 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x02, 0x28, 0x05, + 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x7a, 0x6b, 0x66, 0x63, 0x50, 0x6f, + 0x72, 0x74, 0x18, 0x05, 0x20, 0x02, 0x28, 0x05, 0x52, 0x08, 0x7a, 0x6b, 0x66, 0x63, 0x50, 0x6f, + 0x72, 0x74, 0x42, 0x7d, 0x0a, 0x2f, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x68, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x0e, 0x48, 0x41, 0x5a, 0x4b, 0x49, 0x6e, 0x66, 0x6f, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, + 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x68, 0x64, 0x66, + 0x73, +} + +var ( + file_HAZKInfo_proto_rawDescOnce sync.Once + file_HAZKInfo_proto_rawDescData = file_HAZKInfo_proto_rawDesc +) + +func file_HAZKInfo_proto_rawDescGZIP() []byte { + file_HAZKInfo_proto_rawDescOnce.Do(func() { + file_HAZKInfo_proto_rawDescData = protoimpl.X.CompressGZIP(file_HAZKInfo_proto_rawDescData) + }) + return file_HAZKInfo_proto_rawDescData +} + +var file_HAZKInfo_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_HAZKInfo_proto_goTypes = []interface{}{ + (*ActiveNodeInfo)(nil), // 0: hadoop.hdfs.ActiveNodeInfo +} +var file_HAZKInfo_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_HAZKInfo_proto_init() } +func file_HAZKInfo_proto_init() { + if File_HAZKInfo_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_HAZKInfo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActiveNodeInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_HAZKInfo_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_HAZKInfo_proto_goTypes, + DependencyIndexes: file_HAZKInfo_proto_depIdxs, + MessageInfos: file_HAZKInfo_proto_msgTypes, + }.Build() + File_HAZKInfo_proto = out.File + file_HAZKInfo_proto_rawDesc = nil + file_HAZKInfo_proto_goTypes = nil + file_HAZKInfo_proto_depIdxs = nil +} diff --git a/internal/protocol/hadoop_hdfs/HAZKInfo.proto b/internal/protocol/hadoop_hdfs/HAZKInfo.proto new file mode 100644 index 00000000..02de1a0c --- /dev/null +++ b/internal/protocol/hadoop_hdfs/HAZKInfo.proto @@ -0,0 +1,37 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * These .proto interfaces are private and stable. + * Please see http://wiki.apache.org/hadoop/Compatibility + * for what changes are allowed for a *stable* .proto interface. + */ +syntax = "proto2"; +option java_package = "org.apache.hadoop.hdfs.server.namenode.ha.proto"; +option java_outer_classname = "HAZKInfoProtos"; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; +package hadoop.hdfs; + +message ActiveNodeInfo { + required string nameserviceId = 1; + required string namenodeId = 2; + + required string hostname = 3; + required int32 port = 4; + required int32 zkfcPort = 5; +} diff --git a/internal/protocol/hadoop_hdfs/HdfsServer.pb.go b/internal/protocol/hadoop_hdfs/HdfsServer.pb.go new file mode 100644 index 00000000..77c96d2f --- /dev/null +++ b/internal/protocol/hadoop_hdfs/HdfsServer.pb.go @@ -0,0 +1,1883 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + +// This file contains protocol buffers that are used throughout HDFS -- i.e. +// by the client, server, and data transfer protocols. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: HdfsServer.proto + +package hadoop_hdfs + +import ( + _ "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +//* +// State of a block replica at a datanode +type ReplicaStateProto int32 + +const ( + ReplicaStateProto_FINALIZED ReplicaStateProto = 0 // State of a replica when it is not modified + ReplicaStateProto_RBW ReplicaStateProto = 1 // State of replica that is being written to + ReplicaStateProto_RWR ReplicaStateProto = 2 // State of replica that is waiting to be recovered + ReplicaStateProto_RUR ReplicaStateProto = 3 // State of replica that is under recovery + ReplicaStateProto_TEMPORARY ReplicaStateProto = 4 // State of replica that is created for replication +) + +// Enum value maps for ReplicaStateProto. +var ( + ReplicaStateProto_name = map[int32]string{ + 0: "FINALIZED", + 1: "RBW", + 2: "RWR", + 3: "RUR", + 4: "TEMPORARY", + } + ReplicaStateProto_value = map[string]int32{ + "FINALIZED": 0, + "RBW": 1, + "RWR": 2, + "RUR": 3, + "TEMPORARY": 4, + } +) + +func (x ReplicaStateProto) Enum() *ReplicaStateProto { + p := new(ReplicaStateProto) + *p = x + return p +} + +func (x ReplicaStateProto) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ReplicaStateProto) Descriptor() protoreflect.EnumDescriptor { + return file_HdfsServer_proto_enumTypes[0].Descriptor() +} + +func (ReplicaStateProto) Type() protoreflect.EnumType { + return &file_HdfsServer_proto_enumTypes[0] +} + +func (x ReplicaStateProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *ReplicaStateProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = ReplicaStateProto(num) + return nil +} + +// Deprecated: Use ReplicaStateProto.Descriptor instead. +func (ReplicaStateProto) EnumDescriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{0} +} + +type NamenodeCommandProto_Type int32 + +const ( + NamenodeCommandProto_NamenodeCommand NamenodeCommandProto_Type = 0 // Base command + NamenodeCommandProto_CheckPointCommand NamenodeCommandProto_Type = 1 // Check point command +) + +// Enum value maps for NamenodeCommandProto_Type. +var ( + NamenodeCommandProto_Type_name = map[int32]string{ + 0: "NamenodeCommand", + 1: "CheckPointCommand", + } + NamenodeCommandProto_Type_value = map[string]int32{ + "NamenodeCommand": 0, + "CheckPointCommand": 1, + } +) + +func (x NamenodeCommandProto_Type) Enum() *NamenodeCommandProto_Type { + p := new(NamenodeCommandProto_Type) + *p = x + return p +} + +func (x NamenodeCommandProto_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NamenodeCommandProto_Type) Descriptor() protoreflect.EnumDescriptor { + return file_HdfsServer_proto_enumTypes[1].Descriptor() +} + +func (NamenodeCommandProto_Type) Type() protoreflect.EnumType { + return &file_HdfsServer_proto_enumTypes[1] +} + +func (x NamenodeCommandProto_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *NamenodeCommandProto_Type) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = NamenodeCommandProto_Type(num) + return nil +} + +// Deprecated: Use NamenodeCommandProto_Type.Descriptor instead. +func (NamenodeCommandProto_Type) EnumDescriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{10, 0} +} + +type NamenodeRegistrationProto_NamenodeRoleProto int32 + +const ( + NamenodeRegistrationProto_NAMENODE NamenodeRegistrationProto_NamenodeRoleProto = 1 + NamenodeRegistrationProto_BACKUP NamenodeRegistrationProto_NamenodeRoleProto = 2 + NamenodeRegistrationProto_CHECKPOINT NamenodeRegistrationProto_NamenodeRoleProto = 3 +) + +// Enum value maps for NamenodeRegistrationProto_NamenodeRoleProto. +var ( + NamenodeRegistrationProto_NamenodeRoleProto_name = map[int32]string{ + 1: "NAMENODE", + 2: "BACKUP", + 3: "CHECKPOINT", + } + NamenodeRegistrationProto_NamenodeRoleProto_value = map[string]int32{ + "NAMENODE": 1, + "BACKUP": 2, + "CHECKPOINT": 3, + } +) + +func (x NamenodeRegistrationProto_NamenodeRoleProto) Enum() *NamenodeRegistrationProto_NamenodeRoleProto { + p := new(NamenodeRegistrationProto_NamenodeRoleProto) + *p = x + return p +} + +func (x NamenodeRegistrationProto_NamenodeRoleProto) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NamenodeRegistrationProto_NamenodeRoleProto) Descriptor() protoreflect.EnumDescriptor { + return file_HdfsServer_proto_enumTypes[2].Descriptor() +} + +func (NamenodeRegistrationProto_NamenodeRoleProto) Type() protoreflect.EnumType { + return &file_HdfsServer_proto_enumTypes[2] +} + +func (x NamenodeRegistrationProto_NamenodeRoleProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *NamenodeRegistrationProto_NamenodeRoleProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = NamenodeRegistrationProto_NamenodeRoleProto(num) + return nil +} + +// Deprecated: Use NamenodeRegistrationProto_NamenodeRoleProto.Descriptor instead. +func (NamenodeRegistrationProto_NamenodeRoleProto) EnumDescriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{14, 0} +} + +type NNHAStatusHeartbeatProto_State int32 + +const ( + NNHAStatusHeartbeatProto_ACTIVE NNHAStatusHeartbeatProto_State = 0 + NNHAStatusHeartbeatProto_STANDBY NNHAStatusHeartbeatProto_State = 1 + NNHAStatusHeartbeatProto_OBSERVER NNHAStatusHeartbeatProto_State = 2 +) + +// Enum value maps for NNHAStatusHeartbeatProto_State. +var ( + NNHAStatusHeartbeatProto_State_name = map[int32]string{ + 0: "ACTIVE", + 1: "STANDBY", + 2: "OBSERVER", + } + NNHAStatusHeartbeatProto_State_value = map[string]int32{ + "ACTIVE": 0, + "STANDBY": 1, + "OBSERVER": 2, + } +) + +func (x NNHAStatusHeartbeatProto_State) Enum() *NNHAStatusHeartbeatProto_State { + p := new(NNHAStatusHeartbeatProto_State) + *p = x + return p +} + +func (x NNHAStatusHeartbeatProto_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NNHAStatusHeartbeatProto_State) Descriptor() protoreflect.EnumDescriptor { + return file_HdfsServer_proto_enumTypes[3].Descriptor() +} + +func (NNHAStatusHeartbeatProto_State) Type() protoreflect.EnumType { + return &file_HdfsServer_proto_enumTypes[3] +} + +func (x NNHAStatusHeartbeatProto_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *NNHAStatusHeartbeatProto_State) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = NNHAStatusHeartbeatProto_State(num) + return nil +} + +// Deprecated: Use NNHAStatusHeartbeatProto_State.Descriptor instead. +func (NNHAStatusHeartbeatProto_State) EnumDescriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{15, 0} +} + +//* +// Block access token information +type BlockKeyProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyId *uint32 `protobuf:"varint,1,req,name=keyId" json:"keyId,omitempty"` // Key identifier + ExpiryDate *uint64 `protobuf:"varint,2,req,name=expiryDate" json:"expiryDate,omitempty"` // Expiry time in milliseconds + KeyBytes []byte `protobuf:"bytes,3,opt,name=keyBytes" json:"keyBytes,omitempty"` // Key secret +} + +func (x *BlockKeyProto) Reset() { + *x = BlockKeyProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockKeyProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockKeyProto) ProtoMessage() {} + +func (x *BlockKeyProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockKeyProto.ProtoReflect.Descriptor instead. +func (*BlockKeyProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{0} +} + +func (x *BlockKeyProto) GetKeyId() uint32 { + if x != nil && x.KeyId != nil { + return *x.KeyId + } + return 0 +} + +func (x *BlockKeyProto) GetExpiryDate() uint64 { + if x != nil && x.ExpiryDate != nil { + return *x.ExpiryDate + } + return 0 +} + +func (x *BlockKeyProto) GetKeyBytes() []byte { + if x != nil { + return x.KeyBytes + } + return nil +} + +//* +// Current key and set of block keys at the namenode. +type ExportedBlockKeysProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsBlockTokenEnabled *bool `protobuf:"varint,1,req,name=isBlockTokenEnabled" json:"isBlockTokenEnabled,omitempty"` + KeyUpdateInterval *uint64 `protobuf:"varint,2,req,name=keyUpdateInterval" json:"keyUpdateInterval,omitempty"` + TokenLifeTime *uint64 `protobuf:"varint,3,req,name=tokenLifeTime" json:"tokenLifeTime,omitempty"` + CurrentKey *BlockKeyProto `protobuf:"bytes,4,req,name=currentKey" json:"currentKey,omitempty"` + AllKeys []*BlockKeyProto `protobuf:"bytes,5,rep,name=allKeys" json:"allKeys,omitempty"` +} + +func (x *ExportedBlockKeysProto) Reset() { + *x = ExportedBlockKeysProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportedBlockKeysProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportedBlockKeysProto) ProtoMessage() {} + +func (x *ExportedBlockKeysProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportedBlockKeysProto.ProtoReflect.Descriptor instead. +func (*ExportedBlockKeysProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{1} +} + +func (x *ExportedBlockKeysProto) GetIsBlockTokenEnabled() bool { + if x != nil && x.IsBlockTokenEnabled != nil { + return *x.IsBlockTokenEnabled + } + return false +} + +func (x *ExportedBlockKeysProto) GetKeyUpdateInterval() uint64 { + if x != nil && x.KeyUpdateInterval != nil { + return *x.KeyUpdateInterval + } + return 0 +} + +func (x *ExportedBlockKeysProto) GetTokenLifeTime() uint64 { + if x != nil && x.TokenLifeTime != nil { + return *x.TokenLifeTime + } + return 0 +} + +func (x *ExportedBlockKeysProto) GetCurrentKey() *BlockKeyProto { + if x != nil { + return x.CurrentKey + } + return nil +} + +func (x *ExportedBlockKeysProto) GetAllKeys() []*BlockKeyProto { + if x != nil { + return x.AllKeys + } + return nil +} + +//* +// Block and datanodes where is it located +type BlockWithLocationsProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *BlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` // Block + DatanodeUuids []string `protobuf:"bytes,2,rep,name=datanodeUuids" json:"datanodeUuids,omitempty"` // Datanodes with replicas of the block + StorageUuids []string `protobuf:"bytes,3,rep,name=storageUuids" json:"storageUuids,omitempty"` // Storages with replicas of the block + StorageTypes []StorageTypeProto `protobuf:"varint,4,rep,name=storageTypes,enum=hadoop.hdfs.StorageTypeProto" json:"storageTypes,omitempty"` + Indices []byte `protobuf:"bytes,5,opt,name=indices" json:"indices,omitempty"` + DataBlockNum *uint32 `protobuf:"varint,6,opt,name=dataBlockNum" json:"dataBlockNum,omitempty"` + CellSize *uint32 `protobuf:"varint,7,opt,name=cellSize" json:"cellSize,omitempty"` +} + +func (x *BlockWithLocationsProto) Reset() { + *x = BlockWithLocationsProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockWithLocationsProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockWithLocationsProto) ProtoMessage() {} + +func (x *BlockWithLocationsProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockWithLocationsProto.ProtoReflect.Descriptor instead. +func (*BlockWithLocationsProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{2} +} + +func (x *BlockWithLocationsProto) GetBlock() *BlockProto { + if x != nil { + return x.Block + } + return nil +} + +func (x *BlockWithLocationsProto) GetDatanodeUuids() []string { + if x != nil { + return x.DatanodeUuids + } + return nil +} + +func (x *BlockWithLocationsProto) GetStorageUuids() []string { + if x != nil { + return x.StorageUuids + } + return nil +} + +func (x *BlockWithLocationsProto) GetStorageTypes() []StorageTypeProto { + if x != nil { + return x.StorageTypes + } + return nil +} + +func (x *BlockWithLocationsProto) GetIndices() []byte { + if x != nil { + return x.Indices + } + return nil +} + +func (x *BlockWithLocationsProto) GetDataBlockNum() uint32 { + if x != nil && x.DataBlockNum != nil { + return *x.DataBlockNum + } + return 0 +} + +func (x *BlockWithLocationsProto) GetCellSize() uint32 { + if x != nil && x.CellSize != nil { + return *x.CellSize + } + return 0 +} + +//* +// List of block with locations +type BlocksWithLocationsProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Blocks []*BlockWithLocationsProto `protobuf:"bytes,1,rep,name=blocks" json:"blocks,omitempty"` +} + +func (x *BlocksWithLocationsProto) Reset() { + *x = BlocksWithLocationsProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlocksWithLocationsProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlocksWithLocationsProto) ProtoMessage() {} + +func (x *BlocksWithLocationsProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlocksWithLocationsProto.ProtoReflect.Descriptor instead. +func (*BlocksWithLocationsProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{3} +} + +func (x *BlocksWithLocationsProto) GetBlocks() []*BlockWithLocationsProto { + if x != nil { + return x.Blocks + } + return nil +} + +//* +// Editlog information with available transactions +type RemoteEditLogProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StartTxId *uint64 `protobuf:"varint,1,req,name=startTxId" json:"startTxId,omitempty"` // Starting available edit log transaction + EndTxId *uint64 `protobuf:"varint,2,req,name=endTxId" json:"endTxId,omitempty"` // Ending available edit log transaction + IsInProgress *bool `protobuf:"varint,3,opt,name=isInProgress,def=0" json:"isInProgress,omitempty"` +} + +// Default values for RemoteEditLogProto fields. +const ( + Default_RemoteEditLogProto_IsInProgress = bool(false) +) + +func (x *RemoteEditLogProto) Reset() { + *x = RemoteEditLogProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoteEditLogProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoteEditLogProto) ProtoMessage() {} + +func (x *RemoteEditLogProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoteEditLogProto.ProtoReflect.Descriptor instead. +func (*RemoteEditLogProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{4} +} + +func (x *RemoteEditLogProto) GetStartTxId() uint64 { + if x != nil && x.StartTxId != nil { + return *x.StartTxId + } + return 0 +} + +func (x *RemoteEditLogProto) GetEndTxId() uint64 { + if x != nil && x.EndTxId != nil { + return *x.EndTxId + } + return 0 +} + +func (x *RemoteEditLogProto) GetIsInProgress() bool { + if x != nil && x.IsInProgress != nil { + return *x.IsInProgress + } + return Default_RemoteEditLogProto_IsInProgress +} + +//* +// Enumeration of editlogs available on a remote namenode +type RemoteEditLogManifestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Logs []*RemoteEditLogProto `protobuf:"bytes,1,rep,name=logs" json:"logs,omitempty"` + CommittedTxnId *uint64 `protobuf:"varint,2,opt,name=committedTxnId" json:"committedTxnId,omitempty"` +} + +func (x *RemoteEditLogManifestProto) Reset() { + *x = RemoteEditLogManifestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoteEditLogManifestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoteEditLogManifestProto) ProtoMessage() {} + +func (x *RemoteEditLogManifestProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoteEditLogManifestProto.ProtoReflect.Descriptor instead. +func (*RemoteEditLogManifestProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{5} +} + +func (x *RemoteEditLogManifestProto) GetLogs() []*RemoteEditLogProto { + if x != nil { + return x.Logs + } + return nil +} + +func (x *RemoteEditLogManifestProto) GetCommittedTxnId() uint64 { + if x != nil && x.CommittedTxnId != nil { + return *x.CommittedTxnId + } + return 0 +} + +//* +// Namespace information that describes namespace on a namenode +type NamespaceInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BuildVersion *string `protobuf:"bytes,1,req,name=buildVersion" json:"buildVersion,omitempty"` // Software revision version (e.g. an svn or git revision) + Unused *uint32 `protobuf:"varint,2,req,name=unused" json:"unused,omitempty"` // Retained for backward compatibility + BlockPoolID *string `protobuf:"bytes,3,req,name=blockPoolID" json:"blockPoolID,omitempty"` // block pool used by the namespace + StorageInfo *StorageInfoProto `protobuf:"bytes,4,req,name=storageInfo" json:"storageInfo,omitempty"` // Node information + SoftwareVersion *string `protobuf:"bytes,5,req,name=softwareVersion" json:"softwareVersion,omitempty"` // Software version number (e.g. 2.0.0) + Capabilities *uint64 `protobuf:"varint,6,opt,name=capabilities,def=0" json:"capabilities,omitempty"` // feature flags + State *NNHAStatusHeartbeatProto_State `protobuf:"varint,7,opt,name=state,enum=hadoop.hdfs.NNHAStatusHeartbeatProto_State" json:"state,omitempty"` +} + +// Default values for NamespaceInfoProto fields. +const ( + Default_NamespaceInfoProto_Capabilities = uint64(0) +) + +func (x *NamespaceInfoProto) Reset() { + *x = NamespaceInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamespaceInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamespaceInfoProto) ProtoMessage() {} + +func (x *NamespaceInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamespaceInfoProto.ProtoReflect.Descriptor instead. +func (*NamespaceInfoProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{6} +} + +func (x *NamespaceInfoProto) GetBuildVersion() string { + if x != nil && x.BuildVersion != nil { + return *x.BuildVersion + } + return "" +} + +func (x *NamespaceInfoProto) GetUnused() uint32 { + if x != nil && x.Unused != nil { + return *x.Unused + } + return 0 +} + +func (x *NamespaceInfoProto) GetBlockPoolID() string { + if x != nil && x.BlockPoolID != nil { + return *x.BlockPoolID + } + return "" +} + +func (x *NamespaceInfoProto) GetStorageInfo() *StorageInfoProto { + if x != nil { + return x.StorageInfo + } + return nil +} + +func (x *NamespaceInfoProto) GetSoftwareVersion() string { + if x != nil && x.SoftwareVersion != nil { + return *x.SoftwareVersion + } + return "" +} + +func (x *NamespaceInfoProto) GetCapabilities() uint64 { + if x != nil && x.Capabilities != nil { + return *x.Capabilities + } + return Default_NamespaceInfoProto_Capabilities +} + +func (x *NamespaceInfoProto) GetState() NNHAStatusHeartbeatProto_State { + if x != nil && x.State != nil { + return *x.State + } + return NNHAStatusHeartbeatProto_ACTIVE +} + +//* +// Block that needs to be recovered with at a given location +type RecoveringBlockProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NewGenStamp *uint64 `protobuf:"varint,1,req,name=newGenStamp" json:"newGenStamp,omitempty"` // New genstamp post recovery + Block *LocatedBlockProto `protobuf:"bytes,2,req,name=block" json:"block,omitempty"` // Block to be recovered + TruncateBlock *BlockProto `protobuf:"bytes,3,opt,name=truncateBlock" json:"truncateBlock,omitempty"` // New block for recovery (truncate) + EcPolicy *ErasureCodingPolicyProto `protobuf:"bytes,4,opt,name=ecPolicy" json:"ecPolicy,omitempty"` + // block indices of striped internal blocks for each storage in LocatedBlock + BlockIndices []byte `protobuf:"bytes,5,opt,name=blockIndices" json:"blockIndices,omitempty"` +} + +func (x *RecoveringBlockProto) Reset() { + *x = RecoveringBlockProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecoveringBlockProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecoveringBlockProto) ProtoMessage() {} + +func (x *RecoveringBlockProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecoveringBlockProto.ProtoReflect.Descriptor instead. +func (*RecoveringBlockProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{7} +} + +func (x *RecoveringBlockProto) GetNewGenStamp() uint64 { + if x != nil && x.NewGenStamp != nil { + return *x.NewGenStamp + } + return 0 +} + +func (x *RecoveringBlockProto) GetBlock() *LocatedBlockProto { + if x != nil { + return x.Block + } + return nil +} + +func (x *RecoveringBlockProto) GetTruncateBlock() *BlockProto { + if x != nil { + return x.TruncateBlock + } + return nil +} + +func (x *RecoveringBlockProto) GetEcPolicy() *ErasureCodingPolicyProto { + if x != nil { + return x.EcPolicy + } + return nil +} + +func (x *RecoveringBlockProto) GetBlockIndices() []byte { + if x != nil { + return x.BlockIndices + } + return nil +} + +//* +// Unique signature to identify checkpoint transactions. +type CheckpointSignatureProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockPoolId *string `protobuf:"bytes,1,req,name=blockPoolId" json:"blockPoolId,omitempty"` + MostRecentCheckpointTxId *uint64 `protobuf:"varint,2,req,name=mostRecentCheckpointTxId" json:"mostRecentCheckpointTxId,omitempty"` + CurSegmentTxId *uint64 `protobuf:"varint,3,req,name=curSegmentTxId" json:"curSegmentTxId,omitempty"` + StorageInfo *StorageInfoProto `protobuf:"bytes,4,req,name=storageInfo" json:"storageInfo,omitempty"` +} + +func (x *CheckpointSignatureProto) Reset() { + *x = CheckpointSignatureProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckpointSignatureProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckpointSignatureProto) ProtoMessage() {} + +func (x *CheckpointSignatureProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckpointSignatureProto.ProtoReflect.Descriptor instead. +func (*CheckpointSignatureProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{8} +} + +func (x *CheckpointSignatureProto) GetBlockPoolId() string { + if x != nil && x.BlockPoolId != nil { + return *x.BlockPoolId + } + return "" +} + +func (x *CheckpointSignatureProto) GetMostRecentCheckpointTxId() uint64 { + if x != nil && x.MostRecentCheckpointTxId != nil { + return *x.MostRecentCheckpointTxId + } + return 0 +} + +func (x *CheckpointSignatureProto) GetCurSegmentTxId() uint64 { + if x != nil && x.CurSegmentTxId != nil { + return *x.CurSegmentTxId + } + return 0 +} + +func (x *CheckpointSignatureProto) GetStorageInfo() *StorageInfoProto { + if x != nil { + return x.StorageInfo + } + return nil +} + +//* +// Command returned from primary to checkpointing namenode. +// This command has checkpoint signature that identifies +// checkpoint transaction and is needed for further +// communication related to checkpointing. +type CheckpointCommandProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique signature to identify checkpoint transation + Signature *CheckpointSignatureProto `protobuf:"bytes,1,req,name=signature" json:"signature,omitempty"` + // If true, return transfer image to primary upon the completion of checkpoint + NeedToReturnImage *bool `protobuf:"varint,2,req,name=needToReturnImage" json:"needToReturnImage,omitempty"` +} + +func (x *CheckpointCommandProto) Reset() { + *x = CheckpointCommandProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckpointCommandProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckpointCommandProto) ProtoMessage() {} + +func (x *CheckpointCommandProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckpointCommandProto.ProtoReflect.Descriptor instead. +func (*CheckpointCommandProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{9} +} + +func (x *CheckpointCommandProto) GetSignature() *CheckpointSignatureProto { + if x != nil { + return x.Signature + } + return nil +} + +func (x *CheckpointCommandProto) GetNeedToReturnImage() bool { + if x != nil && x.NeedToReturnImage != nil { + return *x.NeedToReturnImage + } + return false +} + +//* +// Command sent from one namenode to another namenode. +type NamenodeCommandProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Action *uint32 `protobuf:"varint,1,req,name=action" json:"action,omitempty"` + Type *NamenodeCommandProto_Type `protobuf:"varint,2,req,name=type,enum=hadoop.hdfs.NamenodeCommandProto_Type" json:"type,omitempty"` + CheckpointCmd *CheckpointCommandProto `protobuf:"bytes,3,opt,name=checkpointCmd" json:"checkpointCmd,omitempty"` +} + +func (x *NamenodeCommandProto) Reset() { + *x = NamenodeCommandProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamenodeCommandProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamenodeCommandProto) ProtoMessage() {} + +func (x *NamenodeCommandProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamenodeCommandProto.ProtoReflect.Descriptor instead. +func (*NamenodeCommandProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{10} +} + +func (x *NamenodeCommandProto) GetAction() uint32 { + if x != nil && x.Action != nil { + return *x.Action + } + return 0 +} + +func (x *NamenodeCommandProto) GetType() NamenodeCommandProto_Type { + if x != nil && x.Type != nil { + return *x.Type + } + return NamenodeCommandProto_NamenodeCommand +} + +func (x *NamenodeCommandProto) GetCheckpointCmd() *CheckpointCommandProto { + if x != nil { + return x.CheckpointCmd + } + return nil +} + +//* +// void request +type VersionRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *VersionRequestProto) Reset() { + *x = VersionRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VersionRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VersionRequestProto) ProtoMessage() {} + +func (x *VersionRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VersionRequestProto.ProtoReflect.Descriptor instead. +func (*VersionRequestProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{11} +} + +//* +// Version response from namenode. +type VersionResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *NamespaceInfoProto `protobuf:"bytes,1,req,name=info" json:"info,omitempty"` +} + +func (x *VersionResponseProto) Reset() { + *x = VersionResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VersionResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VersionResponseProto) ProtoMessage() {} + +func (x *VersionResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VersionResponseProto.ProtoReflect.Descriptor instead. +func (*VersionResponseProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{12} +} + +func (x *VersionResponseProto) GetInfo() *NamespaceInfoProto { + if x != nil { + return x.Info + } + return nil +} + +//* +// Common node information shared by all the nodes in the cluster +type StorageInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LayoutVersion *uint32 `protobuf:"varint,1,req,name=layoutVersion" json:"layoutVersion,omitempty"` // Layout version of the file system + NamespceID *uint32 `protobuf:"varint,2,req,name=namespceID" json:"namespceID,omitempty"` // File system namespace ID + ClusterID *string `protobuf:"bytes,3,req,name=clusterID" json:"clusterID,omitempty"` // ID of the cluster + CTime *uint64 `protobuf:"varint,4,req,name=cTime" json:"cTime,omitempty"` // File system creation time +} + +func (x *StorageInfoProto) Reset() { + *x = StorageInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageInfoProto) ProtoMessage() {} + +func (x *StorageInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StorageInfoProto.ProtoReflect.Descriptor instead. +func (*StorageInfoProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{13} +} + +func (x *StorageInfoProto) GetLayoutVersion() uint32 { + if x != nil && x.LayoutVersion != nil { + return *x.LayoutVersion + } + return 0 +} + +func (x *StorageInfoProto) GetNamespceID() uint32 { + if x != nil && x.NamespceID != nil { + return *x.NamespceID + } + return 0 +} + +func (x *StorageInfoProto) GetClusterID() string { + if x != nil && x.ClusterID != nil { + return *x.ClusterID + } + return "" +} + +func (x *StorageInfoProto) GetCTime() uint64 { + if x != nil && x.CTime != nil { + return *x.CTime + } + return 0 +} + +//* +// Information sent by a namenode to identify itself to the primary namenode. +type NamenodeRegistrationProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RpcAddress *string `protobuf:"bytes,1,req,name=rpcAddress" json:"rpcAddress,omitempty"` // host:port of the namenode RPC address + HttpAddress *string `protobuf:"bytes,2,req,name=httpAddress" json:"httpAddress,omitempty"` // host:port of the namenode http server + StorageInfo *StorageInfoProto `protobuf:"bytes,3,req,name=storageInfo" json:"storageInfo,omitempty"` // Node information + Role *NamenodeRegistrationProto_NamenodeRoleProto `protobuf:"varint,4,opt,name=role,enum=hadoop.hdfs.NamenodeRegistrationProto_NamenodeRoleProto,def=1" json:"role,omitempty"` // Namenode role +} + +// Default values for NamenodeRegistrationProto fields. +const ( + Default_NamenodeRegistrationProto_Role = NamenodeRegistrationProto_NAMENODE +) + +func (x *NamenodeRegistrationProto) Reset() { + *x = NamenodeRegistrationProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamenodeRegistrationProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamenodeRegistrationProto) ProtoMessage() {} + +func (x *NamenodeRegistrationProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamenodeRegistrationProto.ProtoReflect.Descriptor instead. +func (*NamenodeRegistrationProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{14} +} + +func (x *NamenodeRegistrationProto) GetRpcAddress() string { + if x != nil && x.RpcAddress != nil { + return *x.RpcAddress + } + return "" +} + +func (x *NamenodeRegistrationProto) GetHttpAddress() string { + if x != nil && x.HttpAddress != nil { + return *x.HttpAddress + } + return "" +} + +func (x *NamenodeRegistrationProto) GetStorageInfo() *StorageInfoProto { + if x != nil { + return x.StorageInfo + } + return nil +} + +func (x *NamenodeRegistrationProto) GetRole() NamenodeRegistrationProto_NamenodeRoleProto { + if x != nil && x.Role != nil { + return *x.Role + } + return Default_NamenodeRegistrationProto_Role +} + +//* +// state - State the NN is in when returning response to the DN +// txid - Highest transaction ID this NN has seen +type NNHAStatusHeartbeatProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State *NNHAStatusHeartbeatProto_State `protobuf:"varint,1,req,name=state,enum=hadoop.hdfs.NNHAStatusHeartbeatProto_State" json:"state,omitempty"` + Txid *uint64 `protobuf:"varint,2,req,name=txid" json:"txid,omitempty"` +} + +func (x *NNHAStatusHeartbeatProto) Reset() { + *x = NNHAStatusHeartbeatProto{} + if protoimpl.UnsafeEnabled { + mi := &file_HdfsServer_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NNHAStatusHeartbeatProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NNHAStatusHeartbeatProto) ProtoMessage() {} + +func (x *NNHAStatusHeartbeatProto) ProtoReflect() protoreflect.Message { + mi := &file_HdfsServer_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NNHAStatusHeartbeatProto.ProtoReflect.Descriptor instead. +func (*NNHAStatusHeartbeatProto) Descriptor() ([]byte, []int) { + return file_HdfsServer_proto_rawDescGZIP(), []int{15} +} + +func (x *NNHAStatusHeartbeatProto) GetState() NNHAStatusHeartbeatProto_State { + if x != nil && x.State != nil { + return *x.State + } + return NNHAStatusHeartbeatProto_ACTIVE +} + +func (x *NNHAStatusHeartbeatProto) GetTxid() uint64 { + if x != nil && x.Txid != nil { + return *x.Txid + } + return 0 +} + +var File_HdfsServer_proto protoreflect.FileDescriptor + +var file_HdfsServer_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x48, 0x64, 0x66, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0b, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x1a, + 0x0a, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x48, 0x41, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x61, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4b, 0x65, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x79, 0x44, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, + 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6b, + 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x90, 0x02, 0x0a, 0x16, 0x45, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x30, 0x0a, 0x13, 0x69, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, + 0x13, 0x69, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, + 0x11, 0x6b, 0x65, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x4c, 0x69, 0x66, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x4b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x07, 0x61, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xaf, 0x02, 0x0a, 0x17, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, + 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x12, + 0x41, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x58, 0x0a, 0x18, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x57, 0x69, 0x74, 0x68, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3c, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x77, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x45, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x78, 0x49, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x78, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, + 0x64, 0x54, 0x78, 0x49, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x65, 0x6e, 0x64, + 0x54, 0x78, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x0c, 0x69, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, + 0x65, 0x52, 0x0c, 0x69, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, + 0x79, 0x0a, 0x1a, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x45, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, + 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x0a, + 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x45, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x6c, 0x6f, + 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x54, + 0x78, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x64, 0x54, 0x78, 0x6e, 0x49, 0x64, 0x22, 0xc7, 0x02, 0x0a, 0x12, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x12, 0x20, 0x0a, + 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x44, 0x18, 0x03, 0x20, 0x02, + 0x28, 0x09, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x44, 0x12, + 0x3f, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x04, + 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x6f, 0x66, 0x74, 0x77, + 0x61, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0c, 0x63, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, + 0x3a, 0x01, 0x30, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4e, + 0x4e, 0x48, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, + 0x61, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x22, 0x94, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x0a, + 0x0b, 0x6e, 0x65, 0x77, 0x47, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x47, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x0d, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, + 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0d, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x41, 0x0a, 0x08, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, + 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0xe1, 0x01, 0x0a, 0x18, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x6d, 0x6f, + 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x54, 0x78, 0x49, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x18, 0x6d, 0x6f, + 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x54, 0x78, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x78, 0x49, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0e, + 0x63, 0x75, 0x72, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x78, 0x49, 0x64, 0x12, 0x3f, + 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, + 0x02, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, + 0x8b, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x43, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, + 0x2c, 0x0a, 0x11, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x6f, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x11, 0x6e, 0x65, 0x65, 0x64, + 0x54, 0x6f, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, 0xe9, 0x01, + 0x0a, 0x14, 0x4e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x6e, + 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x43, 0x6d, 0x64, 0x22, 0x32, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, + 0x0f, 0x4e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x10, 0x01, 0x22, 0x15, 0x0a, 0x13, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x4b, 0x0a, 0x14, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x8c, 0x01, + 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x24, 0x0a, 0x0d, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0d, 0x6c, 0x61, 0x79, 0x6f, 0x75, + 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x63, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0a, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x63, 0x65, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xb5, 0x02, 0x0a, + 0x19, 0x4e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x70, + 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, + 0x72, 0x70, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x68, 0x74, + 0x74, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x0b, 0x68, 0x74, 0x74, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3f, 0x0a, 0x0b, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x02, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x56, 0x0a, + 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x6f, 0x6c, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x08, 0x4e, 0x41, 0x4d, 0x45, 0x4e, 0x4f, 0x44, 0x45, 0x52, + 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x3d, 0x0a, 0x11, 0x4e, 0x61, 0x6d, 0x65, 0x6e, 0x6f, 0x64, + 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x41, + 0x4d, 0x45, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x41, 0x43, 0x4b, + 0x55, 0x50, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x50, 0x4f, 0x49, + 0x4e, 0x54, 0x10, 0x03, 0x22, 0xa1, 0x01, 0x0a, 0x18, 0x4e, 0x4e, 0x48, 0x41, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, + 0x32, 0x2b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4e, + 0x4e, 0x48, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, + 0x61, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x04, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x22, 0x2e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x42, 0x59, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x42, + 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x4c, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x0a, + 0x09, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, + 0x52, 0x42, 0x57, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x57, 0x52, 0x10, 0x02, 0x12, 0x07, + 0x0a, 0x03, 0x52, 0x55, 0x52, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x45, 0x4d, 0x50, 0x4f, + 0x52, 0x41, 0x52, 0x59, 0x10, 0x04, 0x42, 0x78, 0x0a, 0x25, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, + 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, + 0x10, 0x48, 0x64, 0x66, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x68, 0x64, 0x66, 0x73, 0xa0, 0x01, 0x01, +} + +var ( + file_HdfsServer_proto_rawDescOnce sync.Once + file_HdfsServer_proto_rawDescData = file_HdfsServer_proto_rawDesc +) + +func file_HdfsServer_proto_rawDescGZIP() []byte { + file_HdfsServer_proto_rawDescOnce.Do(func() { + file_HdfsServer_proto_rawDescData = protoimpl.X.CompressGZIP(file_HdfsServer_proto_rawDescData) + }) + return file_HdfsServer_proto_rawDescData +} + +var file_HdfsServer_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_HdfsServer_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_HdfsServer_proto_goTypes = []interface{}{ + (ReplicaStateProto)(0), // 0: hadoop.hdfs.ReplicaStateProto + (NamenodeCommandProto_Type)(0), // 1: hadoop.hdfs.NamenodeCommandProto.Type + (NamenodeRegistrationProto_NamenodeRoleProto)(0), // 2: hadoop.hdfs.NamenodeRegistrationProto.NamenodeRoleProto + (NNHAStatusHeartbeatProto_State)(0), // 3: hadoop.hdfs.NNHAStatusHeartbeatProto.State + (*BlockKeyProto)(nil), // 4: hadoop.hdfs.BlockKeyProto + (*ExportedBlockKeysProto)(nil), // 5: hadoop.hdfs.ExportedBlockKeysProto + (*BlockWithLocationsProto)(nil), // 6: hadoop.hdfs.BlockWithLocationsProto + (*BlocksWithLocationsProto)(nil), // 7: hadoop.hdfs.BlocksWithLocationsProto + (*RemoteEditLogProto)(nil), // 8: hadoop.hdfs.RemoteEditLogProto + (*RemoteEditLogManifestProto)(nil), // 9: hadoop.hdfs.RemoteEditLogManifestProto + (*NamespaceInfoProto)(nil), // 10: hadoop.hdfs.NamespaceInfoProto + (*RecoveringBlockProto)(nil), // 11: hadoop.hdfs.RecoveringBlockProto + (*CheckpointSignatureProto)(nil), // 12: hadoop.hdfs.CheckpointSignatureProto + (*CheckpointCommandProto)(nil), // 13: hadoop.hdfs.CheckpointCommandProto + (*NamenodeCommandProto)(nil), // 14: hadoop.hdfs.NamenodeCommandProto + (*VersionRequestProto)(nil), // 15: hadoop.hdfs.VersionRequestProto + (*VersionResponseProto)(nil), // 16: hadoop.hdfs.VersionResponseProto + (*StorageInfoProto)(nil), // 17: hadoop.hdfs.StorageInfoProto + (*NamenodeRegistrationProto)(nil), // 18: hadoop.hdfs.NamenodeRegistrationProto + (*NNHAStatusHeartbeatProto)(nil), // 19: hadoop.hdfs.NNHAStatusHeartbeatProto + (*BlockProto)(nil), // 20: hadoop.hdfs.BlockProto + (StorageTypeProto)(0), // 21: hadoop.hdfs.StorageTypeProto + (*LocatedBlockProto)(nil), // 22: hadoop.hdfs.LocatedBlockProto + (*ErasureCodingPolicyProto)(nil), // 23: hadoop.hdfs.ErasureCodingPolicyProto +} +var file_HdfsServer_proto_depIdxs = []int32{ + 4, // 0: hadoop.hdfs.ExportedBlockKeysProto.currentKey:type_name -> hadoop.hdfs.BlockKeyProto + 4, // 1: hadoop.hdfs.ExportedBlockKeysProto.allKeys:type_name -> hadoop.hdfs.BlockKeyProto + 20, // 2: hadoop.hdfs.BlockWithLocationsProto.block:type_name -> hadoop.hdfs.BlockProto + 21, // 3: hadoop.hdfs.BlockWithLocationsProto.storageTypes:type_name -> hadoop.hdfs.StorageTypeProto + 6, // 4: hadoop.hdfs.BlocksWithLocationsProto.blocks:type_name -> hadoop.hdfs.BlockWithLocationsProto + 8, // 5: hadoop.hdfs.RemoteEditLogManifestProto.logs:type_name -> hadoop.hdfs.RemoteEditLogProto + 17, // 6: hadoop.hdfs.NamespaceInfoProto.storageInfo:type_name -> hadoop.hdfs.StorageInfoProto + 3, // 7: hadoop.hdfs.NamespaceInfoProto.state:type_name -> hadoop.hdfs.NNHAStatusHeartbeatProto.State + 22, // 8: hadoop.hdfs.RecoveringBlockProto.block:type_name -> hadoop.hdfs.LocatedBlockProto + 20, // 9: hadoop.hdfs.RecoveringBlockProto.truncateBlock:type_name -> hadoop.hdfs.BlockProto + 23, // 10: hadoop.hdfs.RecoveringBlockProto.ecPolicy:type_name -> hadoop.hdfs.ErasureCodingPolicyProto + 17, // 11: hadoop.hdfs.CheckpointSignatureProto.storageInfo:type_name -> hadoop.hdfs.StorageInfoProto + 12, // 12: hadoop.hdfs.CheckpointCommandProto.signature:type_name -> hadoop.hdfs.CheckpointSignatureProto + 1, // 13: hadoop.hdfs.NamenodeCommandProto.type:type_name -> hadoop.hdfs.NamenodeCommandProto.Type + 13, // 14: hadoop.hdfs.NamenodeCommandProto.checkpointCmd:type_name -> hadoop.hdfs.CheckpointCommandProto + 10, // 15: hadoop.hdfs.VersionResponseProto.info:type_name -> hadoop.hdfs.NamespaceInfoProto + 17, // 16: hadoop.hdfs.NamenodeRegistrationProto.storageInfo:type_name -> hadoop.hdfs.StorageInfoProto + 2, // 17: hadoop.hdfs.NamenodeRegistrationProto.role:type_name -> hadoop.hdfs.NamenodeRegistrationProto.NamenodeRoleProto + 3, // 18: hadoop.hdfs.NNHAStatusHeartbeatProto.state:type_name -> hadoop.hdfs.NNHAStatusHeartbeatProto.State + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_HdfsServer_proto_init() } +func file_HdfsServer_proto_init() { + if File_HdfsServer_proto != nil { + return + } + file_hdfs_proto_init() + if !protoimpl.UnsafeEnabled { + file_HdfsServer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockKeyProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportedBlockKeysProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockWithLocationsProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlocksWithLocationsProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoteEditLogProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoteEditLogManifestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamespaceInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecoveringBlockProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckpointSignatureProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckpointCommandProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamenodeCommandProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VersionRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VersionResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamenodeRegistrationProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_HdfsServer_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NNHAStatusHeartbeatProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_HdfsServer_proto_rawDesc, + NumEnums: 4, + NumMessages: 16, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_HdfsServer_proto_goTypes, + DependencyIndexes: file_HdfsServer_proto_depIdxs, + EnumInfos: file_HdfsServer_proto_enumTypes, + MessageInfos: file_HdfsServer_proto_msgTypes, + }.Build() + File_HdfsServer_proto = out.File + file_HdfsServer_proto_rawDesc = nil + file_HdfsServer_proto_goTypes = nil + file_HdfsServer_proto_depIdxs = nil +} diff --git a/internal/protocol/hadoop_hdfs/HdfsServer.proto b/internal/protocol/hadoop_hdfs/HdfsServer.proto new file mode 100644 index 00000000..a0c481a9 --- /dev/null +++ b/internal/protocol/hadoop_hdfs/HdfsServer.proto @@ -0,0 +1,220 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * These .proto interfaces are private and stable. + * Please see http://wiki.apache.org/hadoop/Compatibility + * for what changes are allowed for a *stable* .proto interface. + */ + +// This file contains protocol buffers that are used throughout HDFS -- i.e. +// by the client, server, and data transfer protocols. +syntax = "proto2"; + +option java_package = "org.apache.hadoop.hdfs.protocol.proto"; +option java_outer_classname = "HdfsServerProtos"; +option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; +package hadoop.hdfs; + +import "hdfs.proto"; +import "HAServiceProtocol.proto"; + +/** + * Block access token information + */ +message BlockKeyProto { + required uint32 keyId = 1; // Key identifier + required uint64 expiryDate = 2; // Expiry time in milliseconds + optional bytes keyBytes = 3; // Key secret +} + +/** + * Current key and set of block keys at the namenode. + */ +message ExportedBlockKeysProto { + required bool isBlockTokenEnabled = 1; + required uint64 keyUpdateInterval = 2; + required uint64 tokenLifeTime = 3; + required BlockKeyProto currentKey = 4; + repeated BlockKeyProto allKeys = 5; +} + +/** + * Block and datanodes where is it located + */ +message BlockWithLocationsProto { + required BlockProto block = 1; // Block + repeated string datanodeUuids = 2; // Datanodes with replicas of the block + repeated string storageUuids = 3; // Storages with replicas of the block + repeated StorageTypeProto storageTypes = 4; + + optional bytes indices = 5; + optional uint32 dataBlockNum = 6; + optional uint32 cellSize = 7; +} + +/** + * List of block with locations + */ +message BlocksWithLocationsProto { + repeated BlockWithLocationsProto blocks = 1; +} + +/** + * Editlog information with available transactions + */ +message RemoteEditLogProto { + required uint64 startTxId = 1; // Starting available edit log transaction + required uint64 endTxId = 2; // Ending available edit log transaction + optional bool isInProgress = 3 [default = false]; +} + +/** + * Enumeration of editlogs available on a remote namenode + */ +message RemoteEditLogManifestProto { + repeated RemoteEditLogProto logs = 1; + optional uint64 committedTxnId = 2; +} + +/** + * Namespace information that describes namespace on a namenode + */ +message NamespaceInfoProto { + required string buildVersion = 1; // Software revision version (e.g. an svn or git revision) + required uint32 unused = 2; // Retained for backward compatibility + required string blockPoolID = 3; // block pool used by the namespace + required StorageInfoProto storageInfo = 4;// Node information + required string softwareVersion = 5; // Software version number (e.g. 2.0.0) + optional uint64 capabilities = 6 [default = 0]; // feature flags + optional NNHAStatusHeartbeatProto.State state = 7; +} + +/** + * State of a block replica at a datanode + */ +enum ReplicaStateProto { + FINALIZED = 0; // State of a replica when it is not modified + RBW = 1; // State of replica that is being written to + RWR = 2; // State of replica that is waiting to be recovered + RUR = 3; // State of replica that is under recovery + TEMPORARY = 4; // State of replica that is created for replication +} + +/** + * Block that needs to be recovered with at a given location + */ +message RecoveringBlockProto { + required uint64 newGenStamp = 1; // New genstamp post recovery + required LocatedBlockProto block = 2; // Block to be recovered + optional BlockProto truncateBlock = 3; // New block for recovery (truncate) + + optional ErasureCodingPolicyProto ecPolicy = 4; + // block indices of striped internal blocks for each storage in LocatedBlock + optional bytes blockIndices = 5; +} + +/** + * Unique signature to identify checkpoint transactions. + */ +message CheckpointSignatureProto { + required string blockPoolId = 1; + required uint64 mostRecentCheckpointTxId = 2; + required uint64 curSegmentTxId = 3; + required StorageInfoProto storageInfo = 4; +} + +/** + * Command returned from primary to checkpointing namenode. + * This command has checkpoint signature that identifies + * checkpoint transaction and is needed for further + * communication related to checkpointing. + */ +message CheckpointCommandProto { + // Unique signature to identify checkpoint transation + required CheckpointSignatureProto signature = 1; + + // If true, return transfer image to primary upon the completion of checkpoint + required bool needToReturnImage = 2; +} + +/** + * Command sent from one namenode to another namenode. + */ +message NamenodeCommandProto { + enum Type { + NamenodeCommand = 0; // Base command + CheckPointCommand = 1; // Check point command + } + required uint32 action = 1; + required Type type = 2; + optional CheckpointCommandProto checkpointCmd = 3; +} + +/** + * void request + */ +message VersionRequestProto { +} + +/** + * Version response from namenode. + */ +message VersionResponseProto { + required NamespaceInfoProto info = 1; +} + +/** + * Common node information shared by all the nodes in the cluster + */ +message StorageInfoProto { + required uint32 layoutVersion = 1; // Layout version of the file system + required uint32 namespceID = 2; // File system namespace ID + required string clusterID = 3; // ID of the cluster + required uint64 cTime = 4; // File system creation time +} + +/** + * Information sent by a namenode to identify itself to the primary namenode. + */ +message NamenodeRegistrationProto { + required string rpcAddress = 1; // host:port of the namenode RPC address + required string httpAddress = 2; // host:port of the namenode http server + enum NamenodeRoleProto { + NAMENODE = 1; + BACKUP = 2; + CHECKPOINT = 3; + } + required StorageInfoProto storageInfo = 3; // Node information + optional NamenodeRoleProto role = 4 [default = NAMENODE]; // Namenode role +} + +/** + * state - State the NN is in when returning response to the DN + * txid - Highest transaction ID this NN has seen + */ +message NNHAStatusHeartbeatProto { + enum State { + ACTIVE = 0; + STANDBY = 1; + OBSERVER = 2; + } + required State state = 1; + required uint64 txid = 2; +} diff --git a/internal/protocol/hadoop_hdfs/InterDatanodeProtocol.pb.go b/internal/protocol/hadoop_hdfs/InterDatanodeProtocol.pb.go new file mode 100644 index 00000000..6cfb95de --- /dev/null +++ b/internal/protocol/hadoop_hdfs/InterDatanodeProtocol.pb.go @@ -0,0 +1,476 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + +// This file contains protocol buffers that are used throughout HDFS -- i.e. +// by the client, server, and data transfer protocols. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: InterDatanodeProtocol.proto + +package hadoop_hdfs + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +//* +// Block with location information and new generation stamp +// to be used for recovery. +type InitReplicaRecoveryRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *RecoveringBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` +} + +func (x *InitReplicaRecoveryRequestProto) Reset() { + *x = InitReplicaRecoveryRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_InterDatanodeProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitReplicaRecoveryRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitReplicaRecoveryRequestProto) ProtoMessage() {} + +func (x *InitReplicaRecoveryRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_InterDatanodeProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InitReplicaRecoveryRequestProto.ProtoReflect.Descriptor instead. +func (*InitReplicaRecoveryRequestProto) Descriptor() ([]byte, []int) { + return file_InterDatanodeProtocol_proto_rawDescGZIP(), []int{0} +} + +func (x *InitReplicaRecoveryRequestProto) GetBlock() *RecoveringBlockProto { + if x != nil { + return x.Block + } + return nil +} + +//* +// Repica recovery information +type InitReplicaRecoveryResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReplicaFound *bool `protobuf:"varint,1,req,name=replicaFound" json:"replicaFound,omitempty"` + // The following entries are not set if there was no replica found. + State *ReplicaStateProto `protobuf:"varint,2,opt,name=state,enum=hadoop.hdfs.ReplicaStateProto" json:"state,omitempty"` // State of the replica + Block *BlockProto `protobuf:"bytes,3,opt,name=block" json:"block,omitempty"` // block information +} + +func (x *InitReplicaRecoveryResponseProto) Reset() { + *x = InitReplicaRecoveryResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_InterDatanodeProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitReplicaRecoveryResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitReplicaRecoveryResponseProto) ProtoMessage() {} + +func (x *InitReplicaRecoveryResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_InterDatanodeProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InitReplicaRecoveryResponseProto.ProtoReflect.Descriptor instead. +func (*InitReplicaRecoveryResponseProto) Descriptor() ([]byte, []int) { + return file_InterDatanodeProtocol_proto_rawDescGZIP(), []int{1} +} + +func (x *InitReplicaRecoveryResponseProto) GetReplicaFound() bool { + if x != nil && x.ReplicaFound != nil { + return *x.ReplicaFound + } + return false +} + +func (x *InitReplicaRecoveryResponseProto) GetState() ReplicaStateProto { + if x != nil && x.State != nil { + return *x.State + } + return ReplicaStateProto_FINALIZED +} + +func (x *InitReplicaRecoveryResponseProto) GetBlock() *BlockProto { + if x != nil { + return x.Block + } + return nil +} + +//* +// Update replica with new generation stamp and length +type UpdateReplicaUnderRecoveryRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` // Block identifier + RecoveryId *uint64 `protobuf:"varint,2,req,name=recoveryId" json:"recoveryId,omitempty"` // New genstamp of the replica + NewLength *uint64 `protobuf:"varint,3,req,name=newLength" json:"newLength,omitempty"` // New length of the replica + // New blockId for copy (truncate), default is 0. + NewBlockId *uint64 `protobuf:"varint,4,opt,name=newBlockId,def=0" json:"newBlockId,omitempty"` +} + +// Default values for UpdateReplicaUnderRecoveryRequestProto fields. +const ( + Default_UpdateReplicaUnderRecoveryRequestProto_NewBlockId = uint64(0) +) + +func (x *UpdateReplicaUnderRecoveryRequestProto) Reset() { + *x = UpdateReplicaUnderRecoveryRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_InterDatanodeProtocol_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReplicaUnderRecoveryRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReplicaUnderRecoveryRequestProto) ProtoMessage() {} + +func (x *UpdateReplicaUnderRecoveryRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_InterDatanodeProtocol_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateReplicaUnderRecoveryRequestProto.ProtoReflect.Descriptor instead. +func (*UpdateReplicaUnderRecoveryRequestProto) Descriptor() ([]byte, []int) { + return file_InterDatanodeProtocol_proto_rawDescGZIP(), []int{2} +} + +func (x *UpdateReplicaUnderRecoveryRequestProto) GetBlock() *ExtendedBlockProto { + if x != nil { + return x.Block + } + return nil +} + +func (x *UpdateReplicaUnderRecoveryRequestProto) GetRecoveryId() uint64 { + if x != nil && x.RecoveryId != nil { + return *x.RecoveryId + } + return 0 +} + +func (x *UpdateReplicaUnderRecoveryRequestProto) GetNewLength() uint64 { + if x != nil && x.NewLength != nil { + return *x.NewLength + } + return 0 +} + +func (x *UpdateReplicaUnderRecoveryRequestProto) GetNewBlockId() uint64 { + if x != nil && x.NewBlockId != nil { + return *x.NewBlockId + } + return Default_UpdateReplicaUnderRecoveryRequestProto_NewBlockId +} + +//* +// Response returns updated block information +type UpdateReplicaUnderRecoveryResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StorageUuid *string `protobuf:"bytes,1,opt,name=storageUuid" json:"storageUuid,omitempty"` // ID of the storage that stores replica +} + +func (x *UpdateReplicaUnderRecoveryResponseProto) Reset() { + *x = UpdateReplicaUnderRecoveryResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_InterDatanodeProtocol_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReplicaUnderRecoveryResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReplicaUnderRecoveryResponseProto) ProtoMessage() {} + +func (x *UpdateReplicaUnderRecoveryResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_InterDatanodeProtocol_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateReplicaUnderRecoveryResponseProto.ProtoReflect.Descriptor instead. +func (*UpdateReplicaUnderRecoveryResponseProto) Descriptor() ([]byte, []int) { + return file_InterDatanodeProtocol_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateReplicaUnderRecoveryResponseProto) GetStorageUuid() string { + if x != nil && x.StorageUuid != nil { + return *x.StorageUuid + } + return "" +} + +var File_InterDatanodeProtocol_proto protoreflect.FileDescriptor + +var file_InterDatanodeProtocol_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x1a, 0x0a, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x48, 0x64, 0x66, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x1f, 0x49, 0x6e, 0x69, 0x74, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x0a, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0xab, 0x01, 0x0a, 0x20, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x08, 0x52, + 0x0c, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x34, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x22, 0xc0, 0x01, 0x0a, 0x26, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x0a, + 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x27, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, + 0x69, 0x64, 0x32, 0x9c, 0x02, 0x0a, 0x1c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x13, 0x69, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x2c, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x87, 0x01, 0x0a, 0x1a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x33, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x42, 0x86, 0x01, 0x0a, 0x25, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x1b, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, + 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, + 0x68, 0x64, 0x66, 0x73, 0x88, 0x01, 0x01, 0xa0, 0x01, 0x01, +} + +var ( + file_InterDatanodeProtocol_proto_rawDescOnce sync.Once + file_InterDatanodeProtocol_proto_rawDescData = file_InterDatanodeProtocol_proto_rawDesc +) + +func file_InterDatanodeProtocol_proto_rawDescGZIP() []byte { + file_InterDatanodeProtocol_proto_rawDescOnce.Do(func() { + file_InterDatanodeProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_InterDatanodeProtocol_proto_rawDescData) + }) + return file_InterDatanodeProtocol_proto_rawDescData +} + +var file_InterDatanodeProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_InterDatanodeProtocol_proto_goTypes = []interface{}{ + (*InitReplicaRecoveryRequestProto)(nil), // 0: hadoop.hdfs.InitReplicaRecoveryRequestProto + (*InitReplicaRecoveryResponseProto)(nil), // 1: hadoop.hdfs.InitReplicaRecoveryResponseProto + (*UpdateReplicaUnderRecoveryRequestProto)(nil), // 2: hadoop.hdfs.UpdateReplicaUnderRecoveryRequestProto + (*UpdateReplicaUnderRecoveryResponseProto)(nil), // 3: hadoop.hdfs.UpdateReplicaUnderRecoveryResponseProto + (*RecoveringBlockProto)(nil), // 4: hadoop.hdfs.RecoveringBlockProto + (ReplicaStateProto)(0), // 5: hadoop.hdfs.ReplicaStateProto + (*BlockProto)(nil), // 6: hadoop.hdfs.BlockProto + (*ExtendedBlockProto)(nil), // 7: hadoop.hdfs.ExtendedBlockProto +} +var file_InterDatanodeProtocol_proto_depIdxs = []int32{ + 4, // 0: hadoop.hdfs.InitReplicaRecoveryRequestProto.block:type_name -> hadoop.hdfs.RecoveringBlockProto + 5, // 1: hadoop.hdfs.InitReplicaRecoveryResponseProto.state:type_name -> hadoop.hdfs.ReplicaStateProto + 6, // 2: hadoop.hdfs.InitReplicaRecoveryResponseProto.block:type_name -> hadoop.hdfs.BlockProto + 7, // 3: hadoop.hdfs.UpdateReplicaUnderRecoveryRequestProto.block:type_name -> hadoop.hdfs.ExtendedBlockProto + 0, // 4: hadoop.hdfs.InterDatanodeProtocolService.initReplicaRecovery:input_type -> hadoop.hdfs.InitReplicaRecoveryRequestProto + 2, // 5: hadoop.hdfs.InterDatanodeProtocolService.updateReplicaUnderRecovery:input_type -> hadoop.hdfs.UpdateReplicaUnderRecoveryRequestProto + 1, // 6: hadoop.hdfs.InterDatanodeProtocolService.initReplicaRecovery:output_type -> hadoop.hdfs.InitReplicaRecoveryResponseProto + 3, // 7: hadoop.hdfs.InterDatanodeProtocolService.updateReplicaUnderRecovery:output_type -> hadoop.hdfs.UpdateReplicaUnderRecoveryResponseProto + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_InterDatanodeProtocol_proto_init() } +func file_InterDatanodeProtocol_proto_init() { + if File_InterDatanodeProtocol_proto != nil { + return + } + file_hdfs_proto_init() + file_HdfsServer_proto_init() + if !protoimpl.UnsafeEnabled { + file_InterDatanodeProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitReplicaRecoveryRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_InterDatanodeProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitReplicaRecoveryResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_InterDatanodeProtocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReplicaUnderRecoveryRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_InterDatanodeProtocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReplicaUnderRecoveryResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_InterDatanodeProtocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_InterDatanodeProtocol_proto_goTypes, + DependencyIndexes: file_InterDatanodeProtocol_proto_depIdxs, + MessageInfos: file_InterDatanodeProtocol_proto_msgTypes, + }.Build() + File_InterDatanodeProtocol_proto = out.File + file_InterDatanodeProtocol_proto_rawDesc = nil + file_InterDatanodeProtocol_proto_goTypes = nil + file_InterDatanodeProtocol_proto_depIdxs = nil +} diff --git a/internal/protocol/hadoop_hdfs/InterDatanodeProtocol.proto b/internal/protocol/hadoop_hdfs/InterDatanodeProtocol.proto new file mode 100644 index 00000000..038f22ac --- /dev/null +++ b/internal/protocol/hadoop_hdfs/InterDatanodeProtocol.proto @@ -0,0 +1,92 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * These .proto interfaces are private and stable. + * Please see http://wiki.apache.org/hadoop/Compatibility + * for what changes are allowed for a *stable* .proto interface. + */ + +// This file contains protocol buffers that are used throughout HDFS -- i.e. +// by the client, server, and data transfer protocols. +syntax = "proto2"; +option java_package = "org.apache.hadoop.hdfs.protocol.proto"; +option java_outer_classname = "InterDatanodeProtocolProtos"; +option java_generic_services = true; +option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; +package hadoop.hdfs; + +import "hdfs.proto"; +import "HdfsServer.proto"; + +/** + * Block with location information and new generation stamp + * to be used for recovery. + */ +message InitReplicaRecoveryRequestProto { + required RecoveringBlockProto block = 1; +} + +/** + * Repica recovery information + */ +message InitReplicaRecoveryResponseProto { + required bool replicaFound = 1; + + // The following entries are not set if there was no replica found. + optional ReplicaStateProto state = 2; // State of the replica + optional BlockProto block = 3; // block information +} + +/** + * Update replica with new generation stamp and length + */ +message UpdateReplicaUnderRecoveryRequestProto { + required ExtendedBlockProto block = 1; // Block identifier + required uint64 recoveryId = 2; // New genstamp of the replica + required uint64 newLength = 3; // New length of the replica + // New blockId for copy (truncate), default is 0. + optional uint64 newBlockId = 4 [default = 0]; +} + +/** + * Response returns updated block information + */ +message UpdateReplicaUnderRecoveryResponseProto { + optional string storageUuid = 1; // ID of the storage that stores replica +} + +/** + * Protocol used between datanodes for block recovery. + * + * See the request and response for details of rpc call. + */ +service InterDatanodeProtocolService { + /** + * Initialize recovery of a replica + */ + rpc initReplicaRecovery(InitReplicaRecoveryRequestProto) + returns(InitReplicaRecoveryResponseProto); + + /** + * Update a replica with new generation stamp and length + */ + rpc updateReplicaUnderRecovery(UpdateReplicaUnderRecoveryRequestProto) + returns(UpdateReplicaUnderRecoveryResponseProto); +} diff --git a/internal/protocol/hadoop_hdfs/ReconfigurationProtocol.pb.go b/internal/protocol/hadoop_hdfs/ReconfigurationProtocol.pb.go index 32301a08..3064abe0 100644 --- a/internal/protocol/hadoop_hdfs/ReconfigurationProtocol.pb.go +++ b/internal/protocol/hadoop_hdfs/ReconfigurationProtocol.pb.go @@ -1,513 +1,601 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: ReconfigurationProtocol.proto -/* -Package hadoop_hdfs is a generated protocol buffer package. - -It is generated from these files: - ReconfigurationProtocol.proto - xattr.proto - encryption.proto - erasurecoding.proto - ClientNamenodeProtocol.proto - datatransfer.proto - ClientDatanodeProtocol.proto - inotify.proto - hdfs.proto - acl.proto - -It has these top-level messages: - StartReconfigurationRequestProto - StartReconfigurationResponseProto - GetReconfigurationStatusRequestProto - GetReconfigurationStatusConfigChangeProto - GetReconfigurationStatusResponseProto - ListReconfigurablePropertiesRequestProto - ListReconfigurablePropertiesResponseProto - XAttrProto - SetXAttrRequestProto - SetXAttrResponseProto - GetXAttrsRequestProto - GetXAttrsResponseProto - ListXAttrsRequestProto - ListXAttrsResponseProto - RemoveXAttrRequestProto - RemoveXAttrResponseProto - CreateEncryptionZoneRequestProto - CreateEncryptionZoneResponseProto - ListEncryptionZonesRequestProto - EncryptionZoneProto - ListEncryptionZonesResponseProto - GetEZForPathRequestProto - GetEZForPathResponseProto - SetErasureCodingPolicyRequestProto - SetErasureCodingPolicyResponseProto - GetErasureCodingPoliciesRequestProto - GetErasureCodingPoliciesResponseProto - GetErasureCodingPolicyRequestProto - GetErasureCodingPolicyResponseProto - BlockECReconstructionInfoProto - GetBlockLocationsRequestProto - GetBlockLocationsResponseProto - GetServerDefaultsRequestProto - GetServerDefaultsResponseProto - CreateRequestProto - CreateResponseProto - AppendRequestProto - AppendResponseProto - SetReplicationRequestProto - SetReplicationResponseProto - SetStoragePolicyRequestProto - SetStoragePolicyResponseProto - UnsetStoragePolicyRequestProto - UnsetStoragePolicyResponseProto - GetStoragePolicyRequestProto - GetStoragePolicyResponseProto - GetStoragePoliciesRequestProto - GetStoragePoliciesResponseProto - SetPermissionRequestProto - SetPermissionResponseProto - SetOwnerRequestProto - SetOwnerResponseProto - AbandonBlockRequestProto - AbandonBlockResponseProto - AddBlockRequestProto - AddBlockResponseProto - GetAdditionalDatanodeRequestProto - GetAdditionalDatanodeResponseProto - CompleteRequestProto - CompleteResponseProto - ReportBadBlocksRequestProto - ReportBadBlocksResponseProto - ConcatRequestProto - ConcatResponseProto - TruncateRequestProto - TruncateResponseProto - RenameRequestProto - RenameResponseProto - Rename2RequestProto - Rename2ResponseProto - DeleteRequestProto - DeleteResponseProto - MkdirsRequestProto - MkdirsResponseProto - GetListingRequestProto - GetListingResponseProto - GetSnapshottableDirListingRequestProto - GetSnapshottableDirListingResponseProto - GetSnapshotDiffReportRequestProto - GetSnapshotDiffReportResponseProto - RenewLeaseRequestProto - RenewLeaseResponseProto - RecoverLeaseRequestProto - RecoverLeaseResponseProto - GetFsStatusRequestProto - GetFsStatsResponseProto - GetDatanodeReportRequestProto - GetDatanodeReportResponseProto - GetDatanodeStorageReportRequestProto - DatanodeStorageReportProto - GetDatanodeStorageReportResponseProto - GetPreferredBlockSizeRequestProto - GetPreferredBlockSizeResponseProto - SetSafeModeRequestProto - SetSafeModeResponseProto - SaveNamespaceRequestProto - SaveNamespaceResponseProto - RollEditsRequestProto - RollEditsResponseProto - RestoreFailedStorageRequestProto - RestoreFailedStorageResponseProto - RefreshNodesRequestProto - RefreshNodesResponseProto - FinalizeUpgradeRequestProto - FinalizeUpgradeResponseProto - RollingUpgradeRequestProto - RollingUpgradeInfoProto - RollingUpgradeResponseProto - ListCorruptFileBlocksRequestProto - ListCorruptFileBlocksResponseProto - MetaSaveRequestProto - MetaSaveResponseProto - GetFileInfoRequestProto - GetFileInfoResponseProto - IsFileClosedRequestProto - IsFileClosedResponseProto - CacheDirectiveInfoProto - CacheDirectiveInfoExpirationProto - CacheDirectiveStatsProto - AddCacheDirectiveRequestProto - AddCacheDirectiveResponseProto - ModifyCacheDirectiveRequestProto - ModifyCacheDirectiveResponseProto - RemoveCacheDirectiveRequestProto - RemoveCacheDirectiveResponseProto - ListCacheDirectivesRequestProto - CacheDirectiveEntryProto - ListCacheDirectivesResponseProto - CachePoolInfoProto - CachePoolStatsProto - AddCachePoolRequestProto - AddCachePoolResponseProto - ModifyCachePoolRequestProto - ModifyCachePoolResponseProto - RemoveCachePoolRequestProto - RemoveCachePoolResponseProto - ListCachePoolsRequestProto - ListCachePoolsResponseProto - CachePoolEntryProto - GetFileLinkInfoRequestProto - GetFileLinkInfoResponseProto - GetContentSummaryRequestProto - GetContentSummaryResponseProto - GetQuotaUsageRequestProto - GetQuotaUsageResponseProto - SetQuotaRequestProto - SetQuotaResponseProto - FsyncRequestProto - FsyncResponseProto - SetTimesRequestProto - SetTimesResponseProto - CreateSymlinkRequestProto - CreateSymlinkResponseProto - GetLinkTargetRequestProto - GetLinkTargetResponseProto - UpdateBlockForPipelineRequestProto - UpdateBlockForPipelineResponseProto - UpdatePipelineRequestProto - UpdatePipelineResponseProto - SetBalancerBandwidthRequestProto - SetBalancerBandwidthResponseProto - GetDataEncryptionKeyRequestProto - GetDataEncryptionKeyResponseProto - CreateSnapshotRequestProto - CreateSnapshotResponseProto - RenameSnapshotRequestProto - RenameSnapshotResponseProto - AllowSnapshotRequestProto - AllowSnapshotResponseProto - DisallowSnapshotRequestProto - DisallowSnapshotResponseProto - DeleteSnapshotRequestProto - DeleteSnapshotResponseProto - CheckAccessRequestProto - CheckAccessResponseProto - GetCurrentEditLogTxidRequestProto - GetCurrentEditLogTxidResponseProto - GetEditsFromTxidRequestProto - GetEditsFromTxidResponseProto - DataTransferEncryptorMessageProto - BaseHeaderProto - DataTransferTraceInfoProto - ClientOperationHeaderProto - CachingStrategyProto - OpReadBlockProto - ChecksumProto - OpWriteBlockProto - OpTransferBlockProto - OpReplaceBlockProto - OpCopyBlockProto - OpBlockChecksumProto - OpBlockGroupChecksumProto - ShortCircuitShmIdProto - ShortCircuitShmSlotProto - OpRequestShortCircuitAccessProto - ReleaseShortCircuitAccessRequestProto - ReleaseShortCircuitAccessResponseProto - ShortCircuitShmRequestProto - ShortCircuitShmResponseProto - PacketHeaderProto - PipelineAckProto - ReadOpChecksumInfoProto - BlockOpResponseProto - ClientReadStatusProto - DNTransferAckProto - OpBlockChecksumResponseProto - OpCustomProto - GetReplicaVisibleLengthRequestProto - GetReplicaVisibleLengthResponseProto - RefreshNamenodesRequestProto - RefreshNamenodesResponseProto - DeleteBlockPoolRequestProto - DeleteBlockPoolResponseProto - GetBlockLocalPathInfoRequestProto - GetBlockLocalPathInfoResponseProto - ShutdownDatanodeRequestProto - ShutdownDatanodeResponseProto - EvictWritersRequestProto - EvictWritersResponseProto - GetDatanodeInfoRequestProto - GetDatanodeInfoResponseProto - TriggerBlockReportRequestProto - TriggerBlockReportResponseProto - GetBalancerBandwidthRequestProto - GetBalancerBandwidthResponseProto - EventProto - EventBatchProto - CreateEventProto - CloseEventProto - TruncateEventProto - AppendEventProto - RenameEventProto - MetadataUpdateEventProto - UnlinkEventProto - EventsListProto - ExtendedBlockProto - DatanodeIDProto - DatanodeLocalInfoProto - DatanodeInfosProto - DatanodeInfoProto - DatanodeStorageProto - StorageReportProto - ContentSummaryProto - QuotaUsageProto - StorageTypeQuotaInfosProto - StorageTypeQuotaInfoProto - CorruptFileBlocksProto - FsPermissionProto - StorageTypesProto - BlockStoragePolicyProto - LocatedBlockProto - DataEncryptionKeyProto - FileEncryptionInfoProto - PerFileEncryptionInfoProto - ZoneEncryptionInfoProto - CipherOptionProto - LocatedBlocksProto - ECSchemaOptionEntryProto - ECSchemaProto - ErasureCodingPolicyProto - HdfsFileStatusProto - FsServerDefaultsProto - DirectoryListingProto - SnapshottableDirectoryStatusProto - SnapshottableDirectoryListingProto - SnapshotDiffReportEntryProto - SnapshotDiffReportProto - BlockProto - SnapshotInfoProto - RollingUpgradeStatusProto - StorageUuidsProto - AclEntryProto - AclStatusProto - ModifyAclEntriesRequestProto - ModifyAclEntriesResponseProto - RemoveAclRequestProto - RemoveAclResponseProto - RemoveAclEntriesRequestProto - RemoveAclEntriesResponseProto - RemoveDefaultAclRequestProto - RemoveDefaultAclResponseProto - SetAclRequestProto - SetAclResponseProto - GetAclStatusRequestProto - GetAclStatusResponseProto -*/ package hadoop_hdfs -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * Asks NN/DN to reload configuration file. +//* Asks NN/DN to reload configuration file. type StartReconfigurationRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StartReconfigurationRequestProto) Reset() { + *x = StartReconfigurationRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ReconfigurationProtocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StartReconfigurationRequestProto) Reset() { *m = StartReconfigurationRequestProto{} } -func (m *StartReconfigurationRequestProto) String() string { return proto.CompactTextString(m) } -func (*StartReconfigurationRequestProto) ProtoMessage() {} +func (x *StartReconfigurationRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartReconfigurationRequestProto) ProtoMessage() {} + +func (x *StartReconfigurationRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ReconfigurationProtocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartReconfigurationRequestProto.ProtoReflect.Descriptor instead. func (*StartReconfigurationRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{0} + return file_ReconfigurationProtocol_proto_rawDescGZIP(), []int{0} } type StartReconfigurationResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StartReconfigurationResponseProto) Reset() { + *x = StartReconfigurationResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ReconfigurationProtocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartReconfigurationResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartReconfigurationResponseProto) ProtoMessage() {} + +func (x *StartReconfigurationResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ReconfigurationProtocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *StartReconfigurationResponseProto) Reset() { *m = StartReconfigurationResponseProto{} } -func (m *StartReconfigurationResponseProto) String() string { return proto.CompactTextString(m) } -func (*StartReconfigurationResponseProto) ProtoMessage() {} +// Deprecated: Use StartReconfigurationResponseProto.ProtoReflect.Descriptor instead. func (*StartReconfigurationResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{1} + return file_ReconfigurationProtocol_proto_rawDescGZIP(), []int{1} } -// * Query the running status of reconfiguration process +//* Query the running status of reconfiguration process type GetReconfigurationStatusRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetReconfigurationStatusRequestProto) Reset() { + *x = GetReconfigurationStatusRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ReconfigurationProtocol_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReconfigurationStatusRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReconfigurationStatusRequestProto) ProtoMessage() {} + +func (x *GetReconfigurationStatusRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ReconfigurationProtocol_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetReconfigurationStatusRequestProto) Reset() { *m = GetReconfigurationStatusRequestProto{} } -func (m *GetReconfigurationStatusRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetReconfigurationStatusRequestProto) ProtoMessage() {} +// Deprecated: Use GetReconfigurationStatusRequestProto.ProtoReflect.Descriptor instead. func (*GetReconfigurationStatusRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{2} + return file_ReconfigurationProtocol_proto_rawDescGZIP(), []int{2} } type GetReconfigurationStatusConfigChangeProto struct { - Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - OldValue *string `protobuf:"bytes,2,req,name=oldValue" json:"oldValue,omitempty"` - NewValue *string `protobuf:"bytes,3,opt,name=newValue" json:"newValue,omitempty"` - ErrorMessage *string `protobuf:"bytes,4,opt,name=errorMessage" json:"errorMessage,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + OldValue *string `protobuf:"bytes,2,req,name=oldValue" json:"oldValue,omitempty"` + NewValue *string `protobuf:"bytes,3,opt,name=newValue" json:"newValue,omitempty"` + ErrorMessage *string `protobuf:"bytes,4,opt,name=errorMessage" json:"errorMessage,omitempty"` // It is empty if success. } -func (m *GetReconfigurationStatusConfigChangeProto) Reset() { - *m = GetReconfigurationStatusConfigChangeProto{} +func (x *GetReconfigurationStatusConfigChangeProto) Reset() { + *x = GetReconfigurationStatusConfigChangeProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ReconfigurationProtocol_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetReconfigurationStatusConfigChangeProto) String() string { return proto.CompactTextString(m) } -func (*GetReconfigurationStatusConfigChangeProto) ProtoMessage() {} + +func (x *GetReconfigurationStatusConfigChangeProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReconfigurationStatusConfigChangeProto) ProtoMessage() {} + +func (x *GetReconfigurationStatusConfigChangeProto) ProtoReflect() protoreflect.Message { + mi := &file_ReconfigurationProtocol_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReconfigurationStatusConfigChangeProto.ProtoReflect.Descriptor instead. func (*GetReconfigurationStatusConfigChangeProto) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{3} + return file_ReconfigurationProtocol_proto_rawDescGZIP(), []int{3} } -func (m *GetReconfigurationStatusConfigChangeProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name +func (x *GetReconfigurationStatusConfigChangeProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } return "" } -func (m *GetReconfigurationStatusConfigChangeProto) GetOldValue() string { - if m != nil && m.OldValue != nil { - return *m.OldValue +func (x *GetReconfigurationStatusConfigChangeProto) GetOldValue() string { + if x != nil && x.OldValue != nil { + return *x.OldValue } return "" } -func (m *GetReconfigurationStatusConfigChangeProto) GetNewValue() string { - if m != nil && m.NewValue != nil { - return *m.NewValue +func (x *GetReconfigurationStatusConfigChangeProto) GetNewValue() string { + if x != nil && x.NewValue != nil { + return *x.NewValue } return "" } -func (m *GetReconfigurationStatusConfigChangeProto) GetErrorMessage() string { - if m != nil && m.ErrorMessage != nil { - return *m.ErrorMessage +func (x *GetReconfigurationStatusConfigChangeProto) GetErrorMessage() string { + if x != nil && x.ErrorMessage != nil { + return *x.ErrorMessage } return "" } type GetReconfigurationStatusResponseProto struct { - StartTime *int64 `protobuf:"varint,1,req,name=startTime" json:"startTime,omitempty"` - EndTime *int64 `protobuf:"varint,2,opt,name=endTime" json:"endTime,omitempty"` - Changes []*GetReconfigurationStatusConfigChangeProto `protobuf:"bytes,3,rep,name=changes" json:"changes,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StartTime *int64 `protobuf:"varint,1,req,name=startTime" json:"startTime,omitempty"` + EndTime *int64 `protobuf:"varint,2,opt,name=endTime" json:"endTime,omitempty"` + Changes []*GetReconfigurationStatusConfigChangeProto `protobuf:"bytes,3,rep,name=changes" json:"changes,omitempty"` +} + +func (x *GetReconfigurationStatusResponseProto) Reset() { + *x = GetReconfigurationStatusResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ReconfigurationProtocol_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReconfigurationStatusResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReconfigurationStatusResponseProto) ProtoMessage() {} + +func (x *GetReconfigurationStatusResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ReconfigurationProtocol_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GetReconfigurationStatusResponseProto) Reset() { *m = GetReconfigurationStatusResponseProto{} } -func (m *GetReconfigurationStatusResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetReconfigurationStatusResponseProto) ProtoMessage() {} +// Deprecated: Use GetReconfigurationStatusResponseProto.ProtoReflect.Descriptor instead. func (*GetReconfigurationStatusResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{4} + return file_ReconfigurationProtocol_proto_rawDescGZIP(), []int{4} } -func (m *GetReconfigurationStatusResponseProto) GetStartTime() int64 { - if m != nil && m.StartTime != nil { - return *m.StartTime +func (x *GetReconfigurationStatusResponseProto) GetStartTime() int64 { + if x != nil && x.StartTime != nil { + return *x.StartTime } return 0 } -func (m *GetReconfigurationStatusResponseProto) GetEndTime() int64 { - if m != nil && m.EndTime != nil { - return *m.EndTime +func (x *GetReconfigurationStatusResponseProto) GetEndTime() int64 { + if x != nil && x.EndTime != nil { + return *x.EndTime } return 0 } -func (m *GetReconfigurationStatusResponseProto) GetChanges() []*GetReconfigurationStatusConfigChangeProto { - if m != nil { - return m.Changes +func (x *GetReconfigurationStatusResponseProto) GetChanges() []*GetReconfigurationStatusConfigChangeProto { + if x != nil { + return x.Changes } return nil } -// * Query the reconfigurable properties on NN/DN. +//* Query the reconfigurable properties on NN/DN. type ListReconfigurablePropertiesRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *ListReconfigurablePropertiesRequestProto) Reset() { - *m = ListReconfigurablePropertiesRequestProto{} +func (x *ListReconfigurablePropertiesRequestProto) Reset() { + *x = ListReconfigurablePropertiesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ReconfigurationProtocol_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListReconfigurablePropertiesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListReconfigurablePropertiesRequestProto) String() string { return proto.CompactTextString(m) } -func (*ListReconfigurablePropertiesRequestProto) ProtoMessage() {} + +func (*ListReconfigurablePropertiesRequestProto) ProtoMessage() {} + +func (x *ListReconfigurablePropertiesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_ReconfigurationProtocol_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListReconfigurablePropertiesRequestProto.ProtoReflect.Descriptor instead. func (*ListReconfigurablePropertiesRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{5} + return file_ReconfigurationProtocol_proto_rawDescGZIP(), []int{5} } type ListReconfigurablePropertiesResponseProto struct { - Name []string `protobuf:"bytes,1,rep,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name []string `protobuf:"bytes,1,rep,name=name" json:"name,omitempty"` } -func (m *ListReconfigurablePropertiesResponseProto) Reset() { - *m = ListReconfigurablePropertiesResponseProto{} +func (x *ListReconfigurablePropertiesResponseProto) Reset() { + *x = ListReconfigurablePropertiesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_ReconfigurationProtocol_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListReconfigurablePropertiesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListReconfigurablePropertiesResponseProto) ProtoMessage() {} + +func (x *ListReconfigurablePropertiesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_ReconfigurationProtocol_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ListReconfigurablePropertiesResponseProto) String() string { return proto.CompactTextString(m) } -func (*ListReconfigurablePropertiesResponseProto) ProtoMessage() {} + +// Deprecated: Use ListReconfigurablePropertiesResponseProto.ProtoReflect.Descriptor instead. func (*ListReconfigurablePropertiesResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{6} + return file_ReconfigurationProtocol_proto_rawDescGZIP(), []int{6} } -func (m *ListReconfigurablePropertiesResponseProto) GetName() []string { - if m != nil { - return m.Name +func (x *ListReconfigurablePropertiesResponseProto) GetName() []string { + if x != nil { + return x.Name } return nil } -func init() { - proto.RegisterType((*StartReconfigurationRequestProto)(nil), "hadoop.hdfs.StartReconfigurationRequestProto") - proto.RegisterType((*StartReconfigurationResponseProto)(nil), "hadoop.hdfs.StartReconfigurationResponseProto") - proto.RegisterType((*GetReconfigurationStatusRequestProto)(nil), "hadoop.hdfs.GetReconfigurationStatusRequestProto") - proto.RegisterType((*GetReconfigurationStatusConfigChangeProto)(nil), "hadoop.hdfs.GetReconfigurationStatusConfigChangeProto") - proto.RegisterType((*GetReconfigurationStatusResponseProto)(nil), "hadoop.hdfs.GetReconfigurationStatusResponseProto") - proto.RegisterType((*ListReconfigurablePropertiesRequestProto)(nil), "hadoop.hdfs.ListReconfigurablePropertiesRequestProto") - proto.RegisterType((*ListReconfigurablePropertiesResponseProto)(nil), "hadoop.hdfs.ListReconfigurablePropertiesResponseProto") -} - -func init() { proto.RegisterFile("ReconfigurationProtocol.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 401 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xb1, 0x8e, 0xd3, 0x40, - 0x10, 0xd5, 0xc6, 0x91, 0x42, 0x26, 0x54, 0x2b, 0x0a, 0xcb, 0x0a, 0xc8, 0x18, 0x82, 0x1c, 0x24, - 0x2c, 0x11, 0x89, 0xb4, 0x48, 0x49, 0x41, 0x13, 0xa4, 0xc8, 0x41, 0xf4, 0x8b, 0x3d, 0xb1, 0x2d, - 0x19, 0xaf, 0xd9, 0x5d, 0x43, 0x4d, 0x47, 0xc3, 0x17, 0x5c, 0x73, 0xfd, 0x55, 0xf7, 0x87, 0x27, - 0x6f, 0xce, 0x97, 0x75, 0x14, 0xe7, 0x7c, 0x95, 0x77, 0x66, 0xde, 0x3c, 0xcf, 0x7b, 0x3b, 0x5a, - 0x78, 0x19, 0x62, 0xc4, 0x8b, 0x7d, 0x96, 0x54, 0x82, 0xa9, 0x8c, 0x17, 0x5b, 0xc1, 0x15, 0x8f, - 0x78, 0x1e, 0x94, 0xf5, 0x81, 0x4e, 0x52, 0x16, 0x73, 0x5e, 0x06, 0x69, 0xbc, 0x97, 0x9e, 0x07, - 0xee, 0x4e, 0x31, 0xa1, 0x4e, 0x5a, 0x42, 0xfc, 0x55, 0xa1, 0x54, 0xba, 0x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x11, 0xd2, 0xbf, 0x04, 0xec, 0xa4, 0x43, 0x06, 0xfd, 0xd8, 0x4b, 0xad, 0x39, 0xb3, - 0xb3, 0xe8, 0xd9, 0x62, 0x8e, 0x5e, 0xc1, 0x0b, 0x79, 0x66, 0x65, 0xe9, 0x87, 0x16, 0xd7, 0x63, - 0x9b, 0xef, 0x04, 0x3d, 0xe0, 0xe6, 0x6f, 0xff, 0x13, 0x98, 0xe6, 0x17, 0xfc, 0xa5, 0x9f, 0x5a, - 0x84, 0x7d, 0xaf, 0xcd, 0x59, 0x3e, 0xa1, 0xcd, 0x98, 0x67, 0xb5, 0x81, 0x19, 0x17, 0x49, 0xc0, - 0x4a, 0x16, 0xa5, 0xd8, 0xe2, 0x28, 0x5b, 0x6f, 0xc2, 0xaa, 0xeb, 0xc9, 0xd0, 0x5f, 0xf9, 0x8f, - 0x90, 0x6b, 0x42, 0xee, 0x02, 0x00, 0x00, 0xff, 0xff, 0x93, 0x3f, 0x1a, 0x33, 0x58, 0x04, 0x00, - 0x00, +var File_ReconfigurationProtocol_proto protoreflect.FileDescriptor + +var file_ReconfigurationProtocol_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0b, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x22, 0x22, 0x0a, 0x20, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x23, 0x0a, 0x21, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x26, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x01, + 0x0a, 0x29, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, + 0x09, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, + 0x65, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, + 0x65, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x25, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x50, 0x0a, + 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, + 0x2a, 0x0a, 0x28, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x29, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x62, 0x6c, + 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xab, 0x03, 0x0a, + 0x1e, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x81, 0x01, 0x0a, 0x18, 0x67, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x32, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x75, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, + 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x8d, 0x01, 0x0a, 0x1c, 0x6c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x62, 0x6c, + 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x36, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x88, 0x01, 0x0a, 0x25, 0x6f, + 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x1d, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, + 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x68, 0x64, 0x66, 0x73, 0x88, + 0x01, 0x01, 0xa0, 0x01, 0x01, +} + +var ( + file_ReconfigurationProtocol_proto_rawDescOnce sync.Once + file_ReconfigurationProtocol_proto_rawDescData = file_ReconfigurationProtocol_proto_rawDesc +) + +func file_ReconfigurationProtocol_proto_rawDescGZIP() []byte { + file_ReconfigurationProtocol_proto_rawDescOnce.Do(func() { + file_ReconfigurationProtocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_ReconfigurationProtocol_proto_rawDescData) + }) + return file_ReconfigurationProtocol_proto_rawDescData +} + +var file_ReconfigurationProtocol_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_ReconfigurationProtocol_proto_goTypes = []interface{}{ + (*StartReconfigurationRequestProto)(nil), // 0: hadoop.hdfs.StartReconfigurationRequestProto + (*StartReconfigurationResponseProto)(nil), // 1: hadoop.hdfs.StartReconfigurationResponseProto + (*GetReconfigurationStatusRequestProto)(nil), // 2: hadoop.hdfs.GetReconfigurationStatusRequestProto + (*GetReconfigurationStatusConfigChangeProto)(nil), // 3: hadoop.hdfs.GetReconfigurationStatusConfigChangeProto + (*GetReconfigurationStatusResponseProto)(nil), // 4: hadoop.hdfs.GetReconfigurationStatusResponseProto + (*ListReconfigurablePropertiesRequestProto)(nil), // 5: hadoop.hdfs.ListReconfigurablePropertiesRequestProto + (*ListReconfigurablePropertiesResponseProto)(nil), // 6: hadoop.hdfs.ListReconfigurablePropertiesResponseProto +} +var file_ReconfigurationProtocol_proto_depIdxs = []int32{ + 3, // 0: hadoop.hdfs.GetReconfigurationStatusResponseProto.changes:type_name -> hadoop.hdfs.GetReconfigurationStatusConfigChangeProto + 2, // 1: hadoop.hdfs.ReconfigurationProtocolService.getReconfigurationStatus:input_type -> hadoop.hdfs.GetReconfigurationStatusRequestProto + 0, // 2: hadoop.hdfs.ReconfigurationProtocolService.startReconfiguration:input_type -> hadoop.hdfs.StartReconfigurationRequestProto + 5, // 3: hadoop.hdfs.ReconfigurationProtocolService.listReconfigurableProperties:input_type -> hadoop.hdfs.ListReconfigurablePropertiesRequestProto + 4, // 4: hadoop.hdfs.ReconfigurationProtocolService.getReconfigurationStatus:output_type -> hadoop.hdfs.GetReconfigurationStatusResponseProto + 1, // 5: hadoop.hdfs.ReconfigurationProtocolService.startReconfiguration:output_type -> hadoop.hdfs.StartReconfigurationResponseProto + 6, // 6: hadoop.hdfs.ReconfigurationProtocolService.listReconfigurableProperties:output_type -> hadoop.hdfs.ListReconfigurablePropertiesResponseProto + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_ReconfigurationProtocol_proto_init() } +func file_ReconfigurationProtocol_proto_init() { + if File_ReconfigurationProtocol_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ReconfigurationProtocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartReconfigurationRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ReconfigurationProtocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartReconfigurationResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ReconfigurationProtocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReconfigurationStatusRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ReconfigurationProtocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReconfigurationStatusConfigChangeProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ReconfigurationProtocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReconfigurationStatusResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ReconfigurationProtocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReconfigurablePropertiesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ReconfigurationProtocol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReconfigurablePropertiesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ReconfigurationProtocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ReconfigurationProtocol_proto_goTypes, + DependencyIndexes: file_ReconfigurationProtocol_proto_depIdxs, + MessageInfos: file_ReconfigurationProtocol_proto_msgTypes, + }.Build() + File_ReconfigurationProtocol_proto = out.File + file_ReconfigurationProtocol_proto_rawDesc = nil + file_ReconfigurationProtocol_proto_goTypes = nil + file_ReconfigurationProtocol_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_hdfs/ReconfigurationProtocol.proto b/internal/protocol/hadoop_hdfs/ReconfigurationProtocol.proto index 12a38b11..883e04df 100644 --- a/internal/protocol/hadoop_hdfs/ReconfigurationProtocol.proto +++ b/internal/protocol/hadoop_hdfs/ReconfigurationProtocol.proto @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +syntax="proto2"; // This file contains protocol buffers that are used to reconfigure NameNode // and DataNode by HDFS admin. @@ -23,6 +23,7 @@ option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "ReconfigurationProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; package hadoop.hdfs; /** Asks NN/DN to reload configuration file. */ diff --git a/internal/protocol/hadoop_hdfs/acl.pb.go b/internal/protocol/hadoop_hdfs/acl.pb.go index 5d766a35..fbea1485 100644 --- a/internal/protocol/hadoop_hdfs/acl.pb.go +++ b/internal/protocol/hadoop_hdfs/acl.pb.go @@ -1,16 +1,41 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: acl.proto package hadoop_hdfs -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type AclEntryProto_AclEntryScopeProto int32 @@ -19,33 +44,53 @@ const ( AclEntryProto_DEFAULT AclEntryProto_AclEntryScopeProto = 1 ) -var AclEntryProto_AclEntryScopeProto_name = map[int32]string{ - 0: "ACCESS", - 1: "DEFAULT", -} -var AclEntryProto_AclEntryScopeProto_value = map[string]int32{ - "ACCESS": 0, - "DEFAULT": 1, -} +// Enum value maps for AclEntryProto_AclEntryScopeProto. +var ( + AclEntryProto_AclEntryScopeProto_name = map[int32]string{ + 0: "ACCESS", + 1: "DEFAULT", + } + AclEntryProto_AclEntryScopeProto_value = map[string]int32{ + "ACCESS": 0, + "DEFAULT": 1, + } +) func (x AclEntryProto_AclEntryScopeProto) Enum() *AclEntryProto_AclEntryScopeProto { p := new(AclEntryProto_AclEntryScopeProto) *p = x return p } + func (x AclEntryProto_AclEntryScopeProto) String() string { - return proto.EnumName(AclEntryProto_AclEntryScopeProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AclEntryProto_AclEntryScopeProto) Descriptor() protoreflect.EnumDescriptor { + return file_acl_proto_enumTypes[0].Descriptor() +} + +func (AclEntryProto_AclEntryScopeProto) Type() protoreflect.EnumType { + return &file_acl_proto_enumTypes[0] } -func (x *AclEntryProto_AclEntryScopeProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(AclEntryProto_AclEntryScopeProto_value, data, "AclEntryProto_AclEntryScopeProto") + +func (x AclEntryProto_AclEntryScopeProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *AclEntryProto_AclEntryScopeProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = AclEntryProto_AclEntryScopeProto(value) + *x = AclEntryProto_AclEntryScopeProto(num) return nil } + +// Deprecated: Use AclEntryProto_AclEntryScopeProto.Descriptor instead. func (AclEntryProto_AclEntryScopeProto) EnumDescriptor() ([]byte, []int) { - return fileDescriptor9, []int{0, 0} + return file_acl_proto_rawDescGZIP(), []int{1, 0} } type AclEntryProto_AclEntryTypeProto int32 @@ -57,37 +102,57 @@ const ( AclEntryProto_OTHER AclEntryProto_AclEntryTypeProto = 3 ) -var AclEntryProto_AclEntryTypeProto_name = map[int32]string{ - 0: "USER", - 1: "GROUP", - 2: "MASK", - 3: "OTHER", -} -var AclEntryProto_AclEntryTypeProto_value = map[string]int32{ - "USER": 0, - "GROUP": 1, - "MASK": 2, - "OTHER": 3, -} +// Enum value maps for AclEntryProto_AclEntryTypeProto. +var ( + AclEntryProto_AclEntryTypeProto_name = map[int32]string{ + 0: "USER", + 1: "GROUP", + 2: "MASK", + 3: "OTHER", + } + AclEntryProto_AclEntryTypeProto_value = map[string]int32{ + "USER": 0, + "GROUP": 1, + "MASK": 2, + "OTHER": 3, + } +) func (x AclEntryProto_AclEntryTypeProto) Enum() *AclEntryProto_AclEntryTypeProto { p := new(AclEntryProto_AclEntryTypeProto) *p = x return p } + func (x AclEntryProto_AclEntryTypeProto) String() string { - return proto.EnumName(AclEntryProto_AclEntryTypeProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AclEntryProto_AclEntryTypeProto) Descriptor() protoreflect.EnumDescriptor { + return file_acl_proto_enumTypes[1].Descriptor() +} + +func (AclEntryProto_AclEntryTypeProto) Type() protoreflect.EnumType { + return &file_acl_proto_enumTypes[1] } -func (x *AclEntryProto_AclEntryTypeProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(AclEntryProto_AclEntryTypeProto_value, data, "AclEntryProto_AclEntryTypeProto") + +func (x AclEntryProto_AclEntryTypeProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *AclEntryProto_AclEntryTypeProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = AclEntryProto_AclEntryTypeProto(value) + *x = AclEntryProto_AclEntryTypeProto(num) return nil } + +// Deprecated: Use AclEntryProto_AclEntryTypeProto.Descriptor instead. func (AclEntryProto_AclEntryTypeProto) EnumDescriptor() ([]byte, []int) { - return fileDescriptor9, []int{0, 1} + return file_acl_proto_rawDescGZIP(), []int{1, 1} } type AclEntryProto_FsActionProto int32 @@ -103,385 +168,1166 @@ const ( AclEntryProto_PERM_ALL AclEntryProto_FsActionProto = 7 ) -var AclEntryProto_FsActionProto_name = map[int32]string{ - 0: "NONE", - 1: "EXECUTE", - 2: "WRITE", - 3: "WRITE_EXECUTE", - 4: "READ", - 5: "READ_EXECUTE", - 6: "READ_WRITE", - 7: "PERM_ALL", -} -var AclEntryProto_FsActionProto_value = map[string]int32{ - "NONE": 0, - "EXECUTE": 1, - "WRITE": 2, - "WRITE_EXECUTE": 3, - "READ": 4, - "READ_EXECUTE": 5, - "READ_WRITE": 6, - "PERM_ALL": 7, -} +// Enum value maps for AclEntryProto_FsActionProto. +var ( + AclEntryProto_FsActionProto_name = map[int32]string{ + 0: "NONE", + 1: "EXECUTE", + 2: "WRITE", + 3: "WRITE_EXECUTE", + 4: "READ", + 5: "READ_EXECUTE", + 6: "READ_WRITE", + 7: "PERM_ALL", + } + AclEntryProto_FsActionProto_value = map[string]int32{ + "NONE": 0, + "EXECUTE": 1, + "WRITE": 2, + "WRITE_EXECUTE": 3, + "READ": 4, + "READ_EXECUTE": 5, + "READ_WRITE": 6, + "PERM_ALL": 7, + } +) func (x AclEntryProto_FsActionProto) Enum() *AclEntryProto_FsActionProto { p := new(AclEntryProto_FsActionProto) *p = x return p } + func (x AclEntryProto_FsActionProto) String() string { - return proto.EnumName(AclEntryProto_FsActionProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AclEntryProto_FsActionProto) Descriptor() protoreflect.EnumDescriptor { + return file_acl_proto_enumTypes[2].Descriptor() } -func (x *AclEntryProto_FsActionProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(AclEntryProto_FsActionProto_value, data, "AclEntryProto_FsActionProto") + +func (AclEntryProto_FsActionProto) Type() protoreflect.EnumType { + return &file_acl_proto_enumTypes[2] +} + +func (x AclEntryProto_FsActionProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *AclEntryProto_FsActionProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = AclEntryProto_FsActionProto(value) + *x = AclEntryProto_FsActionProto(num) return nil } + +// Deprecated: Use AclEntryProto_FsActionProto.Descriptor instead. func (AclEntryProto_FsActionProto) EnumDescriptor() ([]byte, []int) { - return fileDescriptor9, []int{0, 2} + return file_acl_proto_rawDescGZIP(), []int{1, 2} +} + +//* +// File or Directory permision - same spec as posix +type FsPermissionProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Perm *uint32 `protobuf:"varint,1,req,name=perm" json:"perm,omitempty"` // Actually a short - only 16bits used +} + +func (x *FsPermissionProto) Reset() { + *x = FsPermissionProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FsPermissionProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FsPermissionProto) ProtoMessage() {} + +func (x *FsPermissionProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FsPermissionProto.ProtoReflect.Descriptor instead. +func (*FsPermissionProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{0} +} + +func (x *FsPermissionProto) GetPerm() uint32 { + if x != nil && x.Perm != nil { + return *x.Perm + } + return 0 } type AclEntryProto struct { - Type *AclEntryProto_AclEntryTypeProto `protobuf:"varint,1,req,name=type,enum=hadoop.hdfs.AclEntryProto_AclEntryTypeProto" json:"type,omitempty"` - Scope *AclEntryProto_AclEntryScopeProto `protobuf:"varint,2,req,name=scope,enum=hadoop.hdfs.AclEntryProto_AclEntryScopeProto" json:"scope,omitempty"` - Permissions *AclEntryProto_FsActionProto `protobuf:"varint,3,req,name=permissions,enum=hadoop.hdfs.AclEntryProto_FsActionProto" json:"permissions,omitempty"` - Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type *AclEntryProto_AclEntryTypeProto `protobuf:"varint,1,req,name=type,enum=hadoop.hdfs.AclEntryProto_AclEntryTypeProto" json:"type,omitempty"` + Scope *AclEntryProto_AclEntryScopeProto `protobuf:"varint,2,req,name=scope,enum=hadoop.hdfs.AclEntryProto_AclEntryScopeProto" json:"scope,omitempty"` + Permissions *AclEntryProto_FsActionProto `protobuf:"varint,3,req,name=permissions,enum=hadoop.hdfs.AclEntryProto_FsActionProto" json:"permissions,omitempty"` + Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` +} + +func (x *AclEntryProto) Reset() { + *x = AclEntryProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AclEntryProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AclEntryProto) ProtoMessage() {} + +func (x *AclEntryProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *AclEntryProto) Reset() { *m = AclEntryProto{} } -func (m *AclEntryProto) String() string { return proto.CompactTextString(m) } -func (*AclEntryProto) ProtoMessage() {} -func (*AclEntryProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{0} } +// Deprecated: Use AclEntryProto.ProtoReflect.Descriptor instead. +func (*AclEntryProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{1} +} -func (m *AclEntryProto) GetType() AclEntryProto_AclEntryTypeProto { - if m != nil && m.Type != nil { - return *m.Type +func (x *AclEntryProto) GetType() AclEntryProto_AclEntryTypeProto { + if x != nil && x.Type != nil { + return *x.Type } return AclEntryProto_USER } -func (m *AclEntryProto) GetScope() AclEntryProto_AclEntryScopeProto { - if m != nil && m.Scope != nil { - return *m.Scope +func (x *AclEntryProto) GetScope() AclEntryProto_AclEntryScopeProto { + if x != nil && x.Scope != nil { + return *x.Scope } return AclEntryProto_ACCESS } -func (m *AclEntryProto) GetPermissions() AclEntryProto_FsActionProto { - if m != nil && m.Permissions != nil { - return *m.Permissions +func (x *AclEntryProto) GetPermissions() AclEntryProto_FsActionProto { + if x != nil && x.Permissions != nil { + return *x.Permissions } return AclEntryProto_NONE } -func (m *AclEntryProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name +func (x *AclEntryProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } return "" } type AclStatusProto struct { - Owner *string `protobuf:"bytes,1,req,name=owner" json:"owner,omitempty"` - Group *string `protobuf:"bytes,2,req,name=group" json:"group,omitempty"` - Sticky *bool `protobuf:"varint,3,req,name=sticky" json:"sticky,omitempty"` - Entries []*AclEntryProto `protobuf:"bytes,4,rep,name=entries" json:"entries,omitempty"` - Permission *FsPermissionProto `protobuf:"bytes,5,opt,name=permission" json:"permission,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Owner *string `protobuf:"bytes,1,req,name=owner" json:"owner,omitempty"` + Group *string `protobuf:"bytes,2,req,name=group" json:"group,omitempty"` + Sticky *bool `protobuf:"varint,3,req,name=sticky" json:"sticky,omitempty"` + Entries []*AclEntryProto `protobuf:"bytes,4,rep,name=entries" json:"entries,omitempty"` + Permission *FsPermissionProto `protobuf:"bytes,5,opt,name=permission" json:"permission,omitempty"` +} + +func (x *AclStatusProto) Reset() { + *x = AclStatusProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AclStatusProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AclStatusProto) Reset() { *m = AclStatusProto{} } -func (m *AclStatusProto) String() string { return proto.CompactTextString(m) } -func (*AclStatusProto) ProtoMessage() {} -func (*AclStatusProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{1} } +func (*AclStatusProto) ProtoMessage() {} -func (m *AclStatusProto) GetOwner() string { - if m != nil && m.Owner != nil { - return *m.Owner +func (x *AclStatusProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AclStatusProto.ProtoReflect.Descriptor instead. +func (*AclStatusProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{2} +} + +func (x *AclStatusProto) GetOwner() string { + if x != nil && x.Owner != nil { + return *x.Owner } return "" } -func (m *AclStatusProto) GetGroup() string { - if m != nil && m.Group != nil { - return *m.Group +func (x *AclStatusProto) GetGroup() string { + if x != nil && x.Group != nil { + return *x.Group } return "" } -func (m *AclStatusProto) GetSticky() bool { - if m != nil && m.Sticky != nil { - return *m.Sticky +func (x *AclStatusProto) GetSticky() bool { + if x != nil && x.Sticky != nil { + return *x.Sticky } return false } -func (m *AclStatusProto) GetEntries() []*AclEntryProto { - if m != nil { - return m.Entries +func (x *AclStatusProto) GetEntries() []*AclEntryProto { + if x != nil { + return x.Entries } return nil } -func (m *AclStatusProto) GetPermission() *FsPermissionProto { - if m != nil { - return m.Permission +func (x *AclStatusProto) GetPermission() *FsPermissionProto { + if x != nil { + return x.Permission } return nil } type ModifyAclEntriesRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - AclSpec []*AclEntryProto `protobuf:"bytes,2,rep,name=aclSpec" json:"aclSpec,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + AclSpec []*AclEntryProto `protobuf:"bytes,2,rep,name=aclSpec" json:"aclSpec,omitempty"` } -func (m *ModifyAclEntriesRequestProto) Reset() { *m = ModifyAclEntriesRequestProto{} } -func (m *ModifyAclEntriesRequestProto) String() string { return proto.CompactTextString(m) } -func (*ModifyAclEntriesRequestProto) ProtoMessage() {} -func (*ModifyAclEntriesRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{2} } +func (x *ModifyAclEntriesRequestProto) Reset() { + *x = ModifyAclEntriesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ModifyAclEntriesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModifyAclEntriesRequestProto) ProtoMessage() {} + +func (x *ModifyAclEntriesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyAclEntriesRequestProto.ProtoReflect.Descriptor instead. +func (*ModifyAclEntriesRequestProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{3} +} -func (m *ModifyAclEntriesRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *ModifyAclEntriesRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *ModifyAclEntriesRequestProto) GetAclSpec() []*AclEntryProto { - if m != nil { - return m.AclSpec +func (x *ModifyAclEntriesRequestProto) GetAclSpec() []*AclEntryProto { + if x != nil { + return x.AclSpec } return nil } type ModifyAclEntriesResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *ModifyAclEntriesResponseProto) Reset() { *m = ModifyAclEntriesResponseProto{} } -func (m *ModifyAclEntriesResponseProto) String() string { return proto.CompactTextString(m) } -func (*ModifyAclEntriesResponseProto) ProtoMessage() {} -func (*ModifyAclEntriesResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{3} } +func (x *ModifyAclEntriesResponseProto) Reset() { + *x = ModifyAclEntriesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ModifyAclEntriesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModifyAclEntriesResponseProto) ProtoMessage() {} + +func (x *ModifyAclEntriesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModifyAclEntriesResponseProto.ProtoReflect.Descriptor instead. +func (*ModifyAclEntriesResponseProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{4} +} type RemoveAclRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` +} + +func (x *RemoveAclRequestProto) Reset() { + *x = RemoveAclRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveAclRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveAclRequestProto) ProtoMessage() {} + +func (x *RemoveAclRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *RemoveAclRequestProto) Reset() { *m = RemoveAclRequestProto{} } -func (m *RemoveAclRequestProto) String() string { return proto.CompactTextString(m) } -func (*RemoveAclRequestProto) ProtoMessage() {} -func (*RemoveAclRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{4} } +// Deprecated: Use RemoveAclRequestProto.ProtoReflect.Descriptor instead. +func (*RemoveAclRequestProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{5} +} -func (m *RemoveAclRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *RemoveAclRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } type RemoveAclResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveAclResponseProto) Reset() { + *x = RemoveAclResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RemoveAclResponseProto) Reset() { *m = RemoveAclResponseProto{} } -func (m *RemoveAclResponseProto) String() string { return proto.CompactTextString(m) } -func (*RemoveAclResponseProto) ProtoMessage() {} -func (*RemoveAclResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{5} } +func (x *RemoveAclResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveAclResponseProto) ProtoMessage() {} + +func (x *RemoveAclResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveAclResponseProto.ProtoReflect.Descriptor instead. +func (*RemoveAclResponseProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{6} +} type RemoveAclEntriesRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - AclSpec []*AclEntryProto `protobuf:"bytes,2,rep,name=aclSpec" json:"aclSpec,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + AclSpec []*AclEntryProto `protobuf:"bytes,2,rep,name=aclSpec" json:"aclSpec,omitempty"` +} + +func (x *RemoveAclEntriesRequestProto) Reset() { + *x = RemoveAclEntriesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveAclEntriesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveAclEntriesRequestProto) ProtoMessage() {} + +func (x *RemoveAclEntriesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *RemoveAclEntriesRequestProto) Reset() { *m = RemoveAclEntriesRequestProto{} } -func (m *RemoveAclEntriesRequestProto) String() string { return proto.CompactTextString(m) } -func (*RemoveAclEntriesRequestProto) ProtoMessage() {} -func (*RemoveAclEntriesRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{6} } +// Deprecated: Use RemoveAclEntriesRequestProto.ProtoReflect.Descriptor instead. +func (*RemoveAclEntriesRequestProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{7} +} -func (m *RemoveAclEntriesRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *RemoveAclEntriesRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *RemoveAclEntriesRequestProto) GetAclSpec() []*AclEntryProto { - if m != nil { - return m.AclSpec +func (x *RemoveAclEntriesRequestProto) GetAclSpec() []*AclEntryProto { + if x != nil { + return x.AclSpec } return nil } type RemoveAclEntriesResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *RemoveAclEntriesResponseProto) Reset() { *m = RemoveAclEntriesResponseProto{} } -func (m *RemoveAclEntriesResponseProto) String() string { return proto.CompactTextString(m) } -func (*RemoveAclEntriesResponseProto) ProtoMessage() {} -func (*RemoveAclEntriesResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{7} } +func (x *RemoveAclEntriesResponseProto) Reset() { + *x = RemoveAclEntriesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveAclEntriesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveAclEntriesResponseProto) ProtoMessage() {} + +func (x *RemoveAclEntriesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveAclEntriesResponseProto.ProtoReflect.Descriptor instead. +func (*RemoveAclEntriesResponseProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{8} +} type RemoveDefaultAclRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` } -func (m *RemoveDefaultAclRequestProto) Reset() { *m = RemoveDefaultAclRequestProto{} } -func (m *RemoveDefaultAclRequestProto) String() string { return proto.CompactTextString(m) } -func (*RemoveDefaultAclRequestProto) ProtoMessage() {} -func (*RemoveDefaultAclRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{8} } +func (x *RemoveDefaultAclRequestProto) Reset() { + *x = RemoveDefaultAclRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *RemoveDefaultAclRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *RemoveDefaultAclRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveDefaultAclRequestProto) ProtoMessage() {} + +func (x *RemoveDefaultAclRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveDefaultAclRequestProto.ProtoReflect.Descriptor instead. +func (*RemoveDefaultAclRequestProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{9} +} + +func (x *RemoveDefaultAclRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } type RemoveDefaultAclResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveDefaultAclResponseProto) Reset() { + *x = RemoveDefaultAclResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveDefaultAclResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveDefaultAclResponseProto) ProtoMessage() {} + +func (x *RemoveDefaultAclResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *RemoveDefaultAclResponseProto) Reset() { *m = RemoveDefaultAclResponseProto{} } -func (m *RemoveDefaultAclResponseProto) String() string { return proto.CompactTextString(m) } -func (*RemoveDefaultAclResponseProto) ProtoMessage() {} -func (*RemoveDefaultAclResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{9} } +// Deprecated: Use RemoveDefaultAclResponseProto.ProtoReflect.Descriptor instead. +func (*RemoveDefaultAclResponseProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{10} +} type SetAclRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - AclSpec []*AclEntryProto `protobuf:"bytes,2,rep,name=aclSpec" json:"aclSpec,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + AclSpec []*AclEntryProto `protobuf:"bytes,2,rep,name=aclSpec" json:"aclSpec,omitempty"` +} + +func (x *SetAclRequestProto) Reset() { + *x = SetAclRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetAclRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetAclRequestProto) Reset() { *m = SetAclRequestProto{} } -func (m *SetAclRequestProto) String() string { return proto.CompactTextString(m) } -func (*SetAclRequestProto) ProtoMessage() {} -func (*SetAclRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{10} } +func (*SetAclRequestProto) ProtoMessage() {} -func (m *SetAclRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *SetAclRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetAclRequestProto.ProtoReflect.Descriptor instead. +func (*SetAclRequestProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{11} +} + +func (x *SetAclRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *SetAclRequestProto) GetAclSpec() []*AclEntryProto { - if m != nil { - return m.AclSpec +func (x *SetAclRequestProto) GetAclSpec() []*AclEntryProto { + if x != nil { + return x.AclSpec } return nil } type SetAclResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetAclResponseProto) Reset() { + *x = SetAclResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetAclResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetAclResponseProto) ProtoMessage() {} + +func (x *SetAclResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *SetAclResponseProto) Reset() { *m = SetAclResponseProto{} } -func (m *SetAclResponseProto) String() string { return proto.CompactTextString(m) } -func (*SetAclResponseProto) ProtoMessage() {} -func (*SetAclResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{11} } +// Deprecated: Use SetAclResponseProto.ProtoReflect.Descriptor instead. +func (*SetAclResponseProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{12} +} type GetAclStatusRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` +} + +func (x *GetAclStatusRequestProto) Reset() { + *x = GetAclStatusRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAclStatusRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetAclStatusRequestProto) Reset() { *m = GetAclStatusRequestProto{} } -func (m *GetAclStatusRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetAclStatusRequestProto) ProtoMessage() {} -func (*GetAclStatusRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{12} } +func (*GetAclStatusRequestProto) ProtoMessage() {} -func (m *GetAclStatusRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *GetAclStatusRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAclStatusRequestProto.ProtoReflect.Descriptor instead. +func (*GetAclStatusRequestProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{13} +} + +func (x *GetAclStatusRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } type GetAclStatusResponseProto struct { - Result *AclStatusProto `protobuf:"bytes,1,req,name=result" json:"result,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *AclStatusProto `protobuf:"bytes,1,req,name=result" json:"result,omitempty"` +} + +func (x *GetAclStatusResponseProto) Reset() { + *x = GetAclStatusResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_acl_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAclStatusResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetAclStatusResponseProto) Reset() { *m = GetAclStatusResponseProto{} } -func (m *GetAclStatusResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetAclStatusResponseProto) ProtoMessage() {} -func (*GetAclStatusResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{13} } +func (*GetAclStatusResponseProto) ProtoMessage() {} -func (m *GetAclStatusResponseProto) GetResult() *AclStatusProto { - if m != nil { - return m.Result +func (x *GetAclStatusResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_acl_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAclStatusResponseProto.ProtoReflect.Descriptor instead. +func (*GetAclStatusResponseProto) Descriptor() ([]byte, []int) { + return file_acl_proto_rawDescGZIP(), []int{14} +} + +func (x *GetAclStatusResponseProto) GetResult() *AclStatusProto { + if x != nil { + return x.Result } return nil } -func init() { - proto.RegisterType((*AclEntryProto)(nil), "hadoop.hdfs.AclEntryProto") - proto.RegisterType((*AclStatusProto)(nil), "hadoop.hdfs.AclStatusProto") - proto.RegisterType((*ModifyAclEntriesRequestProto)(nil), "hadoop.hdfs.ModifyAclEntriesRequestProto") - proto.RegisterType((*ModifyAclEntriesResponseProto)(nil), "hadoop.hdfs.ModifyAclEntriesResponseProto") - proto.RegisterType((*RemoveAclRequestProto)(nil), "hadoop.hdfs.RemoveAclRequestProto") - proto.RegisterType((*RemoveAclResponseProto)(nil), "hadoop.hdfs.RemoveAclResponseProto") - proto.RegisterType((*RemoveAclEntriesRequestProto)(nil), "hadoop.hdfs.RemoveAclEntriesRequestProto") - proto.RegisterType((*RemoveAclEntriesResponseProto)(nil), "hadoop.hdfs.RemoveAclEntriesResponseProto") - proto.RegisterType((*RemoveDefaultAclRequestProto)(nil), "hadoop.hdfs.RemoveDefaultAclRequestProto") - proto.RegisterType((*RemoveDefaultAclResponseProto)(nil), "hadoop.hdfs.RemoveDefaultAclResponseProto") - proto.RegisterType((*SetAclRequestProto)(nil), "hadoop.hdfs.SetAclRequestProto") - proto.RegisterType((*SetAclResponseProto)(nil), "hadoop.hdfs.SetAclResponseProto") - proto.RegisterType((*GetAclStatusRequestProto)(nil), "hadoop.hdfs.GetAclStatusRequestProto") - proto.RegisterType((*GetAclStatusResponseProto)(nil), "hadoop.hdfs.GetAclStatusResponseProto") - proto.RegisterEnum("hadoop.hdfs.AclEntryProto_AclEntryScopeProto", AclEntryProto_AclEntryScopeProto_name, AclEntryProto_AclEntryScopeProto_value) - proto.RegisterEnum("hadoop.hdfs.AclEntryProto_AclEntryTypeProto", AclEntryProto_AclEntryTypeProto_name, AclEntryProto_AclEntryTypeProto_value) - proto.RegisterEnum("hadoop.hdfs.AclEntryProto_FsActionProto", AclEntryProto_FsActionProto_name, AclEntryProto_FsActionProto_value) -} - -func init() { proto.RegisterFile("acl.proto", fileDescriptor9) } - -var fileDescriptor9 = []byte{ - // 605 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xdb, 0x6e, 0xd3, 0x40, - 0x10, 0xad, 0x63, 0x27, 0xad, 0xc7, 0x6d, 0xb5, 0x5d, 0x68, 0x65, 0x4a, 0x81, 0xc8, 0x12, 0x52, - 0x90, 0xda, 0x08, 0x05, 0x78, 0x04, 0xe1, 0xa6, 0xdb, 0x72, 0xe9, 0x25, 0x5a, 0x27, 0x82, 0x07, - 0xa4, 0xca, 0xda, 0x6e, 0x5a, 0x0b, 0xd7, 0x6b, 0xbc, 0x0e, 0x28, 0x2f, 0x7c, 0x0b, 0xdf, 0xc3, - 0x77, 0xf0, 0x21, 0xc8, 0xbb, 0x4e, 0x70, 0x88, 0x68, 0x10, 0x12, 0x2f, 0xd1, 0x5c, 0xce, 0x39, - 0x73, 0x46, 0x13, 0x2f, 0xd8, 0x21, 0x8b, 0xdb, 0x69, 0x26, 0x72, 0x81, 0x9d, 0xab, 0xf0, 0x42, - 0x88, 0xb4, 0x7d, 0x75, 0x31, 0x94, 0xdb, 0x50, 0xfc, 0xea, 0x86, 0xf7, 0xc3, 0x84, 0x35, 0x9f, - 0xc5, 0x24, 0xc9, 0xb3, 0x71, 0x4f, 0x41, 0x5f, 0x82, 0x95, 0x8f, 0x53, 0xee, 0x1a, 0xcd, 0x5a, - 0x6b, 0xbd, 0xb3, 0xdb, 0xae, 0x30, 0xdb, 0x33, 0xc8, 0x69, 0xd6, 0x1f, 0xa7, 0x5c, 0x55, 0xa8, - 0x62, 0xe2, 0x2e, 0xd4, 0x25, 0x13, 0x29, 0x77, 0x6b, 0x4a, 0x62, 0xef, 0x2f, 0x24, 0x82, 0x02, - 0xaf, 0x35, 0x34, 0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x33, 0x75, 0x68, 0x9b, 0xea, 0xa4, - 0xa8, 0x5e, 0x66, 0x62, 0x94, 0xaa, 0xdb, 0xd9, 0x54, 0x27, 0x78, 0x0b, 0x1a, 0x32, 0x8f, 0xd8, - 0xc7, 0xb1, 0xba, 0xc3, 0x0a, 0x2d, 0x33, 0xfc, 0x14, 0x96, 0x79, 0x92, 0x67, 0x11, 0x97, 0xae, - 0xd5, 0x34, 0x5b, 0x4e, 0x67, 0xfb, 0xcf, 0x07, 0xa2, 0x13, 0x28, 0x7e, 0x01, 0xf0, 0xeb, 0x3a, - 0x6e, 0xbd, 0x69, 0xb4, 0x9c, 0xce, 0xfd, 0x19, 0xe2, 0xa1, 0xec, 0x4d, 0x01, 0x9a, 0x5c, 0x61, - 0x78, 0x43, 0xd8, 0x39, 0x11, 0x17, 0xd1, 0x70, 0x5c, 0xea, 0x47, 0x5c, 0x52, 0xfe, 0x69, 0xc4, - 0x65, 0xae, 0x37, 0x43, 0x60, 0xca, 0x8c, 0x95, 0x7b, 0x15, 0x61, 0xe1, 0x33, 0x64, 0x71, 0x90, - 0x72, 0xe6, 0xd6, 0x16, 0xfb, 0x2c, 0xa1, 0xde, 0x03, 0xb8, 0x37, 0x3f, 0x47, 0xa6, 0x22, 0x91, - 0xfa, 0xfe, 0xde, 0x23, 0xd8, 0xa4, 0xfc, 0x5a, 0x7c, 0xe6, 0x3e, 0x8b, 0x6f, 0x76, 0xe0, 0xb9, - 0xb0, 0x55, 0x81, 0x56, 0x45, 0x86, 0xb0, 0x33, 0xed, 0xfc, 0xe7, 0x6d, 0xe6, 0xe7, 0x54, 0x8d, - 0x3c, 0x9e, 0x18, 0x39, 0xe0, 0xc3, 0x70, 0x14, 0xe7, 0x8b, 0x97, 0x9a, 0x4a, 0x56, 0x19, 0x55, - 0xc9, 0x0f, 0x80, 0x03, 0xbe, 0x58, 0xe8, 0x1f, 0x37, 0xda, 0x84, 0x5b, 0x13, 0xf5, 0xea, 0xd0, - 0x5d, 0x70, 0x8f, 0x54, 0x59, 0xff, 0xdb, 0x17, 0xec, 0xd0, 0x83, 0x3b, 0xb3, 0xe8, 0x8a, 0x14, - 0x7e, 0x02, 0x8d, 0x8c, 0xcb, 0x51, 0x9c, 0x2b, 0x86, 0xd3, 0xb9, 0xfb, 0xbb, 0xad, 0xca, 0x07, - 0x45, 0x4b, 0xe8, 0xfe, 0x33, 0x78, 0x28, 0xb2, 0xcb, 0x76, 0x98, 0x86, 0xec, 0x8a, 0xcf, 0x10, - 0xd4, 0x93, 0xcb, 0x44, 0xf9, 0x28, 0xef, 0xdb, 0x3e, 0x8b, 0x15, 0x55, 0x7e, 0x33, 0x8c, 0x9f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xf8, 0x89, 0x4e, 0xae, 0x05, 0x00, 0x00, +var File_acl_proto protoreflect.FileDescriptor + +var file_acl_proto_rawDesc = []byte{ + 0x0a, 0x09, 0x61, 0x63, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x22, 0x27, 0x0a, 0x11, 0x46, 0x73, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x65, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x65, 0x72, + 0x6d, 0x22, 0xe4, 0x03, 0x0a, 0x0d, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x40, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x0e, 0x32, 0x2c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x63, + 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x02, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x0b, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0e, 0x32, + 0x28, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x63, + 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x73, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2d, 0x0a, 0x12, 0x41, 0x63, + 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, + 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x22, 0x3d, 0x0a, 0x11, 0x41, 0x63, 0x6c, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, + 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x52, 0x4f, 0x55, + 0x50, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4d, 0x41, 0x53, 0x4b, 0x10, 0x02, 0x12, 0x09, 0x0a, + 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x03, 0x22, 0x7e, 0x0a, 0x0d, 0x46, 0x73, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, + 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x10, 0x01, + 0x12, 0x09, 0x0a, 0x05, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x57, + 0x52, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x10, 0x03, 0x12, 0x08, + 0x0a, 0x04, 0x52, 0x45, 0x41, 0x44, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x45, 0x41, 0x44, + 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, + 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x45, + 0x52, 0x4d, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x07, 0x22, 0xca, 0x01, 0x0a, 0x0e, 0x41, 0x63, 0x6c, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x69, 0x63, 0x6b, + 0x79, 0x18, 0x03, 0x20, 0x02, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x69, 0x63, 0x6b, 0x79, 0x12, + 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, + 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x65, 0x6e, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, 0x1c, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x41, + 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x63, 0x6c, 0x53, 0x70, + 0x65, 0x63, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x61, 0x63, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x22, 0x1f, 0x0a, + 0x1d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, + 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x66, 0x0a, 0x1c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x63, 0x6c, + 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x63, 0x6c, 0x53, 0x70, 0x65, 0x63, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x07, 0x61, 0x63, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x22, 0x1f, 0x0a, 0x1d, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x30, 0x0a, 0x1c, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, + 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x1f, + 0x0a, 0x1d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, + 0x63, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x5c, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x63, 0x6c, 0x53, 0x70, + 0x65, 0x63, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x61, 0x63, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x22, 0x15, 0x0a, + 0x13, 0x53, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2c, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, + 0x72, 0x63, 0x22, 0x50, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x33, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x63, + 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x42, 0x71, 0x0a, 0x25, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, + 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x09, 0x41, + 0x63, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, + 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, + 0x68, 0x64, 0x66, 0x73, 0xa0, 0x01, 0x01, +} + +var ( + file_acl_proto_rawDescOnce sync.Once + file_acl_proto_rawDescData = file_acl_proto_rawDesc +) + +func file_acl_proto_rawDescGZIP() []byte { + file_acl_proto_rawDescOnce.Do(func() { + file_acl_proto_rawDescData = protoimpl.X.CompressGZIP(file_acl_proto_rawDescData) + }) + return file_acl_proto_rawDescData +} + +var file_acl_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_acl_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_acl_proto_goTypes = []interface{}{ + (AclEntryProto_AclEntryScopeProto)(0), // 0: hadoop.hdfs.AclEntryProto.AclEntryScopeProto + (AclEntryProto_AclEntryTypeProto)(0), // 1: hadoop.hdfs.AclEntryProto.AclEntryTypeProto + (AclEntryProto_FsActionProto)(0), // 2: hadoop.hdfs.AclEntryProto.FsActionProto + (*FsPermissionProto)(nil), // 3: hadoop.hdfs.FsPermissionProto + (*AclEntryProto)(nil), // 4: hadoop.hdfs.AclEntryProto + (*AclStatusProto)(nil), // 5: hadoop.hdfs.AclStatusProto + (*ModifyAclEntriesRequestProto)(nil), // 6: hadoop.hdfs.ModifyAclEntriesRequestProto + (*ModifyAclEntriesResponseProto)(nil), // 7: hadoop.hdfs.ModifyAclEntriesResponseProto + (*RemoveAclRequestProto)(nil), // 8: hadoop.hdfs.RemoveAclRequestProto + (*RemoveAclResponseProto)(nil), // 9: hadoop.hdfs.RemoveAclResponseProto + (*RemoveAclEntriesRequestProto)(nil), // 10: hadoop.hdfs.RemoveAclEntriesRequestProto + (*RemoveAclEntriesResponseProto)(nil), // 11: hadoop.hdfs.RemoveAclEntriesResponseProto + (*RemoveDefaultAclRequestProto)(nil), // 12: hadoop.hdfs.RemoveDefaultAclRequestProto + (*RemoveDefaultAclResponseProto)(nil), // 13: hadoop.hdfs.RemoveDefaultAclResponseProto + (*SetAclRequestProto)(nil), // 14: hadoop.hdfs.SetAclRequestProto + (*SetAclResponseProto)(nil), // 15: hadoop.hdfs.SetAclResponseProto + (*GetAclStatusRequestProto)(nil), // 16: hadoop.hdfs.GetAclStatusRequestProto + (*GetAclStatusResponseProto)(nil), // 17: hadoop.hdfs.GetAclStatusResponseProto +} +var file_acl_proto_depIdxs = []int32{ + 1, // 0: hadoop.hdfs.AclEntryProto.type:type_name -> hadoop.hdfs.AclEntryProto.AclEntryTypeProto + 0, // 1: hadoop.hdfs.AclEntryProto.scope:type_name -> hadoop.hdfs.AclEntryProto.AclEntryScopeProto + 2, // 2: hadoop.hdfs.AclEntryProto.permissions:type_name -> hadoop.hdfs.AclEntryProto.FsActionProto + 4, // 3: hadoop.hdfs.AclStatusProto.entries:type_name -> hadoop.hdfs.AclEntryProto + 3, // 4: hadoop.hdfs.AclStatusProto.permission:type_name -> hadoop.hdfs.FsPermissionProto + 4, // 5: hadoop.hdfs.ModifyAclEntriesRequestProto.aclSpec:type_name -> hadoop.hdfs.AclEntryProto + 4, // 6: hadoop.hdfs.RemoveAclEntriesRequestProto.aclSpec:type_name -> hadoop.hdfs.AclEntryProto + 4, // 7: hadoop.hdfs.SetAclRequestProto.aclSpec:type_name -> hadoop.hdfs.AclEntryProto + 5, // 8: hadoop.hdfs.GetAclStatusResponseProto.result:type_name -> hadoop.hdfs.AclStatusProto + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_acl_proto_init() } +func file_acl_proto_init() { + if File_acl_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_acl_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FsPermissionProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AclEntryProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AclStatusProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModifyAclEntriesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModifyAclEntriesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveAclRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveAclResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveAclEntriesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveAclEntriesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveDefaultAclRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveDefaultAclResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetAclRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetAclResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAclStatusRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_acl_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAclStatusResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_acl_proto_rawDesc, + NumEnums: 3, + NumMessages: 15, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_acl_proto_goTypes, + DependencyIndexes: file_acl_proto_depIdxs, + EnumInfos: file_acl_proto_enumTypes, + MessageInfos: file_acl_proto_msgTypes, + }.Build() + File_acl_proto = out.File + file_acl_proto_rawDesc = nil + file_acl_proto_goTypes = nil + file_acl_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_hdfs/acl.proto b/internal/protocol/hadoop_hdfs/acl.proto index bb7fdb01..af978488 100644 --- a/internal/protocol/hadoop_hdfs/acl.proto +++ b/internal/protocol/hadoop_hdfs/acl.proto @@ -15,13 +15,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +syntax="proto2"; option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "AclProtos"; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; package hadoop.hdfs; -import "hdfs.proto"; +/** + * File or Directory permision - same spec as posix + */ +message FsPermissionProto { + required uint32 perm = 1; // Actually a short - only 16bits used +} message AclEntryProto { enum AclEntryScopeProto { diff --git a/internal/protocol/hadoop_hdfs/datatransfer.pb.go b/internal/protocol/hadoop_hdfs/datatransfer.pb.go index dc30b060..a78e0530 100644 --- a/internal/protocol/hadoop_hdfs/datatransfer.pb.go +++ b/internal/protocol/hadoop_hdfs/datatransfer.pb.go @@ -1,17 +1,47 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: datatransfer.proto package hadoop_hdfs -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import hadoop_common "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" +import ( + hadoop_common "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) // Status is a 4-bit enum type Status int32 @@ -25,61 +55,86 @@ const ( Status_ERROR_ACCESS_TOKEN Status = 5 Status_CHECKSUM_OK Status = 6 Status_ERROR_UNSUPPORTED Status = 7 - Status_OOB_RESTART Status = 8 - Status_OOB_RESERVED1 Status = 9 - Status_OOB_RESERVED2 Status = 10 - Status_OOB_RESERVED3 Status = 11 + Status_OOB_RESTART Status = 8 // Quick restart + Status_OOB_RESERVED1 Status = 9 // Reserved + Status_OOB_RESERVED2 Status = 10 // Reserved + Status_OOB_RESERVED3 Status = 11 // Reserved Status_IN_PROGRESS Status = 12 + Status_ERROR_BLOCK_PINNED Status = 13 ) -var Status_name = map[int32]string{ - 0: "SUCCESS", - 1: "ERROR", - 2: "ERROR_CHECKSUM", - 3: "ERROR_INVALID", - 4: "ERROR_EXISTS", - 5: "ERROR_ACCESS_TOKEN", - 6: "CHECKSUM_OK", - 7: "ERROR_UNSUPPORTED", - 8: "OOB_RESTART", - 9: "OOB_RESERVED1", - 10: "OOB_RESERVED2", - 11: "OOB_RESERVED3", - 12: "IN_PROGRESS", -} -var Status_value = map[string]int32{ - "SUCCESS": 0, - "ERROR": 1, - "ERROR_CHECKSUM": 2, - "ERROR_INVALID": 3, - "ERROR_EXISTS": 4, - "ERROR_ACCESS_TOKEN": 5, - "CHECKSUM_OK": 6, - "ERROR_UNSUPPORTED": 7, - "OOB_RESTART": 8, - "OOB_RESERVED1": 9, - "OOB_RESERVED2": 10, - "OOB_RESERVED3": 11, - "IN_PROGRESS": 12, -} +// Enum value maps for Status. +var ( + Status_name = map[int32]string{ + 0: "SUCCESS", + 1: "ERROR", + 2: "ERROR_CHECKSUM", + 3: "ERROR_INVALID", + 4: "ERROR_EXISTS", + 5: "ERROR_ACCESS_TOKEN", + 6: "CHECKSUM_OK", + 7: "ERROR_UNSUPPORTED", + 8: "OOB_RESTART", + 9: "OOB_RESERVED1", + 10: "OOB_RESERVED2", + 11: "OOB_RESERVED3", + 12: "IN_PROGRESS", + 13: "ERROR_BLOCK_PINNED", + } + Status_value = map[string]int32{ + "SUCCESS": 0, + "ERROR": 1, + "ERROR_CHECKSUM": 2, + "ERROR_INVALID": 3, + "ERROR_EXISTS": 4, + "ERROR_ACCESS_TOKEN": 5, + "CHECKSUM_OK": 6, + "ERROR_UNSUPPORTED": 7, + "OOB_RESTART": 8, + "OOB_RESERVED1": 9, + "OOB_RESERVED2": 10, + "OOB_RESERVED3": 11, + "IN_PROGRESS": 12, + "ERROR_BLOCK_PINNED": 13, + } +) func (x Status) Enum() *Status { p := new(Status) *p = x return p } + func (x Status) String() string { - return proto.EnumName(Status_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Status) Descriptor() protoreflect.EnumDescriptor { + return file_datatransfer_proto_enumTypes[0].Descriptor() +} + +func (Status) Type() protoreflect.EnumType { + return &file_datatransfer_proto_enumTypes[0] +} + +func (x Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *Status) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Status_value, data, "Status") + +// Deprecated: Do not use. +func (x *Status) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = Status(value) + *x = Status(num) return nil } -func (Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor5, []int{0} } + +// Deprecated: Use Status.Descriptor instead. +func (Status) EnumDescriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{0} +} type ShortCircuitFdResponse int32 @@ -88,32 +143,54 @@ const ( ShortCircuitFdResponse_USE_RECEIPT_VERIFICATION ShortCircuitFdResponse = 1 ) -var ShortCircuitFdResponse_name = map[int32]string{ - 0: "DO_NOT_USE_RECEIPT_VERIFICATION", - 1: "USE_RECEIPT_VERIFICATION", -} -var ShortCircuitFdResponse_value = map[string]int32{ - "DO_NOT_USE_RECEIPT_VERIFICATION": 0, - "USE_RECEIPT_VERIFICATION": 1, -} +// Enum value maps for ShortCircuitFdResponse. +var ( + ShortCircuitFdResponse_name = map[int32]string{ + 0: "DO_NOT_USE_RECEIPT_VERIFICATION", + 1: "USE_RECEIPT_VERIFICATION", + } + ShortCircuitFdResponse_value = map[string]int32{ + "DO_NOT_USE_RECEIPT_VERIFICATION": 0, + "USE_RECEIPT_VERIFICATION": 1, + } +) func (x ShortCircuitFdResponse) Enum() *ShortCircuitFdResponse { p := new(ShortCircuitFdResponse) *p = x return p } + func (x ShortCircuitFdResponse) String() string { - return proto.EnumName(ShortCircuitFdResponse_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ShortCircuitFdResponse) Descriptor() protoreflect.EnumDescriptor { + return file_datatransfer_proto_enumTypes[1].Descriptor() } -func (x *ShortCircuitFdResponse) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(ShortCircuitFdResponse_value, data, "ShortCircuitFdResponse") + +func (ShortCircuitFdResponse) Type() protoreflect.EnumType { + return &file_datatransfer_proto_enumTypes[1] +} + +func (x ShortCircuitFdResponse) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *ShortCircuitFdResponse) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = ShortCircuitFdResponse(value) + *x = ShortCircuitFdResponse(num) return nil } -func (ShortCircuitFdResponse) EnumDescriptor() ([]byte, []int) { return fileDescriptor5, []int{1} } + +// Deprecated: Use ShortCircuitFdResponse.Descriptor instead. +func (ShortCircuitFdResponse) EnumDescriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{1} +} type DataTransferEncryptorMessageProto_DataTransferEncryptorStatus int32 @@ -123,35 +200,55 @@ const ( DataTransferEncryptorMessageProto_ERROR DataTransferEncryptorMessageProto_DataTransferEncryptorStatus = 2 ) -var DataTransferEncryptorMessageProto_DataTransferEncryptorStatus_name = map[int32]string{ - 0: "SUCCESS", - 1: "ERROR_UNKNOWN_KEY", - 2: "ERROR", -} -var DataTransferEncryptorMessageProto_DataTransferEncryptorStatus_value = map[string]int32{ - "SUCCESS": 0, - "ERROR_UNKNOWN_KEY": 1, - "ERROR": 2, -} +// Enum value maps for DataTransferEncryptorMessageProto_DataTransferEncryptorStatus. +var ( + DataTransferEncryptorMessageProto_DataTransferEncryptorStatus_name = map[int32]string{ + 0: "SUCCESS", + 1: "ERROR_UNKNOWN_KEY", + 2: "ERROR", + } + DataTransferEncryptorMessageProto_DataTransferEncryptorStatus_value = map[string]int32{ + "SUCCESS": 0, + "ERROR_UNKNOWN_KEY": 1, + "ERROR": 2, + } +) func (x DataTransferEncryptorMessageProto_DataTransferEncryptorStatus) Enum() *DataTransferEncryptorMessageProto_DataTransferEncryptorStatus { p := new(DataTransferEncryptorMessageProto_DataTransferEncryptorStatus) *p = x return p } + func (x DataTransferEncryptorMessageProto_DataTransferEncryptorStatus) String() string { - return proto.EnumName(DataTransferEncryptorMessageProto_DataTransferEncryptorStatus_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DataTransferEncryptorMessageProto_DataTransferEncryptorStatus) Descriptor() protoreflect.EnumDescriptor { + return file_datatransfer_proto_enumTypes[2].Descriptor() +} + +func (DataTransferEncryptorMessageProto_DataTransferEncryptorStatus) Type() protoreflect.EnumType { + return &file_datatransfer_proto_enumTypes[2] } -func (x *DataTransferEncryptorMessageProto_DataTransferEncryptorStatus) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(DataTransferEncryptorMessageProto_DataTransferEncryptorStatus_value, data, "DataTransferEncryptorMessageProto_DataTransferEncryptorStatus") + +func (x DataTransferEncryptorMessageProto_DataTransferEncryptorStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *DataTransferEncryptorMessageProto_DataTransferEncryptorStatus) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = DataTransferEncryptorMessageProto_DataTransferEncryptorStatus(value) + *x = DataTransferEncryptorMessageProto_DataTransferEncryptorStatus(num) return nil } + +// Deprecated: Use DataTransferEncryptorMessageProto_DataTransferEncryptorStatus.Descriptor instead. func (DataTransferEncryptorMessageProto_DataTransferEncryptorStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor5, []int{0, 0} + return file_datatransfer_proto_rawDescGZIP(), []int{0, 0} } type OpWriteBlockProto_BlockConstructionStage int32 @@ -176,277 +273,575 @@ const ( OpWriteBlockProto_TRANSFER_FINALIZED OpWriteBlockProto_BlockConstructionStage = 8 ) -var OpWriteBlockProto_BlockConstructionStage_name = map[int32]string{ - 0: "PIPELINE_SETUP_APPEND", - 1: "PIPELINE_SETUP_APPEND_RECOVERY", - 2: "DATA_STREAMING", - 3: "PIPELINE_SETUP_STREAMING_RECOVERY", - 4: "PIPELINE_CLOSE", - 5: "PIPELINE_CLOSE_RECOVERY", - 6: "PIPELINE_SETUP_CREATE", - 7: "TRANSFER_RBW", - 8: "TRANSFER_FINALIZED", -} -var OpWriteBlockProto_BlockConstructionStage_value = map[string]int32{ - "PIPELINE_SETUP_APPEND": 0, - "PIPELINE_SETUP_APPEND_RECOVERY": 1, - "DATA_STREAMING": 2, - "PIPELINE_SETUP_STREAMING_RECOVERY": 3, - "PIPELINE_CLOSE": 4, - "PIPELINE_CLOSE_RECOVERY": 5, - "PIPELINE_SETUP_CREATE": 6, - "TRANSFER_RBW": 7, - "TRANSFER_FINALIZED": 8, -} +// Enum value maps for OpWriteBlockProto_BlockConstructionStage. +var ( + OpWriteBlockProto_BlockConstructionStage_name = map[int32]string{ + 0: "PIPELINE_SETUP_APPEND", + 1: "PIPELINE_SETUP_APPEND_RECOVERY", + 2: "DATA_STREAMING", + 3: "PIPELINE_SETUP_STREAMING_RECOVERY", + 4: "PIPELINE_CLOSE", + 5: "PIPELINE_CLOSE_RECOVERY", + 6: "PIPELINE_SETUP_CREATE", + 7: "TRANSFER_RBW", + 8: "TRANSFER_FINALIZED", + } + OpWriteBlockProto_BlockConstructionStage_value = map[string]int32{ + "PIPELINE_SETUP_APPEND": 0, + "PIPELINE_SETUP_APPEND_RECOVERY": 1, + "DATA_STREAMING": 2, + "PIPELINE_SETUP_STREAMING_RECOVERY": 3, + "PIPELINE_CLOSE": 4, + "PIPELINE_CLOSE_RECOVERY": 5, + "PIPELINE_SETUP_CREATE": 6, + "TRANSFER_RBW": 7, + "TRANSFER_FINALIZED": 8, + } +) func (x OpWriteBlockProto_BlockConstructionStage) Enum() *OpWriteBlockProto_BlockConstructionStage { p := new(OpWriteBlockProto_BlockConstructionStage) *p = x return p } + func (x OpWriteBlockProto_BlockConstructionStage) String() string { - return proto.EnumName(OpWriteBlockProto_BlockConstructionStage_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OpWriteBlockProto_BlockConstructionStage) Descriptor() protoreflect.EnumDescriptor { + return file_datatransfer_proto_enumTypes[3].Descriptor() +} + +func (OpWriteBlockProto_BlockConstructionStage) Type() protoreflect.EnumType { + return &file_datatransfer_proto_enumTypes[3] +} + +func (x OpWriteBlockProto_BlockConstructionStage) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *OpWriteBlockProto_BlockConstructionStage) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(OpWriteBlockProto_BlockConstructionStage_value, data, "OpWriteBlockProto_BlockConstructionStage") + +// Deprecated: Do not use. +func (x *OpWriteBlockProto_BlockConstructionStage) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = OpWriteBlockProto_BlockConstructionStage(value) + *x = OpWriteBlockProto_BlockConstructionStage(num) return nil } + +// Deprecated: Use OpWriteBlockProto_BlockConstructionStage.Descriptor instead. func (OpWriteBlockProto_BlockConstructionStage) EnumDescriptor() ([]byte, []int) { - return fileDescriptor5, []int{7, 0} + return file_datatransfer_proto_rawDescGZIP(), []int{8, 0} } type DataTransferEncryptorMessageProto struct { - Status *DataTransferEncryptorMessageProto_DataTransferEncryptorStatus `protobuf:"varint,1,req,name=status,enum=hadoop.hdfs.DataTransferEncryptorMessageProto_DataTransferEncryptorStatus" json:"status,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload" json:"payload,omitempty"` - Message *string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` - CipherOption []*CipherOptionProto `protobuf:"bytes,4,rep,name=cipherOption" json:"cipherOption,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *DataTransferEncryptorMessageProto_DataTransferEncryptorStatus `protobuf:"varint,1,req,name=status,enum=hadoop.hdfs.DataTransferEncryptorMessageProto_DataTransferEncryptorStatus" json:"status,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload" json:"payload,omitempty"` + Message *string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` + CipherOption []*CipherOptionProto `protobuf:"bytes,4,rep,name=cipherOption" json:"cipherOption,omitempty"` + HandshakeSecret *HandshakeSecretProto `protobuf:"bytes,5,opt,name=handshakeSecret" json:"handshakeSecret,omitempty"` +} + +func (x *DataTransferEncryptorMessageProto) Reset() { + *x = DataTransferEncryptorMessageProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DataTransferEncryptorMessageProto) Reset() { *m = DataTransferEncryptorMessageProto{} } -func (m *DataTransferEncryptorMessageProto) String() string { return proto.CompactTextString(m) } -func (*DataTransferEncryptorMessageProto) ProtoMessage() {} +func (x *DataTransferEncryptorMessageProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataTransferEncryptorMessageProto) ProtoMessage() {} + +func (x *DataTransferEncryptorMessageProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataTransferEncryptorMessageProto.ProtoReflect.Descriptor instead. func (*DataTransferEncryptorMessageProto) Descriptor() ([]byte, []int) { - return fileDescriptor5, []int{0} + return file_datatransfer_proto_rawDescGZIP(), []int{0} } -func (m *DataTransferEncryptorMessageProto) GetStatus() DataTransferEncryptorMessageProto_DataTransferEncryptorStatus { - if m != nil && m.Status != nil { - return *m.Status +func (x *DataTransferEncryptorMessageProto) GetStatus() DataTransferEncryptorMessageProto_DataTransferEncryptorStatus { + if x != nil && x.Status != nil { + return *x.Status } return DataTransferEncryptorMessageProto_SUCCESS } -func (m *DataTransferEncryptorMessageProto) GetPayload() []byte { - if m != nil { - return m.Payload +func (x *DataTransferEncryptorMessageProto) GetPayload() []byte { + if x != nil { + return x.Payload } return nil } -func (m *DataTransferEncryptorMessageProto) GetMessage() string { - if m != nil && m.Message != nil { - return *m.Message +func (x *DataTransferEncryptorMessageProto) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message } return "" } -func (m *DataTransferEncryptorMessageProto) GetCipherOption() []*CipherOptionProto { - if m != nil { - return m.CipherOption +func (x *DataTransferEncryptorMessageProto) GetCipherOption() []*CipherOptionProto { + if x != nil { + return x.CipherOption + } + return nil +} + +func (x *DataTransferEncryptorMessageProto) GetHandshakeSecret() *HandshakeSecretProto { + if x != nil { + return x.HandshakeSecret } return nil } +type HandshakeSecretProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Secret []byte `protobuf:"bytes,1,req,name=secret" json:"secret,omitempty"` + Bpid *string `protobuf:"bytes,2,req,name=bpid" json:"bpid,omitempty"` +} + +func (x *HandshakeSecretProto) Reset() { + *x = HandshakeSecretProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HandshakeSecretProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HandshakeSecretProto) ProtoMessage() {} + +func (x *HandshakeSecretProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HandshakeSecretProto.ProtoReflect.Descriptor instead. +func (*HandshakeSecretProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{1} +} + +func (x *HandshakeSecretProto) GetSecret() []byte { + if x != nil { + return x.Secret + } + return nil +} + +func (x *HandshakeSecretProto) GetBpid() string { + if x != nil && x.Bpid != nil { + return *x.Bpid + } + return "" +} + type BaseHeaderProto struct { - Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` - Token *hadoop_common.TokenProto `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` - TraceInfo *DataTransferTraceInfoProto `protobuf:"bytes,3,opt,name=traceInfo" json:"traceInfo,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` + Token *hadoop_common.TokenProto `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` + TraceInfo *DataTransferTraceInfoProto `protobuf:"bytes,3,opt,name=traceInfo" json:"traceInfo,omitempty"` } -func (m *BaseHeaderProto) Reset() { *m = BaseHeaderProto{} } -func (m *BaseHeaderProto) String() string { return proto.CompactTextString(m) } -func (*BaseHeaderProto) ProtoMessage() {} -func (*BaseHeaderProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{1} } +func (x *BaseHeaderProto) Reset() { + *x = BaseHeaderProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *BaseHeaderProto) GetBlock() *ExtendedBlockProto { - if m != nil { - return m.Block +func (x *BaseHeaderProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BaseHeaderProto) ProtoMessage() {} + +func (x *BaseHeaderProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BaseHeaderProto.ProtoReflect.Descriptor instead. +func (*BaseHeaderProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{2} +} + +func (x *BaseHeaderProto) GetBlock() *ExtendedBlockProto { + if x != nil { + return x.Block } return nil } -func (m *BaseHeaderProto) GetToken() *hadoop_common.TokenProto { - if m != nil { - return m.Token +func (x *BaseHeaderProto) GetToken() *hadoop_common.TokenProto { + if x != nil { + return x.Token } return nil } -func (m *BaseHeaderProto) GetTraceInfo() *DataTransferTraceInfoProto { - if m != nil { - return m.TraceInfo +func (x *BaseHeaderProto) GetTraceInfo() *DataTransferTraceInfoProto { + if x != nil { + return x.TraceInfo } return nil } type DataTransferTraceInfoProto struct { - TraceId *uint64 `protobuf:"varint,1,req,name=traceId" json:"traceId,omitempty"` - ParentId *uint64 `protobuf:"varint,2,req,name=parentId" json:"parentId,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TraceId *uint64 `protobuf:"varint,1,req,name=traceId" json:"traceId,omitempty"` + ParentId *uint64 `protobuf:"varint,2,req,name=parentId" json:"parentId,omitempty"` +} + +func (x *DataTransferTraceInfoProto) Reset() { + *x = DataTransferTraceInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataTransferTraceInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DataTransferTraceInfoProto) Reset() { *m = DataTransferTraceInfoProto{} } -func (m *DataTransferTraceInfoProto) String() string { return proto.CompactTextString(m) } -func (*DataTransferTraceInfoProto) ProtoMessage() {} -func (*DataTransferTraceInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{2} } +func (*DataTransferTraceInfoProto) ProtoMessage() {} -func (m *DataTransferTraceInfoProto) GetTraceId() uint64 { - if m != nil && m.TraceId != nil { - return *m.TraceId +func (x *DataTransferTraceInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataTransferTraceInfoProto.ProtoReflect.Descriptor instead. +func (*DataTransferTraceInfoProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{3} +} + +func (x *DataTransferTraceInfoProto) GetTraceId() uint64 { + if x != nil && x.TraceId != nil { + return *x.TraceId } return 0 } -func (m *DataTransferTraceInfoProto) GetParentId() uint64 { - if m != nil && m.ParentId != nil { - return *m.ParentId +func (x *DataTransferTraceInfoProto) GetParentId() uint64 { + if x != nil && x.ParentId != nil { + return *x.ParentId } return 0 } type ClientOperationHeaderProto struct { - BaseHeader *BaseHeaderProto `protobuf:"bytes,1,req,name=baseHeader" json:"baseHeader,omitempty"` - ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BaseHeader *BaseHeaderProto `protobuf:"bytes,1,req,name=baseHeader" json:"baseHeader,omitempty"` + ClientName *string `protobuf:"bytes,2,req,name=clientName" json:"clientName,omitempty"` +} + +func (x *ClientOperationHeaderProto) Reset() { + *x = ClientOperationHeaderProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientOperationHeaderProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientOperationHeaderProto) ProtoMessage() {} + +func (x *ClientOperationHeaderProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ClientOperationHeaderProto) Reset() { *m = ClientOperationHeaderProto{} } -func (m *ClientOperationHeaderProto) String() string { return proto.CompactTextString(m) } -func (*ClientOperationHeaderProto) ProtoMessage() {} -func (*ClientOperationHeaderProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{3} } +// Deprecated: Use ClientOperationHeaderProto.ProtoReflect.Descriptor instead. +func (*ClientOperationHeaderProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{4} +} -func (m *ClientOperationHeaderProto) GetBaseHeader() *BaseHeaderProto { - if m != nil { - return m.BaseHeader +func (x *ClientOperationHeaderProto) GetBaseHeader() *BaseHeaderProto { + if x != nil { + return x.BaseHeader } return nil } -func (m *ClientOperationHeaderProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName +func (x *ClientOperationHeaderProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName } return "" } type CachingStrategyProto struct { - DropBehind *bool `protobuf:"varint,1,opt,name=dropBehind" json:"dropBehind,omitempty"` - Readahead *int64 `protobuf:"varint,2,opt,name=readahead" json:"readahead,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DropBehind *bool `protobuf:"varint,1,opt,name=dropBehind" json:"dropBehind,omitempty"` + Readahead *int64 `protobuf:"varint,2,opt,name=readahead" json:"readahead,omitempty"` +} + +func (x *CachingStrategyProto) Reset() { + *x = CachingStrategyProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CachingStrategyProto) Reset() { *m = CachingStrategyProto{} } -func (m *CachingStrategyProto) String() string { return proto.CompactTextString(m) } -func (*CachingStrategyProto) ProtoMessage() {} -func (*CachingStrategyProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{4} } +func (x *CachingStrategyProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CachingStrategyProto) ProtoMessage() {} + +func (x *CachingStrategyProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CachingStrategyProto.ProtoReflect.Descriptor instead. +func (*CachingStrategyProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{5} +} -func (m *CachingStrategyProto) GetDropBehind() bool { - if m != nil && m.DropBehind != nil { - return *m.DropBehind +func (x *CachingStrategyProto) GetDropBehind() bool { + if x != nil && x.DropBehind != nil { + return *x.DropBehind } return false } -func (m *CachingStrategyProto) GetReadahead() int64 { - if m != nil && m.Readahead != nil { - return *m.Readahead +func (x *CachingStrategyProto) GetReadahead() int64 { + if x != nil && x.Readahead != nil { + return *x.Readahead } return 0 } type OpReadBlockProto struct { - Header *ClientOperationHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` - Offset *uint64 `protobuf:"varint,2,req,name=offset" json:"offset,omitempty"` - Len *uint64 `protobuf:"varint,3,req,name=len" json:"len,omitempty"` - SendChecksums *bool `protobuf:"varint,4,opt,name=sendChecksums,def=1" json:"sendChecksums,omitempty"` - CachingStrategy *CachingStrategyProto `protobuf:"bytes,5,opt,name=cachingStrategy" json:"cachingStrategy,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *ClientOperationHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` + Offset *uint64 `protobuf:"varint,2,req,name=offset" json:"offset,omitempty"` + Len *uint64 `protobuf:"varint,3,req,name=len" json:"len,omitempty"` + SendChecksums *bool `protobuf:"varint,4,opt,name=sendChecksums,def=1" json:"sendChecksums,omitempty"` + CachingStrategy *CachingStrategyProto `protobuf:"bytes,5,opt,name=cachingStrategy" json:"cachingStrategy,omitempty"` +} + +// Default values for OpReadBlockProto fields. +const ( + Default_OpReadBlockProto_SendChecksums = bool(true) +) + +func (x *OpReadBlockProto) Reset() { + *x = OpReadBlockProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *OpReadBlockProto) Reset() { *m = OpReadBlockProto{} } -func (m *OpReadBlockProto) String() string { return proto.CompactTextString(m) } -func (*OpReadBlockProto) ProtoMessage() {} -func (*OpReadBlockProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{5} } +func (x *OpReadBlockProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -const Default_OpReadBlockProto_SendChecksums bool = true +func (*OpReadBlockProto) ProtoMessage() {} -func (m *OpReadBlockProto) GetHeader() *ClientOperationHeaderProto { - if m != nil { - return m.Header +func (x *OpReadBlockProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpReadBlockProto.ProtoReflect.Descriptor instead. +func (*OpReadBlockProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{6} +} + +func (x *OpReadBlockProto) GetHeader() *ClientOperationHeaderProto { + if x != nil { + return x.Header } return nil } -func (m *OpReadBlockProto) GetOffset() uint64 { - if m != nil && m.Offset != nil { - return *m.Offset +func (x *OpReadBlockProto) GetOffset() uint64 { + if x != nil && x.Offset != nil { + return *x.Offset } return 0 } -func (m *OpReadBlockProto) GetLen() uint64 { - if m != nil && m.Len != nil { - return *m.Len +func (x *OpReadBlockProto) GetLen() uint64 { + if x != nil && x.Len != nil { + return *x.Len } return 0 } -func (m *OpReadBlockProto) GetSendChecksums() bool { - if m != nil && m.SendChecksums != nil { - return *m.SendChecksums +func (x *OpReadBlockProto) GetSendChecksums() bool { + if x != nil && x.SendChecksums != nil { + return *x.SendChecksums } return Default_OpReadBlockProto_SendChecksums } -func (m *OpReadBlockProto) GetCachingStrategy() *CachingStrategyProto { - if m != nil { - return m.CachingStrategy +func (x *OpReadBlockProto) GetCachingStrategy() *CachingStrategyProto { + if x != nil { + return x.CachingStrategy } return nil } type ChecksumProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Type *ChecksumTypeProto `protobuf:"varint,1,req,name=type,enum=hadoop.hdfs.ChecksumTypeProto" json:"type,omitempty"` BytesPerChecksum *uint32 `protobuf:"varint,2,req,name=bytesPerChecksum" json:"bytesPerChecksum,omitempty"` - XXX_unrecognized []byte `json:"-"` } -func (m *ChecksumProto) Reset() { *m = ChecksumProto{} } -func (m *ChecksumProto) String() string { return proto.CompactTextString(m) } -func (*ChecksumProto) ProtoMessage() {} -func (*ChecksumProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{6} } +func (x *ChecksumProto) Reset() { + *x = ChecksumProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChecksumProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *ChecksumProto) GetType() ChecksumTypeProto { - if m != nil && m.Type != nil { - return *m.Type +func (*ChecksumProto) ProtoMessage() {} + +func (x *ChecksumProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChecksumProto.ProtoReflect.Descriptor instead. +func (*ChecksumProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{7} +} + +func (x *ChecksumProto) GetType() ChecksumTypeProto { + if x != nil && x.Type != nil { + return *x.Type } return ChecksumTypeProto_CHECKSUM_NULL } -func (m *ChecksumProto) GetBytesPerChecksum() uint32 { - if m != nil && m.BytesPerChecksum != nil { - return *m.BytesPerChecksum +func (x *ChecksumProto) GetBytesPerChecksum() uint32 { + if x != nil && x.BytesPerChecksum != nil { + return *x.BytesPerChecksum } return 0 } type OpWriteBlockProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Header *ClientOperationHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` Targets []*DatanodeInfoProto `protobuf:"bytes,2,rep,name=targets" json:"targets,omitempty"` Source *DatanodeInfoProto `protobuf:"bytes,3,opt,name=source" json:"source,omitempty"` @@ -455,648 +850,1199 @@ type OpWriteBlockProto struct { MinBytesRcvd *uint64 `protobuf:"varint,6,req,name=minBytesRcvd" json:"minBytesRcvd,omitempty"` MaxBytesRcvd *uint64 `protobuf:"varint,7,req,name=maxBytesRcvd" json:"maxBytesRcvd,omitempty"` LatestGenerationStamp *uint64 `protobuf:"varint,8,req,name=latestGenerationStamp" json:"latestGenerationStamp,omitempty"` - // * + //* // The requested checksum mechanism for this block write. RequestedChecksum *ChecksumProto `protobuf:"bytes,9,req,name=requestedChecksum" json:"requestedChecksum,omitempty"` CachingStrategy *CachingStrategyProto `protobuf:"bytes,10,opt,name=cachingStrategy" json:"cachingStrategy,omitempty"` StorageType *StorageTypeProto `protobuf:"varint,11,opt,name=storageType,enum=hadoop.hdfs.StorageTypeProto,def=1" json:"storageType,omitempty"` TargetStorageTypes []StorageTypeProto `protobuf:"varint,12,rep,name=targetStorageTypes,enum=hadoop.hdfs.StorageTypeProto" json:"targetStorageTypes,omitempty"` - // * + //* // Hint to the DataNode that the block can be allocated on transient // storage i.e. memory and written to disk lazily. The DataNode is free // to ignore this hint. AllowLazyPersist *bool `protobuf:"varint,13,opt,name=allowLazyPersist,def=0" json:"allowLazyPersist,omitempty"` - // whether to pin the block, so Balancer won't move it. - Pinning *bool `protobuf:"varint,14,opt,name=pinning,def=0" json:"pinning,omitempty"` - TargetPinnings []bool `protobuf:"varint,15,rep,name=targetPinnings" json:"targetPinnings,omitempty"` - XXX_unrecognized []byte `json:"-"` + //whether to pin the block, so Balancer won't move it. + Pinning *bool `protobuf:"varint,14,opt,name=pinning,def=0" json:"pinning,omitempty"` + TargetPinnings []bool `protobuf:"varint,15,rep,name=targetPinnings" json:"targetPinnings,omitempty"` + StorageId *string `protobuf:"bytes,16,opt,name=storageId" json:"storageId,omitempty"` + TargetStorageIds []string `protobuf:"bytes,17,rep,name=targetStorageIds" json:"targetStorageIds,omitempty"` +} + +// Default values for OpWriteBlockProto fields. +const ( + Default_OpWriteBlockProto_StorageType = StorageTypeProto_DISK + Default_OpWriteBlockProto_AllowLazyPersist = bool(false) + Default_OpWriteBlockProto_Pinning = bool(false) +) + +func (x *OpWriteBlockProto) Reset() { + *x = OpWriteBlockProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *OpWriteBlockProto) Reset() { *m = OpWriteBlockProto{} } -func (m *OpWriteBlockProto) String() string { return proto.CompactTextString(m) } -func (*OpWriteBlockProto) ProtoMessage() {} -func (*OpWriteBlockProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{7} } +func (x *OpWriteBlockProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpWriteBlockProto) ProtoMessage() {} + +func (x *OpWriteBlockProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} -const Default_OpWriteBlockProto_StorageType StorageTypeProto = StorageTypeProto_DISK -const Default_OpWriteBlockProto_AllowLazyPersist bool = false -const Default_OpWriteBlockProto_Pinning bool = false +// Deprecated: Use OpWriteBlockProto.ProtoReflect.Descriptor instead. +func (*OpWriteBlockProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{8} +} -func (m *OpWriteBlockProto) GetHeader() *ClientOperationHeaderProto { - if m != nil { - return m.Header +func (x *OpWriteBlockProto) GetHeader() *ClientOperationHeaderProto { + if x != nil { + return x.Header } return nil } -func (m *OpWriteBlockProto) GetTargets() []*DatanodeInfoProto { - if m != nil { - return m.Targets +func (x *OpWriteBlockProto) GetTargets() []*DatanodeInfoProto { + if x != nil { + return x.Targets } return nil } -func (m *OpWriteBlockProto) GetSource() *DatanodeInfoProto { - if m != nil { - return m.Source +func (x *OpWriteBlockProto) GetSource() *DatanodeInfoProto { + if x != nil { + return x.Source } return nil } -func (m *OpWriteBlockProto) GetStage() OpWriteBlockProto_BlockConstructionStage { - if m != nil && m.Stage != nil { - return *m.Stage +func (x *OpWriteBlockProto) GetStage() OpWriteBlockProto_BlockConstructionStage { + if x != nil && x.Stage != nil { + return *x.Stage } return OpWriteBlockProto_PIPELINE_SETUP_APPEND } -func (m *OpWriteBlockProto) GetPipelineSize() uint32 { - if m != nil && m.PipelineSize != nil { - return *m.PipelineSize +func (x *OpWriteBlockProto) GetPipelineSize() uint32 { + if x != nil && x.PipelineSize != nil { + return *x.PipelineSize } return 0 } -func (m *OpWriteBlockProto) GetMinBytesRcvd() uint64 { - if m != nil && m.MinBytesRcvd != nil { - return *m.MinBytesRcvd +func (x *OpWriteBlockProto) GetMinBytesRcvd() uint64 { + if x != nil && x.MinBytesRcvd != nil { + return *x.MinBytesRcvd } return 0 } -func (m *OpWriteBlockProto) GetMaxBytesRcvd() uint64 { - if m != nil && m.MaxBytesRcvd != nil { - return *m.MaxBytesRcvd +func (x *OpWriteBlockProto) GetMaxBytesRcvd() uint64 { + if x != nil && x.MaxBytesRcvd != nil { + return *x.MaxBytesRcvd } return 0 } -func (m *OpWriteBlockProto) GetLatestGenerationStamp() uint64 { - if m != nil && m.LatestGenerationStamp != nil { - return *m.LatestGenerationStamp +func (x *OpWriteBlockProto) GetLatestGenerationStamp() uint64 { + if x != nil && x.LatestGenerationStamp != nil { + return *x.LatestGenerationStamp } return 0 } -func (m *OpWriteBlockProto) GetRequestedChecksum() *ChecksumProto { - if m != nil { - return m.RequestedChecksum +func (x *OpWriteBlockProto) GetRequestedChecksum() *ChecksumProto { + if x != nil { + return x.RequestedChecksum } return nil } -func (m *OpWriteBlockProto) GetCachingStrategy() *CachingStrategyProto { - if m != nil { - return m.CachingStrategy +func (x *OpWriteBlockProto) GetCachingStrategy() *CachingStrategyProto { + if x != nil { + return x.CachingStrategy } return nil } -func (m *OpWriteBlockProto) GetStorageType() StorageTypeProto { - if m != nil && m.StorageType != nil { - return *m.StorageType +func (x *OpWriteBlockProto) GetStorageType() StorageTypeProto { + if x != nil && x.StorageType != nil { + return *x.StorageType } return Default_OpWriteBlockProto_StorageType } -func (m *OpWriteBlockProto) GetTargetStorageTypes() []StorageTypeProto { - if m != nil { - return m.TargetStorageTypes +func (x *OpWriteBlockProto) GetTargetStorageTypes() []StorageTypeProto { + if x != nil { + return x.TargetStorageTypes } return nil } -func (m *OpWriteBlockProto) GetAllowLazyPersist() bool { - if m != nil && m.AllowLazyPersist != nil { - return *m.AllowLazyPersist +func (x *OpWriteBlockProto) GetAllowLazyPersist() bool { + if x != nil && x.AllowLazyPersist != nil { + return *x.AllowLazyPersist } return Default_OpWriteBlockProto_AllowLazyPersist } -func (m *OpWriteBlockProto) GetPinning() bool { - if m != nil && m.Pinning != nil { - return *m.Pinning +func (x *OpWriteBlockProto) GetPinning() bool { + if x != nil && x.Pinning != nil { + return *x.Pinning } return Default_OpWriteBlockProto_Pinning } -func (m *OpWriteBlockProto) GetTargetPinnings() []bool { - if m != nil { - return m.TargetPinnings +func (x *OpWriteBlockProto) GetTargetPinnings() []bool { + if x != nil { + return x.TargetPinnings + } + return nil +} + +func (x *OpWriteBlockProto) GetStorageId() string { + if x != nil && x.StorageId != nil { + return *x.StorageId + } + return "" +} + +func (x *OpWriteBlockProto) GetTargetStorageIds() []string { + if x != nil { + return x.TargetStorageIds } return nil } type OpTransferBlockProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Header *ClientOperationHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` Targets []*DatanodeInfoProto `protobuf:"bytes,2,rep,name=targets" json:"targets,omitempty"` TargetStorageTypes []StorageTypeProto `protobuf:"varint,3,rep,name=targetStorageTypes,enum=hadoop.hdfs.StorageTypeProto" json:"targetStorageTypes,omitempty"` - XXX_unrecognized []byte `json:"-"` + TargetStorageIds []string `protobuf:"bytes,4,rep,name=targetStorageIds" json:"targetStorageIds,omitempty"` +} + +func (x *OpTransferBlockProto) Reset() { + *x = OpTransferBlockProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpTransferBlockProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *OpTransferBlockProto) Reset() { *m = OpTransferBlockProto{} } -func (m *OpTransferBlockProto) String() string { return proto.CompactTextString(m) } -func (*OpTransferBlockProto) ProtoMessage() {} -func (*OpTransferBlockProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{8} } +func (*OpTransferBlockProto) ProtoMessage() {} -func (m *OpTransferBlockProto) GetHeader() *ClientOperationHeaderProto { - if m != nil { - return m.Header +func (x *OpTransferBlockProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpTransferBlockProto.ProtoReflect.Descriptor instead. +func (*OpTransferBlockProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{9} +} + +func (x *OpTransferBlockProto) GetHeader() *ClientOperationHeaderProto { + if x != nil { + return x.Header } return nil } -func (m *OpTransferBlockProto) GetTargets() []*DatanodeInfoProto { - if m != nil { - return m.Targets +func (x *OpTransferBlockProto) GetTargets() []*DatanodeInfoProto { + if x != nil { + return x.Targets } return nil } -func (m *OpTransferBlockProto) GetTargetStorageTypes() []StorageTypeProto { - if m != nil { - return m.TargetStorageTypes +func (x *OpTransferBlockProto) GetTargetStorageTypes() []StorageTypeProto { + if x != nil { + return x.TargetStorageTypes + } + return nil +} + +func (x *OpTransferBlockProto) GetTargetStorageIds() []string { + if x != nil { + return x.TargetStorageIds } return nil } type OpReplaceBlockProto struct { - Header *BaseHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` - DelHint *string `protobuf:"bytes,2,req,name=delHint" json:"delHint,omitempty"` - Source *DatanodeInfoProto `protobuf:"bytes,3,req,name=source" json:"source,omitempty"` - StorageType *StorageTypeProto `protobuf:"varint,4,opt,name=storageType,enum=hadoop.hdfs.StorageTypeProto,def=1" json:"storageType,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *BaseHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` + DelHint *string `protobuf:"bytes,2,req,name=delHint" json:"delHint,omitempty"` + Source *DatanodeInfoProto `protobuf:"bytes,3,req,name=source" json:"source,omitempty"` + StorageType *StorageTypeProto `protobuf:"varint,4,opt,name=storageType,enum=hadoop.hdfs.StorageTypeProto,def=1" json:"storageType,omitempty"` + StorageId *string `protobuf:"bytes,5,opt,name=storageId" json:"storageId,omitempty"` +} + +// Default values for OpReplaceBlockProto fields. +const ( + Default_OpReplaceBlockProto_StorageType = StorageTypeProto_DISK +) + +func (x *OpReplaceBlockProto) Reset() { + *x = OpReplaceBlockProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *OpReplaceBlockProto) Reset() { *m = OpReplaceBlockProto{} } -func (m *OpReplaceBlockProto) String() string { return proto.CompactTextString(m) } -func (*OpReplaceBlockProto) ProtoMessage() {} -func (*OpReplaceBlockProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{9} } +func (x *OpReplaceBlockProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -const Default_OpReplaceBlockProto_StorageType StorageTypeProto = StorageTypeProto_DISK +func (*OpReplaceBlockProto) ProtoMessage() {} -func (m *OpReplaceBlockProto) GetHeader() *BaseHeaderProto { - if m != nil { - return m.Header +func (x *OpReplaceBlockProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpReplaceBlockProto.ProtoReflect.Descriptor instead. +func (*OpReplaceBlockProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{10} +} + +func (x *OpReplaceBlockProto) GetHeader() *BaseHeaderProto { + if x != nil { + return x.Header } return nil } -func (m *OpReplaceBlockProto) GetDelHint() string { - if m != nil && m.DelHint != nil { - return *m.DelHint +func (x *OpReplaceBlockProto) GetDelHint() string { + if x != nil && x.DelHint != nil { + return *x.DelHint } return "" } -func (m *OpReplaceBlockProto) GetSource() *DatanodeInfoProto { - if m != nil { - return m.Source +func (x *OpReplaceBlockProto) GetSource() *DatanodeInfoProto { + if x != nil { + return x.Source } return nil } -func (m *OpReplaceBlockProto) GetStorageType() StorageTypeProto { - if m != nil && m.StorageType != nil { - return *m.StorageType +func (x *OpReplaceBlockProto) GetStorageType() StorageTypeProto { + if x != nil && x.StorageType != nil { + return *x.StorageType } return Default_OpReplaceBlockProto_StorageType } +func (x *OpReplaceBlockProto) GetStorageId() string { + if x != nil && x.StorageId != nil { + return *x.StorageId + } + return "" +} + type OpCopyBlockProto struct { - Header *BaseHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *BaseHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` +} + +func (x *OpCopyBlockProto) Reset() { + *x = OpCopyBlockProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *OpCopyBlockProto) Reset() { *m = OpCopyBlockProto{} } -func (m *OpCopyBlockProto) String() string { return proto.CompactTextString(m) } -func (*OpCopyBlockProto) ProtoMessage() {} -func (*OpCopyBlockProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{10} } +func (x *OpCopyBlockProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpCopyBlockProto) ProtoMessage() {} + +func (x *OpCopyBlockProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpCopyBlockProto.ProtoReflect.Descriptor instead. +func (*OpCopyBlockProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{11} +} -func (m *OpCopyBlockProto) GetHeader() *BaseHeaderProto { - if m != nil { - return m.Header +func (x *OpCopyBlockProto) GetHeader() *BaseHeaderProto { + if x != nil { + return x.Header } return nil } type OpBlockChecksumProto struct { - Header *BaseHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *BaseHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` + BlockChecksumOptions *BlockChecksumOptionsProto `protobuf:"bytes,2,opt,name=blockChecksumOptions" json:"blockChecksumOptions,omitempty"` +} + +func (x *OpBlockChecksumProto) Reset() { + *x = OpBlockChecksumProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpBlockChecksumProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpBlockChecksumProto) ProtoMessage() {} + +func (x *OpBlockChecksumProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *OpBlockChecksumProto) Reset() { *m = OpBlockChecksumProto{} } -func (m *OpBlockChecksumProto) String() string { return proto.CompactTextString(m) } -func (*OpBlockChecksumProto) ProtoMessage() {} -func (*OpBlockChecksumProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{11} } +// Deprecated: Use OpBlockChecksumProto.ProtoReflect.Descriptor instead. +func (*OpBlockChecksumProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{12} +} + +func (x *OpBlockChecksumProto) GetHeader() *BaseHeaderProto { + if x != nil { + return x.Header + } + return nil +} -func (m *OpBlockChecksumProto) GetHeader() *BaseHeaderProto { - if m != nil { - return m.Header +func (x *OpBlockChecksumProto) GetBlockChecksumOptions() *BlockChecksumOptionsProto { + if x != nil { + return x.BlockChecksumOptions } return nil } type OpBlockGroupChecksumProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Header *BaseHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` Datanodes *DatanodeInfosProto `protobuf:"bytes,2,req,name=datanodes" json:"datanodes,omitempty"` // each internal block has a block token - BlockTokens []*hadoop_common.TokenProto `protobuf:"bytes,3,rep,name=blockTokens" json:"blockTokens,omitempty"` - EcPolicy *ErasureCodingPolicyProto `protobuf:"bytes,4,req,name=ecPolicy" json:"ecPolicy,omitempty"` - XXX_unrecognized []byte `json:"-"` + BlockTokens []*hadoop_common.TokenProto `protobuf:"bytes,3,rep,name=blockTokens" json:"blockTokens,omitempty"` + EcPolicy *ErasureCodingPolicyProto `protobuf:"bytes,4,req,name=ecPolicy" json:"ecPolicy,omitempty"` + BlockIndices []uint32 `protobuf:"varint,5,rep,name=blockIndices" json:"blockIndices,omitempty"` + RequestedNumBytes *uint64 `protobuf:"varint,6,req,name=requestedNumBytes" json:"requestedNumBytes,omitempty"` + BlockChecksumOptions *BlockChecksumOptionsProto `protobuf:"bytes,7,opt,name=blockChecksumOptions" json:"blockChecksumOptions,omitempty"` +} + +func (x *OpBlockGroupChecksumProto) Reset() { + *x = OpBlockGroupChecksumProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpBlockGroupChecksumProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *OpBlockGroupChecksumProto) Reset() { *m = OpBlockGroupChecksumProto{} } -func (m *OpBlockGroupChecksumProto) String() string { return proto.CompactTextString(m) } -func (*OpBlockGroupChecksumProto) ProtoMessage() {} -func (*OpBlockGroupChecksumProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{12} } +func (*OpBlockGroupChecksumProto) ProtoMessage() {} -func (m *OpBlockGroupChecksumProto) GetHeader() *BaseHeaderProto { - if m != nil { - return m.Header +func (x *OpBlockGroupChecksumProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpBlockGroupChecksumProto.ProtoReflect.Descriptor instead. +func (*OpBlockGroupChecksumProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{13} +} + +func (x *OpBlockGroupChecksumProto) GetHeader() *BaseHeaderProto { + if x != nil { + return x.Header + } + return nil +} + +func (x *OpBlockGroupChecksumProto) GetDatanodes() *DatanodeInfosProto { + if x != nil { + return x.Datanodes } return nil } -func (m *OpBlockGroupChecksumProto) GetDatanodes() *DatanodeInfosProto { - if m != nil { - return m.Datanodes +func (x *OpBlockGroupChecksumProto) GetBlockTokens() []*hadoop_common.TokenProto { + if x != nil { + return x.BlockTokens } return nil } -func (m *OpBlockGroupChecksumProto) GetBlockTokens() []*hadoop_common.TokenProto { - if m != nil { - return m.BlockTokens +func (x *OpBlockGroupChecksumProto) GetEcPolicy() *ErasureCodingPolicyProto { + if x != nil { + return x.EcPolicy } return nil } -func (m *OpBlockGroupChecksumProto) GetEcPolicy() *ErasureCodingPolicyProto { - if m != nil { - return m.EcPolicy +func (x *OpBlockGroupChecksumProto) GetBlockIndices() []uint32 { + if x != nil { + return x.BlockIndices } return nil } -// * +func (x *OpBlockGroupChecksumProto) GetRequestedNumBytes() uint64 { + if x != nil && x.RequestedNumBytes != nil { + return *x.RequestedNumBytes + } + return 0 +} + +func (x *OpBlockGroupChecksumProto) GetBlockChecksumOptions() *BlockChecksumOptionsProto { + if x != nil { + return x.BlockChecksumOptions + } + return nil +} + +//* // An ID uniquely identifying a shared memory segment. type ShortCircuitShmIdProto struct { - Hi *int64 `protobuf:"varint,1,req,name=hi" json:"hi,omitempty"` - Lo *int64 `protobuf:"varint,2,req,name=lo" json:"lo,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hi *int64 `protobuf:"varint,1,req,name=hi" json:"hi,omitempty"` + Lo *int64 `protobuf:"varint,2,req,name=lo" json:"lo,omitempty"` +} + +func (x *ShortCircuitShmIdProto) Reset() { + *x = ShortCircuitShmIdProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShortCircuitShmIdProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShortCircuitShmIdProto) ProtoMessage() {} + +func (x *ShortCircuitShmIdProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ShortCircuitShmIdProto) Reset() { *m = ShortCircuitShmIdProto{} } -func (m *ShortCircuitShmIdProto) String() string { return proto.CompactTextString(m) } -func (*ShortCircuitShmIdProto) ProtoMessage() {} -func (*ShortCircuitShmIdProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{13} } +// Deprecated: Use ShortCircuitShmIdProto.ProtoReflect.Descriptor instead. +func (*ShortCircuitShmIdProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{14} +} -func (m *ShortCircuitShmIdProto) GetHi() int64 { - if m != nil && m.Hi != nil { - return *m.Hi +func (x *ShortCircuitShmIdProto) GetHi() int64 { + if x != nil && x.Hi != nil { + return *x.Hi } return 0 } -func (m *ShortCircuitShmIdProto) GetLo() int64 { - if m != nil && m.Lo != nil { - return *m.Lo +func (x *ShortCircuitShmIdProto) GetLo() int64 { + if x != nil && x.Lo != nil { + return *x.Lo } return 0 } -// * +//* // An ID uniquely identifying a slot within a shared memory segment. type ShortCircuitShmSlotProto struct { - ShmId *ShortCircuitShmIdProto `protobuf:"bytes,1,req,name=shmId" json:"shmId,omitempty"` - SlotIdx *int32 `protobuf:"varint,2,req,name=slotIdx" json:"slotIdx,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ShmId *ShortCircuitShmIdProto `protobuf:"bytes,1,req,name=shmId" json:"shmId,omitempty"` + SlotIdx *int32 `protobuf:"varint,2,req,name=slotIdx" json:"slotIdx,omitempty"` +} + +func (x *ShortCircuitShmSlotProto) Reset() { + *x = ShortCircuitShmSlotProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShortCircuitShmSlotProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ShortCircuitShmSlotProto) Reset() { *m = ShortCircuitShmSlotProto{} } -func (m *ShortCircuitShmSlotProto) String() string { return proto.CompactTextString(m) } -func (*ShortCircuitShmSlotProto) ProtoMessage() {} -func (*ShortCircuitShmSlotProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{14} } +func (*ShortCircuitShmSlotProto) ProtoMessage() {} -func (m *ShortCircuitShmSlotProto) GetShmId() *ShortCircuitShmIdProto { - if m != nil { - return m.ShmId +func (x *ShortCircuitShmSlotProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ShortCircuitShmSlotProto.ProtoReflect.Descriptor instead. +func (*ShortCircuitShmSlotProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{15} +} + +func (x *ShortCircuitShmSlotProto) GetShmId() *ShortCircuitShmIdProto { + if x != nil { + return x.ShmId } return nil } -func (m *ShortCircuitShmSlotProto) GetSlotIdx() int32 { - if m != nil && m.SlotIdx != nil { - return *m.SlotIdx +func (x *ShortCircuitShmSlotProto) GetSlotIdx() int32 { + if x != nil && x.SlotIdx != nil { + return *x.SlotIdx } return 0 } type OpRequestShortCircuitAccessProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Header *BaseHeaderProto `protobuf:"bytes,1,req,name=header" json:"header,omitempty"` - // * In order to get short-circuit access to block data, clients must set this + //* In order to get short-circuit access to block data, clients must set this // to the highest version of the block data that they can understand. // Currently 1 is the only version, but more versions may exist in the future // if the on-disk format changes. MaxVersion *uint32 `protobuf:"varint,2,req,name=maxVersion" json:"maxVersion,omitempty"` - // * + //* // The shared memory slot to use, if we are using one. SlotId *ShortCircuitShmSlotProto `protobuf:"bytes,3,opt,name=slotId" json:"slotId,omitempty"` - // * + //* // True if the client supports verifying that the file descriptor has been // sent successfully. - SupportsReceiptVerification *bool `protobuf:"varint,4,opt,name=supportsReceiptVerification,def=0" json:"supportsReceiptVerification,omitempty"` - XXX_unrecognized []byte `json:"-"` + SupportsReceiptVerification *bool `protobuf:"varint,4,opt,name=supportsReceiptVerification,def=0" json:"supportsReceiptVerification,omitempty"` } -func (m *OpRequestShortCircuitAccessProto) Reset() { *m = OpRequestShortCircuitAccessProto{} } -func (m *OpRequestShortCircuitAccessProto) String() string { return proto.CompactTextString(m) } -func (*OpRequestShortCircuitAccessProto) ProtoMessage() {} -func (*OpRequestShortCircuitAccessProto) Descriptor() ([]byte, []int) { - return fileDescriptor5, []int{15} +// Default values for OpRequestShortCircuitAccessProto fields. +const ( + Default_OpRequestShortCircuitAccessProto_SupportsReceiptVerification = bool(false) +) + +func (x *OpRequestShortCircuitAccessProto) Reset() { + *x = OpRequestShortCircuitAccessProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpRequestShortCircuitAccessProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpRequestShortCircuitAccessProto) ProtoMessage() {} + +func (x *OpRequestShortCircuitAccessProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -const Default_OpRequestShortCircuitAccessProto_SupportsReceiptVerification bool = false +// Deprecated: Use OpRequestShortCircuitAccessProto.ProtoReflect.Descriptor instead. +func (*OpRequestShortCircuitAccessProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{16} +} -func (m *OpRequestShortCircuitAccessProto) GetHeader() *BaseHeaderProto { - if m != nil { - return m.Header +func (x *OpRequestShortCircuitAccessProto) GetHeader() *BaseHeaderProto { + if x != nil { + return x.Header } return nil } -func (m *OpRequestShortCircuitAccessProto) GetMaxVersion() uint32 { - if m != nil && m.MaxVersion != nil { - return *m.MaxVersion +func (x *OpRequestShortCircuitAccessProto) GetMaxVersion() uint32 { + if x != nil && x.MaxVersion != nil { + return *x.MaxVersion } return 0 } -func (m *OpRequestShortCircuitAccessProto) GetSlotId() *ShortCircuitShmSlotProto { - if m != nil { - return m.SlotId +func (x *OpRequestShortCircuitAccessProto) GetSlotId() *ShortCircuitShmSlotProto { + if x != nil { + return x.SlotId } return nil } -func (m *OpRequestShortCircuitAccessProto) GetSupportsReceiptVerification() bool { - if m != nil && m.SupportsReceiptVerification != nil { - return *m.SupportsReceiptVerification +func (x *OpRequestShortCircuitAccessProto) GetSupportsReceiptVerification() bool { + if x != nil && x.SupportsReceiptVerification != nil { + return *x.SupportsReceiptVerification } return Default_OpRequestShortCircuitAccessProto_SupportsReceiptVerification } type ReleaseShortCircuitAccessRequestProto struct { - SlotId *ShortCircuitShmSlotProto `protobuf:"bytes,1,req,name=slotId" json:"slotId,omitempty"` - TraceInfo *DataTransferTraceInfoProto `protobuf:"bytes,2,opt,name=traceInfo" json:"traceInfo,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlotId *ShortCircuitShmSlotProto `protobuf:"bytes,1,req,name=slotId" json:"slotId,omitempty"` + TraceInfo *DataTransferTraceInfoProto `protobuf:"bytes,2,opt,name=traceInfo" json:"traceInfo,omitempty"` } -func (m *ReleaseShortCircuitAccessRequestProto) Reset() { *m = ReleaseShortCircuitAccessRequestProto{} } -func (m *ReleaseShortCircuitAccessRequestProto) String() string { return proto.CompactTextString(m) } -func (*ReleaseShortCircuitAccessRequestProto) ProtoMessage() {} +func (x *ReleaseShortCircuitAccessRequestProto) Reset() { + *x = ReleaseShortCircuitAccessRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReleaseShortCircuitAccessRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReleaseShortCircuitAccessRequestProto) ProtoMessage() {} + +func (x *ReleaseShortCircuitAccessRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReleaseShortCircuitAccessRequestProto.ProtoReflect.Descriptor instead. func (*ReleaseShortCircuitAccessRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor5, []int{16} + return file_datatransfer_proto_rawDescGZIP(), []int{17} } -func (m *ReleaseShortCircuitAccessRequestProto) GetSlotId() *ShortCircuitShmSlotProto { - if m != nil { - return m.SlotId +func (x *ReleaseShortCircuitAccessRequestProto) GetSlotId() *ShortCircuitShmSlotProto { + if x != nil { + return x.SlotId } return nil } -func (m *ReleaseShortCircuitAccessRequestProto) GetTraceInfo() *DataTransferTraceInfoProto { - if m != nil { - return m.TraceInfo +func (x *ReleaseShortCircuitAccessRequestProto) GetTraceInfo() *DataTransferTraceInfoProto { + if x != nil { + return x.TraceInfo } return nil } type ReleaseShortCircuitAccessResponseProto struct { - Status *Status `protobuf:"varint,1,req,name=status,enum=hadoop.hdfs.Status" json:"status,omitempty"` - Error *string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *Status `protobuf:"varint,1,req,name=status,enum=hadoop.hdfs.Status" json:"status,omitempty"` + Error *string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"` } -func (m *ReleaseShortCircuitAccessResponseProto) Reset() { - *m = ReleaseShortCircuitAccessResponseProto{} +func (x *ReleaseShortCircuitAccessResponseProto) Reset() { + *x = ReleaseShortCircuitAccessResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ReleaseShortCircuitAccessResponseProto) String() string { return proto.CompactTextString(m) } -func (*ReleaseShortCircuitAccessResponseProto) ProtoMessage() {} + +func (x *ReleaseShortCircuitAccessResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReleaseShortCircuitAccessResponseProto) ProtoMessage() {} + +func (x *ReleaseShortCircuitAccessResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReleaseShortCircuitAccessResponseProto.ProtoReflect.Descriptor instead. func (*ReleaseShortCircuitAccessResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor5, []int{17} + return file_datatransfer_proto_rawDescGZIP(), []int{18} } -func (m *ReleaseShortCircuitAccessResponseProto) GetStatus() Status { - if m != nil && m.Status != nil { - return *m.Status +func (x *ReleaseShortCircuitAccessResponseProto) GetStatus() Status { + if x != nil && x.Status != nil { + return *x.Status } return Status_SUCCESS } -func (m *ReleaseShortCircuitAccessResponseProto) GetError() string { - if m != nil && m.Error != nil { - return *m.Error +func (x *ReleaseShortCircuitAccessResponseProto) GetError() string { + if x != nil && x.Error != nil { + return *x.Error } return "" } type ShortCircuitShmRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // The name of the client requesting the shared memory segment. This is // purely for logging / debugging purposes. - ClientName *string `protobuf:"bytes,1,req,name=clientName" json:"clientName,omitempty"` - TraceInfo *DataTransferTraceInfoProto `protobuf:"bytes,2,opt,name=traceInfo" json:"traceInfo,omitempty"` - XXX_unrecognized []byte `json:"-"` + ClientName *string `protobuf:"bytes,1,req,name=clientName" json:"clientName,omitempty"` + TraceInfo *DataTransferTraceInfoProto `protobuf:"bytes,2,opt,name=traceInfo" json:"traceInfo,omitempty"` +} + +func (x *ShortCircuitShmRequestProto) Reset() { + *x = ShortCircuitShmRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShortCircuitShmRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShortCircuitShmRequestProto) ProtoMessage() {} + +func (x *ShortCircuitShmRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ShortCircuitShmRequestProto) Reset() { *m = ShortCircuitShmRequestProto{} } -func (m *ShortCircuitShmRequestProto) String() string { return proto.CompactTextString(m) } -func (*ShortCircuitShmRequestProto) ProtoMessage() {} -func (*ShortCircuitShmRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{18} } +// Deprecated: Use ShortCircuitShmRequestProto.ProtoReflect.Descriptor instead. +func (*ShortCircuitShmRequestProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{19} +} -func (m *ShortCircuitShmRequestProto) GetClientName() string { - if m != nil && m.ClientName != nil { - return *m.ClientName +func (x *ShortCircuitShmRequestProto) GetClientName() string { + if x != nil && x.ClientName != nil { + return *x.ClientName } return "" } -func (m *ShortCircuitShmRequestProto) GetTraceInfo() *DataTransferTraceInfoProto { - if m != nil { - return m.TraceInfo +func (x *ShortCircuitShmRequestProto) GetTraceInfo() *DataTransferTraceInfoProto { + if x != nil { + return x.TraceInfo } return nil } type ShortCircuitShmResponseProto struct { - Status *Status `protobuf:"varint,1,req,name=status,enum=hadoop.hdfs.Status" json:"status,omitempty"` - Error *string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"` - Id *ShortCircuitShmIdProto `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *Status `protobuf:"varint,1,req,name=status,enum=hadoop.hdfs.Status" json:"status,omitempty"` + Error *string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"` + Id *ShortCircuitShmIdProto `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"` +} + +func (x *ShortCircuitShmResponseProto) Reset() { + *x = ShortCircuitShmResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShortCircuitShmResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ShortCircuitShmResponseProto) Reset() { *m = ShortCircuitShmResponseProto{} } -func (m *ShortCircuitShmResponseProto) String() string { return proto.CompactTextString(m) } -func (*ShortCircuitShmResponseProto) ProtoMessage() {} -func (*ShortCircuitShmResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{19} } +func (*ShortCircuitShmResponseProto) ProtoMessage() {} -func (m *ShortCircuitShmResponseProto) GetStatus() Status { - if m != nil && m.Status != nil { - return *m.Status +func (x *ShortCircuitShmResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ShortCircuitShmResponseProto.ProtoReflect.Descriptor instead. +func (*ShortCircuitShmResponseProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{20} +} + +func (x *ShortCircuitShmResponseProto) GetStatus() Status { + if x != nil && x.Status != nil { + return *x.Status } return Status_SUCCESS } -func (m *ShortCircuitShmResponseProto) GetError() string { - if m != nil && m.Error != nil { - return *m.Error +func (x *ShortCircuitShmResponseProto) GetError() string { + if x != nil && x.Error != nil { + return *x.Error } return "" } -func (m *ShortCircuitShmResponseProto) GetId() *ShortCircuitShmIdProto { - if m != nil { - return m.Id +func (x *ShortCircuitShmResponseProto) GetId() *ShortCircuitShmIdProto { + if x != nil { + return x.Id } return nil } type PacketHeaderProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // All fields must be fixed-length! OffsetInBlock *int64 `protobuf:"fixed64,1,req,name=offsetInBlock" json:"offsetInBlock,omitempty"` Seqno *int64 `protobuf:"fixed64,2,req,name=seqno" json:"seqno,omitempty"` LastPacketInBlock *bool `protobuf:"varint,3,req,name=lastPacketInBlock" json:"lastPacketInBlock,omitempty"` DataLen *int32 `protobuf:"fixed32,4,req,name=dataLen" json:"dataLen,omitempty"` SyncBlock *bool `protobuf:"varint,5,opt,name=syncBlock,def=0" json:"syncBlock,omitempty"` - XXX_unrecognized []byte `json:"-"` } -func (m *PacketHeaderProto) Reset() { *m = PacketHeaderProto{} } -func (m *PacketHeaderProto) String() string { return proto.CompactTextString(m) } -func (*PacketHeaderProto) ProtoMessage() {} -func (*PacketHeaderProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{20} } +// Default values for PacketHeaderProto fields. +const ( + Default_PacketHeaderProto_SyncBlock = bool(false) +) + +func (x *PacketHeaderProto) Reset() { + *x = PacketHeaderProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PacketHeaderProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PacketHeaderProto) ProtoMessage() {} -const Default_PacketHeaderProto_SyncBlock bool = false +func (x *PacketHeaderProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PacketHeaderProto.ProtoReflect.Descriptor instead. +func (*PacketHeaderProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{21} +} -func (m *PacketHeaderProto) GetOffsetInBlock() int64 { - if m != nil && m.OffsetInBlock != nil { - return *m.OffsetInBlock +func (x *PacketHeaderProto) GetOffsetInBlock() int64 { + if x != nil && x.OffsetInBlock != nil { + return *x.OffsetInBlock } return 0 } -func (m *PacketHeaderProto) GetSeqno() int64 { - if m != nil && m.Seqno != nil { - return *m.Seqno +func (x *PacketHeaderProto) GetSeqno() int64 { + if x != nil && x.Seqno != nil { + return *x.Seqno } return 0 } -func (m *PacketHeaderProto) GetLastPacketInBlock() bool { - if m != nil && m.LastPacketInBlock != nil { - return *m.LastPacketInBlock +func (x *PacketHeaderProto) GetLastPacketInBlock() bool { + if x != nil && x.LastPacketInBlock != nil { + return *x.LastPacketInBlock } return false } -func (m *PacketHeaderProto) GetDataLen() int32 { - if m != nil && m.DataLen != nil { - return *m.DataLen +func (x *PacketHeaderProto) GetDataLen() int32 { + if x != nil && x.DataLen != nil { + return *x.DataLen } return 0 } -func (m *PacketHeaderProto) GetSyncBlock() bool { - if m != nil && m.SyncBlock != nil { - return *m.SyncBlock +func (x *PacketHeaderProto) GetSyncBlock() bool { + if x != nil && x.SyncBlock != nil { + return *x.SyncBlock } return Default_PacketHeaderProto_SyncBlock } type PipelineAckProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Seqno *int64 `protobuf:"zigzag64,1,req,name=seqno" json:"seqno,omitempty"` Reply []Status `protobuf:"varint,2,rep,name=reply,enum=hadoop.hdfs.Status" json:"reply,omitempty"` DownstreamAckTimeNanos *uint64 `protobuf:"varint,3,opt,name=downstreamAckTimeNanos,def=0" json:"downstreamAckTimeNanos,omitempty"` Flag []uint32 `protobuf:"varint,4,rep,packed,name=flag" json:"flag,omitempty"` - XXX_unrecognized []byte `json:"-"` } -func (m *PipelineAckProto) Reset() { *m = PipelineAckProto{} } -func (m *PipelineAckProto) String() string { return proto.CompactTextString(m) } -func (*PipelineAckProto) ProtoMessage() {} -func (*PipelineAckProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{21} } +// Default values for PipelineAckProto fields. +const ( + Default_PipelineAckProto_DownstreamAckTimeNanos = uint64(0) +) -const Default_PipelineAckProto_DownstreamAckTimeNanos uint64 = 0 +func (x *PipelineAckProto) Reset() { + *x = PipelineAckProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PipelineAckProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PipelineAckProto) ProtoMessage() {} + +func (x *PipelineAckProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PipelineAckProto.ProtoReflect.Descriptor instead. +func (*PipelineAckProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{22} +} -func (m *PipelineAckProto) GetSeqno() int64 { - if m != nil && m.Seqno != nil { - return *m.Seqno +func (x *PipelineAckProto) GetSeqno() int64 { + if x != nil && x.Seqno != nil { + return *x.Seqno } return 0 } -func (m *PipelineAckProto) GetReply() []Status { - if m != nil { - return m.Reply +func (x *PipelineAckProto) GetReply() []Status { + if x != nil { + return x.Reply } return nil } -func (m *PipelineAckProto) GetDownstreamAckTimeNanos() uint64 { - if m != nil && m.DownstreamAckTimeNanos != nil { - return *m.DownstreamAckTimeNanos +func (x *PipelineAckProto) GetDownstreamAckTimeNanos() uint64 { + if x != nil && x.DownstreamAckTimeNanos != nil { + return *x.DownstreamAckTimeNanos } return Default_PipelineAckProto_DownstreamAckTimeNanos } -func (m *PipelineAckProto) GetFlag() []uint32 { - if m != nil { - return m.Flag +func (x *PipelineAckProto) GetFlag() []uint32 { + if x != nil { + return x.Flag } return nil } -// * +//* // Sent as part of the BlockOpResponseProto // for READ_BLOCK and COPY_BLOCK operations. type ReadOpChecksumInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Checksum *ChecksumProto `protobuf:"bytes,1,req,name=checksum" json:"checksum,omitempty"` - // * + //* // The offset into the block at which the first packet // will start. This is necessary since reads will align // backwards to a checksum chunk boundary. - ChunkOffset *uint64 `protobuf:"varint,2,req,name=chunkOffset" json:"chunkOffset,omitempty"` - XXX_unrecognized []byte `json:"-"` + ChunkOffset *uint64 `protobuf:"varint,2,req,name=chunkOffset" json:"chunkOffset,omitempty"` } -func (m *ReadOpChecksumInfoProto) Reset() { *m = ReadOpChecksumInfoProto{} } -func (m *ReadOpChecksumInfoProto) String() string { return proto.CompactTextString(m) } -func (*ReadOpChecksumInfoProto) ProtoMessage() {} -func (*ReadOpChecksumInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{22} } +func (x *ReadOpChecksumInfoProto) Reset() { + *x = ReadOpChecksumInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *ReadOpChecksumInfoProto) GetChecksum() *ChecksumProto { - if m != nil { - return m.Checksum +func (x *ReadOpChecksumInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadOpChecksumInfoProto) ProtoMessage() {} + +func (x *ReadOpChecksumInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadOpChecksumInfoProto.ProtoReflect.Descriptor instead. +func (*ReadOpChecksumInfoProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{23} +} + +func (x *ReadOpChecksumInfoProto) GetChecksum() *ChecksumProto { + if x != nil { + return x.Checksum } return nil } -func (m *ReadOpChecksumInfoProto) GetChunkOffset() uint64 { - if m != nil && m.ChunkOffset != nil { - return *m.ChunkOffset +func (x *ReadOpChecksumInfoProto) GetChunkOffset() uint64 { + if x != nil && x.ChunkOffset != nil { + return *x.ChunkOffset } return 0 } type BlockOpResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Status *Status `protobuf:"varint,1,req,name=status,enum=hadoop.hdfs.Status" json:"status,omitempty"` FirstBadLink *string `protobuf:"bytes,2,opt,name=firstBadLink" json:"firstBadLink,omitempty"` ChecksumResponse *OpBlockChecksumResponseProto `protobuf:"bytes,3,opt,name=checksumResponse" json:"checksumResponse,omitempty"` ReadOpChecksumInfo *ReadOpChecksumInfoProto `protobuf:"bytes,4,opt,name=readOpChecksumInfo" json:"readOpChecksumInfo,omitempty"` - // * explanatory text which may be useful to log on the client side + //* explanatory text which may be useful to log on the client side Message *string `protobuf:"bytes,5,opt,name=message" json:"message,omitempty"` - // * If the server chooses to agree to the request of a client for + //* If the server chooses to agree to the request of a client for // short-circuit access, it will send a response message with the relevant // file descriptors attached. // @@ -1104,316 +2050,1214 @@ type BlockOpResponseProto struct { // specific version number of the block data that the client is about to // read. ShortCircuitAccessVersion *uint32 `protobuf:"varint,6,opt,name=shortCircuitAccessVersion" json:"shortCircuitAccessVersion,omitempty"` - XXX_unrecognized []byte `json:"-"` } -func (m *BlockOpResponseProto) Reset() { *m = BlockOpResponseProto{} } -func (m *BlockOpResponseProto) String() string { return proto.CompactTextString(m) } -func (*BlockOpResponseProto) ProtoMessage() {} -func (*BlockOpResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{23} } +func (x *BlockOpResponseProto) Reset() { + *x = BlockOpResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockOpResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockOpResponseProto) ProtoMessage() {} -func (m *BlockOpResponseProto) GetStatus() Status { - if m != nil && m.Status != nil { - return *m.Status +func (x *BlockOpResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockOpResponseProto.ProtoReflect.Descriptor instead. +func (*BlockOpResponseProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{24} +} + +func (x *BlockOpResponseProto) GetStatus() Status { + if x != nil && x.Status != nil { + return *x.Status } return Status_SUCCESS } -func (m *BlockOpResponseProto) GetFirstBadLink() string { - if m != nil && m.FirstBadLink != nil { - return *m.FirstBadLink +func (x *BlockOpResponseProto) GetFirstBadLink() string { + if x != nil && x.FirstBadLink != nil { + return *x.FirstBadLink } return "" } -func (m *BlockOpResponseProto) GetChecksumResponse() *OpBlockChecksumResponseProto { - if m != nil { - return m.ChecksumResponse +func (x *BlockOpResponseProto) GetChecksumResponse() *OpBlockChecksumResponseProto { + if x != nil { + return x.ChecksumResponse } return nil } -func (m *BlockOpResponseProto) GetReadOpChecksumInfo() *ReadOpChecksumInfoProto { - if m != nil { - return m.ReadOpChecksumInfo +func (x *BlockOpResponseProto) GetReadOpChecksumInfo() *ReadOpChecksumInfoProto { + if x != nil { + return x.ReadOpChecksumInfo } return nil } -func (m *BlockOpResponseProto) GetMessage() string { - if m != nil && m.Message != nil { - return *m.Message +func (x *BlockOpResponseProto) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message } return "" } -func (m *BlockOpResponseProto) GetShortCircuitAccessVersion() uint32 { - if m != nil && m.ShortCircuitAccessVersion != nil { - return *m.ShortCircuitAccessVersion +func (x *BlockOpResponseProto) GetShortCircuitAccessVersion() uint32 { + if x != nil && x.ShortCircuitAccessVersion != nil { + return *x.ShortCircuitAccessVersion } return 0 } -// * +//* // Message sent from the client to the DN after reading the entire // read request. type ClientReadStatusProto struct { - Status *Status `protobuf:"varint,1,req,name=status,enum=hadoop.hdfs.Status" json:"status,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *Status `protobuf:"varint,1,req,name=status,enum=hadoop.hdfs.Status" json:"status,omitempty"` +} + +func (x *ClientReadStatusProto) Reset() { + *x = ClientReadStatusProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientReadStatusProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientReadStatusProto) ProtoMessage() {} + +func (x *ClientReadStatusProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ClientReadStatusProto) Reset() { *m = ClientReadStatusProto{} } -func (m *ClientReadStatusProto) String() string { return proto.CompactTextString(m) } -func (*ClientReadStatusProto) ProtoMessage() {} -func (*ClientReadStatusProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{24} } +// Deprecated: Use ClientReadStatusProto.ProtoReflect.Descriptor instead. +func (*ClientReadStatusProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{25} +} -func (m *ClientReadStatusProto) GetStatus() Status { - if m != nil && m.Status != nil { - return *m.Status +func (x *ClientReadStatusProto) GetStatus() Status { + if x != nil && x.Status != nil { + return *x.Status } return Status_SUCCESS } type DNTransferAckProto struct { - Status *Status `protobuf:"varint,1,req,name=status,enum=hadoop.hdfs.Status" json:"status,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *Status `protobuf:"varint,1,req,name=status,enum=hadoop.hdfs.Status" json:"status,omitempty"` +} + +func (x *DNTransferAckProto) Reset() { + *x = DNTransferAckProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DNTransferAckProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DNTransferAckProto) Reset() { *m = DNTransferAckProto{} } -func (m *DNTransferAckProto) String() string { return proto.CompactTextString(m) } -func (*DNTransferAckProto) ProtoMessage() {} -func (*DNTransferAckProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{25} } +func (*DNTransferAckProto) ProtoMessage() {} -func (m *DNTransferAckProto) GetStatus() Status { - if m != nil && m.Status != nil { - return *m.Status +func (x *DNTransferAckProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DNTransferAckProto.ProtoReflect.Descriptor instead. +func (*DNTransferAckProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{26} +} + +func (x *DNTransferAckProto) GetStatus() Status { + if x != nil && x.Status != nil { + return *x.Status } return Status_SUCCESS } type OpBlockChecksumResponseProto struct { - BytesPerCrc *uint32 `protobuf:"varint,1,req,name=bytesPerCrc" json:"bytesPerCrc,omitempty"` - CrcPerBlock *uint64 `protobuf:"varint,2,req,name=crcPerBlock" json:"crcPerBlock,omitempty"` - Md5 []byte `protobuf:"bytes,3,req,name=md5" json:"md5,omitempty"` - CrcType *ChecksumTypeProto `protobuf:"varint,4,opt,name=crcType,enum=hadoop.hdfs.ChecksumTypeProto" json:"crcType,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BytesPerCrc *uint32 `protobuf:"varint,1,req,name=bytesPerCrc" json:"bytesPerCrc,omitempty"` + CrcPerBlock *uint64 `protobuf:"varint,2,req,name=crcPerBlock" json:"crcPerBlock,omitempty"` + BlockChecksum []byte `protobuf:"bytes,3,req,name=blockChecksum" json:"blockChecksum,omitempty"` + CrcType *ChecksumTypeProto `protobuf:"varint,4,opt,name=crcType,enum=hadoop.hdfs.ChecksumTypeProto" json:"crcType,omitempty"` + BlockChecksumOptions *BlockChecksumOptionsProto `protobuf:"bytes,5,opt,name=blockChecksumOptions" json:"blockChecksumOptions,omitempty"` } -func (m *OpBlockChecksumResponseProto) Reset() { *m = OpBlockChecksumResponseProto{} } -func (m *OpBlockChecksumResponseProto) String() string { return proto.CompactTextString(m) } -func (*OpBlockChecksumResponseProto) ProtoMessage() {} -func (*OpBlockChecksumResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{26} } +func (x *OpBlockChecksumResponseProto) Reset() { + *x = OpBlockChecksumResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpBlockChecksumResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpBlockChecksumResponseProto) ProtoMessage() {} + +func (x *OpBlockChecksumResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpBlockChecksumResponseProto.ProtoReflect.Descriptor instead. +func (*OpBlockChecksumResponseProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{27} +} -func (m *OpBlockChecksumResponseProto) GetBytesPerCrc() uint32 { - if m != nil && m.BytesPerCrc != nil { - return *m.BytesPerCrc +func (x *OpBlockChecksumResponseProto) GetBytesPerCrc() uint32 { + if x != nil && x.BytesPerCrc != nil { + return *x.BytesPerCrc } return 0 } -func (m *OpBlockChecksumResponseProto) GetCrcPerBlock() uint64 { - if m != nil && m.CrcPerBlock != nil { - return *m.CrcPerBlock +func (x *OpBlockChecksumResponseProto) GetCrcPerBlock() uint64 { + if x != nil && x.CrcPerBlock != nil { + return *x.CrcPerBlock } return 0 } -func (m *OpBlockChecksumResponseProto) GetMd5() []byte { - if m != nil { - return m.Md5 +func (x *OpBlockChecksumResponseProto) GetBlockChecksum() []byte { + if x != nil { + return x.BlockChecksum } return nil } -func (m *OpBlockChecksumResponseProto) GetCrcType() ChecksumTypeProto { - if m != nil && m.CrcType != nil { - return *m.CrcType +func (x *OpBlockChecksumResponseProto) GetCrcType() ChecksumTypeProto { + if x != nil && x.CrcType != nil { + return *x.CrcType } return ChecksumTypeProto_CHECKSUM_NULL } +func (x *OpBlockChecksumResponseProto) GetBlockChecksumOptions() *BlockChecksumOptionsProto { + if x != nil { + return x.BlockChecksumOptions + } + return nil +} + type OpCustomProto struct { - CustomId *string `protobuf:"bytes,1,req,name=customId" json:"customId,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CustomId *string `protobuf:"bytes,1,req,name=customId" json:"customId,omitempty"` } -func (m *OpCustomProto) Reset() { *m = OpCustomProto{} } -func (m *OpCustomProto) String() string { return proto.CompactTextString(m) } -func (*OpCustomProto) ProtoMessage() {} -func (*OpCustomProto) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{27} } +func (x *OpCustomProto) Reset() { + *x = OpCustomProto{} + if protoimpl.UnsafeEnabled { + mi := &file_datatransfer_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *OpCustomProto) GetCustomId() string { - if m != nil && m.CustomId != nil { - return *m.CustomId +func (x *OpCustomProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpCustomProto) ProtoMessage() {} + +func (x *OpCustomProto) ProtoReflect() protoreflect.Message { + mi := &file_datatransfer_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpCustomProto.ProtoReflect.Descriptor instead. +func (*OpCustomProto) Descriptor() ([]byte, []int) { + return file_datatransfer_proto_rawDescGZIP(), []int{28} +} + +func (x *OpCustomProto) GetCustomId() string { + if x != nil && x.CustomId != nil { + return *x.CustomId } return "" } -func init() { - proto.RegisterType((*DataTransferEncryptorMessageProto)(nil), "hadoop.hdfs.DataTransferEncryptorMessageProto") - proto.RegisterType((*BaseHeaderProto)(nil), "hadoop.hdfs.BaseHeaderProto") - proto.RegisterType((*DataTransferTraceInfoProto)(nil), "hadoop.hdfs.DataTransferTraceInfoProto") - proto.RegisterType((*ClientOperationHeaderProto)(nil), "hadoop.hdfs.ClientOperationHeaderProto") - proto.RegisterType((*CachingStrategyProto)(nil), "hadoop.hdfs.CachingStrategyProto") - proto.RegisterType((*OpReadBlockProto)(nil), "hadoop.hdfs.OpReadBlockProto") - proto.RegisterType((*ChecksumProto)(nil), "hadoop.hdfs.ChecksumProto") - proto.RegisterType((*OpWriteBlockProto)(nil), "hadoop.hdfs.OpWriteBlockProto") - proto.RegisterType((*OpTransferBlockProto)(nil), "hadoop.hdfs.OpTransferBlockProto") - proto.RegisterType((*OpReplaceBlockProto)(nil), "hadoop.hdfs.OpReplaceBlockProto") - proto.RegisterType((*OpCopyBlockProto)(nil), "hadoop.hdfs.OpCopyBlockProto") - proto.RegisterType((*OpBlockChecksumProto)(nil), "hadoop.hdfs.OpBlockChecksumProto") - proto.RegisterType((*OpBlockGroupChecksumProto)(nil), "hadoop.hdfs.OpBlockGroupChecksumProto") - proto.RegisterType((*ShortCircuitShmIdProto)(nil), "hadoop.hdfs.ShortCircuitShmIdProto") - proto.RegisterType((*ShortCircuitShmSlotProto)(nil), "hadoop.hdfs.ShortCircuitShmSlotProto") - proto.RegisterType((*OpRequestShortCircuitAccessProto)(nil), "hadoop.hdfs.OpRequestShortCircuitAccessProto") - proto.RegisterType((*ReleaseShortCircuitAccessRequestProto)(nil), "hadoop.hdfs.ReleaseShortCircuitAccessRequestProto") - proto.RegisterType((*ReleaseShortCircuitAccessResponseProto)(nil), "hadoop.hdfs.ReleaseShortCircuitAccessResponseProto") - proto.RegisterType((*ShortCircuitShmRequestProto)(nil), "hadoop.hdfs.ShortCircuitShmRequestProto") - proto.RegisterType((*ShortCircuitShmResponseProto)(nil), "hadoop.hdfs.ShortCircuitShmResponseProto") - proto.RegisterType((*PacketHeaderProto)(nil), "hadoop.hdfs.PacketHeaderProto") - proto.RegisterType((*PipelineAckProto)(nil), "hadoop.hdfs.PipelineAckProto") - proto.RegisterType((*ReadOpChecksumInfoProto)(nil), "hadoop.hdfs.ReadOpChecksumInfoProto") - proto.RegisterType((*BlockOpResponseProto)(nil), "hadoop.hdfs.BlockOpResponseProto") - proto.RegisterType((*ClientReadStatusProto)(nil), "hadoop.hdfs.ClientReadStatusProto") - proto.RegisterType((*DNTransferAckProto)(nil), "hadoop.hdfs.DNTransferAckProto") - proto.RegisterType((*OpBlockChecksumResponseProto)(nil), "hadoop.hdfs.OpBlockChecksumResponseProto") - proto.RegisterType((*OpCustomProto)(nil), "hadoop.hdfs.OpCustomProto") - proto.RegisterEnum("hadoop.hdfs.Status", Status_name, Status_value) - proto.RegisterEnum("hadoop.hdfs.ShortCircuitFdResponse", ShortCircuitFdResponse_name, ShortCircuitFdResponse_value) - proto.RegisterEnum("hadoop.hdfs.DataTransferEncryptorMessageProto_DataTransferEncryptorStatus", DataTransferEncryptorMessageProto_DataTransferEncryptorStatus_name, DataTransferEncryptorMessageProto_DataTransferEncryptorStatus_value) - proto.RegisterEnum("hadoop.hdfs.OpWriteBlockProto_BlockConstructionStage", OpWriteBlockProto_BlockConstructionStage_name, OpWriteBlockProto_BlockConstructionStage_value) -} - -func init() { proto.RegisterFile("datatransfer.proto", fileDescriptor5) } - -var fileDescriptor5 = []byte{ - // 2039 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x73, 0xdc, 0xc6, - 0xf1, 0x17, 0xf6, 0x41, 0xee, 0xf6, 0x92, 0x14, 0x38, 0x96, 0x68, 0x88, 0xd2, 0x5f, 0xa2, 0x20, - 0xcb, 0x7f, 0x5a, 0x4e, 0x31, 0x31, 0x6d, 0xb9, 0x6c, 0xc5, 0x4e, 0x6a, 0x1f, 0x90, 0xb4, 0x21, - 0xb5, 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70, - 0xf4, 0x8a, 0x18, 0x43, 0x14, 0xa5, 0x29, 0xb5, 0x0e, 0x07, 0xf6, 0x9e, 0xd5, 0xd3, 0xab, 0xe8, - 0x3a, 0x34, 0x32, 0x55, 0x43, 0x7b, 0x4f, 0x5f, 0xca, 0x3f, 0x3c, 0x3a, 0x07, 0xfd, 0xbe, 0x8d, - 0x07, 0x56, 0x47, 0x5f, 0x16, 0x7c, 0xb6, 0xdd, 0x1a, 0x62, 0xcb, 0x19, 0x34, 0xf1, 0x40, 0xaf, - 0x89, 0xbf, 0xa6, 0x04, 0x0b, 0x1f, 0x5a, 0x9d, 0x4f, 0xf4, 0xfa, 0x3c, 0x69, 0x57, 0x87, 0x79, - 0xd2, 0xa7, 0x7a, 0x43, 0x68, 0xea, 0xf6, 0x86, 0x7d, 0x6c, 0x3f, 0xc3, 0xc2, 0xbd, 0x95, 0x47, - 0xbf, 0x28, 0x36, 0x65, 0x4f, 0xbd, 0xd9, 0x2d, 0x79, 0x00, 0xf7, 0x3a, 0xf6, 0xb0, 0x67, 0x0f, - 0x86, 0x07, 0x6a, 0x02, 0xb3, 0xba, 0xfd, 0xc1, 0xf0, 0xd0, 0xc2, 0xdd, 0xa7, 0xdd, 0x76, 0x73, - 0xd0, 0xb5, 0x7b, 0xfa, 0x35, 0x74, 0x07, 0x8c, 0x73, 0x77, 0xb5, 0xd6, 0x8f, 0xe0, 0x61, 0x94, - 0x1c, 0xef, 0x90, 0x98, 0xb8, 0x23, 0x5a, 0x38, 0x35, 0xf9, 0x2a, 0xed, 0x46, 0x81, 0xfa, 0x68, - 0xa1, 0x7c, 0xbd, 0x93, 0x67, 0xc5, 0x7e, 0xaf, 0x69, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xfa, - 0x1e, 0x11, 0x57, 0xf3, 0x16, 0x00, 0x00, +var File_datatransfer_proto protoreflect.FileDescriptor + +var file_datatransfer_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x1a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0a, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x03, + 0x0a, 0x21, 0x44, 0x61, 0x74, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x45, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x62, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x0e, 0x32, 0x4a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x45, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x63, + 0x69, 0x70, 0x68, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x0c, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x4b, 0x0a, 0x0f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0f, 0x68, 0x61, 0x6e, + 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x4c, 0x0a, 0x1b, + 0x44, 0x61, 0x74, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x53, + 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x22, 0x42, 0x0a, 0x14, 0x48, 0x61, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x0c, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x70, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x62, 0x70, 0x69, 0x64, 0x22, 0xc0, + 0x01, 0x0a, 0x0f, 0x42, 0x61, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x35, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2f, 0x0a, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x45, 0x0a, 0x09, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x52, 0x0a, 0x1a, 0x44, 0x61, 0x74, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x54, 0x72, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x18, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, + 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x08, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x7a, 0x0a, 0x1a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x54, 0x0a, 0x14, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x72, 0x6f, + 0x70, 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, + 0x72, 0x6f, 0x70, 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x61, + 0x64, 0x61, 0x68, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, + 0x61, 0x64, 0x61, 0x68, 0x65, 0x61, 0x64, 0x22, 0xf6, 0x01, 0x0a, 0x10, 0x4f, 0x70, 0x52, 0x65, + 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x02, + 0x28, 0x04, 0x52, 0x03, 0x6c, 0x65, 0x6e, 0x12, 0x2a, 0x0a, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, + 0x74, 0x72, 0x75, 0x65, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x63, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x0f, 0x63, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, + 0x22, 0x6f, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, + 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x62, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, + 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, + 0x10, 0x62, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, + 0x6d, 0x22, 0xb3, 0x09, 0x0a, 0x11, 0x4f, 0x70, 0x57, 0x72, 0x69, 0x74, 0x65, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4f, 0x70, 0x57, 0x72, 0x69, 0x74, 0x65, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0c, 0x70, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6d, + 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x63, 0x76, 0x64, 0x18, 0x06, 0x20, 0x02, 0x28, + 0x04, 0x52, 0x0c, 0x6d, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x63, 0x76, 0x64, 0x12, + 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x63, 0x76, 0x64, 0x18, + 0x07, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, + 0x63, 0x76, 0x64, 0x12, 0x34, 0x0a, 0x15, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x02, + 0x28, 0x04, 0x52, 0x15, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x48, 0x0a, 0x11, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x09, + 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x12, 0x4b, 0x0a, 0x0f, 0x63, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x0f, 0x63, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, + 0x12, 0x45, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x04, 0x44, 0x49, 0x53, 0x4b, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4d, 0x0a, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0c, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, + 0x61, 0x7a, 0x79, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x61, + 0x7a, 0x79, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x07, 0x70, 0x69, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, + 0x65, 0x52, 0x07, 0x70, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x50, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0f, 0x20, 0x03, + 0x28, 0x08, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x69, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, + 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x49, 0x64, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, 0x73, 0x22, 0x88, 0x02, 0x0a, + 0x16, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x50, 0x49, 0x50, 0x45, 0x4c, + 0x49, 0x4e, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, + 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x53, + 0x45, 0x54, 0x55, 0x50, 0x5f, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x43, 0x4f, + 0x56, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x53, + 0x54, 0x52, 0x45, 0x41, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x50, 0x49, + 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x53, 0x54, 0x52, + 0x45, 0x41, 0x4d, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x10, + 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x43, 0x4c, + 0x4f, 0x53, 0x45, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, + 0x45, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, + 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x53, + 0x45, 0x54, 0x55, 0x50, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x06, 0x12, 0x10, 0x0a, + 0x0c, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x52, 0x42, 0x57, 0x10, 0x07, 0x12, + 0x16, 0x0a, 0x12, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4e, 0x41, + 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x08, 0x22, 0x8c, 0x02, 0x0a, 0x14, 0x4f, 0x70, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x3f, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x38, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x12, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x49, 0x64, 0x73, 0x22, 0x82, 0x02, 0x0a, 0x13, 0x4f, 0x70, 0x52, 0x65, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x34, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x61, 0x73, + 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x48, 0x69, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x48, 0x69, 0x6e, 0x74, 0x12, 0x36, + 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x04, 0x44, 0x49, 0x53, 0x4b, + 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x10, 0x4f, + 0x70, 0x43, 0x6f, 0x70, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x61, + 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xa8, 0x01, 0x0a, 0x14, 0x4f, 0x70, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x34, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x61, 0x73, + 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x14, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x14, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0xbe, 0x03, 0x0a, 0x19, 0x4f, 0x70, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x34, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, 0x61, 0x73, + 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, + 0x12, 0x41, 0x0a, 0x08, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x02, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x63, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x69, + 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x4e, 0x75, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x02, + 0x28, 0x04, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4e, 0x75, 0x6d, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x14, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x14, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x38, 0x0a, 0x16, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, + 0x74, 0x53, 0x68, 0x6d, 0x49, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x68, + 0x69, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x02, 0x68, 0x69, 0x12, 0x0e, 0x0a, 0x02, 0x6c, + 0x6f, 0x18, 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x02, 0x6c, 0x6f, 0x22, 0x6f, 0x0a, 0x18, 0x53, + 0x68, 0x6f, 0x72, 0x74, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x53, 0x68, 0x6d, 0x53, 0x6c, + 0x6f, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x39, 0x0a, 0x05, 0x73, 0x68, 0x6d, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, + 0x74, 0x53, 0x68, 0x6d, 0x49, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x73, 0x68, 0x6d, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6c, 0x6f, 0x74, 0x49, 0x64, 0x78, 0x18, 0x02, 0x20, + 0x02, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6c, 0x6f, 0x74, 0x49, 0x64, 0x78, 0x22, 0x80, 0x02, 0x0a, + 0x20, 0x4f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, + 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x34, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x42, 0x61, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x78, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x6c, 0x6f, 0x74, 0x49, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, 0x69, 0x72, 0x63, 0x75, + 0x69, 0x74, 0x53, 0x68, 0x6d, 0x53, 0x6c, 0x6f, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, + 0x73, 0x6c, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x1b, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x1b, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0xad, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, + 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x6c, 0x6f, + 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, 0x69, 0x72, + 0x63, 0x75, 0x69, 0x74, 0x53, 0x68, 0x6d, 0x53, 0x6c, 0x6f, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x06, 0x73, 0x6c, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, + 0x6b, 0x0a, 0x26, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, + 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x84, 0x01, 0x0a, + 0x1b, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x53, 0x68, 0x6d, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x09, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x63, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x22, 0x96, 0x01, 0x0a, 0x1c, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, 0x69, 0x72, + 0x63, 0x75, 0x69, 0x74, 0x53, 0x68, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x53, 0x68, + 0x6d, 0x49, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x02, 0x69, 0x64, 0x22, 0xbc, 0x01, 0x0a, + 0x11, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x10, 0x52, 0x0d, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x49, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x65, 0x71, 0x6e, + 0x6f, 0x18, 0x02, 0x20, 0x02, 0x28, 0x10, 0x52, 0x05, 0x73, 0x65, 0x71, 0x6e, 0x6f, 0x12, 0x2c, + 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x02, 0x28, 0x08, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, + 0x64, 0x61, 0x74, 0x61, 0x4c, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0f, 0x52, 0x07, 0x64, + 0x61, 0x74, 0x61, 0x4c, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0xa6, 0x01, 0x0a, 0x10, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x65, 0x71, 0x6e, 0x6f, 0x18, 0x01, 0x20, 0x02, 0x28, 0x12, 0x52, + 0x05, 0x73, 0x65, 0x71, 0x6e, 0x6f, 0x12, 0x29, 0x0a, 0x05, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x72, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x39, 0x0a, 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, + 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x3a, 0x01, 0x30, 0x52, 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x41, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x16, 0x0a, 0x04, + 0x66, 0x6c, 0x61, 0x67, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x66, 0x6c, 0x61, 0x67, 0x22, 0x73, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x36, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x75, 0x6e, 0x6b, + 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0b, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0xec, 0x02, 0x0a, 0x14, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x61, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x61, 0x64, 0x4c, + 0x69, 0x6e, 0x6b, 0x12, 0x55, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4f, 0x70, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x72, 0x65, + 0x61, 0x64, 0x4f, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x49, 0x6e, 0x66, 0x6f, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x12, 0x72, 0x65, + 0x61, 0x64, 0x4f, 0x70, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x19, 0x73, 0x68, + 0x6f, 0x72, 0x74, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x19, 0x73, + 0x68, 0x6f, 0x72, 0x74, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x0e, 0x32, 0x13, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x41, + 0x0a, 0x12, 0x44, 0x4e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x63, 0x6b, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x9e, 0x02, 0x0a, 0x1c, 0x4f, 0x70, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, 0x43, 0x72, + 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, + 0x72, 0x43, 0x72, 0x63, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x72, 0x63, 0x50, 0x65, 0x72, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0b, 0x63, 0x72, 0x63, 0x50, 0x65, + 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x0d, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x38, 0x0a, 0x07, + 0x63, 0x72, 0x63, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x63, + 0x72, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5a, 0x0a, 0x14, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x14, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x2b, 0x0a, 0x0d, 0x4f, 0x70, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x49, 0x64, 0x2a, + 0x8c, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, + 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, + 0x4b, 0x53, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x4f, 0x4b, 0x45, + 0x4e, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x53, 0x55, 0x4d, 0x5f, + 0x4f, 0x4b, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, + 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, + 0x4f, 0x42, 0x5f, 0x52, 0x45, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, + 0x4f, 0x4f, 0x42, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x31, 0x10, 0x09, 0x12, + 0x11, 0x0a, 0x0d, 0x4f, 0x4f, 0x42, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x32, + 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x4f, 0x42, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, + 0x45, 0x44, 0x33, 0x10, 0x0b, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, + 0x52, 0x45, 0x53, 0x53, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x50, 0x49, 0x4e, 0x4e, 0x45, 0x44, 0x10, 0x0d, 0x2a, 0x5b, + 0x0a, 0x16, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x46, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x44, 0x4f, 0x5f, 0x4e, + 0x4f, 0x54, 0x5f, 0x55, 0x53, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50, 0x54, 0x5f, 0x56, + 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x1c, 0x0a, + 0x18, 0x55, 0x53, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x50, 0x54, 0x5f, 0x56, 0x45, 0x52, + 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x42, 0x7a, 0x0a, 0x25, 0x6f, + 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x12, 0x44, 0x61, 0x74, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, + 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, + 0x68, 0x64, 0x66, 0x73, 0xa0, 0x01, 0x01, +} + +var ( + file_datatransfer_proto_rawDescOnce sync.Once + file_datatransfer_proto_rawDescData = file_datatransfer_proto_rawDesc +) + +func file_datatransfer_proto_rawDescGZIP() []byte { + file_datatransfer_proto_rawDescOnce.Do(func() { + file_datatransfer_proto_rawDescData = protoimpl.X.CompressGZIP(file_datatransfer_proto_rawDescData) + }) + return file_datatransfer_proto_rawDescData +} + +var file_datatransfer_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_datatransfer_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_datatransfer_proto_goTypes = []interface{}{ + (Status)(0), // 0: hadoop.hdfs.Status + (ShortCircuitFdResponse)(0), // 1: hadoop.hdfs.ShortCircuitFdResponse + (DataTransferEncryptorMessageProto_DataTransferEncryptorStatus)(0), // 2: hadoop.hdfs.DataTransferEncryptorMessageProto.DataTransferEncryptorStatus + (OpWriteBlockProto_BlockConstructionStage)(0), // 3: hadoop.hdfs.OpWriteBlockProto.BlockConstructionStage + (*DataTransferEncryptorMessageProto)(nil), // 4: hadoop.hdfs.DataTransferEncryptorMessageProto + (*HandshakeSecretProto)(nil), // 5: hadoop.hdfs.HandshakeSecretProto + (*BaseHeaderProto)(nil), // 6: hadoop.hdfs.BaseHeaderProto + (*DataTransferTraceInfoProto)(nil), // 7: hadoop.hdfs.DataTransferTraceInfoProto + (*ClientOperationHeaderProto)(nil), // 8: hadoop.hdfs.ClientOperationHeaderProto + (*CachingStrategyProto)(nil), // 9: hadoop.hdfs.CachingStrategyProto + (*OpReadBlockProto)(nil), // 10: hadoop.hdfs.OpReadBlockProto + (*ChecksumProto)(nil), // 11: hadoop.hdfs.ChecksumProto + (*OpWriteBlockProto)(nil), // 12: hadoop.hdfs.OpWriteBlockProto + (*OpTransferBlockProto)(nil), // 13: hadoop.hdfs.OpTransferBlockProto + (*OpReplaceBlockProto)(nil), // 14: hadoop.hdfs.OpReplaceBlockProto + (*OpCopyBlockProto)(nil), // 15: hadoop.hdfs.OpCopyBlockProto + (*OpBlockChecksumProto)(nil), // 16: hadoop.hdfs.OpBlockChecksumProto + (*OpBlockGroupChecksumProto)(nil), // 17: hadoop.hdfs.OpBlockGroupChecksumProto + (*ShortCircuitShmIdProto)(nil), // 18: hadoop.hdfs.ShortCircuitShmIdProto + (*ShortCircuitShmSlotProto)(nil), // 19: hadoop.hdfs.ShortCircuitShmSlotProto + (*OpRequestShortCircuitAccessProto)(nil), // 20: hadoop.hdfs.OpRequestShortCircuitAccessProto + (*ReleaseShortCircuitAccessRequestProto)(nil), // 21: hadoop.hdfs.ReleaseShortCircuitAccessRequestProto + (*ReleaseShortCircuitAccessResponseProto)(nil), // 22: hadoop.hdfs.ReleaseShortCircuitAccessResponseProto + (*ShortCircuitShmRequestProto)(nil), // 23: hadoop.hdfs.ShortCircuitShmRequestProto + (*ShortCircuitShmResponseProto)(nil), // 24: hadoop.hdfs.ShortCircuitShmResponseProto + (*PacketHeaderProto)(nil), // 25: hadoop.hdfs.PacketHeaderProto + (*PipelineAckProto)(nil), // 26: hadoop.hdfs.PipelineAckProto + (*ReadOpChecksumInfoProto)(nil), // 27: hadoop.hdfs.ReadOpChecksumInfoProto + (*BlockOpResponseProto)(nil), // 28: hadoop.hdfs.BlockOpResponseProto + (*ClientReadStatusProto)(nil), // 29: hadoop.hdfs.ClientReadStatusProto + (*DNTransferAckProto)(nil), // 30: hadoop.hdfs.DNTransferAckProto + (*OpBlockChecksumResponseProto)(nil), // 31: hadoop.hdfs.OpBlockChecksumResponseProto + (*OpCustomProto)(nil), // 32: hadoop.hdfs.OpCustomProto + (*CipherOptionProto)(nil), // 33: hadoop.hdfs.CipherOptionProto + (*ExtendedBlockProto)(nil), // 34: hadoop.hdfs.ExtendedBlockProto + (*hadoop_common.TokenProto)(nil), // 35: hadoop.common.TokenProto + (ChecksumTypeProto)(0), // 36: hadoop.hdfs.ChecksumTypeProto + (*DatanodeInfoProto)(nil), // 37: hadoop.hdfs.DatanodeInfoProto + (StorageTypeProto)(0), // 38: hadoop.hdfs.StorageTypeProto + (*BlockChecksumOptionsProto)(nil), // 39: hadoop.hdfs.BlockChecksumOptionsProto + (*DatanodeInfosProto)(nil), // 40: hadoop.hdfs.DatanodeInfosProto + (*ErasureCodingPolicyProto)(nil), // 41: hadoop.hdfs.ErasureCodingPolicyProto +} +var file_datatransfer_proto_depIdxs = []int32{ + 2, // 0: hadoop.hdfs.DataTransferEncryptorMessageProto.status:type_name -> hadoop.hdfs.DataTransferEncryptorMessageProto.DataTransferEncryptorStatus + 33, // 1: hadoop.hdfs.DataTransferEncryptorMessageProto.cipherOption:type_name -> hadoop.hdfs.CipherOptionProto + 5, // 2: hadoop.hdfs.DataTransferEncryptorMessageProto.handshakeSecret:type_name -> hadoop.hdfs.HandshakeSecretProto + 34, // 3: hadoop.hdfs.BaseHeaderProto.block:type_name -> hadoop.hdfs.ExtendedBlockProto + 35, // 4: hadoop.hdfs.BaseHeaderProto.token:type_name -> hadoop.common.TokenProto + 7, // 5: hadoop.hdfs.BaseHeaderProto.traceInfo:type_name -> hadoop.hdfs.DataTransferTraceInfoProto + 6, // 6: hadoop.hdfs.ClientOperationHeaderProto.baseHeader:type_name -> hadoop.hdfs.BaseHeaderProto + 8, // 7: hadoop.hdfs.OpReadBlockProto.header:type_name -> hadoop.hdfs.ClientOperationHeaderProto + 9, // 8: hadoop.hdfs.OpReadBlockProto.cachingStrategy:type_name -> hadoop.hdfs.CachingStrategyProto + 36, // 9: hadoop.hdfs.ChecksumProto.type:type_name -> hadoop.hdfs.ChecksumTypeProto + 8, // 10: hadoop.hdfs.OpWriteBlockProto.header:type_name -> hadoop.hdfs.ClientOperationHeaderProto + 37, // 11: hadoop.hdfs.OpWriteBlockProto.targets:type_name -> hadoop.hdfs.DatanodeInfoProto + 37, // 12: hadoop.hdfs.OpWriteBlockProto.source:type_name -> hadoop.hdfs.DatanodeInfoProto + 3, // 13: hadoop.hdfs.OpWriteBlockProto.stage:type_name -> hadoop.hdfs.OpWriteBlockProto.BlockConstructionStage + 11, // 14: hadoop.hdfs.OpWriteBlockProto.requestedChecksum:type_name -> hadoop.hdfs.ChecksumProto + 9, // 15: hadoop.hdfs.OpWriteBlockProto.cachingStrategy:type_name -> hadoop.hdfs.CachingStrategyProto + 38, // 16: hadoop.hdfs.OpWriteBlockProto.storageType:type_name -> hadoop.hdfs.StorageTypeProto + 38, // 17: hadoop.hdfs.OpWriteBlockProto.targetStorageTypes:type_name -> hadoop.hdfs.StorageTypeProto + 8, // 18: hadoop.hdfs.OpTransferBlockProto.header:type_name -> hadoop.hdfs.ClientOperationHeaderProto + 37, // 19: hadoop.hdfs.OpTransferBlockProto.targets:type_name -> hadoop.hdfs.DatanodeInfoProto + 38, // 20: hadoop.hdfs.OpTransferBlockProto.targetStorageTypes:type_name -> hadoop.hdfs.StorageTypeProto + 6, // 21: hadoop.hdfs.OpReplaceBlockProto.header:type_name -> hadoop.hdfs.BaseHeaderProto + 37, // 22: hadoop.hdfs.OpReplaceBlockProto.source:type_name -> hadoop.hdfs.DatanodeInfoProto + 38, // 23: hadoop.hdfs.OpReplaceBlockProto.storageType:type_name -> hadoop.hdfs.StorageTypeProto + 6, // 24: hadoop.hdfs.OpCopyBlockProto.header:type_name -> hadoop.hdfs.BaseHeaderProto + 6, // 25: hadoop.hdfs.OpBlockChecksumProto.header:type_name -> hadoop.hdfs.BaseHeaderProto + 39, // 26: hadoop.hdfs.OpBlockChecksumProto.blockChecksumOptions:type_name -> hadoop.hdfs.BlockChecksumOptionsProto + 6, // 27: hadoop.hdfs.OpBlockGroupChecksumProto.header:type_name -> hadoop.hdfs.BaseHeaderProto + 40, // 28: hadoop.hdfs.OpBlockGroupChecksumProto.datanodes:type_name -> hadoop.hdfs.DatanodeInfosProto + 35, // 29: hadoop.hdfs.OpBlockGroupChecksumProto.blockTokens:type_name -> hadoop.common.TokenProto + 41, // 30: hadoop.hdfs.OpBlockGroupChecksumProto.ecPolicy:type_name -> hadoop.hdfs.ErasureCodingPolicyProto + 39, // 31: hadoop.hdfs.OpBlockGroupChecksumProto.blockChecksumOptions:type_name -> hadoop.hdfs.BlockChecksumOptionsProto + 18, // 32: hadoop.hdfs.ShortCircuitShmSlotProto.shmId:type_name -> hadoop.hdfs.ShortCircuitShmIdProto + 6, // 33: hadoop.hdfs.OpRequestShortCircuitAccessProto.header:type_name -> hadoop.hdfs.BaseHeaderProto + 19, // 34: hadoop.hdfs.OpRequestShortCircuitAccessProto.slotId:type_name -> hadoop.hdfs.ShortCircuitShmSlotProto + 19, // 35: hadoop.hdfs.ReleaseShortCircuitAccessRequestProto.slotId:type_name -> hadoop.hdfs.ShortCircuitShmSlotProto + 7, // 36: hadoop.hdfs.ReleaseShortCircuitAccessRequestProto.traceInfo:type_name -> hadoop.hdfs.DataTransferTraceInfoProto + 0, // 37: hadoop.hdfs.ReleaseShortCircuitAccessResponseProto.status:type_name -> hadoop.hdfs.Status + 7, // 38: hadoop.hdfs.ShortCircuitShmRequestProto.traceInfo:type_name -> hadoop.hdfs.DataTransferTraceInfoProto + 0, // 39: hadoop.hdfs.ShortCircuitShmResponseProto.status:type_name -> hadoop.hdfs.Status + 18, // 40: hadoop.hdfs.ShortCircuitShmResponseProto.id:type_name -> hadoop.hdfs.ShortCircuitShmIdProto + 0, // 41: hadoop.hdfs.PipelineAckProto.reply:type_name -> hadoop.hdfs.Status + 11, // 42: hadoop.hdfs.ReadOpChecksumInfoProto.checksum:type_name -> hadoop.hdfs.ChecksumProto + 0, // 43: hadoop.hdfs.BlockOpResponseProto.status:type_name -> hadoop.hdfs.Status + 31, // 44: hadoop.hdfs.BlockOpResponseProto.checksumResponse:type_name -> hadoop.hdfs.OpBlockChecksumResponseProto + 27, // 45: hadoop.hdfs.BlockOpResponseProto.readOpChecksumInfo:type_name -> hadoop.hdfs.ReadOpChecksumInfoProto + 0, // 46: hadoop.hdfs.ClientReadStatusProto.status:type_name -> hadoop.hdfs.Status + 0, // 47: hadoop.hdfs.DNTransferAckProto.status:type_name -> hadoop.hdfs.Status + 36, // 48: hadoop.hdfs.OpBlockChecksumResponseProto.crcType:type_name -> hadoop.hdfs.ChecksumTypeProto + 39, // 49: hadoop.hdfs.OpBlockChecksumResponseProto.blockChecksumOptions:type_name -> hadoop.hdfs.BlockChecksumOptionsProto + 50, // [50:50] is the sub-list for method output_type + 50, // [50:50] is the sub-list for method input_type + 50, // [50:50] is the sub-list for extension type_name + 50, // [50:50] is the sub-list for extension extendee + 0, // [0:50] is the sub-list for field type_name +} + +func init() { file_datatransfer_proto_init() } +func file_datatransfer_proto_init() { + if File_datatransfer_proto != nil { + return + } + file_hdfs_proto_init() + if !protoimpl.UnsafeEnabled { + file_datatransfer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataTransferEncryptorMessageProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandshakeSecretProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BaseHeaderProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataTransferTraceInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientOperationHeaderProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CachingStrategyProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpReadBlockProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChecksumProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpWriteBlockProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpTransferBlockProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpReplaceBlockProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpCopyBlockProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpBlockChecksumProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpBlockGroupChecksumProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShortCircuitShmIdProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShortCircuitShmSlotProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpRequestShortCircuitAccessProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReleaseShortCircuitAccessRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReleaseShortCircuitAccessResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShortCircuitShmRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShortCircuitShmResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PacketHeaderProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PipelineAckProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadOpChecksumInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockOpResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientReadStatusProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DNTransferAckProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpBlockChecksumResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_datatransfer_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpCustomProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_datatransfer_proto_rawDesc, + NumEnums: 4, + NumMessages: 29, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_datatransfer_proto_goTypes, + DependencyIndexes: file_datatransfer_proto_depIdxs, + EnumInfos: file_datatransfer_proto_enumTypes, + MessageInfos: file_datatransfer_proto_msgTypes, + }.Build() + File_datatransfer_proto = out.File + file_datatransfer_proto_rawDesc = nil + file_datatransfer_proto_goTypes = nil + file_datatransfer_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_hdfs/datatransfer.proto b/internal/protocol/hadoop_hdfs/datatransfer.proto index 522ee06b..bcd24ef9 100644 --- a/internal/protocol/hadoop_hdfs/datatransfer.proto +++ b/internal/protocol/hadoop_hdfs/datatransfer.proto @@ -21,13 +21,14 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax="proto2"; // This file contains protocol buffers that are used to transfer data // to and from the datanode, as well as between datanodes. option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "DataTransferProtos"; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; package hadoop.hdfs; import "Security.proto"; @@ -43,6 +44,12 @@ message DataTransferEncryptorMessageProto { optional bytes payload = 2; optional string message = 3; repeated CipherOptionProto cipherOption = 4; + optional HandshakeSecretProto handshakeSecret = 5; +} + +message HandshakeSecretProto { + required bytes secret = 1; + required string bpid = 2; } message BaseHeaderProto { @@ -125,12 +132,15 @@ message OpWriteBlockProto { //whether to pin the block, so Balancer won't move it. optional bool pinning = 14 [default = false]; repeated bool targetPinnings = 15; + optional string storageId = 16; + repeated string targetStorageIds = 17; } message OpTransferBlockProto { required ClientOperationHeaderProto header = 1; repeated DatanodeInfoProto targets = 2; repeated StorageTypeProto targetStorageTypes = 3; + repeated string targetStorageIds = 4; } message OpReplaceBlockProto { @@ -138,14 +148,16 @@ message OpReplaceBlockProto { required string delHint = 2; required DatanodeInfoProto source = 3; optional StorageTypeProto storageType = 4 [default = DISK]; + optional string storageId = 5; } message OpCopyBlockProto { required BaseHeaderProto header = 1; } -message OpBlockChecksumProto { +message OpBlockChecksumProto { required BaseHeaderProto header = 1; + optional BlockChecksumOptionsProto blockChecksumOptions = 2; } message OpBlockGroupChecksumProto { @@ -154,6 +166,9 @@ message OpBlockGroupChecksumProto { // each internal block has a block token repeated hadoop.common.TokenProto blockTokens = 3; required ErasureCodingPolicyProto ecPolicy = 4; + repeated uint32 blockIndices = 5; + required uint64 requestedNumBytes = 6; + optional BlockChecksumOptionsProto blockChecksumOptions = 7; } /** @@ -241,6 +256,7 @@ enum Status { OOB_RESERVED2 = 10; // Reserved OOB_RESERVED3 = 11; // Reserved IN_PROGRESS = 12; + ERROR_BLOCK_PINNED = 13; } enum ShortCircuitFdResponse { @@ -306,8 +322,9 @@ message DNTransferAckProto { message OpBlockChecksumResponseProto { required uint32 bytesPerCrc = 1; required uint64 crcPerBlock = 2; - required bytes md5 = 3; + required bytes blockChecksum = 3; optional ChecksumTypeProto crcType = 4; + optional BlockChecksumOptionsProto blockChecksumOptions = 5; } message OpCustomProto { diff --git a/internal/protocol/hadoop_hdfs/editlog.pb.go b/internal/protocol/hadoop_hdfs/editlog.pb.go new file mode 100644 index 00000000..ccf786f7 --- /dev/null +++ b/internal/protocol/hadoop_hdfs/editlog.pb.go @@ -0,0 +1,257 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: editlog.proto + +package hadoop_hdfs + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AclEditLogProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + Entries []*AclEntryProto `protobuf:"bytes,2,rep,name=entries" json:"entries,omitempty"` +} + +func (x *AclEditLogProto) Reset() { + *x = AclEditLogProto{} + if protoimpl.UnsafeEnabled { + mi := &file_editlog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AclEditLogProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AclEditLogProto) ProtoMessage() {} + +func (x *AclEditLogProto) ProtoReflect() protoreflect.Message { + mi := &file_editlog_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AclEditLogProto.ProtoReflect.Descriptor instead. +func (*AclEditLogProto) Descriptor() ([]byte, []int) { + return file_editlog_proto_rawDescGZIP(), []int{0} +} + +func (x *AclEditLogProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *AclEditLogProto) GetEntries() []*AclEntryProto { + if x != nil { + return x.Entries + } + return nil +} + +type XAttrEditLogProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,opt,name=src" json:"src,omitempty"` + XAttrs []*XAttrProto `protobuf:"bytes,2,rep,name=xAttrs" json:"xAttrs,omitempty"` +} + +func (x *XAttrEditLogProto) Reset() { + *x = XAttrEditLogProto{} + if protoimpl.UnsafeEnabled { + mi := &file_editlog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XAttrEditLogProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XAttrEditLogProto) ProtoMessage() {} + +func (x *XAttrEditLogProto) ProtoReflect() protoreflect.Message { + mi := &file_editlog_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XAttrEditLogProto.ProtoReflect.Descriptor instead. +func (*XAttrEditLogProto) Descriptor() ([]byte, []int) { + return file_editlog_proto_rawDescGZIP(), []int{1} +} + +func (x *XAttrEditLogProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +func (x *XAttrEditLogProto) GetXAttrs() []*XAttrProto { + if x != nil { + return x.XAttrs + } + return nil +} + +var File_editlog_proto protoreflect.FileDescriptor + +var file_editlog_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x65, 0x64, 0x69, 0x74, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0b, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x1a, 0x09, 0x61, 0x63, + 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x78, 0x61, 0x74, 0x74, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x0f, 0x41, 0x63, 0x6c, 0x45, 0x64, 0x69, 0x74, 0x4c, + 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, + 0x56, 0x0a, 0x11, 0x58, 0x41, 0x74, 0x74, 0x72, 0x45, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x2f, 0x0a, 0x06, 0x78, 0x41, 0x74, 0x74, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x58, 0x41, 0x74, 0x74, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x06, 0x78, 0x41, 0x74, 0x74, 0x72, 0x73, 0x42, 0x75, 0x0a, 0x25, 0x6f, 0x72, 0x67, 0x2e, 0x61, + 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x42, 0x0d, 0x45, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, + 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, + 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x68, 0x64, 0x66, 0x73, 0xa0, 0x01, 0x01, +} + +var ( + file_editlog_proto_rawDescOnce sync.Once + file_editlog_proto_rawDescData = file_editlog_proto_rawDesc +) + +func file_editlog_proto_rawDescGZIP() []byte { + file_editlog_proto_rawDescOnce.Do(func() { + file_editlog_proto_rawDescData = protoimpl.X.CompressGZIP(file_editlog_proto_rawDescData) + }) + return file_editlog_proto_rawDescData +} + +var file_editlog_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_editlog_proto_goTypes = []interface{}{ + (*AclEditLogProto)(nil), // 0: hadoop.hdfs.AclEditLogProto + (*XAttrEditLogProto)(nil), // 1: hadoop.hdfs.XAttrEditLogProto + (*AclEntryProto)(nil), // 2: hadoop.hdfs.AclEntryProto + (*XAttrProto)(nil), // 3: hadoop.hdfs.XAttrProto +} +var file_editlog_proto_depIdxs = []int32{ + 2, // 0: hadoop.hdfs.AclEditLogProto.entries:type_name -> hadoop.hdfs.AclEntryProto + 3, // 1: hadoop.hdfs.XAttrEditLogProto.xAttrs:type_name -> hadoop.hdfs.XAttrProto + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_editlog_proto_init() } +func file_editlog_proto_init() { + if File_editlog_proto != nil { + return + } + file_acl_proto_init() + file_xattr_proto_init() + if !protoimpl.UnsafeEnabled { + file_editlog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AclEditLogProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_editlog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XAttrEditLogProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_editlog_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_editlog_proto_goTypes, + DependencyIndexes: file_editlog_proto_depIdxs, + MessageInfos: file_editlog_proto_msgTypes, + }.Build() + File_editlog_proto = out.File + file_editlog_proto_rawDesc = nil + file_editlog_proto_goTypes = nil + file_editlog_proto_depIdxs = nil +} diff --git a/internal/protocol/hadoop_hdfs/editlog.proto b/internal/protocol/hadoop_hdfs/editlog.proto new file mode 100644 index 00000000..d61c95fc --- /dev/null +++ b/internal/protocol/hadoop_hdfs/editlog.proto @@ -0,0 +1,36 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto2"; +option java_package = "org.apache.hadoop.hdfs.protocol.proto"; +option java_outer_classname = "EditLogProtos"; +option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; +package hadoop.hdfs; + +import "acl.proto"; +import "xattr.proto"; + +message AclEditLogProto { + required string src = 1; + repeated AclEntryProto entries = 2; +} + +message XAttrEditLogProto { + optional string src = 1; + repeated XAttrProto xAttrs = 2; +} diff --git a/internal/protocol/hadoop_hdfs/encryption.pb.go b/internal/protocol/hadoop_hdfs/encryption.pb.go index 0e265eb7..76918c7a 100644 --- a/internal/protocol/hadoop_hdfs/encryption.pb.go +++ b/internal/protocol/hadoop_hdfs/encryption.pb.go @@ -1,217 +1,1171 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: encryption.proto package hadoop_hdfs -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ReencryptActionProto int32 + +const ( + ReencryptActionProto_CANCEL_REENCRYPT ReencryptActionProto = 1 + ReencryptActionProto_START_REENCRYPT ReencryptActionProto = 2 +) + +// Enum value maps for ReencryptActionProto. +var ( + ReencryptActionProto_name = map[int32]string{ + 1: "CANCEL_REENCRYPT", + 2: "START_REENCRYPT", + } + ReencryptActionProto_value = map[string]int32{ + "CANCEL_REENCRYPT": 1, + "START_REENCRYPT": 2, + } +) + +func (x ReencryptActionProto) Enum() *ReencryptActionProto { + p := new(ReencryptActionProto) + *p = x + return p +} + +func (x ReencryptActionProto) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ReencryptActionProto) Descriptor() protoreflect.EnumDescriptor { + return file_encryption_proto_enumTypes[0].Descriptor() +} + +func (ReencryptActionProto) Type() protoreflect.EnumType { + return &file_encryption_proto_enumTypes[0] +} + +func (x ReencryptActionProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *ReencryptActionProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = ReencryptActionProto(num) + return nil +} + +// Deprecated: Use ReencryptActionProto.Descriptor instead. +func (ReencryptActionProto) EnumDescriptor() ([]byte, []int) { + return file_encryption_proto_rawDescGZIP(), []int{0} +} + +type ReencryptionStateProto int32 + +const ( + ReencryptionStateProto_SUBMITTED ReencryptionStateProto = 1 + ReencryptionStateProto_PROCESSING ReencryptionStateProto = 2 + ReencryptionStateProto_COMPLETED ReencryptionStateProto = 3 +) + +// Enum value maps for ReencryptionStateProto. +var ( + ReencryptionStateProto_name = map[int32]string{ + 1: "SUBMITTED", + 2: "PROCESSING", + 3: "COMPLETED", + } + ReencryptionStateProto_value = map[string]int32{ + "SUBMITTED": 1, + "PROCESSING": 2, + "COMPLETED": 3, + } +) + +func (x ReencryptionStateProto) Enum() *ReencryptionStateProto { + p := new(ReencryptionStateProto) + *p = x + return p +} + +func (x ReencryptionStateProto) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ReencryptionStateProto) Descriptor() protoreflect.EnumDescriptor { + return file_encryption_proto_enumTypes[1].Descriptor() +} + +func (ReencryptionStateProto) Type() protoreflect.EnumType { + return &file_encryption_proto_enumTypes[1] +} + +func (x ReencryptionStateProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *ReencryptionStateProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = ReencryptionStateProto(num) + return nil +} -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +// Deprecated: Use ReencryptionStateProto.Descriptor instead. +func (ReencryptionStateProto) EnumDescriptor() ([]byte, []int) { + return file_encryption_proto_rawDescGZIP(), []int{1} +} type CreateEncryptionZoneRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - KeyName *string `protobuf:"bytes,2,opt,name=keyName" json:"keyName,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + KeyName *string `protobuf:"bytes,2,opt,name=keyName" json:"keyName,omitempty"` +} + +func (x *CreateEncryptionZoneRequestProto) Reset() { + *x = CreateEncryptionZoneRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CreateEncryptionZoneRequestProto) Reset() { *m = CreateEncryptionZoneRequestProto{} } -func (m *CreateEncryptionZoneRequestProto) String() string { return proto.CompactTextString(m) } -func (*CreateEncryptionZoneRequestProto) ProtoMessage() {} +func (x *CreateEncryptionZoneRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEncryptionZoneRequestProto) ProtoMessage() {} + +func (x *CreateEncryptionZoneRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEncryptionZoneRequestProto.ProtoReflect.Descriptor instead. func (*CreateEncryptionZoneRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor2, []int{0} + return file_encryption_proto_rawDescGZIP(), []int{0} } -func (m *CreateEncryptionZoneRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *CreateEncryptionZoneRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *CreateEncryptionZoneRequestProto) GetKeyName() string { - if m != nil && m.KeyName != nil { - return *m.KeyName +func (x *CreateEncryptionZoneRequestProto) GetKeyName() string { + if x != nil && x.KeyName != nil { + return *x.KeyName } return "" } type CreateEncryptionZoneResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateEncryptionZoneResponseProto) Reset() { + *x = CreateEncryptionZoneResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEncryptionZoneResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEncryptionZoneResponseProto) ProtoMessage() {} + +func (x *CreateEncryptionZoneResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *CreateEncryptionZoneResponseProto) Reset() { *m = CreateEncryptionZoneResponseProto{} } -func (m *CreateEncryptionZoneResponseProto) String() string { return proto.CompactTextString(m) } -func (*CreateEncryptionZoneResponseProto) ProtoMessage() {} +// Deprecated: Use CreateEncryptionZoneResponseProto.ProtoReflect.Descriptor instead. func (*CreateEncryptionZoneResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor2, []int{1} + return file_encryption_proto_rawDescGZIP(), []int{1} } type ListEncryptionZonesRequestProto struct { - Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` } -func (m *ListEncryptionZonesRequestProto) Reset() { *m = ListEncryptionZonesRequestProto{} } -func (m *ListEncryptionZonesRequestProto) String() string { return proto.CompactTextString(m) } -func (*ListEncryptionZonesRequestProto) ProtoMessage() {} -func (*ListEncryptionZonesRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} } +func (x *ListEncryptionZonesRequestProto) Reset() { + *x = ListEncryptionZonesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEncryptionZonesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEncryptionZonesRequestProto) ProtoMessage() {} + +func (x *ListEncryptionZonesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} -func (m *ListEncryptionZonesRequestProto) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id +// Deprecated: Use ListEncryptionZonesRequestProto.ProtoReflect.Descriptor instead. +func (*ListEncryptionZonesRequestProto) Descriptor() ([]byte, []int) { + return file_encryption_proto_rawDescGZIP(), []int{2} +} + +func (x *ListEncryptionZonesRequestProto) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id } return 0 } type EncryptionZoneProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` Path *string `protobuf:"bytes,2,req,name=path" json:"path,omitempty"` Suite *CipherSuiteProto `protobuf:"varint,3,req,name=suite,enum=hadoop.hdfs.CipherSuiteProto" json:"suite,omitempty"` CryptoProtocolVersion *CryptoProtocolVersionProto `protobuf:"varint,4,req,name=cryptoProtocolVersion,enum=hadoop.hdfs.CryptoProtocolVersionProto" json:"cryptoProtocolVersion,omitempty"` KeyName *string `protobuf:"bytes,5,req,name=keyName" json:"keyName,omitempty"` - XXX_unrecognized []byte `json:"-"` } -func (m *EncryptionZoneProto) Reset() { *m = EncryptionZoneProto{} } -func (m *EncryptionZoneProto) String() string { return proto.CompactTextString(m) } -func (*EncryptionZoneProto) ProtoMessage() {} -func (*EncryptionZoneProto) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} } +func (x *EncryptionZoneProto) Reset() { + *x = EncryptionZoneProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncryptionZoneProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncryptionZoneProto) ProtoMessage() {} -func (m *EncryptionZoneProto) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id +func (x *EncryptionZoneProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EncryptionZoneProto.ProtoReflect.Descriptor instead. +func (*EncryptionZoneProto) Descriptor() ([]byte, []int) { + return file_encryption_proto_rawDescGZIP(), []int{3} +} + +func (x *EncryptionZoneProto) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id } return 0 } -func (m *EncryptionZoneProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *EncryptionZoneProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } return "" } -func (m *EncryptionZoneProto) GetSuite() CipherSuiteProto { - if m != nil && m.Suite != nil { - return *m.Suite +func (x *EncryptionZoneProto) GetSuite() CipherSuiteProto { + if x != nil && x.Suite != nil { + return *x.Suite } return CipherSuiteProto_UNKNOWN } -func (m *EncryptionZoneProto) GetCryptoProtocolVersion() CryptoProtocolVersionProto { - if m != nil && m.CryptoProtocolVersion != nil { - return *m.CryptoProtocolVersion +func (x *EncryptionZoneProto) GetCryptoProtocolVersion() CryptoProtocolVersionProto { + if x != nil && x.CryptoProtocolVersion != nil { + return *x.CryptoProtocolVersion } return CryptoProtocolVersionProto_UNKNOWN_PROTOCOL_VERSION } -func (m *EncryptionZoneProto) GetKeyName() string { - if m != nil && m.KeyName != nil { - return *m.KeyName +func (x *EncryptionZoneProto) GetKeyName() string { + if x != nil && x.KeyName != nil { + return *x.KeyName } return "" } type ListEncryptionZonesResponseProto struct { - Zones []*EncryptionZoneProto `protobuf:"bytes,1,rep,name=zones" json:"zones,omitempty"` - HasMore *bool `protobuf:"varint,2,req,name=hasMore" json:"hasMore,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Zones []*EncryptionZoneProto `protobuf:"bytes,1,rep,name=zones" json:"zones,omitempty"` + HasMore *bool `protobuf:"varint,2,req,name=hasMore" json:"hasMore,omitempty"` +} + +func (x *ListEncryptionZonesResponseProto) Reset() { + *x = ListEncryptionZonesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEncryptionZonesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEncryptionZonesResponseProto) ProtoMessage() {} + +func (x *ListEncryptionZonesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ListEncryptionZonesResponseProto) Reset() { *m = ListEncryptionZonesResponseProto{} } -func (m *ListEncryptionZonesResponseProto) String() string { return proto.CompactTextString(m) } -func (*ListEncryptionZonesResponseProto) ProtoMessage() {} +// Deprecated: Use ListEncryptionZonesResponseProto.ProtoReflect.Descriptor instead. func (*ListEncryptionZonesResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor2, []int{4} + return file_encryption_proto_rawDescGZIP(), []int{4} } -func (m *ListEncryptionZonesResponseProto) GetZones() []*EncryptionZoneProto { - if m != nil { - return m.Zones +func (x *ListEncryptionZonesResponseProto) GetZones() []*EncryptionZoneProto { + if x != nil { + return x.Zones } return nil } -func (m *ListEncryptionZonesResponseProto) GetHasMore() bool { - if m != nil && m.HasMore != nil { - return *m.HasMore +func (x *ListEncryptionZonesResponseProto) GetHasMore() bool { + if x != nil && x.HasMore != nil { + return *x.HasMore + } + return false +} + +type ReencryptEncryptionZoneRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Action *ReencryptActionProto `protobuf:"varint,1,req,name=action,enum=hadoop.hdfs.ReencryptActionProto" json:"action,omitempty"` + Zone *string `protobuf:"bytes,2,req,name=zone" json:"zone,omitempty"` +} + +func (x *ReencryptEncryptionZoneRequestProto) Reset() { + *x = ReencryptEncryptionZoneRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReencryptEncryptionZoneRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReencryptEncryptionZoneRequestProto) ProtoMessage() {} + +func (x *ReencryptEncryptionZoneRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReencryptEncryptionZoneRequestProto.ProtoReflect.Descriptor instead. +func (*ReencryptEncryptionZoneRequestProto) Descriptor() ([]byte, []int) { + return file_encryption_proto_rawDescGZIP(), []int{5} +} + +func (x *ReencryptEncryptionZoneRequestProto) GetAction() ReencryptActionProto { + if x != nil && x.Action != nil { + return *x.Action + } + return ReencryptActionProto_CANCEL_REENCRYPT +} + +func (x *ReencryptEncryptionZoneRequestProto) GetZone() string { + if x != nil && x.Zone != nil { + return *x.Zone + } + return "" +} + +type ReencryptEncryptionZoneResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReencryptEncryptionZoneResponseProto) Reset() { + *x = ReencryptEncryptionZoneResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReencryptEncryptionZoneResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReencryptEncryptionZoneResponseProto) ProtoMessage() {} + +func (x *ReencryptEncryptionZoneResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReencryptEncryptionZoneResponseProto.ProtoReflect.Descriptor instead. +func (*ReencryptEncryptionZoneResponseProto) Descriptor() ([]byte, []int) { + return file_encryption_proto_rawDescGZIP(), []int{6} +} + +type ListReencryptionStatusRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` +} + +func (x *ListReencryptionStatusRequestProto) Reset() { + *x = ListReencryptionStatusRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListReencryptionStatusRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListReencryptionStatusRequestProto) ProtoMessage() {} + +func (x *ListReencryptionStatusRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListReencryptionStatusRequestProto.ProtoReflect.Descriptor instead. +func (*ListReencryptionStatusRequestProto) Descriptor() ([]byte, []int) { + return file_encryption_proto_rawDescGZIP(), []int{7} +} + +func (x *ListReencryptionStatusRequestProto) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id + } + return 0 +} + +type ZoneReencryptionStatusProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` + Path *string `protobuf:"bytes,2,req,name=path" json:"path,omitempty"` + State *ReencryptionStateProto `protobuf:"varint,3,req,name=state,enum=hadoop.hdfs.ReencryptionStateProto" json:"state,omitempty"` + EzKeyVersionName *string `protobuf:"bytes,4,req,name=ezKeyVersionName" json:"ezKeyVersionName,omitempty"` + SubmissionTime *int64 `protobuf:"varint,5,req,name=submissionTime" json:"submissionTime,omitempty"` + Canceled *bool `protobuf:"varint,6,req,name=canceled" json:"canceled,omitempty"` + NumReencrypted *int64 `protobuf:"varint,7,req,name=numReencrypted" json:"numReencrypted,omitempty"` + NumFailures *int64 `protobuf:"varint,8,req,name=numFailures" json:"numFailures,omitempty"` + CompletionTime *int64 `protobuf:"varint,9,opt,name=completionTime" json:"completionTime,omitempty"` + LastFile *string `protobuf:"bytes,10,opt,name=lastFile" json:"lastFile,omitempty"` +} + +func (x *ZoneReencryptionStatusProto) Reset() { + *x = ZoneReencryptionStatusProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ZoneReencryptionStatusProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ZoneReencryptionStatusProto) ProtoMessage() {} + +func (x *ZoneReencryptionStatusProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ZoneReencryptionStatusProto.ProtoReflect.Descriptor instead. +func (*ZoneReencryptionStatusProto) Descriptor() ([]byte, []int) { + return file_encryption_proto_rawDescGZIP(), []int{8} +} + +func (x *ZoneReencryptionStatusProto) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id + } + return 0 +} + +func (x *ZoneReencryptionStatusProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path + } + return "" +} + +func (x *ZoneReencryptionStatusProto) GetState() ReencryptionStateProto { + if x != nil && x.State != nil { + return *x.State + } + return ReencryptionStateProto_SUBMITTED +} + +func (x *ZoneReencryptionStatusProto) GetEzKeyVersionName() string { + if x != nil && x.EzKeyVersionName != nil { + return *x.EzKeyVersionName + } + return "" +} + +func (x *ZoneReencryptionStatusProto) GetSubmissionTime() int64 { + if x != nil && x.SubmissionTime != nil { + return *x.SubmissionTime + } + return 0 +} + +func (x *ZoneReencryptionStatusProto) GetCanceled() bool { + if x != nil && x.Canceled != nil { + return *x.Canceled + } + return false +} + +func (x *ZoneReencryptionStatusProto) GetNumReencrypted() int64 { + if x != nil && x.NumReencrypted != nil { + return *x.NumReencrypted + } + return 0 +} + +func (x *ZoneReencryptionStatusProto) GetNumFailures() int64 { + if x != nil && x.NumFailures != nil { + return *x.NumFailures + } + return 0 +} + +func (x *ZoneReencryptionStatusProto) GetCompletionTime() int64 { + if x != nil && x.CompletionTime != nil { + return *x.CompletionTime + } + return 0 +} + +func (x *ZoneReencryptionStatusProto) GetLastFile() string { + if x != nil && x.LastFile != nil { + return *x.LastFile + } + return "" +} + +type ListReencryptionStatusResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Statuses []*ZoneReencryptionStatusProto `protobuf:"bytes,1,rep,name=statuses" json:"statuses,omitempty"` + HasMore *bool `protobuf:"varint,2,req,name=hasMore" json:"hasMore,omitempty"` +} + +func (x *ListReencryptionStatusResponseProto) Reset() { + *x = ListReencryptionStatusResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListReencryptionStatusResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListReencryptionStatusResponseProto) ProtoMessage() {} + +func (x *ListReencryptionStatusResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListReencryptionStatusResponseProto.ProtoReflect.Descriptor instead. +func (*ListReencryptionStatusResponseProto) Descriptor() ([]byte, []int) { + return file_encryption_proto_rawDescGZIP(), []int{9} +} + +func (x *ListReencryptionStatusResponseProto) GetStatuses() []*ZoneReencryptionStatusProto { + if x != nil { + return x.Statuses + } + return nil +} + +func (x *ListReencryptionStatusResponseProto) GetHasMore() bool { + if x != nil && x.HasMore != nil { + return *x.HasMore } return false } type GetEZForPathRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` } -func (m *GetEZForPathRequestProto) Reset() { *m = GetEZForPathRequestProto{} } -func (m *GetEZForPathRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetEZForPathRequestProto) ProtoMessage() {} -func (*GetEZForPathRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} } +func (x *GetEZForPathRequestProto) Reset() { + *x = GetEZForPathRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEZForPathRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEZForPathRequestProto) ProtoMessage() {} + +func (x *GetEZForPathRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEZForPathRequestProto.ProtoReflect.Descriptor instead. +func (*GetEZForPathRequestProto) Descriptor() ([]byte, []int) { + return file_encryption_proto_rawDescGZIP(), []int{10} +} -func (m *GetEZForPathRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *GetEZForPathRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } type GetEZForPathResponseProto struct { - Zone *EncryptionZoneProto `protobuf:"bytes,1,opt,name=zone" json:"zone,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Zone *EncryptionZoneProto `protobuf:"bytes,1,opt,name=zone" json:"zone,omitempty"` +} + +func (x *GetEZForPathResponseProto) Reset() { + *x = GetEZForPathResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_encryption_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEZForPathResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetEZForPathResponseProto) Reset() { *m = GetEZForPathResponseProto{} } -func (m *GetEZForPathResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetEZForPathResponseProto) ProtoMessage() {} -func (*GetEZForPathResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{6} } +func (*GetEZForPathResponseProto) ProtoMessage() {} -func (m *GetEZForPathResponseProto) GetZone() *EncryptionZoneProto { - if m != nil { - return m.Zone +func (x *GetEZForPathResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_encryption_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEZForPathResponseProto.ProtoReflect.Descriptor instead. +func (*GetEZForPathResponseProto) Descriptor() ([]byte, []int) { + return file_encryption_proto_rawDescGZIP(), []int{11} +} + +func (x *GetEZForPathResponseProto) GetZone() *EncryptionZoneProto { + if x != nil { + return x.Zone } return nil } -func init() { - proto.RegisterType((*CreateEncryptionZoneRequestProto)(nil), "hadoop.hdfs.CreateEncryptionZoneRequestProto") - proto.RegisterType((*CreateEncryptionZoneResponseProto)(nil), "hadoop.hdfs.CreateEncryptionZoneResponseProto") - proto.RegisterType((*ListEncryptionZonesRequestProto)(nil), "hadoop.hdfs.ListEncryptionZonesRequestProto") - proto.RegisterType((*EncryptionZoneProto)(nil), "hadoop.hdfs.EncryptionZoneProto") - proto.RegisterType((*ListEncryptionZonesResponseProto)(nil), "hadoop.hdfs.ListEncryptionZonesResponseProto") - proto.RegisterType((*GetEZForPathRequestProto)(nil), "hadoop.hdfs.GetEZForPathRequestProto") - proto.RegisterType((*GetEZForPathResponseProto)(nil), "hadoop.hdfs.GetEZForPathResponseProto") -} - -func init() { proto.RegisterFile("encryption.proto", fileDescriptor2) } - -var fileDescriptor2 = []byte{ - // 361 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0xeb, 0x40, - 0x14, 0x85, 0x99, 0xa4, 0xe5, 0xbd, 0xde, 0x42, 0x29, 0x79, 0x14, 0xe6, 0x3d, 0x78, 0x38, 0x46, - 0xc4, 0x2c, 0x24, 0x60, 0x15, 0xf7, 0xb6, 0x54, 0x37, 0x5a, 0x6a, 0x04, 0x17, 0x05, 0x17, 0x43, - 0x72, 0x35, 0x41, 0xcd, 0x8c, 0x33, 0xd3, 0x45, 0xfd, 0x35, 0xfe, 0x3b, 0xff, 0x86, 0x64, 0x62, - 0x4b, 0x46, 0x82, 0xb8, 0x09, 0x77, 0x66, 0xce, 0x3d, 0xe7, 0xf0, 0x05, 0x86, 0x58, 0xa6, 0x6a, - 0x2d, 0x4d, 0x21, 0xca, 0x58, 0x2a, 0x61, 0x44, 0xd0, 0xcf, 0x79, 0x26, 0x84, 0x8c, 0xf3, 0xec, - 0x5e, 0xff, 0x83, 0xea, 0x5b, 0x3f, 0x84, 0x73, 0x60, 0x53, 0x85, 0xdc, 0xe0, 0x6c, 0xbb, 0xb2, - 0x14, 0x25, 0x26, 0xf8, 0xb2, 0x42, 0x6d, 0x16, 0x76, 0x79, 0x08, 0xbe, 0x56, 0x29, 0x25, 0xcc, - 0x8b, 0x7a, 0x49, 0x35, 0x06, 0x14, 0x7e, 0x3d, 0xe2, 0x7a, 0xce, 0x9f, 0x91, 0x7a, 0x8c, 0x44, - 0xbd, 0x64, 0x73, 0x0c, 0xf7, 0x60, 0xb7, 0xdd, 0x4f, 0x4b, 0x51, 0x6a, 0xb4, 0x86, 0xe1, 0x11, - 0xec, 0x5c, 0x16, 0xda, 0xb8, 0x12, 0xed, 0x64, 0x0e, 0xc0, 0x2b, 0x32, 0x1b, 0xe9, 0x27, 0x5e, - 0x91, 0x85, 0xef, 0x04, 0xfe, 0xb8, 0xfa, 0x56, 0x5d, 0x10, 0x40, 0x47, 0x72, 0x93, 0x53, 0xcf, - 0x96, 0xb5, 0x73, 0x70, 0x0c, 0x5d, 0xbd, 0x2a, 0x0c, 0x52, 0x9f, 0x79, 0xd1, 0x60, 0xfc, 0x3f, - 0x6e, 0xc0, 0x88, 0xa7, 0x85, 0xcc, 0x51, 0xdd, 0x54, 0xef, 0xd6, 0x31, 0xa9, 0xb5, 0xc1, 0x1d, - 0x8c, 0x6c, 0x9a, 0xb0, 0xb7, 0xa9, 0x78, 0xba, 0x45, 0xa5, 0x0b, 0x51, 0xd2, 0x8e, 0x35, 0x39, - 0x70, 0x4d, 0xda, 0x94, 0xb5, 0x5d, 0xbb, 0x4b, 0x93, 0x60, 0xd7, 0x56, 0xdd, 0x12, 0x34, 0xc0, - 0x5a, 0xe1, 0x34, 0x00, 0x06, 0xa7, 0xd0, 0x7d, 0xad, 0x6e, 0x29, 0x61, 0x7e, 0xd4, 0x1f, 0x33, - 0xa7, 0x4c, 0x0b, 0xa6, 0xa4, 0x96, 0x57, 0xa9, 0x39, 0xd7, 0x57, 0x42, 0xa1, 0x05, 0xf4, 0x3b, - 0xd9, 0x1c, 0xc3, 0x43, 0xa0, 0x17, 0x68, 0x66, 0xcb, 0x73, 0xa1, 0x16, 0xdc, 0xe4, 0xdf, 0xff, - 0xff, 0xf0, 0x1a, 0xfe, 0xba, 0xea, 0x66, 0xb9, 0x13, 0xe8, 0x54, 0x69, 0x94, 0x30, 0xf2, 0xa3, - 0x6e, 0x56, 0x3d, 0x39, 0x83, 0x7d, 0xa1, 0x1e, 0x62, 0x2e, 0x79, 0x9a, 0xa3, 0xb3, 0x23, 0x3f, - 0xd1, 0xd5, 0xc3, 0x64, 0xf4, 0x85, 0x8c, 0x35, 0xd1, 0x6f, 0x84, 0x7c, 0x04, 0x00, 0x00, 0xff, - 0xff, 0x8a, 0xb2, 0xc6, 0x30, 0xf7, 0x02, 0x00, 0x00, +var File_encryption_proto protoreflect.FileDescriptor + +var file_encryption_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0b, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x1a, + 0x0a, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x20, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, + 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, + 0x63, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x23, 0x0a, 0x21, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, + 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x31, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x5a, 0x6f, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, + 0x02, 0x69, 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x13, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x5a, 0x6f, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, + 0x33, 0x0a, 0x05, 0x73, 0x75, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x1d, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x69, 0x70, + 0x68, 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x73, + 0x75, 0x69, 0x74, 0x65, 0x12, 0x5d, 0x0a, 0x15, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x02, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x15, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x74, 0x0a, + 0x20, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, + 0x6f, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x36, 0x0a, 0x05, 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x6f, 0x6e, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x05, 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x61, 0x73, + 0x4d, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, + 0x6f, 0x72, 0x65, 0x22, 0x74, 0x0a, 0x23, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x39, 0x0a, 0x06, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, + 0x02, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x22, 0x26, 0x0a, 0x24, 0x52, 0x65, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x34, 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0xfa, 0x02, 0x0a, 0x1b, 0x5a, 0x6f, 0x6e, 0x65, + 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x39, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x65, 0x7a, 0x4b, 0x65, 0x79, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x10, 0x65, 0x7a, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x02, 0x28, 0x08, 0x52, 0x08, 0x63, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0e, + 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x12, 0x20, + 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x02, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, + 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, + 0x46, 0x69, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, + 0x46, 0x69, 0x6c, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x23, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x44, 0x0a, 0x08, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x5a, 0x6f, 0x6e, + 0x65, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, + 0x02, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x22, 0x2c, 0x0a, 0x18, + 0x47, 0x65, 0x74, 0x45, 0x5a, 0x46, 0x6f, 0x72, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x51, 0x0a, 0x19, 0x47, 0x65, + 0x74, 0x45, 0x5a, 0x46, 0x6f, 0x72, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x34, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x6f, + 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x2a, 0x41, 0x0a, + 0x14, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, + 0x52, 0x45, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, + 0x54, 0x41, 0x52, 0x54, 0x5f, 0x52, 0x45, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x10, 0x02, + 0x2a, 0x46, 0x0a, 0x16, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, + 0x42, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x4f, + 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4d, + 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x42, 0x7d, 0x0a, 0x25, 0x6f, 0x72, 0x67, 0x2e, + 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x42, 0x15, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x6f, 0x6e, + 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, + 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, + 0x68, 0x64, 0x66, 0x73, 0xa0, 0x01, 0x01, +} + +var ( + file_encryption_proto_rawDescOnce sync.Once + file_encryption_proto_rawDescData = file_encryption_proto_rawDesc +) + +func file_encryption_proto_rawDescGZIP() []byte { + file_encryption_proto_rawDescOnce.Do(func() { + file_encryption_proto_rawDescData = protoimpl.X.CompressGZIP(file_encryption_proto_rawDescData) + }) + return file_encryption_proto_rawDescData +} + +var file_encryption_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_encryption_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_encryption_proto_goTypes = []interface{}{ + (ReencryptActionProto)(0), // 0: hadoop.hdfs.ReencryptActionProto + (ReencryptionStateProto)(0), // 1: hadoop.hdfs.ReencryptionStateProto + (*CreateEncryptionZoneRequestProto)(nil), // 2: hadoop.hdfs.CreateEncryptionZoneRequestProto + (*CreateEncryptionZoneResponseProto)(nil), // 3: hadoop.hdfs.CreateEncryptionZoneResponseProto + (*ListEncryptionZonesRequestProto)(nil), // 4: hadoop.hdfs.ListEncryptionZonesRequestProto + (*EncryptionZoneProto)(nil), // 5: hadoop.hdfs.EncryptionZoneProto + (*ListEncryptionZonesResponseProto)(nil), // 6: hadoop.hdfs.ListEncryptionZonesResponseProto + (*ReencryptEncryptionZoneRequestProto)(nil), // 7: hadoop.hdfs.ReencryptEncryptionZoneRequestProto + (*ReencryptEncryptionZoneResponseProto)(nil), // 8: hadoop.hdfs.ReencryptEncryptionZoneResponseProto + (*ListReencryptionStatusRequestProto)(nil), // 9: hadoop.hdfs.ListReencryptionStatusRequestProto + (*ZoneReencryptionStatusProto)(nil), // 10: hadoop.hdfs.ZoneReencryptionStatusProto + (*ListReencryptionStatusResponseProto)(nil), // 11: hadoop.hdfs.ListReencryptionStatusResponseProto + (*GetEZForPathRequestProto)(nil), // 12: hadoop.hdfs.GetEZForPathRequestProto + (*GetEZForPathResponseProto)(nil), // 13: hadoop.hdfs.GetEZForPathResponseProto + (CipherSuiteProto)(0), // 14: hadoop.hdfs.CipherSuiteProto + (CryptoProtocolVersionProto)(0), // 15: hadoop.hdfs.CryptoProtocolVersionProto +} +var file_encryption_proto_depIdxs = []int32{ + 14, // 0: hadoop.hdfs.EncryptionZoneProto.suite:type_name -> hadoop.hdfs.CipherSuiteProto + 15, // 1: hadoop.hdfs.EncryptionZoneProto.cryptoProtocolVersion:type_name -> hadoop.hdfs.CryptoProtocolVersionProto + 5, // 2: hadoop.hdfs.ListEncryptionZonesResponseProto.zones:type_name -> hadoop.hdfs.EncryptionZoneProto + 0, // 3: hadoop.hdfs.ReencryptEncryptionZoneRequestProto.action:type_name -> hadoop.hdfs.ReencryptActionProto + 1, // 4: hadoop.hdfs.ZoneReencryptionStatusProto.state:type_name -> hadoop.hdfs.ReencryptionStateProto + 10, // 5: hadoop.hdfs.ListReencryptionStatusResponseProto.statuses:type_name -> hadoop.hdfs.ZoneReencryptionStatusProto + 5, // 6: hadoop.hdfs.GetEZForPathResponseProto.zone:type_name -> hadoop.hdfs.EncryptionZoneProto + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_encryption_proto_init() } +func file_encryption_proto_init() { + if File_encryption_proto != nil { + return + } + file_hdfs_proto_init() + if !protoimpl.UnsafeEnabled { + file_encryption_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateEncryptionZoneRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_encryption_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateEncryptionZoneResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_encryption_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEncryptionZonesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_encryption_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EncryptionZoneProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_encryption_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEncryptionZonesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_encryption_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReencryptEncryptionZoneRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_encryption_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReencryptEncryptionZoneResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_encryption_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReencryptionStatusRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_encryption_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ZoneReencryptionStatusProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_encryption_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReencryptionStatusResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_encryption_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEZForPathRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_encryption_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEZForPathResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_encryption_proto_rawDesc, + NumEnums: 2, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_encryption_proto_goTypes, + DependencyIndexes: file_encryption_proto_depIdxs, + EnumInfos: file_encryption_proto_enumTypes, + MessageInfos: file_encryption_proto_msgTypes, + }.Build() + File_encryption_proto = out.File + file_encryption_proto_rawDesc = nil + file_encryption_proto_goTypes = nil + file_encryption_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_hdfs/encryption.proto b/internal/protocol/hadoop_hdfs/encryption.proto index 68b2f3af..b4a689e8 100644 --- a/internal/protocol/hadoop_hdfs/encryption.proto +++ b/internal/protocol/hadoop_hdfs/encryption.proto @@ -21,7 +21,7 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax="proto2"; // This file contains protocol buffers that are used throughout HDFS -- i.e. // by the client, server, and data transfer protocols. @@ -29,6 +29,7 @@ option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "EncryptionZonesProtos"; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; package hadoop.hdfs; import "hdfs.proto"; @@ -58,6 +59,47 @@ message ListEncryptionZonesResponseProto { required bool hasMore = 2; } +enum ReencryptActionProto { + CANCEL_REENCRYPT = 1; + START_REENCRYPT = 2; +} + +message ReencryptEncryptionZoneRequestProto { + required ReencryptActionProto action = 1; + required string zone = 2; +} + +message ReencryptEncryptionZoneResponseProto { +} + +message ListReencryptionStatusRequestProto { + required int64 id = 1; +} + +enum ReencryptionStateProto { + SUBMITTED = 1; + PROCESSING = 2; + COMPLETED = 3; +} + +message ZoneReencryptionStatusProto { + required int64 id = 1; + required string path = 2; + required ReencryptionStateProto state = 3; + required string ezKeyVersionName = 4; + required int64 submissionTime = 5; + required bool canceled = 6; + required int64 numReencrypted = 7; + required int64 numFailures = 8; + optional int64 completionTime = 9; + optional string lastFile = 10; +} + +message ListReencryptionStatusResponseProto { + repeated ZoneReencryptionStatusProto statuses = 1; + required bool hasMore = 2; +} + message GetEZForPathRequestProto { required string src = 1; } diff --git a/internal/protocol/hadoop_hdfs/erasurecoding.pb.go b/internal/protocol/hadoop_hdfs/erasurecoding.pb.go index 3d91d8bf..a339bcbd 100644 --- a/internal/protocol/hadoop_hdfs/erasurecoding.pb.go +++ b/internal/protocol/hadoop_hdfs/erasurecoding.pb.go @@ -1,126 +1,934 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: erasurecoding.proto package hadoop_hdfs -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type SetErasureCodingPolicyRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - EcPolicy *ErasureCodingPolicyProto `protobuf:"bytes,2,opt,name=ecPolicy" json:"ecPolicy,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + EcPolicyName *string `protobuf:"bytes,2,opt,name=ecPolicyName" json:"ecPolicyName,omitempty"` +} + +func (x *SetErasureCodingPolicyRequestProto) Reset() { + *x = SetErasureCodingPolicyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetErasureCodingPolicyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetErasureCodingPolicyRequestProto) ProtoMessage() {} + +func (x *SetErasureCodingPolicyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *SetErasureCodingPolicyRequestProto) Reset() { *m = SetErasureCodingPolicyRequestProto{} } -func (m *SetErasureCodingPolicyRequestProto) String() string { return proto.CompactTextString(m) } -func (*SetErasureCodingPolicyRequestProto) ProtoMessage() {} +// Deprecated: Use SetErasureCodingPolicyRequestProto.ProtoReflect.Descriptor instead. func (*SetErasureCodingPolicyRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor3, []int{0} + return file_erasurecoding_proto_rawDescGZIP(), []int{0} } -func (m *SetErasureCodingPolicyRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *SetErasureCodingPolicyRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *SetErasureCodingPolicyRequestProto) GetEcPolicy() *ErasureCodingPolicyProto { - if m != nil { - return m.EcPolicy +func (x *SetErasureCodingPolicyRequestProto) GetEcPolicyName() string { + if x != nil && x.EcPolicyName != nil { + return *x.EcPolicyName } - return nil + return "" } type SetErasureCodingPolicyResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetErasureCodingPolicyResponseProto) Reset() { + *x = SetErasureCodingPolicyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetErasureCodingPolicyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetErasureCodingPolicyResponseProto) ProtoMessage() {} + +func (x *SetErasureCodingPolicyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *SetErasureCodingPolicyResponseProto) Reset() { *m = SetErasureCodingPolicyResponseProto{} } -func (m *SetErasureCodingPolicyResponseProto) String() string { return proto.CompactTextString(m) } -func (*SetErasureCodingPolicyResponseProto) ProtoMessage() {} +// Deprecated: Use SetErasureCodingPolicyResponseProto.ProtoReflect.Descriptor instead. func (*SetErasureCodingPolicyResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor3, []int{1} + return file_erasurecoding_proto_rawDescGZIP(), []int{1} } type GetErasureCodingPoliciesRequestProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetErasureCodingPoliciesRequestProto) Reset() { + *x = GetErasureCodingPoliciesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetErasureCodingPoliciesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetErasureCodingPoliciesRequestProto) Reset() { *m = GetErasureCodingPoliciesRequestProto{} } -func (m *GetErasureCodingPoliciesRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetErasureCodingPoliciesRequestProto) ProtoMessage() {} +func (*GetErasureCodingPoliciesRequestProto) ProtoMessage() {} + +func (x *GetErasureCodingPoliciesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetErasureCodingPoliciesRequestProto.ProtoReflect.Descriptor instead. func (*GetErasureCodingPoliciesRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor3, []int{2} + return file_erasurecoding_proto_rawDescGZIP(), []int{2} } type GetErasureCodingPoliciesResponseProto struct { - EcPolicies []*ErasureCodingPolicyProto `protobuf:"bytes,1,rep,name=ecPolicies" json:"ecPolicies,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EcPolicies []*ErasureCodingPolicyProto `protobuf:"bytes,1,rep,name=ecPolicies" json:"ecPolicies,omitempty"` } -func (m *GetErasureCodingPoliciesResponseProto) Reset() { *m = GetErasureCodingPoliciesResponseProto{} } -func (m *GetErasureCodingPoliciesResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetErasureCodingPoliciesResponseProto) ProtoMessage() {} +func (x *GetErasureCodingPoliciesResponseProto) Reset() { + *x = GetErasureCodingPoliciesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetErasureCodingPoliciesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetErasureCodingPoliciesResponseProto) ProtoMessage() {} + +func (x *GetErasureCodingPoliciesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetErasureCodingPoliciesResponseProto.ProtoReflect.Descriptor instead. func (*GetErasureCodingPoliciesResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor3, []int{3} + return file_erasurecoding_proto_rawDescGZIP(), []int{3} } -func (m *GetErasureCodingPoliciesResponseProto) GetEcPolicies() []*ErasureCodingPolicyProto { - if m != nil { - return m.EcPolicies +func (x *GetErasureCodingPoliciesResponseProto) GetEcPolicies() []*ErasureCodingPolicyProto { + if x != nil { + return x.EcPolicies + } + return nil +} + +type GetErasureCodingCodecsRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetErasureCodingCodecsRequestProto) Reset() { + *x = GetErasureCodingCodecsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetErasureCodingCodecsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetErasureCodingCodecsRequestProto) ProtoMessage() {} + +func (x *GetErasureCodingCodecsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetErasureCodingCodecsRequestProto.ProtoReflect.Descriptor instead. +func (*GetErasureCodingCodecsRequestProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{4} +} + +type GetErasureCodingCodecsResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Codec []*CodecProto `protobuf:"bytes,1,rep,name=codec" json:"codec,omitempty"` +} + +func (x *GetErasureCodingCodecsResponseProto) Reset() { + *x = GetErasureCodingCodecsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetErasureCodingCodecsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetErasureCodingCodecsResponseProto) ProtoMessage() {} + +func (x *GetErasureCodingCodecsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetErasureCodingCodecsResponseProto.ProtoReflect.Descriptor instead. +func (*GetErasureCodingCodecsResponseProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{5} +} + +func (x *GetErasureCodingCodecsResponseProto) GetCodec() []*CodecProto { + if x != nil { + return x.Codec } return nil } type GetErasureCodingPolicyRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` // path to get the policy info } -func (m *GetErasureCodingPolicyRequestProto) Reset() { *m = GetErasureCodingPolicyRequestProto{} } -func (m *GetErasureCodingPolicyRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetErasureCodingPolicyRequestProto) ProtoMessage() {} +func (x *GetErasureCodingPolicyRequestProto) Reset() { + *x = GetErasureCodingPolicyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetErasureCodingPolicyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetErasureCodingPolicyRequestProto) ProtoMessage() {} + +func (x *GetErasureCodingPolicyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetErasureCodingPolicyRequestProto.ProtoReflect.Descriptor instead. func (*GetErasureCodingPolicyRequestProto) Descriptor() ([]byte, []int) { - return fileDescriptor3, []int{4} + return file_erasurecoding_proto_rawDescGZIP(), []int{6} } -func (m *GetErasureCodingPolicyRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *GetErasureCodingPolicyRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } type GetErasureCodingPolicyResponseProto struct { - EcPolicy *ErasureCodingPolicyProto `protobuf:"bytes,1,opt,name=ecPolicy" json:"ecPolicy,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EcPolicy *ErasureCodingPolicyProto `protobuf:"bytes,1,opt,name=ecPolicy" json:"ecPolicy,omitempty"` } -func (m *GetErasureCodingPolicyResponseProto) Reset() { *m = GetErasureCodingPolicyResponseProto{} } -func (m *GetErasureCodingPolicyResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetErasureCodingPolicyResponseProto) ProtoMessage() {} +func (x *GetErasureCodingPolicyResponseProto) Reset() { + *x = GetErasureCodingPolicyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetErasureCodingPolicyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetErasureCodingPolicyResponseProto) ProtoMessage() {} + +func (x *GetErasureCodingPolicyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetErasureCodingPolicyResponseProto.ProtoReflect.Descriptor instead. func (*GetErasureCodingPolicyResponseProto) Descriptor() ([]byte, []int) { - return fileDescriptor3, []int{5} + return file_erasurecoding_proto_rawDescGZIP(), []int{7} +} + +func (x *GetErasureCodingPolicyResponseProto) GetEcPolicy() *ErasureCodingPolicyProto { + if x != nil { + return x.EcPolicy + } + return nil +} + +type AddErasureCodingPoliciesRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EcPolicies []*ErasureCodingPolicyProto `protobuf:"bytes,1,rep,name=ecPolicies" json:"ecPolicies,omitempty"` +} + +func (x *AddErasureCodingPoliciesRequestProto) Reset() { + *x = AddErasureCodingPoliciesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddErasureCodingPoliciesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddErasureCodingPoliciesRequestProto) ProtoMessage() {} + +func (x *AddErasureCodingPoliciesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddErasureCodingPoliciesRequestProto.ProtoReflect.Descriptor instead. +func (*AddErasureCodingPoliciesRequestProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{8} +} + +func (x *AddErasureCodingPoliciesRequestProto) GetEcPolicies() []*ErasureCodingPolicyProto { + if x != nil { + return x.EcPolicies + } + return nil +} + +type AddErasureCodingPoliciesResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*AddErasureCodingPolicyResponseProto `protobuf:"bytes,1,rep,name=responses" json:"responses,omitempty"` +} + +func (x *AddErasureCodingPoliciesResponseProto) Reset() { + *x = AddErasureCodingPoliciesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddErasureCodingPoliciesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddErasureCodingPoliciesResponseProto) ProtoMessage() {} + +func (x *AddErasureCodingPoliciesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddErasureCodingPoliciesResponseProto.ProtoReflect.Descriptor instead. +func (*AddErasureCodingPoliciesResponseProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{9} +} + +func (x *AddErasureCodingPoliciesResponseProto) GetResponses() []*AddErasureCodingPolicyResponseProto { + if x != nil { + return x.Responses + } + return nil +} + +type RemoveErasureCodingPolicyRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EcPolicyName *string `protobuf:"bytes,1,req,name=ecPolicyName" json:"ecPolicyName,omitempty"` +} + +func (x *RemoveErasureCodingPolicyRequestProto) Reset() { + *x = RemoveErasureCodingPolicyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveErasureCodingPolicyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveErasureCodingPolicyRequestProto) ProtoMessage() {} + +func (x *RemoveErasureCodingPolicyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveErasureCodingPolicyRequestProto.ProtoReflect.Descriptor instead. +func (*RemoveErasureCodingPolicyRequestProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{10} +} + +func (x *RemoveErasureCodingPolicyRequestProto) GetEcPolicyName() string { + if x != nil && x.EcPolicyName != nil { + return *x.EcPolicyName + } + return "" +} + +type RemoveErasureCodingPolicyResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveErasureCodingPolicyResponseProto) Reset() { + *x = RemoveErasureCodingPolicyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveErasureCodingPolicyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveErasureCodingPolicyResponseProto) ProtoMessage() {} + +func (x *RemoveErasureCodingPolicyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveErasureCodingPolicyResponseProto.ProtoReflect.Descriptor instead. +func (*RemoveErasureCodingPolicyResponseProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{11} +} + +type EnableErasureCodingPolicyRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EcPolicyName *string `protobuf:"bytes,1,req,name=ecPolicyName" json:"ecPolicyName,omitempty"` } -func (m *GetErasureCodingPolicyResponseProto) GetEcPolicy() *ErasureCodingPolicyProto { - if m != nil { - return m.EcPolicy +func (x *EnableErasureCodingPolicyRequestProto) Reset() { + *x = EnableErasureCodingPolicyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnableErasureCodingPolicyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnableErasureCodingPolicyRequestProto) ProtoMessage() {} + +func (x *EnableErasureCodingPolicyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnableErasureCodingPolicyRequestProto.ProtoReflect.Descriptor instead. +func (*EnableErasureCodingPolicyRequestProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{12} +} + +func (x *EnableErasureCodingPolicyRequestProto) GetEcPolicyName() string { + if x != nil && x.EcPolicyName != nil { + return *x.EcPolicyName + } + return "" +} + +type EnableErasureCodingPolicyResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EnableErasureCodingPolicyResponseProto) Reset() { + *x = EnableErasureCodingPolicyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnableErasureCodingPolicyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnableErasureCodingPolicyResponseProto) ProtoMessage() {} + +func (x *EnableErasureCodingPolicyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnableErasureCodingPolicyResponseProto.ProtoReflect.Descriptor instead. +func (*EnableErasureCodingPolicyResponseProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{13} +} + +type DisableErasureCodingPolicyRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EcPolicyName *string `protobuf:"bytes,1,req,name=ecPolicyName" json:"ecPolicyName,omitempty"` +} + +func (x *DisableErasureCodingPolicyRequestProto) Reset() { + *x = DisableErasureCodingPolicyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DisableErasureCodingPolicyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisableErasureCodingPolicyRequestProto) ProtoMessage() {} + +func (x *DisableErasureCodingPolicyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DisableErasureCodingPolicyRequestProto.ProtoReflect.Descriptor instead. +func (*DisableErasureCodingPolicyRequestProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{14} +} + +func (x *DisableErasureCodingPolicyRequestProto) GetEcPolicyName() string { + if x != nil && x.EcPolicyName != nil { + return *x.EcPolicyName + } + return "" +} + +type DisableErasureCodingPolicyResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DisableErasureCodingPolicyResponseProto) Reset() { + *x = DisableErasureCodingPolicyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DisableErasureCodingPolicyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisableErasureCodingPolicyResponseProto) ProtoMessage() {} + +func (x *DisableErasureCodingPolicyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DisableErasureCodingPolicyResponseProto.ProtoReflect.Descriptor instead. +func (*DisableErasureCodingPolicyResponseProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{15} +} + +type UnsetErasureCodingPolicyRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` +} + +func (x *UnsetErasureCodingPolicyRequestProto) Reset() { + *x = UnsetErasureCodingPolicyRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsetErasureCodingPolicyRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsetErasureCodingPolicyRequestProto) ProtoMessage() {} + +func (x *UnsetErasureCodingPolicyRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsetErasureCodingPolicyRequestProto.ProtoReflect.Descriptor instead. +func (*UnsetErasureCodingPolicyRequestProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{16} +} + +func (x *UnsetErasureCodingPolicyRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src + } + return "" +} + +type UnsetErasureCodingPolicyResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UnsetErasureCodingPolicyResponseProto) Reset() { + *x = UnsetErasureCodingPolicyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsetErasureCodingPolicyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsetErasureCodingPolicyResponseProto) ProtoMessage() {} + +func (x *UnsetErasureCodingPolicyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsetErasureCodingPolicyResponseProto.ProtoReflect.Descriptor instead. +func (*UnsetErasureCodingPolicyResponseProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{17} +} + +type GetECTopologyResultForPoliciesRequestProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Policies []string `protobuf:"bytes,1,rep,name=policies" json:"policies,omitempty"` +} + +func (x *GetECTopologyResultForPoliciesRequestProto) Reset() { + *x = GetECTopologyResultForPoliciesRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetECTopologyResultForPoliciesRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetECTopologyResultForPoliciesRequestProto) ProtoMessage() {} + +func (x *GetECTopologyResultForPoliciesRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetECTopologyResultForPoliciesRequestProto.ProtoReflect.Descriptor instead. +func (*GetECTopologyResultForPoliciesRequestProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{18} +} + +func (x *GetECTopologyResultForPoliciesRequestProto) GetPolicies() []string { + if x != nil { + return x.Policies } return nil } -// * +type GetECTopologyResultForPoliciesResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *ECTopologyVerifierResultProto `protobuf:"bytes,1,req,name=response" json:"response,omitempty"` +} + +func (x *GetECTopologyResultForPoliciesResponseProto) Reset() { + *x = GetECTopologyResultForPoliciesResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetECTopologyResultForPoliciesResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetECTopologyResultForPoliciesResponseProto) ProtoMessage() {} + +func (x *GetECTopologyResultForPoliciesResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetECTopologyResultForPoliciesResponseProto.ProtoReflect.Descriptor instead. +func (*GetECTopologyResultForPoliciesResponseProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{19} +} + +func (x *GetECTopologyResultForPoliciesResponseProto) GetResponse() *ECTopologyVerifierResultProto { + if x != nil { + return x.Response + } + return nil +} + +//* // Block erasure coding reconstruction info type BlockECReconstructionInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Block *ExtendedBlockProto `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` SourceDnInfos *DatanodeInfosProto `protobuf:"bytes,2,req,name=sourceDnInfos" json:"sourceDnInfos,omitempty"` TargetDnInfos *DatanodeInfosProto `protobuf:"bytes,3,req,name=targetDnInfos" json:"targetDnInfos,omitempty"` @@ -128,101 +936,640 @@ type BlockECReconstructionInfoProto struct { TargetStorageTypes *StorageTypesProto `protobuf:"bytes,5,req,name=targetStorageTypes" json:"targetStorageTypes,omitempty"` LiveBlockIndices []byte `protobuf:"bytes,6,req,name=liveBlockIndices" json:"liveBlockIndices,omitempty"` EcPolicy *ErasureCodingPolicyProto `protobuf:"bytes,7,req,name=ecPolicy" json:"ecPolicy,omitempty"` - XXX_unrecognized []byte `json:"-"` } -func (m *BlockECReconstructionInfoProto) Reset() { *m = BlockECReconstructionInfoProto{} } -func (m *BlockECReconstructionInfoProto) String() string { return proto.CompactTextString(m) } -func (*BlockECReconstructionInfoProto) ProtoMessage() {} -func (*BlockECReconstructionInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{6} } +func (x *BlockECReconstructionInfoProto) Reset() { + *x = BlockECReconstructionInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *BlockECReconstructionInfoProto) GetBlock() *ExtendedBlockProto { - if m != nil { - return m.Block +func (x *BlockECReconstructionInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockECReconstructionInfoProto) ProtoMessage() {} + +func (x *BlockECReconstructionInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockECReconstructionInfoProto.ProtoReflect.Descriptor instead. +func (*BlockECReconstructionInfoProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{20} +} + +func (x *BlockECReconstructionInfoProto) GetBlock() *ExtendedBlockProto { + if x != nil { + return x.Block } return nil } -func (m *BlockECReconstructionInfoProto) GetSourceDnInfos() *DatanodeInfosProto { - if m != nil { - return m.SourceDnInfos +func (x *BlockECReconstructionInfoProto) GetSourceDnInfos() *DatanodeInfosProto { + if x != nil { + return x.SourceDnInfos } return nil } -func (m *BlockECReconstructionInfoProto) GetTargetDnInfos() *DatanodeInfosProto { - if m != nil { - return m.TargetDnInfos +func (x *BlockECReconstructionInfoProto) GetTargetDnInfos() *DatanodeInfosProto { + if x != nil { + return x.TargetDnInfos } return nil } -func (m *BlockECReconstructionInfoProto) GetTargetStorageUuids() *StorageUuidsProto { - if m != nil { - return m.TargetStorageUuids +func (x *BlockECReconstructionInfoProto) GetTargetStorageUuids() *StorageUuidsProto { + if x != nil { + return x.TargetStorageUuids } return nil } -func (m *BlockECReconstructionInfoProto) GetTargetStorageTypes() *StorageTypesProto { - if m != nil { - return m.TargetStorageTypes +func (x *BlockECReconstructionInfoProto) GetTargetStorageTypes() *StorageTypesProto { + if x != nil { + return x.TargetStorageTypes } return nil } -func (m *BlockECReconstructionInfoProto) GetLiveBlockIndices() []byte { - if m != nil { - return m.LiveBlockIndices +func (x *BlockECReconstructionInfoProto) GetLiveBlockIndices() []byte { + if x != nil { + return x.LiveBlockIndices } return nil } -func (m *BlockECReconstructionInfoProto) GetEcPolicy() *ErasureCodingPolicyProto { - if m != nil { - return m.EcPolicy +func (x *BlockECReconstructionInfoProto) GetEcPolicy() *ErasureCodingPolicyProto { + if x != nil { + return x.EcPolicy } return nil } -func init() { - proto.RegisterType((*SetErasureCodingPolicyRequestProto)(nil), "hadoop.hdfs.SetErasureCodingPolicyRequestProto") - proto.RegisterType((*SetErasureCodingPolicyResponseProto)(nil), "hadoop.hdfs.SetErasureCodingPolicyResponseProto") - proto.RegisterType((*GetErasureCodingPoliciesRequestProto)(nil), "hadoop.hdfs.GetErasureCodingPoliciesRequestProto") - proto.RegisterType((*GetErasureCodingPoliciesResponseProto)(nil), "hadoop.hdfs.GetErasureCodingPoliciesResponseProto") - proto.RegisterType((*GetErasureCodingPolicyRequestProto)(nil), "hadoop.hdfs.GetErasureCodingPolicyRequestProto") - proto.RegisterType((*GetErasureCodingPolicyResponseProto)(nil), "hadoop.hdfs.GetErasureCodingPolicyResponseProto") - proto.RegisterType((*BlockECReconstructionInfoProto)(nil), "hadoop.hdfs.BlockECReconstructionInfoProto") -} - -func init() { proto.RegisterFile("erasurecoding.proto", fileDescriptor3) } - -var fileDescriptor3 = []byte{ - // 404 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6e, 0xd4, 0x30, - 0x10, 0x87, 0x95, 0x5d, 0xca, 0x9f, 0x59, 0x90, 0xaa, 0xf4, 0x12, 0x71, 0x28, 0x91, 0x4b, 0xd0, - 0x8a, 0x43, 0x0e, 0x95, 0xe0, 0x8a, 0xd8, 0x36, 0x5a, 0xf5, 0x82, 0xaa, 0x14, 0x1e, 0xc0, 0xd8, - 0xd3, 0xc4, 0x22, 0xf2, 0x04, 0xdb, 0x41, 0xec, 0xdb, 0xf0, 0x90, 0x3c, 0x00, 0x8a, 0x0d, 0x28, - 0x56, 0xb3, 0xa2, 0xec, 0x65, 0x65, 0x8d, 0x7f, 0xdf, 0x37, 0xb3, 0x63, 0x05, 0x4e, 0xd0, 0x70, - 0x3b, 0x18, 0x14, 0x24, 0x95, 0x6e, 0xca, 0xde, 0x90, 0xa3, 0x74, 0xd5, 0x72, 0x49, 0xd4, 0x97, - 0xad, 0xbc, 0xb5, 0xcf, 0x61, 0xfc, 0x0d, 0x17, 0x6c, 0x07, 0xec, 0x06, 0x5d, 0x15, 0x90, 0x0b, - 0x8f, 0x5c, 0x53, 0xa7, 0xc4, 0xae, 0xc6, 0xaf, 0x03, 0x5a, 0x77, 0xed, 0xf1, 0x63, 0x58, 0x5a, - 0x23, 0xb2, 0x24, 0x5f, 0xac, 0x9f, 0xd4, 0xe3, 0x31, 0x7d, 0x0f, 0x8f, 0x51, 0x84, 0x64, 0xb6, - 0xc8, 0x93, 0xf5, 0xea, 0xbc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x7c, 0x60, 0xce, 0xe7, 0x2f, 0xd2, - 0xd7, 0x70, 0xdc, 0xa9, 0x6f, 0xe8, 0xd7, 0x78, 0xa5, 0xa5, 0x12, 0x68, 0xb3, 0x87, 0xf9, 0x62, - 0xfd, 0xb4, 0xbe, 0x53, 0x8f, 0x9e, 0xfd, 0x91, 0xef, 0xf8, 0xbf, 0xcf, 0xbe, 0x79, 0x07, 0x05, - 0x99, 0xa6, 0xe4, 0x3d, 0x17, 0x2d, 0x46, 0xb0, 0xff, 0xe4, 0x05, 0x75, 0xe1, 0xb0, 0x39, 0x89, - 0x65, 0x63, 0xcd, 0xfe, 0x48, 0x92, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x01, 0xdd, 0x67, 0x30, - 0x42, 0x04, 0x00, 0x00, +//* +// Codec and it's corresponding coders +type CodecProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Codec *string `protobuf:"bytes,1,req,name=codec" json:"codec,omitempty"` + Coders *string `protobuf:"bytes,2,req,name=coders" json:"coders,omitempty"` +} + +func (x *CodecProto) Reset() { + *x = CodecProto{} + if protoimpl.UnsafeEnabled { + mi := &file_erasurecoding_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CodecProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CodecProto) ProtoMessage() {} + +func (x *CodecProto) ProtoReflect() protoreflect.Message { + mi := &file_erasurecoding_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CodecProto.ProtoReflect.Descriptor instead. +func (*CodecProto) Descriptor() ([]byte, []int) { + return file_erasurecoding_proto_rawDescGZIP(), []int{21} +} + +func (x *CodecProto) GetCodec() string { + if x != nil && x.Codec != nil { + return *x.Codec + } + return "" +} + +func (x *CodecProto) GetCoders() string { + if x != nil && x.Coders != nil { + return *x.Coders + } + return "" +} + +var File_erasurecoding_proto protoreflect.FileDescriptor + +var file_erasurecoding_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x65, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x1a, 0x0a, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, + 0x0a, 0x22, 0x53, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x63, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x25, 0x0a, 0x23, 0x53, 0x65, + 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x26, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6e, 0x0a, 0x25, 0x47, 0x65, 0x74, + 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x45, 0x0a, 0x0a, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x65, + 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x24, 0x0a, 0x22, 0x47, 0x65, 0x74, + 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x64, + 0x65, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x54, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, + 0x63, 0x6f, 0x64, 0x65, 0x63, 0x22, 0x36, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, + 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x68, 0x0a, + 0x23, 0x47, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x41, 0x0a, 0x08, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, + 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x6d, 0x0a, 0x24, 0x41, 0x64, 0x64, 0x45, 0x72, + 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x45, 0x0a, 0x0a, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x65, 0x63, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x77, 0x0a, 0x25, 0x41, 0x64, 0x64, 0x45, 0x72, 0x61, + 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x4e, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, + 0x4b, 0x0a, 0x25, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, + 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x63, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, + 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x26, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x25, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x22, 0x0a, 0x0c, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x26, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x72, 0x61, + 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4c, 0x0a, + 0x26, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x63, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x65, + 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x29, 0x0a, 0x27, 0x44, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x24, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x45, + 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, + 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, + 0x22, 0x27, 0x0a, 0x25, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, + 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x48, 0x0a, 0x2a, 0x47, 0x65, 0x74, + 0x45, 0x43, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x69, 0x65, 0x73, 0x22, 0x75, 0x0a, 0x2b, 0x47, 0x65, 0x74, 0x45, 0x43, 0x54, 0x6f, 0x70, 0x6f, + 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x46, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x45, 0x43, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf4, 0x03, 0x0a, 0x1e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x43, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x0a, + 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x45, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x6e, + 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0d, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x44, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x45, 0x0a, 0x0d, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x02, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x6e, 0x49, 0x6e, 0x66, + 0x6f, 0x73, 0x12, 0x4e, 0x0a, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x12, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, + 0x64, 0x73, 0x12, 0x4e, 0x0a, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x12, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, + 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x10, 0x6c, 0x69, + 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x41, + 0x0a, 0x08, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x02, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, + 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x22, 0x3a, 0x0a, 0x0a, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, + 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x73, 0x42, 0x7b, 0x0a, + 0x25, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x13, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, 0x72, + 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x5f, 0x68, 0x64, 0x66, 0x73, 0xa0, 0x01, 0x01, +} + +var ( + file_erasurecoding_proto_rawDescOnce sync.Once + file_erasurecoding_proto_rawDescData = file_erasurecoding_proto_rawDesc +) + +func file_erasurecoding_proto_rawDescGZIP() []byte { + file_erasurecoding_proto_rawDescOnce.Do(func() { + file_erasurecoding_proto_rawDescData = protoimpl.X.CompressGZIP(file_erasurecoding_proto_rawDescData) + }) + return file_erasurecoding_proto_rawDescData +} + +var file_erasurecoding_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_erasurecoding_proto_goTypes = []interface{}{ + (*SetErasureCodingPolicyRequestProto)(nil), // 0: hadoop.hdfs.SetErasureCodingPolicyRequestProto + (*SetErasureCodingPolicyResponseProto)(nil), // 1: hadoop.hdfs.SetErasureCodingPolicyResponseProto + (*GetErasureCodingPoliciesRequestProto)(nil), // 2: hadoop.hdfs.GetErasureCodingPoliciesRequestProto + (*GetErasureCodingPoliciesResponseProto)(nil), // 3: hadoop.hdfs.GetErasureCodingPoliciesResponseProto + (*GetErasureCodingCodecsRequestProto)(nil), // 4: hadoop.hdfs.GetErasureCodingCodecsRequestProto + (*GetErasureCodingCodecsResponseProto)(nil), // 5: hadoop.hdfs.GetErasureCodingCodecsResponseProto + (*GetErasureCodingPolicyRequestProto)(nil), // 6: hadoop.hdfs.GetErasureCodingPolicyRequestProto + (*GetErasureCodingPolicyResponseProto)(nil), // 7: hadoop.hdfs.GetErasureCodingPolicyResponseProto + (*AddErasureCodingPoliciesRequestProto)(nil), // 8: hadoop.hdfs.AddErasureCodingPoliciesRequestProto + (*AddErasureCodingPoliciesResponseProto)(nil), // 9: hadoop.hdfs.AddErasureCodingPoliciesResponseProto + (*RemoveErasureCodingPolicyRequestProto)(nil), // 10: hadoop.hdfs.RemoveErasureCodingPolicyRequestProto + (*RemoveErasureCodingPolicyResponseProto)(nil), // 11: hadoop.hdfs.RemoveErasureCodingPolicyResponseProto + (*EnableErasureCodingPolicyRequestProto)(nil), // 12: hadoop.hdfs.EnableErasureCodingPolicyRequestProto + (*EnableErasureCodingPolicyResponseProto)(nil), // 13: hadoop.hdfs.EnableErasureCodingPolicyResponseProto + (*DisableErasureCodingPolicyRequestProto)(nil), // 14: hadoop.hdfs.DisableErasureCodingPolicyRequestProto + (*DisableErasureCodingPolicyResponseProto)(nil), // 15: hadoop.hdfs.DisableErasureCodingPolicyResponseProto + (*UnsetErasureCodingPolicyRequestProto)(nil), // 16: hadoop.hdfs.UnsetErasureCodingPolicyRequestProto + (*UnsetErasureCodingPolicyResponseProto)(nil), // 17: hadoop.hdfs.UnsetErasureCodingPolicyResponseProto + (*GetECTopologyResultForPoliciesRequestProto)(nil), // 18: hadoop.hdfs.GetECTopologyResultForPoliciesRequestProto + (*GetECTopologyResultForPoliciesResponseProto)(nil), // 19: hadoop.hdfs.GetECTopologyResultForPoliciesResponseProto + (*BlockECReconstructionInfoProto)(nil), // 20: hadoop.hdfs.BlockECReconstructionInfoProto + (*CodecProto)(nil), // 21: hadoop.hdfs.CodecProto + (*ErasureCodingPolicyProto)(nil), // 22: hadoop.hdfs.ErasureCodingPolicyProto + (*AddErasureCodingPolicyResponseProto)(nil), // 23: hadoop.hdfs.AddErasureCodingPolicyResponseProto + (*ECTopologyVerifierResultProto)(nil), // 24: hadoop.hdfs.ECTopologyVerifierResultProto + (*ExtendedBlockProto)(nil), // 25: hadoop.hdfs.ExtendedBlockProto + (*DatanodeInfosProto)(nil), // 26: hadoop.hdfs.DatanodeInfosProto + (*StorageUuidsProto)(nil), // 27: hadoop.hdfs.StorageUuidsProto + (*StorageTypesProto)(nil), // 28: hadoop.hdfs.StorageTypesProto +} +var file_erasurecoding_proto_depIdxs = []int32{ + 22, // 0: hadoop.hdfs.GetErasureCodingPoliciesResponseProto.ecPolicies:type_name -> hadoop.hdfs.ErasureCodingPolicyProto + 21, // 1: hadoop.hdfs.GetErasureCodingCodecsResponseProto.codec:type_name -> hadoop.hdfs.CodecProto + 22, // 2: hadoop.hdfs.GetErasureCodingPolicyResponseProto.ecPolicy:type_name -> hadoop.hdfs.ErasureCodingPolicyProto + 22, // 3: hadoop.hdfs.AddErasureCodingPoliciesRequestProto.ecPolicies:type_name -> hadoop.hdfs.ErasureCodingPolicyProto + 23, // 4: hadoop.hdfs.AddErasureCodingPoliciesResponseProto.responses:type_name -> hadoop.hdfs.AddErasureCodingPolicyResponseProto + 24, // 5: hadoop.hdfs.GetECTopologyResultForPoliciesResponseProto.response:type_name -> hadoop.hdfs.ECTopologyVerifierResultProto + 25, // 6: hadoop.hdfs.BlockECReconstructionInfoProto.block:type_name -> hadoop.hdfs.ExtendedBlockProto + 26, // 7: hadoop.hdfs.BlockECReconstructionInfoProto.sourceDnInfos:type_name -> hadoop.hdfs.DatanodeInfosProto + 26, // 8: hadoop.hdfs.BlockECReconstructionInfoProto.targetDnInfos:type_name -> hadoop.hdfs.DatanodeInfosProto + 27, // 9: hadoop.hdfs.BlockECReconstructionInfoProto.targetStorageUuids:type_name -> hadoop.hdfs.StorageUuidsProto + 28, // 10: hadoop.hdfs.BlockECReconstructionInfoProto.targetStorageTypes:type_name -> hadoop.hdfs.StorageTypesProto + 22, // 11: hadoop.hdfs.BlockECReconstructionInfoProto.ecPolicy:type_name -> hadoop.hdfs.ErasureCodingPolicyProto + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_erasurecoding_proto_init() } +func file_erasurecoding_proto_init() { + if File_erasurecoding_proto != nil { + return + } + file_hdfs_proto_init() + if !protoimpl.UnsafeEnabled { + file_erasurecoding_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetErasureCodingPolicyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetErasureCodingPolicyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetErasureCodingPoliciesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetErasureCodingPoliciesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetErasureCodingCodecsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetErasureCodingCodecsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetErasureCodingPolicyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetErasureCodingPolicyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddErasureCodingPoliciesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddErasureCodingPoliciesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveErasureCodingPolicyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveErasureCodingPolicyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnableErasureCodingPolicyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnableErasureCodingPolicyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisableErasureCodingPolicyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisableErasureCodingPolicyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsetErasureCodingPolicyRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsetErasureCodingPolicyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetECTopologyResultForPoliciesRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetECTopologyResultForPoliciesResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockECReconstructionInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_erasurecoding_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CodecProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_erasurecoding_proto_rawDesc, + NumEnums: 0, + NumMessages: 22, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_erasurecoding_proto_goTypes, + DependencyIndexes: file_erasurecoding_proto_depIdxs, + MessageInfos: file_erasurecoding_proto_msgTypes, + }.Build() + File_erasurecoding_proto = out.File + file_erasurecoding_proto_rawDesc = nil + file_erasurecoding_proto_goTypes = nil + file_erasurecoding_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_hdfs/erasurecoding.proto b/internal/protocol/hadoop_hdfs/erasurecoding.proto index 4bb44fb4..15a17512 100644 --- a/internal/protocol/hadoop_hdfs/erasurecoding.proto +++ b/internal/protocol/hadoop_hdfs/erasurecoding.proto @@ -15,17 +15,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +syntax="proto2"; option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "ErasureCodingProtos"; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; package hadoop.hdfs; import "hdfs.proto"; message SetErasureCodingPolicyRequestProto { required string src = 1; - optional ErasureCodingPolicyProto ecPolicy = 2; + optional string ecPolicyName = 2; } message SetErasureCodingPolicyResponseProto { @@ -38,6 +39,13 @@ message GetErasureCodingPoliciesResponseProto { repeated ErasureCodingPolicyProto ecPolicies = 1; } +message GetErasureCodingCodecsRequestProto { // void request +} + +message GetErasureCodingCodecsResponseProto { + repeated CodecProto codec = 1; +} + message GetErasureCodingPolicyRequestProto { required string src = 1; // path to get the policy info } @@ -46,6 +54,50 @@ message GetErasureCodingPolicyResponseProto { optional ErasureCodingPolicyProto ecPolicy = 1; } +message AddErasureCodingPoliciesRequestProto { + repeated ErasureCodingPolicyProto ecPolicies = 1; +} + +message AddErasureCodingPoliciesResponseProto { + repeated AddErasureCodingPolicyResponseProto responses = 1; +} + +message RemoveErasureCodingPolicyRequestProto { + required string ecPolicyName = 1; +} + +message RemoveErasureCodingPolicyResponseProto { +} + +message EnableErasureCodingPolicyRequestProto { + required string ecPolicyName = 1; +} + +message EnableErasureCodingPolicyResponseProto { +} + +message DisableErasureCodingPolicyRequestProto { + required string ecPolicyName = 1; +} + +message DisableErasureCodingPolicyResponseProto { +} + +message UnsetErasureCodingPolicyRequestProto { + required string src = 1; +} + +message UnsetErasureCodingPolicyResponseProto { +} + +message GetECTopologyResultForPoliciesRequestProto { + repeated string policies = 1; +} + +message GetECTopologyResultForPoliciesResponseProto { + required ECTopologyVerifierResultProto response = 1; +} + /** * Block erasure coding reconstruction info */ @@ -58,3 +110,11 @@ message BlockECReconstructionInfoProto { required bytes liveBlockIndices = 6; required ErasureCodingPolicyProto ecPolicy = 7; } + +/** + * Codec and it's corresponding coders + */ +message CodecProto { + required string codec = 1; + required string coders = 2; +} diff --git a/internal/protocol/hadoop_hdfs/hdfs.pb.go b/internal/protocol/hadoop_hdfs/hdfs.pb.go index 478d6e3f..2af9757f 100644 --- a/internal/protocol/hadoop_hdfs/hdfs.pb.go +++ b/internal/protocol/hadoop_hdfs/hdfs.pb.go @@ -1,19 +1,49 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: hdfs.proto package hadoop_hdfs -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import hadoop_common "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" +import ( + hadoop_common "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// * +//* // Types of recognized storage media. type StorageTypeProto int32 @@ -22,40 +52,123 @@ const ( StorageTypeProto_SSD StorageTypeProto = 2 StorageTypeProto_ARCHIVE StorageTypeProto = 3 StorageTypeProto_RAM_DISK StorageTypeProto = 4 + StorageTypeProto_PROVIDED StorageTypeProto = 5 ) -var StorageTypeProto_name = map[int32]string{ - 1: "DISK", - 2: "SSD", - 3: "ARCHIVE", - 4: "RAM_DISK", -} -var StorageTypeProto_value = map[string]int32{ - "DISK": 1, - "SSD": 2, - "ARCHIVE": 3, - "RAM_DISK": 4, -} +// Enum value maps for StorageTypeProto. +var ( + StorageTypeProto_name = map[int32]string{ + 1: "DISK", + 2: "SSD", + 3: "ARCHIVE", + 4: "RAM_DISK", + 5: "PROVIDED", + } + StorageTypeProto_value = map[string]int32{ + "DISK": 1, + "SSD": 2, + "ARCHIVE": 3, + "RAM_DISK": 4, + "PROVIDED": 5, + } +) func (x StorageTypeProto) Enum() *StorageTypeProto { p := new(StorageTypeProto) *p = x return p } + func (x StorageTypeProto) String() string { - return proto.EnumName(StorageTypeProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StorageTypeProto) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[0].Descriptor() +} + +func (StorageTypeProto) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[0] +} + +func (x StorageTypeProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *StorageTypeProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = StorageTypeProto(num) + return nil +} + +// Deprecated: Use StorageTypeProto.Descriptor instead. +func (StorageTypeProto) EnumDescriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{0} +} + +//* +// Types of recognized blocks. +type BlockTypeProto int32 + +const ( + BlockTypeProto_CONTIGUOUS BlockTypeProto = 0 + BlockTypeProto_STRIPED BlockTypeProto = 1 +) + +// Enum value maps for BlockTypeProto. +var ( + BlockTypeProto_name = map[int32]string{ + 0: "CONTIGUOUS", + 1: "STRIPED", + } + BlockTypeProto_value = map[string]int32{ + "CONTIGUOUS": 0, + "STRIPED": 1, + } +) + +func (x BlockTypeProto) Enum() *BlockTypeProto { + p := new(BlockTypeProto) + *p = x + return p +} + +func (x BlockTypeProto) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (x *StorageTypeProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(StorageTypeProto_value, data, "StorageTypeProto") + +func (BlockTypeProto) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[1].Descriptor() +} + +func (BlockTypeProto) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[1] +} + +func (x BlockTypeProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *BlockTypeProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = StorageTypeProto(value) + *x = BlockTypeProto(num) return nil } -func (StorageTypeProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{0} } -// * +// Deprecated: Use BlockTypeProto.Descriptor instead. +func (BlockTypeProto) EnumDescriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{1} +} + +//* // Cipher suite. type CipherSuiteProto int32 @@ -64,34 +177,56 @@ const ( CipherSuiteProto_AES_CTR_NOPADDING CipherSuiteProto = 2 ) -var CipherSuiteProto_name = map[int32]string{ - 1: "UNKNOWN", - 2: "AES_CTR_NOPADDING", -} -var CipherSuiteProto_value = map[string]int32{ - "UNKNOWN": 1, - "AES_CTR_NOPADDING": 2, -} +// Enum value maps for CipherSuiteProto. +var ( + CipherSuiteProto_name = map[int32]string{ + 1: "UNKNOWN", + 2: "AES_CTR_NOPADDING", + } + CipherSuiteProto_value = map[string]int32{ + "UNKNOWN": 1, + "AES_CTR_NOPADDING": 2, + } +) func (x CipherSuiteProto) Enum() *CipherSuiteProto { p := new(CipherSuiteProto) *p = x return p } + func (x CipherSuiteProto) String() string { - return proto.EnumName(CipherSuiteProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CipherSuiteProto) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[2].Descriptor() +} + +func (CipherSuiteProto) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[2] +} + +func (x CipherSuiteProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *CipherSuiteProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(CipherSuiteProto_value, data, "CipherSuiteProto") + +// Deprecated: Do not use. +func (x *CipherSuiteProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = CipherSuiteProto(value) + *x = CipherSuiteProto(num) return nil } -func (CipherSuiteProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{1} } -// * +// Deprecated: Use CipherSuiteProto.Descriptor instead. +func (CipherSuiteProto) EnumDescriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{2} +} + +//* // Crypto protocol version used to access encrypted files. type CryptoProtocolVersionProto int32 @@ -100,34 +235,117 @@ const ( CryptoProtocolVersionProto_ENCRYPTION_ZONES CryptoProtocolVersionProto = 2 ) -var CryptoProtocolVersionProto_name = map[int32]string{ - 1: "UNKNOWN_PROTOCOL_VERSION", - 2: "ENCRYPTION_ZONES", -} -var CryptoProtocolVersionProto_value = map[string]int32{ - "UNKNOWN_PROTOCOL_VERSION": 1, - "ENCRYPTION_ZONES": 2, -} +// Enum value maps for CryptoProtocolVersionProto. +var ( + CryptoProtocolVersionProto_name = map[int32]string{ + 1: "UNKNOWN_PROTOCOL_VERSION", + 2: "ENCRYPTION_ZONES", + } + CryptoProtocolVersionProto_value = map[string]int32{ + "UNKNOWN_PROTOCOL_VERSION": 1, + "ENCRYPTION_ZONES": 2, + } +) func (x CryptoProtocolVersionProto) Enum() *CryptoProtocolVersionProto { p := new(CryptoProtocolVersionProto) *p = x return p } + func (x CryptoProtocolVersionProto) String() string { - return proto.EnumName(CryptoProtocolVersionProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CryptoProtocolVersionProto) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[3].Descriptor() +} + +func (CryptoProtocolVersionProto) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[3] +} + +func (x CryptoProtocolVersionProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *CryptoProtocolVersionProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = CryptoProtocolVersionProto(num) + return nil +} + +// Deprecated: Use CryptoProtocolVersionProto.Descriptor instead. +func (CryptoProtocolVersionProto) EnumDescriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{3} +} + +//* +// EC policy state. +type ErasureCodingPolicyState int32 + +const ( + ErasureCodingPolicyState_DISABLED ErasureCodingPolicyState = 1 + ErasureCodingPolicyState_ENABLED ErasureCodingPolicyState = 2 + ErasureCodingPolicyState_REMOVED ErasureCodingPolicyState = 3 +) + +// Enum value maps for ErasureCodingPolicyState. +var ( + ErasureCodingPolicyState_name = map[int32]string{ + 1: "DISABLED", + 2: "ENABLED", + 3: "REMOVED", + } + ErasureCodingPolicyState_value = map[string]int32{ + "DISABLED": 1, + "ENABLED": 2, + "REMOVED": 3, + } +) + +func (x ErasureCodingPolicyState) Enum() *ErasureCodingPolicyState { + p := new(ErasureCodingPolicyState) + *p = x + return p } -func (x *CryptoProtocolVersionProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(CryptoProtocolVersionProto_value, data, "CryptoProtocolVersionProto") + +func (x ErasureCodingPolicyState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErasureCodingPolicyState) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[4].Descriptor() +} + +func (ErasureCodingPolicyState) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[4] +} + +func (x ErasureCodingPolicyState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *ErasureCodingPolicyState) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = CryptoProtocolVersionProto(value) + *x = ErasureCodingPolicyState(num) return nil } -func (CryptoProtocolVersionProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{2} } -// * +// Deprecated: Use ErasureCodingPolicyState.Descriptor instead. +func (ErasureCodingPolicyState) EnumDescriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{4} +} + +//* // Checksum algorithms/types used in HDFS // Make sure this enum's integer values match enum values' id properties defined // in org.apache.hadoop.util.DataChecksum.Type @@ -139,34 +357,176 @@ const ( ChecksumTypeProto_CHECKSUM_CRC32C ChecksumTypeProto = 2 ) -var ChecksumTypeProto_name = map[int32]string{ - 0: "CHECKSUM_NULL", - 1: "CHECKSUM_CRC32", - 2: "CHECKSUM_CRC32C", -} -var ChecksumTypeProto_value = map[string]int32{ - "CHECKSUM_NULL": 0, - "CHECKSUM_CRC32": 1, - "CHECKSUM_CRC32C": 2, -} +// Enum value maps for ChecksumTypeProto. +var ( + ChecksumTypeProto_name = map[int32]string{ + 0: "CHECKSUM_NULL", + 1: "CHECKSUM_CRC32", + 2: "CHECKSUM_CRC32C", + } + ChecksumTypeProto_value = map[string]int32{ + "CHECKSUM_NULL": 0, + "CHECKSUM_CRC32": 1, + "CHECKSUM_CRC32C": 2, + } +) func (x ChecksumTypeProto) Enum() *ChecksumTypeProto { p := new(ChecksumTypeProto) *p = x return p } + func (x ChecksumTypeProto) String() string { - return proto.EnumName(ChecksumTypeProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ChecksumTypeProto) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[5].Descriptor() +} + +func (ChecksumTypeProto) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[5] +} + +func (x ChecksumTypeProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *ChecksumTypeProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = ChecksumTypeProto(num) + return nil +} + +// Deprecated: Use ChecksumTypeProto.Descriptor instead. +func (ChecksumTypeProto) EnumDescriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{5} +} + +type BlockChecksumTypeProto int32 + +const ( + BlockChecksumTypeProto_MD5CRC BlockChecksumTypeProto = 1 // BlockChecksum obtained by taking the MD5 digest of chunk CRCs + BlockChecksumTypeProto_COMPOSITE_CRC BlockChecksumTypeProto = 2 // Chunk-independent CRC, optionally striped +) + +// Enum value maps for BlockChecksumTypeProto. +var ( + BlockChecksumTypeProto_name = map[int32]string{ + 1: "MD5CRC", + 2: "COMPOSITE_CRC", + } + BlockChecksumTypeProto_value = map[string]int32{ + "MD5CRC": 1, + "COMPOSITE_CRC": 2, + } +) + +func (x BlockChecksumTypeProto) Enum() *BlockChecksumTypeProto { + p := new(BlockChecksumTypeProto) + *p = x + return p +} + +func (x BlockChecksumTypeProto) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BlockChecksumTypeProto) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[6].Descriptor() +} + +func (BlockChecksumTypeProto) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[6] +} + +func (x BlockChecksumTypeProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *BlockChecksumTypeProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = BlockChecksumTypeProto(num) + return nil +} + +// Deprecated: Use BlockChecksumTypeProto.Descriptor instead. +func (BlockChecksumTypeProto) EnumDescriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{6} +} + +//* +// File access permissions mode. +type AccessModeProto int32 + +const ( + AccessModeProto_READ AccessModeProto = 1 + AccessModeProto_WRITE AccessModeProto = 2 + AccessModeProto_COPY AccessModeProto = 3 + AccessModeProto_REPLACE AccessModeProto = 4 +) + +// Enum value maps for AccessModeProto. +var ( + AccessModeProto_name = map[int32]string{ + 1: "READ", + 2: "WRITE", + 3: "COPY", + 4: "REPLACE", + } + AccessModeProto_value = map[string]int32{ + "READ": 1, + "WRITE": 2, + "COPY": 3, + "REPLACE": 4, + } +) + +func (x AccessModeProto) Enum() *AccessModeProto { + p := new(AccessModeProto) + *p = x + return p +} + +func (x AccessModeProto) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AccessModeProto) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[7].Descriptor() +} + +func (AccessModeProto) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[7] +} + +func (x AccessModeProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *ChecksumTypeProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(ChecksumTypeProto_value, data, "ChecksumTypeProto") + +// Deprecated: Do not use. +func (x *AccessModeProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = ChecksumTypeProto(value) + *x = AccessModeProto(num) return nil } -func (ChecksumTypeProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{3} } + +// Deprecated: Use AccessModeProto.Descriptor instead. +func (AccessModeProto) EnumDescriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{7} +} type DatanodeInfoProto_AdminState int32 @@ -174,37 +534,63 @@ const ( DatanodeInfoProto_NORMAL DatanodeInfoProto_AdminState = 0 DatanodeInfoProto_DECOMMISSION_INPROGRESS DatanodeInfoProto_AdminState = 1 DatanodeInfoProto_DECOMMISSIONED DatanodeInfoProto_AdminState = 2 + DatanodeInfoProto_ENTERING_MAINTENANCE DatanodeInfoProto_AdminState = 3 + DatanodeInfoProto_IN_MAINTENANCE DatanodeInfoProto_AdminState = 4 ) -var DatanodeInfoProto_AdminState_name = map[int32]string{ - 0: "NORMAL", - 1: "DECOMMISSION_INPROGRESS", - 2: "DECOMMISSIONED", -} -var DatanodeInfoProto_AdminState_value = map[string]int32{ - "NORMAL": 0, - "DECOMMISSION_INPROGRESS": 1, - "DECOMMISSIONED": 2, -} +// Enum value maps for DatanodeInfoProto_AdminState. +var ( + DatanodeInfoProto_AdminState_name = map[int32]string{ + 0: "NORMAL", + 1: "DECOMMISSION_INPROGRESS", + 2: "DECOMMISSIONED", + 3: "ENTERING_MAINTENANCE", + 4: "IN_MAINTENANCE", + } + DatanodeInfoProto_AdminState_value = map[string]int32{ + "NORMAL": 0, + "DECOMMISSION_INPROGRESS": 1, + "DECOMMISSIONED": 2, + "ENTERING_MAINTENANCE": 3, + "IN_MAINTENANCE": 4, + } +) func (x DatanodeInfoProto_AdminState) Enum() *DatanodeInfoProto_AdminState { p := new(DatanodeInfoProto_AdminState) *p = x return p } + func (x DatanodeInfoProto_AdminState) String() string { - return proto.EnumName(DatanodeInfoProto_AdminState_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DatanodeInfoProto_AdminState) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[8].Descriptor() +} + +func (DatanodeInfoProto_AdminState) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[8] +} + +func (x DatanodeInfoProto_AdminState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *DatanodeInfoProto_AdminState) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(DatanodeInfoProto_AdminState_value, data, "DatanodeInfoProto_AdminState") + +// Deprecated: Do not use. +func (x *DatanodeInfoProto_AdminState) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = DatanodeInfoProto_AdminState(value) + *x = DatanodeInfoProto_AdminState(num) return nil } + +// Deprecated: Use DatanodeInfoProto_AdminState.Descriptor instead. func (DatanodeInfoProto_AdminState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor8, []int{4, 0} + return file_hdfs_proto_rawDescGZIP(), []int{6, 0} } type DatanodeStorageProto_StorageState int32 @@ -214,33 +600,53 @@ const ( DatanodeStorageProto_READ_ONLY_SHARED DatanodeStorageProto_StorageState = 1 ) -var DatanodeStorageProto_StorageState_name = map[int32]string{ - 0: "NORMAL", - 1: "READ_ONLY_SHARED", -} -var DatanodeStorageProto_StorageState_value = map[string]int32{ - "NORMAL": 0, - "READ_ONLY_SHARED": 1, -} +// Enum value maps for DatanodeStorageProto_StorageState. +var ( + DatanodeStorageProto_StorageState_name = map[int32]string{ + 0: "NORMAL", + 1: "READ_ONLY_SHARED", + } + DatanodeStorageProto_StorageState_value = map[string]int32{ + "NORMAL": 0, + "READ_ONLY_SHARED": 1, + } +) func (x DatanodeStorageProto_StorageState) Enum() *DatanodeStorageProto_StorageState { p := new(DatanodeStorageProto_StorageState) *p = x return p } + func (x DatanodeStorageProto_StorageState) String() string { - return proto.EnumName(DatanodeStorageProto_StorageState_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DatanodeStorageProto_StorageState) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[9].Descriptor() +} + +func (DatanodeStorageProto_StorageState) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[9] +} + +func (x DatanodeStorageProto_StorageState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *DatanodeStorageProto_StorageState) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(DatanodeStorageProto_StorageState_value, data, "DatanodeStorageProto_StorageState") + +// Deprecated: Do not use. +func (x *DatanodeStorageProto_StorageState) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = DatanodeStorageProto_StorageState(value) + *x = DatanodeStorageProto_StorageState(num) return nil } + +// Deprecated: Use DatanodeStorageProto_StorageState.Descriptor instead. func (DatanodeStorageProto_StorageState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor8, []int{5, 0} + return file_hdfs_proto_rawDescGZIP(), []int{7, 0} } type HdfsFileStatusProto_FileType int32 @@ -251,2039 +657,5639 @@ const ( HdfsFileStatusProto_IS_SYMLINK HdfsFileStatusProto_FileType = 3 ) -var HdfsFileStatusProto_FileType_name = map[int32]string{ - 1: "IS_DIR", - 2: "IS_FILE", - 3: "IS_SYMLINK", -} -var HdfsFileStatusProto_FileType_value = map[string]int32{ - "IS_DIR": 1, - "IS_FILE": 2, - "IS_SYMLINK": 3, -} +// Enum value maps for HdfsFileStatusProto_FileType. +var ( + HdfsFileStatusProto_FileType_name = map[int32]string{ + 1: "IS_DIR", + 2: "IS_FILE", + 3: "IS_SYMLINK", + } + HdfsFileStatusProto_FileType_value = map[string]int32{ + "IS_DIR": 1, + "IS_FILE": 2, + "IS_SYMLINK": 3, + } +) func (x HdfsFileStatusProto_FileType) Enum() *HdfsFileStatusProto_FileType { p := new(HdfsFileStatusProto_FileType) *p = x return p } + func (x HdfsFileStatusProto_FileType) String() string { - return proto.EnumName(HdfsFileStatusProto_FileType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HdfsFileStatusProto_FileType) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[10].Descriptor() +} + +func (HdfsFileStatusProto_FileType) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[10] +} + +func (x HdfsFileStatusProto_FileType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *HdfsFileStatusProto_FileType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(HdfsFileStatusProto_FileType_value, data, "HdfsFileStatusProto_FileType") + +// Deprecated: Do not use. +func (x *HdfsFileStatusProto_FileType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = HdfsFileStatusProto_FileType(value) + *x = HdfsFileStatusProto_FileType(num) return nil } -func (HdfsFileStatusProto_FileType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor8, []int{25, 0} -} -// * -// Extended block idenfies a block -type ExtendedBlockProto struct { - PoolId *string `protobuf:"bytes,1,req,name=poolId" json:"poolId,omitempty"` - BlockId *uint64 `protobuf:"varint,2,req,name=blockId" json:"blockId,omitempty"` - GenerationStamp *uint64 `protobuf:"varint,3,req,name=generationStamp" json:"generationStamp,omitempty"` - NumBytes *uint64 `protobuf:"varint,4,opt,name=numBytes,def=0" json:"numBytes,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use HdfsFileStatusProto_FileType.Descriptor instead. +func (HdfsFileStatusProto_FileType) EnumDescriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{31, 0} } -func (m *ExtendedBlockProto) Reset() { *m = ExtendedBlockProto{} } -func (m *ExtendedBlockProto) String() string { return proto.CompactTextString(m) } -func (*ExtendedBlockProto) ProtoMessage() {} -func (*ExtendedBlockProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{0} } +type HdfsFileStatusProto_Flags int32 -const Default_ExtendedBlockProto_NumBytes uint64 = 0 +const ( + HdfsFileStatusProto_HAS_ACL HdfsFileStatusProto_Flags = 1 // has ACLs + HdfsFileStatusProto_HAS_CRYPT HdfsFileStatusProto_Flags = 2 // encrypted + HdfsFileStatusProto_HAS_EC HdfsFileStatusProto_Flags = 4 // erasure coded + HdfsFileStatusProto_SNAPSHOT_ENABLED HdfsFileStatusProto_Flags = 8 // SNAPSHOT ENABLED +) -func (m *ExtendedBlockProto) GetPoolId() string { - if m != nil && m.PoolId != nil { - return *m.PoolId +// Enum value maps for HdfsFileStatusProto_Flags. +var ( + HdfsFileStatusProto_Flags_name = map[int32]string{ + 1: "HAS_ACL", + 2: "HAS_CRYPT", + 4: "HAS_EC", + 8: "SNAPSHOT_ENABLED", } - return "" -} - -func (m *ExtendedBlockProto) GetBlockId() uint64 { - if m != nil && m.BlockId != nil { - return *m.BlockId + HdfsFileStatusProto_Flags_value = map[string]int32{ + "HAS_ACL": 1, + "HAS_CRYPT": 2, + "HAS_EC": 4, + "SNAPSHOT_ENABLED": 8, } - return 0 -} +) -func (m *ExtendedBlockProto) GetGenerationStamp() uint64 { - if m != nil && m.GenerationStamp != nil { - return *m.GenerationStamp - } - return 0 +func (x HdfsFileStatusProto_Flags) Enum() *HdfsFileStatusProto_Flags { + p := new(HdfsFileStatusProto_Flags) + *p = x + return p } -func (m *ExtendedBlockProto) GetNumBytes() uint64 { - if m != nil && m.NumBytes != nil { - return *m.NumBytes - } - return Default_ExtendedBlockProto_NumBytes +func (x HdfsFileStatusProto_Flags) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -// * -// Identifies a Datanode -type DatanodeIDProto struct { - IpAddr *string `protobuf:"bytes,1,req,name=ipAddr" json:"ipAddr,omitempty"` - HostName *string `protobuf:"bytes,2,req,name=hostName" json:"hostName,omitempty"` - DatanodeUuid *string `protobuf:"bytes,3,req,name=datanodeUuid" json:"datanodeUuid,omitempty"` - // upgraded clusters this is the same - // as the original StorageID of the - // Datanode. - XferPort *uint32 `protobuf:"varint,4,req,name=xferPort" json:"xferPort,omitempty"` - InfoPort *uint32 `protobuf:"varint,5,req,name=infoPort" json:"infoPort,omitempty"` - IpcPort *uint32 `protobuf:"varint,6,req,name=ipcPort" json:"ipcPort,omitempty"` - InfoSecurePort *uint32 `protobuf:"varint,7,opt,name=infoSecurePort,def=0" json:"infoSecurePort,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (HdfsFileStatusProto_Flags) Descriptor() protoreflect.EnumDescriptor { + return file_hdfs_proto_enumTypes[11].Descriptor() } -func (m *DatanodeIDProto) Reset() { *m = DatanodeIDProto{} } -func (m *DatanodeIDProto) String() string { return proto.CompactTextString(m) } -func (*DatanodeIDProto) ProtoMessage() {} -func (*DatanodeIDProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{1} } - -const Default_DatanodeIDProto_InfoSecurePort uint32 = 0 - -func (m *DatanodeIDProto) GetIpAddr() string { - if m != nil && m.IpAddr != nil { - return *m.IpAddr - } - return "" +func (HdfsFileStatusProto_Flags) Type() protoreflect.EnumType { + return &file_hdfs_proto_enumTypes[11] } -func (m *DatanodeIDProto) GetHostName() string { - if m != nil && m.HostName != nil { - return *m.HostName - } - return "" +func (x HdfsFileStatusProto_Flags) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *DatanodeIDProto) GetDatanodeUuid() string { - if m != nil && m.DatanodeUuid != nil { - return *m.DatanodeUuid +// Deprecated: Do not use. +func (x *HdfsFileStatusProto_Flags) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err } - return "" + *x = HdfsFileStatusProto_Flags(num) + return nil } -func (m *DatanodeIDProto) GetXferPort() uint32 { - if m != nil && m.XferPort != nil { - return *m.XferPort - } - return 0 +// Deprecated: Use HdfsFileStatusProto_Flags.Descriptor instead. +func (HdfsFileStatusProto_Flags) EnumDescriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{31, 1} } -func (m *DatanodeIDProto) GetInfoPort() uint32 { - if m != nil && m.InfoPort != nil { - return *m.InfoPort - } - return 0 +//* +// Extended block idenfies a block +type ExtendedBlockProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PoolId *string `protobuf:"bytes,1,req,name=poolId" json:"poolId,omitempty"` // Block pool id - globally unique across clusters + BlockId *uint64 `protobuf:"varint,2,req,name=blockId" json:"blockId,omitempty"` // the local id within a pool + GenerationStamp *uint64 `protobuf:"varint,3,req,name=generationStamp" json:"generationStamp,omitempty"` + NumBytes *uint64 `protobuf:"varint,4,opt,name=numBytes,def=0" json:"numBytes,omitempty"` // len does not belong in ebid +} + +// Default values for ExtendedBlockProto fields. +const ( + Default_ExtendedBlockProto_NumBytes = uint64(0) +) + +func (x *ExtendedBlockProto) Reset() { + *x = ExtendedBlockProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExtendedBlockProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtendedBlockProto) ProtoMessage() {} + +func (x *ExtendedBlockProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtendedBlockProto.ProtoReflect.Descriptor instead. +func (*ExtendedBlockProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{0} +} + +func (x *ExtendedBlockProto) GetPoolId() string { + if x != nil && x.PoolId != nil { + return *x.PoolId + } + return "" +} + +func (x *ExtendedBlockProto) GetBlockId() uint64 { + if x != nil && x.BlockId != nil { + return *x.BlockId + } + return 0 +} + +func (x *ExtendedBlockProto) GetGenerationStamp() uint64 { + if x != nil && x.GenerationStamp != nil { + return *x.GenerationStamp + } + return 0 +} + +func (x *ExtendedBlockProto) GetNumBytes() uint64 { + if x != nil && x.NumBytes != nil { + return *x.NumBytes + } + return Default_ExtendedBlockProto_NumBytes +} + +type ProvidedStorageLocationProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` + Offset *int64 `protobuf:"varint,2,req,name=offset" json:"offset,omitempty"` + Length *int64 `protobuf:"varint,3,req,name=length" json:"length,omitempty"` + Nonce []byte `protobuf:"bytes,4,req,name=nonce" json:"nonce,omitempty"` +} + +func (x *ProvidedStorageLocationProto) Reset() { + *x = ProvidedStorageLocationProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProvidedStorageLocationProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProvidedStorageLocationProto) ProtoMessage() {} + +func (x *ProvidedStorageLocationProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProvidedStorageLocationProto.ProtoReflect.Descriptor instead. +func (*ProvidedStorageLocationProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{1} +} + +func (x *ProvidedStorageLocationProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path + } + return "" +} + +func (x *ProvidedStorageLocationProto) GetOffset() int64 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *ProvidedStorageLocationProto) GetLength() int64 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +func (x *ProvidedStorageLocationProto) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +//* +// Identifies a Datanode +type DatanodeIDProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IpAddr *string `protobuf:"bytes,1,req,name=ipAddr" json:"ipAddr,omitempty"` // IP address + HostName *string `protobuf:"bytes,2,req,name=hostName" json:"hostName,omitempty"` // hostname + DatanodeUuid *string `protobuf:"bytes,3,req,name=datanodeUuid" json:"datanodeUuid,omitempty"` // UUID assigned to the Datanode. For + // upgraded clusters this is the same + // as the original StorageID of the + // Datanode. + XferPort *uint32 `protobuf:"varint,4,req,name=xferPort" json:"xferPort,omitempty"` // data streaming port + InfoPort *uint32 `protobuf:"varint,5,req,name=infoPort" json:"infoPort,omitempty"` // datanode http port + IpcPort *uint32 `protobuf:"varint,6,req,name=ipcPort" json:"ipcPort,omitempty"` // ipc server port + InfoSecurePort *uint32 `protobuf:"varint,7,opt,name=infoSecurePort,def=0" json:"infoSecurePort,omitempty"` // datanode https port +} + +// Default values for DatanodeIDProto fields. +const ( + Default_DatanodeIDProto_InfoSecurePort = uint32(0) +) + +func (x *DatanodeIDProto) Reset() { + *x = DatanodeIDProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DatanodeIDProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DatanodeIDProto) ProtoMessage() {} + +func (x *DatanodeIDProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DatanodeIDProto.ProtoReflect.Descriptor instead. +func (*DatanodeIDProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{2} +} + +func (x *DatanodeIDProto) GetIpAddr() string { + if x != nil && x.IpAddr != nil { + return *x.IpAddr + } + return "" +} + +func (x *DatanodeIDProto) GetHostName() string { + if x != nil && x.HostName != nil { + return *x.HostName + } + return "" +} + +func (x *DatanodeIDProto) GetDatanodeUuid() string { + if x != nil && x.DatanodeUuid != nil { + return *x.DatanodeUuid + } + return "" +} + +func (x *DatanodeIDProto) GetXferPort() uint32 { + if x != nil && x.XferPort != nil { + return *x.XferPort + } + return 0 +} + +func (x *DatanodeIDProto) GetInfoPort() uint32 { + if x != nil && x.InfoPort != nil { + return *x.InfoPort + } + return 0 } -func (m *DatanodeIDProto) GetIpcPort() uint32 { - if m != nil && m.IpcPort != nil { - return *m.IpcPort +func (x *DatanodeIDProto) GetIpcPort() uint32 { + if x != nil && x.IpcPort != nil { + return *x.IpcPort } return 0 } -func (m *DatanodeIDProto) GetInfoSecurePort() uint32 { - if m != nil && m.InfoSecurePort != nil { - return *m.InfoSecurePort +func (x *DatanodeIDProto) GetInfoSecurePort() uint32 { + if x != nil && x.InfoSecurePort != nil { + return *x.InfoSecurePort } return Default_DatanodeIDProto_InfoSecurePort } -// * +//* // Datanode local information type DatanodeLocalInfoProto struct { - SoftwareVersion *string `protobuf:"bytes,1,req,name=softwareVersion" json:"softwareVersion,omitempty"` - ConfigVersion *string `protobuf:"bytes,2,req,name=configVersion" json:"configVersion,omitempty"` - Uptime *uint64 `protobuf:"varint,3,req,name=uptime" json:"uptime,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SoftwareVersion *string `protobuf:"bytes,1,req,name=softwareVersion" json:"softwareVersion,omitempty"` + ConfigVersion *string `protobuf:"bytes,2,req,name=configVersion" json:"configVersion,omitempty"` + Uptime *uint64 `protobuf:"varint,3,req,name=uptime" json:"uptime,omitempty"` +} + +func (x *DatanodeLocalInfoProto) Reset() { + *x = DatanodeLocalInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DatanodeLocalInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DatanodeLocalInfoProto) ProtoMessage() {} + +func (x *DatanodeLocalInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DatanodeLocalInfoProto.ProtoReflect.Descriptor instead. +func (*DatanodeLocalInfoProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{3} +} + +func (x *DatanodeLocalInfoProto) GetSoftwareVersion() string { + if x != nil && x.SoftwareVersion != nil { + return *x.SoftwareVersion + } + return "" +} + +func (x *DatanodeLocalInfoProto) GetConfigVersion() string { + if x != nil && x.ConfigVersion != nil { + return *x.ConfigVersion + } + return "" +} + +func (x *DatanodeLocalInfoProto) GetUptime() uint64 { + if x != nil && x.Uptime != nil { + return *x.Uptime + } + return 0 +} + +//* +// Datanode volume information +type DatanodeVolumeInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` + StorageType *StorageTypeProto `protobuf:"varint,2,req,name=storageType,enum=hadoop.hdfs.StorageTypeProto" json:"storageType,omitempty"` + UsedSpace *uint64 `protobuf:"varint,3,req,name=usedSpace" json:"usedSpace,omitempty"` + FreeSpace *uint64 `protobuf:"varint,4,req,name=freeSpace" json:"freeSpace,omitempty"` + ReservedSpace *uint64 `protobuf:"varint,5,req,name=reservedSpace" json:"reservedSpace,omitempty"` + ReservedSpaceForReplicas *uint64 `protobuf:"varint,6,req,name=reservedSpaceForReplicas" json:"reservedSpaceForReplicas,omitempty"` + NumBlocks *uint64 `protobuf:"varint,7,req,name=numBlocks" json:"numBlocks,omitempty"` +} + +func (x *DatanodeVolumeInfoProto) Reset() { + *x = DatanodeVolumeInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DatanodeVolumeInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DatanodeVolumeInfoProto) ProtoMessage() {} + +func (x *DatanodeVolumeInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DatanodeVolumeInfoProto.ProtoReflect.Descriptor instead. +func (*DatanodeVolumeInfoProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{4} +} + +func (x *DatanodeVolumeInfoProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path + } + return "" +} + +func (x *DatanodeVolumeInfoProto) GetStorageType() StorageTypeProto { + if x != nil && x.StorageType != nil { + return *x.StorageType + } + return StorageTypeProto_DISK +} + +func (x *DatanodeVolumeInfoProto) GetUsedSpace() uint64 { + if x != nil && x.UsedSpace != nil { + return *x.UsedSpace + } + return 0 +} + +func (x *DatanodeVolumeInfoProto) GetFreeSpace() uint64 { + if x != nil && x.FreeSpace != nil { + return *x.FreeSpace + } + return 0 +} + +func (x *DatanodeVolumeInfoProto) GetReservedSpace() uint64 { + if x != nil && x.ReservedSpace != nil { + return *x.ReservedSpace + } + return 0 +} + +func (x *DatanodeVolumeInfoProto) GetReservedSpaceForReplicas() uint64 { + if x != nil && x.ReservedSpaceForReplicas != nil { + return *x.ReservedSpaceForReplicas + } + return 0 +} + +func (x *DatanodeVolumeInfoProto) GetNumBlocks() uint64 { + if x != nil && x.NumBlocks != nil { + return *x.NumBlocks + } + return 0 +} + +//* +// DatanodeInfo array +type DatanodeInfosProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Datanodes []*DatanodeInfoProto `protobuf:"bytes,1,rep,name=datanodes" json:"datanodes,omitempty"` +} + +func (x *DatanodeInfosProto) Reset() { + *x = DatanodeInfosProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DatanodeInfosProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DatanodeInfosProto) ProtoMessage() {} + +func (x *DatanodeInfosProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DatanodeInfosProto.ProtoReflect.Descriptor instead. +func (*DatanodeInfosProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{5} +} + +func (x *DatanodeInfosProto) GetDatanodes() []*DatanodeInfoProto { + if x != nil { + return x.Datanodes + } + return nil +} + +//* +// The status of a Datanode +type DatanodeInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *DatanodeIDProto `protobuf:"bytes,1,req,name=id" json:"id,omitempty"` + Capacity *uint64 `protobuf:"varint,2,opt,name=capacity,def=0" json:"capacity,omitempty"` + DfsUsed *uint64 `protobuf:"varint,3,opt,name=dfsUsed,def=0" json:"dfsUsed,omitempty"` + Remaining *uint64 `protobuf:"varint,4,opt,name=remaining,def=0" json:"remaining,omitempty"` + BlockPoolUsed *uint64 `protobuf:"varint,5,opt,name=blockPoolUsed,def=0" json:"blockPoolUsed,omitempty"` + LastUpdate *uint64 `protobuf:"varint,6,opt,name=lastUpdate,def=0" json:"lastUpdate,omitempty"` + XceiverCount *uint32 `protobuf:"varint,7,opt,name=xceiverCount,def=0" json:"xceiverCount,omitempty"` + Location *string `protobuf:"bytes,8,opt,name=location" json:"location,omitempty"` + NonDfsUsed *uint64 `protobuf:"varint,9,opt,name=nonDfsUsed" json:"nonDfsUsed,omitempty"` + AdminState *DatanodeInfoProto_AdminState `protobuf:"varint,10,opt,name=adminState,enum=hadoop.hdfs.DatanodeInfoProto_AdminState,def=0" json:"adminState,omitempty"` + CacheCapacity *uint64 `protobuf:"varint,11,opt,name=cacheCapacity,def=0" json:"cacheCapacity,omitempty"` + CacheUsed *uint64 `protobuf:"varint,12,opt,name=cacheUsed,def=0" json:"cacheUsed,omitempty"` + LastUpdateMonotonic *uint64 `protobuf:"varint,13,opt,name=lastUpdateMonotonic,def=0" json:"lastUpdateMonotonic,omitempty"` + UpgradeDomain *string `protobuf:"bytes,14,opt,name=upgradeDomain" json:"upgradeDomain,omitempty"` + LastBlockReportTime *uint64 `protobuf:"varint,15,opt,name=lastBlockReportTime,def=0" json:"lastBlockReportTime,omitempty"` + LastBlockReportMonotonic *uint64 `protobuf:"varint,16,opt,name=lastBlockReportMonotonic,def=0" json:"lastBlockReportMonotonic,omitempty"` + NumBlocks *uint32 `protobuf:"varint,17,opt,name=numBlocks,def=0" json:"numBlocks,omitempty"` +} + +// Default values for DatanodeInfoProto fields. +const ( + Default_DatanodeInfoProto_Capacity = uint64(0) + Default_DatanodeInfoProto_DfsUsed = uint64(0) + Default_DatanodeInfoProto_Remaining = uint64(0) + Default_DatanodeInfoProto_BlockPoolUsed = uint64(0) + Default_DatanodeInfoProto_LastUpdate = uint64(0) + Default_DatanodeInfoProto_XceiverCount = uint32(0) + Default_DatanodeInfoProto_AdminState = DatanodeInfoProto_NORMAL + Default_DatanodeInfoProto_CacheCapacity = uint64(0) + Default_DatanodeInfoProto_CacheUsed = uint64(0) + Default_DatanodeInfoProto_LastUpdateMonotonic = uint64(0) + Default_DatanodeInfoProto_LastBlockReportTime = uint64(0) + Default_DatanodeInfoProto_LastBlockReportMonotonic = uint64(0) + Default_DatanodeInfoProto_NumBlocks = uint32(0) +) + +func (x *DatanodeInfoProto) Reset() { + *x = DatanodeInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DatanodeInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DatanodeInfoProto) ProtoMessage() {} + +func (x *DatanodeInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DatanodeInfoProto.ProtoReflect.Descriptor instead. +func (*DatanodeInfoProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{6} +} + +func (x *DatanodeInfoProto) GetId() *DatanodeIDProto { + if x != nil { + return x.Id + } + return nil +} + +func (x *DatanodeInfoProto) GetCapacity() uint64 { + if x != nil && x.Capacity != nil { + return *x.Capacity + } + return Default_DatanodeInfoProto_Capacity +} + +func (x *DatanodeInfoProto) GetDfsUsed() uint64 { + if x != nil && x.DfsUsed != nil { + return *x.DfsUsed + } + return Default_DatanodeInfoProto_DfsUsed +} + +func (x *DatanodeInfoProto) GetRemaining() uint64 { + if x != nil && x.Remaining != nil { + return *x.Remaining + } + return Default_DatanodeInfoProto_Remaining +} + +func (x *DatanodeInfoProto) GetBlockPoolUsed() uint64 { + if x != nil && x.BlockPoolUsed != nil { + return *x.BlockPoolUsed + } + return Default_DatanodeInfoProto_BlockPoolUsed +} + +func (x *DatanodeInfoProto) GetLastUpdate() uint64 { + if x != nil && x.LastUpdate != nil { + return *x.LastUpdate + } + return Default_DatanodeInfoProto_LastUpdate } -func (m *DatanodeLocalInfoProto) Reset() { *m = DatanodeLocalInfoProto{} } -func (m *DatanodeLocalInfoProto) String() string { return proto.CompactTextString(m) } -func (*DatanodeLocalInfoProto) ProtoMessage() {} -func (*DatanodeLocalInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{2} } +func (x *DatanodeInfoProto) GetXceiverCount() uint32 { + if x != nil && x.XceiverCount != nil { + return *x.XceiverCount + } + return Default_DatanodeInfoProto_XceiverCount +} -func (m *DatanodeLocalInfoProto) GetSoftwareVersion() string { - if m != nil && m.SoftwareVersion != nil { - return *m.SoftwareVersion +func (x *DatanodeInfoProto) GetLocation() string { + if x != nil && x.Location != nil { + return *x.Location } return "" } -func (m *DatanodeLocalInfoProto) GetConfigVersion() string { - if m != nil && m.ConfigVersion != nil { - return *m.ConfigVersion - } - return "" -} +func (x *DatanodeInfoProto) GetNonDfsUsed() uint64 { + if x != nil && x.NonDfsUsed != nil { + return *x.NonDfsUsed + } + return 0 +} + +func (x *DatanodeInfoProto) GetAdminState() DatanodeInfoProto_AdminState { + if x != nil && x.AdminState != nil { + return *x.AdminState + } + return Default_DatanodeInfoProto_AdminState +} + +func (x *DatanodeInfoProto) GetCacheCapacity() uint64 { + if x != nil && x.CacheCapacity != nil { + return *x.CacheCapacity + } + return Default_DatanodeInfoProto_CacheCapacity +} + +func (x *DatanodeInfoProto) GetCacheUsed() uint64 { + if x != nil && x.CacheUsed != nil { + return *x.CacheUsed + } + return Default_DatanodeInfoProto_CacheUsed +} + +func (x *DatanodeInfoProto) GetLastUpdateMonotonic() uint64 { + if x != nil && x.LastUpdateMonotonic != nil { + return *x.LastUpdateMonotonic + } + return Default_DatanodeInfoProto_LastUpdateMonotonic +} + +func (x *DatanodeInfoProto) GetUpgradeDomain() string { + if x != nil && x.UpgradeDomain != nil { + return *x.UpgradeDomain + } + return "" +} + +func (x *DatanodeInfoProto) GetLastBlockReportTime() uint64 { + if x != nil && x.LastBlockReportTime != nil { + return *x.LastBlockReportTime + } + return Default_DatanodeInfoProto_LastBlockReportTime +} + +func (x *DatanodeInfoProto) GetLastBlockReportMonotonic() uint64 { + if x != nil && x.LastBlockReportMonotonic != nil { + return *x.LastBlockReportMonotonic + } + return Default_DatanodeInfoProto_LastBlockReportMonotonic +} + +func (x *DatanodeInfoProto) GetNumBlocks() uint32 { + if x != nil && x.NumBlocks != nil { + return *x.NumBlocks + } + return Default_DatanodeInfoProto_NumBlocks +} + +//* +// Represents a storage available on the datanode +type DatanodeStorageProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StorageUuid *string `protobuf:"bytes,1,req,name=storageUuid" json:"storageUuid,omitempty"` + State *DatanodeStorageProto_StorageState `protobuf:"varint,2,opt,name=state,enum=hadoop.hdfs.DatanodeStorageProto_StorageState,def=0" json:"state,omitempty"` + StorageType *StorageTypeProto `protobuf:"varint,3,opt,name=storageType,enum=hadoop.hdfs.StorageTypeProto,def=1" json:"storageType,omitempty"` +} + +// Default values for DatanodeStorageProto fields. +const ( + Default_DatanodeStorageProto_State = DatanodeStorageProto_NORMAL + Default_DatanodeStorageProto_StorageType = StorageTypeProto_DISK +) + +func (x *DatanodeStorageProto) Reset() { + *x = DatanodeStorageProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DatanodeStorageProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DatanodeStorageProto) ProtoMessage() {} + +func (x *DatanodeStorageProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DatanodeStorageProto.ProtoReflect.Descriptor instead. +func (*DatanodeStorageProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{7} +} + +func (x *DatanodeStorageProto) GetStorageUuid() string { + if x != nil && x.StorageUuid != nil { + return *x.StorageUuid + } + return "" +} + +func (x *DatanodeStorageProto) GetState() DatanodeStorageProto_StorageState { + if x != nil && x.State != nil { + return *x.State + } + return Default_DatanodeStorageProto_State +} + +func (x *DatanodeStorageProto) GetStorageType() StorageTypeProto { + if x != nil && x.StorageType != nil { + return *x.StorageType + } + return Default_DatanodeStorageProto_StorageType +} + +type StorageReportProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: Do not use. + StorageUuid *string `protobuf:"bytes,1,req,name=storageUuid" json:"storageUuid,omitempty"` + Failed *bool `protobuf:"varint,2,opt,name=failed,def=0" json:"failed,omitempty"` + Capacity *uint64 `protobuf:"varint,3,opt,name=capacity,def=0" json:"capacity,omitempty"` + DfsUsed *uint64 `protobuf:"varint,4,opt,name=dfsUsed,def=0" json:"dfsUsed,omitempty"` + Remaining *uint64 `protobuf:"varint,5,opt,name=remaining,def=0" json:"remaining,omitempty"` + BlockPoolUsed *uint64 `protobuf:"varint,6,opt,name=blockPoolUsed,def=0" json:"blockPoolUsed,omitempty"` + Storage *DatanodeStorageProto `protobuf:"bytes,7,opt,name=storage" json:"storage,omitempty"` // supersedes StorageUuid + NonDfsUsed *uint64 `protobuf:"varint,8,opt,name=nonDfsUsed" json:"nonDfsUsed,omitempty"` +} + +// Default values for StorageReportProto fields. +const ( + Default_StorageReportProto_Failed = bool(false) + Default_StorageReportProto_Capacity = uint64(0) + Default_StorageReportProto_DfsUsed = uint64(0) + Default_StorageReportProto_Remaining = uint64(0) + Default_StorageReportProto_BlockPoolUsed = uint64(0) +) + +func (x *StorageReportProto) Reset() { + *x = StorageReportProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageReportProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageReportProto) ProtoMessage() {} + +func (x *StorageReportProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StorageReportProto.ProtoReflect.Descriptor instead. +func (*StorageReportProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{8} +} + +// Deprecated: Do not use. +func (x *StorageReportProto) GetStorageUuid() string { + if x != nil && x.StorageUuid != nil { + return *x.StorageUuid + } + return "" +} + +func (x *StorageReportProto) GetFailed() bool { + if x != nil && x.Failed != nil { + return *x.Failed + } + return Default_StorageReportProto_Failed +} + +func (x *StorageReportProto) GetCapacity() uint64 { + if x != nil && x.Capacity != nil { + return *x.Capacity + } + return Default_StorageReportProto_Capacity +} + +func (x *StorageReportProto) GetDfsUsed() uint64 { + if x != nil && x.DfsUsed != nil { + return *x.DfsUsed + } + return Default_StorageReportProto_DfsUsed +} + +func (x *StorageReportProto) GetRemaining() uint64 { + if x != nil && x.Remaining != nil { + return *x.Remaining + } + return Default_StorageReportProto_Remaining +} + +func (x *StorageReportProto) GetBlockPoolUsed() uint64 { + if x != nil && x.BlockPoolUsed != nil { + return *x.BlockPoolUsed + } + return Default_StorageReportProto_BlockPoolUsed +} + +func (x *StorageReportProto) GetStorage() *DatanodeStorageProto { + if x != nil { + return x.Storage + } + return nil +} + +func (x *StorageReportProto) GetNonDfsUsed() uint64 { + if x != nil && x.NonDfsUsed != nil { + return *x.NonDfsUsed + } + return 0 +} + +//* +// Summary of a file or directory +type ContentSummaryProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Length *uint64 `protobuf:"varint,1,req,name=length" json:"length,omitempty"` + FileCount *uint64 `protobuf:"varint,2,req,name=fileCount" json:"fileCount,omitempty"` + DirectoryCount *uint64 `protobuf:"varint,3,req,name=directoryCount" json:"directoryCount,omitempty"` + Quota *uint64 `protobuf:"varint,4,req,name=quota" json:"quota,omitempty"` + SpaceConsumed *uint64 `protobuf:"varint,5,req,name=spaceConsumed" json:"spaceConsumed,omitempty"` + SpaceQuota *uint64 `protobuf:"varint,6,req,name=spaceQuota" json:"spaceQuota,omitempty"` + TypeQuotaInfos *StorageTypeQuotaInfosProto `protobuf:"bytes,7,opt,name=typeQuotaInfos" json:"typeQuotaInfos,omitempty"` + SnapshotLength *uint64 `protobuf:"varint,8,opt,name=snapshotLength" json:"snapshotLength,omitempty"` + SnapshotFileCount *uint64 `protobuf:"varint,9,opt,name=snapshotFileCount" json:"snapshotFileCount,omitempty"` + SnapshotDirectoryCount *uint64 `protobuf:"varint,10,opt,name=snapshotDirectoryCount" json:"snapshotDirectoryCount,omitempty"` + SnapshotSpaceConsumed *uint64 `protobuf:"varint,11,opt,name=snapshotSpaceConsumed" json:"snapshotSpaceConsumed,omitempty"` + ErasureCodingPolicy *string `protobuf:"bytes,12,opt,name=erasureCodingPolicy" json:"erasureCodingPolicy,omitempty"` +} + +func (x *ContentSummaryProto) Reset() { + *x = ContentSummaryProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContentSummaryProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContentSummaryProto) ProtoMessage() {} + +func (x *ContentSummaryProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContentSummaryProto.ProtoReflect.Descriptor instead. +func (*ContentSummaryProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{9} +} + +func (x *ContentSummaryProto) GetLength() uint64 { + if x != nil && x.Length != nil { + return *x.Length + } + return 0 +} + +func (x *ContentSummaryProto) GetFileCount() uint64 { + if x != nil && x.FileCount != nil { + return *x.FileCount + } + return 0 +} + +func (x *ContentSummaryProto) GetDirectoryCount() uint64 { + if x != nil && x.DirectoryCount != nil { + return *x.DirectoryCount + } + return 0 +} + +func (x *ContentSummaryProto) GetQuota() uint64 { + if x != nil && x.Quota != nil { + return *x.Quota + } + return 0 +} + +func (x *ContentSummaryProto) GetSpaceConsumed() uint64 { + if x != nil && x.SpaceConsumed != nil { + return *x.SpaceConsumed + } + return 0 +} + +func (x *ContentSummaryProto) GetSpaceQuota() uint64 { + if x != nil && x.SpaceQuota != nil { + return *x.SpaceQuota + } + return 0 +} + +func (x *ContentSummaryProto) GetTypeQuotaInfos() *StorageTypeQuotaInfosProto { + if x != nil { + return x.TypeQuotaInfos + } + return nil +} + +func (x *ContentSummaryProto) GetSnapshotLength() uint64 { + if x != nil && x.SnapshotLength != nil { + return *x.SnapshotLength + } + return 0 +} + +func (x *ContentSummaryProto) GetSnapshotFileCount() uint64 { + if x != nil && x.SnapshotFileCount != nil { + return *x.SnapshotFileCount + } + return 0 +} + +func (x *ContentSummaryProto) GetSnapshotDirectoryCount() uint64 { + if x != nil && x.SnapshotDirectoryCount != nil { + return *x.SnapshotDirectoryCount + } + return 0 +} + +func (x *ContentSummaryProto) GetSnapshotSpaceConsumed() uint64 { + if x != nil && x.SnapshotSpaceConsumed != nil { + return *x.SnapshotSpaceConsumed + } + return 0 +} + +func (x *ContentSummaryProto) GetErasureCodingPolicy() string { + if x != nil && x.ErasureCodingPolicy != nil { + return *x.ErasureCodingPolicy + } + return "" +} + +//* +// Summary of quota usage of a directory +type QuotaUsageProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FileAndDirectoryCount *uint64 `protobuf:"varint,1,req,name=fileAndDirectoryCount" json:"fileAndDirectoryCount,omitempty"` + Quota *uint64 `protobuf:"varint,2,req,name=quota" json:"quota,omitempty"` + SpaceConsumed *uint64 `protobuf:"varint,3,req,name=spaceConsumed" json:"spaceConsumed,omitempty"` + SpaceQuota *uint64 `protobuf:"varint,4,req,name=spaceQuota" json:"spaceQuota,omitempty"` + TypeQuotaInfos *StorageTypeQuotaInfosProto `protobuf:"bytes,5,opt,name=typeQuotaInfos" json:"typeQuotaInfos,omitempty"` +} + +func (x *QuotaUsageProto) Reset() { + *x = QuotaUsageProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuotaUsageProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuotaUsageProto) ProtoMessage() {} + +func (x *QuotaUsageProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuotaUsageProto.ProtoReflect.Descriptor instead. +func (*QuotaUsageProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{10} +} + +func (x *QuotaUsageProto) GetFileAndDirectoryCount() uint64 { + if x != nil && x.FileAndDirectoryCount != nil { + return *x.FileAndDirectoryCount + } + return 0 +} + +func (x *QuotaUsageProto) GetQuota() uint64 { + if x != nil && x.Quota != nil { + return *x.Quota + } + return 0 +} + +func (x *QuotaUsageProto) GetSpaceConsumed() uint64 { + if x != nil && x.SpaceConsumed != nil { + return *x.SpaceConsumed + } + return 0 +} + +func (x *QuotaUsageProto) GetSpaceQuota() uint64 { + if x != nil && x.SpaceQuota != nil { + return *x.SpaceQuota + } + return 0 +} + +func (x *QuotaUsageProto) GetTypeQuotaInfos() *StorageTypeQuotaInfosProto { + if x != nil { + return x.TypeQuotaInfos + } + return nil +} + +//* +// Storage type quota and usage information of a file or directory +type StorageTypeQuotaInfosProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeQuotaInfo []*StorageTypeQuotaInfoProto `protobuf:"bytes,1,rep,name=typeQuotaInfo" json:"typeQuotaInfo,omitempty"` +} + +func (x *StorageTypeQuotaInfosProto) Reset() { + *x = StorageTypeQuotaInfosProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageTypeQuotaInfosProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageTypeQuotaInfosProto) ProtoMessage() {} + +func (x *StorageTypeQuotaInfosProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StorageTypeQuotaInfosProto.ProtoReflect.Descriptor instead. +func (*StorageTypeQuotaInfosProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{11} +} + +func (x *StorageTypeQuotaInfosProto) GetTypeQuotaInfo() []*StorageTypeQuotaInfoProto { + if x != nil { + return x.TypeQuotaInfo + } + return nil +} + +type StorageTypeQuotaInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type *StorageTypeProto `protobuf:"varint,1,opt,name=type,enum=hadoop.hdfs.StorageTypeProto,def=1" json:"type,omitempty"` + Quota *uint64 `protobuf:"varint,2,req,name=quota" json:"quota,omitempty"` + Consumed *uint64 `protobuf:"varint,3,req,name=consumed" json:"consumed,omitempty"` +} + +// Default values for StorageTypeQuotaInfoProto fields. +const ( + Default_StorageTypeQuotaInfoProto_Type = StorageTypeProto_DISK +) + +func (x *StorageTypeQuotaInfoProto) Reset() { + *x = StorageTypeQuotaInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageTypeQuotaInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageTypeQuotaInfoProto) ProtoMessage() {} + +func (x *StorageTypeQuotaInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StorageTypeQuotaInfoProto.ProtoReflect.Descriptor instead. +func (*StorageTypeQuotaInfoProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{12} +} + +func (x *StorageTypeQuotaInfoProto) GetType() StorageTypeProto { + if x != nil && x.Type != nil { + return *x.Type + } + return Default_StorageTypeQuotaInfoProto_Type +} + +func (x *StorageTypeQuotaInfoProto) GetQuota() uint64 { + if x != nil && x.Quota != nil { + return *x.Quota + } + return 0 +} + +func (x *StorageTypeQuotaInfoProto) GetConsumed() uint64 { + if x != nil && x.Consumed != nil { + return *x.Consumed + } + return 0 +} + +//* +// Contains a list of paths corresponding to corrupt files and a cookie +// used for iterative calls to NameNode.listCorruptFileBlocks. +// +type CorruptFileBlocksProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Files []string `protobuf:"bytes,1,rep,name=files" json:"files,omitempty"` + Cookie *string `protobuf:"bytes,2,req,name=cookie" json:"cookie,omitempty"` +} + +func (x *CorruptFileBlocksProto) Reset() { + *x = CorruptFileBlocksProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CorruptFileBlocksProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CorruptFileBlocksProto) ProtoMessage() {} + +func (x *CorruptFileBlocksProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CorruptFileBlocksProto.ProtoReflect.Descriptor instead. +func (*CorruptFileBlocksProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{13} +} + +func (x *CorruptFileBlocksProto) GetFiles() []string { + if x != nil { + return x.Files + } + return nil +} + +func (x *CorruptFileBlocksProto) GetCookie() string { + if x != nil && x.Cookie != nil { + return *x.Cookie + } + return "" +} + +//* +// A list of storage types. +type StorageTypesProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StorageTypes []StorageTypeProto `protobuf:"varint,1,rep,name=storageTypes,enum=hadoop.hdfs.StorageTypeProto" json:"storageTypes,omitempty"` +} + +func (x *StorageTypesProto) Reset() { + *x = StorageTypesProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageTypesProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageTypesProto) ProtoMessage() {} + +func (x *StorageTypesProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StorageTypesProto.ProtoReflect.Descriptor instead. +func (*StorageTypesProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{14} +} + +func (x *StorageTypesProto) GetStorageTypes() []StorageTypeProto { + if x != nil { + return x.StorageTypes + } + return nil +} + +//* +// Block replica storage policy. +type BlockStoragePolicyProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PolicyId *uint32 `protobuf:"varint,1,req,name=policyId" json:"policyId,omitempty"` + Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` + // a list of storage types for storing the block replicas when creating a + // block. + CreationPolicy *StorageTypesProto `protobuf:"bytes,3,req,name=creationPolicy" json:"creationPolicy,omitempty"` + // A list of storage types for creation fallback storage. + CreationFallbackPolicy *StorageTypesProto `protobuf:"bytes,4,opt,name=creationFallbackPolicy" json:"creationFallbackPolicy,omitempty"` + ReplicationFallbackPolicy *StorageTypesProto `protobuf:"bytes,5,opt,name=replicationFallbackPolicy" json:"replicationFallbackPolicy,omitempty"` +} + +func (x *BlockStoragePolicyProto) Reset() { + *x = BlockStoragePolicyProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockStoragePolicyProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockStoragePolicyProto) ProtoMessage() {} + +func (x *BlockStoragePolicyProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockStoragePolicyProto.ProtoReflect.Descriptor instead. +func (*BlockStoragePolicyProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{15} +} + +func (x *BlockStoragePolicyProto) GetPolicyId() uint32 { + if x != nil && x.PolicyId != nil { + return *x.PolicyId + } + return 0 +} + +func (x *BlockStoragePolicyProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *BlockStoragePolicyProto) GetCreationPolicy() *StorageTypesProto { + if x != nil { + return x.CreationPolicy + } + return nil +} + +func (x *BlockStoragePolicyProto) GetCreationFallbackPolicy() *StorageTypesProto { + if x != nil { + return x.CreationFallbackPolicy + } + return nil +} + +func (x *BlockStoragePolicyProto) GetReplicationFallbackPolicy() *StorageTypesProto { + if x != nil { + return x.ReplicationFallbackPolicy + } + return nil +} + +//* +// A LocatedBlock gives information about a block and its location. +type LocatedBlockProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + B *ExtendedBlockProto `protobuf:"bytes,1,req,name=b" json:"b,omitempty"` + Offset *uint64 `protobuf:"varint,2,req,name=offset" json:"offset,omitempty"` // offset of first byte of block in the file + Locs []*DatanodeInfoProto `protobuf:"bytes,3,rep,name=locs" json:"locs,omitempty"` // Locations ordered by proximity to client ip + Corrupt *bool `protobuf:"varint,4,req,name=corrupt" json:"corrupt,omitempty"` // true if all replicas of a block are corrupt, else false + BlockToken *hadoop_common.TokenProto `protobuf:"bytes,5,req,name=blockToken" json:"blockToken,omitempty"` + IsCached []bool `protobuf:"varint,6,rep,packed,name=isCached" json:"isCached,omitempty"` // if a location in locs is cached + StorageTypes []StorageTypeProto `protobuf:"varint,7,rep,name=storageTypes,enum=hadoop.hdfs.StorageTypeProto" json:"storageTypes,omitempty"` + StorageIDs []string `protobuf:"bytes,8,rep,name=storageIDs" json:"storageIDs,omitempty"` + // striped block related fields + BlockIndices []byte `protobuf:"bytes,9,opt,name=blockIndices" json:"blockIndices,omitempty"` // used for striped block to indicate block index for each storage + BlockTokens []*hadoop_common.TokenProto `protobuf:"bytes,10,rep,name=blockTokens" json:"blockTokens,omitempty"` // each internal block has a block token +} + +func (x *LocatedBlockProto) Reset() { + *x = LocatedBlockProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocatedBlockProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocatedBlockProto) ProtoMessage() {} + +func (x *LocatedBlockProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LocatedBlockProto.ProtoReflect.Descriptor instead. +func (*LocatedBlockProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{16} +} + +func (x *LocatedBlockProto) GetB() *ExtendedBlockProto { + if x != nil { + return x.B + } + return nil +} + +func (x *LocatedBlockProto) GetOffset() uint64 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *LocatedBlockProto) GetLocs() []*DatanodeInfoProto { + if x != nil { + return x.Locs + } + return nil +} + +func (x *LocatedBlockProto) GetCorrupt() bool { + if x != nil && x.Corrupt != nil { + return *x.Corrupt + } + return false +} + +func (x *LocatedBlockProto) GetBlockToken() *hadoop_common.TokenProto { + if x != nil { + return x.BlockToken + } + return nil +} + +func (x *LocatedBlockProto) GetIsCached() []bool { + if x != nil { + return x.IsCached + } + return nil +} + +func (x *LocatedBlockProto) GetStorageTypes() []StorageTypeProto { + if x != nil { + return x.StorageTypes + } + return nil +} + +func (x *LocatedBlockProto) GetStorageIDs() []string { + if x != nil { + return x.StorageIDs + } + return nil +} + +func (x *LocatedBlockProto) GetBlockIndices() []byte { + if x != nil { + return x.BlockIndices + } + return nil +} + +func (x *LocatedBlockProto) GetBlockTokens() []*hadoop_common.TokenProto { + if x != nil { + return x.BlockTokens + } + return nil +} + +type BatchedListingKeyProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Checksum []byte `protobuf:"bytes,1,req,name=checksum" json:"checksum,omitempty"` + PathIndex *uint32 `protobuf:"varint,2,req,name=pathIndex" json:"pathIndex,omitempty"` + StartAfter []byte `protobuf:"bytes,3,req,name=startAfter" json:"startAfter,omitempty"` +} + +func (x *BatchedListingKeyProto) Reset() { + *x = BatchedListingKeyProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchedListingKeyProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchedListingKeyProto) ProtoMessage() {} + +func (x *BatchedListingKeyProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchedListingKeyProto.ProtoReflect.Descriptor instead. +func (*BatchedListingKeyProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{17} +} + +func (x *BatchedListingKeyProto) GetChecksum() []byte { + if x != nil { + return x.Checksum + } + return nil +} + +func (x *BatchedListingKeyProto) GetPathIndex() uint32 { + if x != nil && x.PathIndex != nil { + return *x.PathIndex + } + return 0 +} + +func (x *BatchedListingKeyProto) GetStartAfter() []byte { + if x != nil { + return x.StartAfter + } + return nil +} + +type DataEncryptionKeyProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyId *uint32 `protobuf:"varint,1,req,name=keyId" json:"keyId,omitempty"` + BlockPoolId *string `protobuf:"bytes,2,req,name=blockPoolId" json:"blockPoolId,omitempty"` + Nonce []byte `protobuf:"bytes,3,req,name=nonce" json:"nonce,omitempty"` + EncryptionKey []byte `protobuf:"bytes,4,req,name=encryptionKey" json:"encryptionKey,omitempty"` + ExpiryDate *uint64 `protobuf:"varint,5,req,name=expiryDate" json:"expiryDate,omitempty"` + EncryptionAlgorithm *string `protobuf:"bytes,6,opt,name=encryptionAlgorithm" json:"encryptionAlgorithm,omitempty"` +} + +func (x *DataEncryptionKeyProto) Reset() { + *x = DataEncryptionKeyProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataEncryptionKeyProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataEncryptionKeyProto) ProtoMessage() {} + +func (x *DataEncryptionKeyProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataEncryptionKeyProto.ProtoReflect.Descriptor instead. +func (*DataEncryptionKeyProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{18} +} + +func (x *DataEncryptionKeyProto) GetKeyId() uint32 { + if x != nil && x.KeyId != nil { + return *x.KeyId + } + return 0 +} + +func (x *DataEncryptionKeyProto) GetBlockPoolId() string { + if x != nil && x.BlockPoolId != nil { + return *x.BlockPoolId + } + return "" +} + +func (x *DataEncryptionKeyProto) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *DataEncryptionKeyProto) GetEncryptionKey() []byte { + if x != nil { + return x.EncryptionKey + } + return nil +} + +func (x *DataEncryptionKeyProto) GetExpiryDate() uint64 { + if x != nil && x.ExpiryDate != nil { + return *x.ExpiryDate + } + return 0 +} + +func (x *DataEncryptionKeyProto) GetEncryptionAlgorithm() string { + if x != nil && x.EncryptionAlgorithm != nil { + return *x.EncryptionAlgorithm + } + return "" +} + +//* +// Encryption information for a file. +type FileEncryptionInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Suite *CipherSuiteProto `protobuf:"varint,1,req,name=suite,enum=hadoop.hdfs.CipherSuiteProto" json:"suite,omitempty"` + CryptoProtocolVersion *CryptoProtocolVersionProto `protobuf:"varint,2,req,name=cryptoProtocolVersion,enum=hadoop.hdfs.CryptoProtocolVersionProto" json:"cryptoProtocolVersion,omitempty"` + Key []byte `protobuf:"bytes,3,req,name=key" json:"key,omitempty"` + Iv []byte `protobuf:"bytes,4,req,name=iv" json:"iv,omitempty"` + KeyName *string `protobuf:"bytes,5,req,name=keyName" json:"keyName,omitempty"` + EzKeyVersionName *string `protobuf:"bytes,6,req,name=ezKeyVersionName" json:"ezKeyVersionName,omitempty"` +} + +func (x *FileEncryptionInfoProto) Reset() { + *x = FileEncryptionInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileEncryptionInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileEncryptionInfoProto) ProtoMessage() {} + +func (x *FileEncryptionInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileEncryptionInfoProto.ProtoReflect.Descriptor instead. +func (*FileEncryptionInfoProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{19} +} + +func (x *FileEncryptionInfoProto) GetSuite() CipherSuiteProto { + if x != nil && x.Suite != nil { + return *x.Suite + } + return CipherSuiteProto_UNKNOWN +} + +func (x *FileEncryptionInfoProto) GetCryptoProtocolVersion() CryptoProtocolVersionProto { + if x != nil && x.CryptoProtocolVersion != nil { + return *x.CryptoProtocolVersion + } + return CryptoProtocolVersionProto_UNKNOWN_PROTOCOL_VERSION +} + +func (x *FileEncryptionInfoProto) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *FileEncryptionInfoProto) GetIv() []byte { + if x != nil { + return x.Iv + } + return nil +} + +func (x *FileEncryptionInfoProto) GetKeyName() string { + if x != nil && x.KeyName != nil { + return *x.KeyName + } + return "" +} + +func (x *FileEncryptionInfoProto) GetEzKeyVersionName() string { + if x != nil && x.EzKeyVersionName != nil { + return *x.EzKeyVersionName + } + return "" +} + +//* +// Encryption information for an individual +// file within an encryption zone +type PerFileEncryptionInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key []byte `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` + Iv []byte `protobuf:"bytes,2,req,name=iv" json:"iv,omitempty"` + EzKeyVersionName *string `protobuf:"bytes,3,req,name=ezKeyVersionName" json:"ezKeyVersionName,omitempty"` +} + +func (x *PerFileEncryptionInfoProto) Reset() { + *x = PerFileEncryptionInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PerFileEncryptionInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PerFileEncryptionInfoProto) ProtoMessage() {} + +func (x *PerFileEncryptionInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PerFileEncryptionInfoProto.ProtoReflect.Descriptor instead. +func (*PerFileEncryptionInfoProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{20} +} + +func (x *PerFileEncryptionInfoProto) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *PerFileEncryptionInfoProto) GetIv() []byte { + if x != nil { + return x.Iv + } + return nil +} + +func (x *PerFileEncryptionInfoProto) GetEzKeyVersionName() string { + if x != nil && x.EzKeyVersionName != nil { + return *x.EzKeyVersionName + } + return "" +} + +//* +// Encryption information for an encryption +// zone +type ZoneEncryptionInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Suite *CipherSuiteProto `protobuf:"varint,1,req,name=suite,enum=hadoop.hdfs.CipherSuiteProto" json:"suite,omitempty"` + CryptoProtocolVersion *CryptoProtocolVersionProto `protobuf:"varint,2,req,name=cryptoProtocolVersion,enum=hadoop.hdfs.CryptoProtocolVersionProto" json:"cryptoProtocolVersion,omitempty"` + KeyName *string `protobuf:"bytes,3,req,name=keyName" json:"keyName,omitempty"` + ReencryptionProto *ReencryptionInfoProto `protobuf:"bytes,4,opt,name=reencryptionProto" json:"reencryptionProto,omitempty"` +} + +func (x *ZoneEncryptionInfoProto) Reset() { + *x = ZoneEncryptionInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ZoneEncryptionInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ZoneEncryptionInfoProto) ProtoMessage() {} + +func (x *ZoneEncryptionInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ZoneEncryptionInfoProto.ProtoReflect.Descriptor instead. +func (*ZoneEncryptionInfoProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{21} +} + +func (x *ZoneEncryptionInfoProto) GetSuite() CipherSuiteProto { + if x != nil && x.Suite != nil { + return *x.Suite + } + return CipherSuiteProto_UNKNOWN +} + +func (x *ZoneEncryptionInfoProto) GetCryptoProtocolVersion() CryptoProtocolVersionProto { + if x != nil && x.CryptoProtocolVersion != nil { + return *x.CryptoProtocolVersion + } + return CryptoProtocolVersionProto_UNKNOWN_PROTOCOL_VERSION +} + +func (x *ZoneEncryptionInfoProto) GetKeyName() string { + if x != nil && x.KeyName != nil { + return *x.KeyName + } + return "" +} + +func (x *ZoneEncryptionInfoProto) GetReencryptionProto() *ReencryptionInfoProto { + if x != nil { + return x.ReencryptionProto + } + return nil +} + +//* +// Re-encryption information for an encryption zone +type ReencryptionInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EzKeyVersionName *string `protobuf:"bytes,1,req,name=ezKeyVersionName" json:"ezKeyVersionName,omitempty"` + SubmissionTime *uint64 `protobuf:"varint,2,req,name=submissionTime" json:"submissionTime,omitempty"` + Canceled *bool `protobuf:"varint,3,req,name=canceled" json:"canceled,omitempty"` + NumReencrypted *int64 `protobuf:"varint,4,req,name=numReencrypted" json:"numReencrypted,omitempty"` + NumFailures *int64 `protobuf:"varint,5,req,name=numFailures" json:"numFailures,omitempty"` + CompletionTime *uint64 `protobuf:"varint,6,opt,name=completionTime" json:"completionTime,omitempty"` + LastFile *string `protobuf:"bytes,7,opt,name=lastFile" json:"lastFile,omitempty"` +} + +func (x *ReencryptionInfoProto) Reset() { + *x = ReencryptionInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReencryptionInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReencryptionInfoProto) ProtoMessage() {} + +func (x *ReencryptionInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReencryptionInfoProto.ProtoReflect.Descriptor instead. +func (*ReencryptionInfoProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{22} +} + +func (x *ReencryptionInfoProto) GetEzKeyVersionName() string { + if x != nil && x.EzKeyVersionName != nil { + return *x.EzKeyVersionName + } + return "" +} + +func (x *ReencryptionInfoProto) GetSubmissionTime() uint64 { + if x != nil && x.SubmissionTime != nil { + return *x.SubmissionTime + } + return 0 +} + +func (x *ReencryptionInfoProto) GetCanceled() bool { + if x != nil && x.Canceled != nil { + return *x.Canceled + } + return false +} + +func (x *ReencryptionInfoProto) GetNumReencrypted() int64 { + if x != nil && x.NumReencrypted != nil { + return *x.NumReencrypted + } + return 0 +} + +func (x *ReencryptionInfoProto) GetNumFailures() int64 { + if x != nil && x.NumFailures != nil { + return *x.NumFailures + } + return 0 +} + +func (x *ReencryptionInfoProto) GetCompletionTime() uint64 { + if x != nil && x.CompletionTime != nil { + return *x.CompletionTime + } + return 0 +} + +func (x *ReencryptionInfoProto) GetLastFile() string { + if x != nil && x.LastFile != nil { + return *x.LastFile + } + return "" +} + +//* +// Cipher option +type CipherOptionProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Suite *CipherSuiteProto `protobuf:"varint,1,req,name=suite,enum=hadoop.hdfs.CipherSuiteProto" json:"suite,omitempty"` + InKey []byte `protobuf:"bytes,2,opt,name=inKey" json:"inKey,omitempty"` + InIv []byte `protobuf:"bytes,3,opt,name=inIv" json:"inIv,omitempty"` + OutKey []byte `protobuf:"bytes,4,opt,name=outKey" json:"outKey,omitempty"` + OutIv []byte `protobuf:"bytes,5,opt,name=outIv" json:"outIv,omitempty"` +} + +func (x *CipherOptionProto) Reset() { + *x = CipherOptionProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CipherOptionProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CipherOptionProto) ProtoMessage() {} + +func (x *CipherOptionProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CipherOptionProto.ProtoReflect.Descriptor instead. +func (*CipherOptionProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{23} +} + +func (x *CipherOptionProto) GetSuite() CipherSuiteProto { + if x != nil && x.Suite != nil { + return *x.Suite + } + return CipherSuiteProto_UNKNOWN +} + +func (x *CipherOptionProto) GetInKey() []byte { + if x != nil { + return x.InKey + } + return nil +} + +func (x *CipherOptionProto) GetInIv() []byte { + if x != nil { + return x.InIv + } + return nil +} + +func (x *CipherOptionProto) GetOutKey() []byte { + if x != nil { + return x.OutKey + } + return nil +} + +func (x *CipherOptionProto) GetOutIv() []byte { + if x != nil { + return x.OutIv + } + return nil +} + +//* +// A set of file blocks and their locations. +type LocatedBlocksProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FileLength *uint64 `protobuf:"varint,1,req,name=fileLength" json:"fileLength,omitempty"` + Blocks []*LocatedBlockProto `protobuf:"bytes,2,rep,name=blocks" json:"blocks,omitempty"` + UnderConstruction *bool `protobuf:"varint,3,req,name=underConstruction" json:"underConstruction,omitempty"` + LastBlock *LocatedBlockProto `protobuf:"bytes,4,opt,name=lastBlock" json:"lastBlock,omitempty"` + IsLastBlockComplete *bool `protobuf:"varint,5,req,name=isLastBlockComplete" json:"isLastBlockComplete,omitempty"` + FileEncryptionInfo *FileEncryptionInfoProto `protobuf:"bytes,6,opt,name=fileEncryptionInfo" json:"fileEncryptionInfo,omitempty"` + // Optional field for erasure coding + EcPolicy *ErasureCodingPolicyProto `protobuf:"bytes,7,opt,name=ecPolicy" json:"ecPolicy,omitempty"` +} + +func (x *LocatedBlocksProto) Reset() { + *x = LocatedBlocksProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocatedBlocksProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocatedBlocksProto) ProtoMessage() {} + +func (x *LocatedBlocksProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LocatedBlocksProto.ProtoReflect.Descriptor instead. +func (*LocatedBlocksProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{24} +} + +func (x *LocatedBlocksProto) GetFileLength() uint64 { + if x != nil && x.FileLength != nil { + return *x.FileLength + } + return 0 +} + +func (x *LocatedBlocksProto) GetBlocks() []*LocatedBlockProto { + if x != nil { + return x.Blocks + } + return nil +} + +func (x *LocatedBlocksProto) GetUnderConstruction() bool { + if x != nil && x.UnderConstruction != nil { + return *x.UnderConstruction + } + return false +} + +func (x *LocatedBlocksProto) GetLastBlock() *LocatedBlockProto { + if x != nil { + return x.LastBlock + } + return nil +} + +func (x *LocatedBlocksProto) GetIsLastBlockComplete() bool { + if x != nil && x.IsLastBlockComplete != nil { + return *x.IsLastBlockComplete + } + return false +} + +func (x *LocatedBlocksProto) GetFileEncryptionInfo() *FileEncryptionInfoProto { + if x != nil { + return x.FileEncryptionInfo + } + return nil +} + +func (x *LocatedBlocksProto) GetEcPolicy() *ErasureCodingPolicyProto { + if x != nil { + return x.EcPolicy + } + return nil +} + +//* +// ECSchema options entry +type ECSchemaOptionEntryProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` + Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` +} + +func (x *ECSchemaOptionEntryProto) Reset() { + *x = ECSchemaOptionEntryProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ECSchemaOptionEntryProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ECSchemaOptionEntryProto) ProtoMessage() {} + +func (x *ECSchemaOptionEntryProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ECSchemaOptionEntryProto.ProtoReflect.Descriptor instead. +func (*ECSchemaOptionEntryProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{25} +} + +func (x *ECSchemaOptionEntryProto) GetKey() string { + if x != nil && x.Key != nil { + return *x.Key + } + return "" +} + +func (x *ECSchemaOptionEntryProto) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value + } + return "" +} + +//* +// ECSchema for erasurecoding +type ECSchemaProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CodecName *string `protobuf:"bytes,1,req,name=codecName" json:"codecName,omitempty"` + DataUnits *uint32 `protobuf:"varint,2,req,name=dataUnits" json:"dataUnits,omitempty"` + ParityUnits *uint32 `protobuf:"varint,3,req,name=parityUnits" json:"parityUnits,omitempty"` + Options []*ECSchemaOptionEntryProto `protobuf:"bytes,4,rep,name=options" json:"options,omitempty"` +} + +func (x *ECSchemaProto) Reset() { + *x = ECSchemaProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ECSchemaProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ECSchemaProto) ProtoMessage() {} + +func (x *ECSchemaProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ECSchemaProto.ProtoReflect.Descriptor instead. +func (*ECSchemaProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{26} +} + +func (x *ECSchemaProto) GetCodecName() string { + if x != nil && x.CodecName != nil { + return *x.CodecName + } + return "" +} + +func (x *ECSchemaProto) GetDataUnits() uint32 { + if x != nil && x.DataUnits != nil { + return *x.DataUnits + } + return 0 +} + +func (x *ECSchemaProto) GetParityUnits() uint32 { + if x != nil && x.ParityUnits != nil { + return *x.ParityUnits + } + return 0 +} + +func (x *ECSchemaProto) GetOptions() []*ECSchemaOptionEntryProto { + if x != nil { + return x.Options + } + return nil +} + +type ErasureCodingPolicyProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Schema *ECSchemaProto `protobuf:"bytes,2,opt,name=schema" json:"schema,omitempty"` + CellSize *uint32 `protobuf:"varint,3,opt,name=cellSize" json:"cellSize,omitempty"` + Id *uint32 `protobuf:"varint,4,req,name=id" json:"id,omitempty"` // Actually a byte - only 8 bits used + State *ErasureCodingPolicyState `protobuf:"varint,5,opt,name=state,enum=hadoop.hdfs.ErasureCodingPolicyState,def=2" json:"state,omitempty"` +} + +// Default values for ErasureCodingPolicyProto fields. +const ( + Default_ErasureCodingPolicyProto_State = ErasureCodingPolicyState_ENABLED +) + +func (x *ErasureCodingPolicyProto) Reset() { + *x = ErasureCodingPolicyProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErasureCodingPolicyProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErasureCodingPolicyProto) ProtoMessage() {} + +func (x *ErasureCodingPolicyProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErasureCodingPolicyProto.ProtoReflect.Descriptor instead. +func (*ErasureCodingPolicyProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{27} +} + +func (x *ErasureCodingPolicyProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *ErasureCodingPolicyProto) GetSchema() *ECSchemaProto { + if x != nil { + return x.Schema + } + return nil +} + +func (x *ErasureCodingPolicyProto) GetCellSize() uint32 { + if x != nil && x.CellSize != nil { + return *x.CellSize + } + return 0 +} + +func (x *ErasureCodingPolicyProto) GetId() uint32 { + if x != nil && x.Id != nil { + return *x.Id + } + return 0 +} + +func (x *ErasureCodingPolicyProto) GetState() ErasureCodingPolicyState { + if x != nil && x.State != nil { + return *x.State + } + return Default_ErasureCodingPolicyProto_State +} + +type AddErasureCodingPolicyResponseProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Policy *ErasureCodingPolicyProto `protobuf:"bytes,1,req,name=policy" json:"policy,omitempty"` + Succeed *bool `protobuf:"varint,2,req,name=succeed" json:"succeed,omitempty"` + ErrorMsg *string `protobuf:"bytes,3,opt,name=errorMsg" json:"errorMsg,omitempty"` +} + +func (x *AddErasureCodingPolicyResponseProto) Reset() { + *x = AddErasureCodingPolicyResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddErasureCodingPolicyResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddErasureCodingPolicyResponseProto) ProtoMessage() {} + +func (x *AddErasureCodingPolicyResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddErasureCodingPolicyResponseProto.ProtoReflect.Descriptor instead. +func (*AddErasureCodingPolicyResponseProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{28} +} + +func (x *AddErasureCodingPolicyResponseProto) GetPolicy() *ErasureCodingPolicyProto { + if x != nil { + return x.Policy + } + return nil +} + +func (x *AddErasureCodingPolicyResponseProto) GetSucceed() bool { + if x != nil && x.Succeed != nil { + return *x.Succeed + } + return false +} + +func (x *AddErasureCodingPolicyResponseProto) GetErrorMsg() string { + if x != nil && x.ErrorMsg != nil { + return *x.ErrorMsg + } + return "" +} + +type ECTopologyVerifierResultProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResultMessage *string `protobuf:"bytes,1,req,name=resultMessage" json:"resultMessage,omitempty"` + IsSupported *bool `protobuf:"varint,2,req,name=isSupported" json:"isSupported,omitempty"` +} + +func (x *ECTopologyVerifierResultProto) Reset() { + *x = ECTopologyVerifierResultProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ECTopologyVerifierResultProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ECTopologyVerifierResultProto) ProtoMessage() {} + +func (x *ECTopologyVerifierResultProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ECTopologyVerifierResultProto.ProtoReflect.Descriptor instead. +func (*ECTopologyVerifierResultProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{29} +} + +func (x *ECTopologyVerifierResultProto) GetResultMessage() string { + if x != nil && x.ResultMessage != nil { + return *x.ResultMessage + } + return "" +} + +func (x *ECTopologyVerifierResultProto) GetIsSupported() bool { + if x != nil && x.IsSupported != nil { + return *x.IsSupported + } + return false +} + +//* +// Placeholder type for consistent HDFS operations. +type HdfsPathHandleProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InodeId *uint64 `protobuf:"varint,1,opt,name=inodeId" json:"inodeId,omitempty"` + Mtime *uint64 `protobuf:"varint,2,opt,name=mtime" json:"mtime,omitempty"` + Path *string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` +} + +func (x *HdfsPathHandleProto) Reset() { + *x = HdfsPathHandleProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HdfsPathHandleProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HdfsPathHandleProto) ProtoMessage() {} + +func (x *HdfsPathHandleProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HdfsPathHandleProto.ProtoReflect.Descriptor instead. +func (*HdfsPathHandleProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{30} +} + +func (x *HdfsPathHandleProto) GetInodeId() uint64 { + if x != nil && x.InodeId != nil { + return *x.InodeId + } + return 0 +} + +func (x *HdfsPathHandleProto) GetMtime() uint64 { + if x != nil && x.Mtime != nil { + return *x.Mtime + } + return 0 +} + +func (x *HdfsPathHandleProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path + } + return "" +} + +//* +// Status of a file, directory or symlink +// Optionally includes a file's block locations if requested by client on the rpc call. +type HdfsFileStatusProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FileType *HdfsFileStatusProto_FileType `protobuf:"varint,1,req,name=fileType,enum=hadoop.hdfs.HdfsFileStatusProto_FileType" json:"fileType,omitempty"` + Path []byte `protobuf:"bytes,2,req,name=path" json:"path,omitempty"` // local name of inode encoded java UTF8 + Length *uint64 `protobuf:"varint,3,req,name=length" json:"length,omitempty"` + Permission *FsPermissionProto `protobuf:"bytes,4,req,name=permission" json:"permission,omitempty"` + Owner *string `protobuf:"bytes,5,req,name=owner" json:"owner,omitempty"` + Group *string `protobuf:"bytes,6,req,name=group" json:"group,omitempty"` + ModificationTime *uint64 `protobuf:"varint,7,req,name=modification_time,json=modificationTime" json:"modification_time,omitempty"` + AccessTime *uint64 `protobuf:"varint,8,req,name=access_time,json=accessTime" json:"access_time,omitempty"` + // Optional fields for symlink + Symlink []byte `protobuf:"bytes,9,opt,name=symlink" json:"symlink,omitempty"` // if symlink, target encoded java UTF8 + // Optional fields for file + BlockReplication *uint32 `protobuf:"varint,10,opt,name=block_replication,json=blockReplication,def=0" json:"block_replication,omitempty"` // only 16bits used + Blocksize *uint64 `protobuf:"varint,11,opt,name=blocksize,def=0" json:"blocksize,omitempty"` + Locations *LocatedBlocksProto `protobuf:"bytes,12,opt,name=locations" json:"locations,omitempty"` // suppled only if asked by client + // Optional field for fileId + FileId *uint64 `protobuf:"varint,13,opt,name=fileId,def=0" json:"fileId,omitempty"` // default as an invalid id + ChildrenNum *int32 `protobuf:"varint,14,opt,name=childrenNum,def=-1" json:"childrenNum,omitempty"` + // Optional field for file encryption + FileEncryptionInfo *FileEncryptionInfoProto `protobuf:"bytes,15,opt,name=fileEncryptionInfo" json:"fileEncryptionInfo,omitempty"` + StoragePolicy *uint32 `protobuf:"varint,16,opt,name=storagePolicy,def=0" json:"storagePolicy,omitempty"` // block storage policy id + // Optional field for erasure coding + EcPolicy *ErasureCodingPolicyProto `protobuf:"bytes,17,opt,name=ecPolicy" json:"ecPolicy,omitempty"` + // Set of flags + Flags *uint32 `protobuf:"varint,18,opt,name=flags,def=0" json:"flags,omitempty"` +} + +// Default values for HdfsFileStatusProto fields. +const ( + Default_HdfsFileStatusProto_BlockReplication = uint32(0) + Default_HdfsFileStatusProto_Blocksize = uint64(0) + Default_HdfsFileStatusProto_FileId = uint64(0) + Default_HdfsFileStatusProto_ChildrenNum = int32(-1) + Default_HdfsFileStatusProto_StoragePolicy = uint32(0) + Default_HdfsFileStatusProto_Flags = uint32(0) +) -func (m *DatanodeLocalInfoProto) GetUptime() uint64 { - if m != nil && m.Uptime != nil { - return *m.Uptime +func (x *HdfsFileStatusProto) Reset() { + *x = HdfsFileStatusProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -// * -// DatanodeInfo array -type DatanodeInfosProto struct { - Datanodes []*DatanodeInfoProto `protobuf:"bytes,1,rep,name=datanodes" json:"datanodes,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *HdfsFileStatusProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DatanodeInfosProto) Reset() { *m = DatanodeInfosProto{} } -func (m *DatanodeInfosProto) String() string { return proto.CompactTextString(m) } -func (*DatanodeInfosProto) ProtoMessage() {} -func (*DatanodeInfosProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{3} } +func (*HdfsFileStatusProto) ProtoMessage() {} -func (m *DatanodeInfosProto) GetDatanodes() []*DatanodeInfoProto { - if m != nil { - return m.Datanodes +func (x *HdfsFileStatusProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -// * -// The status of a Datanode -type DatanodeInfoProto struct { - Id *DatanodeIDProto `protobuf:"bytes,1,req,name=id" json:"id,omitempty"` - Capacity *uint64 `protobuf:"varint,2,opt,name=capacity,def=0" json:"capacity,omitempty"` - DfsUsed *uint64 `protobuf:"varint,3,opt,name=dfsUsed,def=0" json:"dfsUsed,omitempty"` - Remaining *uint64 `protobuf:"varint,4,opt,name=remaining,def=0" json:"remaining,omitempty"` - BlockPoolUsed *uint64 `protobuf:"varint,5,opt,name=blockPoolUsed,def=0" json:"blockPoolUsed,omitempty"` - LastUpdate *uint64 `protobuf:"varint,6,opt,name=lastUpdate,def=0" json:"lastUpdate,omitempty"` - XceiverCount *uint32 `protobuf:"varint,7,opt,name=xceiverCount,def=0" json:"xceiverCount,omitempty"` - Location *string `protobuf:"bytes,8,opt,name=location" json:"location,omitempty"` - AdminState *DatanodeInfoProto_AdminState `protobuf:"varint,10,opt,name=adminState,enum=hadoop.hdfs.DatanodeInfoProto_AdminState,def=0" json:"adminState,omitempty"` - CacheCapacity *uint64 `protobuf:"varint,11,opt,name=cacheCapacity,def=0" json:"cacheCapacity,omitempty"` - CacheUsed *uint64 `protobuf:"varint,12,opt,name=cacheUsed,def=0" json:"cacheUsed,omitempty"` - LastUpdateMonotonic *uint64 `protobuf:"varint,13,opt,name=lastUpdateMonotonic,def=0" json:"lastUpdateMonotonic,omitempty"` - UpgradeDomain *string `protobuf:"bytes,14,opt,name=upgradeDomain" json:"upgradeDomain,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DatanodeInfoProto) Reset() { *m = DatanodeInfoProto{} } -func (m *DatanodeInfoProto) String() string { return proto.CompactTextString(m) } -func (*DatanodeInfoProto) ProtoMessage() {} -func (*DatanodeInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{4} } - -const Default_DatanodeInfoProto_Capacity uint64 = 0 -const Default_DatanodeInfoProto_DfsUsed uint64 = 0 -const Default_DatanodeInfoProto_Remaining uint64 = 0 -const Default_DatanodeInfoProto_BlockPoolUsed uint64 = 0 -const Default_DatanodeInfoProto_LastUpdate uint64 = 0 -const Default_DatanodeInfoProto_XceiverCount uint32 = 0 -const Default_DatanodeInfoProto_AdminState DatanodeInfoProto_AdminState = DatanodeInfoProto_NORMAL -const Default_DatanodeInfoProto_CacheCapacity uint64 = 0 -const Default_DatanodeInfoProto_CacheUsed uint64 = 0 -const Default_DatanodeInfoProto_LastUpdateMonotonic uint64 = 0 - -func (m *DatanodeInfoProto) GetId() *DatanodeIDProto { - if m != nil { - return m.Id - } - return nil -} - -func (m *DatanodeInfoProto) GetCapacity() uint64 { - if m != nil && m.Capacity != nil { - return *m.Capacity - } - return Default_DatanodeInfoProto_Capacity +// Deprecated: Use HdfsFileStatusProto.ProtoReflect.Descriptor instead. +func (*HdfsFileStatusProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{31} } -func (m *DatanodeInfoProto) GetDfsUsed() uint64 { - if m != nil && m.DfsUsed != nil { - return *m.DfsUsed +func (x *HdfsFileStatusProto) GetFileType() HdfsFileStatusProto_FileType { + if x != nil && x.FileType != nil { + return *x.FileType } - return Default_DatanodeInfoProto_DfsUsed + return HdfsFileStatusProto_IS_DIR } -func (m *DatanodeInfoProto) GetRemaining() uint64 { - if m != nil && m.Remaining != nil { - return *m.Remaining +func (x *HdfsFileStatusProto) GetPath() []byte { + if x != nil { + return x.Path } - return Default_DatanodeInfoProto_Remaining + return nil } -func (m *DatanodeInfoProto) GetBlockPoolUsed() uint64 { - if m != nil && m.BlockPoolUsed != nil { - return *m.BlockPoolUsed +func (x *HdfsFileStatusProto) GetLength() uint64 { + if x != nil && x.Length != nil { + return *x.Length } - return Default_DatanodeInfoProto_BlockPoolUsed + return 0 } -func (m *DatanodeInfoProto) GetLastUpdate() uint64 { - if m != nil && m.LastUpdate != nil { - return *m.LastUpdate +func (x *HdfsFileStatusProto) GetPermission() *FsPermissionProto { + if x != nil { + return x.Permission } - return Default_DatanodeInfoProto_LastUpdate + return nil } -func (m *DatanodeInfoProto) GetXceiverCount() uint32 { - if m != nil && m.XceiverCount != nil { - return *m.XceiverCount +func (x *HdfsFileStatusProto) GetOwner() string { + if x != nil && x.Owner != nil { + return *x.Owner } - return Default_DatanodeInfoProto_XceiverCount + return "" } -func (m *DatanodeInfoProto) GetLocation() string { - if m != nil && m.Location != nil { - return *m.Location +func (x *HdfsFileStatusProto) GetGroup() string { + if x != nil && x.Group != nil { + return *x.Group } return "" } -func (m *DatanodeInfoProto) GetAdminState() DatanodeInfoProto_AdminState { - if m != nil && m.AdminState != nil { - return *m.AdminState +func (x *HdfsFileStatusProto) GetModificationTime() uint64 { + if x != nil && x.ModificationTime != nil { + return *x.ModificationTime } - return Default_DatanodeInfoProto_AdminState + return 0 } -func (m *DatanodeInfoProto) GetCacheCapacity() uint64 { - if m != nil && m.CacheCapacity != nil { - return *m.CacheCapacity +func (x *HdfsFileStatusProto) GetAccessTime() uint64 { + if x != nil && x.AccessTime != nil { + return *x.AccessTime } - return Default_DatanodeInfoProto_CacheCapacity + return 0 } -func (m *DatanodeInfoProto) GetCacheUsed() uint64 { - if m != nil && m.CacheUsed != nil { - return *m.CacheUsed +func (x *HdfsFileStatusProto) GetSymlink() []byte { + if x != nil { + return x.Symlink } - return Default_DatanodeInfoProto_CacheUsed + return nil } -func (m *DatanodeInfoProto) GetLastUpdateMonotonic() uint64 { - if m != nil && m.LastUpdateMonotonic != nil { - return *m.LastUpdateMonotonic +func (x *HdfsFileStatusProto) GetBlockReplication() uint32 { + if x != nil && x.BlockReplication != nil { + return *x.BlockReplication } - return Default_DatanodeInfoProto_LastUpdateMonotonic + return Default_HdfsFileStatusProto_BlockReplication } -func (m *DatanodeInfoProto) GetUpgradeDomain() string { - if m != nil && m.UpgradeDomain != nil { - return *m.UpgradeDomain +func (x *HdfsFileStatusProto) GetBlocksize() uint64 { + if x != nil && x.Blocksize != nil { + return *x.Blocksize } - return "" -} - -// * -// Represents a storage available on the datanode -type DatanodeStorageProto struct { - StorageUuid *string `protobuf:"bytes,1,req,name=storageUuid" json:"storageUuid,omitempty"` - State *DatanodeStorageProto_StorageState `protobuf:"varint,2,opt,name=state,enum=hadoop.hdfs.DatanodeStorageProto_StorageState,def=0" json:"state,omitempty"` - StorageType *StorageTypeProto `protobuf:"varint,3,opt,name=storageType,enum=hadoop.hdfs.StorageTypeProto,def=1" json:"storageType,omitempty"` - XXX_unrecognized []byte `json:"-"` + return Default_HdfsFileStatusProto_Blocksize } -func (m *DatanodeStorageProto) Reset() { *m = DatanodeStorageProto{} } -func (m *DatanodeStorageProto) String() string { return proto.CompactTextString(m) } -func (*DatanodeStorageProto) ProtoMessage() {} -func (*DatanodeStorageProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{5} } - -const Default_DatanodeStorageProto_State DatanodeStorageProto_StorageState = DatanodeStorageProto_NORMAL -const Default_DatanodeStorageProto_StorageType StorageTypeProto = StorageTypeProto_DISK - -func (m *DatanodeStorageProto) GetStorageUuid() string { - if m != nil && m.StorageUuid != nil { - return *m.StorageUuid +func (x *HdfsFileStatusProto) GetLocations() *LocatedBlocksProto { + if x != nil { + return x.Locations } - return "" + return nil } -func (m *DatanodeStorageProto) GetState() DatanodeStorageProto_StorageState { - if m != nil && m.State != nil { - return *m.State +func (x *HdfsFileStatusProto) GetFileId() uint64 { + if x != nil && x.FileId != nil { + return *x.FileId } - return Default_DatanodeStorageProto_State + return Default_HdfsFileStatusProto_FileId } -func (m *DatanodeStorageProto) GetStorageType() StorageTypeProto { - if m != nil && m.StorageType != nil { - return *m.StorageType +func (x *HdfsFileStatusProto) GetChildrenNum() int32 { + if x != nil && x.ChildrenNum != nil { + return *x.ChildrenNum } - return Default_DatanodeStorageProto_StorageType + return Default_HdfsFileStatusProto_ChildrenNum } -type StorageReportProto struct { - StorageUuid *string `protobuf:"bytes,1,req,name=storageUuid" json:"storageUuid,omitempty"` - Failed *bool `protobuf:"varint,2,opt,name=failed,def=0" json:"failed,omitempty"` - Capacity *uint64 `protobuf:"varint,3,opt,name=capacity,def=0" json:"capacity,omitempty"` - DfsUsed *uint64 `protobuf:"varint,4,opt,name=dfsUsed,def=0" json:"dfsUsed,omitempty"` - Remaining *uint64 `protobuf:"varint,5,opt,name=remaining,def=0" json:"remaining,omitempty"` - BlockPoolUsed *uint64 `protobuf:"varint,6,opt,name=blockPoolUsed,def=0" json:"blockPoolUsed,omitempty"` - Storage *DatanodeStorageProto `protobuf:"bytes,7,opt,name=storage" json:"storage,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *StorageReportProto) Reset() { *m = StorageReportProto{} } -func (m *StorageReportProto) String() string { return proto.CompactTextString(m) } -func (*StorageReportProto) ProtoMessage() {} -func (*StorageReportProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{6} } - -const Default_StorageReportProto_Failed bool = false -const Default_StorageReportProto_Capacity uint64 = 0 -const Default_StorageReportProto_DfsUsed uint64 = 0 -const Default_StorageReportProto_Remaining uint64 = 0 -const Default_StorageReportProto_BlockPoolUsed uint64 = 0 - -func (m *StorageReportProto) GetStorageUuid() string { - if m != nil && m.StorageUuid != nil { - return *m.StorageUuid +func (x *HdfsFileStatusProto) GetFileEncryptionInfo() *FileEncryptionInfoProto { + if x != nil { + return x.FileEncryptionInfo } - return "" + return nil } -func (m *StorageReportProto) GetFailed() bool { - if m != nil && m.Failed != nil { - return *m.Failed +func (x *HdfsFileStatusProto) GetStoragePolicy() uint32 { + if x != nil && x.StoragePolicy != nil { + return *x.StoragePolicy } - return Default_StorageReportProto_Failed + return Default_HdfsFileStatusProto_StoragePolicy } -func (m *StorageReportProto) GetCapacity() uint64 { - if m != nil && m.Capacity != nil { - return *m.Capacity +func (x *HdfsFileStatusProto) GetEcPolicy() *ErasureCodingPolicyProto { + if x != nil { + return x.EcPolicy } - return Default_StorageReportProto_Capacity + return nil } -func (m *StorageReportProto) GetDfsUsed() uint64 { - if m != nil && m.DfsUsed != nil { - return *m.DfsUsed +func (x *HdfsFileStatusProto) GetFlags() uint32 { + if x != nil && x.Flags != nil { + return *x.Flags } - return Default_StorageReportProto_DfsUsed + return Default_HdfsFileStatusProto_Flags } -func (m *StorageReportProto) GetRemaining() uint64 { - if m != nil && m.Remaining != nil { - return *m.Remaining - } - return Default_StorageReportProto_Remaining -} +//* +// Algorithms/types denoting how block-level checksums are computed using +// lower-level chunk checksums/CRCs. +// These options should be kept in sync with +// org.apache.hadoop.hdfs.protocol.BlockChecksumOptions. +type BlockChecksumOptionsProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageReportProto) GetBlockPoolUsed() uint64 { - if m != nil && m.BlockPoolUsed != nil { - return *m.BlockPoolUsed - } - return Default_StorageReportProto_BlockPoolUsed + BlockChecksumType *BlockChecksumTypeProto `protobuf:"varint,1,opt,name=blockChecksumType,enum=hadoop.hdfs.BlockChecksumTypeProto,def=1" json:"blockChecksumType,omitempty"` + // Only used if blockChecksumType specifies a striped format, such as + // COMPOSITE_CRC. If so, then the blockChecksum in the response is expected + // to be the concatenation of N crcs, where + // N == ((requestedLength - 1) / stripedLength) + 1 + StripeLength *uint64 `protobuf:"varint,2,opt,name=stripeLength" json:"stripeLength,omitempty"` } -func (m *StorageReportProto) GetStorage() *DatanodeStorageProto { - if m != nil { - return m.Storage +// Default values for BlockChecksumOptionsProto fields. +const ( + Default_BlockChecksumOptionsProto_BlockChecksumType = BlockChecksumTypeProto_MD5CRC +) + +func (x *BlockChecksumOptionsProto) Reset() { + *x = BlockChecksumOptionsProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -// * -// Summary of a file or directory -type ContentSummaryProto struct { - Length *uint64 `protobuf:"varint,1,req,name=length" json:"length,omitempty"` - FileCount *uint64 `protobuf:"varint,2,req,name=fileCount" json:"fileCount,omitempty"` - DirectoryCount *uint64 `protobuf:"varint,3,req,name=directoryCount" json:"directoryCount,omitempty"` - Quota *uint64 `protobuf:"varint,4,req,name=quota" json:"quota,omitempty"` - SpaceConsumed *uint64 `protobuf:"varint,5,req,name=spaceConsumed" json:"spaceConsumed,omitempty"` - SpaceQuota *uint64 `protobuf:"varint,6,req,name=spaceQuota" json:"spaceQuota,omitempty"` - TypeQuotaInfos *StorageTypeQuotaInfosProto `protobuf:"bytes,7,opt,name=typeQuotaInfos" json:"typeQuotaInfos,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *BlockChecksumOptionsProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ContentSummaryProto) Reset() { *m = ContentSummaryProto{} } -func (m *ContentSummaryProto) String() string { return proto.CompactTextString(m) } -func (*ContentSummaryProto) ProtoMessage() {} -func (*ContentSummaryProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{7} } +func (*BlockChecksumOptionsProto) ProtoMessage() {} -func (m *ContentSummaryProto) GetLength() uint64 { - if m != nil && m.Length != nil { - return *m.Length +func (x *BlockChecksumOptionsProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (m *ContentSummaryProto) GetFileCount() uint64 { - if m != nil && m.FileCount != nil { - return *m.FileCount - } - return 0 +// Deprecated: Use BlockChecksumOptionsProto.ProtoReflect.Descriptor instead. +func (*BlockChecksumOptionsProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{32} } -func (m *ContentSummaryProto) GetDirectoryCount() uint64 { - if m != nil && m.DirectoryCount != nil { - return *m.DirectoryCount +func (x *BlockChecksumOptionsProto) GetBlockChecksumType() BlockChecksumTypeProto { + if x != nil && x.BlockChecksumType != nil { + return *x.BlockChecksumType } - return 0 + return Default_BlockChecksumOptionsProto_BlockChecksumType } -func (m *ContentSummaryProto) GetQuota() uint64 { - if m != nil && m.Quota != nil { - return *m.Quota +func (x *BlockChecksumOptionsProto) GetStripeLength() uint64 { + if x != nil && x.StripeLength != nil { + return *x.StripeLength } return 0 } -func (m *ContentSummaryProto) GetSpaceConsumed() uint64 { - if m != nil && m.SpaceConsumed != nil { - return *m.SpaceConsumed - } - return 0 -} +//* +// HDFS Server Defaults +type FsServerDefaultsProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ContentSummaryProto) GetSpaceQuota() uint64 { - if m != nil && m.SpaceQuota != nil { - return *m.SpaceQuota - } - return 0 + BlockSize *uint64 `protobuf:"varint,1,req,name=blockSize" json:"blockSize,omitempty"` + BytesPerChecksum *uint32 `protobuf:"varint,2,req,name=bytesPerChecksum" json:"bytesPerChecksum,omitempty"` + WritePacketSize *uint32 `protobuf:"varint,3,req,name=writePacketSize" json:"writePacketSize,omitempty"` + Replication *uint32 `protobuf:"varint,4,req,name=replication" json:"replication,omitempty"` // Actually a short - only 16 bits used + FileBufferSize *uint32 `protobuf:"varint,5,req,name=fileBufferSize" json:"fileBufferSize,omitempty"` + EncryptDataTransfer *bool `protobuf:"varint,6,opt,name=encryptDataTransfer,def=0" json:"encryptDataTransfer,omitempty"` + TrashInterval *uint64 `protobuf:"varint,7,opt,name=trashInterval,def=0" json:"trashInterval,omitempty"` + ChecksumType *ChecksumTypeProto `protobuf:"varint,8,opt,name=checksumType,enum=hadoop.hdfs.ChecksumTypeProto,def=1" json:"checksumType,omitempty"` + KeyProviderUri *string `protobuf:"bytes,9,opt,name=keyProviderUri" json:"keyProviderUri,omitempty"` + PolicyId *uint32 `protobuf:"varint,10,opt,name=policyId,def=0" json:"policyId,omitempty"` } -func (m *ContentSummaryProto) GetTypeQuotaInfos() *StorageTypeQuotaInfosProto { - if m != nil { - return m.TypeQuotaInfos +// Default values for FsServerDefaultsProto fields. +const ( + Default_FsServerDefaultsProto_EncryptDataTransfer = bool(false) + Default_FsServerDefaultsProto_TrashInterval = uint64(0) + Default_FsServerDefaultsProto_ChecksumType = ChecksumTypeProto_CHECKSUM_CRC32 + Default_FsServerDefaultsProto_PolicyId = uint32(0) +) + +func (x *FsServerDefaultsProto) Reset() { + *x = FsServerDefaultsProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -// * -// Summary of quota usage of a directory -type QuotaUsageProto struct { - FileAndDirectoryCount *uint64 `protobuf:"varint,1,req,name=fileAndDirectoryCount" json:"fileAndDirectoryCount,omitempty"` - Quota *uint64 `protobuf:"varint,2,req,name=quota" json:"quota,omitempty"` - SpaceConsumed *uint64 `protobuf:"varint,3,req,name=spaceConsumed" json:"spaceConsumed,omitempty"` - SpaceQuota *uint64 `protobuf:"varint,4,req,name=spaceQuota" json:"spaceQuota,omitempty"` - TypeQuotaInfos *StorageTypeQuotaInfosProto `protobuf:"bytes,5,opt,name=typeQuotaInfos" json:"typeQuotaInfos,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *FsServerDefaultsProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *QuotaUsageProto) Reset() { *m = QuotaUsageProto{} } -func (m *QuotaUsageProto) String() string { return proto.CompactTextString(m) } -func (*QuotaUsageProto) ProtoMessage() {} -func (*QuotaUsageProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{8} } +func (*FsServerDefaultsProto) ProtoMessage() {} -func (m *QuotaUsageProto) GetFileAndDirectoryCount() uint64 { - if m != nil && m.FileAndDirectoryCount != nil { - return *m.FileAndDirectoryCount +func (x *FsServerDefaultsProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (m *QuotaUsageProto) GetQuota() uint64 { - if m != nil && m.Quota != nil { - return *m.Quota - } - return 0 +// Deprecated: Use FsServerDefaultsProto.ProtoReflect.Descriptor instead. +func (*FsServerDefaultsProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{33} } -func (m *QuotaUsageProto) GetSpaceConsumed() uint64 { - if m != nil && m.SpaceConsumed != nil { - return *m.SpaceConsumed +func (x *FsServerDefaultsProto) GetBlockSize() uint64 { + if x != nil && x.BlockSize != nil { + return *x.BlockSize } return 0 } -func (m *QuotaUsageProto) GetSpaceQuota() uint64 { - if m != nil && m.SpaceQuota != nil { - return *m.SpaceQuota +func (x *FsServerDefaultsProto) GetBytesPerChecksum() uint32 { + if x != nil && x.BytesPerChecksum != nil { + return *x.BytesPerChecksum } return 0 } -func (m *QuotaUsageProto) GetTypeQuotaInfos() *StorageTypeQuotaInfosProto { - if m != nil { - return m.TypeQuotaInfos +func (x *FsServerDefaultsProto) GetWritePacketSize() uint32 { + if x != nil && x.WritePacketSize != nil { + return *x.WritePacketSize } - return nil + return 0 } -// * -// Storage type quota and usage information of a file or directory -type StorageTypeQuotaInfosProto struct { - TypeQuotaInfo []*StorageTypeQuotaInfoProto `protobuf:"bytes,1,rep,name=typeQuotaInfo" json:"typeQuotaInfo,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *FsServerDefaultsProto) GetReplication() uint32 { + if x != nil && x.Replication != nil { + return *x.Replication + } + return 0 } -func (m *StorageTypeQuotaInfosProto) Reset() { *m = StorageTypeQuotaInfosProto{} } -func (m *StorageTypeQuotaInfosProto) String() string { return proto.CompactTextString(m) } -func (*StorageTypeQuotaInfosProto) ProtoMessage() {} -func (*StorageTypeQuotaInfosProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{9} } - -func (m *StorageTypeQuotaInfosProto) GetTypeQuotaInfo() []*StorageTypeQuotaInfoProto { - if m != nil { - return m.TypeQuotaInfo +func (x *FsServerDefaultsProto) GetFileBufferSize() uint32 { + if x != nil && x.FileBufferSize != nil { + return *x.FileBufferSize } - return nil + return 0 } -type StorageTypeQuotaInfoProto struct { - Type *StorageTypeProto `protobuf:"varint,1,req,name=type,enum=hadoop.hdfs.StorageTypeProto" json:"type,omitempty"` - Quota *uint64 `protobuf:"varint,2,req,name=quota" json:"quota,omitempty"` - Consumed *uint64 `protobuf:"varint,3,req,name=consumed" json:"consumed,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *FsServerDefaultsProto) GetEncryptDataTransfer() bool { + if x != nil && x.EncryptDataTransfer != nil { + return *x.EncryptDataTransfer + } + return Default_FsServerDefaultsProto_EncryptDataTransfer } -func (m *StorageTypeQuotaInfoProto) Reset() { *m = StorageTypeQuotaInfoProto{} } -func (m *StorageTypeQuotaInfoProto) String() string { return proto.CompactTextString(m) } -func (*StorageTypeQuotaInfoProto) ProtoMessage() {} -func (*StorageTypeQuotaInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{10} } - -func (m *StorageTypeQuotaInfoProto) GetType() StorageTypeProto { - if m != nil && m.Type != nil { - return *m.Type +func (x *FsServerDefaultsProto) GetTrashInterval() uint64 { + if x != nil && x.TrashInterval != nil { + return *x.TrashInterval } - return StorageTypeProto_DISK + return Default_FsServerDefaultsProto_TrashInterval } -func (m *StorageTypeQuotaInfoProto) GetQuota() uint64 { - if m != nil && m.Quota != nil { - return *m.Quota +func (x *FsServerDefaultsProto) GetChecksumType() ChecksumTypeProto { + if x != nil && x.ChecksumType != nil { + return *x.ChecksumType } - return 0 + return Default_FsServerDefaultsProto_ChecksumType } -func (m *StorageTypeQuotaInfoProto) GetConsumed() uint64 { - if m != nil && m.Consumed != nil { - return *m.Consumed +func (x *FsServerDefaultsProto) GetKeyProviderUri() string { + if x != nil && x.KeyProviderUri != nil { + return *x.KeyProviderUri } - return 0 + return "" } -// * -// Contains a list of paths corresponding to corrupt files and a cookie -// used for iterative calls to NameNode.listCorruptFileBlocks. -// -type CorruptFileBlocksProto struct { - Files []string `protobuf:"bytes,1,rep,name=files" json:"files,omitempty"` - Cookie *string `protobuf:"bytes,2,req,name=cookie" json:"cookie,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *FsServerDefaultsProto) GetPolicyId() uint32 { + if x != nil && x.PolicyId != nil { + return *x.PolicyId + } + return Default_FsServerDefaultsProto_PolicyId } -func (m *CorruptFileBlocksProto) Reset() { *m = CorruptFileBlocksProto{} } -func (m *CorruptFileBlocksProto) String() string { return proto.CompactTextString(m) } -func (*CorruptFileBlocksProto) ProtoMessage() {} -func (*CorruptFileBlocksProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{11} } +//* +// Directory listing +type DirectoryListingProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CorruptFileBlocksProto) GetFiles() []string { - if m != nil { - return m.Files - } - return nil + PartialListing []*HdfsFileStatusProto `protobuf:"bytes,1,rep,name=partialListing" json:"partialListing,omitempty"` + RemainingEntries *uint32 `protobuf:"varint,2,req,name=remainingEntries" json:"remainingEntries,omitempty"` } -func (m *CorruptFileBlocksProto) GetCookie() string { - if m != nil && m.Cookie != nil { - return *m.Cookie +func (x *DirectoryListingProto) Reset() { + *x = DirectoryListingProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -// * -// File or Directory permision - same spec as posix -type FsPermissionProto struct { - Perm *uint32 `protobuf:"varint,1,req,name=perm" json:"perm,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *DirectoryListingProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FsPermissionProto) Reset() { *m = FsPermissionProto{} } -func (m *FsPermissionProto) String() string { return proto.CompactTextString(m) } -func (*FsPermissionProto) ProtoMessage() {} -func (*FsPermissionProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{12} } +func (*DirectoryListingProto) ProtoMessage() {} -func (m *FsPermissionProto) GetPerm() uint32 { - if m != nil && m.Perm != nil { - return *m.Perm +func (x *DirectoryListingProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -// * -// A list of storage types. -type StorageTypesProto struct { - StorageTypes []StorageTypeProto `protobuf:"varint,1,rep,name=storageTypes,enum=hadoop.hdfs.StorageTypeProto" json:"storageTypes,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use DirectoryListingProto.ProtoReflect.Descriptor instead. +func (*DirectoryListingProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{34} } -func (m *StorageTypesProto) Reset() { *m = StorageTypesProto{} } -func (m *StorageTypesProto) String() string { return proto.CompactTextString(m) } -func (*StorageTypesProto) ProtoMessage() {} -func (*StorageTypesProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{13} } - -func (m *StorageTypesProto) GetStorageTypes() []StorageTypeProto { - if m != nil { - return m.StorageTypes +func (x *DirectoryListingProto) GetPartialListing() []*HdfsFileStatusProto { + if x != nil { + return x.PartialListing } return nil } -// * -// Block replica storage policy. -type BlockStoragePolicyProto struct { - PolicyId *uint32 `protobuf:"varint,1,req,name=policyId" json:"policyId,omitempty"` - Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` - // a list of storage types for storing the block replicas when creating a - // block. - CreationPolicy *StorageTypesProto `protobuf:"bytes,3,req,name=creationPolicy" json:"creationPolicy,omitempty"` - // A list of storage types for creation fallback storage. - CreationFallbackPolicy *StorageTypesProto `protobuf:"bytes,4,opt,name=creationFallbackPolicy" json:"creationFallbackPolicy,omitempty"` - ReplicationFallbackPolicy *StorageTypesProto `protobuf:"bytes,5,opt,name=replicationFallbackPolicy" json:"replicationFallbackPolicy,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *BlockStoragePolicyProto) Reset() { *m = BlockStoragePolicyProto{} } -func (m *BlockStoragePolicyProto) String() string { return proto.CompactTextString(m) } -func (*BlockStoragePolicyProto) ProtoMessage() {} -func (*BlockStoragePolicyProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{14} } - -func (m *BlockStoragePolicyProto) GetPolicyId() uint32 { - if m != nil && m.PolicyId != nil { - return *m.PolicyId +func (x *DirectoryListingProto) GetRemainingEntries() uint32 { + if x != nil && x.RemainingEntries != nil { + return *x.RemainingEntries } return 0 } -func (m *BlockStoragePolicyProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *BlockStoragePolicyProto) GetCreationPolicy() *StorageTypesProto { - if m != nil { - return m.CreationPolicy - } - return nil -} +type RemoteExceptionProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *BlockStoragePolicyProto) GetCreationFallbackPolicy() *StorageTypesProto { - if m != nil { - return m.CreationFallbackPolicy - } - return nil + ClassName *string `protobuf:"bytes,1,req,name=className" json:"className,omitempty"` + Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` } -func (m *BlockStoragePolicyProto) GetReplicationFallbackPolicy() *StorageTypesProto { - if m != nil { - return m.ReplicationFallbackPolicy +func (x *RemoteExceptionProto) Reset() { + *x = RemoteExceptionProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -// * -// A LocatedBlock gives information about a block and its location. -type LocatedBlockProto struct { - B *ExtendedBlockProto `protobuf:"bytes,1,req,name=b" json:"b,omitempty"` - Offset *uint64 `protobuf:"varint,2,req,name=offset" json:"offset,omitempty"` - Locs []*DatanodeInfoProto `protobuf:"bytes,3,rep,name=locs" json:"locs,omitempty"` - Corrupt *bool `protobuf:"varint,4,req,name=corrupt" json:"corrupt,omitempty"` - BlockToken *hadoop_common.TokenProto `protobuf:"bytes,5,req,name=blockToken" json:"blockToken,omitempty"` - IsCached []bool `protobuf:"varint,6,rep,packed,name=isCached" json:"isCached,omitempty"` - StorageTypes []StorageTypeProto `protobuf:"varint,7,rep,name=storageTypes,enum=hadoop.hdfs.StorageTypeProto" json:"storageTypes,omitempty"` - StorageIDs []string `protobuf:"bytes,8,rep,name=storageIDs" json:"storageIDs,omitempty"` - // striped block related fields - BlockIndices []byte `protobuf:"bytes,9,opt,name=blockIndices" json:"blockIndices,omitempty"` - BlockTokens []*hadoop_common.TokenProto `protobuf:"bytes,10,rep,name=blockTokens" json:"blockTokens,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *RemoteExceptionProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LocatedBlockProto) Reset() { *m = LocatedBlockProto{} } -func (m *LocatedBlockProto) String() string { return proto.CompactTextString(m) } -func (*LocatedBlockProto) ProtoMessage() {} -func (*LocatedBlockProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{15} } +func (*RemoteExceptionProto) ProtoMessage() {} -func (m *LocatedBlockProto) GetB() *ExtendedBlockProto { - if m != nil { - return m.B +func (x *RemoteExceptionProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *LocatedBlockProto) GetOffset() uint64 { - if m != nil && m.Offset != nil { - return *m.Offset - } - return 0 +// Deprecated: Use RemoteExceptionProto.ProtoReflect.Descriptor instead. +func (*RemoteExceptionProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{35} } -func (m *LocatedBlockProto) GetLocs() []*DatanodeInfoProto { - if m != nil { - return m.Locs +func (x *RemoteExceptionProto) GetClassName() string { + if x != nil && x.ClassName != nil { + return *x.ClassName } - return nil + return "" } -func (m *LocatedBlockProto) GetCorrupt() bool { - if m != nil && m.Corrupt != nil { - return *m.Corrupt +func (x *RemoteExceptionProto) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message } - return false + return "" } -func (m *LocatedBlockProto) GetBlockToken() *hadoop_common.TokenProto { - if m != nil { - return m.BlockToken - } - return nil -} +// Directory listing result for a batched listing call. +type BatchedDirectoryListingProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *LocatedBlockProto) GetIsCached() []bool { - if m != nil { - return m.IsCached - } - return nil + PartialListing []*HdfsFileStatusProto `protobuf:"bytes,1,rep,name=partialListing" json:"partialListing,omitempty"` + ParentIdx *uint32 `protobuf:"varint,2,req,name=parentIdx" json:"parentIdx,omitempty"` + Exception *RemoteExceptionProto `protobuf:"bytes,3,opt,name=exception" json:"exception,omitempty"` } -func (m *LocatedBlockProto) GetStorageTypes() []StorageTypeProto { - if m != nil { - return m.StorageTypes +func (x *BatchedDirectoryListingProto) Reset() { + *x = BatchedDirectoryListingProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (m *LocatedBlockProto) GetStorageIDs() []string { - if m != nil { - return m.StorageIDs - } - return nil +func (x *BatchedDirectoryListingProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LocatedBlockProto) GetBlockIndices() []byte { - if m != nil { - return m.BlockIndices - } - return nil -} +func (*BatchedDirectoryListingProto) ProtoMessage() {} -func (m *LocatedBlockProto) GetBlockTokens() []*hadoop_common.TokenProto { - if m != nil { - return m.BlockTokens +func (x *BatchedDirectoryListingProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -type DataEncryptionKeyProto struct { - KeyId *uint32 `protobuf:"varint,1,req,name=keyId" json:"keyId,omitempty"` - BlockPoolId *string `protobuf:"bytes,2,req,name=blockPoolId" json:"blockPoolId,omitempty"` - Nonce []byte `protobuf:"bytes,3,req,name=nonce" json:"nonce,omitempty"` - EncryptionKey []byte `protobuf:"bytes,4,req,name=encryptionKey" json:"encryptionKey,omitempty"` - ExpiryDate *uint64 `protobuf:"varint,5,req,name=expiryDate" json:"expiryDate,omitempty"` - EncryptionAlgorithm *string `protobuf:"bytes,6,opt,name=encryptionAlgorithm" json:"encryptionAlgorithm,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use BatchedDirectoryListingProto.ProtoReflect.Descriptor instead. +func (*BatchedDirectoryListingProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{36} } -func (m *DataEncryptionKeyProto) Reset() { *m = DataEncryptionKeyProto{} } -func (m *DataEncryptionKeyProto) String() string { return proto.CompactTextString(m) } -func (*DataEncryptionKeyProto) ProtoMessage() {} -func (*DataEncryptionKeyProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{16} } - -func (m *DataEncryptionKeyProto) GetKeyId() uint32 { - if m != nil && m.KeyId != nil { - return *m.KeyId +func (x *BatchedDirectoryListingProto) GetPartialListing() []*HdfsFileStatusProto { + if x != nil { + return x.PartialListing } - return 0 + return nil } -func (m *DataEncryptionKeyProto) GetBlockPoolId() string { - if m != nil && m.BlockPoolId != nil { - return *m.BlockPoolId +func (x *BatchedDirectoryListingProto) GetParentIdx() uint32 { + if x != nil && x.ParentIdx != nil { + return *x.ParentIdx } - return "" + return 0 } -func (m *DataEncryptionKeyProto) GetNonce() []byte { - if m != nil { - return m.Nonce +func (x *BatchedDirectoryListingProto) GetException() *RemoteExceptionProto { + if x != nil { + return x.Exception } return nil } -func (m *DataEncryptionKeyProto) GetEncryptionKey() []byte { - if m != nil { - return m.EncryptionKey - } - return nil -} +//* +// Status of a snapshottable directory: besides the normal information for +// a directory status, also include snapshot quota, number of snapshots, and +// the full path of the parent directory. +type SnapshottableDirectoryStatusProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *DataEncryptionKeyProto) GetExpiryDate() uint64 { - if m != nil && m.ExpiryDate != nil { - return *m.ExpiryDate - } - return 0 + DirStatus *HdfsFileStatusProto `protobuf:"bytes,1,req,name=dirStatus" json:"dirStatus,omitempty"` + // Fields specific for snapshottable directory + SnapshotQuota *uint32 `protobuf:"varint,2,req,name=snapshot_quota,json=snapshotQuota" json:"snapshot_quota,omitempty"` + SnapshotNumber *uint32 `protobuf:"varint,3,req,name=snapshot_number,json=snapshotNumber" json:"snapshot_number,omitempty"` + ParentFullpath []byte `protobuf:"bytes,4,req,name=parent_fullpath,json=parentFullpath" json:"parent_fullpath,omitempty"` } -func (m *DataEncryptionKeyProto) GetEncryptionAlgorithm() string { - if m != nil && m.EncryptionAlgorithm != nil { - return *m.EncryptionAlgorithm +func (x *SnapshottableDirectoryStatusProto) Reset() { + *x = SnapshottableDirectoryStatusProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -// * -// Encryption information for a file. -type FileEncryptionInfoProto struct { - Suite *CipherSuiteProto `protobuf:"varint,1,req,name=suite,enum=hadoop.hdfs.CipherSuiteProto" json:"suite,omitempty"` - CryptoProtocolVersion *CryptoProtocolVersionProto `protobuf:"varint,2,req,name=cryptoProtocolVersion,enum=hadoop.hdfs.CryptoProtocolVersionProto" json:"cryptoProtocolVersion,omitempty"` - Key []byte `protobuf:"bytes,3,req,name=key" json:"key,omitempty"` - Iv []byte `protobuf:"bytes,4,req,name=iv" json:"iv,omitempty"` - KeyName *string `protobuf:"bytes,5,req,name=keyName" json:"keyName,omitempty"` - EzKeyVersionName *string `protobuf:"bytes,6,req,name=ezKeyVersionName" json:"ezKeyVersionName,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *SnapshottableDirectoryStatusProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FileEncryptionInfoProto) Reset() { *m = FileEncryptionInfoProto{} } -func (m *FileEncryptionInfoProto) String() string { return proto.CompactTextString(m) } -func (*FileEncryptionInfoProto) ProtoMessage() {} -func (*FileEncryptionInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{17} } +func (*SnapshottableDirectoryStatusProto) ProtoMessage() {} -func (m *FileEncryptionInfoProto) GetSuite() CipherSuiteProto { - if m != nil && m.Suite != nil { - return *m.Suite +func (x *SnapshottableDirectoryStatusProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return CipherSuiteProto_UNKNOWN + return mi.MessageOf(x) } -func (m *FileEncryptionInfoProto) GetCryptoProtocolVersion() CryptoProtocolVersionProto { - if m != nil && m.CryptoProtocolVersion != nil { - return *m.CryptoProtocolVersion - } - return CryptoProtocolVersionProto_UNKNOWN_PROTOCOL_VERSION +// Deprecated: Use SnapshottableDirectoryStatusProto.ProtoReflect.Descriptor instead. +func (*SnapshottableDirectoryStatusProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{37} } -func (m *FileEncryptionInfoProto) GetKey() []byte { - if m != nil { - return m.Key +func (x *SnapshottableDirectoryStatusProto) GetDirStatus() *HdfsFileStatusProto { + if x != nil { + return x.DirStatus } return nil } -func (m *FileEncryptionInfoProto) GetIv() []byte { - if m != nil { - return m.Iv +func (x *SnapshottableDirectoryStatusProto) GetSnapshotQuota() uint32 { + if x != nil && x.SnapshotQuota != nil { + return *x.SnapshotQuota } - return nil + return 0 } -func (m *FileEncryptionInfoProto) GetKeyName() string { - if m != nil && m.KeyName != nil { - return *m.KeyName +func (x *SnapshottableDirectoryStatusProto) GetSnapshotNumber() uint32 { + if x != nil && x.SnapshotNumber != nil { + return *x.SnapshotNumber } - return "" + return 0 } -func (m *FileEncryptionInfoProto) GetEzKeyVersionName() string { - if m != nil && m.EzKeyVersionName != nil { - return *m.EzKeyVersionName +func (x *SnapshottableDirectoryStatusProto) GetParentFullpath() []byte { + if x != nil { + return x.ParentFullpath } - return "" + return nil } -// * -// Encryption information for an individual -// file within an encryption zone -type PerFileEncryptionInfoProto struct { - Key []byte `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` - Iv []byte `protobuf:"bytes,2,req,name=iv" json:"iv,omitempty"` - EzKeyVersionName *string `protobuf:"bytes,3,req,name=ezKeyVersionName" json:"ezKeyVersionName,omitempty"` - XXX_unrecognized []byte `json:"-"` -} +//* +// Snapshottable directory listing +type SnapshottableDirectoryListingProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *PerFileEncryptionInfoProto) Reset() { *m = PerFileEncryptionInfoProto{} } -func (m *PerFileEncryptionInfoProto) String() string { return proto.CompactTextString(m) } -func (*PerFileEncryptionInfoProto) ProtoMessage() {} -func (*PerFileEncryptionInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{18} } + SnapshottableDirListing []*SnapshottableDirectoryStatusProto `protobuf:"bytes,1,rep,name=snapshottableDirListing" json:"snapshottableDirListing,omitempty"` +} -func (m *PerFileEncryptionInfoProto) GetKey() []byte { - if m != nil { - return m.Key +func (x *SnapshottableDirectoryListingProto) Reset() { + *x = SnapshottableDirectoryListingProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (m *PerFileEncryptionInfoProto) GetIv() []byte { - if m != nil { - return m.Iv - } - return nil +func (x *SnapshottableDirectoryListingProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PerFileEncryptionInfoProto) GetEzKeyVersionName() string { - if m != nil && m.EzKeyVersionName != nil { - return *m.EzKeyVersionName +func (*SnapshottableDirectoryListingProto) ProtoMessage() {} + +func (x *SnapshottableDirectoryListingProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -// * -// Encryption information for an encryption -// zone -type ZoneEncryptionInfoProto struct { - Suite *CipherSuiteProto `protobuf:"varint,1,req,name=suite,enum=hadoop.hdfs.CipherSuiteProto" json:"suite,omitempty"` - CryptoProtocolVersion *CryptoProtocolVersionProto `protobuf:"varint,2,req,name=cryptoProtocolVersion,enum=hadoop.hdfs.CryptoProtocolVersionProto" json:"cryptoProtocolVersion,omitempty"` - KeyName *string `protobuf:"bytes,3,req,name=keyName" json:"keyName,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use SnapshottableDirectoryListingProto.ProtoReflect.Descriptor instead. +func (*SnapshottableDirectoryListingProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{38} } -func (m *ZoneEncryptionInfoProto) Reset() { *m = ZoneEncryptionInfoProto{} } -func (m *ZoneEncryptionInfoProto) String() string { return proto.CompactTextString(m) } -func (*ZoneEncryptionInfoProto) ProtoMessage() {} -func (*ZoneEncryptionInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{19} } - -func (m *ZoneEncryptionInfoProto) GetSuite() CipherSuiteProto { - if m != nil && m.Suite != nil { - return *m.Suite +func (x *SnapshottableDirectoryListingProto) GetSnapshottableDirListing() []*SnapshottableDirectoryStatusProto { + if x != nil { + return x.SnapshottableDirListing } - return CipherSuiteProto_UNKNOWN + return nil } -func (m *ZoneEncryptionInfoProto) GetCryptoProtocolVersion() CryptoProtocolVersionProto { - if m != nil && m.CryptoProtocolVersion != nil { - return *m.CryptoProtocolVersion - } - return CryptoProtocolVersionProto_UNKNOWN_PROTOCOL_VERSION +//* +// Snapshot diff report entry +type SnapshotDiffReportEntryProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Fullpath []byte `protobuf:"bytes,1,req,name=fullpath" json:"fullpath,omitempty"` + ModificationLabel *string `protobuf:"bytes,2,req,name=modificationLabel" json:"modificationLabel,omitempty"` + TargetPath []byte `protobuf:"bytes,3,opt,name=targetPath" json:"targetPath,omitempty"` } -func (m *ZoneEncryptionInfoProto) GetKeyName() string { - if m != nil && m.KeyName != nil { - return *m.KeyName +func (x *SnapshotDiffReportEntryProto) Reset() { + *x = SnapshotDiffReportEntryProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -// * -// Cipher option -type CipherOptionProto struct { - Suite *CipherSuiteProto `protobuf:"varint,1,req,name=suite,enum=hadoop.hdfs.CipherSuiteProto" json:"suite,omitempty"` - InKey []byte `protobuf:"bytes,2,opt,name=inKey" json:"inKey,omitempty"` - InIv []byte `protobuf:"bytes,3,opt,name=inIv" json:"inIv,omitempty"` - OutKey []byte `protobuf:"bytes,4,opt,name=outKey" json:"outKey,omitempty"` - OutIv []byte `protobuf:"bytes,5,opt,name=outIv" json:"outIv,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *SnapshotDiffReportEntryProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CipherOptionProto) Reset() { *m = CipherOptionProto{} } -func (m *CipherOptionProto) String() string { return proto.CompactTextString(m) } -func (*CipherOptionProto) ProtoMessage() {} -func (*CipherOptionProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{20} } +func (*SnapshotDiffReportEntryProto) ProtoMessage() {} -func (m *CipherOptionProto) GetSuite() CipherSuiteProto { - if m != nil && m.Suite != nil { - return *m.Suite +func (x *SnapshotDiffReportEntryProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return CipherSuiteProto_UNKNOWN + return mi.MessageOf(x) } -func (m *CipherOptionProto) GetInKey() []byte { - if m != nil { - return m.InKey - } - return nil +// Deprecated: Use SnapshotDiffReportEntryProto.ProtoReflect.Descriptor instead. +func (*SnapshotDiffReportEntryProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{39} } -func (m *CipherOptionProto) GetInIv() []byte { - if m != nil { - return m.InIv +func (x *SnapshotDiffReportEntryProto) GetFullpath() []byte { + if x != nil { + return x.Fullpath } return nil } -func (m *CipherOptionProto) GetOutKey() []byte { - if m != nil { - return m.OutKey +func (x *SnapshotDiffReportEntryProto) GetModificationLabel() string { + if x != nil && x.ModificationLabel != nil { + return *x.ModificationLabel } - return nil + return "" } -func (m *CipherOptionProto) GetOutIv() []byte { - if m != nil { - return m.OutIv +func (x *SnapshotDiffReportEntryProto) GetTargetPath() []byte { + if x != nil { + return x.TargetPath } return nil } -// * -// A set of file blocks and their locations. -type LocatedBlocksProto struct { - FileLength *uint64 `protobuf:"varint,1,req,name=fileLength" json:"fileLength,omitempty"` - Blocks []*LocatedBlockProto `protobuf:"bytes,2,rep,name=blocks" json:"blocks,omitempty"` - UnderConstruction *bool `protobuf:"varint,3,req,name=underConstruction" json:"underConstruction,omitempty"` - LastBlock *LocatedBlockProto `protobuf:"bytes,4,opt,name=lastBlock" json:"lastBlock,omitempty"` - IsLastBlockComplete *bool `protobuf:"varint,5,req,name=isLastBlockComplete" json:"isLastBlockComplete,omitempty"` - FileEncryptionInfo *FileEncryptionInfoProto `protobuf:"bytes,6,opt,name=fileEncryptionInfo" json:"fileEncryptionInfo,omitempty"` - // Optional field for erasure coding - EcPolicy *ErasureCodingPolicyProto `protobuf:"bytes,7,opt,name=ecPolicy" json:"ecPolicy,omitempty"` - XXX_unrecognized []byte `json:"-"` -} +//* +// Snapshot diff report +type SnapshotDiffReportProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *LocatedBlocksProto) Reset() { *m = LocatedBlocksProto{} } -func (m *LocatedBlocksProto) String() string { return proto.CompactTextString(m) } -func (*LocatedBlocksProto) ProtoMessage() {} -func (*LocatedBlocksProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{21} } + // full path of the directory where snapshots were taken + SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` + FromSnapshot *string `protobuf:"bytes,2,req,name=fromSnapshot" json:"fromSnapshot,omitempty"` + ToSnapshot *string `protobuf:"bytes,3,req,name=toSnapshot" json:"toSnapshot,omitempty"` + DiffReportEntries []*SnapshotDiffReportEntryProto `protobuf:"bytes,4,rep,name=diffReportEntries" json:"diffReportEntries,omitempty"` +} -func (m *LocatedBlocksProto) GetFileLength() uint64 { - if m != nil && m.FileLength != nil { - return *m.FileLength +func (x *SnapshotDiffReportProto) Reset() { + *x = SnapshotDiffReportProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (m *LocatedBlocksProto) GetBlocks() []*LocatedBlockProto { - if m != nil { - return m.Blocks - } - return nil +func (x *SnapshotDiffReportProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LocatedBlocksProto) GetUnderConstruction() bool { - if m != nil && m.UnderConstruction != nil { - return *m.UnderConstruction +func (*SnapshotDiffReportProto) ProtoMessage() {} + +func (x *SnapshotDiffReportProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return false + return mi.MessageOf(x) } -func (m *LocatedBlocksProto) GetLastBlock() *LocatedBlockProto { - if m != nil { - return m.LastBlock - } - return nil +// Deprecated: Use SnapshotDiffReportProto.ProtoReflect.Descriptor instead. +func (*SnapshotDiffReportProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{40} } -func (m *LocatedBlocksProto) GetIsLastBlockComplete() bool { - if m != nil && m.IsLastBlockComplete != nil { - return *m.IsLastBlockComplete +func (x *SnapshotDiffReportProto) GetSnapshotRoot() string { + if x != nil && x.SnapshotRoot != nil { + return *x.SnapshotRoot } - return false + return "" } -func (m *LocatedBlocksProto) GetFileEncryptionInfo() *FileEncryptionInfoProto { - if m != nil { - return m.FileEncryptionInfo +func (x *SnapshotDiffReportProto) GetFromSnapshot() string { + if x != nil && x.FromSnapshot != nil { + return *x.FromSnapshot } - return nil + return "" } -func (m *LocatedBlocksProto) GetEcPolicy() *ErasureCodingPolicyProto { - if m != nil { - return m.EcPolicy +func (x *SnapshotDiffReportProto) GetToSnapshot() string { + if x != nil && x.ToSnapshot != nil { + return *x.ToSnapshot } - return nil + return "" } -// * -// ECSchema options entry -type ECSchemaOptionEntryProto struct { - Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` - Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *SnapshotDiffReportProto) GetDiffReportEntries() []*SnapshotDiffReportEntryProto { + if x != nil { + return x.DiffReportEntries + } + return nil } -func (m *ECSchemaOptionEntryProto) Reset() { *m = ECSchemaOptionEntryProto{} } -func (m *ECSchemaOptionEntryProto) String() string { return proto.CompactTextString(m) } -func (*ECSchemaOptionEntryProto) ProtoMessage() {} -func (*ECSchemaOptionEntryProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{22} } +//* +// Snapshot diff report listing entry +type SnapshotDiffReportListingEntryProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ECSchemaOptionEntryProto) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" + Fullpath []byte `protobuf:"bytes,1,req,name=fullpath" json:"fullpath,omitempty"` + DirId *uint64 `protobuf:"varint,2,req,name=dirId" json:"dirId,omitempty"` + IsReference *bool `protobuf:"varint,3,req,name=isReference" json:"isReference,omitempty"` + TargetPath []byte `protobuf:"bytes,4,opt,name=targetPath" json:"targetPath,omitempty"` + FileId *uint64 `protobuf:"varint,5,opt,name=fileId" json:"fileId,omitempty"` } -func (m *ECSchemaOptionEntryProto) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value +func (x *SnapshotDiffReportListingEntryProto) Reset() { + *x = SnapshotDiffReportListingEntryProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -// * -// ECSchema for erasurecoding -type ECSchemaProto struct { - CodecName *string `protobuf:"bytes,1,req,name=codecName" json:"codecName,omitempty"` - DataUnits *uint32 `protobuf:"varint,2,req,name=dataUnits" json:"dataUnits,omitempty"` - ParityUnits *uint32 `protobuf:"varint,3,req,name=parityUnits" json:"parityUnits,omitempty"` - Options []*ECSchemaOptionEntryProto `protobuf:"bytes,4,rep,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *SnapshotDiffReportListingEntryProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ECSchemaProto) Reset() { *m = ECSchemaProto{} } -func (m *ECSchemaProto) String() string { return proto.CompactTextString(m) } -func (*ECSchemaProto) ProtoMessage() {} -func (*ECSchemaProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{23} } - -func (m *ECSchemaProto) GetCodecName() string { - if m != nil && m.CodecName != nil { - return *m.CodecName - } - return "" -} +func (*SnapshotDiffReportListingEntryProto) ProtoMessage() {} -func (m *ECSchemaProto) GetDataUnits() uint32 { - if m != nil && m.DataUnits != nil { - return *m.DataUnits +func (x *SnapshotDiffReportListingEntryProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (m *ECSchemaProto) GetParityUnits() uint32 { - if m != nil && m.ParityUnits != nil { - return *m.ParityUnits - } - return 0 +// Deprecated: Use SnapshotDiffReportListingEntryProto.ProtoReflect.Descriptor instead. +func (*SnapshotDiffReportListingEntryProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{41} } -func (m *ECSchemaProto) GetOptions() []*ECSchemaOptionEntryProto { - if m != nil { - return m.Options +func (x *SnapshotDiffReportListingEntryProto) GetFullpath() []byte { + if x != nil { + return x.Fullpath } return nil } -type ErasureCodingPolicyProto struct { - Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - Schema *ECSchemaProto `protobuf:"bytes,2,req,name=schema" json:"schema,omitempty"` - CellSize *uint32 `protobuf:"varint,3,req,name=cellSize" json:"cellSize,omitempty"` - Id *uint32 `protobuf:"varint,4,req,name=id" json:"id,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *SnapshotDiffReportListingEntryProto) GetDirId() uint64 { + if x != nil && x.DirId != nil { + return *x.DirId + } + return 0 } -func (m *ErasureCodingPolicyProto) Reset() { *m = ErasureCodingPolicyProto{} } -func (m *ErasureCodingPolicyProto) String() string { return proto.CompactTextString(m) } -func (*ErasureCodingPolicyProto) ProtoMessage() {} -func (*ErasureCodingPolicyProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{24} } - -func (m *ErasureCodingPolicyProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name +func (x *SnapshotDiffReportListingEntryProto) GetIsReference() bool { + if x != nil && x.IsReference != nil { + return *x.IsReference } - return "" + return false } -func (m *ErasureCodingPolicyProto) GetSchema() *ECSchemaProto { - if m != nil { - return m.Schema +func (x *SnapshotDiffReportListingEntryProto) GetTargetPath() []byte { + if x != nil { + return x.TargetPath } return nil } -func (m *ErasureCodingPolicyProto) GetCellSize() uint32 { - if m != nil && m.CellSize != nil { - return *m.CellSize +func (x *SnapshotDiffReportListingEntryProto) GetFileId() uint64 { + if x != nil && x.FileId != nil { + return *x.FileId } return 0 } -func (m *ErasureCodingPolicyProto) GetId() uint32 { - if m != nil && m.Id != nil { - return *m.Id - } - return 0 -} +type SnapshotDiffReportCursorProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -// * -// Status of a file, directory or symlink -// Optionally includes a file's block locations if requested by client on the rpc call. -type HdfsFileStatusProto struct { - FileType *HdfsFileStatusProto_FileType `protobuf:"varint,1,req,name=fileType,enum=hadoop.hdfs.HdfsFileStatusProto_FileType" json:"fileType,omitempty"` - Path []byte `protobuf:"bytes,2,req,name=path" json:"path,omitempty"` - Length *uint64 `protobuf:"varint,3,req,name=length" json:"length,omitempty"` - Permission *FsPermissionProto `protobuf:"bytes,4,req,name=permission" json:"permission,omitempty"` - Owner *string `protobuf:"bytes,5,req,name=owner" json:"owner,omitempty"` - Group *string `protobuf:"bytes,6,req,name=group" json:"group,omitempty"` - ModificationTime *uint64 `protobuf:"varint,7,req,name=modification_time,json=modificationTime" json:"modification_time,omitempty"` - AccessTime *uint64 `protobuf:"varint,8,req,name=access_time,json=accessTime" json:"access_time,omitempty"` - // Optional fields for symlink - Symlink []byte `protobuf:"bytes,9,opt,name=symlink" json:"symlink,omitempty"` - // Optional fields for file - BlockReplication *uint32 `protobuf:"varint,10,opt,name=block_replication,json=blockReplication,def=0" json:"block_replication,omitempty"` - Blocksize *uint64 `protobuf:"varint,11,opt,name=blocksize,def=0" json:"blocksize,omitempty"` - Locations *LocatedBlocksProto `protobuf:"bytes,12,opt,name=locations" json:"locations,omitempty"` - // Optional field for fileId - FileId *uint64 `protobuf:"varint,13,opt,name=fileId,def=0" json:"fileId,omitempty"` - ChildrenNum *int32 `protobuf:"varint,14,opt,name=childrenNum,def=-1" json:"childrenNum,omitempty"` - // Optional field for file encryption - FileEncryptionInfo *FileEncryptionInfoProto `protobuf:"bytes,15,opt,name=fileEncryptionInfo" json:"fileEncryptionInfo,omitempty"` - StoragePolicy *uint32 `protobuf:"varint,16,opt,name=storagePolicy,def=0" json:"storagePolicy,omitempty"` - // Optional field for erasure coding - EcPolicy *ErasureCodingPolicyProto `protobuf:"bytes,17,opt,name=ecPolicy" json:"ecPolicy,omitempty"` - XXX_unrecognized []byte `json:"-"` + StartPath []byte `protobuf:"bytes,1,req,name=startPath" json:"startPath,omitempty"` + Index *int32 `protobuf:"varint,2,req,name=index,def=-1" json:"index,omitempty"` } -func (m *HdfsFileStatusProto) Reset() { *m = HdfsFileStatusProto{} } -func (m *HdfsFileStatusProto) String() string { return proto.CompactTextString(m) } -func (*HdfsFileStatusProto) ProtoMessage() {} -func (*HdfsFileStatusProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{25} } - -const Default_HdfsFileStatusProto_BlockReplication uint32 = 0 -const Default_HdfsFileStatusProto_Blocksize uint64 = 0 -const Default_HdfsFileStatusProto_FileId uint64 = 0 -const Default_HdfsFileStatusProto_ChildrenNum int32 = -1 -const Default_HdfsFileStatusProto_StoragePolicy uint32 = 0 +// Default values for SnapshotDiffReportCursorProto fields. +const ( + Default_SnapshotDiffReportCursorProto_Index = int32(-1) +) -func (m *HdfsFileStatusProto) GetFileType() HdfsFileStatusProto_FileType { - if m != nil && m.FileType != nil { - return *m.FileType +func (x *SnapshotDiffReportCursorProto) Reset() { + *x = SnapshotDiffReportCursorProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return HdfsFileStatusProto_IS_DIR } -func (m *HdfsFileStatusProto) GetPath() []byte { - if m != nil { - return m.Path - } - return nil +func (x *SnapshotDiffReportCursorProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HdfsFileStatusProto) GetLength() uint64 { - if m != nil && m.Length != nil { - return *m.Length +func (*SnapshotDiffReportCursorProto) ProtoMessage() {} + +func (x *SnapshotDiffReportCursorProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) +} + +// Deprecated: Use SnapshotDiffReportCursorProto.ProtoReflect.Descriptor instead. +func (*SnapshotDiffReportCursorProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{42} } -func (m *HdfsFileStatusProto) GetPermission() *FsPermissionProto { - if m != nil { - return m.Permission +func (x *SnapshotDiffReportCursorProto) GetStartPath() []byte { + if x != nil { + return x.StartPath } return nil } -func (m *HdfsFileStatusProto) GetOwner() string { - if m != nil && m.Owner != nil { - return *m.Owner +func (x *SnapshotDiffReportCursorProto) GetIndex() int32 { + if x != nil && x.Index != nil { + return *x.Index } - return "" + return Default_SnapshotDiffReportCursorProto_Index } -func (m *HdfsFileStatusProto) GetGroup() string { - if m != nil && m.Group != nil { - return *m.Group - } - return "" +//* +// Snapshot diff report listing +type SnapshotDiffReportListingProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // full path of the directory where snapshots were taken + ModifiedEntries []*SnapshotDiffReportListingEntryProto `protobuf:"bytes,1,rep,name=modifiedEntries" json:"modifiedEntries,omitempty"` + CreatedEntries []*SnapshotDiffReportListingEntryProto `protobuf:"bytes,2,rep,name=createdEntries" json:"createdEntries,omitempty"` + DeletedEntries []*SnapshotDiffReportListingEntryProto `protobuf:"bytes,3,rep,name=deletedEntries" json:"deletedEntries,omitempty"` + IsFromEarlier *bool `protobuf:"varint,4,req,name=isFromEarlier" json:"isFromEarlier,omitempty"` + Cursor *SnapshotDiffReportCursorProto `protobuf:"bytes,5,opt,name=cursor" json:"cursor,omitempty"` } -func (m *HdfsFileStatusProto) GetModificationTime() uint64 { - if m != nil && m.ModificationTime != nil { - return *m.ModificationTime +func (x *SnapshotDiffReportListingProto) Reset() { + *x = SnapshotDiffReportListingProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (m *HdfsFileStatusProto) GetAccessTime() uint64 { - if m != nil && m.AccessTime != nil { - return *m.AccessTime - } - return 0 +func (x *SnapshotDiffReportListingProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HdfsFileStatusProto) GetSymlink() []byte { - if m != nil { - return m.Symlink +func (*SnapshotDiffReportListingProto) ProtoMessage() {} + +func (x *SnapshotDiffReportListingProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *HdfsFileStatusProto) GetBlockReplication() uint32 { - if m != nil && m.BlockReplication != nil { - return *m.BlockReplication - } - return Default_HdfsFileStatusProto_BlockReplication +// Deprecated: Use SnapshotDiffReportListingProto.ProtoReflect.Descriptor instead. +func (*SnapshotDiffReportListingProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{43} } -func (m *HdfsFileStatusProto) GetBlocksize() uint64 { - if m != nil && m.Blocksize != nil { - return *m.Blocksize +func (x *SnapshotDiffReportListingProto) GetModifiedEntries() []*SnapshotDiffReportListingEntryProto { + if x != nil { + return x.ModifiedEntries } - return Default_HdfsFileStatusProto_Blocksize + return nil } -func (m *HdfsFileStatusProto) GetLocations() *LocatedBlocksProto { - if m != nil { - return m.Locations +func (x *SnapshotDiffReportListingProto) GetCreatedEntries() []*SnapshotDiffReportListingEntryProto { + if x != nil { + return x.CreatedEntries } return nil } -func (m *HdfsFileStatusProto) GetFileId() uint64 { - if m != nil && m.FileId != nil { - return *m.FileId +func (x *SnapshotDiffReportListingProto) GetDeletedEntries() []*SnapshotDiffReportListingEntryProto { + if x != nil { + return x.DeletedEntries } - return Default_HdfsFileStatusProto_FileId + return nil } -func (m *HdfsFileStatusProto) GetChildrenNum() int32 { - if m != nil && m.ChildrenNum != nil { - return *m.ChildrenNum +func (x *SnapshotDiffReportListingProto) GetIsFromEarlier() bool { + if x != nil && x.IsFromEarlier != nil { + return *x.IsFromEarlier } - return Default_HdfsFileStatusProto_ChildrenNum + return false } -func (m *HdfsFileStatusProto) GetFileEncryptionInfo() *FileEncryptionInfoProto { - if m != nil { - return m.FileEncryptionInfo +func (x *SnapshotDiffReportListingProto) GetCursor() *SnapshotDiffReportCursorProto { + if x != nil { + return x.Cursor } return nil } -func (m *HdfsFileStatusProto) GetStoragePolicy() uint32 { - if m != nil && m.StoragePolicy != nil { - return *m.StoragePolicy - } - return Default_HdfsFileStatusProto_StoragePolicy +//* +// Block information +// +// Please be wary of adding additional fields here, since INodeFiles +// need to fit in PB's default max message size of 64MB. +// We restrict the max # of blocks per file +// (dfs.namenode.fs-limits.max-blocks-per-file), but it's better +// to avoid changing this. +type BlockProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockId *uint64 `protobuf:"varint,1,req,name=blockId" json:"blockId,omitempty"` + GenStamp *uint64 `protobuf:"varint,2,req,name=genStamp" json:"genStamp,omitempty"` + NumBytes *uint64 `protobuf:"varint,3,opt,name=numBytes,def=0" json:"numBytes,omitempty"` } -func (m *HdfsFileStatusProto) GetEcPolicy() *ErasureCodingPolicyProto { - if m != nil { - return m.EcPolicy +// Default values for BlockProto fields. +const ( + Default_BlockProto_NumBytes = uint64(0) +) + +func (x *BlockProto) Reset() { + *x = BlockProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -// * -// HDFS Server Defaults -type FsServerDefaultsProto struct { - BlockSize *uint64 `protobuf:"varint,1,req,name=blockSize" json:"blockSize,omitempty"` - BytesPerChecksum *uint32 `protobuf:"varint,2,req,name=bytesPerChecksum" json:"bytesPerChecksum,omitempty"` - WritePacketSize *uint32 `protobuf:"varint,3,req,name=writePacketSize" json:"writePacketSize,omitempty"` - Replication *uint32 `protobuf:"varint,4,req,name=replication" json:"replication,omitempty"` - FileBufferSize *uint32 `protobuf:"varint,5,req,name=fileBufferSize" json:"fileBufferSize,omitempty"` - EncryptDataTransfer *bool `protobuf:"varint,6,opt,name=encryptDataTransfer,def=0" json:"encryptDataTransfer,omitempty"` - TrashInterval *uint64 `protobuf:"varint,7,opt,name=trashInterval,def=0" json:"trashInterval,omitempty"` - ChecksumType *ChecksumTypeProto `protobuf:"varint,8,opt,name=checksumType,enum=hadoop.hdfs.ChecksumTypeProto,def=1" json:"checksumType,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *BlockProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FsServerDefaultsProto) Reset() { *m = FsServerDefaultsProto{} } -func (m *FsServerDefaultsProto) String() string { return proto.CompactTextString(m) } -func (*FsServerDefaultsProto) ProtoMessage() {} -func (*FsServerDefaultsProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{26} } - -const Default_FsServerDefaultsProto_EncryptDataTransfer bool = false -const Default_FsServerDefaultsProto_TrashInterval uint64 = 0 -const Default_FsServerDefaultsProto_ChecksumType ChecksumTypeProto = ChecksumTypeProto_CHECKSUM_CRC32 +func (*BlockProto) ProtoMessage() {} -func (m *FsServerDefaultsProto) GetBlockSize() uint64 { - if m != nil && m.BlockSize != nil { - return *m.BlockSize +func (x *BlockProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (m *FsServerDefaultsProto) GetBytesPerChecksum() uint32 { - if m != nil && m.BytesPerChecksum != nil { - return *m.BytesPerChecksum - } - return 0 +// Deprecated: Use BlockProto.ProtoReflect.Descriptor instead. +func (*BlockProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{44} } -func (m *FsServerDefaultsProto) GetWritePacketSize() uint32 { - if m != nil && m.WritePacketSize != nil { - return *m.WritePacketSize +func (x *BlockProto) GetBlockId() uint64 { + if x != nil && x.BlockId != nil { + return *x.BlockId } return 0 } -func (m *FsServerDefaultsProto) GetReplication() uint32 { - if m != nil && m.Replication != nil { - return *m.Replication +func (x *BlockProto) GetGenStamp() uint64 { + if x != nil && x.GenStamp != nil { + return *x.GenStamp } return 0 } -func (m *FsServerDefaultsProto) GetFileBufferSize() uint32 { - if m != nil && m.FileBufferSize != nil { - return *m.FileBufferSize +func (x *BlockProto) GetNumBytes() uint64 { + if x != nil && x.NumBytes != nil { + return *x.NumBytes } - return 0 + return Default_BlockProto_NumBytes } -func (m *FsServerDefaultsProto) GetEncryptDataTransfer() bool { - if m != nil && m.EncryptDataTransfer != nil { - return *m.EncryptDataTransfer - } - return Default_FsServerDefaultsProto_EncryptDataTransfer -} +//* +// Information related to a snapshot +// TODO: add more information +type SnapshotInfoProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *FsServerDefaultsProto) GetTrashInterval() uint64 { - if m != nil && m.TrashInterval != nil { - return *m.TrashInterval - } - return Default_FsServerDefaultsProto_TrashInterval + SnapshotName *string `protobuf:"bytes,1,req,name=snapshotName" json:"snapshotName,omitempty"` + SnapshotRoot *string `protobuf:"bytes,2,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` + Permission *FsPermissionProto `protobuf:"bytes,3,req,name=permission" json:"permission,omitempty"` + Owner *string `protobuf:"bytes,4,req,name=owner" json:"owner,omitempty"` + Group *string `protobuf:"bytes,5,req,name=group" json:"group,omitempty"` + CreateTime *string `protobuf:"bytes,6,req,name=createTime" json:"createTime,omitempty"` // TODO: do we need access time? } -func (m *FsServerDefaultsProto) GetChecksumType() ChecksumTypeProto { - if m != nil && m.ChecksumType != nil { - return *m.ChecksumType +func (x *SnapshotInfoProto) Reset() { + *x = SnapshotInfoProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return Default_FsServerDefaultsProto_ChecksumType } -// * -// Directory listing -type DirectoryListingProto struct { - PartialListing []*HdfsFileStatusProto `protobuf:"bytes,1,rep,name=partialListing" json:"partialListing,omitempty"` - RemainingEntries *uint32 `protobuf:"varint,2,req,name=remainingEntries" json:"remainingEntries,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *SnapshotInfoProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DirectoryListingProto) Reset() { *m = DirectoryListingProto{} } -func (m *DirectoryListingProto) String() string { return proto.CompactTextString(m) } -func (*DirectoryListingProto) ProtoMessage() {} -func (*DirectoryListingProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{27} } +func (*SnapshotInfoProto) ProtoMessage() {} -func (m *DirectoryListingProto) GetPartialListing() []*HdfsFileStatusProto { - if m != nil { - return m.PartialListing +func (x *SnapshotInfoProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) } -func (m *DirectoryListingProto) GetRemainingEntries() uint32 { - if m != nil && m.RemainingEntries != nil { - return *m.RemainingEntries - } - return 0 +// Deprecated: Use SnapshotInfoProto.ProtoReflect.Descriptor instead. +func (*SnapshotInfoProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{45} } -// * -// Status of a snapshottable directory: besides the normal information for -// a directory status, also include snapshot quota, number of snapshots, and -// the full path of the parent directory. -type SnapshottableDirectoryStatusProto struct { - DirStatus *HdfsFileStatusProto `protobuf:"bytes,1,req,name=dirStatus" json:"dirStatus,omitempty"` - // Fields specific for snapshottable directory - SnapshotQuota *uint32 `protobuf:"varint,2,req,name=snapshot_quota,json=snapshotQuota" json:"snapshot_quota,omitempty"` - SnapshotNumber *uint32 `protobuf:"varint,3,req,name=snapshot_number,json=snapshotNumber" json:"snapshot_number,omitempty"` - ParentFullpath []byte `protobuf:"bytes,4,req,name=parent_fullpath,json=parentFullpath" json:"parent_fullpath,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *SnapshotInfoProto) GetSnapshotName() string { + if x != nil && x.SnapshotName != nil { + return *x.SnapshotName + } + return "" } -func (m *SnapshottableDirectoryStatusProto) Reset() { *m = SnapshottableDirectoryStatusProto{} } -func (m *SnapshottableDirectoryStatusProto) String() string { return proto.CompactTextString(m) } -func (*SnapshottableDirectoryStatusProto) ProtoMessage() {} -func (*SnapshottableDirectoryStatusProto) Descriptor() ([]byte, []int) { - return fileDescriptor8, []int{28} +func (x *SnapshotInfoProto) GetSnapshotRoot() string { + if x != nil && x.SnapshotRoot != nil { + return *x.SnapshotRoot + } + return "" } -func (m *SnapshottableDirectoryStatusProto) GetDirStatus() *HdfsFileStatusProto { - if m != nil { - return m.DirStatus +func (x *SnapshotInfoProto) GetPermission() *FsPermissionProto { + if x != nil { + return x.Permission } return nil } -func (m *SnapshottableDirectoryStatusProto) GetSnapshotQuota() uint32 { - if m != nil && m.SnapshotQuota != nil { - return *m.SnapshotQuota +func (x *SnapshotInfoProto) GetOwner() string { + if x != nil && x.Owner != nil { + return *x.Owner } - return 0 + return "" } -func (m *SnapshottableDirectoryStatusProto) GetSnapshotNumber() uint32 { - if m != nil && m.SnapshotNumber != nil { - return *m.SnapshotNumber +func (x *SnapshotInfoProto) GetGroup() string { + if x != nil && x.Group != nil { + return *x.Group } - return 0 + return "" } -func (m *SnapshottableDirectoryStatusProto) GetParentFullpath() []byte { - if m != nil { - return m.ParentFullpath +func (x *SnapshotInfoProto) GetCreateTime() string { + if x != nil && x.CreateTime != nil { + return *x.CreateTime } - return nil + return "" } -// * -// Snapshottable directory listing -type SnapshottableDirectoryListingProto struct { - SnapshottableDirListing []*SnapshottableDirectoryStatusProto `protobuf:"bytes,1,rep,name=snapshottableDirListing" json:"snapshottableDirListing,omitempty"` - XXX_unrecognized []byte `json:"-"` -} +//* +// Rolling upgrade status +type RollingUpgradeStatusProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SnapshottableDirectoryListingProto) Reset() { *m = SnapshottableDirectoryListingProto{} } -func (m *SnapshottableDirectoryListingProto) String() string { return proto.CompactTextString(m) } -func (*SnapshottableDirectoryListingProto) ProtoMessage() {} -func (*SnapshottableDirectoryListingProto) Descriptor() ([]byte, []int) { - return fileDescriptor8, []int{29} + BlockPoolId *string `protobuf:"bytes,1,req,name=blockPoolId" json:"blockPoolId,omitempty"` + Finalized *bool `protobuf:"varint,2,opt,name=finalized,def=0" json:"finalized,omitempty"` } -func (m *SnapshottableDirectoryListingProto) GetSnapshottableDirListing() []*SnapshottableDirectoryStatusProto { - if m != nil { - return m.SnapshottableDirListing +// Default values for RollingUpgradeStatusProto fields. +const ( + Default_RollingUpgradeStatusProto_Finalized = bool(false) +) + +func (x *RollingUpgradeStatusProto) Reset() { + *x = RollingUpgradeStatusProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -// * -// Snapshot diff report entry -type SnapshotDiffReportEntryProto struct { - Fullpath []byte `protobuf:"bytes,1,req,name=fullpath" json:"fullpath,omitempty"` - ModificationLabel *string `protobuf:"bytes,2,req,name=modificationLabel" json:"modificationLabel,omitempty"` - TargetPath []byte `protobuf:"bytes,3,opt,name=targetPath" json:"targetPath,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *RollingUpgradeStatusProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SnapshotDiffReportEntryProto) Reset() { *m = SnapshotDiffReportEntryProto{} } -func (m *SnapshotDiffReportEntryProto) String() string { return proto.CompactTextString(m) } -func (*SnapshotDiffReportEntryProto) ProtoMessage() {} -func (*SnapshotDiffReportEntryProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{30} } +func (*RollingUpgradeStatusProto) ProtoMessage() {} -func (m *SnapshotDiffReportEntryProto) GetFullpath() []byte { - if m != nil { - return m.Fullpath +func (x *RollingUpgradeStatusProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) +} + +// Deprecated: Use RollingUpgradeStatusProto.ProtoReflect.Descriptor instead. +func (*RollingUpgradeStatusProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{46} } -func (m *SnapshotDiffReportEntryProto) GetModificationLabel() string { - if m != nil && m.ModificationLabel != nil { - return *m.ModificationLabel +func (x *RollingUpgradeStatusProto) GetBlockPoolId() string { + if x != nil && x.BlockPoolId != nil { + return *x.BlockPoolId } return "" } -func (m *SnapshotDiffReportEntryProto) GetTargetPath() []byte { - if m != nil { - return m.TargetPath +func (x *RollingUpgradeStatusProto) GetFinalized() bool { + if x != nil && x.Finalized != nil { + return *x.Finalized } - return nil + return Default_RollingUpgradeStatusProto_Finalized } -// * -// Snapshot diff report -type SnapshotDiffReportProto struct { - // full path of the directory where snapshots were taken - SnapshotRoot *string `protobuf:"bytes,1,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` - FromSnapshot *string `protobuf:"bytes,2,req,name=fromSnapshot" json:"fromSnapshot,omitempty"` - ToSnapshot *string `protobuf:"bytes,3,req,name=toSnapshot" json:"toSnapshot,omitempty"` - DiffReportEntries []*SnapshotDiffReportEntryProto `protobuf:"bytes,4,rep,name=diffReportEntries" json:"diffReportEntries,omitempty"` - XXX_unrecognized []byte `json:"-"` -} +//* +// A list of storage IDs. +type StorageUuidsProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SnapshotDiffReportProto) Reset() { *m = SnapshotDiffReportProto{} } -func (m *SnapshotDiffReportProto) String() string { return proto.CompactTextString(m) } -func (*SnapshotDiffReportProto) ProtoMessage() {} -func (*SnapshotDiffReportProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{31} } + StorageUuids []string `protobuf:"bytes,1,rep,name=storageUuids" json:"storageUuids,omitempty"` +} -func (m *SnapshotDiffReportProto) GetSnapshotRoot() string { - if m != nil && m.SnapshotRoot != nil { - return *m.SnapshotRoot +func (x *StorageUuidsProto) Reset() { + *x = StorageUuidsProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -func (m *SnapshotDiffReportProto) GetFromSnapshot() string { - if m != nil && m.FromSnapshot != nil { - return *m.FromSnapshot - } - return "" +func (x *StorageUuidsProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SnapshotDiffReportProto) GetToSnapshot() string { - if m != nil && m.ToSnapshot != nil { - return *m.ToSnapshot +func (*StorageUuidsProto) ProtoMessage() {} + +func (x *StorageUuidsProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) +} + +// Deprecated: Use StorageUuidsProto.ProtoReflect.Descriptor instead. +func (*StorageUuidsProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{47} } -func (m *SnapshotDiffReportProto) GetDiffReportEntries() []*SnapshotDiffReportEntryProto { - if m != nil { - return m.DiffReportEntries +func (x *StorageUuidsProto) GetStorageUuids() []string { + if x != nil { + return x.StorageUuids } return nil } -// * -// Block information +//* +// Secret information for the BlockKeyProto. This is not sent on the wire as +// such but is used to pack a byte array and encrypted and put in +// BlockKeyProto.bytes +// When adding further fields, make sure they are optional as they would +// otherwise not be backwards compatible. // -// Please be wary of adding additional fields here, since INodeFiles -// need to fit in PB's default max message size of 64MB. -// We restrict the max # of blocks per file -// (dfs.namenode.fs-limits.max-blocks-per-file), but it's better -// to avoid changing this. -type BlockProto struct { - BlockId *uint64 `protobuf:"varint,1,req,name=blockId" json:"blockId,omitempty"` - GenStamp *uint64 `protobuf:"varint,2,req,name=genStamp" json:"genStamp,omitempty"` - NumBytes *uint64 `protobuf:"varint,3,opt,name=numBytes,def=0" json:"numBytes,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *BlockProto) Reset() { *m = BlockProto{} } -func (m *BlockProto) String() string { return proto.CompactTextString(m) } -func (*BlockProto) ProtoMessage() {} -func (*BlockProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{32} } +// Note: As part of the migration from WritableUtils based tokens (aka "legacy") +// to Protocol Buffers, we use the first byte to determine the type. If the +// first byte is <=0 then it is a legacy token. This means that when using +// protobuf tokens, the the first field sent must have a `field_number` less +// than 16 to make sure that the first byte is positive. Otherwise it could be +// parsed as a legacy token. See HDFS-11026 for more discussion. +type BlockTokenSecretProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -const Default_BlockProto_NumBytes uint64 = 0 + ExpiryDate *uint64 `protobuf:"varint,1,opt,name=expiryDate" json:"expiryDate,omitempty"` + KeyId *uint32 `protobuf:"varint,2,opt,name=keyId" json:"keyId,omitempty"` + UserId *string `protobuf:"bytes,3,opt,name=userId" json:"userId,omitempty"` + BlockPoolId *string `protobuf:"bytes,4,opt,name=blockPoolId" json:"blockPoolId,omitempty"` + BlockId *uint64 `protobuf:"varint,5,opt,name=blockId" json:"blockId,omitempty"` + Modes []AccessModeProto `protobuf:"varint,6,rep,name=modes,enum=hadoop.hdfs.AccessModeProto" json:"modes,omitempty"` + StorageTypes []StorageTypeProto `protobuf:"varint,7,rep,name=storageTypes,enum=hadoop.hdfs.StorageTypeProto" json:"storageTypes,omitempty"` + StorageIds []string `protobuf:"bytes,8,rep,name=storageIds" json:"storageIds,omitempty"` + HandshakeSecret []byte `protobuf:"bytes,9,opt,name=handshakeSecret" json:"handshakeSecret,omitempty"` +} -func (m *BlockProto) GetBlockId() uint64 { - if m != nil && m.BlockId != nil { - return *m.BlockId +func (x *BlockTokenSecretProto) Reset() { + *x = BlockTokenSecretProto{} + if protoimpl.UnsafeEnabled { + mi := &file_hdfs_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (m *BlockProto) GetGenStamp() uint64 { - if m != nil && m.GenStamp != nil { - return *m.GenStamp - } - return 0 +func (x *BlockTokenSecretProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BlockProto) GetNumBytes() uint64 { - if m != nil && m.NumBytes != nil { - return *m.NumBytes +func (*BlockTokenSecretProto) ProtoMessage() {} + +func (x *BlockTokenSecretProto) ProtoReflect() protoreflect.Message { + mi := &file_hdfs_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return Default_BlockProto_NumBytes + return mi.MessageOf(x) } -// * -// Information related to a snapshot -// TODO: add more information -type SnapshotInfoProto struct { - SnapshotName *string `protobuf:"bytes,1,req,name=snapshotName" json:"snapshotName,omitempty"` - SnapshotRoot *string `protobuf:"bytes,2,req,name=snapshotRoot" json:"snapshotRoot,omitempty"` - Permission *FsPermissionProto `protobuf:"bytes,3,req,name=permission" json:"permission,omitempty"` - Owner *string `protobuf:"bytes,4,req,name=owner" json:"owner,omitempty"` - Group *string `protobuf:"bytes,5,req,name=group" json:"group,omitempty"` - CreateTime *string `protobuf:"bytes,6,req,name=createTime" json:"createTime,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Deprecated: Use BlockTokenSecretProto.ProtoReflect.Descriptor instead. +func (*BlockTokenSecretProto) Descriptor() ([]byte, []int) { + return file_hdfs_proto_rawDescGZIP(), []int{48} } -func (m *SnapshotInfoProto) Reset() { *m = SnapshotInfoProto{} } -func (m *SnapshotInfoProto) String() string { return proto.CompactTextString(m) } -func (*SnapshotInfoProto) ProtoMessage() {} -func (*SnapshotInfoProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{33} } - -func (m *SnapshotInfoProto) GetSnapshotName() string { - if m != nil && m.SnapshotName != nil { - return *m.SnapshotName +func (x *BlockTokenSecretProto) GetExpiryDate() uint64 { + if x != nil && x.ExpiryDate != nil { + return *x.ExpiryDate } - return "" + return 0 } -func (m *SnapshotInfoProto) GetSnapshotRoot() string { - if m != nil && m.SnapshotRoot != nil { - return *m.SnapshotRoot +func (x *BlockTokenSecretProto) GetKeyId() uint32 { + if x != nil && x.KeyId != nil { + return *x.KeyId } - return "" + return 0 } -func (m *SnapshotInfoProto) GetPermission() *FsPermissionProto { - if m != nil { - return m.Permission +func (x *BlockTokenSecretProto) GetUserId() string { + if x != nil && x.UserId != nil { + return *x.UserId } - return nil + return "" } -func (m *SnapshotInfoProto) GetOwner() string { - if m != nil && m.Owner != nil { - return *m.Owner +func (x *BlockTokenSecretProto) GetBlockPoolId() string { + if x != nil && x.BlockPoolId != nil { + return *x.BlockPoolId } return "" } -func (m *SnapshotInfoProto) GetGroup() string { - if m != nil && m.Group != nil { - return *m.Group +func (x *BlockTokenSecretProto) GetBlockId() uint64 { + if x != nil && x.BlockId != nil { + return *x.BlockId } - return "" + return 0 } -func (m *SnapshotInfoProto) GetCreateTime() string { - if m != nil && m.CreateTime != nil { - return *m.CreateTime +func (x *BlockTokenSecretProto) GetModes() []AccessModeProto { + if x != nil { + return x.Modes } - return "" + return nil } -// * -// Rolling upgrade status -type RollingUpgradeStatusProto struct { - BlockPoolId *string `protobuf:"bytes,1,req,name=blockPoolId" json:"blockPoolId,omitempty"` - Finalized *bool `protobuf:"varint,2,opt,name=finalized,def=0" json:"finalized,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (x *BlockTokenSecretProto) GetStorageTypes() []StorageTypeProto { + if x != nil { + return x.StorageTypes + } + return nil } -func (m *RollingUpgradeStatusProto) Reset() { *m = RollingUpgradeStatusProto{} } -func (m *RollingUpgradeStatusProto) String() string { return proto.CompactTextString(m) } -func (*RollingUpgradeStatusProto) ProtoMessage() {} -func (*RollingUpgradeStatusProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{34} } - -const Default_RollingUpgradeStatusProto_Finalized bool = false - -func (m *RollingUpgradeStatusProto) GetBlockPoolId() string { - if m != nil && m.BlockPoolId != nil { - return *m.BlockPoolId +func (x *BlockTokenSecretProto) GetStorageIds() []string { + if x != nil { + return x.StorageIds } - return "" + return nil } -func (m *RollingUpgradeStatusProto) GetFinalized() bool { - if m != nil && m.Finalized != nil { - return *m.Finalized +func (x *BlockTokenSecretProto) GetHandshakeSecret() []byte { + if x != nil { + return x.HandshakeSecret } - return Default_RollingUpgradeStatusProto_Finalized + return nil } -// * -// A list of storage IDs. -type StorageUuidsProto struct { - StorageUuids []string `protobuf:"bytes,1,rep,name=storageUuids" json:"storageUuids,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *StorageUuidsProto) Reset() { *m = StorageUuidsProto{} } -func (m *StorageUuidsProto) String() string { return proto.CompactTextString(m) } -func (*StorageUuidsProto) ProtoMessage() {} -func (*StorageUuidsProto) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{35} } - -func (m *StorageUuidsProto) GetStorageUuids() []string { - if m != nil { - return m.StorageUuids - } - return nil -} - -func init() { - proto.RegisterType((*ExtendedBlockProto)(nil), "hadoop.hdfs.ExtendedBlockProto") - proto.RegisterType((*DatanodeIDProto)(nil), "hadoop.hdfs.DatanodeIDProto") - proto.RegisterType((*DatanodeLocalInfoProto)(nil), "hadoop.hdfs.DatanodeLocalInfoProto") - proto.RegisterType((*DatanodeInfosProto)(nil), "hadoop.hdfs.DatanodeInfosProto") - proto.RegisterType((*DatanodeInfoProto)(nil), "hadoop.hdfs.DatanodeInfoProto") - proto.RegisterType((*DatanodeStorageProto)(nil), "hadoop.hdfs.DatanodeStorageProto") - proto.RegisterType((*StorageReportProto)(nil), "hadoop.hdfs.StorageReportProto") - proto.RegisterType((*ContentSummaryProto)(nil), "hadoop.hdfs.ContentSummaryProto") - proto.RegisterType((*QuotaUsageProto)(nil), "hadoop.hdfs.QuotaUsageProto") - proto.RegisterType((*StorageTypeQuotaInfosProto)(nil), "hadoop.hdfs.StorageTypeQuotaInfosProto") - proto.RegisterType((*StorageTypeQuotaInfoProto)(nil), "hadoop.hdfs.StorageTypeQuotaInfoProto") - proto.RegisterType((*CorruptFileBlocksProto)(nil), "hadoop.hdfs.CorruptFileBlocksProto") - proto.RegisterType((*FsPermissionProto)(nil), "hadoop.hdfs.FsPermissionProto") - proto.RegisterType((*StorageTypesProto)(nil), "hadoop.hdfs.StorageTypesProto") - proto.RegisterType((*BlockStoragePolicyProto)(nil), "hadoop.hdfs.BlockStoragePolicyProto") - proto.RegisterType((*LocatedBlockProto)(nil), "hadoop.hdfs.LocatedBlockProto") - proto.RegisterType((*DataEncryptionKeyProto)(nil), "hadoop.hdfs.DataEncryptionKeyProto") - proto.RegisterType((*FileEncryptionInfoProto)(nil), "hadoop.hdfs.FileEncryptionInfoProto") - proto.RegisterType((*PerFileEncryptionInfoProto)(nil), "hadoop.hdfs.PerFileEncryptionInfoProto") - proto.RegisterType((*ZoneEncryptionInfoProto)(nil), "hadoop.hdfs.ZoneEncryptionInfoProto") - proto.RegisterType((*CipherOptionProto)(nil), "hadoop.hdfs.CipherOptionProto") - proto.RegisterType((*LocatedBlocksProto)(nil), "hadoop.hdfs.LocatedBlocksProto") - proto.RegisterType((*ECSchemaOptionEntryProto)(nil), "hadoop.hdfs.ECSchemaOptionEntryProto") - proto.RegisterType((*ECSchemaProto)(nil), "hadoop.hdfs.ECSchemaProto") - proto.RegisterType((*ErasureCodingPolicyProto)(nil), "hadoop.hdfs.ErasureCodingPolicyProto") - proto.RegisterType((*HdfsFileStatusProto)(nil), "hadoop.hdfs.HdfsFileStatusProto") - proto.RegisterType((*FsServerDefaultsProto)(nil), "hadoop.hdfs.FsServerDefaultsProto") - proto.RegisterType((*DirectoryListingProto)(nil), "hadoop.hdfs.DirectoryListingProto") - proto.RegisterType((*SnapshottableDirectoryStatusProto)(nil), "hadoop.hdfs.SnapshottableDirectoryStatusProto") - proto.RegisterType((*SnapshottableDirectoryListingProto)(nil), "hadoop.hdfs.SnapshottableDirectoryListingProto") - proto.RegisterType((*SnapshotDiffReportEntryProto)(nil), "hadoop.hdfs.SnapshotDiffReportEntryProto") - proto.RegisterType((*SnapshotDiffReportProto)(nil), "hadoop.hdfs.SnapshotDiffReportProto") - proto.RegisterType((*BlockProto)(nil), "hadoop.hdfs.BlockProto") - proto.RegisterType((*SnapshotInfoProto)(nil), "hadoop.hdfs.SnapshotInfoProto") - proto.RegisterType((*RollingUpgradeStatusProto)(nil), "hadoop.hdfs.RollingUpgradeStatusProto") - proto.RegisterType((*StorageUuidsProto)(nil), "hadoop.hdfs.StorageUuidsProto") - proto.RegisterEnum("hadoop.hdfs.StorageTypeProto", StorageTypeProto_name, StorageTypeProto_value) - proto.RegisterEnum("hadoop.hdfs.CipherSuiteProto", CipherSuiteProto_name, CipherSuiteProto_value) - proto.RegisterEnum("hadoop.hdfs.CryptoProtocolVersionProto", CryptoProtocolVersionProto_name, CryptoProtocolVersionProto_value) - proto.RegisterEnum("hadoop.hdfs.ChecksumTypeProto", ChecksumTypeProto_name, ChecksumTypeProto_value) - proto.RegisterEnum("hadoop.hdfs.DatanodeInfoProto_AdminState", DatanodeInfoProto_AdminState_name, DatanodeInfoProto_AdminState_value) - proto.RegisterEnum("hadoop.hdfs.DatanodeStorageProto_StorageState", DatanodeStorageProto_StorageState_name, DatanodeStorageProto_StorageState_value) - proto.RegisterEnum("hadoop.hdfs.HdfsFileStatusProto_FileType", HdfsFileStatusProto_FileType_name, HdfsFileStatusProto_FileType_value) -} - -func init() { proto.RegisterFile("hdfs.proto", fileDescriptor8) } - -var fileDescriptor8 = []byte{ - // 2923 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x73, 0x1b, 0xc7, - 0xb1, 0xf7, 0x2e, 0x00, 0x12, 0x68, 0x92, 0x20, 0x38, 0xfa, 0x82, 0x68, 0x59, 0xa6, 0xf7, 0x49, - 0x16, 0xad, 0x67, 0xb3, 0x6c, 0xea, 0x95, 0x5d, 0x4f, 0xf6, 0xf3, 0x0b, 0x09, 0x80, 0x16, 0x4a, - 0x10, 0x40, 0x0f, 0x48, 0xb9, 0xec, 0x4a, 0x0a, 0xb5, 0xdc, 0x1d, 0x10, 0x1b, 0x2e, 0x76, 0x36, - 0xbb, 0x0b, 0x5a, 0xf0, 0x29, 0xc7, 0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x24, 0x34, 0x26, 0x31, 0x5b, 0x4d, 0xed, 0x74, 0xc7, - 0x36, 0xfe, 0xb0, 0x02, 0xd7, 0x9e, 0xd8, 0xc3, 0x50, 0x1c, 0xbe, 0x78, 0x36, 0x4f, 0x54, 0xb0, - 0xb4, 0xa0, 0x2c, 0x8e, 0xfd, 0x24, 0xed, 0xad, 0xf3, 0xd3, 0x95, 0x05, 0x32, 0x78, 0x81, 0x84, - 0x00, 0x4d, 0x44, 0xb1, 0xb9, 0x35, 0xa3, 0x91, 0xca, 0x9a, 0xf8, 0x3b, 0xf3, 0x7c, 0x2c, 0xe4, - 0x9e, 0x8f, 0x9f, 0x02, 0xf8, 0x49, 0x6f, 0x8c, 0x5b, 0x9c, 0x0d, 0x8d, 0xb9, 0xe6, 0x99, 0x66, - 0x24, 0x30, 0x19, 0x7c, 0xed, 0xb1, 0x40, 0xd5, 0x04, 0x49, 0x08, 0xf4, 0x3c, 0xe0, 0x13, 0x5f, - 0x95, 0x01, 0x49, 0x90, 0xff, 0x86, 0xad, 0x31, 0xb7, 0x9d, 0xa1, 0x6a, 0xee, 0x06, 0x38, 0xe5, - 0x5b, 0xc5, 0xed, 0xd4, 0xb2, 0x0b, 0x27, 0xce, 0x98, 0x91, 0x37, 0x61, 0xcd, 0xb4, 0x2c, 0x16, - 0x86, 0x92, 0xad, 0x2c, 0x33, 0x87, 0x84, 0x90, 0xa1, 0x0e, 0xab, 0xe1, 0x74, 0xec, 0x3a, 0xde, - 0x85, 0x6a, 0x4f, 0x62, 0x92, 0xec, 0xc1, 0x16, 0x66, 0x89, 0x41, 0xa6, 0x93, 0xc4, 0x69, 0x15, - 0x8e, 0xbb, 0x6a, 0xb8, 0x46, 0xd3, 0x25, 0xf1, 0xf2, 0x97, 0x59, 0x45, 0x9c, 0x5d, 0x32, 0x7f, - 0x4a, 0x31, 0xf2, 0x7f, 0x50, 0x89, 0x67, 0x60, 0x21, 0xce, 0x9e, 0x66, 0x3b, 0xcd, 0xf9, 0xc4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, 0xe4, 0x0e, 0xd4, 0x95, 0x86, - 0xc1, 0x31, 0xed, 0x9d, 0xf4, 0x1a, 0xbd, 0xce, 0xe0, 0x79, 0x8b, 0xf6, 0xdb, 0x3d, 0xa1, 0xf2, - 0x3a, 0xd4, 0x5a, 0xdd, 0x06, 0xfd, 0xf2, 0xf8, 0xa4, 0xdd, 0xeb, 0x0e, 0xbe, 0xea, 0x75, 0x5b, - 0xfd, 0x9a, 0xfe, 0xb0, 0x07, 0x5b, 0x73, 0x05, 0x85, 0x6c, 0xc1, 0x46, 0x52, 0x52, 0xba, 0xa7, - 0x9d, 0x4e, 0xed, 0x35, 0x42, 0x60, 0xa6, 0xca, 0xd4, 0x34, 0x72, 0x0d, 0x36, 0xf3, 0x58, 0xa3, - 0xa6, 0x1f, 0x7e, 0x08, 0xf7, 0x79, 0x70, 0xbe, 0x67, 0xfa, 0xa6, 0x35, 0x62, 0xb9, 0xdb, 0xe3, - 0xab, 0x3d, 0xcb, 0x1f, 0x87, 0x20, 0x32, 0x38, 0x7e, 0x2f, 0xfc, 0x56, 0xd3, 0xfe, 0x15, 0x00, - 0x00, 0xff, 0xff, 0xd4, 0x8c, 0x02, 0x21, 0x4f, 0x20, 0x00, 0x00, +var File_hdfs_proto protoreflect.FileDescriptor + +var file_hdfs_proto_rawDesc = []byte{ + 0x0a, 0x0a, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x1a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x61, 0x63, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, + 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6f, + 0x6c, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x28, 0x0a, + 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x08, 0x6e, 0x75, + 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x78, 0x0a, 0x1c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x02, + 0x28, 0x03, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x22, 0xe6, 0x01, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, + 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, + 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x55, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, + 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x78, 0x66, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, + 0x78, 0x66, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x66, 0x6f, + 0x50, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x69, 0x6e, 0x66, 0x6f, + 0x50, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x18, + 0x06, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x07, 0x69, 0x70, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x29, + 0x0a, 0x0e, 0x69, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x72, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x3a, 0x01, 0x30, 0x52, 0x0e, 0x69, 0x6e, 0x66, 0x6f, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x16, 0x44, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0f, 0x73, + 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, + 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x02, 0x28, 0x04, 0x52, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xaa, 0x02, 0x0a, + 0x17, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x0b, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, + 0x0e, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x75, 0x73, 0x65, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, + 0x52, 0x09, 0x75, 0x73, 0x65, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x66, + 0x72, 0x65, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, + 0x66, 0x72, 0x65, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, + 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x3a, 0x0a, 0x18, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x46, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x06, 0x20, 0x02, 0x28, + 0x04, 0x52, 0x18, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x53, 0x70, 0x61, 0x63, 0x65, + 0x46, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, + 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x52, 0x0a, 0x12, 0x44, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x3c, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0xd3, 0x06, + 0x0a, 0x11, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x2c, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x1d, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, + 0x12, 0x1b, 0x0a, 0x07, 0x64, 0x66, 0x73, 0x55, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x3a, 0x01, 0x30, 0x52, 0x07, 0x64, 0x66, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x1f, 0x0a, + 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x3a, 0x01, 0x30, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x27, + 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x6f, 0x6f, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x0a, + 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x0c, 0x78, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, + 0x3a, 0x01, 0x30, 0x52, 0x0c, 0x78, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, + 0x0a, 0x6e, 0x6f, 0x6e, 0x44, 0x66, 0x73, 0x55, 0x73, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0a, 0x6e, 0x6f, 0x6e, 0x44, 0x66, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x51, 0x0a, + 0x0a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x29, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, 0x06, 0x4e, 0x4f, + 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x0a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x27, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, + 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x09, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x55, 0x73, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, + 0x09, 0x63, 0x61, 0x63, 0x68, 0x65, 0x55, 0x73, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x13, 0x6c, 0x61, + 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x6f, 0x74, 0x6f, 0x6e, 0x69, + 0x63, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x12, + 0x24, 0x0a, 0x0d, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x44, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x18, 0x6c, 0x61, + 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x6e, + 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, + 0x18, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x4d, 0x6f, 0x6e, 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x12, 0x1f, 0x0a, 0x09, 0x6e, 0x75, 0x6d, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, 0x3a, 0x01, 0x30, 0x52, + 0x09, 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x77, 0x0a, 0x0a, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, + 0x41, 0x4c, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x45, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x53, + 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, + 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, + 0x4e, 0x45, 0x44, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x49, 0x4e, + 0x47, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x12, + 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, + 0x45, 0x10, 0x04, 0x22, 0xff, 0x01, 0x0a, 0x14, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x0a, 0x0b, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x12, 0x4c, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, 0x06, 0x4e, + 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x0b, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x3a, 0x04, 0x44, 0x49, 0x53, 0x4b, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, + 0x14, 0x0a, 0x10, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x53, 0x48, 0x41, + 0x52, 0x45, 0x44, 0x10, 0x01, 0x22, 0xbc, 0x02, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x0a, 0x0b, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, + 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x12, 0x1d, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, + 0x12, 0x1b, 0x0a, 0x07, 0x64, 0x66, 0x73, 0x55, 0x73, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x3a, 0x01, 0x30, 0x52, 0x07, 0x64, 0x66, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x1f, 0x0a, + 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x3a, 0x01, 0x30, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x27, + 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x6f, 0x6f, 0x6c, 0x55, 0x73, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x6e, 0x44, 0x66, 0x73, 0x55, 0x73, + 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6e, 0x6f, 0x6e, 0x44, 0x66, 0x73, + 0x55, 0x73, 0x65, 0x64, 0x22, 0x96, 0x04, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x06, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0e, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, + 0x6f, 0x74, 0x61, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, + 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x64, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0d, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x70, 0x61, 0x63, 0x65, 0x51, + 0x75, 0x6f, 0x74, 0x61, 0x18, 0x06, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x4f, 0x0a, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x51, 0x75, + 0x6f, 0x74, 0x61, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x49, 0x6e, 0x66, + 0x6f, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x51, 0x75, 0x6f, + 0x74, 0x61, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, + 0x2c, 0x0a, 0x11, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, + 0x16, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x53, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x53, 0x70, + 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x13, 0x65, + 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x72, 0x61, 0x73, 0x75, 0x72, + 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xf4, 0x01, + 0x0a, 0x0f, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x34, 0x0a, 0x15, 0x66, 0x69, 0x6c, 0x65, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, + 0x52, 0x15, 0x66, 0x69, 0x6c, 0x65, 0x41, 0x6e, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x24, 0x0a, + 0x0d, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x02, 0x28, 0x04, 0x52, 0x0d, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x75, + 0x6d, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x70, 0x61, 0x63, 0x65, 0x51, 0x75, 0x6f, 0x74, + 0x61, 0x18, 0x04, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x70, 0x61, 0x63, 0x65, 0x51, 0x75, + 0x6f, 0x74, 0x61, 0x12, 0x4f, 0x0a, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, + 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x49, + 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x6a, 0x0a, 0x1a, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x4c, 0x0a, 0x0d, 0x74, 0x79, 0x70, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x49, + 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x0d, 0x74, 0x79, 0x70, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x86, 0x01, 0x0a, 0x19, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x51, 0x75, 0x6f, 0x74, 0x61, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x04, 0x44, 0x49, 0x53, + 0x4b, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x1a, 0x0a, + 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x04, 0x52, + 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x22, 0x46, 0x0a, 0x16, 0x43, 0x6f, 0x72, + 0x72, 0x75, 0x70, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6f, + 0x6b, 0x69, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, + 0x65, 0x22, 0x56, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0c, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xc7, 0x02, 0x0a, 0x17, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0e, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x56, 0x0a, + 0x16, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x16, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5c, 0x0a, 0x19, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x19, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x22, 0xc7, 0x03, 0x0a, 0x11, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x0a, 0x01, 0x62, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x01, 0x62, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x12, 0x32, 0x0a, 0x04, 0x6c, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, + 0x6c, 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x18, + 0x04, 0x20, 0x02, 0x28, 0x08, 0x52, 0x07, 0x63, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x12, 0x39, + 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x02, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x0a, 0x08, 0x69, 0x73, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x08, 0x42, 0x02, 0x10, 0x01, 0x52, + 0x08, 0x69, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0e, 0x32, + 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0c, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x44, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x44, 0x73, 0x12, 0x22, 0x0a, 0x0c, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, + 0x12, 0x3b, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, + 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x72, 0x0a, + 0x16, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x4b, + 0x65, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x74, 0x68, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x61, 0x74, 0x68, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x66, 0x74, 0x65, + 0x72, 0x22, 0xde, 0x01, 0x0a, 0x16, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, + 0x6b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x6b, 0x65, 0x79, + 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, + 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x02, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x02, 0x28, + 0x0c, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, + 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x44, 0x61, 0x74, 0x65, 0x18, 0x05, + 0x20, 0x02, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x44, 0x61, 0x74, 0x65, + 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, + 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x22, 0x95, 0x02, 0x0a, 0x17, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, + 0x0a, 0x05, 0x73, 0x75, 0x69, 0x74, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x1d, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, + 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x73, 0x75, + 0x69, 0x74, 0x65, 0x12, 0x5d, 0x0a, 0x15, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x15, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x76, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0c, + 0x52, 0x02, 0x69, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, + 0x0a, 0x10, 0x65, 0x7a, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x06, 0x20, 0x02, 0x28, 0x09, 0x52, 0x10, 0x65, 0x7a, 0x4b, 0x65, 0x79, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6a, 0x0a, 0x1a, 0x50, 0x65, + 0x72, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x76, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x76, 0x12, 0x2a, 0x0a, 0x10, 0x65, 0x7a, + 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x10, 0x65, 0x7a, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x99, 0x02, 0x0a, 0x17, 0x5a, 0x6f, 0x6e, 0x65, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x75, 0x69, 0x74, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x0e, 0x32, 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x05, 0x73, 0x75, 0x69, 0x74, 0x65, 0x12, 0x5d, 0x0a, 0x15, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x15, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x50, 0x0a, 0x11, 0x72, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x11, 0x72, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x95, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x0a, 0x10, + 0x65, 0x7a, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x10, 0x65, 0x7a, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, + 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x02, + 0x28, 0x08, 0x52, 0x08, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0e, + 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x04, + 0x20, 0x02, 0x28, 0x03, 0x52, 0x0e, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x02, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x46, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, + 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x11, 0x43, + 0x69, 0x70, 0x68, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x33, 0x0a, 0x05, 0x73, 0x75, 0x69, 0x74, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, + 0x1d, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x43, 0x69, + 0x70, 0x68, 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, + 0x73, 0x75, 0x69, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x69, + 0x6e, 0x49, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x69, 0x6e, 0x49, 0x76, 0x12, + 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x06, 0x6f, 0x75, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x75, 0x74, 0x49, 0x76, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6f, 0x75, 0x74, 0x49, 0x76, 0x22, 0xa3, 0x03, + 0x0a, 0x12, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x36, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2c, 0x0a, 0x11, + 0x75, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x02, 0x28, 0x08, 0x52, 0x11, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x09, 0x6c, 0x61, + 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x6c, + 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x13, 0x69, 0x73, 0x4c, 0x61, + 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, + 0x05, 0x20, 0x02, 0x28, 0x08, 0x52, 0x13, 0x69, 0x73, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x66, 0x69, + 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x12, 0x66, 0x69, + 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x41, 0x0a, 0x08, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x63, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x22, 0x42, 0x0a, 0x18, 0x45, 0x43, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x0d, 0x45, 0x43, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, + 0x65, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, + 0x64, 0x65, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x55, + 0x6e, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, + 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x55, + 0x6e, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x69, + 0x74, 0x79, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x43, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd4, 0x01, 0x0a, 0x18, 0x45, 0x72, 0x61, + 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x43, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a, + 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x08, 0x63, 0x65, 0x6c, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x44, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, + 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, + 0x9a, 0x01, 0x0a, 0x23, 0x41, 0x64, 0x64, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x67, 0x0a, 0x1d, + 0x45, 0x43, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x0a, + 0x0d, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x22, 0x59, 0x0a, 0x13, 0x48, 0x64, 0x66, 0x73, 0x50, 0x61, 0x74, + 0x68, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, + 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x69, + 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x22, 0x84, 0x07, 0x0a, 0x13, 0x48, 0x64, 0x66, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x45, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x48, 0x64, 0x66, 0x73, 0x46, 0x69, 0x6c, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x69, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, + 0x02, 0x28, 0x04, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x3e, 0x0a, 0x0a, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x06, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2b, 0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x02, + 0x28, 0x04, 0x52, 0x10, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, + 0x2e, 0x0a, 0x11, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x3a, 0x01, 0x30, 0x52, 0x10, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1f, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x69, 0x7a, 0x65, + 0x12, 0x3d, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x19, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x3a, + 0x01, 0x30, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0b, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x4e, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x3a, + 0x02, 0x2d, 0x31, 0x52, 0x0b, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x4e, 0x75, 0x6d, + 0x12, 0x54, 0x0a, 0x12, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x12, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x27, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x3a, 0x01, 0x30, + 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x41, 0x0a, 0x08, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x63, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x17, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x0d, 0x3a, 0x01, 0x30, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x33, 0x0a, 0x08, 0x46, + 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x53, 0x5f, 0x44, 0x49, + 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x02, + 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x53, 0x5f, 0x53, 0x59, 0x4d, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x03, + 0x22, 0x45, 0x0a, 0x05, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x41, 0x53, + 0x5f, 0x41, 0x43, 0x4c, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x41, 0x53, 0x5f, 0x43, 0x52, + 0x59, 0x50, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x41, 0x53, 0x5f, 0x45, 0x43, 0x10, + 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x5f, 0x45, 0x4e, + 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x22, 0x9a, 0x01, 0x0a, 0x19, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x59, 0x0a, 0x11, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x23, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x06, 0x4d, 0x44, 0x35, 0x43, 0x52, 0x43, 0x52, 0x11, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x70, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x70, 0x65, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x22, 0xd2, 0x03, 0x0a, 0x15, 0x46, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, + 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x04, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2a, 0x0a, 0x10, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, + 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x10, 0x62, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x28, 0x0a, 0x0f, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, + 0x0d, 0x52, 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0e, 0x66, 0x69, + 0x6c, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x13, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x44, 0x61, 0x74, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x44, 0x61, 0x74, 0x61, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x73, 0x68, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, + 0x0d, 0x74, 0x72, 0x61, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x52, + 0x0a, 0x0c, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x0e, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x53, 0x55, 0x4d, 0x5f, 0x43, + 0x52, 0x43, 0x33, 0x32, 0x52, 0x0c, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x55, 0x72, 0x69, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x55, 0x72, 0x69, 0x12, 0x1d, 0x0a, 0x08, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x3a, 0x01, 0x30, 0x52, + 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x48, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x4c, 0x69, + 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x48, 0x64, 0x66, 0x73, 0x46, 0x69, + 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0e, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x0a, + 0x10, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x10, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, + 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x14, 0x52, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x1c, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x69, + 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x48, 0x0a, 0x0e, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x48, 0x64, 0x66, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x4c, 0x69, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x78, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x78, 0x12, 0x3f, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xdc, 0x01, 0x0a, 0x21, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x69, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x48, 0x64, 0x66, 0x73, 0x46, + 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, + 0x64, 0x69, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x02, 0x20, 0x02, 0x28, + 0x0d, 0x52, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, + 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x02, + 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x70, 0x61, + 0x74, 0x68, 0x22, 0x8e, 0x01, 0x0a, 0x22, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x68, 0x0a, 0x17, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x72, 0x4c, 0x69, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x17, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x72, 0x4c, 0x69, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x22, 0x88, 0x01, 0x0a, 0x1c, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x70, 0x61, 0x74, 0x68, + 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x6f, 0x64, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1e, + 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0xda, + 0x01, 0x0a, 0x17, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x02, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x18, 0x03, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x12, 0x57, 0x0a, 0x11, 0x64, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x11, 0x64, 0x69, 0x66, 0x66, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x23, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x70, 0x61, 0x74, 0x68, 0x12, + 0x14, 0x0a, 0x05, 0x64, 0x69, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x05, + 0x64, 0x69, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x22, + 0x57, 0x0a, 0x1d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, + 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x3a, 0x02, 0x2d, + 0x31, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x9a, 0x03, 0x0a, 0x1e, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x5a, 0x0a, 0x0f, 0x6d, + 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x58, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x64, 0x6f, + 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0e, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x69, + 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x04, 0x20, 0x02, + 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x61, 0x72, 0x6c, 0x69, 0x65, + 0x72, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x63, + 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x61, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x04, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x67, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, + 0x08, 0x67, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x08, 0x6e, 0x75, 0x6d, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x3a, 0x01, 0x30, 0x52, 0x08, + 0x6e, 0x75, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xe7, 0x01, 0x0a, 0x11, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, + 0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x6f, + 0x6f, 0x74, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20, 0x02, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x06, 0x20, 0x02, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x22, 0x62, 0x0a, 0x19, 0x52, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, + 0x64, 0x12, 0x23, 0x0a, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x09, 0x66, 0x69, 0x6e, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x37, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x75, 0x69, 0x64, 0x73, 0x22, + 0xe2, 0x02, 0x0a, 0x15, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x79, 0x44, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x79, 0x44, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x65, 0x79, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1d, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0c, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x68, 0x61, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x2a, 0x4e, 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x53, 0x4b, + 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x53, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x41, + 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x41, 0x4d, 0x5f, + 0x44, 0x49, 0x53, 0x4b, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, + 0x45, 0x44, 0x10, 0x05, 0x2a, 0x2d, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x47, + 0x55, 0x4f, 0x55, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x52, 0x49, 0x50, 0x45, + 0x44, 0x10, 0x01, 0x2a, 0x36, 0x0a, 0x10, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x75, 0x69, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x45, 0x53, 0x5f, 0x43, 0x54, 0x52, 0x5f, + 0x4e, 0x4f, 0x50, 0x41, 0x44, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x50, 0x0a, 0x1a, 0x43, + 0x72, 0x79, 0x70, 0x74, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x0a, 0x18, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x56, 0x45, + 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x52, 0x59, + 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x5a, 0x4f, 0x4e, 0x45, 0x53, 0x10, 0x02, 0x2a, 0x42, 0x0a, + 0x18, 0x45, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, + 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, + 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, + 0x03, 0x2a, 0x4f, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x54, 0x79, 0x70, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x53, + 0x55, 0x4d, 0x5f, 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x48, 0x45, + 0x43, 0x4b, 0x53, 0x55, 0x4d, 0x5f, 0x43, 0x52, 0x43, 0x33, 0x32, 0x10, 0x01, 0x12, 0x13, 0x0a, + 0x0f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x53, 0x55, 0x4d, 0x5f, 0x43, 0x52, 0x43, 0x33, 0x32, 0x43, + 0x10, 0x02, 0x2a, 0x37, 0x0a, 0x16, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x0a, 0x06, + 0x4d, 0x44, 0x35, 0x43, 0x52, 0x43, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4f, 0x4d, 0x50, + 0x4f, 0x53, 0x49, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x43, 0x10, 0x02, 0x2a, 0x3d, 0x0a, 0x0f, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, + 0x0a, 0x04, 0x52, 0x45, 0x41, 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x52, 0x49, 0x54, + 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x50, 0x59, 0x10, 0x03, 0x12, 0x0b, 0x0a, + 0x07, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x04, 0x42, 0x72, 0x0a, 0x25, 0x6f, 0x72, + 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x42, 0x0a, 0x48, 0x64, 0x66, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, + 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, + 0x6e, 0x6d, 0x61, 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x5f, 0x68, 0x64, 0x66, 0x73, 0xa0, 0x01, 0x01, +} + +var ( + file_hdfs_proto_rawDescOnce sync.Once + file_hdfs_proto_rawDescData = file_hdfs_proto_rawDesc +) + +func file_hdfs_proto_rawDescGZIP() []byte { + file_hdfs_proto_rawDescOnce.Do(func() { + file_hdfs_proto_rawDescData = protoimpl.X.CompressGZIP(file_hdfs_proto_rawDescData) + }) + return file_hdfs_proto_rawDescData +} + +var file_hdfs_proto_enumTypes = make([]protoimpl.EnumInfo, 12) +var file_hdfs_proto_msgTypes = make([]protoimpl.MessageInfo, 49) +var file_hdfs_proto_goTypes = []interface{}{ + (StorageTypeProto)(0), // 0: hadoop.hdfs.StorageTypeProto + (BlockTypeProto)(0), // 1: hadoop.hdfs.BlockTypeProto + (CipherSuiteProto)(0), // 2: hadoop.hdfs.CipherSuiteProto + (CryptoProtocolVersionProto)(0), // 3: hadoop.hdfs.CryptoProtocolVersionProto + (ErasureCodingPolicyState)(0), // 4: hadoop.hdfs.ErasureCodingPolicyState + (ChecksumTypeProto)(0), // 5: hadoop.hdfs.ChecksumTypeProto + (BlockChecksumTypeProto)(0), // 6: hadoop.hdfs.BlockChecksumTypeProto + (AccessModeProto)(0), // 7: hadoop.hdfs.AccessModeProto + (DatanodeInfoProto_AdminState)(0), // 8: hadoop.hdfs.DatanodeInfoProto.AdminState + (DatanodeStorageProto_StorageState)(0), // 9: hadoop.hdfs.DatanodeStorageProto.StorageState + (HdfsFileStatusProto_FileType)(0), // 10: hadoop.hdfs.HdfsFileStatusProto.FileType + (HdfsFileStatusProto_Flags)(0), // 11: hadoop.hdfs.HdfsFileStatusProto.Flags + (*ExtendedBlockProto)(nil), // 12: hadoop.hdfs.ExtendedBlockProto + (*ProvidedStorageLocationProto)(nil), // 13: hadoop.hdfs.ProvidedStorageLocationProto + (*DatanodeIDProto)(nil), // 14: hadoop.hdfs.DatanodeIDProto + (*DatanodeLocalInfoProto)(nil), // 15: hadoop.hdfs.DatanodeLocalInfoProto + (*DatanodeVolumeInfoProto)(nil), // 16: hadoop.hdfs.DatanodeVolumeInfoProto + (*DatanodeInfosProto)(nil), // 17: hadoop.hdfs.DatanodeInfosProto + (*DatanodeInfoProto)(nil), // 18: hadoop.hdfs.DatanodeInfoProto + (*DatanodeStorageProto)(nil), // 19: hadoop.hdfs.DatanodeStorageProto + (*StorageReportProto)(nil), // 20: hadoop.hdfs.StorageReportProto + (*ContentSummaryProto)(nil), // 21: hadoop.hdfs.ContentSummaryProto + (*QuotaUsageProto)(nil), // 22: hadoop.hdfs.QuotaUsageProto + (*StorageTypeQuotaInfosProto)(nil), // 23: hadoop.hdfs.StorageTypeQuotaInfosProto + (*StorageTypeQuotaInfoProto)(nil), // 24: hadoop.hdfs.StorageTypeQuotaInfoProto + (*CorruptFileBlocksProto)(nil), // 25: hadoop.hdfs.CorruptFileBlocksProto + (*StorageTypesProto)(nil), // 26: hadoop.hdfs.StorageTypesProto + (*BlockStoragePolicyProto)(nil), // 27: hadoop.hdfs.BlockStoragePolicyProto + (*LocatedBlockProto)(nil), // 28: hadoop.hdfs.LocatedBlockProto + (*BatchedListingKeyProto)(nil), // 29: hadoop.hdfs.BatchedListingKeyProto + (*DataEncryptionKeyProto)(nil), // 30: hadoop.hdfs.DataEncryptionKeyProto + (*FileEncryptionInfoProto)(nil), // 31: hadoop.hdfs.FileEncryptionInfoProto + (*PerFileEncryptionInfoProto)(nil), // 32: hadoop.hdfs.PerFileEncryptionInfoProto + (*ZoneEncryptionInfoProto)(nil), // 33: hadoop.hdfs.ZoneEncryptionInfoProto + (*ReencryptionInfoProto)(nil), // 34: hadoop.hdfs.ReencryptionInfoProto + (*CipherOptionProto)(nil), // 35: hadoop.hdfs.CipherOptionProto + (*LocatedBlocksProto)(nil), // 36: hadoop.hdfs.LocatedBlocksProto + (*ECSchemaOptionEntryProto)(nil), // 37: hadoop.hdfs.ECSchemaOptionEntryProto + (*ECSchemaProto)(nil), // 38: hadoop.hdfs.ECSchemaProto + (*ErasureCodingPolicyProto)(nil), // 39: hadoop.hdfs.ErasureCodingPolicyProto + (*AddErasureCodingPolicyResponseProto)(nil), // 40: hadoop.hdfs.AddErasureCodingPolicyResponseProto + (*ECTopologyVerifierResultProto)(nil), // 41: hadoop.hdfs.ECTopologyVerifierResultProto + (*HdfsPathHandleProto)(nil), // 42: hadoop.hdfs.HdfsPathHandleProto + (*HdfsFileStatusProto)(nil), // 43: hadoop.hdfs.HdfsFileStatusProto + (*BlockChecksumOptionsProto)(nil), // 44: hadoop.hdfs.BlockChecksumOptionsProto + (*FsServerDefaultsProto)(nil), // 45: hadoop.hdfs.FsServerDefaultsProto + (*DirectoryListingProto)(nil), // 46: hadoop.hdfs.DirectoryListingProto + (*RemoteExceptionProto)(nil), // 47: hadoop.hdfs.RemoteExceptionProto + (*BatchedDirectoryListingProto)(nil), // 48: hadoop.hdfs.BatchedDirectoryListingProto + (*SnapshottableDirectoryStatusProto)(nil), // 49: hadoop.hdfs.SnapshottableDirectoryStatusProto + (*SnapshottableDirectoryListingProto)(nil), // 50: hadoop.hdfs.SnapshottableDirectoryListingProto + (*SnapshotDiffReportEntryProto)(nil), // 51: hadoop.hdfs.SnapshotDiffReportEntryProto + (*SnapshotDiffReportProto)(nil), // 52: hadoop.hdfs.SnapshotDiffReportProto + (*SnapshotDiffReportListingEntryProto)(nil), // 53: hadoop.hdfs.SnapshotDiffReportListingEntryProto + (*SnapshotDiffReportCursorProto)(nil), // 54: hadoop.hdfs.SnapshotDiffReportCursorProto + (*SnapshotDiffReportListingProto)(nil), // 55: hadoop.hdfs.SnapshotDiffReportListingProto + (*BlockProto)(nil), // 56: hadoop.hdfs.BlockProto + (*SnapshotInfoProto)(nil), // 57: hadoop.hdfs.SnapshotInfoProto + (*RollingUpgradeStatusProto)(nil), // 58: hadoop.hdfs.RollingUpgradeStatusProto + (*StorageUuidsProto)(nil), // 59: hadoop.hdfs.StorageUuidsProto + (*BlockTokenSecretProto)(nil), // 60: hadoop.hdfs.BlockTokenSecretProto + (*hadoop_common.TokenProto)(nil), // 61: hadoop.common.TokenProto + (*FsPermissionProto)(nil), // 62: hadoop.hdfs.FsPermissionProto +} +var file_hdfs_proto_depIdxs = []int32{ + 0, // 0: hadoop.hdfs.DatanodeVolumeInfoProto.storageType:type_name -> hadoop.hdfs.StorageTypeProto + 18, // 1: hadoop.hdfs.DatanodeInfosProto.datanodes:type_name -> hadoop.hdfs.DatanodeInfoProto + 14, // 2: hadoop.hdfs.DatanodeInfoProto.id:type_name -> hadoop.hdfs.DatanodeIDProto + 8, // 3: hadoop.hdfs.DatanodeInfoProto.adminState:type_name -> hadoop.hdfs.DatanodeInfoProto.AdminState + 9, // 4: hadoop.hdfs.DatanodeStorageProto.state:type_name -> hadoop.hdfs.DatanodeStorageProto.StorageState + 0, // 5: hadoop.hdfs.DatanodeStorageProto.storageType:type_name -> hadoop.hdfs.StorageTypeProto + 19, // 6: hadoop.hdfs.StorageReportProto.storage:type_name -> hadoop.hdfs.DatanodeStorageProto + 23, // 7: hadoop.hdfs.ContentSummaryProto.typeQuotaInfos:type_name -> hadoop.hdfs.StorageTypeQuotaInfosProto + 23, // 8: hadoop.hdfs.QuotaUsageProto.typeQuotaInfos:type_name -> hadoop.hdfs.StorageTypeQuotaInfosProto + 24, // 9: hadoop.hdfs.StorageTypeQuotaInfosProto.typeQuotaInfo:type_name -> hadoop.hdfs.StorageTypeQuotaInfoProto + 0, // 10: hadoop.hdfs.StorageTypeQuotaInfoProto.type:type_name -> hadoop.hdfs.StorageTypeProto + 0, // 11: hadoop.hdfs.StorageTypesProto.storageTypes:type_name -> hadoop.hdfs.StorageTypeProto + 26, // 12: hadoop.hdfs.BlockStoragePolicyProto.creationPolicy:type_name -> hadoop.hdfs.StorageTypesProto + 26, // 13: hadoop.hdfs.BlockStoragePolicyProto.creationFallbackPolicy:type_name -> hadoop.hdfs.StorageTypesProto + 26, // 14: hadoop.hdfs.BlockStoragePolicyProto.replicationFallbackPolicy:type_name -> hadoop.hdfs.StorageTypesProto + 12, // 15: hadoop.hdfs.LocatedBlockProto.b:type_name -> hadoop.hdfs.ExtendedBlockProto + 18, // 16: hadoop.hdfs.LocatedBlockProto.locs:type_name -> hadoop.hdfs.DatanodeInfoProto + 61, // 17: hadoop.hdfs.LocatedBlockProto.blockToken:type_name -> hadoop.common.TokenProto + 0, // 18: hadoop.hdfs.LocatedBlockProto.storageTypes:type_name -> hadoop.hdfs.StorageTypeProto + 61, // 19: hadoop.hdfs.LocatedBlockProto.blockTokens:type_name -> hadoop.common.TokenProto + 2, // 20: hadoop.hdfs.FileEncryptionInfoProto.suite:type_name -> hadoop.hdfs.CipherSuiteProto + 3, // 21: hadoop.hdfs.FileEncryptionInfoProto.cryptoProtocolVersion:type_name -> hadoop.hdfs.CryptoProtocolVersionProto + 2, // 22: hadoop.hdfs.ZoneEncryptionInfoProto.suite:type_name -> hadoop.hdfs.CipherSuiteProto + 3, // 23: hadoop.hdfs.ZoneEncryptionInfoProto.cryptoProtocolVersion:type_name -> hadoop.hdfs.CryptoProtocolVersionProto + 34, // 24: hadoop.hdfs.ZoneEncryptionInfoProto.reencryptionProto:type_name -> hadoop.hdfs.ReencryptionInfoProto + 2, // 25: hadoop.hdfs.CipherOptionProto.suite:type_name -> hadoop.hdfs.CipherSuiteProto + 28, // 26: hadoop.hdfs.LocatedBlocksProto.blocks:type_name -> hadoop.hdfs.LocatedBlockProto + 28, // 27: hadoop.hdfs.LocatedBlocksProto.lastBlock:type_name -> hadoop.hdfs.LocatedBlockProto + 31, // 28: hadoop.hdfs.LocatedBlocksProto.fileEncryptionInfo:type_name -> hadoop.hdfs.FileEncryptionInfoProto + 39, // 29: hadoop.hdfs.LocatedBlocksProto.ecPolicy:type_name -> hadoop.hdfs.ErasureCodingPolicyProto + 37, // 30: hadoop.hdfs.ECSchemaProto.options:type_name -> hadoop.hdfs.ECSchemaOptionEntryProto + 38, // 31: hadoop.hdfs.ErasureCodingPolicyProto.schema:type_name -> hadoop.hdfs.ECSchemaProto + 4, // 32: hadoop.hdfs.ErasureCodingPolicyProto.state:type_name -> hadoop.hdfs.ErasureCodingPolicyState + 39, // 33: hadoop.hdfs.AddErasureCodingPolicyResponseProto.policy:type_name -> hadoop.hdfs.ErasureCodingPolicyProto + 10, // 34: hadoop.hdfs.HdfsFileStatusProto.fileType:type_name -> hadoop.hdfs.HdfsFileStatusProto.FileType + 62, // 35: hadoop.hdfs.HdfsFileStatusProto.permission:type_name -> hadoop.hdfs.FsPermissionProto + 36, // 36: hadoop.hdfs.HdfsFileStatusProto.locations:type_name -> hadoop.hdfs.LocatedBlocksProto + 31, // 37: hadoop.hdfs.HdfsFileStatusProto.fileEncryptionInfo:type_name -> hadoop.hdfs.FileEncryptionInfoProto + 39, // 38: hadoop.hdfs.HdfsFileStatusProto.ecPolicy:type_name -> hadoop.hdfs.ErasureCodingPolicyProto + 6, // 39: hadoop.hdfs.BlockChecksumOptionsProto.blockChecksumType:type_name -> hadoop.hdfs.BlockChecksumTypeProto + 5, // 40: hadoop.hdfs.FsServerDefaultsProto.checksumType:type_name -> hadoop.hdfs.ChecksumTypeProto + 43, // 41: hadoop.hdfs.DirectoryListingProto.partialListing:type_name -> hadoop.hdfs.HdfsFileStatusProto + 43, // 42: hadoop.hdfs.BatchedDirectoryListingProto.partialListing:type_name -> hadoop.hdfs.HdfsFileStatusProto + 47, // 43: hadoop.hdfs.BatchedDirectoryListingProto.exception:type_name -> hadoop.hdfs.RemoteExceptionProto + 43, // 44: hadoop.hdfs.SnapshottableDirectoryStatusProto.dirStatus:type_name -> hadoop.hdfs.HdfsFileStatusProto + 49, // 45: hadoop.hdfs.SnapshottableDirectoryListingProto.snapshottableDirListing:type_name -> hadoop.hdfs.SnapshottableDirectoryStatusProto + 51, // 46: hadoop.hdfs.SnapshotDiffReportProto.diffReportEntries:type_name -> hadoop.hdfs.SnapshotDiffReportEntryProto + 53, // 47: hadoop.hdfs.SnapshotDiffReportListingProto.modifiedEntries:type_name -> hadoop.hdfs.SnapshotDiffReportListingEntryProto + 53, // 48: hadoop.hdfs.SnapshotDiffReportListingProto.createdEntries:type_name -> hadoop.hdfs.SnapshotDiffReportListingEntryProto + 53, // 49: hadoop.hdfs.SnapshotDiffReportListingProto.deletedEntries:type_name -> hadoop.hdfs.SnapshotDiffReportListingEntryProto + 54, // 50: hadoop.hdfs.SnapshotDiffReportListingProto.cursor:type_name -> hadoop.hdfs.SnapshotDiffReportCursorProto + 62, // 51: hadoop.hdfs.SnapshotInfoProto.permission:type_name -> hadoop.hdfs.FsPermissionProto + 7, // 52: hadoop.hdfs.BlockTokenSecretProto.modes:type_name -> hadoop.hdfs.AccessModeProto + 0, // 53: hadoop.hdfs.BlockTokenSecretProto.storageTypes:type_name -> hadoop.hdfs.StorageTypeProto + 54, // [54:54] is the sub-list for method output_type + 54, // [54:54] is the sub-list for method input_type + 54, // [54:54] is the sub-list for extension type_name + 54, // [54:54] is the sub-list for extension extendee + 0, // [0:54] is the sub-list for field type_name +} + +func init() { file_hdfs_proto_init() } +func file_hdfs_proto_init() { + if File_hdfs_proto != nil { + return + } + file_acl_proto_init() + if !protoimpl.UnsafeEnabled { + file_hdfs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtendedBlockProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProvidedStorageLocationProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DatanodeIDProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DatanodeLocalInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DatanodeVolumeInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DatanodeInfosProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DatanodeInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DatanodeStorageProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageReportProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContentSummaryProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuotaUsageProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageTypeQuotaInfosProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageTypeQuotaInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CorruptFileBlocksProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageTypesProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockStoragePolicyProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocatedBlockProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchedListingKeyProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataEncryptionKeyProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileEncryptionInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PerFileEncryptionInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ZoneEncryptionInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReencryptionInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CipherOptionProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocatedBlocksProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ECSchemaOptionEntryProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ECSchemaProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErasureCodingPolicyProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddErasureCodingPolicyResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ECTopologyVerifierResultProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HdfsPathHandleProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HdfsFileStatusProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockChecksumOptionsProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FsServerDefaultsProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DirectoryListingProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoteExceptionProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchedDirectoryListingProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshottableDirectoryStatusProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshottableDirectoryListingProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshotDiffReportEntryProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshotDiffReportProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshotDiffReportListingEntryProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshotDiffReportCursorProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshotDiffReportListingProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshotInfoProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RollingUpgradeStatusProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageUuidsProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hdfs_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockTokenSecretProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_hdfs_proto_rawDesc, + NumEnums: 12, + NumMessages: 49, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_hdfs_proto_goTypes, + DependencyIndexes: file_hdfs_proto_depIdxs, + EnumInfos: file_hdfs_proto_enumTypes, + MessageInfos: file_hdfs_proto_msgTypes, + }.Build() + File_hdfs_proto = out.File + file_hdfs_proto_rawDesc = nil + file_hdfs_proto_goTypes = nil + file_hdfs_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_hdfs/hdfs.proto b/internal/protocol/hadoop_hdfs/hdfs.proto index 0db8a3f5..6cfd5100 100644 --- a/internal/protocol/hadoop_hdfs/hdfs.proto +++ b/internal/protocol/hadoop_hdfs/hdfs.proto @@ -21,7 +21,7 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax="proto2"; // This file contains protocol buffers that are used throughout HDFS -- i.e. // by the client, server, and data transfer protocols. @@ -29,21 +29,37 @@ option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "HdfsProtos"; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; package hadoop.hdfs; import "Security.proto"; +import "acl.proto"; /** * Extended block idenfies a block */ message ExtendedBlockProto { - required string poolId = 1; // Block pool id - gloablly unique across clusters + required string poolId = 1; // Block pool id - globally unique across clusters required uint64 blockId = 2; // the local id within a pool required uint64 generationStamp = 3; optional uint64 numBytes = 4 [default = 0]; // len does not belong in ebid // here for historical reasons } + +/** +* ProvidedStorageLocation will contain the exact location in the provided + storage. The path, offset and length will result in ranged read. The nonce + is there to verify that you receive what you expect. +*/ + +message ProvidedStorageLocationProto { + required string path = 1; + required int64 offset = 2; + required int64 length = 3; + required bytes nonce = 4; +} + /** * Identifies a Datanode */ @@ -69,6 +85,19 @@ message DatanodeLocalInfoProto { required uint64 uptime = 3; } +/** + * Datanode volume information + */ +message DatanodeVolumeInfoProto { + required string path = 1; + required StorageTypeProto storageType = 2; + required uint64 usedSpace = 3; + required uint64 freeSpace = 4; + required uint64 reservedSpace = 5; + required uint64 reservedSpaceForReplicas = 6; + required uint64 numBlocks = 7; +} + /** * DatanodeInfo array */ @@ -88,10 +117,13 @@ message DatanodeInfoProto { optional uint64 lastUpdate = 6 [default = 0]; optional uint32 xceiverCount = 7 [default = 0]; optional string location = 8; + optional uint64 nonDfsUsed = 9; enum AdminState { NORMAL = 0; DECOMMISSION_INPROGRESS = 1; DECOMMISSIONED = 2; + ENTERING_MAINTENANCE = 3; + IN_MAINTENANCE = 4; } optional AdminState adminState = 10 [default = NORMAL]; @@ -99,6 +131,9 @@ message DatanodeInfoProto { optional uint64 cacheUsed = 12 [default = 0]; optional uint64 lastUpdateMonotonic = 13 [default = 0]; optional string upgradeDomain = 14; + optional uint64 lastBlockReportTime = 15 [default = 0]; + optional uint64 lastBlockReportMonotonic = 16 [default = 0]; + optional uint32 numBlocks = 17 [default = 0]; } /** @@ -123,6 +158,7 @@ message StorageReportProto { optional uint64 remaining = 5 [ default = 0 ]; optional uint64 blockPoolUsed = 6 [ default = 0 ]; optional DatanodeStorageProto storage = 7; // supersedes StorageUuid + optional uint64 nonDfsUsed = 8; } /** @@ -136,6 +172,11 @@ message ContentSummaryProto { required uint64 spaceConsumed = 5; required uint64 spaceQuota = 6; optional StorageTypeQuotaInfosProto typeQuotaInfos = 7; + optional uint64 snapshotLength = 8; + optional uint64 snapshotFileCount = 9; + optional uint64 snapshotDirectoryCount = 10; + optional uint64 snapshotSpaceConsumed = 11; + optional string erasureCodingPolicy = 12; } /** @@ -157,7 +198,7 @@ message StorageTypeQuotaInfosProto { } message StorageTypeQuotaInfoProto { - required StorageTypeProto type = 1; + optional StorageTypeProto type = 1 [default = DISK]; required uint64 quota = 2; required uint64 consumed = 3; } @@ -172,13 +213,6 @@ message CorruptFileBlocksProto { required string cookie = 2; } -/** - * File or Directory permision - same spec as posix - */ -message FsPermissionProto { - required uint32 perm = 1; // Actually a short - only 16bits used -} - /** * Types of recognized storage media. */ @@ -187,6 +221,15 @@ enum StorageTypeProto { SSD = 2; ARCHIVE = 3; RAM_DISK = 4; + PROVIDED = 5; +} + +/** + * Types of recognized blocks. + */ +enum BlockTypeProto { + CONTIGUOUS = 0; + STRIPED = 1; } /** @@ -232,6 +275,12 @@ message LocatedBlockProto { repeated hadoop.common.TokenProto blockTokens = 10; // each internal block has a block token } +message BatchedListingKeyProto { + required bytes checksum = 1; + required uint32 pathIndex = 2; + required bytes startAfter = 3; +} + message DataEncryptionKeyProto { required uint32 keyId = 1; required string blockPoolId = 2; @@ -287,6 +336,20 @@ message ZoneEncryptionInfoProto { required CipherSuiteProto suite = 1; required CryptoProtocolVersionProto cryptoProtocolVersion = 2; required string keyName = 3; + optional ReencryptionInfoProto reencryptionProto = 4; +} + +/** + * Re-encryption information for an encryption zone + */ +message ReencryptionInfoProto { + required string ezKeyVersionName = 1; + required uint64 submissionTime = 2; + required bool canceled = 3; + required int64 numReencrypted = 4; + required int64 numFailures = 5; + optional uint64 completionTime = 6; + optional string lastFile = 7; } /** @@ -333,11 +396,41 @@ message ECSchemaProto { repeated ECSchemaOptionEntryProto options = 4; } +/** + * EC policy state. + */ +enum ErasureCodingPolicyState { + DISABLED = 1; + ENABLED = 2; + REMOVED = 3; +} + message ErasureCodingPolicyProto { - required string name = 1; - required ECSchemaProto schema = 2; - required uint32 cellSize = 3; + optional string name = 1; + optional ECSchemaProto schema = 2; + optional uint32 cellSize = 3; required uint32 id = 4; // Actually a byte - only 8 bits used + optional ErasureCodingPolicyState state = 5 [default = ENABLED]; +} + +message AddErasureCodingPolicyResponseProto { + required ErasureCodingPolicyProto policy = 1; + required bool succeed = 2; + optional string errorMsg = 3; +} + +message ECTopologyVerifierResultProto { + required string resultMessage = 1; + required bool isSupported = 2; +} + +/** + * Placeholder type for consistent HDFS operations. + */ +message HdfsPathHandleProto { + optional uint64 inodeId = 1; + optional uint64 mtime = 2; + optional string path = 3; } /** @@ -350,6 +443,12 @@ message HdfsFileStatusProto { IS_FILE = 2; IS_SYMLINK = 3; } + enum Flags { + HAS_ACL = 0x01; // has ACLs + HAS_CRYPT = 0x02; // encrypted + HAS_EC = 0x04; // erasure coded + SNAPSHOT_ENABLED = 0x08; // SNAPSHOT ENABLED + } required FileType fileType = 1; required bytes path = 2; // local name of inode encoded java UTF8 required uint64 length = 3; @@ -377,6 +476,9 @@ message HdfsFileStatusProto { // Optional field for erasure coding optional ErasureCodingPolicyProto ecPolicy = 17; + + // Set of flags + optional uint32 flags = 18 [default = 0]; } /** @@ -390,6 +492,27 @@ enum ChecksumTypeProto { CHECKSUM_CRC32C = 2; } +enum BlockChecksumTypeProto { + MD5CRC = 1; // BlockChecksum obtained by taking the MD5 digest of chunk CRCs + COMPOSITE_CRC = 2; // Chunk-independent CRC, optionally striped +} + +/** + * Algorithms/types denoting how block-level checksums are computed using + * lower-level chunk checksums/CRCs. + * These options should be kept in sync with + * org.apache.hadoop.hdfs.protocol.BlockChecksumOptions. + */ +message BlockChecksumOptionsProto { + optional BlockChecksumTypeProto blockChecksumType = 1 [default = MD5CRC]; + + // Only used if blockChecksumType specifies a striped format, such as + // COMPOSITE_CRC. If so, then the blockChecksum in the response is expected + // to be the concatenation of N crcs, where + // N == ((requestedLength - 1) / stripedLength) + 1 + optional uint64 stripeLength = 2; +} + /** * HDFS Server Defaults */ @@ -402,6 +525,8 @@ message FsServerDefaultsProto { optional bool encryptDataTransfer = 6 [default = false]; optional uint64 trashInterval = 7 [default = 0]; optional ChecksumTypeProto checksumType = 8 [default = CHECKSUM_CRC32]; + optional string keyProviderUri = 9; + optional uint32 policyId = 10 [default = 0]; } @@ -413,6 +538,18 @@ message DirectoryListingProto { required uint32 remainingEntries = 2; } +message RemoteExceptionProto { + required string className = 1; + optional string message = 2; +} + +// Directory listing result for a batched listing call. +message BatchedDirectoryListingProto { + repeated HdfsFileStatusProto partialListing = 1; + required uint32 parentIdx = 2; + optional RemoteExceptionProto exception = 3; +} + /** * Status of a snapshottable directory: besides the normal information for * a directory status, also include snapshot quota, number of snapshots, and @@ -454,6 +591,32 @@ message SnapshotDiffReportProto { repeated SnapshotDiffReportEntryProto diffReportEntries = 4; } +/** + * Snapshot diff report listing entry + */ +message SnapshotDiffReportListingEntryProto { + required bytes fullpath = 1; + required uint64 dirId = 2; + required bool isReference = 3; + optional bytes targetPath = 4; + optional uint64 fileId = 5; +} + +message SnapshotDiffReportCursorProto { + required bytes startPath = 1; + required int32 index = 2 [default = -1]; +} +/** + * Snapshot diff report listing + */ +message SnapshotDiffReportListingProto { + // full path of the directory where snapshots were taken + repeated SnapshotDiffReportListingEntryProto modifiedEntries = 1; + repeated SnapshotDiffReportListingEntryProto createdEntries = 2; + repeated SnapshotDiffReportListingEntryProto deletedEntries = 3; + required bool isFromEarlier = 4; + optional SnapshotDiffReportCursorProto cursor = 5; +} /** * Block information * @@ -498,3 +661,39 @@ message RollingUpgradeStatusProto { message StorageUuidsProto { repeated string storageUuids = 1; } + +/** + * File access permissions mode. + */ +enum AccessModeProto { + READ = 1; + WRITE = 2; + COPY = 3; + REPLACE = 4; +} + +/** + * Secret information for the BlockKeyProto. This is not sent on the wire as + * such but is used to pack a byte array and encrypted and put in + * BlockKeyProto.bytes + * When adding further fields, make sure they are optional as they would + * otherwise not be backwards compatible. + * + * Note: As part of the migration from WritableUtils based tokens (aka "legacy") + * to Protocol Buffers, we use the first byte to determine the type. If the + * first byte is <=0 then it is a legacy token. This means that when using + * protobuf tokens, the the first field sent must have a `field_number` less + * than 16 to make sure that the first byte is positive. Otherwise it could be + * parsed as a legacy token. See HDFS-11026 for more discussion. + */ +message BlockTokenSecretProto { + optional uint64 expiryDate = 1; + optional uint32 keyId = 2; + optional string userId = 3; + optional string blockPoolId = 4; + optional uint64 blockId = 5; + repeated AccessModeProto modes = 6; + repeated StorageTypeProto storageTypes = 7; + repeated string storageIds = 8; + optional bytes handshakeSecret = 9; +} diff --git a/internal/protocol/hadoop_hdfs/inotify.pb.go b/internal/protocol/hadoop_hdfs/inotify.pb.go index bc597e5c..6e4be81b 100644 --- a/internal/protocol/hadoop_hdfs/inotify.pb.go +++ b/internal/protocol/hadoop_hdfs/inotify.pb.go @@ -1,16 +1,46 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//* +// These .proto interfaces are private and stable. +// Please see http://wiki.apache.org/hadoop/Compatibility +// for what changes are allowed for a *stable* .proto interface. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: inotify.proto package hadoop_hdfs -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type EventType int32 @@ -24,42 +54,64 @@ const ( EventType_EVENT_TRUNCATE EventType = 6 ) -var EventType_name = map[int32]string{ - 0: "EVENT_CREATE", - 1: "EVENT_CLOSE", - 2: "EVENT_APPEND", - 3: "EVENT_RENAME", - 4: "EVENT_METADATA", - 5: "EVENT_UNLINK", - 6: "EVENT_TRUNCATE", -} -var EventType_value = map[string]int32{ - "EVENT_CREATE": 0, - "EVENT_CLOSE": 1, - "EVENT_APPEND": 2, - "EVENT_RENAME": 3, - "EVENT_METADATA": 4, - "EVENT_UNLINK": 5, - "EVENT_TRUNCATE": 6, -} +// Enum value maps for EventType. +var ( + EventType_name = map[int32]string{ + 0: "EVENT_CREATE", + 1: "EVENT_CLOSE", + 2: "EVENT_APPEND", + 3: "EVENT_RENAME", + 4: "EVENT_METADATA", + 5: "EVENT_UNLINK", + 6: "EVENT_TRUNCATE", + } + EventType_value = map[string]int32{ + "EVENT_CREATE": 0, + "EVENT_CLOSE": 1, + "EVENT_APPEND": 2, + "EVENT_RENAME": 3, + "EVENT_METADATA": 4, + "EVENT_UNLINK": 5, + "EVENT_TRUNCATE": 6, + } +) func (x EventType) Enum() *EventType { p := new(EventType) *p = x return p } + func (x EventType) String() string { - return proto.EnumName(EventType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EventType) Descriptor() protoreflect.EnumDescriptor { + return file_inotify_proto_enumTypes[0].Descriptor() } -func (x *EventType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(EventType_value, data, "EventType") + +func (EventType) Type() protoreflect.EnumType { + return &file_inotify_proto_enumTypes[0] +} + +func (x EventType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *EventType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = EventType(value) + *x = EventType(num) return nil } -func (EventType) EnumDescriptor() ([]byte, []int) { return fileDescriptor7, []int{0} } + +// Deprecated: Use EventType.Descriptor instead. +func (EventType) EnumDescriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{0} +} type INodeType int32 @@ -69,34 +121,56 @@ const ( INodeType_I_TYPE_SYMLINK INodeType = 2 ) -var INodeType_name = map[int32]string{ - 0: "I_TYPE_FILE", - 1: "I_TYPE_DIRECTORY", - 2: "I_TYPE_SYMLINK", -} -var INodeType_value = map[string]int32{ - "I_TYPE_FILE": 0, - "I_TYPE_DIRECTORY": 1, - "I_TYPE_SYMLINK": 2, -} +// Enum value maps for INodeType. +var ( + INodeType_name = map[int32]string{ + 0: "I_TYPE_FILE", + 1: "I_TYPE_DIRECTORY", + 2: "I_TYPE_SYMLINK", + } + INodeType_value = map[string]int32{ + "I_TYPE_FILE": 0, + "I_TYPE_DIRECTORY": 1, + "I_TYPE_SYMLINK": 2, + } +) func (x INodeType) Enum() *INodeType { p := new(INodeType) *p = x return p } + func (x INodeType) String() string { - return proto.EnumName(INodeType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (x *INodeType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(INodeType_value, data, "INodeType") + +func (INodeType) Descriptor() protoreflect.EnumDescriptor { + return file_inotify_proto_enumTypes[1].Descriptor() +} + +func (INodeType) Type() protoreflect.EnumType { + return &file_inotify_proto_enumTypes[1] +} + +func (x INodeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *INodeType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = INodeType(value) + *x = INodeType(num) return nil } -func (INodeType) EnumDescriptor() ([]byte, []int) { return fileDescriptor7, []int{1} } + +// Deprecated: Use INodeType.Descriptor instead. +func (INodeType) EnumDescriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{1} +} type MetadataUpdateType int32 @@ -109,92 +183,178 @@ const ( MetadataUpdateType_META_TYPE_XATTRS MetadataUpdateType = 5 ) -var MetadataUpdateType_name = map[int32]string{ - 0: "META_TYPE_TIMES", - 1: "META_TYPE_REPLICATION", - 2: "META_TYPE_OWNER", - 3: "META_TYPE_PERMS", - 4: "META_TYPE_ACLS", - 5: "META_TYPE_XATTRS", -} -var MetadataUpdateType_value = map[string]int32{ - "META_TYPE_TIMES": 0, - "META_TYPE_REPLICATION": 1, - "META_TYPE_OWNER": 2, - "META_TYPE_PERMS": 3, - "META_TYPE_ACLS": 4, - "META_TYPE_XATTRS": 5, -} +// Enum value maps for MetadataUpdateType. +var ( + MetadataUpdateType_name = map[int32]string{ + 0: "META_TYPE_TIMES", + 1: "META_TYPE_REPLICATION", + 2: "META_TYPE_OWNER", + 3: "META_TYPE_PERMS", + 4: "META_TYPE_ACLS", + 5: "META_TYPE_XATTRS", + } + MetadataUpdateType_value = map[string]int32{ + "META_TYPE_TIMES": 0, + "META_TYPE_REPLICATION": 1, + "META_TYPE_OWNER": 2, + "META_TYPE_PERMS": 3, + "META_TYPE_ACLS": 4, + "META_TYPE_XATTRS": 5, + } +) func (x MetadataUpdateType) Enum() *MetadataUpdateType { p := new(MetadataUpdateType) *p = x return p } + func (x MetadataUpdateType) String() string { - return proto.EnumName(MetadataUpdateType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MetadataUpdateType) Descriptor() protoreflect.EnumDescriptor { + return file_inotify_proto_enumTypes[2].Descriptor() +} + +func (MetadataUpdateType) Type() protoreflect.EnumType { + return &file_inotify_proto_enumTypes[2] +} + +func (x MetadataUpdateType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *MetadataUpdateType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MetadataUpdateType_value, data, "MetadataUpdateType") + +// Deprecated: Do not use. +func (x *MetadataUpdateType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = MetadataUpdateType(value) + *x = MetadataUpdateType(num) return nil } -func (MetadataUpdateType) EnumDescriptor() ([]byte, []int) { return fileDescriptor7, []int{2} } + +// Deprecated: Use MetadataUpdateType.Descriptor instead. +func (MetadataUpdateType) EnumDescriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{2} +} type EventProto struct { - Type *EventType `protobuf:"varint,1,req,name=type,enum=hadoop.hdfs.EventType" json:"type,omitempty"` - Contents []byte `protobuf:"bytes,2,req,name=contents" json:"contents,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type *EventType `protobuf:"varint,1,req,name=type,enum=hadoop.hdfs.EventType" json:"type,omitempty"` + Contents []byte `protobuf:"bytes,2,req,name=contents" json:"contents,omitempty"` } -func (m *EventProto) Reset() { *m = EventProto{} } -func (m *EventProto) String() string { return proto.CompactTextString(m) } -func (*EventProto) ProtoMessage() {} -func (*EventProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{0} } +func (x *EventProto) Reset() { + *x = EventProto{} + if protoimpl.UnsafeEnabled { + mi := &file_inotify_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *EventProto) GetType() EventType { - if m != nil && m.Type != nil { - return *m.Type +func (*EventProto) ProtoMessage() {} + +func (x *EventProto) ProtoReflect() protoreflect.Message { + mi := &file_inotify_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventProto.ProtoReflect.Descriptor instead. +func (*EventProto) Descriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{0} +} + +func (x *EventProto) GetType() EventType { + if x != nil && x.Type != nil { + return *x.Type } return EventType_EVENT_CREATE } -func (m *EventProto) GetContents() []byte { - if m != nil { - return m.Contents +func (x *EventProto) GetContents() []byte { + if x != nil { + return x.Contents } return nil } type EventBatchProto struct { - Txid *int64 `protobuf:"varint,1,req,name=txid" json:"txid,omitempty"` - Events []*EventProto `protobuf:"bytes,2,rep,name=events" json:"events,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Txid *int64 `protobuf:"varint,1,req,name=txid" json:"txid,omitempty"` + Events []*EventProto `protobuf:"bytes,2,rep,name=events" json:"events,omitempty"` +} + +func (x *EventBatchProto) Reset() { + *x = EventBatchProto{} + if protoimpl.UnsafeEnabled { + mi := &file_inotify_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *EventBatchProto) Reset() { *m = EventBatchProto{} } -func (m *EventBatchProto) String() string { return proto.CompactTextString(m) } -func (*EventBatchProto) ProtoMessage() {} -func (*EventBatchProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{1} } +func (x *EventBatchProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventBatchProto) ProtoMessage() {} -func (m *EventBatchProto) GetTxid() int64 { - if m != nil && m.Txid != nil { - return *m.Txid +func (x *EventBatchProto) ProtoReflect() protoreflect.Message { + mi := &file_inotify_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventBatchProto.ProtoReflect.Descriptor instead. +func (*EventBatchProto) Descriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{1} +} + +func (x *EventBatchProto) GetTxid() int64 { + if x != nil && x.Txid != nil { + return *x.Txid } return 0 } -func (m *EventBatchProto) GetEvents() []*EventProto { - if m != nil { - return m.Events +func (x *EventBatchProto) GetEvents() []*EventProto { + if x != nil { + return x.Events } return nil } type CreateEventProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Type *INodeType `protobuf:"varint,1,req,name=type,enum=hadoop.hdfs.INodeType" json:"type,omitempty"` Path *string `protobuf:"bytes,2,req,name=path" json:"path,omitempty"` Ctime *int64 `protobuf:"varint,3,req,name=ctime" json:"ctime,omitempty"` @@ -205,459 +365,972 @@ type CreateEventProto struct { SymlinkTarget *string `protobuf:"bytes,8,opt,name=symlinkTarget" json:"symlinkTarget,omitempty"` Overwrite *bool `protobuf:"varint,9,opt,name=overwrite" json:"overwrite,omitempty"` DefaultBlockSize *int64 `protobuf:"varint,10,opt,name=defaultBlockSize,def=0" json:"defaultBlockSize,omitempty"` - XXX_unrecognized []byte `json:"-"` + ErasureCoded *bool `protobuf:"varint,11,opt,name=erasureCoded" json:"erasureCoded,omitempty"` } -func (m *CreateEventProto) Reset() { *m = CreateEventProto{} } -func (m *CreateEventProto) String() string { return proto.CompactTextString(m) } -func (*CreateEventProto) ProtoMessage() {} -func (*CreateEventProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{2} } +// Default values for CreateEventProto fields. +const ( + Default_CreateEventProto_DefaultBlockSize = int64(0) +) -const Default_CreateEventProto_DefaultBlockSize int64 = 0 +func (x *CreateEventProto) Reset() { + *x = CreateEventProto{} + if protoimpl.UnsafeEnabled { + mi := &file_inotify_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEventProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEventProto) ProtoMessage() {} + +func (x *CreateEventProto) ProtoReflect() protoreflect.Message { + mi := &file_inotify_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} -func (m *CreateEventProto) GetType() INodeType { - if m != nil && m.Type != nil { - return *m.Type +// Deprecated: Use CreateEventProto.ProtoReflect.Descriptor instead. +func (*CreateEventProto) Descriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateEventProto) GetType() INodeType { + if x != nil && x.Type != nil { + return *x.Type } return INodeType_I_TYPE_FILE } -func (m *CreateEventProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *CreateEventProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } return "" } -func (m *CreateEventProto) GetCtime() int64 { - if m != nil && m.Ctime != nil { - return *m.Ctime +func (x *CreateEventProto) GetCtime() int64 { + if x != nil && x.Ctime != nil { + return *x.Ctime } return 0 } -func (m *CreateEventProto) GetOwnerName() string { - if m != nil && m.OwnerName != nil { - return *m.OwnerName +func (x *CreateEventProto) GetOwnerName() string { + if x != nil && x.OwnerName != nil { + return *x.OwnerName } return "" } -func (m *CreateEventProto) GetGroupName() string { - if m != nil && m.GroupName != nil { - return *m.GroupName +func (x *CreateEventProto) GetGroupName() string { + if x != nil && x.GroupName != nil { + return *x.GroupName } return "" } -func (m *CreateEventProto) GetPerms() *FsPermissionProto { - if m != nil { - return m.Perms +func (x *CreateEventProto) GetPerms() *FsPermissionProto { + if x != nil { + return x.Perms } return nil } -func (m *CreateEventProto) GetReplication() int32 { - if m != nil && m.Replication != nil { - return *m.Replication +func (x *CreateEventProto) GetReplication() int32 { + if x != nil && x.Replication != nil { + return *x.Replication } return 0 } -func (m *CreateEventProto) GetSymlinkTarget() string { - if m != nil && m.SymlinkTarget != nil { - return *m.SymlinkTarget +func (x *CreateEventProto) GetSymlinkTarget() string { + if x != nil && x.SymlinkTarget != nil { + return *x.SymlinkTarget } return "" } -func (m *CreateEventProto) GetOverwrite() bool { - if m != nil && m.Overwrite != nil { - return *m.Overwrite +func (x *CreateEventProto) GetOverwrite() bool { + if x != nil && x.Overwrite != nil { + return *x.Overwrite } return false } -func (m *CreateEventProto) GetDefaultBlockSize() int64 { - if m != nil && m.DefaultBlockSize != nil { - return *m.DefaultBlockSize +func (x *CreateEventProto) GetDefaultBlockSize() int64 { + if x != nil && x.DefaultBlockSize != nil { + return *x.DefaultBlockSize } return Default_CreateEventProto_DefaultBlockSize } +func (x *CreateEventProto) GetErasureCoded() bool { + if x != nil && x.ErasureCoded != nil { + return *x.ErasureCoded + } + return false +} + type CloseEventProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - FileSize *int64 `protobuf:"varint,2,req,name=fileSize" json:"fileSize,omitempty"` - Timestamp *int64 `protobuf:"varint,3,req,name=timestamp" json:"timestamp,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` + FileSize *int64 `protobuf:"varint,2,req,name=fileSize" json:"fileSize,omitempty"` + Timestamp *int64 `protobuf:"varint,3,req,name=timestamp" json:"timestamp,omitempty"` } -func (m *CloseEventProto) Reset() { *m = CloseEventProto{} } -func (m *CloseEventProto) String() string { return proto.CompactTextString(m) } -func (*CloseEventProto) ProtoMessage() {} -func (*CloseEventProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{3} } +func (x *CloseEventProto) Reset() { + *x = CloseEventProto{} + if protoimpl.UnsafeEnabled { + mi := &file_inotify_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *CloseEventProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *CloseEventProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloseEventProto) ProtoMessage() {} + +func (x *CloseEventProto) ProtoReflect() protoreflect.Message { + mi := &file_inotify_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CloseEventProto.ProtoReflect.Descriptor instead. +func (*CloseEventProto) Descriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{3} +} + +func (x *CloseEventProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } return "" } -func (m *CloseEventProto) GetFileSize() int64 { - if m != nil && m.FileSize != nil { - return *m.FileSize +func (x *CloseEventProto) GetFileSize() int64 { + if x != nil && x.FileSize != nil { + return *x.FileSize } return 0 } -func (m *CloseEventProto) GetTimestamp() int64 { - if m != nil && m.Timestamp != nil { - return *m.Timestamp +func (x *CloseEventProto) GetTimestamp() int64 { + if x != nil && x.Timestamp != nil { + return *x.Timestamp } return 0 } type TruncateEventProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - FileSize *int64 `protobuf:"varint,2,req,name=fileSize" json:"fileSize,omitempty"` - Timestamp *int64 `protobuf:"varint,3,req,name=timestamp" json:"timestamp,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` + FileSize *int64 `protobuf:"varint,2,req,name=fileSize" json:"fileSize,omitempty"` + Timestamp *int64 `protobuf:"varint,3,req,name=timestamp" json:"timestamp,omitempty"` +} + +func (x *TruncateEventProto) Reset() { + *x = TruncateEventProto{} + if protoimpl.UnsafeEnabled { + mi := &file_inotify_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TruncateEventProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TruncateEventProto) ProtoMessage() {} + +func (x *TruncateEventProto) ProtoReflect() protoreflect.Message { + mi := &file_inotify_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *TruncateEventProto) Reset() { *m = TruncateEventProto{} } -func (m *TruncateEventProto) String() string { return proto.CompactTextString(m) } -func (*TruncateEventProto) ProtoMessage() {} -func (*TruncateEventProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{4} } +// Deprecated: Use TruncateEventProto.ProtoReflect.Descriptor instead. +func (*TruncateEventProto) Descriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{4} +} -func (m *TruncateEventProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *TruncateEventProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } return "" } -func (m *TruncateEventProto) GetFileSize() int64 { - if m != nil && m.FileSize != nil { - return *m.FileSize +func (x *TruncateEventProto) GetFileSize() int64 { + if x != nil && x.FileSize != nil { + return *x.FileSize } return 0 } -func (m *TruncateEventProto) GetTimestamp() int64 { - if m != nil && m.Timestamp != nil { - return *m.Timestamp +func (x *TruncateEventProto) GetTimestamp() int64 { + if x != nil && x.Timestamp != nil { + return *x.Timestamp } return 0 } type AppendEventProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - NewBlock *bool `protobuf:"varint,2,opt,name=newBlock,def=0" json:"newBlock,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` + NewBlock *bool `protobuf:"varint,2,opt,name=newBlock,def=0" json:"newBlock,omitempty"` } -func (m *AppendEventProto) Reset() { *m = AppendEventProto{} } -func (m *AppendEventProto) String() string { return proto.CompactTextString(m) } -func (*AppendEventProto) ProtoMessage() {} -func (*AppendEventProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{5} } +// Default values for AppendEventProto fields. +const ( + Default_AppendEventProto_NewBlock = bool(false) +) -const Default_AppendEventProto_NewBlock bool = false +func (x *AppendEventProto) Reset() { + *x = AppendEventProto{} + if protoimpl.UnsafeEnabled { + mi := &file_inotify_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppendEventProto) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *AppendEventProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (*AppendEventProto) ProtoMessage() {} + +func (x *AppendEventProto) ProtoReflect() protoreflect.Message { + mi := &file_inotify_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AppendEventProto.ProtoReflect.Descriptor instead. +func (*AppendEventProto) Descriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{5} +} + +func (x *AppendEventProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } return "" } -func (m *AppendEventProto) GetNewBlock() bool { - if m != nil && m.NewBlock != nil { - return *m.NewBlock +func (x *AppendEventProto) GetNewBlock() bool { + if x != nil && x.NewBlock != nil { + return *x.NewBlock } return Default_AppendEventProto_NewBlock } type RenameEventProto struct { - SrcPath *string `protobuf:"bytes,1,req,name=srcPath" json:"srcPath,omitempty"` - DestPath *string `protobuf:"bytes,2,req,name=destPath" json:"destPath,omitempty"` - Timestamp *int64 `protobuf:"varint,3,req,name=timestamp" json:"timestamp,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SrcPath *string `protobuf:"bytes,1,req,name=srcPath" json:"srcPath,omitempty"` + DestPath *string `protobuf:"bytes,2,req,name=destPath" json:"destPath,omitempty"` + Timestamp *int64 `protobuf:"varint,3,req,name=timestamp" json:"timestamp,omitempty"` } -func (m *RenameEventProto) Reset() { *m = RenameEventProto{} } -func (m *RenameEventProto) String() string { return proto.CompactTextString(m) } -func (*RenameEventProto) ProtoMessage() {} -func (*RenameEventProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{6} } +func (x *RenameEventProto) Reset() { + *x = RenameEventProto{} + if protoimpl.UnsafeEnabled { + mi := &file_inotify_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *RenameEventProto) GetSrcPath() string { - if m != nil && m.SrcPath != nil { - return *m.SrcPath +func (x *RenameEventProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenameEventProto) ProtoMessage() {} + +func (x *RenameEventProto) ProtoReflect() protoreflect.Message { + mi := &file_inotify_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenameEventProto.ProtoReflect.Descriptor instead. +func (*RenameEventProto) Descriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{6} +} + +func (x *RenameEventProto) GetSrcPath() string { + if x != nil && x.SrcPath != nil { + return *x.SrcPath } return "" } -func (m *RenameEventProto) GetDestPath() string { - if m != nil && m.DestPath != nil { - return *m.DestPath +func (x *RenameEventProto) GetDestPath() string { + if x != nil && x.DestPath != nil { + return *x.DestPath } return "" } -func (m *RenameEventProto) GetTimestamp() int64 { - if m != nil && m.Timestamp != nil { - return *m.Timestamp +func (x *RenameEventProto) GetTimestamp() int64 { + if x != nil && x.Timestamp != nil { + return *x.Timestamp } return 0 } type MetadataUpdateEventProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - Type *MetadataUpdateType `protobuf:"varint,2,req,name=type,enum=hadoop.hdfs.MetadataUpdateType" json:"type,omitempty"` - Mtime *int64 `protobuf:"varint,3,opt,name=mtime" json:"mtime,omitempty"` - Atime *int64 `protobuf:"varint,4,opt,name=atime" json:"atime,omitempty"` - Replication *int32 `protobuf:"varint,5,opt,name=replication" json:"replication,omitempty"` - OwnerName *string `protobuf:"bytes,6,opt,name=ownerName" json:"ownerName,omitempty"` - GroupName *string `protobuf:"bytes,7,opt,name=groupName" json:"groupName,omitempty"` - Perms *FsPermissionProto `protobuf:"bytes,8,opt,name=perms" json:"perms,omitempty"` - Acls []*AclEntryProto `protobuf:"bytes,9,rep,name=acls" json:"acls,omitempty"` - XAttrs []*XAttrProto `protobuf:"bytes,10,rep,name=xAttrs" json:"xAttrs,omitempty"` - XAttrsRemoved *bool `protobuf:"varint,11,opt,name=xAttrsRemoved" json:"xAttrsRemoved,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MetadataUpdateEventProto) Reset() { *m = MetadataUpdateEventProto{} } -func (m *MetadataUpdateEventProto) String() string { return proto.CompactTextString(m) } -func (*MetadataUpdateEventProto) ProtoMessage() {} -func (*MetadataUpdateEventProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{7} } - -func (m *MetadataUpdateEventProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` + Type *MetadataUpdateType `protobuf:"varint,2,req,name=type,enum=hadoop.hdfs.MetadataUpdateType" json:"type,omitempty"` + Mtime *int64 `protobuf:"varint,3,opt,name=mtime" json:"mtime,omitempty"` + Atime *int64 `protobuf:"varint,4,opt,name=atime" json:"atime,omitempty"` + Replication *int32 `protobuf:"varint,5,opt,name=replication" json:"replication,omitempty"` + OwnerName *string `protobuf:"bytes,6,opt,name=ownerName" json:"ownerName,omitempty"` + GroupName *string `protobuf:"bytes,7,opt,name=groupName" json:"groupName,omitempty"` + Perms *FsPermissionProto `protobuf:"bytes,8,opt,name=perms" json:"perms,omitempty"` + Acls []*AclEntryProto `protobuf:"bytes,9,rep,name=acls" json:"acls,omitempty"` + XAttrs []*XAttrProto `protobuf:"bytes,10,rep,name=xAttrs" json:"xAttrs,omitempty"` + XAttrsRemoved *bool `protobuf:"varint,11,opt,name=xAttrsRemoved" json:"xAttrsRemoved,omitempty"` +} + +func (x *MetadataUpdateEventProto) Reset() { + *x = MetadataUpdateEventProto{} + if protoimpl.UnsafeEnabled { + mi := &file_inotify_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetadataUpdateEventProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataUpdateEventProto) ProtoMessage() {} + +func (x *MetadataUpdateEventProto) ProtoReflect() protoreflect.Message { + mi := &file_inotify_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataUpdateEventProto.ProtoReflect.Descriptor instead. +func (*MetadataUpdateEventProto) Descriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{7} +} + +func (x *MetadataUpdateEventProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } return "" } -func (m *MetadataUpdateEventProto) GetType() MetadataUpdateType { - if m != nil && m.Type != nil { - return *m.Type +func (x *MetadataUpdateEventProto) GetType() MetadataUpdateType { + if x != nil && x.Type != nil { + return *x.Type } return MetadataUpdateType_META_TYPE_TIMES } -func (m *MetadataUpdateEventProto) GetMtime() int64 { - if m != nil && m.Mtime != nil { - return *m.Mtime +func (x *MetadataUpdateEventProto) GetMtime() int64 { + if x != nil && x.Mtime != nil { + return *x.Mtime } return 0 } -func (m *MetadataUpdateEventProto) GetAtime() int64 { - if m != nil && m.Atime != nil { - return *m.Atime +func (x *MetadataUpdateEventProto) GetAtime() int64 { + if x != nil && x.Atime != nil { + return *x.Atime } return 0 } -func (m *MetadataUpdateEventProto) GetReplication() int32 { - if m != nil && m.Replication != nil { - return *m.Replication +func (x *MetadataUpdateEventProto) GetReplication() int32 { + if x != nil && x.Replication != nil { + return *x.Replication } return 0 } -func (m *MetadataUpdateEventProto) GetOwnerName() string { - if m != nil && m.OwnerName != nil { - return *m.OwnerName +func (x *MetadataUpdateEventProto) GetOwnerName() string { + if x != nil && x.OwnerName != nil { + return *x.OwnerName } return "" } -func (m *MetadataUpdateEventProto) GetGroupName() string { - if m != nil && m.GroupName != nil { - return *m.GroupName +func (x *MetadataUpdateEventProto) GetGroupName() string { + if x != nil && x.GroupName != nil { + return *x.GroupName } return "" } -func (m *MetadataUpdateEventProto) GetPerms() *FsPermissionProto { - if m != nil { - return m.Perms +func (x *MetadataUpdateEventProto) GetPerms() *FsPermissionProto { + if x != nil { + return x.Perms } return nil } -func (m *MetadataUpdateEventProto) GetAcls() []*AclEntryProto { - if m != nil { - return m.Acls +func (x *MetadataUpdateEventProto) GetAcls() []*AclEntryProto { + if x != nil { + return x.Acls } return nil } -func (m *MetadataUpdateEventProto) GetXAttrs() []*XAttrProto { - if m != nil { - return m.XAttrs +func (x *MetadataUpdateEventProto) GetXAttrs() []*XAttrProto { + if x != nil { + return x.XAttrs } return nil } -func (m *MetadataUpdateEventProto) GetXAttrsRemoved() bool { - if m != nil && m.XAttrsRemoved != nil { - return *m.XAttrsRemoved +func (x *MetadataUpdateEventProto) GetXAttrsRemoved() bool { + if x != nil && x.XAttrsRemoved != nil { + return *x.XAttrsRemoved } return false } type UnlinkEventProto struct { - Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` - Timestamp *int64 `protobuf:"varint,2,req,name=timestamp" json:"timestamp,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path *string `protobuf:"bytes,1,req,name=path" json:"path,omitempty"` + Timestamp *int64 `protobuf:"varint,2,req,name=timestamp" json:"timestamp,omitempty"` } -func (m *UnlinkEventProto) Reset() { *m = UnlinkEventProto{} } -func (m *UnlinkEventProto) String() string { return proto.CompactTextString(m) } -func (*UnlinkEventProto) ProtoMessage() {} -func (*UnlinkEventProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{8} } +func (x *UnlinkEventProto) Reset() { + *x = UnlinkEventProto{} + if protoimpl.UnsafeEnabled { + mi := &file_inotify_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *UnlinkEventProto) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path +func (x *UnlinkEventProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnlinkEventProto) ProtoMessage() {} + +func (x *UnlinkEventProto) ProtoReflect() protoreflect.Message { + mi := &file_inotify_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnlinkEventProto.ProtoReflect.Descriptor instead. +func (*UnlinkEventProto) Descriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{8} +} + +func (x *UnlinkEventProto) GetPath() string { + if x != nil && x.Path != nil { + return *x.Path } return "" } -func (m *UnlinkEventProto) GetTimestamp() int64 { - if m != nil && m.Timestamp != nil { - return *m.Timestamp +func (x *UnlinkEventProto) GetTimestamp() int64 { + if x != nil && x.Timestamp != nil { + return *x.Timestamp } return 0 } type EventsListProto struct { - Events []*EventProto `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"` - FirstTxid *int64 `protobuf:"varint,2,req,name=firstTxid" json:"firstTxid,omitempty"` - LastTxid *int64 `protobuf:"varint,3,req,name=lastTxid" json:"lastTxid,omitempty"` - SyncTxid *int64 `protobuf:"varint,4,req,name=syncTxid" json:"syncTxid,omitempty"` - Batch []*EventBatchProto `protobuf:"bytes,5,rep,name=batch" json:"batch,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Events []*EventProto `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"` // deprecated + FirstTxid *int64 `protobuf:"varint,2,req,name=firstTxid" json:"firstTxid,omitempty"` + LastTxid *int64 `protobuf:"varint,3,req,name=lastTxid" json:"lastTxid,omitempty"` + SyncTxid *int64 `protobuf:"varint,4,req,name=syncTxid" json:"syncTxid,omitempty"` + Batch []*EventBatchProto `protobuf:"bytes,5,rep,name=batch" json:"batch,omitempty"` +} + +func (x *EventsListProto) Reset() { + *x = EventsListProto{} + if protoimpl.UnsafeEnabled { + mi := &file_inotify_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventsListProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventsListProto) ProtoMessage() {} + +func (x *EventsListProto) ProtoReflect() protoreflect.Message { + mi := &file_inotify_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *EventsListProto) Reset() { *m = EventsListProto{} } -func (m *EventsListProto) String() string { return proto.CompactTextString(m) } -func (*EventsListProto) ProtoMessage() {} -func (*EventsListProto) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{9} } +// Deprecated: Use EventsListProto.ProtoReflect.Descriptor instead. +func (*EventsListProto) Descriptor() ([]byte, []int) { + return file_inotify_proto_rawDescGZIP(), []int{9} +} -func (m *EventsListProto) GetEvents() []*EventProto { - if m != nil { - return m.Events +func (x *EventsListProto) GetEvents() []*EventProto { + if x != nil { + return x.Events } return nil } -func (m *EventsListProto) GetFirstTxid() int64 { - if m != nil && m.FirstTxid != nil { - return *m.FirstTxid +func (x *EventsListProto) GetFirstTxid() int64 { + if x != nil && x.FirstTxid != nil { + return *x.FirstTxid } return 0 } -func (m *EventsListProto) GetLastTxid() int64 { - if m != nil && m.LastTxid != nil { - return *m.LastTxid +func (x *EventsListProto) GetLastTxid() int64 { + if x != nil && x.LastTxid != nil { + return *x.LastTxid } return 0 } -func (m *EventsListProto) GetSyncTxid() int64 { - if m != nil && m.SyncTxid != nil { - return *m.SyncTxid +func (x *EventsListProto) GetSyncTxid() int64 { + if x != nil && x.SyncTxid != nil { + return *x.SyncTxid } return 0 } -func (m *EventsListProto) GetBatch() []*EventBatchProto { - if m != nil { - return m.Batch +func (x *EventsListProto) GetBatch() []*EventBatchProto { + if x != nil { + return x.Batch } return nil } -func init() { - proto.RegisterType((*EventProto)(nil), "hadoop.hdfs.EventProto") - proto.RegisterType((*EventBatchProto)(nil), "hadoop.hdfs.EventBatchProto") - proto.RegisterType((*CreateEventProto)(nil), "hadoop.hdfs.CreateEventProto") - proto.RegisterType((*CloseEventProto)(nil), "hadoop.hdfs.CloseEventProto") - proto.RegisterType((*TruncateEventProto)(nil), "hadoop.hdfs.TruncateEventProto") - proto.RegisterType((*AppendEventProto)(nil), "hadoop.hdfs.AppendEventProto") - proto.RegisterType((*RenameEventProto)(nil), "hadoop.hdfs.RenameEventProto") - proto.RegisterType((*MetadataUpdateEventProto)(nil), "hadoop.hdfs.MetadataUpdateEventProto") - proto.RegisterType((*UnlinkEventProto)(nil), "hadoop.hdfs.UnlinkEventProto") - proto.RegisterType((*EventsListProto)(nil), "hadoop.hdfs.EventsListProto") - proto.RegisterEnum("hadoop.hdfs.EventType", EventType_name, EventType_value) - proto.RegisterEnum("hadoop.hdfs.INodeType", INodeType_name, INodeType_value) - proto.RegisterEnum("hadoop.hdfs.MetadataUpdateType", MetadataUpdateType_name, MetadataUpdateType_value) -} - -func init() { proto.RegisterFile("inotify.proto", fileDescriptor7) } - -var fileDescriptor7 = []byte{ - // 917 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5f, 0x6f, 0xe3, 0x44, - 0x10, 0x3f, 0x3b, 0x71, 0x2f, 0x99, 0x5c, 0xaf, 0xab, 0xa5, 0x80, 0x89, 0x4e, 0x10, 0x22, 0x90, - 0xa2, 0x4a, 0x04, 0x54, 0x78, 0xe1, 0xde, 0xdc, 0xd4, 0x95, 0x2c, 0x12, 0x37, 0xda, 0xb8, 0xc7, - 0xf5, 0xa9, 0xda, 0xb3, 0x37, 0x8d, 0x75, 0x8e, 0x6d, 0x79, 0xb7, 0x7f, 0xc2, 0x67, 0xe0, 0x03, - 0xf0, 0xc8, 0x33, 0x9f, 0x85, 0xef, 0xc2, 0x57, 0x40, 0xbb, 0xeb, 0xda, 0xf1, 0xe5, 0x50, 0xfb, - 0xc0, 0x9b, 0xe7, 0x37, 0xbf, 0x9d, 0xf9, 0x79, 0x76, 0x66, 0x6c, 0xd8, 0x8f, 0xd3, 0x4c, 0xc4, - 0xcb, 0xcd, 0x38, 0x2f, 0x32, 0x91, 0xe1, 0xde, 0x8a, 0x46, 0x59, 0x96, 0x8f, 0x57, 0xd1, 0x92, - 0xf7, 0xbb, 0x34, 0x4c, 0x34, 0xde, 0xef, 0xdd, 0x53, 0x21, 0x8a, 0xd2, 0x00, 0xe9, 0xd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c, 0xa1, 0x5f, 0xb9, 0x06, 0x9d, 0xc9, 0x74, 0x81, 0xda, 0x52, 0x6e, - 0x8d, 0xbd, 0x75, 0x82, 0x80, 0x2c, 0x90, 0x75, 0xf2, 0x33, 0x7c, 0x9b, 0x15, 0xd7, 0x63, 0x9a, - 0xd3, 0x70, 0xc5, 0x1a, 0x57, 0xa4, 0xbe, 0xf5, 0x61, 0x56, 0xfe, 0x0d, 0x9c, 0xec, 0x7b, 0xfa, - 0xa7, 0x41, 0xdd, 0x17, 0xff, 0xd3, 0x30, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x80, 0xd0, 0x57, - 0x29, 0x47, 0x08, 0x00, 0x00, +var File_inotify_proto protoreflect.FileDescriptor + +var file_inotify_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x69, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0b, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x1a, 0x09, 0x61, 0x63, + 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x78, 0x61, 0x74, 0x74, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x54, 0x0a, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, + 0x32, 0x16, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0c, + 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x56, 0x0a, 0x0f, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x03, 0x52, 0x04, 0x74, 0x78, 0x69, + 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x22, 0x93, 0x03, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, + 0x64, 0x66, 0x73, 0x2e, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x02, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x09, + 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x02, 0x28, 0x09, 0x52, 0x09, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x65, 0x72, + 0x6d, 0x73, 0x18, 0x06, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x70, 0x65, 0x72, 0x6d, 0x73, 0x12, + 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x3a, + 0x01, 0x30, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x72, 0x61, 0x73, 0x75, 0x72, 0x65, 0x43, + 0x6f, 0x64, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x65, 0x72, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x64, 0x22, 0x5f, 0x0a, 0x0f, 0x43, 0x6c, 0x6f, 0x73, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, + 0x03, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x62, 0x0a, 0x12, 0x54, 0x72, 0x75, + 0x6e, 0x63, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x02, + 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x49, 0x0a, + 0x10, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x08, + 0x6e, 0x65, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x66, 0x0a, 0x10, 0x52, 0x65, 0x6e, 0x61, + 0x6d, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x72, 0x63, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x07, 0x73, + 0x72, 0x63, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x74, 0x50, 0x61, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x73, 0x74, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0xaa, 0x03, 0x0a, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x33, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0e, 0x32, + 0x1f, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x61, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x61, 0x74, 0x69, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x34, 0x0a, 0x05, 0x70, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x46, 0x73, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x05, 0x70, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x61, 0x63, 0x6c, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, + 0x66, 0x73, 0x2e, 0x41, 0x63, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x04, 0x61, 0x63, 0x6c, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x78, 0x41, 0x74, 0x74, 0x72, 0x73, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, + 0x68, 0x64, 0x66, 0x73, 0x2e, 0x58, 0x41, 0x74, 0x74, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x06, 0x78, 0x41, 0x74, 0x74, 0x72, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x78, 0x41, 0x74, 0x74, 0x72, + 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, + 0x78, 0x41, 0x74, 0x74, 0x72, 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x44, 0x0a, + 0x10, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x22, 0xcc, 0x01, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, + 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x54, 0x78, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x03, 0x52, 0x09, 0x66, 0x69, 0x72, + 0x73, 0x74, 0x54, 0x78, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x78, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x78, + 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x54, 0x78, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x02, 0x28, 0x03, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x54, 0x78, 0x69, 0x64, 0x12, 0x32, + 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x62, 0x61, 0x74, + 0x63, 0x68, 0x2a, 0x8c, 0x01, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, + 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4c, 0x4f, 0x53, + 0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x50, 0x50, + 0x45, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x52, + 0x45, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x05, 0x12, 0x12, 0x0a, + 0x0e, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x52, 0x55, 0x4e, 0x43, 0x41, 0x54, 0x45, 0x10, + 0x06, 0x2a, 0x46, 0x0a, 0x09, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, + 0x0a, 0x0b, 0x49, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x00, 0x12, + 0x14, 0x0a, 0x10, 0x49, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, + 0x4f, 0x52, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x53, 0x59, 0x4d, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x02, 0x2a, 0x98, 0x01, 0x0a, 0x12, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x45, 0x54, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x49, + 0x4d, 0x45, 0x53, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x4d, 0x45, 0x54, 0x41, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, + 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x45, 0x54, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x57, + 0x4e, 0x45, 0x52, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x45, 0x54, 0x41, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x53, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4d, 0x45, + 0x54, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x43, 0x4c, 0x53, 0x10, 0x04, 0x12, 0x14, + 0x0a, 0x10, 0x4d, 0x45, 0x54, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x58, 0x41, 0x54, 0x54, + 0x52, 0x53, 0x10, 0x05, 0x42, 0x75, 0x0a, 0x25, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, + 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x0d, 0x49, + 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, + 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x5f, 0x68, 0x64, 0x66, 0x73, 0xa0, 0x01, 0x01, +} + +var ( + file_inotify_proto_rawDescOnce sync.Once + file_inotify_proto_rawDescData = file_inotify_proto_rawDesc +) + +func file_inotify_proto_rawDescGZIP() []byte { + file_inotify_proto_rawDescOnce.Do(func() { + file_inotify_proto_rawDescData = protoimpl.X.CompressGZIP(file_inotify_proto_rawDescData) + }) + return file_inotify_proto_rawDescData +} + +var file_inotify_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_inotify_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_inotify_proto_goTypes = []interface{}{ + (EventType)(0), // 0: hadoop.hdfs.EventType + (INodeType)(0), // 1: hadoop.hdfs.INodeType + (MetadataUpdateType)(0), // 2: hadoop.hdfs.MetadataUpdateType + (*EventProto)(nil), // 3: hadoop.hdfs.EventProto + (*EventBatchProto)(nil), // 4: hadoop.hdfs.EventBatchProto + (*CreateEventProto)(nil), // 5: hadoop.hdfs.CreateEventProto + (*CloseEventProto)(nil), // 6: hadoop.hdfs.CloseEventProto + (*TruncateEventProto)(nil), // 7: hadoop.hdfs.TruncateEventProto + (*AppendEventProto)(nil), // 8: hadoop.hdfs.AppendEventProto + (*RenameEventProto)(nil), // 9: hadoop.hdfs.RenameEventProto + (*MetadataUpdateEventProto)(nil), // 10: hadoop.hdfs.MetadataUpdateEventProto + (*UnlinkEventProto)(nil), // 11: hadoop.hdfs.UnlinkEventProto + (*EventsListProto)(nil), // 12: hadoop.hdfs.EventsListProto + (*FsPermissionProto)(nil), // 13: hadoop.hdfs.FsPermissionProto + (*AclEntryProto)(nil), // 14: hadoop.hdfs.AclEntryProto + (*XAttrProto)(nil), // 15: hadoop.hdfs.XAttrProto +} +var file_inotify_proto_depIdxs = []int32{ + 0, // 0: hadoop.hdfs.EventProto.type:type_name -> hadoop.hdfs.EventType + 3, // 1: hadoop.hdfs.EventBatchProto.events:type_name -> hadoop.hdfs.EventProto + 1, // 2: hadoop.hdfs.CreateEventProto.type:type_name -> hadoop.hdfs.INodeType + 13, // 3: hadoop.hdfs.CreateEventProto.perms:type_name -> hadoop.hdfs.FsPermissionProto + 2, // 4: hadoop.hdfs.MetadataUpdateEventProto.type:type_name -> hadoop.hdfs.MetadataUpdateType + 13, // 5: hadoop.hdfs.MetadataUpdateEventProto.perms:type_name -> hadoop.hdfs.FsPermissionProto + 14, // 6: hadoop.hdfs.MetadataUpdateEventProto.acls:type_name -> hadoop.hdfs.AclEntryProto + 15, // 7: hadoop.hdfs.MetadataUpdateEventProto.xAttrs:type_name -> hadoop.hdfs.XAttrProto + 3, // 8: hadoop.hdfs.EventsListProto.events:type_name -> hadoop.hdfs.EventProto + 4, // 9: hadoop.hdfs.EventsListProto.batch:type_name -> hadoop.hdfs.EventBatchProto + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_inotify_proto_init() } +func file_inotify_proto_init() { + if File_inotify_proto != nil { + return + } + file_acl_proto_init() + file_xattr_proto_init() + if !protoimpl.UnsafeEnabled { + file_inotify_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inotify_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventBatchProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inotify_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateEventProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inotify_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloseEventProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inotify_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TruncateEventProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inotify_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppendEventProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inotify_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenameEventProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inotify_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetadataUpdateEventProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inotify_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnlinkEventProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inotify_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventsListProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_inotify_proto_rawDesc, + NumEnums: 3, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_inotify_proto_goTypes, + DependencyIndexes: file_inotify_proto_depIdxs, + EnumInfos: file_inotify_proto_enumTypes, + MessageInfos: file_inotify_proto_msgTypes, + }.Build() + File_inotify_proto = out.File + file_inotify_proto_rawDesc = nil + file_inotify_proto_goTypes = nil + file_inotify_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_hdfs/inotify.proto b/internal/protocol/hadoop_hdfs/inotify.proto index 53399029..8c2e899f 100644 --- a/internal/protocol/hadoop_hdfs/inotify.proto +++ b/internal/protocol/hadoop_hdfs/inotify.proto @@ -21,18 +21,18 @@ * Please see http://wiki.apache.org/hadoop/Compatibility * for what changes are allowed for a *stable* .proto interface. */ - +syntax="proto2"; // This file contains protocol buffers used to communicate edits to clients // as part of the inotify system. option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "InotifyProtos"; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; package hadoop.hdfs; import "acl.proto"; import "xattr.proto"; -import "hdfs.proto"; enum EventType { EVENT_CREATE = 0x0; @@ -80,6 +80,7 @@ message CreateEventProto { optional string symlinkTarget = 8; optional bool overwrite = 9; optional int64 defaultBlockSize = 10 [default=0]; + optional bool erasureCoded = 11; } message CloseEventProto { diff --git a/internal/protocol/hadoop_hdfs/untitled b/internal/protocol/hadoop_hdfs/untitled new file mode 100644 index 00000000..e69de29b diff --git a/internal/protocol/hadoop_hdfs/xattr.pb.go b/internal/protocol/hadoop_hdfs/xattr.pb.go index 06aa8bc1..d02aab54 100644 --- a/internal/protocol/hadoop_hdfs/xattr.pb.go +++ b/internal/protocol/hadoop_hdfs/xattr.pb.go @@ -1,16 +1,41 @@ +//* +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 // source: xattr.proto package hadoop_hdfs -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type XAttrSetFlagProto int32 @@ -19,32 +44,54 @@ const ( XAttrSetFlagProto_XATTR_REPLACE XAttrSetFlagProto = 2 ) -var XAttrSetFlagProto_name = map[int32]string{ - 1: "XATTR_CREATE", - 2: "XATTR_REPLACE", -} -var XAttrSetFlagProto_value = map[string]int32{ - "XATTR_CREATE": 1, - "XATTR_REPLACE": 2, -} +// Enum value maps for XAttrSetFlagProto. +var ( + XAttrSetFlagProto_name = map[int32]string{ + 1: "XATTR_CREATE", + 2: "XATTR_REPLACE", + } + XAttrSetFlagProto_value = map[string]int32{ + "XATTR_CREATE": 1, + "XATTR_REPLACE": 2, + } +) func (x XAttrSetFlagProto) Enum() *XAttrSetFlagProto { p := new(XAttrSetFlagProto) *p = x return p } + func (x XAttrSetFlagProto) String() string { - return proto.EnumName(XAttrSetFlagProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (XAttrSetFlagProto) Descriptor() protoreflect.EnumDescriptor { + return file_xattr_proto_enumTypes[0].Descriptor() +} + +func (XAttrSetFlagProto) Type() protoreflect.EnumType { + return &file_xattr_proto_enumTypes[0] +} + +func (x XAttrSetFlagProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *XAttrSetFlagProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(XAttrSetFlagProto_value, data, "XAttrSetFlagProto") + +// Deprecated: Do not use. +func (x *XAttrSetFlagProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = XAttrSetFlagProto(value) + *x = XAttrSetFlagProto(num) return nil } -func (XAttrSetFlagProto) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } + +// Deprecated: Use XAttrSetFlagProto.Descriptor instead. +func (XAttrSetFlagProto) EnumDescriptor() ([]byte, []int) { + return file_xattr_proto_rawDescGZIP(), []int{0} +} type XAttrProto_XAttrNamespaceProto int32 @@ -56,268 +103,752 @@ const ( XAttrProto_RAW XAttrProto_XAttrNamespaceProto = 4 ) -var XAttrProto_XAttrNamespaceProto_name = map[int32]string{ - 0: "USER", - 1: "TRUSTED", - 2: "SECURITY", - 3: "SYSTEM", - 4: "RAW", -} -var XAttrProto_XAttrNamespaceProto_value = map[string]int32{ - "USER": 0, - "TRUSTED": 1, - "SECURITY": 2, - "SYSTEM": 3, - "RAW": 4, -} +// Enum value maps for XAttrProto_XAttrNamespaceProto. +var ( + XAttrProto_XAttrNamespaceProto_name = map[int32]string{ + 0: "USER", + 1: "TRUSTED", + 2: "SECURITY", + 3: "SYSTEM", + 4: "RAW", + } + XAttrProto_XAttrNamespaceProto_value = map[string]int32{ + "USER": 0, + "TRUSTED": 1, + "SECURITY": 2, + "SYSTEM": 3, + "RAW": 4, + } +) func (x XAttrProto_XAttrNamespaceProto) Enum() *XAttrProto_XAttrNamespaceProto { p := new(XAttrProto_XAttrNamespaceProto) *p = x return p } + func (x XAttrProto_XAttrNamespaceProto) String() string { - return proto.EnumName(XAttrProto_XAttrNamespaceProto_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (x *XAttrProto_XAttrNamespaceProto) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(XAttrProto_XAttrNamespaceProto_value, data, "XAttrProto_XAttrNamespaceProto") + +func (XAttrProto_XAttrNamespaceProto) Descriptor() protoreflect.EnumDescriptor { + return file_xattr_proto_enumTypes[1].Descriptor() +} + +func (XAttrProto_XAttrNamespaceProto) Type() protoreflect.EnumType { + return &file_xattr_proto_enumTypes[1] +} + +func (x XAttrProto_XAttrNamespaceProto) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *XAttrProto_XAttrNamespaceProto) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) if err != nil { return err } - *x = XAttrProto_XAttrNamespaceProto(value) + *x = XAttrProto_XAttrNamespaceProto(num) return nil } + +// Deprecated: Use XAttrProto_XAttrNamespaceProto.Descriptor instead. func (XAttrProto_XAttrNamespaceProto) EnumDescriptor() ([]byte, []int) { - return fileDescriptor1, []int{0, 0} + return file_xattr_proto_rawDescGZIP(), []int{0, 0} } type XAttrProto struct { - Namespace *XAttrProto_XAttrNamespaceProto `protobuf:"varint,1,req,name=namespace,enum=hadoop.hdfs.XAttrProto_XAttrNamespaceProto" json:"namespace,omitempty"` - Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` - Value []byte `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace *XAttrProto_XAttrNamespaceProto `protobuf:"varint,1,req,name=namespace,enum=hadoop.hdfs.XAttrProto_XAttrNamespaceProto" json:"namespace,omitempty"` + Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` + Value []byte `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` } -func (m *XAttrProto) Reset() { *m = XAttrProto{} } -func (m *XAttrProto) String() string { return proto.CompactTextString(m) } -func (*XAttrProto) ProtoMessage() {} -func (*XAttrProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } +func (x *XAttrProto) Reset() { + *x = XAttrProto{} + if protoimpl.UnsafeEnabled { + mi := &file_xattr_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XAttrProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XAttrProto) ProtoMessage() {} -func (m *XAttrProto) GetNamespace() XAttrProto_XAttrNamespaceProto { - if m != nil && m.Namespace != nil { - return *m.Namespace +func (x *XAttrProto) ProtoReflect() protoreflect.Message { + mi := &file_xattr_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XAttrProto.ProtoReflect.Descriptor instead. +func (*XAttrProto) Descriptor() ([]byte, []int) { + return file_xattr_proto_rawDescGZIP(), []int{0} +} + +func (x *XAttrProto) GetNamespace() XAttrProto_XAttrNamespaceProto { + if x != nil && x.Namespace != nil { + return *x.Namespace } return XAttrProto_USER } -func (m *XAttrProto) GetName() string { - if m != nil && m.Name != nil { - return *m.Name +func (x *XAttrProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name } return "" } -func (m *XAttrProto) GetValue() []byte { - if m != nil { - return m.Value +func (x *XAttrProto) GetValue() []byte { + if x != nil { + return x.Value } return nil } type SetXAttrRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XAttr *XAttrProto `protobuf:"bytes,2,opt,name=xAttr" json:"xAttr,omitempty"` - Flag *uint32 `protobuf:"varint,3,opt,name=flag" json:"flag,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + XAttr *XAttrProto `protobuf:"bytes,2,opt,name=xAttr" json:"xAttr,omitempty"` + Flag *uint32 `protobuf:"varint,3,opt,name=flag" json:"flag,omitempty"` //bits set using XAttrSetFlagProto +} + +func (x *SetXAttrRequestProto) Reset() { + *x = SetXAttrRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_xattr_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetXAttrRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetXAttrRequestProto) Reset() { *m = SetXAttrRequestProto{} } -func (m *SetXAttrRequestProto) String() string { return proto.CompactTextString(m) } -func (*SetXAttrRequestProto) ProtoMessage() {} -func (*SetXAttrRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } +func (*SetXAttrRequestProto) ProtoMessage() {} -func (m *SetXAttrRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *SetXAttrRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_xattr_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetXAttrRequestProto.ProtoReflect.Descriptor instead. +func (*SetXAttrRequestProto) Descriptor() ([]byte, []int) { + return file_xattr_proto_rawDescGZIP(), []int{1} +} + +func (x *SetXAttrRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *SetXAttrRequestProto) GetXAttr() *XAttrProto { - if m != nil { - return m.XAttr +func (x *SetXAttrRequestProto) GetXAttr() *XAttrProto { + if x != nil { + return x.XAttr } return nil } -func (m *SetXAttrRequestProto) GetFlag() uint32 { - if m != nil && m.Flag != nil { - return *m.Flag +func (x *SetXAttrRequestProto) GetFlag() uint32 { + if x != nil && x.Flag != nil { + return *x.Flag } return 0 } type SetXAttrResponseProto struct { - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetXAttrResponseProto) Reset() { + *x = SetXAttrResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_xattr_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetXAttrResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetXAttrResponseProto) ProtoMessage() {} + +func (x *SetXAttrResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_xattr_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *SetXAttrResponseProto) Reset() { *m = SetXAttrResponseProto{} } -func (m *SetXAttrResponseProto) String() string { return proto.CompactTextString(m) } -func (*SetXAttrResponseProto) ProtoMessage() {} -func (*SetXAttrResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } +// Deprecated: Use SetXAttrResponseProto.ProtoReflect.Descriptor instead. +func (*SetXAttrResponseProto) Descriptor() ([]byte, []int) { + return file_xattr_proto_rawDescGZIP(), []int{2} +} type GetXAttrsRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XAttrs []*XAttrProto `protobuf:"bytes,2,rep,name=xAttrs" json:"xAttrs,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + XAttrs []*XAttrProto `protobuf:"bytes,2,rep,name=xAttrs" json:"xAttrs,omitempty"` } -func (m *GetXAttrsRequestProto) Reset() { *m = GetXAttrsRequestProto{} } -func (m *GetXAttrsRequestProto) String() string { return proto.CompactTextString(m) } -func (*GetXAttrsRequestProto) ProtoMessage() {} -func (*GetXAttrsRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} } +func (x *GetXAttrsRequestProto) Reset() { + *x = GetXAttrsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_xattr_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetXAttrsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetXAttrsRequestProto) ProtoMessage() {} + +func (x *GetXAttrsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_xattr_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetXAttrsRequestProto.ProtoReflect.Descriptor instead. +func (*GetXAttrsRequestProto) Descriptor() ([]byte, []int) { + return file_xattr_proto_rawDescGZIP(), []int{3} +} -func (m *GetXAttrsRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *GetXAttrsRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *GetXAttrsRequestProto) GetXAttrs() []*XAttrProto { - if m != nil { - return m.XAttrs +func (x *GetXAttrsRequestProto) GetXAttrs() []*XAttrProto { + if x != nil { + return x.XAttrs } return nil } type GetXAttrsResponseProto struct { - XAttrs []*XAttrProto `protobuf:"bytes,1,rep,name=xAttrs" json:"xAttrs,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + XAttrs []*XAttrProto `protobuf:"bytes,1,rep,name=xAttrs" json:"xAttrs,omitempty"` +} + +func (x *GetXAttrsResponseProto) Reset() { + *x = GetXAttrsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_xattr_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetXAttrsResponseProto) Reset() { *m = GetXAttrsResponseProto{} } -func (m *GetXAttrsResponseProto) String() string { return proto.CompactTextString(m) } -func (*GetXAttrsResponseProto) ProtoMessage() {} -func (*GetXAttrsResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} } +func (x *GetXAttrsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetXAttrsResponseProto) ProtoMessage() {} -func (m *GetXAttrsResponseProto) GetXAttrs() []*XAttrProto { - if m != nil { - return m.XAttrs +func (x *GetXAttrsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_xattr_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetXAttrsResponseProto.ProtoReflect.Descriptor instead. +func (*GetXAttrsResponseProto) Descriptor() ([]byte, []int) { + return file_xattr_proto_rawDescGZIP(), []int{4} +} + +func (x *GetXAttrsResponseProto) GetXAttrs() []*XAttrProto { + if x != nil { + return x.XAttrs } return nil } type ListXAttrsRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` +} + +func (x *ListXAttrsRequestProto) Reset() { + *x = ListXAttrsRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_xattr_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListXAttrsRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListXAttrsRequestProto) ProtoMessage() {} + +func (x *ListXAttrsRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_xattr_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ListXAttrsRequestProto) Reset() { *m = ListXAttrsRequestProto{} } -func (m *ListXAttrsRequestProto) String() string { return proto.CompactTextString(m) } -func (*ListXAttrsRequestProto) ProtoMessage() {} -func (*ListXAttrsRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} } +// Deprecated: Use ListXAttrsRequestProto.ProtoReflect.Descriptor instead. +func (*ListXAttrsRequestProto) Descriptor() ([]byte, []int) { + return file_xattr_proto_rawDescGZIP(), []int{5} +} -func (m *ListXAttrsRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *ListXAttrsRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } type ListXAttrsResponseProto struct { - XAttrs []*XAttrProto `protobuf:"bytes,1,rep,name=xAttrs" json:"xAttrs,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + XAttrs []*XAttrProto `protobuf:"bytes,1,rep,name=xAttrs" json:"xAttrs,omitempty"` +} + +func (x *ListXAttrsResponseProto) Reset() { + *x = ListXAttrsResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_xattr_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ListXAttrsResponseProto) Reset() { *m = ListXAttrsResponseProto{} } -func (m *ListXAttrsResponseProto) String() string { return proto.CompactTextString(m) } -func (*ListXAttrsResponseProto) ProtoMessage() {} -func (*ListXAttrsResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} } +func (x *ListXAttrsResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListXAttrsResponseProto) ProtoMessage() {} + +func (x *ListXAttrsResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_xattr_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListXAttrsResponseProto.ProtoReflect.Descriptor instead. +func (*ListXAttrsResponseProto) Descriptor() ([]byte, []int) { + return file_xattr_proto_rawDescGZIP(), []int{6} +} -func (m *ListXAttrsResponseProto) GetXAttrs() []*XAttrProto { - if m != nil { - return m.XAttrs +func (x *ListXAttrsResponseProto) GetXAttrs() []*XAttrProto { + if x != nil { + return x.XAttrs } return nil } type RemoveXAttrRequestProto struct { - Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` - XAttr *XAttrProto `protobuf:"bytes,2,opt,name=xAttr" json:"xAttr,omitempty"` - XXX_unrecognized []byte `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Src *string `protobuf:"bytes,1,req,name=src" json:"src,omitempty"` + XAttr *XAttrProto `protobuf:"bytes,2,opt,name=xAttr" json:"xAttr,omitempty"` +} + +func (x *RemoveXAttrRequestProto) Reset() { + *x = RemoveXAttrRequestProto{} + if protoimpl.UnsafeEnabled { + mi := &file_xattr_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RemoveXAttrRequestProto) Reset() { *m = RemoveXAttrRequestProto{} } -func (m *RemoveXAttrRequestProto) String() string { return proto.CompactTextString(m) } -func (*RemoveXAttrRequestProto) ProtoMessage() {} -func (*RemoveXAttrRequestProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} } +func (x *RemoveXAttrRequestProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveXAttrRequestProto) ProtoMessage() {} -func (m *RemoveXAttrRequestProto) GetSrc() string { - if m != nil && m.Src != nil { - return *m.Src +func (x *RemoveXAttrRequestProto) ProtoReflect() protoreflect.Message { + mi := &file_xattr_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveXAttrRequestProto.ProtoReflect.Descriptor instead. +func (*RemoveXAttrRequestProto) Descriptor() ([]byte, []int) { + return file_xattr_proto_rawDescGZIP(), []int{7} +} + +func (x *RemoveXAttrRequestProto) GetSrc() string { + if x != nil && x.Src != nil { + return *x.Src } return "" } -func (m *RemoveXAttrRequestProto) GetXAttr() *XAttrProto { - if m != nil { - return m.XAttr +func (x *RemoveXAttrRequestProto) GetXAttr() *XAttrProto { + if x != nil { + return x.XAttr } return nil } type RemoveXAttrResponseProto struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *RemoveXAttrResponseProto) Reset() { *m = RemoveXAttrResponseProto{} } -func (m *RemoveXAttrResponseProto) String() string { return proto.CompactTextString(m) } -func (*RemoveXAttrResponseProto) ProtoMessage() {} -func (*RemoveXAttrResponseProto) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} } - -func init() { - proto.RegisterType((*XAttrProto)(nil), "hadoop.hdfs.XAttrProto") - proto.RegisterType((*SetXAttrRequestProto)(nil), "hadoop.hdfs.SetXAttrRequestProto") - proto.RegisterType((*SetXAttrResponseProto)(nil), "hadoop.hdfs.SetXAttrResponseProto") - proto.RegisterType((*GetXAttrsRequestProto)(nil), "hadoop.hdfs.GetXAttrsRequestProto") - proto.RegisterType((*GetXAttrsResponseProto)(nil), "hadoop.hdfs.GetXAttrsResponseProto") - proto.RegisterType((*ListXAttrsRequestProto)(nil), "hadoop.hdfs.ListXAttrsRequestProto") - proto.RegisterType((*ListXAttrsResponseProto)(nil), "hadoop.hdfs.ListXAttrsResponseProto") - proto.RegisterType((*RemoveXAttrRequestProto)(nil), "hadoop.hdfs.RemoveXAttrRequestProto") - proto.RegisterType((*RemoveXAttrResponseProto)(nil), "hadoop.hdfs.RemoveXAttrResponseProto") - proto.RegisterEnum("hadoop.hdfs.XAttrSetFlagProto", XAttrSetFlagProto_name, XAttrSetFlagProto_value) - proto.RegisterEnum("hadoop.hdfs.XAttrProto_XAttrNamespaceProto", XAttrProto_XAttrNamespaceProto_name, XAttrProto_XAttrNamespaceProto_value) -} - -func init() { proto.RegisterFile("xattr.proto", fileDescriptor1) } - -var fileDescriptor1 = []byte{ - // 408 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xdf, 0x6e, 0xd3, 0x30, - 0x18, 0xc5, 0x71, 0xd2, 0xfd, 0xe9, 0x97, 0x0e, 0x79, 0x66, 0x5b, 0x22, 0xae, 0x22, 0x4b, 0x48, - 0xd1, 0x10, 0x41, 0xda, 0x0d, 0xdc, 0x66, 0xc5, 0xa0, 0xa2, 0x01, 0x93, 0x93, 0x8a, 0x6d, 0x37, - 0xc8, 0xca, 0xbc, 0x16, 0x91, 0xd5, 0x21, 0x76, 0xab, 0x3e, 0x0e, 0xcf, 0xc4, 0x13, 0xa1, 0x38, - 0xad, 0x92, 0x4a, 0xfc, 0xa9, 0xc4, 0xee, 0x8e, 0x3f, 0x9f, 0x9c, 0xf3, 0xfb, 0x14, 0x19, 0xbc, - 0xa5, 0x30, 0xa6, 0x8a, 0xcb, 0x4a, 0x19, 0x45, 0xbc, 0xa9, 0xb8, 0x55, 0xaa, 0x8c, 0xa7, 0xb7, - 0x77, 0x9a, 0xfe, 0x44, 0x00, 0x57, 0x89, 0x31, 0xd5, 0xa5, 0xbd, 0x1b, 0x41, 0x7f, 0x26, 0xee, - 0xa5, 0x2e, 0x45, 0x2e, 0x03, 0x14, 0x3a, 0xd1, 0xe3, 0xb3, 0xe7, 0x71, 0xc7, 0x1f, 0xb7, 0xde, - 0x46, 0x7e, 0x5c, 0xbb, 0xed, 0x8c, 0xb7, 0x5f, 0x13, 0x02, 0xbd, 0xfa, 0x10, 0x38, 0xa1, 0x13, - 0xf5, 0xb9, 0xd5, 0xe4, 0x08, 0x76, 0x16, 0xa2, 0x98, 0xcb, 0xc0, 0x0d, 0x51, 0x34, 0xe0, 0xcd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2, 0xbc, 0x2d, 0xc4, 0x64, 0xdd, 0x38, 0xb8, 0x4a, 0xb2, 0x8c, 0x7f, 0x19, - 0x72, 0x96, 0x64, 0x0c, 0x23, 0x72, 0x08, 0x07, 0xcd, 0x84, 0xb3, 0xcb, 0x8b, 0x64, 0xc8, 0xb0, - 0x73, 0xfe, 0x0a, 0x9e, 0xa9, 0x6a, 0x12, 0x8b, 0x52, 0xe4, 0x53, 0xb9, 0x41, 0x60, 0x1f, 0x56, - 0xae, 0x8a, 0x46, 0x9c, 0x7b, 0x2d, 0x91, 0xfe, 0x81, 0xd0, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x56, 0x91, 0x13, 0x1d, 0x7f, 0x03, 0x00, 0x00, + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveXAttrResponseProto) Reset() { + *x = RemoveXAttrResponseProto{} + if protoimpl.UnsafeEnabled { + mi := &file_xattr_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveXAttrResponseProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveXAttrResponseProto) ProtoMessage() {} + +func (x *RemoveXAttrResponseProto) ProtoReflect() protoreflect.Message { + mi := &file_xattr_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveXAttrResponseProto.ProtoReflect.Descriptor instead. +func (*RemoveXAttrResponseProto) Descriptor() ([]byte, []int) { + return file_xattr_proto_rawDescGZIP(), []int{8} +} + +var File_xattr_proto protoreflect.FileDescriptor + +var file_xattr_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x78, 0x61, 0x74, 0x74, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x0a, 0x58, + 0x41, 0x74, 0x74, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x49, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x68, + 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x58, 0x41, 0x74, 0x74, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x58, 0x41, 0x74, 0x74, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4f, + 0x0a, 0x13, 0x58, 0x41, 0x74, 0x74, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x54, 0x52, 0x55, 0x53, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, + 0x53, 0x45, 0x43, 0x55, 0x52, 0x49, 0x54, 0x59, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59, + 0x53, 0x54, 0x45, 0x4d, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x41, 0x57, 0x10, 0x04, 0x22, + 0x6b, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x58, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x2d, 0x0a, 0x05, 0x78, 0x41, 0x74, + 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, + 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x58, 0x41, 0x74, 0x74, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x05, 0x78, 0x41, 0x74, 0x74, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x22, 0x17, 0x0a, 0x15, + 0x53, 0x65, 0x74, 0x58, 0x41, 0x74, 0x74, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x58, 0x41, 0x74, 0x74, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, + 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, + 0x12, 0x2f, 0x0a, 0x06, 0x78, 0x41, 0x74, 0x74, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x58, + 0x41, 0x74, 0x74, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x78, 0x41, 0x74, 0x74, 0x72, + 0x73, 0x22, 0x49, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x58, 0x41, 0x74, 0x74, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x0a, 0x06, 0x78, + 0x41, 0x74, 0x74, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, + 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x58, 0x41, 0x74, 0x74, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x78, 0x41, 0x74, 0x74, 0x72, 0x73, 0x22, 0x2a, 0x0a, 0x16, + 0x4c, 0x69, 0x73, 0x74, 0x58, 0x41, 0x74, 0x74, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, + 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x22, 0x4a, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, + 0x58, 0x41, 0x74, 0x74, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x0a, 0x06, 0x78, 0x41, 0x74, 0x74, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, + 0x73, 0x2e, 0x58, 0x41, 0x74, 0x74, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x78, 0x41, + 0x74, 0x74, 0x72, 0x73, 0x22, 0x5a, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x58, 0x41, + 0x74, 0x74, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x10, 0x0a, 0x03, 0x73, 0x72, 0x63, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, + 0x63, 0x12, 0x2d, 0x0a, 0x05, 0x78, 0x41, 0x74, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, 0x2e, 0x58, + 0x41, 0x74, 0x74, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x78, 0x41, 0x74, 0x74, 0x72, + 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x58, 0x41, 0x74, 0x74, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x38, 0x0a, 0x11, + 0x58, 0x41, 0x74, 0x74, 0x72, 0x53, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x10, 0x0a, 0x0c, 0x58, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x58, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x52, 0x45, 0x50, + 0x4c, 0x41, 0x43, 0x45, 0x10, 0x02, 0x42, 0x73, 0x0a, 0x25, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, + 0x61, 0x63, 0x68, 0x65, 0x2e, 0x68, 0x61, 0x64, 0x6f, 0x6f, 0x70, 0x2e, 0x68, 0x64, 0x66, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, + 0x0b, 0x58, 0x41, 0x74, 0x74, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x3a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6c, 0x69, 0x6e, 0x6d, 0x61, + 0x72, 0x63, 0x2f, 0x68, 0x64, 0x66, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x68, 0x61, 0x64, + 0x6f, 0x6f, 0x70, 0x5f, 0x68, 0x64, 0x66, 0x73, 0xa0, 0x01, 0x01, +} + +var ( + file_xattr_proto_rawDescOnce sync.Once + file_xattr_proto_rawDescData = file_xattr_proto_rawDesc +) + +func file_xattr_proto_rawDescGZIP() []byte { + file_xattr_proto_rawDescOnce.Do(func() { + file_xattr_proto_rawDescData = protoimpl.X.CompressGZIP(file_xattr_proto_rawDescData) + }) + return file_xattr_proto_rawDescData +} + +var file_xattr_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_xattr_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_xattr_proto_goTypes = []interface{}{ + (XAttrSetFlagProto)(0), // 0: hadoop.hdfs.XAttrSetFlagProto + (XAttrProto_XAttrNamespaceProto)(0), // 1: hadoop.hdfs.XAttrProto.XAttrNamespaceProto + (*XAttrProto)(nil), // 2: hadoop.hdfs.XAttrProto + (*SetXAttrRequestProto)(nil), // 3: hadoop.hdfs.SetXAttrRequestProto + (*SetXAttrResponseProto)(nil), // 4: hadoop.hdfs.SetXAttrResponseProto + (*GetXAttrsRequestProto)(nil), // 5: hadoop.hdfs.GetXAttrsRequestProto + (*GetXAttrsResponseProto)(nil), // 6: hadoop.hdfs.GetXAttrsResponseProto + (*ListXAttrsRequestProto)(nil), // 7: hadoop.hdfs.ListXAttrsRequestProto + (*ListXAttrsResponseProto)(nil), // 8: hadoop.hdfs.ListXAttrsResponseProto + (*RemoveXAttrRequestProto)(nil), // 9: hadoop.hdfs.RemoveXAttrRequestProto + (*RemoveXAttrResponseProto)(nil), // 10: hadoop.hdfs.RemoveXAttrResponseProto +} +var file_xattr_proto_depIdxs = []int32{ + 1, // 0: hadoop.hdfs.XAttrProto.namespace:type_name -> hadoop.hdfs.XAttrProto.XAttrNamespaceProto + 2, // 1: hadoop.hdfs.SetXAttrRequestProto.xAttr:type_name -> hadoop.hdfs.XAttrProto + 2, // 2: hadoop.hdfs.GetXAttrsRequestProto.xAttrs:type_name -> hadoop.hdfs.XAttrProto + 2, // 3: hadoop.hdfs.GetXAttrsResponseProto.xAttrs:type_name -> hadoop.hdfs.XAttrProto + 2, // 4: hadoop.hdfs.ListXAttrsResponseProto.xAttrs:type_name -> hadoop.hdfs.XAttrProto + 2, // 5: hadoop.hdfs.RemoveXAttrRequestProto.xAttr:type_name -> hadoop.hdfs.XAttrProto + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_xattr_proto_init() } +func file_xattr_proto_init() { + if File_xattr_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xattr_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XAttrProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xattr_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetXAttrRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xattr_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetXAttrResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xattr_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetXAttrsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xattr_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetXAttrsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xattr_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListXAttrsRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xattr_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListXAttrsResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xattr_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveXAttrRequestProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xattr_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveXAttrResponseProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xattr_proto_rawDesc, + NumEnums: 2, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xattr_proto_goTypes, + DependencyIndexes: file_xattr_proto_depIdxs, + EnumInfos: file_xattr_proto_enumTypes, + MessageInfos: file_xattr_proto_msgTypes, + }.Build() + File_xattr_proto = out.File + file_xattr_proto_rawDesc = nil + file_xattr_proto_goTypes = nil + file_xattr_proto_depIdxs = nil } diff --git a/internal/protocol/hadoop_hdfs/xattr.proto b/internal/protocol/hadoop_hdfs/xattr.proto index 6c8b5eb5..122c86c4 100644 --- a/internal/protocol/hadoop_hdfs/xattr.proto +++ b/internal/protocol/hadoop_hdfs/xattr.proto @@ -15,10 +15,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +syntax="proto2"; option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "XAttrProtos"; option java_generate_equals_and_hash = true; +option go_package = "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs"; package hadoop.hdfs; message XAttrProto { diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index db9d63f9..7bea1b46 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -10,8 +10,8 @@ import ( hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" krb "github.com/jcmturner/gokrb5/v8/client" + "google.golang.org/protobuf/proto" ) const ( diff --git a/internal/rpc/rpc.go b/internal/rpc/rpc.go index 2ea8eed5..62182a03 100644 --- a/internal/rpc/rpc.go +++ b/internal/rpc/rpc.go @@ -9,7 +9,7 @@ import ( "math/rand" "time" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) var errInvalidResponse = errors.New("invalid response from namenode") diff --git a/internal/rpc/sasl_transport.go b/internal/rpc/sasl_transport.go index 560037a0..236c04ce 100644 --- a/internal/rpc/sasl_transport.go +++ b/internal/rpc/sasl_transport.go @@ -6,11 +6,11 @@ import ( "io" hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" - "github.com/golang/protobuf/proto" "github.com/jcmturner/gokrb5/v8/crypto" "github.com/jcmturner/gokrb5/v8/gssapi" "github.com/jcmturner/gokrb5/v8/iana/keyusage" krbtypes "github.com/jcmturner/gokrb5/v8/types" + "google.golang.org/protobuf/proto" ) // saslTransport implements encrypted or signed RPC. diff --git a/internal/rpc/transport.go b/internal/rpc/transport.go index 1600a1c6..3458ad4b 100644 --- a/internal/rpc/transport.go +++ b/internal/rpc/transport.go @@ -5,7 +5,7 @@ import ( "io" hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) var errUnexpectedSequenceNumber = errors.New("unexpected sequence number") diff --git a/internal/transfer/block_read_stream.go b/internal/transfer/block_read_stream.go index f716293e..643e0a04 100644 --- a/internal/transfer/block_read_stream.go +++ b/internal/transfer/block_read_stream.go @@ -9,7 +9,7 @@ import ( "math" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) var errInvalidChecksum = errors.New("invalid checksum") diff --git a/internal/transfer/block_reader.go b/internal/transfer/block_reader.go index 0d5b7032..7f07f9b0 100644 --- a/internal/transfer/block_reader.go +++ b/internal/transfer/block_reader.go @@ -11,7 +11,7 @@ import ( "time" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // BlockReader implements io.ReadCloser, for reading a block. It abstracts over diff --git a/internal/transfer/block_write_stream.go b/internal/transfer/block_write_stream.go index 0f47cb0e..f657dde0 100644 --- a/internal/transfer/block_write_stream.go +++ b/internal/transfer/block_write_stream.go @@ -13,7 +13,7 @@ import ( "time" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) const ( diff --git a/internal/transfer/block_writer.go b/internal/transfer/block_writer.go index f57ed4fb..6de77a0b 100644 --- a/internal/transfer/block_writer.go +++ b/internal/transfer/block_writer.go @@ -9,7 +9,7 @@ import ( "time" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) var ErrEndOfBlock = errors.New("end of block") diff --git a/internal/transfer/checksum_reader.go b/internal/transfer/checksum_reader.go index 391acc20..ab46d2c5 100644 --- a/internal/transfer/checksum_reader.go +++ b/internal/transfer/checksum_reader.go @@ -91,7 +91,7 @@ func (cr *ChecksumReader) readChecksum(address string) ([]byte, error) { return nil, err } - return resp.GetChecksumResponse().GetMd5(), nil + return resp.GetChecksumResponse().GetBlockChecksum(), nil } // A checksum request to a datanode: diff --git a/internal/transfer/digest_md5_test.go b/internal/transfer/digest_md5_test.go index a67d5fa4..8d6551ac 100644 --- a/internal/transfer/digest_md5_test.go +++ b/internal/transfer/digest_md5_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" diff --git a/internal/transfer/sasl_dialer.go b/internal/transfer/sasl_dialer.go index 9d7ee001..5a7ed925 100644 --- a/internal/transfer/sasl_dialer.go +++ b/internal/transfer/sasl_dialer.go @@ -7,7 +7,7 @@ import ( "fmt" "net" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" diff --git a/internal/transfer/transfer.go b/internal/transfer/transfer.go index a29bb4f5..2d96cc8a 100644 --- a/internal/transfer/transfer.go +++ b/internal/transfer/transfer.go @@ -8,7 +8,7 @@ import ( "io" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) const ( diff --git a/mkdir.go b/mkdir.go index 846960b8..b9a0f62f 100644 --- a/mkdir.go +++ b/mkdir.go @@ -5,7 +5,7 @@ import ( "path" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // Mkdir creates a new directory with the specified name and permission bits. diff --git a/perms.go b/perms.go index 70309f9a..707ac4fc 100644 --- a/perms.go +++ b/perms.go @@ -5,7 +5,7 @@ import ( "time" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // Chmod changes the mode of the named file to mode. diff --git a/remove.go b/remove.go index 2833d0c4..bb1039be 100644 --- a/remove.go +++ b/remove.go @@ -5,7 +5,7 @@ import ( "os" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // Remove removes the named file or (empty) directory. diff --git a/rename.go b/rename.go index e40cd317..95205950 100644 --- a/rename.go +++ b/rename.go @@ -4,7 +4,7 @@ import ( "os" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // Rename renames (moves) a file. diff --git a/stat.go b/stat.go index 50e5277d..5ecc5971 100644 --- a/stat.go +++ b/stat.go @@ -6,7 +6,7 @@ import ( "time" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // FileInfo implements os.FileInfo, and provides information about a file or diff --git a/xattr.go b/xattr.go index 29e6fdd5..900b914e 100644 --- a/xattr.go +++ b/xattr.go @@ -7,7 +7,7 @@ import ( "strings" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) var errXAttrKeysNotFound = errors.New("one or more keys not found") From b27ccb5a7819066d704bb381ba74d81a9ca6d426 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 15:46:01 +0100 Subject: [PATCH 113/159] Update compatability notes --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 890f08db..65cb1ab2 100644 --- a/README.md +++ b/README.md @@ -111,8 +111,7 @@ Compatibility ------------- This library uses "Version 9" of the HDFS protocol, which means it should work -with hadoop distributions based on 2.2.x and above. The tests run against CDH -5.x and HDP 2.x. +with hadoop distributions based on 2.2.x and above, as well as 3.x. Acknowledgements ---------------- From 17d7dc39446a18e58af3b282ded74c2549263fa2 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 16:00:00 +0100 Subject: [PATCH 114/159] Add a comment explaining why we sort the Qops --- internal/rpc/kerberos.go | 5 +++++ internal/sasl/challenge.go | 2 -- internal/transfer/block_write_stream.go | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/rpc/kerberos.go b/internal/rpc/kerberos.go index d505536b..c34ce8cf 100644 --- a/internal/rpc/kerberos.go +++ b/internal/rpc/kerberos.go @@ -5,6 +5,7 @@ import ( "fmt" "net" "regexp" + "sort" hadoop "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" "github.com/colinmarc/hdfs/v2/internal/sasl" @@ -62,7 +63,11 @@ func (c *NamenodeConnection) doKerberosHandshake() error { return err } + // Some versions of HDP 3.x expect us to pick the highest Qop, and + // return a malformed response otherwise. + sort.Sort(challenge.Qop) qop := challenge.Qop[0] + switch qop { case sasl.QopPrivacy, sasl.QopIntegrity: // Switch to SASL RPC handler diff --git a/internal/sasl/challenge.go b/internal/sasl/challenge.go index cc3f1d40..9e73fa60 100644 --- a/internal/sasl/challenge.go +++ b/internal/sasl/challenge.go @@ -4,7 +4,6 @@ import ( "errors" "fmt" "regexp" - "sort" "strings" ) @@ -74,7 +73,6 @@ func ParseChallenge(challenge []byte) (*Challenge, error) { ch.Nonce = val case "qop": ch.Qop = strings.Split(val, ",") - sort.Sort(ch.Qop) case "charset": ch.Charset = val case "cipher": diff --git a/internal/transfer/block_write_stream.go b/internal/transfer/block_write_stream.go index f657dde0..0fa2ba86 100644 --- a/internal/transfer/block_write_stream.go +++ b/internal/transfer/block_write_stream.go @@ -290,7 +290,7 @@ Acks: // Once we've seen an error, just keep reading packets off the channel (but // not off the socket) until the writing thread figures it out. If we don't, // the upstream thread could deadlock waiting for the channel to have space. - for _ = range s.packets { + for range s.packets { } } From 09d3a50a3a574a20e64b400ef06b194e8773ae49 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 22:45:09 +0100 Subject: [PATCH 115/159] Add a release workflow --- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..d974f23b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Release + uses: softprops/action-gh-release@v1 +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + + workflow_dispatch: + +jobs: + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: 1.17 + + # Touching the generated proto files ensures that make will not try to + # regenerate them. + - name: make release + run: find -name '*.pb.go' -exec touch {} \; && make release + + - name: Upload Release + uses: softprops/action-gh-release@v1 + with: + files: gohdfs-*-linux-amd64.tar.gz \ No newline at end of file diff --git a/.gitignore b/.gitignore index cb7391a9..d610892b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build +gohdfs* hdfs !hdfs/ minicluster.log From b585d436312513cdaa0403475aa4c81bba4facd3 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 22:45:54 +0100 Subject: [PATCH 116/159] Remove stray file --- internal/protocol/hadoop_hdfs/untitled | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 internal/protocol/hadoop_hdfs/untitled diff --git a/internal/protocol/hadoop_hdfs/untitled b/internal/protocol/hadoop_hdfs/untitled deleted file mode 100644 index e69de29b..00000000 From a0dd10389229d32dc08a9d14e6c958283c5efaf3 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 22:57:38 +0100 Subject: [PATCH 117/159] Ensure we bail and exit with a nonzero status if an error happens during put --- cmd/hdfs/put.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/cmd/hdfs/put.go b/cmd/hdfs/put.go index f37e5595..ee72c2a3 100644 --- a/cmd/hdfs/put.go +++ b/cmd/hdfs/put.go @@ -1,7 +1,6 @@ package main import ( - "fmt" "io" "os" "path" @@ -82,14 +81,12 @@ func putFromFile(client *hdfs.Client, source string, dest string) { mode := 0755 | os.ModeDir err = filepath.Walk(source, func(p string, fi os.FileInfo, err error) error { if err != nil { - fmt.Fprintln(os.Stderr, err) - return nil + return err } rel, err := filepath.Rel(source, p) if err != nil { - fmt.Fprintln(os.Stderr, err) - return nil + return err } fullDest := path.Join(dest, rel) @@ -98,24 +95,26 @@ func putFromFile(client *hdfs.Client, source string, dest string) { } else { writer, err := client.Create(fullDest) if err != nil { - fmt.Fprintln(os.Stderr, err) - return nil + return err } defer writer.Close() reader, err := os.Open(p) if err != nil { - fmt.Fprintln(os.Stderr, err) - return nil + return err } defer reader.Close() _, err = io.Copy(writer, reader) if err != nil { - fmt.Fprintln(os.Stderr, err) + return err } } return nil }) + + if err != nil { + fatal(err) + } } From 87fd60d186a8c2809c94eec5bd7fec9e506e2438 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 23:02:26 +0100 Subject: [PATCH 118/159] Fixup release workflow --- .github/workflows/release.yml | 38 +++++++++++------------------------ 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d974f23b..32644cfe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,31 +9,17 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Release - uses: softprops/action-gh-release@v1 -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: 1.17 - workflow_dispatch: + # Touching the generated proto files ensures that make will not try to + # regenerate them. + - name: make release + run: find -name '*.pb.go' -exec touch {} \; && make release -jobs: - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 - with: - go-version: 1.17 - - # Touching the generated proto files ensures that make will not try to - # regenerate them. - - name: make release - run: find -name '*.pb.go' -exec touch {} \; && make release - - - name: Upload Release - uses: softprops/action-gh-release@v1 - with: - files: gohdfs-*-linux-amd64.tar.gz \ No newline at end of file + - name: Upload Release + uses: softprops/action-gh-release@v1 + with: + files: gohdfs-*-linux-amd64.tar.gz \ No newline at end of file From e0cba437a1ca3c818c4949d3c79b81b9638acc9e Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 23:13:39 +0100 Subject: [PATCH 119/159] Allow triggering the release workflow manually --- .github/workflows/release.yml | 1 + .github/workflows/tests.yml | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 32644cfe..02658314 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: tags: - "v*.*.*" + workflow_dispatch: jobs: build: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eba45cdc..7ff0ed63 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,11 +4,9 @@ on: push: pull_request: branches: [ master ] - workflow_dispatch: jobs: - test: runs-on: ubuntu-latest strategy: From 5298db4b4a9ef3b575e99c3023ab3a8472e389af Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Sat, 5 Feb 2022 23:22:58 +0100 Subject: [PATCH 120/159] Attempt to trigger the release workflow more reliably --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 02658314..989b118b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,6 @@ name: Release on: push: - tags: - - "v*.*.*" workflow_dispatch: jobs: @@ -21,6 +19,7 @@ jobs: run: find -name '*.pb.go' -exec touch {} \; && make release - name: Upload Release + if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v1 with: files: gohdfs-*-linux-amd64.tar.gz \ No newline at end of file From 11bad6d16f5dac9909100f1230d7eff23ebf6010 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 8 Feb 2022 18:28:23 +0100 Subject: [PATCH 121/159] When seeking forward small amounts, don't reconnect Currently, when seeking, we always discard the BlockReader and reconnect at the new offset. This is often wasteful, but especially when seeking forward would keep us in the same chunk, since on reconnecting we discard the beginning of the chunk anyway. This adds a new method to BlockReader, Skip, which attempts to discard bytes in order to skip forward, and makes use of that for small (<64k) forward seeks. --- file_reader.go | 21 +++++++++++++---- file_reader_test.go | 39 ++++++++++++++++++++++++------- internal/transfer/block_reader.go | 36 +++++++++++++++++++++++++--- 3 files changed, 81 insertions(+), 15 deletions(-) diff --git a/file_reader.go b/file_reader.go index d902095e..e1e18798 100644 --- a/file_reader.go +++ b/file_reader.go @@ -141,13 +141,14 @@ func (f *FileReader) Seek(offset int64, whence int) (int64, error) { } var off int64 - if whence == 0 { + switch whence { + case io.SeekStart: off = offset - } else if whence == 1 { + case io.SeekCurrent: off = f.offset + offset - } else if whence == 2 { + case io.SeekEnd: off = f.info.Size() + offset - } else { + default: return f.offset, fmt.Errorf("invalid whence: %d", whence) } @@ -157,11 +158,23 @@ func (f *FileReader) Seek(offset int64, whence int) (int64, error) { if f.offset != off { f.offset = off + if f.blockReader != nil { + // If the seek is within the next few chunks, it's much more + // efficient to throw away a few bytes than to reconnect and start + // a read at the new offset. + err := f.blockReader.Skip(f.offset - f.blockReader.Offset) + if err == nil { + return f.offset, nil + } + + // It isn't possible to seek within the current block, so reset such + // that we can connect to the new block. f.blockReader.Close() f.blockReader = nil } } + return f.offset, nil } diff --git a/file_reader_test.go b/file_reader_test.go index 3f435d96..de05ad82 100644 --- a/file_reader_test.go +++ b/file_reader_test.go @@ -23,9 +23,13 @@ const ( testStr = "Abominable are the tumblers into which he pours his poison." testStrOff = 48847 - testStr2 = "http://www.gutenberg.org" - testStr2Off = 1256988 - testStr2NegativeOff = -288 + testStr2 = "tumblers" + testStr2Off = 48866 + testStr2RelativeOff = 19 + + testStr3 = "http://www.gutenberg.org" + testStr3Off = 1256988 + testStr3NegativeOff = -288 testChecksum = "27c076e4987344253650d3335a5d08ce" ) @@ -171,16 +175,16 @@ func TestFileReadAt(t *testing.T) { assert.EqualValues(t, string(buf), testStr) - buf = make([]byte, len(testStr2)) + buf = make([]byte, len(testStr3)) off = 0 for off < len(buf) { - n, err := file.ReadAt(buf[off:], int64(testStr2Off+off)) + n, err := file.ReadAt(buf[off:], int64(testStr3Off+off)) require.NoError(t, err) assert.True(t, n > 0) off += n } - assert.EqualValues(t, testStr2, string(buf)) + assert.EqualValues(t, testStr3, string(buf)) } func TestFileReadAtEOF(t *testing.T) { @@ -240,16 +244,35 @@ func TestFileSeek(t *testing.T) { assert.EqualValues(t, len(testStr), n) assert.EqualValues(t, testStr, string(buf.Bytes())) - // now seek forward to another block and read a string - off, err = file.Seek(testStr2NegativeOff, 2) + // Do a small forward seek within the block. + off, err = file.Seek(testStrOff, 0) + assert.NoError(t, err) + assert.EqualValues(t, testStrOff, off) + br := file.blockReader + + off, err = file.Seek(testStr2RelativeOff, 1) assert.NoError(t, err) assert.EqualValues(t, testStr2Off, off) + // Make sure we didn't reconnect. + assert.Equal(t, br, file.blockReader) + buf.Reset() n, err = io.CopyN(buf, file, int64(len(testStr2))) assert.NoError(t, err) assert.EqualValues(t, len(testStr2), n) assert.EqualValues(t, testStr2, string(buf.Bytes())) + + // now seek forward to another block and read a string + off, err = file.Seek(testStr3NegativeOff, 2) + assert.NoError(t, err) + assert.EqualValues(t, testStr3Off, off) + + buf.Reset() + n, err = io.CopyN(buf, file, int64(len(testStr3))) + assert.NoError(t, err) + assert.EqualValues(t, len(testStr3), n) + assert.EqualValues(t, testStr3, string(buf.Bytes())) } func TestFileReadDir(t *testing.T) { diff --git a/internal/transfer/block_reader.go b/internal/transfer/block_reader.go index 7f07f9b0..6b326574 100644 --- a/internal/transfer/block_reader.go +++ b/internal/transfer/block_reader.go @@ -39,6 +39,8 @@ type BlockReader struct { closed bool } +const maxSkip = 65536 + // SetDeadline sets the deadline for future Read calls. A zero value for t // means Read will not time out. func (br *BlockReader) SetDeadline(t time.Time) error { @@ -115,6 +117,33 @@ func (br *BlockReader) Read(b []byte) (int, error) { return 0, err } +// Skip attempts to discard bytes in the stream in order to skip forward. This +// is an optimization for the case that the amount to skip is very small. It +// returns an error if skip was not attempted at all (because the BlockReader +// isn't connected, or the offset is out of bounds or too far ahead) or the seek +// failed for some other reason. +func (br *BlockReader) Skip(off int64) error { + blockSize := int64(br.Block.GetB().GetNumBytes()) + amountToSkip := off - br.Offset + + if br.stream == nil || off < 0 || off >= blockSize || + amountToSkip < 0 || amountToSkip > maxSkip { + return errors.New("unable to skip") + } + + _, err := io.CopyN(io.Discard, br.stream, amountToSkip) + if err != nil { + if err == io.EOF { + err = io.ErrUnexpectedEOF + } + + br.stream = nil + br.datanodes.recordFailure(err) + } + + return err +} + // Close implements io.Closer. func (br *BlockReader) Close() error { br.closed = true @@ -165,12 +194,13 @@ func (br *BlockReader) connectNext() error { return fmt.Errorf("unsupported checksum type: %d", checksumType) } + chunkOffset := int64(readInfo.GetChunkOffset()) chunkSize := int(checksumInfo.GetBytesPerChecksum()) stream := newBlockReadStream(conn, chunkSize, checksumTab) - // The read will start aligned to a chunk boundary, so we need to seek forward - // to the requested offset. - amountToDiscard := br.Offset - int64(readInfo.GetChunkOffset()) + // The read will start aligned to a chunk boundary, so we need to skip + // forward to the requested offset. + amountToDiscard := br.Offset - chunkOffset if amountToDiscard > 0 { _, err := io.CopyN(ioutil.Discard, stream, amountToDiscard) if err != nil { From b02ab581bd500863b60a6d6718b48854c26acd23 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 8 Feb 2022 18:49:14 +0100 Subject: [PATCH 122/159] Propogate errors from validateChecksum correctly. Fixes #275 --- internal/transfer/block_read_stream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/transfer/block_read_stream.go b/internal/transfer/block_read_stream.go index 643e0a04..c2efa076 100644 --- a/internal/transfer/block_read_stream.go +++ b/internal/transfer/block_read_stream.go @@ -71,7 +71,7 @@ func (s *blockReadStream) Read(b []byte) (int, error) { err = s.validateChecksum(s.chunk.Bytes()) if err != nil { - return 0, nil + return 0, err } s.chunkIndex++ From ce22ebcc8128e9bf79088f3b2d953e1089939486 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 8 Feb 2022 19:04:25 +0100 Subject: [PATCH 123/159] Revert "Attempt to trigger the release workflow more reliably" This reverts commit 5298db4b4a9ef3b575e99c3023ab3a8472e389af. --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 989b118b..02658314 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,6 +2,8 @@ name: Release on: push: + tags: + - "v*.*.*" workflow_dispatch: jobs: @@ -19,7 +21,6 @@ jobs: run: find -name '*.pb.go' -exec touch {} \; && make release - name: Upload Release - if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v1 with: files: gohdfs-*-linux-amd64.tar.gz \ No newline at end of file From 1f6a38033298e25205f4570a9f7b2f0d8ca30ad4 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 8 Feb 2022 19:08:30 +0100 Subject: [PATCH 124/159] Fix the tests badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65cb1ab2..92e19c1a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ HDFS for Go =========== -[![GoDoc](https://godoc.org/github.com/colinmarc/hdfs/web?status.svg)](https://godoc.org/github.com/colinmarc/hdfs) [![build](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml/badge.svg?branch=feature-1)](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml) +[![GoDoc](https://godoc.org/github.com/colinmarc/hdfs/web?status.svg)](https://godoc.org/github.com/colinmarc/hdfs) [![build](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml) This is a native golang client for hdfs. It connects directly to the namenode using the protocol buffers API. From 039ab59c24316d509005755f772a9a8dd7a27b5d Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 8 Feb 2022 19:02:51 +0100 Subject: [PATCH 125/159] Add a public ServerDefaults to give access to FSServerDefaults Fixes #219 --- client.go | 17 --------------- defaults.go | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ defaults_test.go | 16 ++++++++++++++ 3 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 defaults.go create mode 100644 defaults_test.go diff --git a/client.go b/client.go index a2723831..105ef7ea 100644 --- a/client.go +++ b/client.go @@ -307,23 +307,6 @@ func (c *Client) CopyToRemote(src string, dst string) error { return remote.Close() } -func (c *Client) fetchDefaults() (*hdfs.FsServerDefaultsProto, error) { - if c.defaults != nil { - return c.defaults, nil - } - - req := &hdfs.GetServerDefaultsRequestProto{} - resp := &hdfs.GetServerDefaultsResponseProto{} - - err := c.namenode.Execute("getServerDefaults", req, resp) - if err != nil { - return nil, err - } - - c.defaults = resp.GetServerDefaults() - return c.defaults, nil -} - func (c *Client) fetchDataEncryptionKey() (*hdfs.DataEncryptionKeyProto, error) { if c.encryptionKey != nil { return c.encryptionKey, nil diff --git a/defaults.go b/defaults.go new file mode 100644 index 00000000..589d1ea4 --- /dev/null +++ b/defaults.go @@ -0,0 +1,57 @@ +package hdfs + +import ( + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" +) + +// ServerDefaults represents the filesystem configuration stored on the +// Namenode. +type ServerDefaults struct { + BlockSize int64 + BytesPerChecksum int + WritePacketSize int + Replication int + FileBufferSize int + EncryptDataTransfer bool + TrashInterval int64 + KeyProviderURI string + PolicyId int +} + +// ServerDefaults fetches the stored defaults from the Namenode and returns +// them and any error encountered. +func (c *Client) ServerDefaults() (ServerDefaults, error) { + resp, err := c.fetchDefaults() + if err != nil { + return ServerDefaults{}, err + } + + return ServerDefaults{ + BlockSize: int64(resp.GetBlockSize()), + BytesPerChecksum: int(resp.GetBytesPerChecksum()), + WritePacketSize: int(resp.GetWritePacketSize()), + Replication: int(resp.GetReplication()), + FileBufferSize: int(resp.GetFileBufferSize()), + EncryptDataTransfer: resp.GetEncryptDataTransfer(), + TrashInterval: int64(resp.GetTrashInterval()), + KeyProviderURI: resp.GetKeyProviderUri(), + PolicyId: int(resp.GetPolicyId()), + }, nil +} + +func (c *Client) fetchDefaults() (*hdfs.FsServerDefaultsProto, error) { + if c.defaults != nil { + return c.defaults, nil + } + + req := &hdfs.GetServerDefaultsRequestProto{} + resp := &hdfs.GetServerDefaultsResponseProto{} + + err := c.namenode.Execute("getServerDefaults", req, resp) + if err != nil { + return nil, err + } + + c.defaults = resp.GetServerDefaults() + return c.defaults, nil +} diff --git a/defaults_test.go b/defaults_test.go new file mode 100644 index 00000000..72fbfc50 --- /dev/null +++ b/defaults_test.go @@ -0,0 +1,16 @@ +package hdfs + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestServerDefaults(t *testing.T) { + client := getClient(t) + + sd, err := client.ServerDefaults() + require.NoError(t, err) + assert.NotZero(t, sd.BlockSize) +} From fa9b371f7f0d8b6d5ce2a6e38a021275970dc4e7 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 8 Feb 2022 19:16:18 +0100 Subject: [PATCH 126/159] Prevent an NPE in hdfs get Fixes #244. --- cmd/hdfs/get.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/hdfs/get.go b/cmd/hdfs/get.go index 59a682d8..5fb5332d 100644 --- a/cmd/hdfs/get.go +++ b/cmd/hdfs/get.go @@ -41,6 +41,10 @@ func get(args []string) { err = client.Walk(source, func(p string, fi os.FileInfo, err error) error { fullDest := filepath.Join(dest, strings.TrimPrefix(p, source)) + if err != nil { + fatal(err) + } + if fi.IsDir() { err = os.Mkdir(fullDest, 0755) if err != nil { From aea93fdc9b21606932bf6ca541f4169555e145eb Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 9 Feb 2022 09:58:48 +0100 Subject: [PATCH 127/159] Exit with 2 instead of 0 in cases of invalid command line arguments --- cmd/hdfs/chmod.go | 2 +- cmd/hdfs/chown.go | 2 +- cmd/hdfs/du.go | 2 +- cmd/hdfs/get.go | 4 ++-- cmd/hdfs/main.go | 11 ++++++++--- cmd/hdfs/mkdir.go | 2 +- cmd/hdfs/put.go | 2 +- cmd/hdfs/touch.go | 8 ++++---- 8 files changed, 19 insertions(+), 14 deletions(-) diff --git a/cmd/hdfs/chmod.go b/cmd/hdfs/chmod.go index c55c77ed..9ef3c3fa 100644 --- a/cmd/hdfs/chmod.go +++ b/cmd/hdfs/chmod.go @@ -8,7 +8,7 @@ import ( func chmod(args []string, recursive bool) { if len(args) < 2 { - printHelp() + fatalWithUsage() } mode, err := strconv.ParseUint(args[0], 8, 32) diff --git a/cmd/hdfs/chown.go b/cmd/hdfs/chown.go index 99adf9e4..4d235ed9 100644 --- a/cmd/hdfs/chown.go +++ b/cmd/hdfs/chown.go @@ -8,7 +8,7 @@ import ( func chown(args []string, recursive bool) { if len(args) < 2 { - printHelp() + fatalWithUsage() } parts := strings.SplitN(args[0], ":", 2) diff --git a/cmd/hdfs/du.go b/cmd/hdfs/du.go index 6a35ccd5..34930fb6 100644 --- a/cmd/hdfs/du.go +++ b/cmd/hdfs/du.go @@ -12,7 +12,7 @@ import ( func du(args []string, summarize, humanReadable bool) { if len(args) == 0 { - printHelp() + fatalWithUsage() } expanded, client, err := getClientAndExpandedPaths(args) diff --git a/cmd/hdfs/get.go b/cmd/hdfs/get.go index 5fb5332d..d109bc4c 100644 --- a/cmd/hdfs/get.go +++ b/cmd/hdfs/get.go @@ -11,7 +11,7 @@ import ( func get(args []string) { if len(args) == 0 || len(args) > 2 { - printHelp() + fatalWithUsage() } sources, nn, err := normalizePaths(args[0:1]) @@ -68,7 +68,7 @@ func get(args []string) { func getmerge(args []string, addNewlines bool) { if len(args) != 2 { - printHelp() + fatalWithUsage() } dest := args[1] diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go index b9106b81..e5d45ebe 100755 --- a/cmd/hdfs/main.go +++ b/cmd/hdfs/main.go @@ -98,7 +98,7 @@ func init() { func main() { if len(os.Args) < 2 { - printHelp() + fatalWithUsage() } command := os.Args[1] @@ -170,8 +170,13 @@ func fatal(msg ...interface{}) { } func fatalWithUsage(msg ...interface{}) { - msg = append(msg, "\n"+usage) - fatal(msg...) + if len(msg) > 0 { + fmt.Fprintln(os.Stderr, append(msg, "\n"+usage)...) + } else { + fmt.Fprintln(os.Stderr, usage) + } + + os.Exit(2) } func getClient(namenode string) (*hdfs.Client, error) { diff --git a/cmd/hdfs/mkdir.go b/cmd/hdfs/mkdir.go index 11ce1bfb..e1a806ba 100644 --- a/cmd/hdfs/mkdir.go +++ b/cmd/hdfs/mkdir.go @@ -11,7 +11,7 @@ func mkdir(paths []string, all bool) { } if len(paths) == 0 { - printHelp() + fatalWithUsage() } client, err := getClient(nn) diff --git a/cmd/hdfs/put.go b/cmd/hdfs/put.go index ee72c2a3..1f831a3c 100644 --- a/cmd/hdfs/put.go +++ b/cmd/hdfs/put.go @@ -11,7 +11,7 @@ import ( func put(args []string) { if len(args) != 2 { - printHelp() + fatalWithUsage() } dests, nn, err := normalizePaths(args[1:]) diff --git a/cmd/hdfs/touch.go b/cmd/hdfs/touch.go index 9dbc6a23..14a6846d 100644 --- a/cmd/hdfs/touch.go +++ b/cmd/hdfs/touch.go @@ -6,15 +6,15 @@ import ( ) func touch(paths []string, noCreate bool) { + if len(paths) == 0 { + fatalWithUsage() + } + paths, nn, err := normalizePaths(paths) if err != nil { fatal(err) } - if len(paths) == 0 { - printHelp() - } - client, err := getClient(nn) if err != nil { fatal(err) From 50243c49708d5df157e3dba341533f3f7d3dee1c Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 8 Feb 2022 21:10:39 +0100 Subject: [PATCH 128/159] Return a specific error if a file is still incomplete after FileWriter.Close Previously, we would simply ignore the result field on CompleteResponse, which lead to a silently hanging lease on the file. A hanging lease isn't that bad - it expires on its own - but it was causing the sneaky AlreadyBeingCreatedExceptions we were seeing in append tests. Exposing the error (and adding a function IsErrReplicating to unwrap the PathError, for convenience) allows the client to either ignore it, and let the lease expire on its own, or to retry in a loop, as the java client does, until the file is complete and the lease is destroyed. This has the potential to be a breaking change, since we would silently swallow the error before. --- client_test.go | 2 +- file_writer.go | 34 +++++++------ file_writer_test.go | 120 ++++++++++++++++---------------------------- 3 files changed, 64 insertions(+), 92 deletions(-) diff --git a/client_test.go b/client_test.go index 060ec63b..ce92f397 100644 --- a/client_test.go +++ b/client_test.go @@ -189,7 +189,7 @@ func TestCopyToRemote(t *testing.T) { baleet(t, "/_test/copytoremote.txt") err := client.CopyToRemote("testdata/foo.txt", "/_test/copytoremote.txt") - require.NoError(t, err) + ignoreErrReplicating(t, err) bytes, err := client.ReadFile("/_test/copytoremote.txt") require.NoError(t, err) diff --git a/file_writer.go b/file_writer.go index d12db58a..3b8159f1 100644 --- a/file_writer.go +++ b/file_writer.go @@ -1,7 +1,7 @@ package hdfs import ( - "io" + "errors" "os" "time" @@ -10,6 +10,15 @@ import ( "google.golang.org/protobuf/proto" ) +var ErrReplicating = errors.New("replication in progress") + +// IsErrReplicating returns true if the passed error is an os.PathError wrapping +// ErrReplicating. +func IsErrReplicating(err error) bool { + pe, ok := err.(*os.PathError) + return ok && pe.Err == ErrReplicating +} + // A FileWriter represents a writer for an open file in HDFS. It implements // Writer and Closer, and can only be used for writes. For reads, see // FileReader and Client.Open. @@ -21,7 +30,6 @@ type FileWriter struct { blockWriter *transfer.BlockWriter deadline time.Time - closed bool } // Create opens a new file in HDFS with the default replication, block size, @@ -168,10 +176,6 @@ func (f *FileWriter) SetDeadline(t time.Time) error { // of this, it is important that Close is called after all data has been // written. func (f *FileWriter) Write(b []byte) (int, error) { - if f.closed { - return 0, io.ErrClosedPipe - } - if f.blockWriter == nil { err := f.startNewBlock() if err != nil { @@ -199,10 +203,6 @@ func (f *FileWriter) Write(b []byte) (int, error) { // a call to Flush, it is still necessary to call Close once all data has been // written. func (f *FileWriter) Flush() error { - if f.closed { - return io.ErrClosedPipe - } - if f.blockWriter != nil { return f.blockWriter.Flush() } @@ -213,11 +213,15 @@ func (f *FileWriter) Flush() error { // Close closes the file, writing any remaining data out to disk and waiting // for acknowledgements from the datanodes. It is important that Close is called // after all data has been written. +// +// If the datanodes have acknowledged all writes but not yet to the namenode, +// it can return ErrReplicating (wrapped in an os.PathError). This indicates +// that all data has been written, but the lease is still open for the file. +// It is safe in this case to either ignore the error (and let the lease expire +// on its own) or to call Close multiple times until it completes without an +// error. The Java client, for context, always chooses to retry, with +// exponential backoff. func (f *FileWriter) Close() error { - if f.closed { - return io.ErrClosedPipe - } - var lastBlock *hdfs.ExtendedBlockProto if f.blockWriter != nil { lastBlock = f.blockWriter.Block.GetB() @@ -239,6 +243,8 @@ func (f *FileWriter) Close() error { err := f.client.namenode.Execute("complete", completeReq, completeResp) if err != nil { return &os.PathError{"create", f.name, err} + } else if completeResp.GetResult() == false { + return &os.PathError{"create", f.name, ErrReplicating} } return nil diff --git a/file_writer_test.go b/file_writer_test.go index b55f5f1d..f2debe82 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -15,31 +15,27 @@ import ( "github.com/stretchr/testify/require" ) -const abcException = "org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException" - -func appendIgnoreABC(t *testing.T, client *Client, path string) (*FileWriter, error) { - // This represents a bug in the HDFS append implementation, as far as I can - // tell. Try a few times again, then skip the test. - retries := 0 - for { - fw, err := client.Append(path) - - if pathErr, ok := err.(*os.PathError); ok { - if nnErr, ok := pathErr.Err.(Error); ok && nnErr.Exception() == abcException { - t.Log("Ignoring AlreadyBeingCreatedException from append") - - if retries < 3 { - retries += 1 - continue - } else { - t.Skip("skipping Append test because of repeated AlreadyBeingCreatedException") - return fw, nil - } - } +func assertClose(t *testing.T, w *FileWriter) { + var err error + for i := 0; i < 5; i++ { + err := w.Close() + if IsErrReplicating(err) { + time.Sleep(200 * time.Millisecond) + continue + } else { + break } + } - return fw, err + assert.NoError(t, err) +} + +func ignoreErrReplicating(t *testing.T, err error) { + if IsErrReplicating(err) { + return } + + require.NoError(t, err) } func TestFileWrite(t *testing.T) { @@ -56,9 +52,7 @@ func TestFileWrite(t *testing.T) { n, err = writer.Write([]byte("bar")) require.NoError(t, err) assert.Equal(t, 3, n) - - err = writer.Close() - require.NoError(t, err) + assertClose(t, writer) reader, err := client.Open("/_test/create/1.txt") require.NoError(t, err) @@ -89,9 +83,7 @@ func TestFileWriteLeaseRenewal(t *testing.T) { n, err = writer.Write([]byte("bar")) require.NoError(t, err) assert.Equal(t, 3, n) - - err = writer.Close() - require.NoError(t, err) + assertClose(t, writer) reader, err := client.Open("/_test/create/1.txt") require.NoError(t, err) @@ -114,9 +106,7 @@ func TestFileBigWrite(t *testing.T) { n, err := io.Copy(writer, mobydick) require.NoError(t, err) assert.EqualValues(t, 1257276, n) - - err = writer.Close() - require.NoError(t, err) + assertClose(t, writer) reader, err := client.Open("/_test/create/2.txt") require.NoError(t, err) @@ -141,9 +131,7 @@ func TestFileBigWriteMultipleBlocks(t *testing.T) { n, err := io.Copy(writer, mobydick) require.NoError(t, err) assert.EqualValues(t, 1257276, n) - - err = writer.Close() - require.NoError(t, err) + assertClose(t, writer) reader, err := client.Open("/_test/create/3.txt") require.NoError(t, err) @@ -168,9 +156,7 @@ func TestFileBigWriteWeirdBlockSize(t *testing.T) { n, err := io.Copy(writer, mobydick) require.NoError(t, err) assert.EqualValues(t, 1257276, n) - - err = writer.Close() - require.NoError(t, err) + assertClose(t, writer) reader, err := client.Open("/_test/create/4.txt") require.NoError(t, err) @@ -195,9 +181,7 @@ func TestFileBigWriteReplication(t *testing.T) { n, err := io.Copy(writer, mobydick) require.NoError(t, err) assert.EqualValues(t, 1257276, n) - - err = writer.Close() - require.NoError(t, err) + assertClose(t, writer) reader, err := client.Open("/_test/create/5.txt") require.NoError(t, err) @@ -241,9 +225,7 @@ func TestFileWriteSmallFlushes(t *testing.T) { n, err = writer.Write([]byte(s)) require.NoError(t, err, "final write of %d bytes", len(s)) assert.Equal(t, len(s), n) - - err = writer.Close() - require.NoError(t, err) + assertClose(t, writer) reader, err := client.Open("/_test/create/6.txt") require.NoError(t, err) @@ -260,7 +242,7 @@ func TestCreateEmptyFile(t *testing.T) { baleet(t, "/_test/emptyfile") err := client.CreateEmptyFile("/_test/emptyfile") - require.NoError(t, err) + ignoreErrReplicating(t, err) fi, err := client.Stat("/_test/emptyfile") require.NoError(t, err) @@ -281,7 +263,7 @@ func TestCreateFileAlreadyExistsException(t *testing.T) { f, err := client.CreateFile(filePath, 1, 1048576, 0755) require.NoError(t, err) - require.NoError(t, f.Close()) + assertClose(t, f) _, err = client.CreateFile(filePath, 1, 1048576, 0755) assertPathError(t, err, "create", filePath, os.ErrExist) // org.apache.hadoop.fs.FileAlreadyExistsException is received from HDFS @@ -298,7 +280,7 @@ func TestCreateFileAlreadyBeingCreatedException(t *testing.T) { f, err := client.CreateFile(filePath, 1, 1048576, 0755) require.NoError(t, err) defer func() { - require.NoError(t, f.Close()) + assertClose(t, f) }() _, err = client.CreateFile(filePath, 1, 1048576, 0755) @@ -340,11 +322,9 @@ func TestFileAppend(t *testing.T) { n, err := writer.Write([]byte("foobar\n")) require.NoError(t, err) assert.Equal(t, 7, n) + assertClose(t, writer) - err = writer.Close() - require.NoError(t, err) - - writer, err = appendIgnoreABC(t, client, "/_test/append/1.txt") + writer, err = client.Append("/_test/append/1.txt") require.NoError(t, err) n, err = writer.Write([]byte("foo")) @@ -354,9 +334,7 @@ func TestFileAppend(t *testing.T) { n, err = writer.Write([]byte("baz")) require.NoError(t, err) assert.Equal(t, 3, n) - - err = writer.Close() - require.NoError(t, err) + assertClose(t, writer) reader, err := client.Open("/_test/append/1.txt") require.NoError(t, err) @@ -371,9 +349,9 @@ func TestFileAppendEmptyFile(t *testing.T) { mkdirp(t, "/_test/append") err := client.CreateEmptyFile("/_test/append/2.txt") - require.NoError(t, err) + ignoreErrReplicating(t, err) - writer, err := appendIgnoreABC(t, client, "/_test/append/2.txt") + writer, err := client.Append("/_test/append/2.txt") require.NoError(t, err) n, err := writer.Write([]byte("foo")) @@ -383,9 +361,7 @@ func TestFileAppendEmptyFile(t *testing.T) { n, err = writer.Write([]byte("bar")) require.NoError(t, err) assert.Equal(t, 3, n) - - err = writer.Close() - require.NoError(t, err) + assertClose(t, writer) reader, err := client.Open("/_test/append/2.txt") require.NoError(t, err) @@ -409,19 +385,15 @@ func TestFileAppendLastBlockFull(t *testing.T) { wn, err := io.CopyN(writer, mobydick, 1048576) require.NoError(t, err) assert.EqualValues(t, 1048576, wn) + assertClose(t, writer) - err = writer.Close() - require.NoError(t, err) - - writer, err = appendIgnoreABC(t, client, "/_test/append/3.txt") + writer, err = client.Append("/_test/append/3.txt") require.NoError(t, err) n, err := writer.Write([]byte("\nfoo")) require.NoError(t, err) assert.Equal(t, 4, n) - - err = writer.Close() - require.NoError(t, err) + assertClose(t, writer) reader, err := client.Open("/_test/append/3.txt") require.NoError(t, err) @@ -449,13 +421,11 @@ func TestFileAppendRepeatedly(t *testing.T) { n, err := writer.Write([]byte("foo")) require.NoError(t, err) assert.Equal(t, 3, n) - - err = writer.Close() - require.NoError(t, err) + assertClose(t, writer) expected := "foo" for i := 0; i < 20; i++ { - writer, err = appendIgnoreABC(t, client, "/_test/append/4.txt") + writer, err = client.Append("/_test/append/4.txt") require.NoError(t, err) s := strings.Repeat("b", rand.Intn(1024)) + "\n" @@ -522,11 +492,9 @@ func TestFileAppendDeadline(t *testing.T) { n, err := writer.Write([]byte("foobar\n")) require.NoError(t, err) assert.Equal(t, 7, n) + assertClose(t, writer) - err = writer.Close() - require.NoError(t, err) - - writer, err = appendIgnoreABC(t, client, "/_test/append/5.txt") + writer, err = client.Append("/_test/append/5.txt") require.NoError(t, err) writer.SetDeadline(time.Now().Add(100 * time.Millisecond)) @@ -554,11 +522,9 @@ func TestFileAppendDeadlineBefore(t *testing.T) { n, err := writer.Write([]byte("foobar\n")) require.NoError(t, err) assert.Equal(t, 7, n) + assertClose(t, writer) - err = writer.Close() - require.NoError(t, err) - - writer, err = appendIgnoreABC(t, client, "/_test/append/6.txt") + writer, err = client.Append("/_test/append/6.txt") require.NoError(t, err) writer.SetDeadline(time.Now()) From 2f114063eda00d5847ff83c07afb9ad04e90f7b4 Mon Sep 17 00:00:00 2001 From: Junjie Qian Date: Mon, 20 Mar 2017 16:32:19 -0700 Subject: [PATCH 129/159] Add support for truncate operations Fixes #73. --- cmd/hdfs/main.go | 3 + cmd/hdfs/test/truncate.bats | 28 +++++++ cmd/hdfs/truncate.go | 26 ++++++ error.go | 3 + truncate.go | 31 ++++++++ truncate_test.go | 152 ++++++++++++++++++++++++++++++++++++ 6 files changed, 243 insertions(+) create mode 100644 cmd/hdfs/test/truncate.bats create mode 100644 cmd/hdfs/truncate.go create mode 100644 truncate.go create mode 100644 truncate_test.go diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go index e5d45ebe..da783d3c 100755 --- a/cmd/hdfs/main.go +++ b/cmd/hdfs/main.go @@ -38,6 +38,7 @@ Valid commands: getmerge SOURCE DEST put SOURCE DEST df [-h] + truncate SIZE FILE `, os.Args[0]) lsOpts = getopt.New() @@ -147,6 +148,8 @@ func main() { case "df": dfOpts.Parse(argv) df(*dfh) + case "truncate": + truncate(argv[1:]) // it's a seeeeecret command case "complete": complete(argv) diff --git a/cmd/hdfs/test/truncate.bats b/cmd/hdfs/test/truncate.bats new file mode 100644 index 00000000..b2035b8d --- /dev/null +++ b/cmd/hdfs/test/truncate.bats @@ -0,0 +1,28 @@ +#!/usr/bin/env bats + +load helper + +setup() { + $HDFS mkdir -p /_test_cmd/truncate + $HDFS touch /_test_cmd/truncate/a +} + +@test "truncate larger" { + run $HDFS truncate 10 /_test_cmd/a + assert_failure +} + +@test "truncate nonexistent" { + run $HDSF truncate 10 /_test_cmd/nonexistent + assert_failure +} + +@test "truncate" { + run $HDFS put $ROOT_TEST_DIR/testdata/foo.txt /_test_cmd/truncate/1 + run $HDFS truncate 2 /_test_cmd/truncate/1 + assert_success +} + +teardown() { + $HDFS rm -r /_test_cmd/truncate +} diff --git a/cmd/hdfs/truncate.go b/cmd/hdfs/truncate.go new file mode 100644 index 00000000..4da7b29a --- /dev/null +++ b/cmd/hdfs/truncate.go @@ -0,0 +1,26 @@ +package main + +import ( + "strconv" +) + +func truncate(args []string) { + if len(args) != 2 { + fatalWithUsage() + } + + size, err := strconv.ParseInt(args[0], 10, 64) + if err != nil { + fatal(err) + } + + client, err := getClient("") + if err != nil { + fatal(err) + } + + _, err = client.Truncate(args[1], size) + if err != nil { + fatal(err) + } +} diff --git a/error.go b/error.go index 0faadcf2..4bdf3648 100644 --- a/error.go +++ b/error.go @@ -11,6 +11,7 @@ const ( pathIsNotEmptyDirException = "org.apache.hadoop.fs.PathIsNotEmptyDirectoryException" fileAlreadyExistsException = "org.apache.hadoop.fs.FileAlreadyExistsException" alreadyBeingCreatedException = "org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException" + illegalArgumentException = "org.apache.hadoop.HadoopIllegalArgumentException" ) // Error represents a remote java exception from an HDFS namenode or datanode. @@ -50,6 +51,8 @@ func interpretException(err error) error { return syscall.ENOTEMPTY case fileAlreadyExistsException: return os.ErrExist + case illegalArgumentException: + return os.ErrInvalid default: return err } diff --git a/truncate.go b/truncate.go new file mode 100644 index 00000000..6b06f73d --- /dev/null +++ b/truncate.go @@ -0,0 +1,31 @@ +package hdfs + +import ( + "errors" + "os" + + hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" + "google.golang.org/protobuf/proto" +) + +// Truncate truncates the file specified by name to the given size, and returns +// the status any error encountered. The returned status will false in the case +// of any error or, if the error is nil, if HDFS indicated that the operation +// will be performed asynchronously and is not yet complete. +func (c *Client) Truncate(name string, size int64) (bool, error) { + req := &hdfs.TruncateRequestProto{ + Src: proto.String(name), + NewLength: proto.Uint64(uint64(size)), + ClientName: proto.String(c.namenode.ClientName), + } + resp := &hdfs.TruncateResponseProto{} + + err := c.namenode.Execute("truncate", req, resp) + if err != nil { + return false, &os.PathError{"truncate", name, interpretException(err)} + } else if resp.Result == nil { + return false, &os.PathError{"truncate", name, errors.New("unexpected empty response")} + } + + return resp.GetResult(), nil +} diff --git a/truncate_test.go b/truncate_test.go new file mode 100644 index 00000000..dd568051 --- /dev/null +++ b/truncate_test.go @@ -0,0 +1,152 @@ +package hdfs + +import ( + "os" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func waitTruncate(t *testing.T, client *Client, name string, size int64) { + done, err := client.Truncate(name, size) + require.NoError(t, err) + + var stat os.FileInfo + if !done { + for i := 0; i < 5; i++ { + stat, err = client.Stat(name) + require.NoError(t, err) + + if stat.Size() == size { + break + } + + time.Sleep(500 * time.Millisecond) + t.Log("Waiting for truncate to finish") + } + } else { + stat, err = client.Stat(name) + require.NoError(t, err) + } + + assert.EqualValues(t, size, stat.Size()) +} + +func TestTruncate(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/truncate/1.txt") + mkdirp(t, "/_test/truncate") + f, err := client.Create("/_test/truncate/1.txt") + require.NoError(t, err) + + n, err := f.Write([]byte("foobar\nfoobar\n")) + assert.Equal(t, 14, n) + require.NoError(t, err) + + assertClose(t, f) + + waitTruncate(t, client, "/_test/truncate/1.txt", 4) +} + +func TestTruncateToZero(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/truncate/2.txt") + mkdirp(t, "/_test/truncate") + f, err := client.Create("/_test/truncate/2.txt") + require.NoError(t, err) + + n, err := f.Write([]byte("foobarbaz")) + assert.Equal(t, 9, n) + require.NoError(t, err) + + assertClose(t, f) + + waitTruncate(t, client, "/_test/truncate/2.txt", 0) +} + +func TestTruncateSizeTooBig(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/truncate/3.txt") + mkdirp(t, "/_test/truncate") + + f, err := client.Create("/_test/truncate/3.txt") + require.NoError(t, err) + + n, err := f.Write([]byte("foo")) + assert.Equal(t, 3, n) + require.NoError(t, err) + + assertClose(t, f) + + done, err := client.Truncate("/_test/truncate/3.txt", 100) + assert.False(t, done) + assertPathError(t, err, "truncate", "/_test/truncate/3.txt", os.ErrInvalid) +} + +func TestTruncateSizeNegative(t *testing.T) { + client := getClient(t) + + baleet(t, "/_test/truncate/4.txt") + mkdirp(t, "/_test/truncate") + + f, err := client.Create("/_test/truncate/4.txt") + require.NoError(t, err) + + n, err := f.Write([]byte("foo")) + assert.Equal(t, 3, n) + require.NoError(t, err) + + assertClose(t, f) + + done, err := client.Truncate("/_test/truncate/4.txt", -10) + assert.False(t, done) + assertPathError(t, err, "truncate", "/_test/truncate/4.txt", os.ErrInvalid) +} + +func TestTruncateNoExist(t *testing.T) { + client := getClient(t) + + done, err := client.Truncate("/_test/nonexistent", 100) + assert.False(t, done) + assertPathError(t, err, "truncate", "/_test/nonexistent", os.ErrNotExist) +} + +func TestTruncateDir(t *testing.T) { + client := getClient(t) + + mkdirp(t, "/_test/truncate") + + done, err := client.Truncate("/_test/truncate", 100) + assert.False(t, done) + assertPathError(t, err, "truncate", "/_test/truncate", os.ErrNotExist) +} + +func TestTruncateWithoutPermission(t *testing.T) { + client := getClient(t) + client2 := getClientForUser(t, "gohdfs2") + + baleet(t, "/_test/truncate/5.txt") + mkdirp(t, "/_test/truncate") + + f, err := client.Create("/_test/truncate/5.txt") + require.NoError(t, err) + + n, err := f.Write([]byte("barbar")) + assert.Equal(t, 6, n) + require.NoError(t, err) + + assertClose(t, f) + + done, err := client2.Truncate("/_test/truncate/5.txt", 1) + assert.False(t, done) + assertPathError(t, err, "truncate", "/_test/truncate/5.txt", os.ErrPermission) + + stat, err := client.Stat("/_test/truncate/5.txt") + require.NoError(t, err) + assert.EqualValues(t, 6, stat.Size()) +} From 81c61d61ab08c9e256e25d44354a3d6bf9485200 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 9 Feb 2022 11:09:01 +0100 Subject: [PATCH 130/159] Correctly create a keytab for the user in CI --- .github/scripts/install-hdfs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/install-hdfs.sh b/.github/scripts/install-hdfs.sh index 189587e0..909bc919 100755 --- a/.github/scripts/install-hdfs.sh +++ b/.github/scripts/install-hdfs.sh @@ -50,7 +50,7 @@ EOF sudo apt-get install -y krb5-user krb5-kdc krb5-admin-server printf "$KERBEROS_PASSWORD\n$KERBEROS_PASSWORD" | sudo kdb5_util -r "$KERBEROS_REALM" create -s - for p in nn dn gh gohdfs1 gohdfs2; do + for p in nn dn $USER gohdfs1 gohdfs2; do sudo kadmin.local -q "addprinc -randkey $p/$HOSTNAME@$KERBEROS_REALM" sudo kadmin.local -q "addprinc -randkey $p/localhost@$KERBEROS_REALM" sudo kadmin.local -q "xst -k /tmp/$p.keytab $p/$HOSTNAME@$KERBEROS_REALM" @@ -62,10 +62,10 @@ EOF sudo service krb5-kdc restart sudo service krb5-admin-server restart - kinit -kt /tmp/gh.keytab "gh/localhost@$KERBEROS_REALM" + kinit -kt /tmp/$USER.keytab "$USER/localhost@$KERBEROS_REALM" # The go tests need ccache files for these principles in a specific place. - for p in gh gohdfs1 gohdfs2; do + for p in $USER gohdfs1 gohdfs2; do kinit -kt "/tmp/$p.keytab" -c "/tmp/krb5cc_gohdfs_$p" "$p/localhost@$KERBEROS_REALM" done fi @@ -170,7 +170,7 @@ EOF $HADOOP_ROOT/bin/hdfs namenode -format sudo groupadd hadoop -sudo useradd -G hadoop gh +sudo useradd -G hadoop $USER echo "Starting namenode..." $HADOOP_ROOT/bin/hdfs namenode > /tmp/hdfs/namenode.log 2>&1 & From 3faa96d6617937854a27fab92b7d65fc0b983055 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 9 Feb 2022 11:11:29 +0100 Subject: [PATCH 131/159] Useradd fails if the user already exists --- .github/scripts/install-hdfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/install-hdfs.sh b/.github/scripts/install-hdfs.sh index 909bc919..03a49eb4 100755 --- a/.github/scripts/install-hdfs.sh +++ b/.github/scripts/install-hdfs.sh @@ -170,7 +170,7 @@ EOF $HADOOP_ROOT/bin/hdfs namenode -format sudo groupadd hadoop -sudo useradd -G hadoop $USER +usermod -a -G hadoop $USER echo "Starting namenode..." $HADOOP_ROOT/bin/hdfs namenode > /tmp/hdfs/namenode.log 2>&1 & From 36a28bc8afc433619d3dc3f8b8d6fbeeb1cb1e8a Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 9 Feb 2022 12:00:56 +0100 Subject: [PATCH 132/159] Usermod requires sudo --- .github/scripts/install-hdfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/install-hdfs.sh b/.github/scripts/install-hdfs.sh index 03a49eb4..77d8803e 100755 --- a/.github/scripts/install-hdfs.sh +++ b/.github/scripts/install-hdfs.sh @@ -170,7 +170,7 @@ EOF $HADOOP_ROOT/bin/hdfs namenode -format sudo groupadd hadoop -usermod -a -G hadoop $USER +sudo usermod -a -G hadoop $USER echo "Starting namenode..." $HADOOP_ROOT/bin/hdfs namenode > /tmp/hdfs/namenode.log 2>&1 & From 80a02b492cae8f6eb9d0f024c7f8439234cfb764 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Fri, 11 Feb 2022 11:20:53 +0100 Subject: [PATCH 133/159] Wait longer for Truncate to finish in tests --- truncate_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/truncate_test.go b/truncate_test.go index dd568051..6c6c5923 100644 --- a/truncate_test.go +++ b/truncate_test.go @@ -15,7 +15,7 @@ func waitTruncate(t *testing.T, client *Client, name string, size int64) { var stat os.FileInfo if !done { - for i := 0; i < 5; i++ { + for i := 0; i < 10; i++ { stat, err = client.Stat(name) require.NoError(t, err) From dd78a1c9fb73760db3d369dc2675de06996123f3 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Fri, 11 Feb 2022 11:17:58 +0100 Subject: [PATCH 134/159] Fix a place where we would swallow an error from FileWriter.Close --- file_writer_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_writer_test.go b/file_writer_test.go index f2debe82..38eb8a6a 100644 --- a/file_writer_test.go +++ b/file_writer_test.go @@ -18,7 +18,7 @@ import ( func assertClose(t *testing.T, w *FileWriter) { var err error for i := 0; i < 5; i++ { - err := w.Close() + err = w.Close() if IsErrReplicating(err) { time.Sleep(200 * time.Millisecond) continue From 93ce217ddd2c3e7b24542f00276feb31f6c85533 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Fri, 11 Feb 2022 11:34:07 +0100 Subject: [PATCH 135/159] Give build artifacts prettier names --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7b8113c3..d3d97cf8 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ SOURCES = $(shell find . -name '*.go') $(GENERATED_PROTOS) # Protobuf needs one of these for every 'import "foo.proto"' in .protoc files. PROTO_MAPPING = MSecurity.proto=github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common -TAG ?= $(shell git rev-parse HEAD) +TAG ?= $(shell git describe --tag) ARCH = $(shell go env GOOS)-$(shell go env GOARCH) RELEASE_NAME = gohdfs-$(TAG)-$(ARCH) From ff27ef89ec2a83c94d2230a6f8741b733e1c33e8 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Fri, 11 Feb 2022 11:34:16 +0100 Subject: [PATCH 136/159] Point to the latest godoc --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 92e19c1a..18502d86 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ HDFS for Go =========== -[![GoDoc](https://godoc.org/github.com/colinmarc/hdfs/web?status.svg)](https://godoc.org/github.com/colinmarc/hdfs) [![build](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml) +[![GoDoc](https://godoc.org/github.com/colinmarc/hdfs/web?status.svg)](https://godoc.org/github.com/colinmarc/hdfs/v2) [![build](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml) This is a native golang client for hdfs. It connects directly to the namenode using the protocol buffers API. From 1dee01162328699c8034e22be55f8876bba76587 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Wed, 23 Mar 2022 12:44:57 -0600 Subject: [PATCH 137/159] Override ClientOptions.User if KerberosClient is set This prevents a subtle misconfiguration whereby User being set prevents the realm from being set, which then breaks any communication with the namenode. --- client.go | 4 ++-- internal/rpc/namenode.go | 18 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/client.go b/client.go index 105ef7ea..4e8ed316 100644 --- a/client.go +++ b/client.go @@ -57,8 +57,8 @@ type ClientOptions struct { // Addresses specifies the namenode(s) to connect to. Addresses []string // User specifies which HDFS user the client will act as. It is required - // unless kerberos authentication is enabled, in which case it will be - // determined from the provided credentials if empty. + // unless kerberos authentication is enabled, in which case it is overridden + // by the username set in KerberosClient. User string // UseDatanodeHostname specifies whether the client should connect to the // datanodes via hostname (which is useful in multi-homed setups) or IP diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index 7bea1b46..7b57a64e 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -58,8 +58,8 @@ type NamenodeConnectionOptions struct { // Addresses specifies the namenode(s) to connect to. Addresses []string // User specifies which HDFS user the client will act as. It is required - // unless kerberos authentication is enabled, in which case it will be - // determined from the provided credentials if empty. + // unless kerberos authentication is enabled, in which case it is overridden + // by the username set in KerberosClient. User string // DialFunc is used to connect to the namenodes. If nil, then // (&net.Dialer{}).DialContext is used. @@ -94,14 +94,12 @@ func NewNamenodeConnection(options NamenodeConnectionOptions) (*NamenodeConnecti var user, realm string user = options.User - if user == "" { - if options.KerberosClient != nil { - creds := options.KerberosClient.Credentials - user = creds.UserName() - realm = creds.Realm() - } else { - return nil, errors.New("user not specified") - } + if options.KerberosClient != nil { + creds := options.KerberosClient.Credentials + user = creds.UserName() + realm = creds.Realm() + } else if user == "" { + return nil, errors.New("user not specified") } // The ClientID is reused here both in the RPC headers (which requires a From 545c98f3184f7060a2ed3302e8773989ac074aca Mon Sep 17 00:00:00 2001 From: aba_aba_da_duo_duo <49055103+982945902@users.noreply.github.com> Date: Tue, 9 Aug 2022 20:36:14 +0800 Subject: [PATCH 138/159] CompleteRequestProto set FileId to fix call failed --- file_writer.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/file_writer.go b/file_writer.go index 3b8159f1..e2e50656 100644 --- a/file_writer.go +++ b/file_writer.go @@ -233,14 +233,23 @@ func (f *FileWriter) Close() error { } } + getFileInfoReq := &hdfs.GetFileInfoRequestProto{Src: proto.String(f.name)} + getFileInfoResp := &hdfs.GetFileInfoResponseProto{} + + err := f.client.namenode.Execute("getFileInfo", getFileInfoReq, getFileInfoResp) + if err != nil { + return &os.PathError{"getFileInfo", f.name, err} + } + completeReq := &hdfs.CompleteRequestProto{ Src: proto.String(f.name), ClientName: proto.String(f.client.namenode.ClientName), Last: lastBlock, + FileId: getFileInfoResp.Fs.FileId, } completeResp := &hdfs.CompleteResponseProto{} - err := f.client.namenode.Execute("complete", completeReq, completeResp) + err = f.client.namenode.Execute("complete", completeReq, completeResp) if err != nil { return &os.PathError{"create", f.name, err} } else if completeResp.GetResult() == false { From da8cb333fae8765d5863a90cf53044fa8be9fad7 Mon Sep 17 00:00:00 2001 From: aba_aba_da_duo_duo <49055103+982945902@users.noreply.github.com> Date: Mon, 29 Aug 2022 16:26:56 +0800 Subject: [PATCH 139/159] loss fileID cause write failed --- file_writer.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/file_writer.go b/file_writer.go index e2e50656..e5877f1c 100644 --- a/file_writer.go +++ b/file_writer.go @@ -27,6 +27,7 @@ type FileWriter struct { name string replication int blockSize int64 + fileId *uint64 blockWriter *transfer.BlockWriter deadline time.Time @@ -82,6 +83,7 @@ func (c *Client) CreateFile(name string, replication int, blockSize int64, perm name: name, replication: replication, blockSize: blockSize, + fileId: createResp.Fs.FileId, }, nil } @@ -111,6 +113,7 @@ func (c *Client) Append(name string) (*FileWriter, error) { name: name, replication: int(appendResp.Stat.GetBlockReplication()), blockSize: int64(appendResp.Stat.GetBlocksize()), + fileId: appendResp.Stat.FileId, } // This returns nil if there are no blocks (it's an empty file) or if the @@ -233,23 +236,15 @@ func (f *FileWriter) Close() error { } } - getFileInfoReq := &hdfs.GetFileInfoRequestProto{Src: proto.String(f.name)} - getFileInfoResp := &hdfs.GetFileInfoResponseProto{} - - err := f.client.namenode.Execute("getFileInfo", getFileInfoReq, getFileInfoResp) - if err != nil { - return &os.PathError{"getFileInfo", f.name, err} - } - completeReq := &hdfs.CompleteRequestProto{ Src: proto.String(f.name), ClientName: proto.String(f.client.namenode.ClientName), Last: lastBlock, - FileId: getFileInfoResp.Fs.FileId, + FileId: f.fileId, } completeResp := &hdfs.CompleteResponseProto{} - err = f.client.namenode.Execute("complete", completeReq, completeResp) + err := f.client.namenode.Execute("complete", completeReq, completeResp) if err != nil { return &os.PathError{"create", f.name, err} } else if completeResp.GetResult() == false { @@ -276,6 +271,7 @@ func (f *FileWriter) startNewBlock() error { Src: proto.String(f.name), ClientName: proto.String(f.client.namenode.ClientName), Previous: previous, + FileId: f.fileId, } addBlockResp := &hdfs.AddBlockResponseProto{} From f684d8ad888d6fc871e67c426526ecb25ac3b0b5 Mon Sep 17 00:00:00 2001 From: Colm Dougan Date: Thu, 14 Apr 2022 00:25:47 +0100 Subject: [PATCH 140/159] Add "test" command https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/FileSystemShell.html#test Fixes #157 --- cmd/hdfs/main.go | 12 ++++ cmd/hdfs/test.go | 57 +++++++++++++++++ cmd/hdfs/test/test.bats | 131 ++++++++++++++++++++++++++++++++++++++++ testdata/empty.txt | 0 4 files changed, 200 insertions(+) create mode 100644 cmd/hdfs/test.go create mode 100644 cmd/hdfs/test/test.bats create mode 100644 testdata/empty.txt diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go index da783d3c..1f169d16 100755 --- a/cmd/hdfs/main.go +++ b/cmd/hdfs/main.go @@ -32,6 +32,7 @@ Valid commands: cat SOURCE... head [-n LINES | -c BYTES] SOURCE... tail [-n LINES | -c BYTES] SOURCE... + test [-defsz] FILE... du [-sh] FILE... checksum FILE... get SOURCE [DEST] @@ -57,6 +58,13 @@ Valid commands: mkdirOpts = getopt.New() mkdirp = mkdirOpts.Bool('p') + testOpts = getopt.New() + teste = testOpts.Bool('e') + testf = testOpts.Bool('f') + testd = testOpts.Bool('d') + testz = testOpts.Bool('z') + tests = testOpts.Bool('s') + touchOpts = getopt.New() touchc = touchOpts.Bool('c') @@ -95,6 +103,7 @@ func init() { duOpts.SetUsage(printHelp) getmergeOpts.SetUsage(printHelp) dfOpts.SetUsage(printHelp) + testOpts.SetUsage(printHelp) } func main() { @@ -148,6 +157,9 @@ func main() { case "df": dfOpts.Parse(argv) df(*dfh) + case "test": + testOpts.Parse(argv) + test(testOpts.Args(), *teste, *testf, *testd, *testz, *tests) case "truncate": truncate(argv[1:]) // it's a seeeeecret command diff --git a/cmd/hdfs/test.go b/cmd/hdfs/test.go new file mode 100644 index 00000000..66085418 --- /dev/null +++ b/cmd/hdfs/test.go @@ -0,0 +1,57 @@ +package main + +import ( + "errors" + "fmt" + "os" +) + +type testFn func(fi os.FileInfo) bool + +func test(args []string, exists, file, dir, empty, nonempty bool) { + if len(args) == 0 { + fatalWithUsage() + } + + numFlags := 0 + for _, b := range []bool{exists, dir, file, nonempty, empty} { + if b { + numFlags += 1 + } + } + + if numFlags != 1 { + fatal("exactly one test flag must be specified") + } + + var f func(fi os.FileInfo) bool + switch { + case exists: + f = func(fi os.FileInfo) bool { return fi != nil } + case dir: + f = func(fi os.FileInfo) bool { return fi.IsDir() } + case file: + f = func(fi os.FileInfo) bool { return !fi.IsDir() } + case nonempty: + f = func(fi os.FileInfo) bool { return fi.Size() != 0 } + case empty: + f = func(fi os.FileInfo) bool { return fi.Size() == 0 } + } + + expanded, client, err := getClientAndExpandedPaths(args) + if err != nil { + fatal(err) + } + + for _, p := range expanded { + fi, err := client.Stat(p) + if err != nil && !errors.Is(err, os.ErrNotExist) { + fmt.Fprintln(os.Stderr, err) + continue + } + + if !f(fi) { + status = 1 + } + } +} diff --git a/cmd/hdfs/test/test.bats b/cmd/hdfs/test/test.bats new file mode 100644 index 00000000..a822ba13 --- /dev/null +++ b/cmd/hdfs/test/test.bats @@ -0,0 +1,131 @@ +#!/usr/bin/env bats + +load helper + +setup() { + $HDFS mkdir -p /_test_cmd/test/dir1 + $HDFS mkdir -p /_test_cmd/test/dir2 + $HDFS mkdir -p /_test_cmd/test/dir3 + $HDFS put $ROOT_TEST_DIR/testdata/empty.txt /_test_cmd/test/empty.txt + $HDFS put $ROOT_TEST_DIR/testdata/foo.txt /_test_cmd/test/foo.txt + $HDFS put $ROOT_TEST_DIR/testdata/foo.txt /_test_cmd/test/dir1/foo1.txt +} + +@test "exists for existent file" { + run $HDFS test -e /_test_cmd/test/foo.txt + assert_success +} + +@test "exists for existent dir" { + run $HDFS test -e /_test_cmd/test/dir1 + assert_success +} + +@test "exists for non existent file" { + run $HDFS test -e /_test_cmd/test/bar.txt + assert_failure +} + +@test "exists for non existent dir" { + run $HDFS test -e /_test_cmd/test/dir9 + assert_failure +} + +@test "isfile for existent file" { + run $HDFS test -f /_test_cmd/test/foo.txt + assert_success +} + +@test "isfile for existent dir" { + run $HDFS test -f /_test_cmd/test/dir1 + assert_failure +} + +@test "isfile for non existent file" { + run $HDFS test -f /_test_cmd/test/bar.txt + assert_failure +} + +@test "isfile for non existent dir" { + run $HDFS test -f /_test_cmd/test/dir9 + assert_failure +} + +@test "isdir for existent file" { + run $HDFS test -d /_test_cmd/test/foo.txt + assert_failure +} + +@test "isdir for existent dir" { + run $HDFS test -d /_test_cmd/test/dir1 + assert_success +} + +@test "isdir for non existent file" { + run $HDFS test -d /_test_cmd/test/bar.txt + assert_failure +} + +@test "isdir for non existent dir" { + run $HDFS test -d /_test_cmd/test/dir9 + assert_failure +} + +@test "isnonempty for existent empty file" { + run $HDFS test -s /_test_cmd/test/empty.txt + assert_failure +} + +@test "isnonempty for existent non empty file" { + run $HDFS test -s /_test_cmd/test/foo.txt + assert_success +} + +@test "isnonempty for existent dir" { + run $HDFS test -s /_test_cmd/test/dir1 + assert_failure +} + +@test "isnonempty for non existent file" { + run $HDFS test -s /_test_cmd/test/bar.txt + assert_failure +} + +@test "isnonempty for non existent dir" { + run $HDFS test -s /_test_cmd/test/dir9 + assert_failure +} + +@test "isempty for existent empty file" { + run $HDFS test -z /_test_cmd/test/empty.txt + assert_success +} + +@test "isempty for existent non empty file" { + run $HDFS test -z /_test_cmd/test/foo.txt + assert_failure +} + +# TOOD: check this outcome is correct +@test "isempty for existent dir" { + run $HDFS test -z /_test_cmd/test/dir1 + assert_success +} + +@test "isempty for non existent file" { + run $HDFS test -z /_test_cmd/test/bar.txt + assert_failure +} + +@test "isempty for non existent dir" { + run $HDFS test -z /_test_cmd/test/dir9 + assert_failure +} + +teardown() { + $HDFS rm -r /_test_cmd/test +} + +teardown() { + $HDFS rm -r /_test_cmd/test +} diff --git a/testdata/empty.txt b/testdata/empty.txt new file mode 100644 index 00000000..e69de29b From b2074bae47135242122bbaf5cd4d07244527947a Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Fri, 2 Sep 2022 12:55:54 +0200 Subject: [PATCH 141/159] Add gopher --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 18502d86..334797ac 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![](docs/gopher.png) + HDFS for Go =========== From 147a9e3f408119bc2c0d2cb807cf281c908e824e Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Fri, 2 Sep 2022 12:56:59 +0200 Subject: [PATCH 142/159] Add docs/gopher.png --- docs/gopher.png | Bin 0 -> 352426 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/gopher.png diff --git a/docs/gopher.png b/docs/gopher.png new file mode 100644 index 0000000000000000000000000000000000000000..c2973f923c08e15fa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ib`#Y9C#TgOhb+*g8j zd(w)3yUW3}E4>jU^zYJ7&D5qUoN4?DH`fM}Mh;EJMXg~7uF(Sf-@|SJ4cV1k!YL2$ zaszEeV8w-H7K`K>4QcC?xCjt9B^m5en11&{S8VK#2~H@x;aeHjq7BA}R(4#=-HG74xn;YXsuqG@cj{oQCs&-~(W>r8`e{yEH_d_3hU&E%Ki5x5+n8&7l8+C)e({r)`e@N-*}g5$QK~zAPBn!46%TI1 zwRj`9&SQt8@#nRpEN;oZvtn?%I=g!}Q|xK?o3xQw;7D};Ie_Wuu}2*JRo5U4y825Z zCLVB_`!0U4{l&t6Bqw=?4mtWS-UZ$v!2t&{qhp@%)sqUj{G&tgwQ#M6KYMcp%zP=P zo_ZfKh6iOm5$NDN``b$&JiWQO`2sz#kokirQ)R{rE>URjyXmZ(gQ(Gx_~@{p&sgR( z+>Z1L3W8TvrCGPxG-e-280a}S8!d7Sl#fO2mGU8s_j>N;qjH!B= zR#$nyQ1cJoeE06+gdTiEI{Fm`9p|I-=39bLyY0IRt!8)sUd+8;78rHk@izXusd2^A h7*#L?SebV_1p4AlzkwwqPy;?f&lS|=k+SAt{|7K0qRRjP literal 0 HcmV?d00001 From 262a36a6a2ee704f2b7a54851af1587c590e2914 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Fri, 2 Sep 2022 13:00:40 +0200 Subject: [PATCH 143/159] Make the gopher smaller --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 334797ac..154e511d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![](docs/gopher.png) +gopher HDFS for Go =========== From 1c816d7874f8025b91564854ebf83fff2567c818 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 1 Nov 2022 13:00:31 +0100 Subject: [PATCH 144/159] Use time.Since --- internal/rpc/namenode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/namenode.go b/internal/rpc/namenode.go index 7b57a64e..8d1bf59a 100644 --- a/internal/rpc/namenode.go +++ b/internal/rpc/namenode.go @@ -143,7 +143,7 @@ func (c *NamenodeConnection) resolveConnection() error { } for _, host := range c.hostList { - if host.lastErrorAt.After(time.Now().Add(-backoffDuration)) { + if time.Since(host.lastErrorAt) < backoffDuration { continue } From b9cfe3317b60c140d775d1e09fc2ab69f78bddee Mon Sep 17 00:00:00 2001 From: Matthew Vernon Date: Wed, 7 Dec 2022 13:49:39 +0000 Subject: [PATCH 145/159] Make two source files no longer executable When packaging this for Debian, the Debian linter "lintian" noticed that these two source files are executable (which they shouldn't be). This change just removes the executable bit from the two offending source files. Thanks, and I hope you don't mind a very pernickety PR! --- cmd/hdfs/df.go | 0 cmd/hdfs/main.go | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 cmd/hdfs/df.go mode change 100755 => 100644 cmd/hdfs/main.go diff --git a/cmd/hdfs/df.go b/cmd/hdfs/df.go old mode 100755 new mode 100644 diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go old mode 100755 new mode 100644 From 77b16e090a5b3c211ebaa7712f409293f56d2715 Mon Sep 17 00:00:00 2001 From: chenyahui Date: Wed, 9 Nov 2022 11:47:49 +0800 Subject: [PATCH 146/159] fix: return blockReader.Close --- file_reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_reader.go b/file_reader.go index e1e18798..fb329b90 100644 --- a/file_reader.go +++ b/file_reader.go @@ -390,7 +390,7 @@ func (f *FileReader) Close() error { f.closed = true if f.blockReader != nil { - f.blockReader.Close() + return f.blockReader.Close() } return nil From 325f0cf9659414a63125fc05d869181658506fab Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 11 Jul 2023 12:16:25 +0200 Subject: [PATCH 147/159] Change the default checksum to match hadoop fs Although CRC32 is the default in the proto definitions, the java client sets it to CRC32C. --- internal/transfer/block_writer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/transfer/block_writer.go b/internal/transfer/block_writer.go index 6de77a0b..b4dbbf2b 100644 --- a/internal/transfer/block_writer.go +++ b/internal/transfer/block_writer.go @@ -218,7 +218,7 @@ func (bw *BlockWriter) writeBlockWriteRequest(w io.Writer) error { MaxBytesRcvd: proto.Uint64(uint64(bw.Offset)), LatestGenerationStamp: proto.Uint64(uint64(bw.generationTimestamp())), RequestedChecksum: &hdfs.ChecksumProto{ - Type: hdfs.ChecksumTypeProto_CHECKSUM_CRC32.Enum(), + Type: hdfs.ChecksumTypeProto_CHECKSUM_CRC32C.Enum(), BytesPerChecksum: proto.Uint32(outboundChunkSize), }, } From 0eb59de669dfe7bda76d5571c0baeddfcf8a5b76 Mon Sep 17 00:00:00 2001 From: hoyho Date: Thu, 13 Oct 2022 18:25:17 +0800 Subject: [PATCH 148/159] Handle CHECKSUM_NULL blocks correctly --- internal/transfer/block_read_stream.go | 23 ++++++++++++++--------- internal/transfer/block_reader.go | 8 +++++++- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/internal/transfer/block_read_stream.go b/internal/transfer/block_read_stream.go index c2efa076..d86dd5e6 100644 --- a/internal/transfer/block_read_stream.go +++ b/internal/transfer/block_read_stream.go @@ -17,9 +17,10 @@ var errInvalidChecksum = errors.New("invalid checksum") // blockReadStream implements io.Reader for reading a packet stream for a single // block from a single datanode. type blockReadStream struct { - reader io.Reader - checksumTab *crc32.Table - chunkSize int + reader io.Reader + checksumTab *crc32.Table + chunkSize int + checksumSize int checksums bytes.Buffer chunk bytes.Buffer @@ -30,11 +31,12 @@ type blockReadStream struct { lastPacket bool } -func newBlockReadStream(reader io.Reader, chunkSize int, checksumTab *crc32.Table) *blockReadStream { +func newBlockReadStream(reader io.Reader, chunkSize int, checksumTab *crc32.Table, checksumSize int) *blockReadStream { return &blockReadStream{ - reader: reader, - chunkSize: chunkSize, - checksumTab: checksumTab, + reader: reader, + chunkSize: chunkSize, + checksumTab: checksumTab, + checksumSize: checksumSize, } } @@ -123,6 +125,10 @@ func (s *blockReadStream) Read(b []byte) (int, error) { } func (s *blockReadStream) validateChecksum(b []byte) error { + if s.checksumTab == nil { + return nil + } + checksumOffset := 4 * s.chunkIndex checksumBytes := s.checksums.Bytes()[checksumOffset : checksumOffset+4] checksum := binary.BigEndian.Uint32(checksumBytes) @@ -144,8 +150,7 @@ func (s *blockReadStream) startPacket() error { dataLength := int(header.GetDataLen()) numChunks := int(math.Ceil(float64(dataLength) / float64(s.chunkSize))) - // TODO don't assume checksum size is 4 - checksumsLength := numChunks * 4 + checksumsLength := numChunks * s.checksumSize s.checksums.Reset() s.checksums.Grow(checksumsLength) _, err = io.CopyN(&s.checksums, s.reader, int64(checksumsLength)) diff --git a/internal/transfer/block_reader.go b/internal/transfer/block_reader.go index 6b326574..a1da0699 100644 --- a/internal/transfer/block_reader.go +++ b/internal/transfer/block_reader.go @@ -184,19 +184,25 @@ func (br *BlockReader) connectNext() error { checksumInfo := readInfo.GetChecksum() var checksumTab *crc32.Table + var checksumSize int checksumType := checksumInfo.GetType() switch checksumType { case hdfs.ChecksumTypeProto_CHECKSUM_CRC32: checksumTab = crc32.IEEETable + checksumSize = 4 case hdfs.ChecksumTypeProto_CHECKSUM_CRC32C: checksumTab = crc32.MakeTable(crc32.Castagnoli) + checksumSize = 4 + case hdfs.ChecksumTypeProto_CHECKSUM_NULL: + checksumTab = nil + checksumSize = 0 default: return fmt.Errorf("unsupported checksum type: %d", checksumType) } chunkOffset := int64(readInfo.GetChunkOffset()) chunkSize := int(checksumInfo.GetBytesPerChecksum()) - stream := newBlockReadStream(conn, chunkSize, checksumTab) + stream := newBlockReadStream(conn, chunkSize, checksumTab, checksumSize) // The read will start aligned to a chunk boundary, so we need to skip // forward to the requested offset. From 9200fcb22f89f3b30fd87ccd981fccbc051deda2 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 11 Jul 2023 12:25:01 +0200 Subject: [PATCH 149/159] Update dependencies --- go.mod | 18 +++++++++--------- go.sum | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 461445d2..21409275 100644 --- a/go.mod +++ b/go.mod @@ -1,24 +1,24 @@ module github.com/colinmarc/hdfs/v2 require ( - github.com/jcmturner/gokrb5/v8 v8.4.2 + github.com/jcmturner/gokrb5/v8 v8.4.4 github.com/pborman/getopt v1.1.0 - github.com/stretchr/testify v1.7.0 - google.golang.org/protobuf v1.27.1 + github.com/stretchr/testify v1.8.1 + google.golang.org/protobuf v1.31.0 ) require ( - github.com/davecgh/go-spew v1.1.0 // indirect - github.com/hashicorp/go-uuid v1.0.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect - github.com/jcmturner/gofork v1.0.0 // indirect + github.com/jcmturner/gofork v1.7.6 // indirect github.com/jcmturner/goidentity/v6 v6.0.1 // indirect github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 // indirect - golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect - gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/net v0.12.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) go 1.17 diff --git a/go.sum b/go.sum index 7c2a2f0c..850c901e 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,6 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -9,16 +10,22 @@ github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7Fsg github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= +github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= github.com/jcmturner/gokrb5/v8 v8.4.2 h1:6ZIM6b/JJN0X8UM43ZOM6Z4SJzla+a/u7scXFJzodkA= github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= +github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= +github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/pborman/getopt v1.1.0 h1:eJ3aFZroQqq0bWmraivjQNt6Dmm5M0h2JcDW38/Azb0= @@ -26,26 +33,64 @@ github.com/pborman/getopt v1.1.0/go.mod h1:FxXoW1Re00sQG/+KIkuSqRL/LwQgSkv7uyac+ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 h1:umElSU9WZirRdgu2yFHY0ayQkEnKiOC1TtM3fWXFnoU= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 40a17edf16ae07b5fad61f64d64baaf05abe1b6f Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 11 Jul 2023 12:31:47 +0200 Subject: [PATCH 150/159] Correctly compute the checksum now that we're using CRC32C by default --- internal/transfer/block_write_stream.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/transfer/block_write_stream.go b/internal/transfer/block_write_stream.go index 0fa2ba86..2eee1ccd 100644 --- a/internal/transfer/block_write_stream.go +++ b/internal/transfer/block_write_stream.go @@ -229,6 +229,7 @@ func (s *blockWriteStream) makePacket() outboundPacket { } // Fill in the checksum for each chunk of data. + tab := crc32.MakeTable(crc32.Castagnoli) for i := 0; i < numChunks; i++ { chunkOff := i * outboundChunkSize chunkEnd := chunkOff + outboundChunkSize @@ -236,7 +237,7 @@ func (s *blockWriteStream) makePacket() outboundPacket { chunkEnd = len(packet.data) } - checksum := crc32.Checksum(packet.data[chunkOff:chunkEnd], crc32.IEEETable) + checksum := crc32.Checksum(packet.data[chunkOff:chunkEnd], tab) binary.BigEndian.PutUint32(packet.checksums[i*4:], checksum) } From d3526f094a73bd67cf9c08b7014c4ef565c86d03 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 11 Jul 2023 12:35:14 +0200 Subject: [PATCH 151/159] Revert "Update dependencies" This reverts commit 9200fcb22f89f3b30fd87ccd981fccbc051deda2. --- go.mod | 18 +++++++++--------- go.sum | 45 --------------------------------------------- 2 files changed, 9 insertions(+), 54 deletions(-) diff --git a/go.mod b/go.mod index 21409275..461445d2 100644 --- a/go.mod +++ b/go.mod @@ -1,24 +1,24 @@ module github.com/colinmarc/hdfs/v2 require ( - github.com/jcmturner/gokrb5/v8 v8.4.4 + github.com/jcmturner/gokrb5/v8 v8.4.2 github.com/pborman/getopt v1.1.0 - github.com/stretchr/testify v1.8.1 - google.golang.org/protobuf v1.31.0 + github.com/stretchr/testify v1.7.0 + google.golang.org/protobuf v1.27.1 ) require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/hashicorp/go-uuid v1.0.3 // indirect + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect - github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/gofork v1.0.0 // indirect github.com/jcmturner/goidentity/v6 v6.0.1 // indirect github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/net v0.12.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect + golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 // indirect + golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect ) go 1.17 diff --git a/go.sum b/go.sum index 850c901e..7c2a2f0c 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,5 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -10,22 +9,16 @@ github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7Fsg github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= -github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= -github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= -github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= github.com/jcmturner/gokrb5/v8 v8.4.2 h1:6ZIM6b/JJN0X8UM43ZOM6Z4SJzla+a/u7scXFJzodkA= github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= -github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= -github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/pborman/getopt v1.1.0 h1:eJ3aFZroQqq0bWmraivjQNt6Dmm5M0h2JcDW38/Azb0= @@ -33,64 +26,26 @@ github.com/pborman/getopt v1.1.0/go.mod h1:FxXoW1Re00sQG/+KIkuSqRL/LwQgSkv7uyac+ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 h1:umElSU9WZirRdgu2yFHY0ayQkEnKiOC1TtM3fWXFnoU= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From f5542d2269d4ac3168297ef7cbe504fad604c234 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 11 Jul 2023 12:35:54 +0200 Subject: [PATCH 152/159] Update all dependencies --- go.mod | 18 +++++++------- go.sum | 75 +++++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 67 insertions(+), 26 deletions(-) diff --git a/go.mod b/go.mod index 461445d2..21409275 100644 --- a/go.mod +++ b/go.mod @@ -1,24 +1,24 @@ module github.com/colinmarc/hdfs/v2 require ( - github.com/jcmturner/gokrb5/v8 v8.4.2 + github.com/jcmturner/gokrb5/v8 v8.4.4 github.com/pborman/getopt v1.1.0 - github.com/stretchr/testify v1.7.0 - google.golang.org/protobuf v1.27.1 + github.com/stretchr/testify v1.8.1 + google.golang.org/protobuf v1.31.0 ) require ( - github.com/davecgh/go-spew v1.1.0 // indirect - github.com/hashicorp/go-uuid v1.0.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect - github.com/jcmturner/gofork v1.0.0 // indirect + github.com/jcmturner/gofork v1.7.6 // indirect github.com/jcmturner/goidentity/v6 v6.0.1 // indirect github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 // indirect - golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect - gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/net v0.12.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) go 1.17 diff --git a/go.sum b/go.sum index 7c2a2f0c..6e26eccd 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,6 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -7,18 +8,19 @@ github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyC github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= -github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= -github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= -github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= +github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= -github.com/jcmturner/gokrb5/v8 v8.4.2 h1:6ZIM6b/JJN0X8UM43ZOM6Z4SJzla+a/u7scXFJzodkA= -github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= +github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= +github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/pborman/getopt v1.1.0 h1:eJ3aFZroQqq0bWmraivjQNt6Dmm5M0h2JcDW38/Azb0= @@ -26,26 +28,65 @@ github.com/pborman/getopt v1.1.0/go.mod h1:FxXoW1Re00sQG/+KIkuSqRL/LwQgSkv7uyac+ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 h1:umElSU9WZirRdgu2yFHY0ayQkEnKiOC1TtM3fWXFnoU= -golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 1b67d286c561d64e4692f687148ea28052606754 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Tue, 11 Jul 2023 14:31:12 +0200 Subject: [PATCH 153/159] Run tests on 1.20 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7ff0ed63..8750235c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: "1.20" # This step installs downloads hadoop and starts a local cluster with one # namenode and one datanode. It adds the hadoop binaries to GITHUB_PATH From be7d224d214435801444715f8683cc1d49071c9d Mon Sep 17 00:00:00 2001 From: Colm Dougan Date: Sat, 9 Apr 2022 16:34:14 +0100 Subject: [PATCH 154/159] Support ls -R Fixes #100. --- cmd/hdfs/ls.go | 67 ++++++++++++++++++++++++++++----------- cmd/hdfs/main.go | 5 +-- cmd/hdfs/test/glob.bats | 53 ++++++++++++++++++++++++++----- cmd/hdfs/test/helper.bash | 2 +- cmd/hdfs/test/ls.bats | 46 +++++++++++++++++++++++++++ 5 files changed, 144 insertions(+), 29 deletions(-) diff --git a/cmd/hdfs/ls.go b/cmd/hdfs/ls.go index 824d54f6..393db1c6 100644 --- a/cmd/hdfs/ls.go +++ b/cmd/hdfs/ls.go @@ -13,7 +13,7 @@ import ( "github.com/colinmarc/hdfs/v2" ) -func ls(paths []string, long, all, humanReadable bool) { +func ls(paths []string, long, all, humanReadable, recursive bool) { paths, client, err := getClientAndExpandedPaths(paths) if err != nil { fatal(err) @@ -25,7 +25,8 @@ func ls(paths []string, long, all, humanReadable bool) { files := make([]string, 0, len(paths)) fileInfos := make([]os.FileInfo, 0, len(paths)) - dirs := make([]string, 0, len(paths)) + + var dirs []string for _, p := range paths { fi, err := client.Stat(p) if err != nil { @@ -40,30 +41,60 @@ func ls(paths []string, long, all, humanReadable bool) { } } + // The target is a directory; print its contents instead of the directory + // entry itself. Even recursive ls on a single directory still just prints the + // toplevel first, without a leading "/foo/bar:". + skipTopLevel := false if len(files) == 0 && len(dirs) == 1 { printDir(client, dirs[0], long, all, humanReadable) + skipTopLevel = true + } + + if long { + tw := lsTabWriter() + for i, p := range files { + printLong(tw, p, fileInfos[i], humanReadable) + } + + tw.Flush() } else { - if long { - tw := lsTabWriter() - for i, p := range files { - printLong(tw, p, fileInfos[i], humanReadable) - } + for _, p := range files { + fmt.Println(p) + } + } - tw.Flush() - } else { - for _, p := range files { - fmt.Println(p) - } + // Add all nested directories for the recursive case. These are printed as + // "siblings". + if recursive { + var nestedDirs []string + for _, dir := range dirs { + client.Walk(dir, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + + if info.IsDir() { + nestedDirs = append(nestedDirs, path) + } + + return nil + }) } - for i, dir := range dirs { - if i > 0 || len(files) > 0 { - fmt.Println() - } + dirs = nestedDirs + } + + if skipTopLevel && len(dirs) > 0 { + dirs = dirs[1:] + } - fmt.Printf("%s/:\n", dir) - printDir(client, dir, long, all, humanReadable) + for i, dir := range dirs { + if i > 0 || len(files) > 0 || skipTopLevel { + fmt.Println() } + + fmt.Printf("%s:\n", dir) + printDir(client, dir, long, all, humanReadable) } } diff --git a/cmd/hdfs/main.go b/cmd/hdfs/main.go index 1f169d16..e8479360 100644 --- a/cmd/hdfs/main.go +++ b/cmd/hdfs/main.go @@ -22,7 +22,7 @@ var ( The flags available are a subset of the POSIX ones, but should behave similarly. Valid commands: - ls [-lah] [FILE]... + ls [-lahR] [FILE]... rm [-rf] FILE... mv [-nT] SOURCE... DEST mkdir [-p] FILE... @@ -46,6 +46,7 @@ Valid commands: lsl = lsOpts.Bool('l') lsa = lsOpts.Bool('a') lsh = lsOpts.Bool('h') + lsR = lsOpts.Bool('R') rmOpts = getopt.New() rmr = rmOpts.Bool('r') @@ -118,7 +119,7 @@ func main() { fatal("gohdfs version", version) case "ls": lsOpts.Parse(argv) - ls(lsOpts.Args(), *lsl, *lsa, *lsh) + ls(lsOpts.Args(), *lsl, *lsa, *lsh, *lsR) case "rm": rmOpts.Parse(argv) rm(rmOpts.Args(), *rmr, *rmf) diff --git a/cmd/hdfs/test/glob.bats b/cmd/hdfs/test/glob.bats index e4ee94b7..be18dbc6 100644 --- a/cmd/hdfs/test/glob.bats +++ b/cmd/hdfs/test/glob.bats @@ -17,12 +17,12 @@ setup() { run $HDFS ls /_test_cmd/glob/dir*/dir assert_success assert_output < Date: Sat, 15 Jul 2023 21:28:29 +0200 Subject: [PATCH 155/159] Correct blockReader.Skip logic The existing logic had a rare edge case where it would seek incorrectly. Most of the time, it wouldn't skip at all. --- file_reader.go | 23 +++++++---------- file_reader_test.go | 42 +++++++++++++++++++++++++++---- internal/transfer/block_reader.go | 13 +++++----- 3 files changed, 52 insertions(+), 26 deletions(-) diff --git a/file_reader.go b/file_reader.go index fb329b90..10c74d54 100644 --- a/file_reader.go +++ b/file_reader.go @@ -156,25 +156,20 @@ func (f *FileReader) Seek(offset int64, whence int) (int64, error) { return f.offset, fmt.Errorf("invalid resulting offset: %d", off) } - if f.offset != off { - f.offset = off - - if f.blockReader != nil { - // If the seek is within the next few chunks, it's much more - // efficient to throw away a few bytes than to reconnect and start - // a read at the new offset. - err := f.blockReader.Skip(f.offset - f.blockReader.Offset) - if err == nil { - return f.offset, nil - } - - // It isn't possible to seek within the current block, so reset such - // that we can connect to the new block. + if f.blockReader != nil { + // If the seek is within the next few chunks, it's much more + // efficient to throw away a few bytes than to reconnect and start + // a read at the new offset. + err := f.blockReader.Skip(off - f.offset) + if err != nil { + // It isn't possible to skip forward in the current block, so reset such + // that we can reconnect at the new offset. f.blockReader.Close() f.blockReader = nil } } + f.offset = off return f.offset, nil } diff --git a/file_reader_test.go b/file_reader_test.go index de05ad82..7c82bcc3 100644 --- a/file_reader_test.go +++ b/file_reader_test.go @@ -23,14 +23,19 @@ const ( testStr = "Abominable are the tumblers into which he pours his poison." testStrOff = 48847 - testStr2 = "tumblers" - testStr2Off = 48866 - testStr2RelativeOff = 19 + testStr2 = "tumblers" + testStr2Off = 48866 testStr3 = "http://www.gutenberg.org" testStr3Off = 1256988 testStr3NegativeOff = -288 + testStr4 = "Moby Dick" + testStr4Off = 34 + + testStr5 = "LEVIATHAN." + testStr5Off = 8234 + testChecksum = "27c076e4987344253650d3335a5d08ce" ) @@ -250,7 +255,7 @@ func TestFileSeek(t *testing.T) { assert.EqualValues(t, testStrOff, off) br := file.blockReader - off, err = file.Seek(testStr2RelativeOff, 1) + off, err = file.Seek((testStr2Off - testStrOff), 1) assert.NoError(t, err) assert.EqualValues(t, testStr2Off, off) @@ -263,7 +268,7 @@ func TestFileSeek(t *testing.T) { assert.EqualValues(t, len(testStr2), n) assert.EqualValues(t, testStr2, string(buf.Bytes())) - // now seek forward to another block and read a string + // Now seek forward to another block and read. off, err = file.Seek(testStr3NegativeOff, 2) assert.NoError(t, err) assert.EqualValues(t, testStr3Off, off) @@ -275,6 +280,33 @@ func TestFileSeek(t *testing.T) { assert.EqualValues(t, testStr3, string(buf.Bytes())) } +func TestFileSeekReadSkip(t *testing.T) { + client := getClient(t) + + file, err := client.Open("/_test/mobydick.txt") + require.NoError(t, err) + + buf := make([]byte, len(testStr4)) + n, err := file.ReadAt(buf, testStr4Off) + assert.NoError(t, err) + assert.Equal(t, len(buf), n) + assert.Equal(t, testStr4, string(buf)) + br := file.blockReader + + off, err := file.Seek(testStr5Off, 0) + assert.NoError(t, err) + assert.EqualValues(t, testStr5Off, off) + + // Make sure we didn't reconnect. + assert.Equal(t, br, file.blockReader) + + buf = make([]byte, len(testStr5)) + n, err = io.ReadFull(file, buf) + assert.NoError(t, err) + assert.Equal(t, len(buf), n) + assert.Equal(t, testStr5, string(buf)) +} + func TestFileReadDir(t *testing.T) { client := getClient(t) diff --git a/internal/transfer/block_reader.go b/internal/transfer/block_reader.go index a1da0699..2537db71 100644 --- a/internal/transfer/block_reader.go +++ b/internal/transfer/block_reader.go @@ -120,18 +120,17 @@ func (br *BlockReader) Read(b []byte) (int, error) { // Skip attempts to discard bytes in the stream in order to skip forward. This // is an optimization for the case that the amount to skip is very small. It // returns an error if skip was not attempted at all (because the BlockReader -// isn't connected, or the offset is out of bounds or too far ahead) or the seek -// failed for some other reason. -func (br *BlockReader) Skip(off int64) error { +// isn't connected, or the resulting offset would be out of bounds or too far +// ahead) or the copy failed for some other reason. +func (br *BlockReader) Skip(n int64) error { blockSize := int64(br.Block.GetB().GetNumBytes()) - amountToSkip := off - br.Offset + resultingOffset := br.Offset + n - if br.stream == nil || off < 0 || off >= blockSize || - amountToSkip < 0 || amountToSkip > maxSkip { + if br.stream == nil || n <= 0 || n > maxSkip || resultingOffset >= blockSize { return errors.New("unable to skip") } - _, err := io.CopyN(io.Discard, br.stream, amountToSkip) + _, err := io.CopyN(io.Discard, br.stream, n) if err != nil { if err == io.EOF { err = io.ErrUnexpectedEOF From e10812d7cb98e13340ccae07fafa73cc53da6e72 Mon Sep 17 00:00:00 2001 From: Shan Huang Date: Tue, 18 Jul 2023 19:07:34 +0800 Subject: [PATCH 156/159] Optimization: BlockReader skip() return nil if size is 0 --- internal/transfer/block_reader.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/transfer/block_reader.go b/internal/transfer/block_reader.go index 2537db71..08d06ccb 100644 --- a/internal/transfer/block_reader.go +++ b/internal/transfer/block_reader.go @@ -123,10 +123,13 @@ func (br *BlockReader) Read(b []byte) (int, error) { // isn't connected, or the resulting offset would be out of bounds or too far // ahead) or the copy failed for some other reason. func (br *BlockReader) Skip(n int64) error { + if n == 0 { + return nil + } blockSize := int64(br.Block.GetB().GetNumBytes()) resultingOffset := br.Offset + n - if br.stream == nil || n <= 0 || n > maxSkip || resultingOffset >= blockSize { + if br.stream == nil || n < 0 || n > maxSkip || resultingOffset >= blockSize { return errors.New("unable to skip") } From 3d35b91944f8a0540b7ae9e531549358b16214c7 Mon Sep 17 00:00:00 2001 From: Colin Marc Date: Mon, 2 Dec 2024 10:19:53 +0100 Subject: [PATCH 157/159] docs: add note to readme asking for maintainers --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 154e511d..f65dd0d4 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,11 @@ HDFS for Go [![GoDoc](https://godoc.org/github.com/colinmarc/hdfs/web?status.svg)](https://godoc.org/github.com/colinmarc/hdfs/v2) [![build](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/colinmarc/hdfs/actions/workflows/tests.yml) +> [!IMPORTANT] +> Maintainer(s) wanted! If you or your company uses this in production (I don't +> anymore) and is interested in taking the project over, please get in touch via +> email. + This is a native golang client for hdfs. It connects directly to the namenode using the protocol buffers API. From 9571405a93cf9fdaf305a2c0e12dab4cb7c3719c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Zgrzendek?= <50668672+kzgrzendek@users.noreply.github.com> Date: Wed, 22 Jan 2025 15:20:19 +0100 Subject: [PATCH 158/159] Updated go version and crypto dependency to fix CVE-2024-453, CVE-2023-2453837, CVE-2023-24540 and CVE-2024-24790 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trivy report : home/jovyan/.local/bin/hdfs (gobinary) ====================================== Total: 4 (CRITICAL: 4) ┌─────────────────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬────────────────────────────────────────────────────────────┐ │ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │ ├─────────────────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼────────────────────────────────────────────────────────────┤ │ golang.org/x/crypto │ CVE-2024-45337 │ CRITICAL │ fixed │ v0.11.0 │ 0.31.0 │ golang.org/x/crypto/ssh: Misuse of │ │ │ │ │ │ │ │ ServerConfig.PublicKeyCallback may cause authorization │ │ │ │ │ │ │ │ bypass in golang.org/x/crypto │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-45337 │ ├─────────────────────┼────────────────┤ │ ├───────────────────┼─────────────────┼────────────────────────────────────────────────────────────┤ │ stdlib │ CVE-2023-24538 │ │ │ v1.17.13 │ 1.19.8, 1.20.3 │ golang: html/template: backticks not treated as string │ │ │ │ │ │ │ │ delimiters │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-24538 │ │ ├────────────────┤ │ │ ├─────────────────┼────────────────────────────────────────────────────────────┤ │ │ CVE-2023-24540 │ │ │ │ 1.19.9, 1.20.4 │ golang: html/template: improper handling of JavaScript │ │ │ │ │ │ │ │ whitespace │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-24540 │ │ ├────────────────┤ │ │ ├─────────────────┼────────────────────────────────────────────────────────────┤ │ │ CVE-2024-24790 │ │ │ │ 1.21.11, 1.22.4 │ golang: net/netip: Unexpected behavior from Is methods for │ │ │ │ │ │ │ │ IPv4-mapped IPv6 addresses │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-24790 │ └─────────────────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴────────────────────────────────────────────────────────────┘ tmp/gohdfs-v2.4.0-linux-amd64/hdfs (gobinary) ============================================= Total: 4 (CRITICAL: 4) ┌─────────────────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬────────────────────────────────────────────────────────────┐ │ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │ ├─────────────────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼────────────────────────────────────────────────────────────┤ │ golang.org/x/crypto │ CVE-2024-45337 │ CRITICAL │ fixed │ v0.11.0 │ 0.31.0 │ golang.org/x/crypto/ssh: Misuse of │ │ │ │ │ │ │ │ ServerConfig.PublicKeyCallback may cause authorization │ │ │ │ │ │ │ │ bypass in golang.org/x/crypto │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-45337 │ ├─────────────────────┼────────────────┤ │ ├───────────────────┼─────────────────┼────────────────────────────────────────────────────────────┤ │ stdlib │ CVE-2023-24538 │ │ │ v1.17.13 │ 1.19.8, 1.20.3 │ golang: html/template: backticks not treated as string │ │ │ │ │ │ │ │ delimiters │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-24538 │ │ ├────────────────┤ │ │ ├─────────────────┼────────────────────────────────────────────────────────────┤ │ │ CVE-2023-24540 │ │ │ │ 1.19.9, 1.20.4 │ golang: html/template: improper handling of JavaScript │ │ │ │ │ │ │ │ whitespace │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-24540 │ │ ├────────────────┤ │ │ ├─────────────────┼────────────────────────────────────────────────────────────┤ │ │ CVE-2024-24790 │ │ │ │ 1.21.11, 1.22.4 │ golang: net/netip: Unexpected behavior from Is methods for │ │ │ │ │ │ │ │ IPv4-mapped IPv6 addresses │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-24790 │ └─────────────────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴────────────────────────────────────────────────────────────┘ tmp/home/.local/bin/hdfs (gobinary) =================================== Total: 4 (CRITICAL: 4) ┌─────────────────────┬────────────────┬──────────┬────────┬───────────────────┬─────────────────┬────────────────────────────────────────────────────────────┐ │ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │ ├─────────────────────┼────────────────┼──────────┼────────┼───────────────────┼─────────────────┼────────────────────────────────────────────────────────────┤ │ golang.org/x/crypto │ CVE-2024-45337 │ CRITICAL │ fixed │ v0.11.0 │ 0.31.0 │ golang.org/x/crypto/ssh: Misuse of │ │ │ │ │ │ │ │ ServerConfig.PublicKeyCallback may cause authorization │ │ │ │ │ │ │ │ bypass in golang.org/x/crypto │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-45337 │ ├─────────────────────┼────────────────┤ │ ├───────────────────┼─────────────────┼────────────────────────────────────────────────────────────┤ │ stdlib │ CVE-2023-24538 │ │ │ v1.17.13 │ 1.19.8, 1.20.3 │ golang: html/template: backticks not treated as string │ │ │ │ │ │ │ │ delimiters │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-24538 │ │ ├────────────────┤ │ │ ├─────────────────┼────────────────────────────────────────────────────────────┤ │ │ CVE-2023-24540 │ │ │ │ 1.19.9, 1.20.4 │ golang: html/template: improper handling of JavaScript │ │ │ │ │ │ │ │ whitespace │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-24540 │ │ ├────────────────┤ │ │ ├─────────────────┼────────────────────────────────────────────────────────────┤ │ │ CVE-2024-24790 │ │ │ │ 1.21.11, 1.22.4 │ golang: net/netip: Unexpected behavior from Is methods for │ │ │ │ │ │ │ │ IPv4-mapped IPv6 addresses │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-24790 │ └─────────────────────┴────────────────┴──────────┴────────┴───────────────────┴─────────────────┴────────────────────────────────────────────────────────────┘ --- go.mod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 21409275..a8183ccc 100644 --- a/go.mod +++ b/go.mod @@ -16,9 +16,9 @@ require ( github.com/jcmturner/goidentity/v6 v6.0.1 // indirect github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/crypto v0.11.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/net v0.12.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) -go 1.17 +go 1.19.2 From ec3a27120c2e3b13352a2bba456c86faca2efb3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20ZGRZENDEK?= Date: Wed, 22 Jan 2025 15:39:00 +0100 Subject: [PATCH 159/159] Updated crypto and go versions to fix several CVEs --- go.mod | 2 +- go.sum | 18 ++++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index a8183ccc..bfaed6b0 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect golang.org/x/crypto v0.31.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.21.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 6e26eccd..9405e855 100644 --- a/go.sum +++ b/go.sum @@ -39,45 +39,35 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=