Add a basic blob wrapper

This commit is contained in:
Carlos Martín Nieto
2013-03-02 12:42:47 +01:00
parent 94c5ece71c
commit d0bdfecf4b

15
src/geef_blob.erl Normal file
View File

@@ -0,0 +1,15 @@
-module(geef_blob).
-include("geef_records.hrl").
-export([lookup/2, id/1]).
-spec lookup(repo(), oid() | iolist()) -> object().
lookup(Repo, Id) ->
{ok, Obj = #object{type=blob}} = geef_object:lookup(Repo, Id),
Obj.
-spec id(object()) -> oid().
id(Obj = #object{type=blob}) ->
geef_object:id(Obj).