Search documentation of macula

# macula_registry_server (macula v0.44.2)

View Source

Macula Registry Server

Main API server for package registry operations: - Package publishing with signature verification - Package fetching with integrity checks - Package queries and search - DHT integration for distributed discovery

# Summary

## Functions

fetch_package(Name)

Fetch the latest version of a package

fetch_package(Name, Version)

Fetch a specific version of a package

get_package_info(Name)

Get detailed info about a package

list_packages()

List all packages in the registry

publish_package(Name, Version, Manifest, BeamArchive, PrivateKey)

Publish a package to the registry

publish_package(Name, Version, Manifest, BeamArchive, Signature, PublicKey)

Publish a package with pre-computed signature

search_packages(Pattern)

Search packages by pattern

start_link(Config)

Start the registry server

verify_package(ManifestBin, BeamArchive, Signature, PublicKey)

Verify package signature

# Functions

# fetch_package(Name)

    -spec fetch_package(Name :: binary()) -> {ok, map()} | {error, not_found}.

Fetch the latest version of a package

# fetch_package(Name, Version)

    -spec fetch_package(Name :: binary(), Version :: binary()) -> {ok, map()} | {error, not_found}.

Fetch a specific version of a package

# get_package_info(Name)

    -spec get_package_info(Name :: binary()) ->
                              {ok, #{versions := [binary()], latest := binary()}} | {error, not_found}.

Get detailed info about a package

# list_packages()

    -spec list_packages() -> [map()].

List all packages in the registry

# publish_package(Name, Version, Manifest, BeamArchive, PrivateKey)

    -spec publish_package(Name :: binary(),
                          Version :: binary(),
                          Manifest :: map(),
                          BeamArchive :: binary(),
                          PrivateKey :: binary()) ->
                             {ok, #{package_name := binary(), version := binary(), checksum := binary()}} |
                             {error, term()}.

Publish a package to the registry

# publish_package(Name, Version, Manifest, BeamArchive, Signature, PublicKey)

    -spec publish_package(Name :: binary(),
                          Version :: binary(),
                          Manifest :: map(),
                          BeamArchive :: binary(),
                          Signature :: binary(),
                          PublicKey :: binary()) ->
                             {ok, #{package_name := binary(), version := binary(), checksum := binary()}} |
                             {error, term()}.

Publish a package with pre-computed signature

# search_packages(Pattern)

    -spec search_packages(Pattern :: binary()) -> [map()].

Search packages by pattern

# start_link(Config)

    -spec start_link(Config :: map()) -> {ok, pid()} | {error, term()}.

Start the registry server

# verify_package(ManifestBin, BeamArchive, Signature, PublicKey)

    -spec verify_package(ManifestBin :: binary(),
                         BeamArchive :: binary(),
                         Signature :: binary(),
                         PublicKey :: binary()) ->
                            ok | {error, term()}.

Verify package signature