You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ii...@apache.org on 2020/01/23 14:01:04 UTC

[couchdb-thrift-protocol] branch master updated (1c86c26 -> 217438a)

This is an automated email from the ASF dual-hosted git repository.

iilyak pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-thrift-protocol.git.


    from 1c86c26  v0.1.3
     new b90dacd  Export encode_struct and decode_struct functions
     new 0cf27dc  Merge pull request #1 from iilyak/export-struct-function-for-binary
     new 6a6df1e  Remove deprecated field
     new eded491  v0.1.4
     new 6395e27  Add `thrift_protocol:{decode_struct/2, encode_struct/2}`
     new 9f75747  Update .gitignore
     new 217438a  v0.1.5

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                      |  1 +
 src/thrift_protocol.app.src     |  3 +--
 src/thrift_protocol.erl         | 16 +++++++++++++++-
 src/thrift_protocol_binary.erl  |  2 +-
 src/thrift_protocol_compact.erl |  2 +-
 5 files changed, 19 insertions(+), 5 deletions(-)


[couchdb-thrift-protocol] 01/07: Export encode_struct and decode_struct functions

Posted by ii...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

iilyak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-thrift-protocol.git

commit b90dacd2968a14a0cd925cd644204cf97dcb3212
Author: ILYA Khlopotov <ii...@apache.org>
AuthorDate: Wed Jan 15 07:47:33 2020 -0800

    Export encode_struct and decode_struct functions
---
 src/thrift_protocol_binary.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/thrift_protocol_binary.erl b/src/thrift_protocol_binary.erl
index 301a9f1..ec55680 100644
--- a/src/thrift_protocol_binary.erl
+++ b/src/thrift_protocol_binary.erl
@@ -3,7 +3,7 @@
 
 -include("thrift_protocol.hrl").
 
--export([encode_message/1, decode_message/1]).
+-export([encode_message/1, decode_message/1, encode_struct/1, decode_struct/2]).
 
 -define(VERSION, 1).
 


[couchdb-thrift-protocol] 05/07: Add `thrift_protocol:{decode_struct/2, encode_struct/2}`

Posted by ii...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

iilyak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-thrift-protocol.git

commit 6395e2724fe2e71b03c60960e9703100d4fb456c
Author: Takeru Ohta <ph...@gmail.com>
AuthorDate: Sat Jan 18 13:29:40 2020 +0900

    Add `thrift_protocol:{decode_struct/2, encode_struct/2}`
---
 src/thrift_protocol.erl         | 16 +++++++++++++++-
 src/thrift_protocol_compact.erl |  2 +-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/thrift_protocol.erl b/src/thrift_protocol.erl
index 4c80023..f9ca1ef 100644
--- a/src/thrift_protocol.erl
+++ b/src/thrift_protocol.erl
@@ -33,7 +33,7 @@
 
 -include("thrift_protocol.hrl").
 
--export([encode_message/2, decode_message/2]).
+-export([encode_message/2, decode_message/2, encode_struct/2, decode_struct/2]).
 -export([data_type/1]).
 
 -export_type([message/0, message_type/0]).
@@ -114,6 +114,13 @@ encode_message(Message, binary) ->
 encode_message(Message, compact) ->
     thrift_protocol_compact:encode_message(Message).
 
+%% @doc Encodes `Struct'.
+-spec encode_struct(struct(), Format :: format()) -> iodata().
+encode_struct(Struct, binary) ->
+    thrift_protocol_binary:encode_struct(Struct);
+encode_struct(Struct, compact) ->
+    thrift_protocol_compact:encode_struct(Struct).
+
 %% @doc Decodes a message from the given binary.
 -spec decode_message(binary(), Format :: format()) -> {message(), binary()}.
 decode_message(Bin, binary) ->
@@ -121,6 +128,13 @@ decode_message(Bin, binary) ->
 decode_message(Bin, compact) ->
     thrift_protocol_compact:decode_message(Bin).
 
+%% @doc Decodes a struct from the given binary.
+-spec decode_struct(binary(), Format :: format()) -> {struct(), binary()}.
+decode_struct(Bin, binary) ->
+    thrift_protocol_binary:decode_struct(Bin, #{});
+decode_struct(Bin, compact) ->
+    thrift_protocol_compact:decode_struct(Bin, 0, #{}).
+
 %% @doc Returns the type of `Data'.
 -spec data_type(Data :: data()) -> data_type().
 data_type(X) when is_boolean(X) ->
