Skip to content

Commit

Permalink
Merge branch 'feature/issue-15-infrastructure-for-opt-out-backends' i…
Browse files Browse the repository at this point in the history
…nto develop
  • Loading branch information
Trevor committed Jun 10, 2015
2 parents 2ed5fef + bcd980f commit 8ca82e9
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
Empty file.
15 changes: 15 additions & 0 deletions opt_out_http_api/backends/interface.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
This is where the description of what an opt out backend should be
capable of will go. Such a description is called an 'interface'.
The package 'zope.interfaces' provides tools for writing these. You
can find documentation at
http://docs.zope.org/zope.interface/README.html#defining-interfaces.
Initially the interface will have just two methods -- one for getting
and opt out and one for setting an opt out.
The implementations of the interfaces should go in memory.py and
riak.py. Start with the memory.py one and leave the Riak one for
later.
"""
9 changes: 9 additions & 0 deletions opt_out_http_api/backends/memory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""
This is where we will put the in-memory opt out store that we
will use for testing and simple demos.
Essentially it's the same as the implementation that exists in
api_methods right now (i.e. a list of opt outs in memory), but
it will conform to the interface in backends.interface and
perhaps be a little nicer.
"""
5 changes: 5 additions & 0 deletions opt_out_http_api/backends/riak.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""
This is where the "real" backend implementation will live.
Not worry about it for the moment.
"""

0 comments on commit 8ca82e9

Please sign in to comment.