Loading README.md +7 −2 Original line number Diff line number Diff line # Kinetic-Go [](https://travis-ci.org/Kinetic/kinetic-go) [](https://godoc.org/github.com/Kinetic/kinetic-go) ## Introduction Loading @@ -8,7 +9,7 @@ Kinetic client library in Golang. ## Kinetic Protocol Version This client is using version `3.0.6` from [Kinetic-Protocol](https://github.com/Kinetic/kinetic-protocol) This client is using version `3.0.7` from [Kinetic-Protocol](https://github.com/Kinetic/kinetic-protocol) ## Installation Loading @@ -16,7 +17,11 @@ Install with following command: go get github.com/Kinetic/kinetic-go ## Usage ## Documents Visit [https://godoc.org/github.com/Kinetic/kinetic-go](https://godoc.org/github.com/Kinetic/kinetic-go) to see API documents. ## Usage Examples Refer to file `kinetic_test.go` and `connection_test.go` for some examples. Loading kinetic.go +22 −16 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ import ( "io" "os" "github.com/Sirupsen/logrus" kproto "github.com/Kinetic/kinetic-go/proto" "github.com/Sirupsen/logrus" ) // Create logger for Kinetic package Loading Loading @@ -345,16 +345,18 @@ const ( ALGO_SHA1 Algorithm = iota ALGO_SHA2 Algorithm = iota ALGO_SHA3 Algorithm = iota ALGO_CRC32 Algorithm = iota ALGO_CRC32C Algorithm = iota ALGO_CRC64 Algorithm = iota ALGO_CRC32 Algorithm = iota ) var strAlgorithm = map[Algorithm]string{ ALGO_SHA1: "ALGO_SHA1", ALGO_SHA2: "ALGO_SHA2", ALGO_SHA3: "ALGO_SHA3", ALGO_CRC32: "ALGO_CRC32", ALGO_CRC32C: "ALGO_CRC32C", ALGO_CRC64: "ALGO_CRC64", ALGO_CRC32: "ALGO_CRC32", } func (a Algorithm) String() string { Loading @@ -374,10 +376,12 @@ func convertAlgoToProto(a Algorithm) kproto.Command_Algorithm { ret = kproto.Command_SHA2 case ALGO_SHA3: ret = kproto.Command_SHA3 case ALGO_CRC32: ret = kproto.Command_CRC32 case ALGO_CRC32C: ret = kproto.Command_CRC32C case ALGO_CRC64: ret = kproto.Command_CRC64 case ALGO_CRC32: ret = kproto.Command_CRC32 } return ret } Loading @@ -391,10 +395,12 @@ func convertAlgoFromProto(a kproto.Command_Algorithm) Algorithm { ret = ALGO_SHA2 case kproto.Command_SHA3: ret = ALGO_SHA3 case kproto.Command_CRC32: ret = ALGO_CRC32 case kproto.Command_CRC32C: ret = ALGO_CRC32C case kproto.Command_CRC64: ret = ALGO_CRC64 case kproto.Command_CRC32: ret = ALGO_CRC32 } return ret } Loading proto/kinetic.pb.go +188 −185 File changed.Preview size limit exceeded, changes collapsed. Show changes proto/kinetic.proto +5 −4 Original line number Diff line number Diff line /** * Copyright 2013-2016 Seagate Technology LLC. * Copyright 2013-2015 Seagate Technology LLC. * * 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 Loading @@ -22,7 +22,7 @@ option java_outer_classname = "Kinetic"; // the protocol version number by building this message // and then reading the value. message Local { optional string protocolVersion = 1 [default = "3.0.6"]; optional string protocolVersion = 1 [default = "3.0.7"]; } // THe message is an authorization and command bytes. Loading Loading @@ -678,8 +678,9 @@ message Command { SHA1 = 1; // see NIST SHA2 = 2; // see NIST SHA3 = 3; // see NIST. The length of the tag determined the length of the hash CRC32 = 4; // the CRC32 is the standard Ethernet CRC32. See IEEE CRC64 = 5; // The CRC is ... CRC32C = 4; CRC64 = 5; CRC32 = 6; // 7-99 are reserved. // 100-inf are private algorithms. } Loading Loading
README.md +7 −2 Original line number Diff line number Diff line # Kinetic-Go [](https://travis-ci.org/Kinetic/kinetic-go) [](https://godoc.org/github.com/Kinetic/kinetic-go) ## Introduction Loading @@ -8,7 +9,7 @@ Kinetic client library in Golang. ## Kinetic Protocol Version This client is using version `3.0.6` from [Kinetic-Protocol](https://github.com/Kinetic/kinetic-protocol) This client is using version `3.0.7` from [Kinetic-Protocol](https://github.com/Kinetic/kinetic-protocol) ## Installation Loading @@ -16,7 +17,11 @@ Install with following command: go get github.com/Kinetic/kinetic-go ## Usage ## Documents Visit [https://godoc.org/github.com/Kinetic/kinetic-go](https://godoc.org/github.com/Kinetic/kinetic-go) to see API documents. ## Usage Examples Refer to file `kinetic_test.go` and `connection_test.go` for some examples. Loading
kinetic.go +22 −16 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ import ( "io" "os" "github.com/Sirupsen/logrus" kproto "github.com/Kinetic/kinetic-go/proto" "github.com/Sirupsen/logrus" ) // Create logger for Kinetic package Loading Loading @@ -345,16 +345,18 @@ const ( ALGO_SHA1 Algorithm = iota ALGO_SHA2 Algorithm = iota ALGO_SHA3 Algorithm = iota ALGO_CRC32 Algorithm = iota ALGO_CRC32C Algorithm = iota ALGO_CRC64 Algorithm = iota ALGO_CRC32 Algorithm = iota ) var strAlgorithm = map[Algorithm]string{ ALGO_SHA1: "ALGO_SHA1", ALGO_SHA2: "ALGO_SHA2", ALGO_SHA3: "ALGO_SHA3", ALGO_CRC32: "ALGO_CRC32", ALGO_CRC32C: "ALGO_CRC32C", ALGO_CRC64: "ALGO_CRC64", ALGO_CRC32: "ALGO_CRC32", } func (a Algorithm) String() string { Loading @@ -374,10 +376,12 @@ func convertAlgoToProto(a Algorithm) kproto.Command_Algorithm { ret = kproto.Command_SHA2 case ALGO_SHA3: ret = kproto.Command_SHA3 case ALGO_CRC32: ret = kproto.Command_CRC32 case ALGO_CRC32C: ret = kproto.Command_CRC32C case ALGO_CRC64: ret = kproto.Command_CRC64 case ALGO_CRC32: ret = kproto.Command_CRC32 } return ret } Loading @@ -391,10 +395,12 @@ func convertAlgoFromProto(a kproto.Command_Algorithm) Algorithm { ret = ALGO_SHA2 case kproto.Command_SHA3: ret = ALGO_SHA3 case kproto.Command_CRC32: ret = ALGO_CRC32 case kproto.Command_CRC32C: ret = ALGO_CRC32C case kproto.Command_CRC64: ret = ALGO_CRC64 case kproto.Command_CRC32: ret = ALGO_CRC32 } return ret } Loading
proto/kinetic.pb.go +188 −185 File changed.Preview size limit exceeded, changes collapsed. Show changes
proto/kinetic.proto +5 −4 Original line number Diff line number Diff line /** * Copyright 2013-2016 Seagate Technology LLC. * Copyright 2013-2015 Seagate Technology LLC. * * 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 Loading @@ -22,7 +22,7 @@ option java_outer_classname = "Kinetic"; // the protocol version number by building this message // and then reading the value. message Local { optional string protocolVersion = 1 [default = "3.0.6"]; optional string protocolVersion = 1 [default = "3.0.7"]; } // THe message is an authorization and command bytes. Loading Loading @@ -678,8 +678,9 @@ message Command { SHA1 = 1; // see NIST SHA2 = 2; // see NIST SHA3 = 3; // see NIST. The length of the tag determined the length of the hash CRC32 = 4; // the CRC32 is the standard Ethernet CRC32. See IEEE CRC64 = 5; // The CRC is ... CRC32C = 4; CRC64 = 5; CRC32 = 6; // 7-99 are reserved. // 100-inf are private algorithms. } Loading