diff --git a/src/thrift_protocol_compact.erl b/src/thrift_protocol_compact.erl
index 4d12e81..ca44a05 100644
--- a/src/thrift_protocol_compact.erl
+++ b/src/thrift_protocol_compact.erl
@@ -11,7 +11,7 @@
 
 -include("thrift_protocol.hrl").
 
--export([decode_message/1, encode_message/1]).
+-export([decode_message/1, encode_message/1, encode_struct/1, decode_struct/3]).
 
 -define(PROTOCOL_ID, 16#82).
 -define(VERSION, 1).


[couchdb-thrift-protocol] 02/07: Merge pull request #1 from iilyak/export-struct-function-for-binary

Posted by ii...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

iilyak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-thrift-protocol.git

commit 0cf27dc6a1076b46975dffec71941f993bde3c8d
Merge: 1c86c26 b90dacd
Author: Takeru Ohta <ph...@gmail.com>
AuthorDate: Sat Jan 18 13:16:11 2020 +0900

    Merge pull request #1 from iilyak/export-struct-function-for-binary
    
    Export encode_struct and decode_struct functions

 src/thrift_protocol_binary.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[couchdb-thrift-protocol] 03/07: Remove deprecated field

Posted by ii...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

iilyak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-thrift-protocol.git

commit 6a6df1ea58d1a78750d20e6e9c2bd6da115c8ef5
Author: Takeru Ohta <ph...@gmail.com>
AuthorDate: Sat Jan 18 13:20:20 2020 +0900

    Remove deprecated field
---
 src/thrift_protocol.app.src | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/thrift_protocol.app.src b/src/thrift_protocol.app.src
index 1c7896a..2e4ef67 100644
--- a/src/thrift_protocol.app.src
+++ b/src/thrift_protocol.app.src
@@ -5,6 +5,5 @@
               {applications,[kernel,stdlib]},
               {env,[]},
               {modules,[]},
-              {maintainers,["Takeru Ohta"]},
               {licenses,["MIT"]},
               {links,[{"GitHub","https://github.com/sile/thrift_protocol"}]}]}.


[couchdb-thrift-protocol] 04/07: v0.1.4

Posted by ii...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

iilyak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-thrift-protocol.git

commit eded4916f0091362fe011a397091dc1a335b9e14
Author: Takeru Ohta <ph...@gmail.com>
AuthorDate: Sat Jan 18 13:20:41 2020 +0900

    v0.1.4
---
 src/thrift_protocol.app.src | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/thrift_protocol.app.src b/src/thrift_protocol.app.src
index 2e4ef67..114dd06 100644
--- a/src/thrift_protocol.app.src
+++ b/src/thrift_protocol.app.src
@@ -1,6 +1,6 @@
 {application,thrift_protocol,
              [{description,"An Erlang implementation of Thrift protocol."},
-              {vsn,"0.1.3"},
+              {vsn,"0.1.4"},
               {registered,[]},
               {applications,[kernel,stdlib]},
               {env,[]},


[couchdb-thrift-protocol] 06/07: Update .gitignore

Posted by ii...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

iilyak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-thrift-protocol.git

commit 9f75747fd482187b271502f1036d060b05e83aa0
Author: Takeru Ohta <ph...@gmail.com>
AuthorDate: Sat Jan 18 13:30:09 2020 +0900

    Update .gitignore
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 40ca652..41889bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@ _build
 .idea
 *.iml
 rebar3.crashdump
+doc/
\ No newline at end of file


[couchdb-thrift-protocol] 07/07: v0.1.5

Posted by ii...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

iilyak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-thrift-protocol.git

commit 217438a913e7406848f92a8f742bf5c58bcf88bf
Author: Takeru Ohta <ph...@gmail.com>
AuthorDate: Sat Jan 18 13:37:22 2020 +0900

    v0.1.5
---
 src/thrift_protocol.app.src | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/thrift_protocol.app.src b/src/thrift_protocol.app.src
index 114dd06..1c532b6 100644
--- a/src/thrift_protocol.app.src
+++ b/src/thrift_protocol.app.src
@@ -1,6 +1,6 @@
 {application,thrift_protocol,
              [{description,"An Erlang implementation of Thrift protocol."},
-              {vsn,"0.1.4"},
+              {vsn,"0.1.5"},
               {registered,[]},
               {applications,[kernel,stdlib]},
               {env,[]},