-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
151 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
Twitcher interfaces to allow alternative implementions in adapters. | ||
""" | ||
from typing import Dict, List | ||
|
||
|
||
class OWSSecurityInterface(object): | ||
def verify_request(self, request) -> bool: | ||
"""Verify that the service request is allowed.""" | ||
raise NotImplementedError | ||
|
||
|
||
class OWSRegistryInterface(object): | ||
def register_service(self, name: str, url: str, *args, **kwargs) -> Dict: | ||
"""Register an OWS service with given ``name`` and ``url``.""" | ||
raise NotImplementedError | ||
|
||
def unregister_service(self, name: str) -> bool: | ||
"""Unregister an OWS service with given ``name``.""" | ||
raise NotImplementedError | ||
|
||
def get_service_by_name(self, name: str) -> Dict: | ||
"""Lookup OWS service with given ``name``.""" | ||
raise NotImplementedError | ||
|
||
def get_service_by_url(self, url: str) -> Dict: | ||
"""Lookup OWS service with given ``url``.""" | ||
raise NotImplementedError | ||
|
||
def list_services(self) -> List: | ||
"""List all registered OWS services.""" | ||
raise NotImplementedError | ||
|
||
def clear_services(self) -> bool: | ||
"""Remove all registered OWS services.""" | ||
raise NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.