Wrap the rest of the object modules in elixir
This commit is contained in:
@@ -6,16 +6,12 @@
|
||||
|
||||
-include("geef_records.hrl").
|
||||
|
||||
-export([lookup/2, id/1, size/1, content/1]).
|
||||
-export([lookup/2, size/1, content/1]).
|
||||
|
||||
-spec lookup(pid(), geef_oid() | iolist()) -> geef_object().
|
||||
lookup(Repo, Id) ->
|
||||
geef_obj:lookup(Repo, Id, blob).
|
||||
|
||||
-spec id(geef_object()) -> geef_oid().
|
||||
id(Obj = #geef_object{type=blob}) ->
|
||||
geef_obj:id(Obj).
|
||||
|
||||
size(#geef_object{type=blob, handle=Handle}) ->
|
||||
geef_nif:blob_size(Handle).
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-module(geef_commit).
|
||||
-export([tree_id/1, tree/1, id/1, lookup/2]).
|
||||
-export([tree_id/1, tree/1, lookup/2]).
|
||||
|
||||
-include("geef_records.hrl").
|
||||
|
||||
@@ -18,7 +18,4 @@ tree(#geef_object{type=commit,handle=Handle}) ->
|
||||
|
||||
-spec lookup(pid(), geef_oid() | iolist()) -> geef_object().
|
||||
lookup(Repo, Id) ->
|
||||
geef_object:lookup(Repo, Id, commit).
|
||||
|
||||
id(Obj = #geef_object{type=commit}) ->
|
||||
geef_object:id(Obj).
|
||||
geef_obj:lookup(Repo, Id, commit).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
-endif.
|
||||
|
||||
-export([get/2, id/1, lookup/2]).
|
||||
-export([get/2, lookup/2]).
|
||||
|
||||
-include("geef_records.hrl").
|
||||
|
||||
@@ -17,10 +17,6 @@ get(#geef_object{type=tree,handle=Handle}, Path) ->
|
||||
Other
|
||||
end.
|
||||
|
||||
-spec id(geef_object()) -> {ok, geef_oid()} | {error, term()}.
|
||||
id(Obj = #geef_object{type=tree}) ->
|
||||
geef_object:id(Obj).
|
||||
|
||||
-spec lookup(pid(), geef_oid() | iolist()) -> {ok, geef_object()} | {error, term()}.
|
||||
lookup(Repo, Id) ->
|
||||
geef_obj:lookup(Repo, Id, tree).
|
||||
|
||||
Reference in New Issue
Block a user