Superls.Store (superls v1.2.3)

View Source

Store access facilities.

Summary

Functions

Create a merged_index from media_dir, store and passwd.

the cache path

Returns the store cache path

Returns the digest from a vol_path

Get the indexes list from store and password.

Get the stores list.

Maybe creates and returns the store cache path

Get the volume_path list from store and password.

Types

store()

@type store() :: String.t()

Functions

archive(media_dir, store_name \\ default_store(), passwd \\ "")

@spec archive(
  media_dir :: Superls.MergedIndex.volume(),
  store :: store(),
  passwd :: String.t()
) ::
  no_return()

Create a merged_index from media_dir, store and passwd.

cache_path()

@spec cache_path() :: path :: Path.t()

the cache path

cache_store_path(store)

@spec cache_store_path(store()) :: path :: Path.t()

Returns the store cache path

check_password(store, passwd)

@spec check_password(store(), passwd :: String.t()) :: passwd :: String.t()

verify passwd.

encode_digest_uri(vol_path)

@spec encode_digest_uri(vol_path :: Superls.MergedIndex.volume()) ::
  digest :: String.t()

Returns the digest from a vol_path

get_merged_index_from_store(store, passwd \\ "")

@spec get_merged_index_from_store(store :: store(), String.t()) ::
  merged_index :: Superls.MergedIndex.t()

get merged_index from store.

list_indexes(store \\ default_store(), passwd \\ "")

@spec list_indexes(store :: store(), password :: String.t()) :: indexes :: [tuple()]

Get the indexes list from store and password.

list_stores()

@spec list_stores() :: stores :: [Path.t()]

Get the stores list.

maybe_create_cache_path()

@spec maybe_create_cache_path() :: Path.t()

maybe_create_dir(store)

@spec maybe_create_dir(store()) :: store_path :: Path.t()

Maybe creates and returns the store cache path

volume_path_from_digests(store, passwd)

@spec volume_path_from_digests(String.t(), String.t()) ::
  volume_path :: [{Path.t(), String.t()}]

Get the volume_path list from store and password.