add boilerplate for verbs data interface

This commit is contained in:
Jimmy Zelinskie 2016-08-31 15:18:01 -04:00
parent 2e5a94bc0b
commit c35413d4f6
2 changed files with 21 additions and 2 deletions

18
data/interfaces/verbs.py Normal file
View file

@ -0,0 +1,18 @@
class VerbsDataInterface(object):
"""
Interface that represents all data store interactions required by the registry's custom HTTP
verbs.
"""
@classmethod
def repository_is_public(cls, namespace_name, repo_name):
"""
Returns a boolean for whether the repository with the given name and namespace is public.
"""
raise NotImplementedError()
class PreOCIModel(VerbsDataInterface):
"""
PreOCIModel implements the data model for the registry's custom HTTP verbs using a database schema
before it was changed to support the OCI specification.
"""