@@ -23,8 +23,8 @@ import kotlin.io.path.createDirectories
2323 * The repository storing the configuration for the API.
2424 *
2525 * @property organization The API backends organization name where the repositories are.
26- * @property patches The source of the patches.
27- * @property manager The source of the manager.
26+ * @property patches The configuration for patches.
27+ * @property manager The configuration for the manager.
2828 * @property contributorsRepositoryNames The friendly name of repos mapped to the repository names to get contributors from.
2929 * @property backendServiceName The name of the backend service to use for the repositories, contributors, etc.
3030 * @property apiVersion The version to use for the API.
@@ -38,8 +38,8 @@ import kotlin.io.path.createDirectories
3838@Serializable
3939internal class ConfigurationRepository (
4040 val organization : String ,
41- val patches : SignedAssetConfiguration ,
42- val manager : AssetConfiguration ,
41+ val patches : PatchesConfiguration ,
42+ val manager : ManagerConfiguration ,
4343 @SerialName(" contributors-repositories" )
4444 val contributorsRepositoryNames : Map <String , String >,
4545 @SerialName(" backend-service-name" )
@@ -65,22 +65,20 @@ internal class ConfigurationRepository(
6565 }
6666
6767 /* *
68- * Am asset configuration whose asset is signed .
68+ * A configuration for [PatchesService] .
6969 *
70- * [PatchesService] for example uses [BackendRepository] to get assets from its releases.
71- * A release contains multiple assets.
72- *
73- * This configuration is used in [ConfigurationRepository]
74- * to determine which release assets from repositories to get and to verify them.
75- *
76- * @property repository The repository in which releases are made to get an asset.
77- * @property assetRegex The regex matching the asset name.
78- * @property signatureAssetRegex The regex matching the signature asset name to verify the asset.
79- * @property publicKeyFile The public key file to verify the signature of the asset.
80- * @property publicKeyId The ID of the public key to verify the signature of the asset.
70+ * @property repository The patches repository.
71+ * @property assetRegex The regex matching the patches asset name
72+ * in releases from the patches repository.
73+ * @property signatureAssetRegex The regex matching the patches signature asset name
74+ * in releases from the patches repository.
75+ * @property publicKeyFile The public key file to verify the signature of the patches asset
76+ * in releases from the patches repository.
77+ * @property publicKeyId The ID of the public key to verify the signature of the patches asset
78+ * in releases from the patches repository.
8179 */
8280 @Serializable
83- internal class SignedAssetConfiguration (
81+ internal class PatchesConfiguration (
8482 val repository : String ,
8583 @Serializable(with = RegexSerializer ::class )
8684 @SerialName(" asset-regex" )
@@ -96,23 +94,26 @@ internal class ConfigurationRepository(
9694 )
9795
9896 /* *
99- * Am asset configuration.
100- *
101- * [ManagerService] for example uses [BackendRepository] to get assets from its releases.
102- * A release contains multiple assets.
103- *
104- * This configuration is used in [ConfigurationRepository]
105- * to determine which release assets from repositories to get and to verify them.
106- *
107- * @property repository The repository in which releases are made to get an asset.
108- * @property assetRegex The regex matching the asset name.
97+ * A configuration for [ManagerService].
98+
99+ * @property repository The manager repository.
100+ * @property assetRegex The regex matching the manager asset name
101+ * in releases from the manager repository.
102+ * @property downloadersRepository The manager downloaders repository.
103+ * @property downloadersAssetRegex The regex matching the manager downloaders asset name
104+ * in releases from the manager downloaders repository.
109105 */
110106 @Serializable
111- internal class AssetConfiguration (
107+ internal class ManagerConfiguration (
112108 val repository : String ,
113109 @Serializable(with = RegexSerializer ::class )
114110 @SerialName(" asset-regex" )
115111 val assetRegex : Regex ,
112+ @SerialName(" downloaders-repository" )
113+ val downloadersRepository : String ,
114+ @Serializable(with = RegexSerializer ::class )
115+ @SerialName(" downloaders-asset-regex" )
116+ val downloadersAssetRegex : Regex ,
116117 )
117118}
118119
0 commit comments