Module rebar_pkg_resource

Behaviours: rebar_resource_v2.

Data Types

package()

package() = {pkg, binary(), binary(), binary(), binary(), rebar_hex_repos:repo()}

Function Index

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.

Function Details

download/4

download(TmpDir, AppInfo, State, ResourceState) -> Res

Download the given pkg.

download/5

download(TmpDir, Pkg, State, ResourceState, UpdateETag) -> Res

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/1

format_error(X1) -> any()

init/2

init(Type::atom(), State::rebar_state:t()) -> {ok, rebar_resource_v2:resource()}

lock/2

lock(AppInfo, ResourceState) -> Res

make_vsn/2

make_vsn(AppInfo, ResourceState) -> Res

Implementation of rebar_resource make_vsn callback. Returns {error, string()} as this operation is not supported for pkg sources.

needs_update/2

needs_update(AppInfo, ResourceState) -> Res

Return true if the stored version of the pkg is older than the current version.


Generated by EDoc