Behaviours: rebar_resource_v2.
package() = {pkg, binary(), binary(), binary(), binary(), rebar_hex_repos:repo()}
| download/4 | Download the given pkg. |
| download/5 | Download the given pkg. |
| format_error/1 | |
| init/2 | |
| lock/2 | |
| make_vsn/2 | Implementation of rebar_resource make_vsn callback. |
| needs_update/2 | Return true if the stored version of the pkg is older than the current version. |
download(TmpDir, AppInfo, State, ResourceState) -> Res
TmpDir = file:name()AppInfo = rebar_app_info:t()ResourceState = rebar_resource_v2:resource_state()State = rebar_state:t()Res = ok | {error, term()}
Download the given pkg.
download(TmpDir, Pkg, State, ResourceState, UpdateETag) -> Res
TmpDir = file:name()Pkg = package()State = rebar_state:t()ResourceState = rebar_resource_v2:resource_state()UpdateETag = boolean()Res = ok | {error, term()} | {unexpected_hash, string(), integer(), integer()} | {fetch_fail, binary(), binary()}
Download the given pkg. The etag belonging to the pkg file will be updated only if the UpdateEtag is true and the ETag returned from the hexpm server is different.
format_error(X1) -> any()
init(Type::atom(), State::rebar_state:t()) -> {ok, rebar_resource_v2:resource()}
lock(AppInfo, ResourceState) -> Res
AppInfo = rebar_app_info:t()ResourceState = rebar_resource_v2:resource_state()Res = {atom(), string(), any(), binary(), binary()}
make_vsn(AppInfo, ResourceState) -> Res
AppInfo = rebar_app_info:t()ResourceState = rebar_resource_v2:resource_state()Res = {error, string()}
Implementation of rebar_resource make_vsn callback. Returns {error, string()} as this operation is not supported for pkg sources.
needs_update(AppInfo, ResourceState) -> Res
AppInfo = rebar_app_info:t()ResourceState = rebar_resource_v2:resource_state()Res = boolean()
Return true if the stored version of the pkg is older than the current version.
Generated by EDoc