Is your feature request related to a problem? Please describe.
We want to stop using GH as a CDN. For that purpose, revanced/revanced-cdn-action is being constructed in order to upload our assets into Filecoin so they can be distributed on our manager.
Describe the solution you'd like
The following endpoints/methods should be implemented:
GET /cdn/{org}/{repo}/{version} → Returns asset information (Non-authenticated)
↳ Returns 200 if retrieved successufully
↳ Returns 404 if asset doesn't exist
POST /cdn/{org}/{repo}/{version} → Stores asset information (Authenticated)
↳ Returns 201 if created successfully
PUT /cdn/{org}/{repo}/{version} → Changes asset information (Authenticated)
↳ Returns 200 if changed successfully
DEL /cdn/{org}/{repo}/{version} → Deletes asset information (Authenticated)
↳ Returns 200 if deleted successfully
The response body for GET /cdn/{org}/{repo}/{version} should follow:
By the own nature of how data is stored and addressed using the IPFS+Filecoin pair the API will not allow for partial changes to stored data, so make sure to post the entire dataset to when doing PUT operations.
In the future we should consider implementing proper IPNS support for this operation although we do not believe mutable data on IPFS/Filecoin will be necessary any time soon.
Data will be stored on Redis using the following standard:
KEY {org}/{repo}/{version}
VALUE JSONObject
The stored information will be used to enrich other endpoints' outputs like /tools that can now include IPFS adresses like:
Is your feature request related to a problem? Please describe.
We want to stop using GH as a CDN. For that purpose, revanced/revanced-cdn-action is being constructed in order to upload our assets into Filecoin so they can be distributed on our manager.
Describe the solution you'd like
The following endpoints/methods should be implemented:
The response body for
GET /cdn/{org}/{repo}/{version}
should follow:The request body for
POST /cdn/{org}/{repo}/{version}
and should follow:The request body for
PUT /cdn/{org}/{repo}/{version}
should follow:By the own nature of how data is stored and addressed using the IPFS+Filecoin pair the API will not allow for partial changes to stored data, so make sure to post the entire dataset to when doing
PUT
operations.In the future we should consider implementing proper IPNS support for this operation although we do not believe mutable data on IPFS/Filecoin will be necessary any time soon.
Data will be stored on Redis using the following standard:
The stored information will be used to enrich other endpoints' outputs like
/tools
that can now include IPFS adresses like:Describe alternatives you've considered None.
Additional context None.