Design module registration flow
chamilad opened this issue · comments
This should be for an internal organization, so the oauth2 browser flow that the public registry has doesn't need to be replicated.
Initially, this could be a config file section, where the oauth2 credentials are provided to access the github/gitlab organization. When the registry starts up, based on a flag, it can lookup the repositories and insert or update them in the database.
This task should only focus on the initial module registration flow. The publishing of new releases isn't part of the scope.
The database table(s) could look like the following.
modules
- id = autogen
- name = <base_url/repo_name>
- source_url = github url
- published = the date the module was added to the registry first
- visible = ability to hide from use
- enabled = ability to avoid users from using the module
- icon = icon for the module
- provider = provider the module works with
primary_key name
module_versions
- id = autogen
- module_name = modules.name
- version_number = tag
- published = the date the tag was published
- enabled = ability to avoid users from using this specific version
- source = source url of the specific tag
- latest = bool
- documentation = doc content source (todo: figure out how to store these)
composite key (module_name, version_number)