Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically scoped sources #93

Open
dylanratcliffe opened this issue Feb 28, 2023 · 0 comments
Open

Dynamically scoped sources #93

dylanratcliffe opened this issue Feb 28, 2023 · 0 comments

Comments

@dylanratcliffe
Copy link
Member

Up until now, sources have been pretty static in terms of the scopes that they could gather items from. However in the future this will no longer be the case, and we are going to need to build some new features to handle this. A good example is a theoretical Github source. In this source we might have a type called issue with a unique attribute value of 51. Now issue 51 isn't going to be unique globally, just within that repo, so the scope would need to be username.reponame or something similar.

The problem here is that new users/orgs and repos can be added all the time, so the current setup where the sources are enumerated at the beginning doesn't really make sense.

In this case we would need a source to be able to be dynamically scoped. When a users requests something in a specific scope, it would be up to the dynamically scoped source to check that it can check within the requested scope and return the correct thing. Similarly if a user makes a request with a wildcard scope (*) the dynamically scoped source would need to be able to enumerate all scopes that it knows about at the time, and search within all of them.

We are pretty close to this with the existing sdp.WILDCARD constant and Scopes() method, how it will need to be reviewed to make sure it makes sense or whether we need to add more detailed wildcard features, like having a source state that it supports the scope foo.bar.* for example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant