-
Notifications
You must be signed in to change notification settings - Fork 13
core.Registry
Narciso edited this page Mar 17, 2020
·
1 revision
function used to initialize internal registry. It :
- Defaults all request to have header
'Content-Type' : 'application/vnd.schemaregistry.v1+json' - Builds ( Polyfill ) endpoint builders
- byId
- allVersions
- byVersion
Registry.init = function(){
// logic
};function that build uri to fetch a schema by id
Registry.endpoints.byId = function(id, name, version){
return 'string-with-${id}'
};function that build uri to fetch all version for a schema
Registry.endpoints.allVersions = function(id, name, version){
return 'string-with-${name}/versions'
};function that build uri to fetch a schema by version
Registry.endpoints.byVersion = function(id, name, version){
return 'string-with-${version}'
};function use to check if we can touch schema registry
Registry.alive = function(){
return new Promise(function(resolve, reject){
// logic
});
};function use to fetch by id
Registry.fetchById = function(){
return new Promise(function(resolve, reject){
// logic
});
};function use to fetch all versions
Registry.fetchVersions = function(){
return new Promise(function(resolve, reject){
// logic
});
};function use to fetch by version
Registry.fetchByVersion = function(){
return new Promise(function(resolve, reject){
// logic
});
};